Merge pull request 'master' (#417) from master into prod

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/417
This commit is contained in:
2024-06-29 03:22:35 +00:00
2 changed files with 26 additions and 8 deletions

View File

@@ -240,12 +240,27 @@ const _value = computed({
const filterDict = (data, value) => {
if (data === undefined || value === undefined) return;
let label = ''
if (data instanceof Array) {
data.find(item => {
if (item.value == value) {
label = item.label
}
})
let result=[]
if(value.indexOf(",") >= 0){
if (value.split(",") instanceof Array) {
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
}

View File

@@ -170,7 +170,7 @@
</el-col>
<el-col :span="16" style="margin-bottom: -18px">
<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
v-for="item in cacheStore.getDict('result_form')"
:key="item.value"
@@ -286,9 +286,10 @@ const showSingleTable = ref(false)
const otherFileList = ref([])
const singleList = ref([])
const formData = ref({
isSpecialFund: false,
isSpecialFund: true,
industryUniversityResearch: '0',
governmentDeclaration: '0',
resultForm:[]
})
const rules = reactive({
@@ -411,6 +412,7 @@ const handleSubmit = debounce(async (instance) => {
if (formData.value.singleFile !== undefined) {
formData.value.singleFile = getFileParam(formData.value.singleFile)
}
formData.value.resultForm=formData.value.resultForm.map(item=>item).join(',')
let params = {
...formData.value,
deploymentId: deploymentId.value,
@@ -464,6 +466,7 @@ const handleResubmit = debounce(() => {
if (formData.value.isSpecialFund && formData.value.specialFund === null) {
formData.value.specialFund = getFundName(formData.value.specialFundId)
}
formData.value.resultForm=formData.value.resultForm.map(item=>item).join(',')
let params = {
...formData.value,
deploymentId: deploymentId.value,