feat(project-demand): 添加项目名称远程搜索功能并优化前置流程显示逻辑
- 在项目需求概览页面添加项目名称远程搜索功能,提高搜索效率和准确性 - 优化项目申请详情页面的前置流程显示逻辑,根据不同场景调整标签宽度
This commit is contained in:
@@ -140,8 +140,8 @@
|
|||||||
@cancelOrClear="optionalChargeLeaderPickerCancel"/>
|
@cancelOrClear="optionalChargeLeaderPickerCancel"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-if="preProcessShow === 'EDIT'">
|
<el-col :span="24" v-if="preProcessShow === 'EDIT'||title==='apply'">
|
||||||
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125">
|
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" :label-width="title==='apply'?130:125">
|
||||||
<el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px">
|
<el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px">
|
||||||
{{
|
{{
|
||||||
localFormData.preProcess && localFormData.preProcess?.length > 0 ? '更改' : sessionParams.preProcess && sessionParams.preProcess?.length > 0 ? '更改' : '请选择'
|
localFormData.preProcess && localFormData.preProcess?.length > 0 ? '更改' : sessionParams.preProcess && sessionParams.preProcess?.length > 0 ? '更改' : '请选择'
|
||||||
|
|||||||
@@ -73,6 +73,36 @@ const searchConfig = ref([
|
|||||||
},
|
},
|
||||||
component: shallowRef(fvSelect),
|
component: shallowRef(fvSelect),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '项目名称',
|
||||||
|
prop: 'projectName',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入项目名称',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
options: [],
|
||||||
|
remote: true,
|
||||||
|
remoteMethod:async (val)=>{
|
||||||
|
if(val){
|
||||||
|
const res=await getRequirementName(val)
|
||||||
|
if(res.code==1000){
|
||||||
|
let optionObj={}
|
||||||
|
let optionsMap = new Map();
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
optionObj={
|
||||||
|
value:item,
|
||||||
|
label:item
|
||||||
|
}
|
||||||
|
optionsMap.set(optionObj.value, optionObj);
|
||||||
|
})
|
||||||
|
// 将 Map 转换为数组
|
||||||
|
searchConfig.value.find(item => item.prop == 'projectName').props.options = Array.from(optionsMap.values())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '项目类型',
|
label: '项目类型',
|
||||||
prop: 'projectType',
|
prop: 'projectType',
|
||||||
|
|||||||
Reference in New Issue
Block a user