Browse Source

补充

wxz_dy_form_config
tianq 2 years ago
parent
commit
f11d9e9aac
  1. 34
      epmet-oper-web/src/views/modules/customer/customize/menuCustomer.vue
  2. 6
      epmet-oper-web/src/views/modules/customer/customize/menuDataCustomer.vue
  3. 3
      epmet-oper-web/src/views/modules/workPc/dataMenu.vue
  4. 35
      epmet-oper-web/src/views/modules/workPc/menu.vue

34
epmet-oper-web/src/views/modules/customer/customize/menuCustomer.vue

@ -86,7 +86,7 @@ export default {
mixinViewModuleOptions: { mixinViewModuleOptions: {
getDataListURL: '/gov/access/menu/customerMenuList', getDataListURL: '/gov/access/menu/customerMenuList',
createdIsNeed:false createdIsNeed: false
} }
}; };
}, },
@ -95,7 +95,9 @@ export default {
components: { components: {
AddOrUpdate AddOrUpdate
}, },
mounted() {
this.initData2(this.dataList);
},
methods: { methods: {
initData(customerId, customerName) { initData(customerId, customerName) {
this.customerId = customerId; this.customerId = customerId;
@ -106,7 +108,7 @@ export default {
console.log(this.dataList); console.log(this.dataList);
this.initData2(this.dataList); this.initData2(this.dataList);
}, },
initData2(data) { initData2(data) {
data.forEach(item => { data.forEach(item => {
item.isSelect = false; // item.isSelect = false; //
@ -115,13 +117,12 @@ export default {
} }
}); });
}, },
getData(data) { getData(data) {
console.log("getData",data) console.log('getData', data);
data.forEach(item => { data.forEach(item => {
console.log(item.name,item.isSelect) console.log(item.name, item.isSelect);
if (item.isSelect) { if (item.isSelect) {
this.multipleSelection.push(item.id); this.multipleSelection.push(item.id);
} }
if (item.children) { if (item.children) {
@ -174,7 +175,7 @@ export default {
} }
row.isSelect = !row.isSelect; row.isSelect = !row.isSelect;
let that = this; let that = this;
function selectAllChildrens(data) { function selectAllChildrens(data) {
data.forEach(item => { data.forEach(item => {
item.isSelect = row.isSelect; item.isSelect = row.isSelect;
@ -184,7 +185,7 @@ export default {
} }
}); });
} }
function getSelectStatus(selectStatuaArr, data) { function getSelectStatus(selectStatuaArr, data) {
data.forEach(childrenItem => { data.forEach(childrenItem => {
selectStatuaArr.push(childrenItem.isSelect); selectStatuaArr.push(childrenItem.isSelect);
@ -192,7 +193,7 @@ export default {
getSelectStatus(selectStatuaArr, childrenItem.children); getSelectStatus(selectStatuaArr, childrenItem.children);
} }
}); });
return selectStatuaArr; return selectStatuaArr;
} }
function getLevelStatus(row) { function getLevelStatus(row) {
@ -228,7 +229,7 @@ export default {
function operateLastLeve(row) { function operateLastLeve(row) {
// 1 2 // 1 2
let selectStatuaArr = []; let selectStatuaArr = [];
let item = getExplicitNode(that.dataList, row.pid); let item = getExplicitNode(that.dataList, row.pid);
selectStatuaArr = getSelectStatus(selectStatuaArr, item.children); selectStatuaArr = getSelectStatus(selectStatuaArr, item.children);
if ( if (
@ -254,7 +255,7 @@ export default {
} }
} }
// //
//1 2 3 //1 2 3
let levelSataus = getLevelStatus(row); let levelSataus = getLevelStatus(row);
if (levelSataus == 1) { if (levelSataus == 1) {
@ -301,7 +302,7 @@ export default {
let menuIds = []; let menuIds = [];
this.multipleSelection = []; this.multipleSelection = [];
this.getData(this.dataList); this.getData(this.dataList);
if (id != '') { if (id != '') {
menuIds = [id]; menuIds = [id];
} else { } else {
@ -328,7 +329,7 @@ export default {
let menuIds = []; let menuIds = [];
this.multipleSelection = []; this.multipleSelection = [];
this.getData(this.dataList); this.getData(this.dataList);
if (id != '') { if (id != '') {
menuIds = [id]; menuIds = [id];
} else { } else {
@ -422,8 +423,8 @@ export default {
} }
.indeterminate .el-checkbox__input .el-checkbox__inner { .indeterminate .el-checkbox__input .el-checkbox__inner {
background-color: #17B3A3 !important; background-color: #17b3a3 !important;
border-color: #17B3A3 !important; border-color: #17b3a3 !important;
color: #fff !important; color: #fff !important;
} }
@ -463,4 +464,3 @@ export default {
display: block !important; display: block !important;
} }
</style> </style>

6
epmet-oper-web/src/views/modules/customer/customize/menuDataCustomer.vue

@ -96,11 +96,15 @@ export default {
AddOrUpdate AddOrUpdate
}, },
created() {}, created() {},
mounted() {}, mounted() {
this.initData2(this.dataList);
},
methods: { methods: {
initData(customerId, customerName) { initData(customerId, customerName) {
this.customerId = customerId; this.customerId = customerId;
this.customerName = customerName; this.customerName = customerName;
// if (this.mixinViewModuleOptions.createdIsNeed) { // if (this.mixinViewModuleOptions.createdIsNeed) {
// console.log(this.customerId+"22222"); // console.log(this.customerId+"22222");
this.query(); this.query();

3
epmet-oper-web/src/views/modules/workPc/dataMenu.vue

@ -111,6 +111,9 @@ export default {
}, },
...mapGetters(['clientHeight', 'resolution']) ...mapGetters(['clientHeight', 'resolution'])
}, },
mounted() {
this.initData2(this.dataList);
},
methods: { methods: {
initData(customerId, customerName) { initData(customerId, customerName) {
this.customerId = customerId; this.customerId = customerId;

35
epmet-oper-web/src/views/modules/workPc/menu.vue

@ -90,8 +90,7 @@ export default {
dataForm: { tableName: 'gov_menu' }, dataForm: { tableName: 'gov_menu' },
selMenuName: '', selMenuName: '',
selection: [], selection: [],
selAllFlag: false, selAllFlag: false
}; };
}, },
components: { components: {
@ -106,9 +105,12 @@ export default {
}, },
...mapGetters(['clientHeight', 'resolution']) ...mapGetters(['clientHeight', 'resolution'])
}, },
mounted() {
this.initData2(this.dataList);
},
methods: { methods: {
initData(customerId, customerName) { initData(customerId, customerName) {
console.log('ddddddddd');
this.customerId = customerId; this.customerId = customerId;
this.customerName = customerName; this.customerName = customerName;
// if (this.mixinViewModuleOptions.createdIsNeed) { // if (this.mixinViewModuleOptions.createdIsNeed) {
@ -117,7 +119,7 @@ export default {
console.log(this.dataList); console.log(this.dataList);
this.initData2(this.dataList); this.initData2(this.dataList);
}, },
initData2(data) { initData2(data) {
data.forEach(item => { data.forEach(item => {
item.isSelect = false; // item.isSelect = false; //
@ -126,13 +128,12 @@ export default {
} }
}); });
}, },
getData(data) { getData(data) {
console.log("getData",data) console.log('getData', data);
data.forEach(item => { data.forEach(item => {
console.log(item.name,item.isSelect) console.log(item.name, item.isSelect);
if (item.isSelect) { if (item.isSelect) {
this.multipleSelection.push(item.id); this.multipleSelection.push(item.id);
} }
if (item.children) { if (item.children) {
@ -185,7 +186,7 @@ export default {
} }
row.isSelect = !row.isSelect; row.isSelect = !row.isSelect;
let that = this; let that = this;
function selectAllChildrens(data) { function selectAllChildrens(data) {
data.forEach(item => { data.forEach(item => {
item.isSelect = row.isSelect; item.isSelect = row.isSelect;
@ -195,7 +196,7 @@ export default {
} }
}); });
} }
function getSelectStatus(selectStatuaArr, data) { function getSelectStatus(selectStatuaArr, data) {
data.forEach(childrenItem => { data.forEach(childrenItem => {
selectStatuaArr.push(childrenItem.isSelect); selectStatuaArr.push(childrenItem.isSelect);
@ -203,7 +204,7 @@ export default {
getSelectStatus(selectStatuaArr, childrenItem.children); getSelectStatus(selectStatuaArr, childrenItem.children);
} }
}); });
return selectStatuaArr; return selectStatuaArr;
} }
function getLevelStatus(row) { function getLevelStatus(row) {
@ -239,7 +240,7 @@ export default {
function operateLastLeve(row) { function operateLastLeve(row) {
// 1 2 // 1 2
let selectStatuaArr = []; let selectStatuaArr = [];
let item = getExplicitNode(that.dataList, row.pid); let item = getExplicitNode(that.dataList, row.pid);
selectStatuaArr = getSelectStatus(selectStatuaArr, item.children); selectStatuaArr = getSelectStatus(selectStatuaArr, item.children);
if ( if (
@ -265,7 +266,7 @@ export default {
} }
} }
// //
//1 2 3 //1 2 3
let levelSataus = getLevelStatus(row); let levelSataus = getLevelStatus(row);
if (levelSataus == 1) { if (levelSataus == 1) {
@ -332,7 +333,7 @@ export default {
let menuIds = []; let menuIds = [];
this.multipleSelection = []; this.multipleSelection = [];
this.getData(this.dataList); this.getData(this.dataList);
if (id != '') { if (id != '') {
menuIds = [id]; menuIds = [id];
} else { } else {
@ -358,7 +359,7 @@ export default {
let menuIds = []; let menuIds = [];
this.multipleSelection = []; this.multipleSelection = [];
this.getData(this.dataList); this.getData(this.dataList);
if (id != '') { if (id != '') {
menuIds = [id]; menuIds = [id];
} else { } else {
@ -393,8 +394,8 @@ export default {
} }
.indeterminate .el-checkbox__input .el-checkbox__inner { .indeterminate .el-checkbox__input .el-checkbox__inner {
background-color: #17B3A3 !important; background-color: #17b3a3 !important;
border-color: #17B3A3 !important; border-color: #17b3a3 !important;
color: #fff !important; color: #fff !important;
} }

Loading…
Cancel
Save