Merge pull request 'fix : 修复需求上报成果展示,需求新增专项资金校验' (#426) from dd into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/426
This commit is contained in:
2024-06-29 14:27:35 +00:00
5 changed files with 26 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
<template> <template>
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button> <!-- <el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>-->
<el-table ref="table" :data="tableData" style="width: 100%;height: 479px" :show-summary="true" border <el-table ref="table" :data="tableData" style="width: 100%;height: 479px" :show-summary="true" border
:summary-method="getSummaries" v-loading="loading" :header-cell-style="{background:'#f5f7fa'}"> :summary-method="getSummaries" v-loading="loading" :header-cell-style="{background:'#f5f7fa'}">
<el-table-column type="index" label="序号" align="center" width="60"/> <el-table-column type="index" label="序号" align="center" width="60"/>

View File

@@ -63,7 +63,9 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="专项资金名称" prop="specialFund" v-if="localFormData.isSpecialFund"> <el-form-item label="专项资金名称" prop="specialFund" v-if="localFormData.isSpecialFund">
<span>{{localFormData.specialFundId===0?localFormData.specialFund:changeName(fundOption,localFormData.specialFundId) }}</span> <span>{{
localFormData.specialFundId === 0 ? localFormData.specialFund : changeName(fundOption, localFormData.specialFundId)
}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@@ -108,7 +110,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="经济概算(元)" prop="economicEstimate"> <el-form-item label="经济概算(元)" prop="economicEstimate">
<span>{{toThousands( localFormData.economicEstimate )}}</span> <span>{{ toThousands(localFormData.economicEstimate) }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@@ -141,7 +143,7 @@
<baseTitle title="附件列表"></baseTitle> <baseTitle title="附件列表"></baseTitle>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<file-component tag="需求上报" <file-component tag="需求上报"
v-model:value="localFormData.fileList" :processViewer="processViewer" v-model:value="localFormData.fileList" :processViewer="processViewer"
:file-list-show="fileListShow"/> :file-list-show="fileListShow"/>
</el-col> </el-col>
@@ -171,7 +173,8 @@
</div> </div>
</div> </div>
<div class="process"> <div class="process">
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram" :operation-list="data.operationList" <operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
:operation-list="data.operationList"
:state="data.state"/> :state="data.state"/>
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="summaryProcess"/> <process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="summaryProcess"/>
</div> </div>
@@ -240,20 +243,17 @@ 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 = ''
let result=[] let result = []
if(value.indexOf(",") >= 0){ if (JSON.parse(value) instanceof Array) {
if (value.split(",") instanceof Array) { JSON.parse(value).forEach(item1 => {
value.split(",").forEach(item1 => { data.find(item => {
console.log('item',item1) if (item.value == item1) {
data.find(item => { result.push(item.label)
if (item.value == item1) { }
result.push(item.label)
}
})
}) })
} })
label=result.map(item=>item).join('') label = result.map(item => item).join('')
}else { } else {
if (data instanceof Array) { if (data instanceof Array) {
data.find(item => { data.find(item => {
if (item.value == value) { if (item.value == value) {

View File

@@ -41,8 +41,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="专项资金名称" prop="specialFundId"> <el-form-item label="专项资金名称" prop="specialFundId" v-if="formData.isSpecialFund">
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金名称" clearable filterable :disabled="!formData.isSpecialFund"> <el-select v-model="formData.specialFundId" placeholder="请选择专项资金名称" clearable filterable >
<el-option <el-option
v-for="item in specialFundOption" v-for="item in specialFundOption"
:key="item.value" :key="item.value"
@@ -158,7 +158,7 @@ const specialFundOption = ref([])
const form = ref(null) const form = ref(null)
const fileList = ref([]) const fileList = ref([])
const loading = ref(false) const loading = ref(false)
const showTable = ref(false) const showTable = ref(true)
const processStore = useProcessStore() const processStore = useProcessStore()
const processInstanceData = ref() const processInstanceData = ref()
const formPermMap = ref(new Map()); const formPermMap = ref(new Map());

View File

@@ -412,7 +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(',') formData.value.resultForm=JSON.stringify(formData.value.resultForm)
let params = { let params = {
...formData.value, ...formData.value,
deploymentId: deploymentId.value, deploymentId: deploymentId.value,
@@ -466,7 +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(',') formData.value.resultForm=JSON.stringify(formData.value.resultForm)
let params = { let params = {
...formData.value, ...formData.value,
deploymentId: deploymentId.value, deploymentId: deploymentId.value,
@@ -499,6 +499,7 @@ const getDetailInfo = async () => {
}) })
if (res.code === 1000) { if (res.code === 1000) {
res.data.formData.specialFundId = res.data.formData.specialFundId === 0 ? null : res.data.formData.specialFundId res.data.formData.specialFundId = res.data.formData.specialFundId === 0 ? null : res.data.formData.specialFundId
res.data.formData.resultForm = JSON.parse(res.data.formData.resultForm)
formData.value = res.data.formData formData.value = res.data.formData
loading.value = false loading.value = false
} }

View File

@@ -136,6 +136,7 @@ const handleDelete = (row) => {
}) })
if (res.code === 1000) { if (res.code === 1000) {
formData.value.files.splice(formData.value.files.findIndex((item) => item.id === row.fileId), 1); formData.value.files.splice(formData.value.files.findIndex((item) => item.id === row.fileId), 1);
showTable.value = formData.value.files.length !== 0;
} }
}); });
} }
@@ -246,7 +247,7 @@ const init = async () => {
} else { } else {
ElNotification({ ElNotification({
title: '提示', title: '提示',
message: msg, message: res.msg,
type: 'error' type: 'error'
}) })
} }