Merge pull request 'fix : 修复征集公司回显' (#497) from dd into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/497
This commit is contained in:
@@ -104,6 +104,7 @@
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
|
||||
<company-picker :multiple="true" ref="companyRef" title="请选择征集公司" @ok="selected"
|
||||
v-model:value="selectedCompanyList"/>
|
||||
</div>
|
||||
@@ -128,7 +129,6 @@ import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
import CompanyPicker from "@/components/DetailComponent/CompanyPicker.vue";
|
||||
import {matterTree} from "@/utils/matterTree";
|
||||
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
|
||||
@@ -408,22 +408,30 @@ const handleResubmit = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const matterTree = (array,data, id) => {
|
||||
if (id) {
|
||||
data.forEach(item => {
|
||||
if (item.value == id) {
|
||||
let obj={
|
||||
label:item.label,
|
||||
value:item.value
|
||||
}
|
||||
array.push(obj);
|
||||
}
|
||||
if (item.children && item.children.length > 0) {
|
||||
matterTree(array,item.children,id)
|
||||
}
|
||||
})
|
||||
return array;
|
||||
}
|
||||
}
|
||||
const getCompanyOptionItem = (val) => {
|
||||
let newObj = {}
|
||||
let newArray = []
|
||||
if (val !== undefined) {
|
||||
val.forEach(item => {
|
||||
matterTree(companyNameArray.value, companyOption.value, item)
|
||||
})
|
||||
companyNameArray.value.forEach(companyItem => {
|
||||
newObj = {
|
||||
label: companyItem
|
||||
}
|
||||
newArray.push(newObj)
|
||||
})
|
||||
}
|
||||
return newArray;
|
||||
return companyNameArray.value;
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
getFormInfo(route.query.id).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user