From d91a96bc248895b942b6602cd449451a2a84e2e1 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 15 Sep 2020 10:34:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E9=98=85=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/customer/customize/ConfigItem.vue | 11 +++---- .../modules/customer/init/RegisterList.vue | 29 ++++++++++--------- .../modules/customer/manage/ConfigForm.vue | 8 ++--- .../productConfig/subscribe/TempDetail.vue | 6 ++-- .../productConfig/subscribe/TempEdit.vue | 4 +++ 5 files changed, 30 insertions(+), 28 deletions(-) diff --git a/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue b/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue index 594a7c6..3a16feb 100644 --- a/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue @@ -684,7 +684,7 @@ export default { const { data, code, msg, internalMsg } = await requestPost(url, this.upOrDownForm) if (code === 0) { - debugger + this.roleCheckedArray = [] data.forEach(item => { @@ -746,12 +746,11 @@ export default { this.endLoading() }, handleCheckAllChange (val) { + this.roleCheckedArray = [] if (val) { this.roleAllList.forEach(item => { this.roleCheckedArray.push(item.roleKey) }) - } else { - this.roleCheckedArray = [] } this.isIndeterminate = false; @@ -790,8 +789,7 @@ export default { let one = {} for (let i = 0; i < this.resiHaveList.length; i++) { let obj = {} - // eslint-disable-next-line - // debugger + if (i === index - 1) { one.customerId = this.resiHaveList[i].customerId one.functionId = this.resiHaveList[i].functionId @@ -839,8 +837,7 @@ export default { let one = {} for (let i = 0; i < this.workHaveList.length; i++) { let obj = {} - // eslint-disable-next-line - // debugger + if (i === index - 1) { one.customerId = this.workHaveList[i].customerId one.functionId = this.workHaveList[i].functionId diff --git a/epmet-oper-web/src/views/modules/customer/init/RegisterList.vue b/epmet-oper-web/src/views/modules/customer/init/RegisterList.vue index e54e2d2..fe447bb 100644 --- a/epmet-oper-web/src/views/modules/customer/init/RegisterList.vue +++ b/epmet-oper-web/src/views/modules/customer/init/RegisterList.vue @@ -87,7 +87,7 @@ 同步默认订阅消息 + @click="syncSubSure">同步默认订阅消息 - - { if ( - row.initState === 0 && - row.resiAuth === 1 && - row.workAuth === 1 + row.initState === 1 ) { return true } else { @@ -413,19 +411,21 @@ export default { //订阅消息 showSubscribe (row) { this.diaSubVisible = true + this.resiDataList = [] + this.workDataList = [] this.$nextTick(() => { - this.loadSubscribeData(row) // 解决表格错位 + this.loadSubscribeData(row.customerId) // 解决表格错位 }) }, //加载列表数据 - async loadSubscribeData (row) { + async loadSubscribeData (customerId) { this.dataListLoading = true - this.selCustomerId = row.customerId + this.selCustomerId = customerId // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getcustomerlist', const url = '/third/subscribe/getcustomerlist' let params = { - customerId: row.customerId, + customerId: customerId, workAppId: this.workAppid, resiAppId: this.resiAppid, } @@ -439,13 +439,13 @@ export default { this.workTempIdList = [] this.resiDataList.forEach(element => { if (element.state === '0') { - this.resiTempIdList.push(element.priTmplId) + this.resiTempIdList.push(element.id) } }) this.workDataList.forEach(element => { if (element.state === '0') { - this.workTempIdList.push(element.priTmplId) + this.workTempIdList.push(element.id) } }) @@ -472,8 +472,8 @@ export default { async syncSub () { this.startLoading() - const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/init' - // const url = '/third/subscribe/init' + // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/init' + const url = '/third/subscribe/init' let params = { customerId: this.selCustomerId, @@ -486,6 +486,7 @@ export default { const { data, code, msg, internalMsg } = await requestPost(url, params) if (code === 0) { this.$message.success('同步成功') + this.loadSubscribeData(this.selCustomerId) } else { this.$message.error(msg + ":" + internalMsg) } diff --git a/epmet-oper-web/src/views/modules/customer/manage/ConfigForm.vue b/epmet-oper-web/src/views/modules/customer/manage/ConfigForm.vue index 663fb60..2e7cf95 100644 --- a/epmet-oper-web/src/views/modules/customer/manage/ConfigForm.vue +++ b/epmet-oper-web/src/views/modules/customer/manage/ConfigForm.vue @@ -2,18 +2,18 @@
- +
- - +
diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue index 1f93158..cdb21fe 100644 --- a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue @@ -160,7 +160,7 @@ export default { loadData () { //左侧示例解析 this.exampleArray = [] - let array = this.dataForm.example.split('\\n') + let array = this.dataForm.example.split(/[(\r\n)\r\n]+/) for (let i = 0; i < array.length - 1; i++) { let oneArray = array[i].split(':') let obj = {} @@ -172,7 +172,7 @@ export default { //右侧详细内容解析 this.contentArray = [] - let arrayContent = this.dataForm.content.split(' ') + let arrayContent = this.dataForm.content.split(/[(\r\n)\r\n]+/) for (let i = 0; i < arrayContent.length - 1; i++) { let oneArray = arrayContent[i].split(':') let obj = {} @@ -245,7 +245,7 @@ export default { border-radius: 5px; } .div_left_title { - margin: 10px 10px; + margin: 10px 10px 30px 10px; font-size: 18px; } .padding_10 { diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue index f041a0d..a2df4b8 100644 --- a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue @@ -230,6 +230,10 @@ export default { this.handleClose() } else { this.$message.error(msg + ":" + internalMsg) + let clientType = this.dataForm.appId === this.resiAppid ? 'resi' : 'gov' + this.$emit('editDiaOK', clientType) + this.handleClose() + }