From c3ab937cd17466f6024d50e9b10dc006ecd3623c Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Mon, 14 Sep 2020 14:04:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=88=B1=E5=BF=83=E4=BA=92?= =?UTF-8?q?=E5=8A=A9banner?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/modules/customer/customize/MiniHome.vue | 12 ++++++++---- .../modules/productConfig/homeCustom/index.vue | 14 +++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue b/epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue index 6ca1920..edd22d5 100644 --- a/epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue @@ -135,8 +135,8 @@ :is-focused="focusedCpt.tempOnlyId===item.tempOnlyId" @del="delCpt" @sort="changeCptDisplayOrder" - @focus="focusCpt" - v-for="item in cntCptList"> + @focus="focusCpt($event, index)" + v-for="(item, index) in cntCptList"> @@ -526,7 +526,8 @@ export default { focusedCpt: { tempOnlyId: '' }, - uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/customerlogo/upload' + uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/customerlogo/upload', + globalIndex: 0 } }, @@ -841,8 +842,9 @@ export default { this.focusedCpt = { tempOnlyId: '' } }, // 聚焦实例组件 - focusCpt (item) { + focusCpt (item, index) { console.log('聚焦实例组件') + this.globalIndex = index if (this.isInPreview) return if (this.focusedCpt.tempOnlyId === item.tempOnlyId) { this.cleanFocusCpt() @@ -931,7 +933,9 @@ export default { this.focusedCpt.configuration = { url: res.data.url } + this.cntCptList[this.globalIndex].demoData.pic = res.data.url this.focusedCpt.configuration = JSON.stringify(this.focusedCpt.configuration) + this.focusedCpt.demoData = JSON.stringify(this.cntCptList[this.globalIndex].demoData) } } } diff --git a/epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue b/epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue index d9e6501..9a9c363 100644 --- a/epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue +++ b/epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue @@ -144,8 +144,8 @@ :is-focused="focusedCpt.tempOnlyId===item.tempOnlyId" @del="delCpt" @sort="changeCptDisplayOrder" - @focus="focusCpt" - v-for="item in cntCptList"> + @focus="focusCpt($event, index)" + v-for="(item, index) in cntCptList"> @@ -533,7 +533,8 @@ export default { focusedCpt: { tempOnlyId: '' }, - uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/customerlogo/upload' + uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/customerlogo/upload', + globalIndex: 0 } }, @@ -833,8 +834,9 @@ export default { this.focusedCpt = { tempOnlyId: '' } }, // 聚焦实例组件 - focusCpt (item) { - console.log('聚焦实例组件', item) + focusCpt (item, index) { + console.log('聚焦实例组件', item, index) + this.globalIndex = index if (this.isInPreview) return if (this.focusedCpt.tempOnlyId === item.tempOnlyId) { this.cleanFocusCpt() @@ -908,7 +910,9 @@ export default { this.focusedCpt.configuration = { url: res.data.url } + this.cntCptList[this.globalIndex].demoData.pic = res.data.url this.focusedCpt.configuration = JSON.stringify(this.focusedCpt.configuration) + this.focusedCpt.demoData = JSON.stringify(this.cntCptList[this.globalIndex].demoData) } } }