Compare commits

..

2 Commits

Author SHA1 Message Date
unknown 8ec209162c Merge branch 'hi-ucs-dev' of http://192.168.124.50:3000/wuhongjian/hi-ucs into hi-ucs-dev 2022-10-13 18:55:19 +08:00
unknown d278b2194c 添加后端接口所需字段 2022-10-13 18:54:27 +08:00
2 changed files with 40 additions and 8 deletions

View File

@ -163,12 +163,26 @@ export const modalTypeText = {
}
export const getFuseResourceList = (abilityListObj) => {
debugger
const arr = []
let length = 0
for (const key in abilityListObj) {
if (Object.hasOwnProperty.call(abilityListObj, key)) {
const itemArray = abilityListObj[key]
itemArray.map((v, i) => {
debugger
if(key=='数据资源'){
itemArray.map((v, i) => {
const index = (i + 1) + length
arr.push({
resourceId: v.id,
type: key,
sequence: index,
resourceName:v.resourceName,
deptName:v.deptName,
})
})
}else{
itemArray.map((v, i) => {
const index = (i + 1) + length
arr.push({
resourceId: v,
@ -176,6 +190,8 @@ export const getFuseResourceList = (abilityListObj) => {
sequence: index
})
})
}
length = itemArray.length
}
}

View File

@ -20,7 +20,8 @@
:titles="nameArray" :props="{
key: 'id',
label: 'name',
}" :data="transferData">
}" :data="transferData"
@change="handleChange">
</el-transfer>
<el-input
v-model="searchValue"
@ -225,20 +226,20 @@ export default {
async getDataInfo (dataForm) {
await this.getData()
const arr = []
const attrValue = dataForm.fuseResourceList.filter(v => v.type == this.type)
const attrValue = dataForm.fuseResourceList.filter(v => v.type == this.type);
console.log('attrValue',attrValue);
if (attrValue.length > 0) {
attrValue.map(val => {
const _obj = {
type: val.type,
id: val.resourceId,
name: val.resource && val.resource.name
name: val.resource && val.resource.resourceName,
}
arr.push(_obj)
})
}
//
this.displayList = JSON.parse(JSON.stringify(arr))
this.displayList = JSON.parse(JSON.stringify(arr));
//
this.selectedArray = arr.map(v => v.id)
this.$nextTick(() => {
@ -288,7 +289,9 @@ export default {
this.transferData.push({
type: this.type,
id: v.guid,
name: v.zyname || '--'
name: v.zyname || '--',
deptName:v.TGBM,
              resourceName:v.zyname
})
})
this.allData = JSON.parse(JSON.stringify(this.transferData))
@ -302,6 +305,16 @@ export default {
return item.name && item.name.indexOf(query) > -1
},
confirmSubmitHandle () {
console.log('lllooooo',this.selectedArray);
//
let selectedObjectList = [];
this.selectedArray.forEach((item)=>{
let filterData = [];
filterData = this.allData.filter(v => v.id == item);
//console.log('filterDatafilterData',filterData);
selectedObjectList.push(filterData[0]);
});
console.log('selectedObjectListselectedObjectList',selectedObjectList);
if (this.selectedArray.length > this.maxNum) {
return this.$message.error('最多选择十条数据!')
}
@ -314,10 +327,13 @@ export default {
})
this.$emit('update', {
title: this.type,
list: this.selectedArray
list: selectedObjectList
})
console.log(this.selectedArray, this.displayList, 'this.displayList')
},
handleChange(){
console.log('222222',this.selectedArray);
},
getDisplay (displayList) {
this.displayList = []
this.displayList = displayList