From 52f84dd06cd7b29997f6e481ae187002a49b2169 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 28 Jul 2021 17:26:03 +0800 Subject: [PATCH] footbar --- .../productConfig/footbar/FootbarList.vue | 14 +++--- .../productConfig/footbar/FootbarSync.vue | 44 ++++++++++++------- 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarList.vue b/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarList.vue index 4a18de3..7b01e48 100644 --- a/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarList.vue +++ b/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarList.vue @@ -165,11 +165,11 @@ export default { plain: false, methodName: 'del', // 回调方法名称 isShow: (row) => { - if (this.env === 'prod' || this.showFrom === 'customize') { - return false - } else { - return true - } + // if (this.env === 'prod' || this.showFrom === 'customize') { + // return false + // } else { + return true + // } } } ], @@ -503,7 +503,9 @@ export default { // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/deletefootbar' const url = '/oper/customize/customerfootbar/deletefootbar' const param = { - id: row.id + id: row.id, + customerId: row.customerId, + barKey: row.barKey } window.app.ajax.post(url, param, (data, rspMsg) => { diff --git a/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarSync.vue b/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarSync.vue index 9bfc678..a85dafc 100644 --- a/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarSync.vue +++ b/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarSync.vue @@ -6,8 +6,7 @@ :close-on-press-escape="false" :width="diaWidth+'%'" :top="diaTop"> - +
+ @select="handleSelectSync" + @select-all="handleSelectAllSync"> @@ -48,8 +47,8 @@ :data="allNoList" border v-loading="tableLoading" - @select="handleSelect" - @select-all="handleSelectAll"> + @select="handleSelectNo" + @select-all="handleSelectAllNo"> @@ -102,10 +101,9 @@ export default { return this.clientHeight - 60 - 80 - 80 - 280 }, tableHeight () { - return this.clientHeight - 60 - 80 - 80 - 280 - 100 + return this.clientHeight - 60 - 80 - 80 - 280 }, diaWidth () { - return this.resolution === 'small' ? 60 : 50 }, diaTop () { @@ -125,17 +123,35 @@ export default { }, // 选中复选框 - handleSelect (selection, row) { + handleSelectSync (selection, row) { + this.syncBarKeyList = [] selection.forEach(item => { - this.syncBarKeyList.push(item) + this.syncBarKeyList.push(item.barKey) }); }, // 全选复选框 - handleSelectAll (selection) { - debugger + handleSelectAllSync (selection) { + this.syncBarKeyList = [] + selection.forEach(item => { + this.syncBarKeyList.push(item.barKey) + }); + }, + // 选中复选框 + handleSelectNo (selection, row) { + this.addBarKeyList = [] + selection.forEach(item => { + this.addBarKeyList.push(item.barKey) + }); }, + // 全选复选框 + handleSelectAllNo (selection) { + this.addBarKeyList = [] + selection.forEach(item => { + this.addBarKeyList.push(item.barKey) + }); + }, async loadNoBarList () { @@ -167,6 +183,7 @@ export default { syncBarKeyList: this.syncBarKeyList, addBarKeyList: this.addBarKeyList, } + console.log("params", params) this.startLoading() const { data, code, msg } = await requestPost(url, params) if (code === 0) { @@ -211,7 +228,4 @@ export default { .wrap { height: 400px; } -.div_list { - height: 300px; -}