|
|
@@ -9,7 +9,7 @@ export class SeatingPlanPageViewModel{
|
|
|
@Trace safeTop: number = 0
|
|
|
// 学生列表
|
|
|
@Trace dataSource: string[] = ['张三', '李四', '王五', '赵六', '孙七', '周八', '吴九', '小十', '张三', '李四', '王五', '赵六', '孙七', '周八', '吴九', '小十']
|
|
|
- // 座位表 - 二维数组
|
|
|
+ // 座位表 - 二维数组 8*8
|
|
|
@Trace seatingPlan: Array<string[]> = new Array(4).fill(new Array(8).fill(''))
|
|
|
// 当前显示的模式: 1 - 单列 2 - 双列
|
|
|
@Trace columnMode: number = 1
|
|
|
@@ -146,6 +146,8 @@ export class SeatingPlanPageViewModel{
|
|
|
let x = this.seatingPlan.length
|
|
|
let y = this.seatingPlan[0].length
|
|
|
|
|
|
+ if(x == 8) return
|
|
|
+
|
|
|
this._addUndoData()
|
|
|
this.seatingPlan.push(new Array(y).fill(''))
|
|
|
}
|
|
|
@@ -156,6 +158,9 @@ export class SeatingPlanPageViewModel{
|
|
|
_onAddColumn() {
|
|
|
let x = this.seatingPlan.length
|
|
|
let y = this.seatingPlan[0].length
|
|
|
+
|
|
|
+ if(y == 13) return
|
|
|
+
|
|
|
this._addUndoData()
|
|
|
for (let index = 0; index < this.seatingPlan.length; index++) {
|
|
|
let arr = [...this.seatingPlan[index]]
|
|
|
@@ -172,8 +177,8 @@ export class SeatingPlanPageViewModel{
|
|
|
let x = this.seatingPlan.length
|
|
|
let y = this.seatingPlan[0].length
|
|
|
|
|
|
- if(x == 1){
|
|
|
- IBestToast.show('行数不足1行')
|
|
|
+ if(x == 4){
|
|
|
+ IBestToast.show('行数不足4行')
|
|
|
return
|
|
|
}
|
|
|
this._addUndoData()
|
|
|
@@ -187,8 +192,8 @@ export class SeatingPlanPageViewModel{
|
|
|
let x = this.seatingPlan.length
|
|
|
let y = this.seatingPlan[0].length
|
|
|
|
|
|
- if(y == 1) {
|
|
|
- IBestToast.show('列数不足1列')
|
|
|
+ if(y == 8) {
|
|
|
+ IBestToast.show('列数不足8列')
|
|
|
return
|
|
|
}
|
|
|
this._addUndoData()
|