fix : 需求上报-预期成果形式多选及展示
This commit is contained in:
@@ -240,12 +240,27 @@ const _value = computed({
|
|||||||
const filterDict = (data, value) => {
|
const filterDict = (data, value) => {
|
||||||
if (data === undefined || value === undefined) return;
|
if (data === undefined || value === undefined) return;
|
||||||
let label = ''
|
let label = ''
|
||||||
if (data instanceof Array) {
|
let result=[]
|
||||||
data.find(item => {
|
if(value.indexOf(",") >= 0){
|
||||||
if (item.value == value) {
|
if (value.split(",") instanceof Array) {
|
||||||
label = item.label
|
value.split(",").forEach(item1 => {
|
||||||
}
|
console.log('item',item1)
|
||||||
})
|
data.find(item => {
|
||||||
|
if (item.value == item1) {
|
||||||
|
result.push(item.label)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
label=result.map(item=>item).join(',')
|
||||||
|
}else {
|
||||||
|
if (data instanceof Array) {
|
||||||
|
data.find(item => {
|
||||||
|
if (item.value == value) {
|
||||||
|
label = item.label
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return label
|
return label
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,7 +170,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16" style="margin-bottom: -18px">
|
<el-col :span="16" style="margin-bottom: -18px">
|
||||||
<el-form-item label="预期成果形式" prop="resultForm" label-width="145">
|
<el-form-item label="预期成果形式" prop="resultForm" label-width="145">
|
||||||
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable>
|
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable multiple>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in cacheStore.getDict('result_form')"
|
v-for="item in cacheStore.getDict('result_form')"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -286,9 +286,10 @@ const showSingleTable = ref(false)
|
|||||||
const otherFileList = ref([])
|
const otherFileList = ref([])
|
||||||
const singleList = ref([])
|
const singleList = ref([])
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
isSpecialFund: false,
|
isSpecialFund: true,
|
||||||
industryUniversityResearch: '0',
|
industryUniversityResearch: '0',
|
||||||
governmentDeclaration: '0',
|
governmentDeclaration: '0',
|
||||||
|
resultForm:[]
|
||||||
})
|
})
|
||||||
|
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
@@ -411,6 +412,7 @@ const handleSubmit = debounce(async (instance) => {
|
|||||||
if (formData.value.singleFile !== undefined) {
|
if (formData.value.singleFile !== undefined) {
|
||||||
formData.value.singleFile = getFileParam(formData.value.singleFile)
|
formData.value.singleFile = getFileParam(formData.value.singleFile)
|
||||||
}
|
}
|
||||||
|
formData.value.resultForm=formData.value.resultForm.map(item=>item).join(',')
|
||||||
let params = {
|
let params = {
|
||||||
...formData.value,
|
...formData.value,
|
||||||
deploymentId: deploymentId.value,
|
deploymentId: deploymentId.value,
|
||||||
@@ -464,6 +466,7 @@ const handleResubmit = debounce(() => {
|
|||||||
if (formData.value.isSpecialFund && formData.value.specialFund === null) {
|
if (formData.value.isSpecialFund && formData.value.specialFund === null) {
|
||||||
formData.value.specialFund = getFundName(formData.value.specialFundId)
|
formData.value.specialFund = getFundName(formData.value.specialFundId)
|
||||||
}
|
}
|
||||||
|
formData.value.resultForm=formData.value.resultForm.map(item=>item).join(',')
|
||||||
let params = {
|
let params = {
|
||||||
...formData.value,
|
...formData.value,
|
||||||
deploymentId: deploymentId.value,
|
deploymentId: deploymentId.value,
|
||||||
|
|||||||
Reference in New Issue
Block a user