fix: 修复汇总列表征集名称筛选判重
This commit is contained in:
@@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
import {addPlan,getRequirementName} from "@/api/project-demand/summary";
|
import {addPlan, getRequirementName} from "@/api/project-demand/summary";
|
||||||
import {getSubCompOpt} from "@/api/user/user";
|
import {getSubCompOpt} from "@/api/user/user";
|
||||||
import {getRequirementStatePerm} from "@/api/project-demand";
|
import {filterRequirementName} from "@/api/project-demand";
|
||||||
|
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@@ -57,15 +57,16 @@ const searchConfig = ref([
|
|||||||
const res=await getRequirementName(val)
|
const res=await getRequirementName(val)
|
||||||
if(res.code==1000){
|
if(res.code==1000){
|
||||||
let optionObj={}
|
let optionObj={}
|
||||||
let options=[]
|
let optionsMap = new Map();
|
||||||
res.data.forEach(item=>{
|
res.data.forEach(item=>{
|
||||||
optionObj={
|
optionObj={
|
||||||
value:item,
|
value:item,
|
||||||
label:item
|
label:item
|
||||||
}
|
}
|
||||||
options.push(optionObj)
|
optionsMap.set(optionObj.value, optionObj);
|
||||||
})
|
})
|
||||||
searchConfig.value.find(item => item.prop == 'requirementName').props.options = options
|
// 将 Map 转换为数组
|
||||||
|
searchConfig.value.find(item => item.prop == 'requirementName').props.options = Array.from(optionsMap.values())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,18 +86,6 @@ const searchConfig = ref([
|
|||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
remote: true
|
remote: true
|
||||||
}
|
}
|
||||||
},{
|
|
||||||
label: '征集公司',
|
|
||||||
prop: 'affiliatedCompanyId',
|
|
||||||
component: 'el-tree-select',
|
|
||||||
props: {
|
|
||||||
placeholder: '请输入征集公司查询',
|
|
||||||
clearable: true,
|
|
||||||
data: [],
|
|
||||||
filterable: true,
|
|
||||||
checkStrictly: true,
|
|
||||||
remote: true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '项目名称',
|
label: '项目名称',
|
||||||
|
|||||||
Reference in New Issue
Block a user