|
@@ -88,7 +88,7 @@
|
|
|
<vxe-column field="visible" title="显示" width="90">
|
|
|
<template #header> <vxe-checkbox v-model="visibleCheck" size="mini">显示</vxe-checkbox></template>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-checkbox v-model="scope.row.visible" @change="visibleCheckChange(scope)" />
|
|
|
+ <el-checkbox v-model="scope.row.visible" @change="visibleCheckChange(scope,'visible')" />
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<!-- <vxe-column field="visible" title="移动端显示" width="90">-->
|
|
@@ -100,7 +100,7 @@
|
|
|
<vxe-column field="sortable" title="排序" width="90">
|
|
|
<template #header> <vxe-checkbox v-model="sortCheck" size="mini">排序</vxe-checkbox></template>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-checkbox v-model="scope.row.sortable" />
|
|
|
+ <el-checkbox v-model="scope.row.sortable" @change="visibleCheckChange(scope,'sortable')"/>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<vxe-column field="showSummary" title="合计" width="60">
|
|
@@ -378,15 +378,15 @@ export default {
|
|
|
this.fieldFormSet = g.Copy(item)
|
|
|
this.isColorVisible = true
|
|
|
},
|
|
|
- visibleCheckChange(scope) {
|
|
|
+ visibleCheckChange(scope,type) {
|
|
|
const { row } = scope;
|
|
|
- this.updateChildrenVisibility(row, row.visible);
|
|
|
+ this.updateChildrenVisibility(row, type,row[type]);
|
|
|
},
|
|
|
- updateChildrenVisibility(node, visibility) {
|
|
|
+ updateChildrenVisibility(node, type,visibility) {
|
|
|
if (node.children && node.children.length > 0) {
|
|
|
node.children.forEach(child => {
|
|
|
- child.visible = visibility;
|
|
|
- this.updateChildrenVisibility(child, visibility);
|
|
|
+ child[type] = visibility;
|
|
|
+ this.updateChildrenVisibility(child,type, visibility);
|
|
|
});
|
|
|
}
|
|
|
},
|