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

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/429
This commit is contained in:
2024-06-29 14:47:08 +00:00
11 changed files with 57 additions and 38 deletions

View File

@@ -2,7 +2,7 @@
<el-form :model="formData" ref="applyForm" :rules="rules" :label-position="labelPosition"> <el-form :model="formData" ref="applyForm" :rules="rules" :label-position="labelPosition">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="label" prop="attachment" label-width="125"> <el-form-item :label="label" prop="attachment" label-width="110">
<template v-if="preview&&JSON.stringify(singleFile) !== '{}'&&JSON.stringify(singleFile)!=='null'"> <template v-if="preview&&JSON.stringify(singleFile) !== '{}'&&JSON.stringify(singleFile)!=='null'">
<el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 16px"> <el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 16px">
{{ singleFile ? singleFile?.originalFileName : formData.singleFile?.originalFileName }} {{ singleFile ? singleFile?.originalFileName : formData.singleFile?.originalFileName }}
@@ -25,7 +25,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="其他文件" label-width="125"> <el-form-item label="其他文件" label-width="110">
<file-upload @getFile="getOtherFile"/> <file-upload @getFile="getOtherFile"/>
<!-- <el-card style="width: 100%;box-shadow: none">--> <!-- <el-card style="width: 100%;box-shadow: none">-->
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable" :tableConfig="tableConfig" <fvTable style="width: 100%;max-height: 300px;" v-if="showTable" :tableConfig="tableConfig"

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"/>
@@ -12,7 +12,7 @@
<div v-else>--</div> <div v-else>--</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="researchStage" label="项目阶段" align="center"> <el-table-column prop="researchStage" label="研发阶段" align="center">
<template #default="scope"> <template #default="scope">
<div <div
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined"> v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">

View File

@@ -3,7 +3,7 @@
<el-form :model="localFormData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'"> <el-form :model="localFormData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="前置流程" :required="preProcessRequired" prop="requestName"> <el-form-item label="前置流程" :required="preProcessRequired" prop="requestName" label-width="110">
<div v-for="item in localFormData.preProcess" :key="item.requestId"> <div v-for="item in localFormData.preProcess" :key="item.requestId">
<a :href="item.baseUrl" target="_blank" <a :href="item.baseUrl" target="_blank"
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ item.requestName }}</a> style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ item.requestName }}</a>
@@ -17,7 +17,7 @@
</el-form> </el-form>
<AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable" <AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
:otherFileList="otherFileList" :otherFileList="otherFileList"
@getAttachment="getAttachment" @getAttachment="getAttachment" :singleList="singleList" :showSingleTable="showSingleTable"
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData" @getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
:preview="mode == 'resubmit'"/> :preview="mode == 'resubmit'"/>
<div> <div>
@@ -26,7 +26,7 @@
<baseTitle title="审批记录" v-if="mode === 'resubmit'"></baseTitle> <baseTitle title="审批记录" v-if="mode === 'resubmit'"></baseTitle>
<div v-else></div> <div v-else></div>
<div class="diagram"> <div class="diagram">
<div class="base-title">流程图</div> <div class="base-title" style="margin-left: 50px">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd" style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
@@ -57,7 +57,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="preProcessList" stripe v-loading="loading" <el-table :data="preProcessList" stripe v-loading="loading"
@select="handleSelect" row-key="requestId"> @select="handleSelect" row-key="requestId" ref="preProcessTable">
<el-table-column type="selection" width="55" :reserve-selection="true"/> <el-table-column type="selection" width="55" :reserve-selection="true"/>
<el-table-column prop="requestId" label="请求id"></el-table-column> <el-table-column prop="requestId" label="请求id"></el-table-column>
<el-table-column prop="requestName" label="请求名称"></el-table-column> <el-table-column prop="requestName" label="请求名称"></el-table-column>
@@ -106,6 +106,9 @@ import Paging from "@/components/pagination/index.vue";
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const changeDiagram = ref(false) const changeDiagram = ref(false)
const preProcessTable = ref()
const showSingleTable = ref(false)
const singleList = ref([])
const emit = defineEmits(["getAttachment", "getOtherFile"]) const emit = defineEmits(["getAttachment", "getOtherFile"])
const props = defineProps({ const props = defineProps({
title: { title: {
@@ -210,6 +213,13 @@ const getPreProcessList = () => {
searchArray.push(item) searchArray.push(item)
} }
}) })
res.data.forEach((item) => {
localFormData.value.preProcess.forEach((item1) => {
if (item.requestId == item1.requestId) {
preProcessTable.value.toggleRowSelection(item)
}
})
})
total.value = searchArray.length total.value = searchArray.length
currentList.value = searchArray currentList.value = searchArray
preProcessList.value = currentList.value.slice(0, 10) preProcessList.value = currentList.value.slice(0, 10)
@@ -268,8 +278,16 @@ const compositeParam = (item) => {
} }
const getAttachment = (val) => { const getAttachment = (val) => {
// console.log('上传文件getAttachment', val) // console.log('上传文件getAttachment', val)
showSingleTable.value=false
localFormData.value.singleFile = compositeParam(val) localFormData.value.singleFile = compositeParam(val)
singleList.value.push( compositeParam(val))
nextTick(() => {
showSingleTable.value = true
})
} }
watch(() => singleList.value, (newVal) => {
showSingleTable.value = newVal.length !== 0;
}, {deep: true})
const getOtherFile = (val) => { const getOtherFile = (val) => {
// console.log('上传文件getOtherFile', val) // console.log('上传文件getOtherFile', val)
showTable.value = false showTable.value = false

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

@@ -12,7 +12,7 @@
<div v-else>--</div> <div v-else>--</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="researchStage" label="项目阶段" align="center"> <el-table-column prop="researchStage" label="研发阶段" align="center">
<template #default="scope"> <template #default="scope">
<div <div
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined"> v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">

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

@@ -281,7 +281,7 @@ const companyOption = ref([])
const summaryForm = ref() const summaryForm = ref()
const deploymentId = ref() const deploymentId = ref()
const specialFundOption = ref([]) const specialFundOption = ref([])
const showTable = ref(false) const showTable = ref(true)
const showSingleTable = ref(false) const showSingleTable = ref(false)
const otherFileList = ref([]) const otherFileList = ref([])
const singleList = ref([]) const singleList = ref([])
@@ -412,14 +412,14 @@ 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,
fileList: otherFiles, fileList: otherFiles,
requirementId: route.query.id ? route.query.id : '-1' requirementId: route.query.id ? route.query.id : '-1'
} }
// console.log('params', params) console.log('params', params)
if (!attachment.value.isSingleFile) { if (!attachment.value.isSingleFile) {
attachment.value.validate() attachment.value.validate()
ElNotification({ ElNotification({
@@ -466,12 +466,12 @@ 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,
fileList: otherFiles, fileList: otherFiles,
requirementId: route.query.requirementId ? route.query.requirementId : '-1' requirementId: route.query.id ? route.query.id : '-1'
} }
// console.log('重新提交params', params, formData.value.specialFund, formData.value.specialFundId) // console.log('重新提交params', params, formData.value.specialFund, formData.value.specialFundId)
resubmitReported(params).then(res => { resubmitReported(params).then(res => {
@@ -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

@@ -304,7 +304,7 @@ const handleEdit = (row) => {
router.push({ router.push({
name: 'Summary/edit', name: 'Summary/edit',
query: { query: {
requirementId: row.requirementId, // requirementId: row.requirementId,
projectId: row.projectId projectId: row.projectId
} }
}) })

View File

@@ -310,7 +310,6 @@ const search = (val) => {
} }
const init = async () => { const init = async () => {
const {code, msg, data} = await searchUpdateLedgerData(route.query.id) const {code, msg, data} = await searchUpdateLedgerData(route.query.id)
console.log("🚀 ~ init ~ data:", data)
if (data) { if (data) {
tableData.value = data tableData.value = data
baseForm.value.setValues(data) baseForm.value.setValues(data)

View File

@@ -12,7 +12,7 @@
<div v-else>--</div> <div v-else>--</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="researchStage" label="项目阶段" align="center" min-width="100"> <el-table-column prop="researchStage" label="研发阶段" align="center" min-width="100">
<template #default="scope"> <template #default="scope">
<div <div
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined"> v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">

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'
}) })
} }