From ddd3d89a1414688a885670d43000751d036b3bf7 Mon Sep 17 00:00:00 2001 From: guoyue Date: Mon, 18 Jul 2022 13:53:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=8B=E8=83=BD=E5=9C=BA=E6=99=AF=E6=8C=82?= =?UTF-8?q?=E6=8E=A5=E5=A2=9E=E5=8A=A0=E8=83=BD=E5=8A=9B=E8=BE=93=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ability/IntegratedServices-add.vue | 1 - .../assignedScene/add-update-scene.vue | 97 +++++++++++++------ .../ability/components/common-question.vue | 56 ++++++++--- 3 files changed, 112 insertions(+), 42 deletions(-) diff --git a/back/src/views/modules/ability/IntegratedServices-add.vue b/back/src/views/modules/ability/IntegratedServices-add.vue index 8144b0b9..d56937be 100644 --- a/back/src/views/modules/ability/IntegratedServices-add.vue +++ b/back/src/views/modules/ability/IntegratedServices-add.vue @@ -483,7 +483,6 @@ export default { -webkit-box-sizing: border-box; box-sizing: border-box; line-height: 32px; - background: pink; width: 120px; } diff --git a/back/src/views/modules/ability/assignedScene/add-update-scene.vue b/back/src/views/modules/ability/assignedScene/add-update-scene.vue index a1e69fad..4a8275af 100644 --- a/back/src/views/modules/ability/assignedScene/add-update-scene.vue +++ b/back/src/views/modules/ability/assignedScene/add-update-scene.vue @@ -31,7 +31,8 @@ 基本信息 - + + +
+ + +
+
v.attrType !== title)) { + this.dataForm.fuseAttrList.push({ + 'attrType': title, + 'attrValue': JSON.stringify(data.list) + }) + } else { this.dataForm.fuseAttrList.map(v => { - if (v.attrType === '使用步骤') { + if (v.attrType === title) { v.attrValue = JSON.stringify(data.list) } }) } - if (data.title == '关联能力') { - this.dataForm.fuseResourceList = data.list - } }, // 改变按钮状态 changeBtn(data) { @@ -281,28 +321,30 @@ export default { this.$nextTick(() => { this.$refs.combineAbility && this.$refs.combineAbility.getDataInfo(data) this.$refs.sceneUseUp && this.$refs.sceneUseUp.getDataInfo(data) + this.$refs.commonQuestion && this.$refs.commonQuestion.getDataInfo(data) console.log('this.dataForm----详情-------->', this.dataForm); }) }, // 重组数据 - getDisPlayData() { - this.$nextTick(() => { - const questionObj = this.dataForm.fuseAttrList.find(v => v.attrType == '使用步骤') || {}; - let fuseResourceList = this.dataForm.fuseResourceList || []; - let arr = [] - fuseResourceList.map(v => { - if (v.resource) { - arr.push({ - name: v.resource.name, - type: v.resource.type, - }) - } - }) - this.displayListInfo['使用步骤'] = JSON.parse(questionObj.attrValue || '[]') - this.displayListInfo['关联能力'] = arr - }) - - }, + // getDisPlayData() { + // this.$nextTick(() => { + // const stepObj = this.dataForm.fuseAttrList.find(v => v.attrType == '使用步骤') || {}; + // const moreObj = this.dataForm.fuseAttrList.find(v => v.attrType == '更多能力') || {}; + // let fuseResourceList = this.dataForm.fuseResourceList || []; + // let arr = [] + // fuseResourceList.map(v => { + // if (v.resource) { + // arr.push({ + // name: v.resource.name, + // type: v.resource.type, + // }) + // } + // }) + // this.displayListInfo['使用步骤'] = JSON.parse(stepObj.attrValue || '[]') + // this.displayListInfo['更多能力'] = JSON.parse(moreObj.attrValue || '[]') + // this.displayListInfo['关联能力'] = arr + // }) + // }, }, beforeDestroy() { this.clearForm() @@ -403,7 +445,6 @@ export default { -webkit-box-sizing: border-box; box-sizing: border-box; line-height: 32px; - background: pink; width: 120px; } diff --git a/back/src/views/modules/ability/components/common-question.vue b/back/src/views/modules/ability/components/common-question.vue index 1d729e1e..bc67d874 100644 --- a/back/src/views/modules/ability/components/common-question.vue +++ b/back/src/views/modules/ability/components/common-question.vue @@ -1,14 +1,17 @@