feat : 需求征集和项目管理的名称匹配搜索
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import { getSubCompOpt } from '@/api/user/user.js';
|
||||
import {filterProjectName} from "@/api/project-manage";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@@ -60,12 +61,30 @@ const searchConfig = ref([
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
component: 'el-input',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请输入项目名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
const res=await filterProjectName(val,'40')
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
searchConfig.value.find(item => item.prop == 'projectName').props.options = options
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user