|
|
@@ -44,14 +44,12 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i">
|
|
|
- <el-form-item :label="item.label">
|
|
|
- <el-switch v-model="formData[item.prop]" active-value="1" inactive-value="0"></el-switch>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <el-row v-for="(item1,index) in dynamicTableColumnsCount" :key="index">
|
|
|
+ <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i">
|
|
|
+ <el-form-item v-if="index > 0 && i < index * 4 && i > index * 4 - 5" :label="item.label">
|
|
|
+ <el-switch v-model="formData[item.prop]" active-value="1" inactive-value="0"></el-switch>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
@@ -146,6 +144,7 @@
|
|
|
|
|
|
},
|
|
|
dynamicTableColumns: [],
|
|
|
+ dynamicTableColumnsCount: [],
|
|
|
CurrentPage: 1, // 分页
|
|
|
Size: 10,
|
|
|
classId: '',
|
|
|
@@ -177,7 +176,8 @@
|
|
|
setapi.initBbTableHeader(this.$axios).then(res => {
|
|
|
|
|
|
this.dynamicTableColumns = res.data.items
|
|
|
- console.log(res.data.items)
|
|
|
+ let count = Math.ceil(this.dynamicTableColumns.length/4) // (向上取整)
|
|
|
+ this.dynamicTableColumnsCount = this.dynamicTableColumns.slice(0,count + 1)
|
|
|
})
|
|
|
},
|
|
|
getChooseCode(val) {
|