diff --git a/epmet-oper-web/src/views/modules/customer/customize/menuCustomer.vue b/epmet-oper-web/src/views/modules/customer/customize/menuCustomer.vue index afbf963..fa4c3e1 100644 --- a/epmet-oper-web/src/views/modules/customer/customize/menuCustomer.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/menuCustomer.vue @@ -86,7 +86,7 @@ export default { mixinViewModuleOptions: { getDataListURL: '/gov/access/menu/customerMenuList', - createdIsNeed:false + createdIsNeed: false } }; }, @@ -95,7 +95,9 @@ export default { components: { AddOrUpdate }, - + mounted() { + this.initData2(this.dataList); + }, methods: { initData(customerId, customerName) { this.customerId = customerId; @@ -106,7 +108,7 @@ export default { console.log(this.dataList); this.initData2(this.dataList); }, - + initData2(data) { data.forEach(item => { item.isSelect = false; //默认为不选中 @@ -115,13 +117,12 @@ export default { } }); }, - + getData(data) { - console.log("getData",data) + console.log('getData', data); data.forEach(item => { - console.log(item.name,item.isSelect) + console.log(item.name, item.isSelect); if (item.isSelect) { - this.multipleSelection.push(item.id); } if (item.children) { @@ -174,7 +175,7 @@ export default { } row.isSelect = !row.isSelect; let that = this; - + function selectAllChildrens(data) { data.forEach(item => { item.isSelect = row.isSelect; @@ -184,7 +185,7 @@ export default { } }); } - + function getSelectStatus(selectStatuaArr, data) { data.forEach(childrenItem => { selectStatuaArr.push(childrenItem.isSelect); @@ -192,7 +193,7 @@ export default { getSelectStatus(selectStatuaArr, childrenItem.children); } }); - + return selectStatuaArr; } function getLevelStatus(row) { @@ -228,7 +229,7 @@ export default { function operateLastLeve(row) { //操作的是子节点 1、获取父节点 2、判断子节点选中个数,如果全部选中则父节点设为选中状态,如果都不选中,则为不选中状态,如果部分选择,则设为不明确状态 let selectStatuaArr = []; - + let item = getExplicitNode(that.dataList, row.pid); selectStatuaArr = getSelectStatus(selectStatuaArr, item.children); if ( @@ -254,7 +255,7 @@ export default { } } //判断操作的是子级点复选框还是父级点复选框,如果是父级点,则控制子级点的全选和不全选 - + //1、只是父级 2、既是子集,又是父级 3、只是子级 let levelSataus = getLevelStatus(row); if (levelSataus == 1) { @@ -301,7 +302,7 @@ export default { let menuIds = []; this.multipleSelection = []; this.getData(this.dataList); - + if (id != '') { menuIds = [id]; } else { @@ -328,7 +329,7 @@ export default { let menuIds = []; this.multipleSelection = []; this.getData(this.dataList); - + if (id != '') { menuIds = [id]; } else { @@ -422,8 +423,8 @@ export default { } .indeterminate .el-checkbox__input .el-checkbox__inner { - background-color: #17B3A3 !important; - border-color: #17B3A3 !important; + background-color: #17b3a3 !important; + border-color: #17b3a3 !important; color: #fff !important; } @@ -463,4 +464,3 @@ export default { display: block !important; } - diff --git a/epmet-oper-web/src/views/modules/customer/customize/menuDataCustomer.vue b/epmet-oper-web/src/views/modules/customer/customize/menuDataCustomer.vue index e54c612..f832be7 100644 --- a/epmet-oper-web/src/views/modules/customer/customize/menuDataCustomer.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/menuDataCustomer.vue @@ -96,11 +96,15 @@ export default { AddOrUpdate }, created() {}, - mounted() {}, + mounted() { + this.initData2(this.dataList); + }, methods: { + initData(customerId, customerName) { this.customerId = customerId; this.customerName = customerName; + // if (this.mixinViewModuleOptions.createdIsNeed) { // console.log(this.customerId+"22222"); this.query(); diff --git a/epmet-oper-web/src/views/modules/workPc/dataMenu.vue b/epmet-oper-web/src/views/modules/workPc/dataMenu.vue index a54a2fe..ff429a5 100644 --- a/epmet-oper-web/src/views/modules/workPc/dataMenu.vue +++ b/epmet-oper-web/src/views/modules/workPc/dataMenu.vue @@ -111,6 +111,9 @@ export default { }, ...mapGetters(['clientHeight', 'resolution']) }, + mounted() { + this.initData2(this.dataList); + }, methods: { initData(customerId, customerName) { this.customerId = customerId; diff --git a/epmet-oper-web/src/views/modules/workPc/menu.vue b/epmet-oper-web/src/views/modules/workPc/menu.vue index 12aedce..06a844d 100644 --- a/epmet-oper-web/src/views/modules/workPc/menu.vue +++ b/epmet-oper-web/src/views/modules/workPc/menu.vue @@ -90,8 +90,7 @@ export default { dataForm: { tableName: 'gov_menu' }, selMenuName: '', selection: [], - selAllFlag: false, - + selAllFlag: false }; }, components: { @@ -106,9 +105,12 @@ export default { }, ...mapGetters(['clientHeight', 'resolution']) }, - + mounted() { + this.initData2(this.dataList); + }, methods: { initData(customerId, customerName) { + console.log('ddddddddd'); this.customerId = customerId; this.customerName = customerName; // if (this.mixinViewModuleOptions.createdIsNeed) { @@ -117,7 +119,7 @@ export default { console.log(this.dataList); this.initData2(this.dataList); }, - + initData2(data) { data.forEach(item => { item.isSelect = false; //默认为不选中 @@ -126,13 +128,12 @@ export default { } }); }, - + getData(data) { - console.log("getData",data) + console.log('getData', data); data.forEach(item => { - console.log(item.name,item.isSelect) + console.log(item.name, item.isSelect); if (item.isSelect) { - this.multipleSelection.push(item.id); } if (item.children) { @@ -185,7 +186,7 @@ export default { } row.isSelect = !row.isSelect; let that = this; - + function selectAllChildrens(data) { data.forEach(item => { item.isSelect = row.isSelect; @@ -195,7 +196,7 @@ export default { } }); } - + function getSelectStatus(selectStatuaArr, data) { data.forEach(childrenItem => { selectStatuaArr.push(childrenItem.isSelect); @@ -203,7 +204,7 @@ export default { getSelectStatus(selectStatuaArr, childrenItem.children); } }); - + return selectStatuaArr; } function getLevelStatus(row) { @@ -239,7 +240,7 @@ export default { function operateLastLeve(row) { //操作的是子节点 1、获取父节点 2、判断子节点选中个数,如果全部选中则父节点设为选中状态,如果都不选中,则为不选中状态,如果部分选择,则设为不明确状态 let selectStatuaArr = []; - + let item = getExplicitNode(that.dataList, row.pid); selectStatuaArr = getSelectStatus(selectStatuaArr, item.children); if ( @@ -265,7 +266,7 @@ export default { } } //判断操作的是子级点复选框还是父级点复选框,如果是父级点,则控制子级点的全选和不全选 - + //1、只是父级 2、既是子集,又是父级 3、只是子级 let levelSataus = getLevelStatus(row); if (levelSataus == 1) { @@ -332,7 +333,7 @@ export default { let menuIds = []; this.multipleSelection = []; this.getData(this.dataList); - + if (id != '') { menuIds = [id]; } else { @@ -358,7 +359,7 @@ export default { let menuIds = []; this.multipleSelection = []; this.getData(this.dataList); - + if (id != '') { menuIds = [id]; } else { @@ -393,8 +394,8 @@ export default { } .indeterminate .el-checkbox__input .el-checkbox__inner { - background-color: #17B3A3 !important; - border-color: #17B3A3 !important; + background-color: #17b3a3 !important; + border-color: #17b3a3 !important; color: #fff !important; }