From 607e119c61a4338559e6fba82abcca88efe47bd8 Mon Sep 17 00:00:00 2001 From: guoyue Date: Wed, 10 Aug 2022 15:47:24 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E7=BB=84=E4=BB=B6=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=88=97=E8=A1=A8=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ability/components/combine-ability.vue | 41 ++++--------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/back/src/views/modules/ability/components/combine-ability.vue b/back/src/views/modules/ability/components/combine-ability.vue index 5da84a14..55c9fb28 100644 --- a/back/src/views/modules/ability/components/combine-ability.vue +++ b/back/src/views/modules/ability/components/combine-ability.vue @@ -23,20 +23,7 @@ - - -
-
-
- -
- {{ item.name || '--' }} -
-
-
-
-
- + @@ -149,8 +136,8 @@ let keyObj = { nameKey: 'zyname' }, '组件服务': { - idKey: 'zycode', - nameKey: 'zyname' + idKey: 'id', + nameKey: 'name' }, } @@ -204,15 +191,15 @@ export default { let attrValue = dataForm.fuseResourceList.filter(v => v.type == this.type); if (attrValue.length > 0) { attrValue.map(val => { - let item = this.allData.find(v => v.id == val.resourceId) || {}; let _obj = { type: val.type, id: val.resourceId, - name: item.name + name: val.resource && val.resource.name }; arr.push(_obj); }); } + // 展示 this.displayList = JSON.parse(JSON.stringify(arr)); // 已选中 @@ -223,27 +210,17 @@ export default { }, // 获取列表 getData() { - // this.allData = []; - // this.transferData = []; - // let arr = JSON.parse(JSON.stringify(sjzyArray)); - // arr.map(v => { - // this.transferData.push({ - // type: this.type, - // id: v[keyObj[this.type].idKey], - // name: v[keyObj[this.type].nameKey] || "--" - // }); - // }); - // this.allData = JSON.parse(JSON.stringify(this.transferData)); - // return; if (this.getDataParams.url === '') { return; } - this.$http[this.getDataParams.methods](this.getDataParams.url, this.getDataParams.postData).then(res => { + this.$http[this.getDataParams.methods](this.getDataParams.url, { + params: this.getDataParams.postData + }).then(res => { console.log('res.data----获取列表-------->', res.data); if (res.data.code !== 0) { return this.$message.error(res.msg); } - this.transferData = []; // allData + this.transferData = []; this.allData = []; (res.data.data || []).map(v => { this.transferData.push({