diff --git a/back/src/views/modules/ability/IntegratedServices-add.vue b/back/src/views/modules/ability/IntegratedServices-add.vue index fc960d21..9df71299 100644 --- a/back/src/views/modules/ability/IntegratedServices-add.vue +++ b/back/src/views/modules/ability/IntegratedServices-add.vue @@ -2,7 +2,7 @@
-
填写字段
- {{ item.name }} @@ -21,7 +21,7 @@ -
+
- +
+
+ -
+
- +
+
@@ -138,6 +140,7 @@ import qs from "qs"; import CommonQuestion from './components/common-question.vue'; import IntegratedCombineAbility from './components/integrated-combine-ability.vue'; import Cookies from 'js-cookie' +import { tableColumns } from './IntegratedServices.vue'; export default { components: { @@ -158,7 +161,7 @@ export default { }, { "attrType": "常见问题", - "attrValue": [{ question: "", answer: "" }], + "attrValue": '[{ question: "", answer: "" }]', } ], "fuseResourceList": [ @@ -172,11 +175,8 @@ export default { "provider": "", "providerMobile": "", "providerUser": "", - // "updateDate": "", - // "updater": 0, - // "createDate": "", - // "creator": 0, "deptUser": "", + type: '融合服务' }, rules: { name: [ @@ -220,16 +220,7 @@ export default { areaList: [], fileNameList: [], addOrUpdateVisibleCopy: this.addOrUpdateVisible, - displayInfo: { - 'name': '融合服务名称', - 'description': '融合服务描述', - 'applicationArea': '应用领域', - 'deptUser': '部门联系人', - 'mobile': '部门联系人电话', - 'provider': '服务商', - 'providerMobile': '服务商联系人', - 'providerMobile': '服务商联系人电话', - }, + displayInfo: tableColumns, displayListInfo: { '常见问题': [], '组合能力': [] @@ -257,9 +248,12 @@ export default { addOrUpdateVisible: { handler(newVal) { this.addOrUpdateVisibleCopy = newVal; + if (this.modalType == 'add' && newVal) { + this.getDetail(this.dataForm) + } }, immediate: true, - } + }, }, mounted() { // 获取应用领域 @@ -365,21 +359,24 @@ export default { getDetail(data) { this.dataForm = data; this.$nextTick(() => { + this.$refs.combineAbility && this.$refs.combineAbility.getDataInfo(data) + this.$refs.commonQuestion && this.$refs.commonQuestion.getDataInfo(data) console.log('this.dataForm----详情-------->', this.dataForm); }) }, // 重组数据 getDisPlayData() { this.$nextTick(() => { - console.log('this.dataForm----重组数据-------->', this.dataForm); const questionObj = this.dataForm.fuseAttrList.find(v => v.attrType == '常见问题') || {}; let fuseResourceList = this.dataForm.fuseResourceList || []; let arr = [] fuseResourceList.map(v => { - arr.push({ - name: v.resource.name, - type: v.resource.type, - }) + if (v.resource) { + arr.push({ + name: v.resource.name, + type: v.resource.type, + }) + } }) this.displayListInfo['常见问题'] = JSON.parse(questionObj.attrValue || '[]') this.displayListInfo['组合能力'] = arr diff --git a/back/src/views/modules/ability/IntegratedServices.vue b/back/src/views/modules/ability/IntegratedServices.vue index 16972066..ae494b97 100644 --- a/back/src/views/modules/ability/IntegratedServices.vue +++ b/back/src/views/modules/ability/IntegratedServices.vue @@ -21,25 +21,8 @@ - - - - - - - - - - - - - - - - - - - + @@ -71,20 +52,28 @@ 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 29aae680..8ddc1137 100644 --- a/back/src/views/modules/ability/assignedScene/add-update-scene.vue +++ b/back/src/views/modules/ability/assignedScene/add-update-scene.vue @@ -1,7 +1,7 @@