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:
@@ -2,7 +2,7 @@
|
||||
<el-form :model="formData" ref="applyForm" :rules="rules" :label-position="labelPosition">
|
||||
<el-row>
|
||||
<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'">
|
||||
<el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 16px">
|
||||
{{ singleFile ? singleFile?.originalFileName : formData.singleFile?.originalFileName }}
|
||||
@@ -25,7 +25,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="其他文件" label-width="125">
|
||||
<el-form-item label="其他文件" label-width="110">
|
||||
<file-upload @getFile="getOtherFile"/>
|
||||
<!-- <el-card style="width: 100%;box-shadow: none">-->
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable" :tableConfig="tableConfig"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<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
|
||||
:summary-method="getSummaries" v-loading="loading" :header-cell-style="{background:'#f5f7fa'}">
|
||||
<el-table-column type="index" label="序号" align="center" width="60"/>
|
||||
@@ -12,7 +12,7 @@
|
||||
<div v-else>--</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="researchStage" label="项目阶段" align="center">
|
||||
<el-table-column prop="researchStage" label="研发阶段" align="center">
|
||||
<template #default="scope">
|
||||
<div
|
||||
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-form :model="localFormData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'">
|
||||
<el-row>
|
||||
<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">
|
||||
<a :href="item.baseUrl" target="_blank"
|
||||
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ item.requestName }}</a>
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
|
||||
:otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getAttachment="getAttachment" :singleList="singleList" :showSingleTable="showSingleTable"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
|
||||
:preview="mode == 'resubmit'"/>
|
||||
<div>
|
||||
@@ -26,7 +26,7 @@
|
||||
<baseTitle title="审批记录" v-if="mode === 'resubmit'"></baseTitle>
|
||||
<div v-else></div>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<div class="base-title" style="margin-left: 50px">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
|
||||
@@ -57,7 +57,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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 prop="requestId" label="请求id"></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 route = useRoute()
|
||||
const changeDiagram = ref(false)
|
||||
const preProcessTable = ref()
|
||||
const showSingleTable = ref(false)
|
||||
const singleList = ref([])
|
||||
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
||||
const props = defineProps({
|
||||
title: {
|
||||
@@ -210,6 +213,13 @@ const getPreProcessList = () => {
|
||||
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
|
||||
currentList.value = searchArray
|
||||
preProcessList.value = currentList.value.slice(0, 10)
|
||||
@@ -268,8 +278,16 @@ const compositeParam = (item) => {
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
// console.log('上传文件getAttachment', val)
|
||||
showSingleTable.value=false
|
||||
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) => {
|
||||
// console.log('上传文件getOtherFile', val)
|
||||
showTable.value = false
|
||||
|
||||
@@ -63,7 +63,9 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<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-col>
|
||||
<el-col :span="8">
|
||||
@@ -108,7 +110,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="经济概算(元)" prop="economicEstimate">
|
||||
<span>{{toThousands( localFormData.economicEstimate )}}</span>
|
||||
<span>{{ toThousands(localFormData.economicEstimate) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -141,7 +143,7 @@
|
||||
<baseTitle title="附件列表"></baseTitle>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<file-component tag="需求上报"
|
||||
<file-component tag="需求上报"
|
||||
v-model:value="localFormData.fileList" :processViewer="processViewer"
|
||||
:file-list-show="fileListShow"/>
|
||||
</el-col>
|
||||
@@ -171,7 +173,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<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"/>
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="summaryProcess"/>
|
||||
</div>
|
||||
@@ -240,20 +243,17 @@ const _value = computed({
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let 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)
|
||||
}
|
||||
})
|
||||
let result = []
|
||||
if (JSON.parse(value) instanceof Array) {
|
||||
JSON.parse(value).forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
}
|
||||
label=result.map(item=>item).join(',')
|
||||
}else {
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div v-else>--</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="researchStage" label="项目阶段" align="center">
|
||||
<el-table-column prop="researchStage" label="研发阶段" align="center">
|
||||
<template #default="scope">
|
||||
<div
|
||||
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="专项资金名称" prop="specialFundId">
|
||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金名称" clearable filterable :disabled="!formData.isSpecialFund">
|
||||
<el-form-item label="专项资金名称" prop="specialFundId" v-if="formData.isSpecialFund">
|
||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金名称" clearable filterable >
|
||||
<el-option
|
||||
v-for="item in specialFundOption"
|
||||
:key="item.value"
|
||||
@@ -158,7 +158,7 @@ const specialFundOption = ref([])
|
||||
const form = ref(null)
|
||||
const fileList = ref([])
|
||||
const loading = ref(false)
|
||||
const showTable = ref(false)
|
||||
const showTable = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const processInstanceData = ref()
|
||||
const formPermMap = ref(new Map());
|
||||
|
||||
@@ -281,7 +281,7 @@ const companyOption = ref([])
|
||||
const summaryForm = ref()
|
||||
const deploymentId = ref()
|
||||
const specialFundOption = ref([])
|
||||
const showTable = ref(false)
|
||||
const showTable = ref(true)
|
||||
const showSingleTable = ref(false)
|
||||
const otherFileList = ref([])
|
||||
const singleList = ref([])
|
||||
@@ -412,14 +412,14 @@ 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(',')
|
||||
formData.value.resultForm=JSON.stringify(formData.value.resultForm)
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
}
|
||||
// console.log('params', params)
|
||||
console.log('params', params)
|
||||
if (!attachment.value.isSingleFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
@@ -466,12 +466,12 @@ 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(',')
|
||||
formData.value.resultForm=JSON.stringify(formData.value.resultForm)
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
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)
|
||||
resubmitReported(params).then(res => {
|
||||
@@ -499,6 +499,7 @@ const getDetailInfo = async () => {
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
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
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ const handleEdit = (row) => {
|
||||
router.push({
|
||||
name: 'Summary/edit',
|
||||
query: {
|
||||
requirementId: row.requirementId,
|
||||
// requirementId: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
|
||||
@@ -310,7 +310,6 @@ const search = (val) => {
|
||||
}
|
||||
const init = async () => {
|
||||
const {code, msg, data} = await searchUpdateLedgerData(route.query.id)
|
||||
console.log("🚀 ~ init ~ data:", data)
|
||||
if (data) {
|
||||
tableData.value = data
|
||||
baseForm.value.setValues(data)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div v-else>--</div>
|
||||
</template>
|
||||
</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">
|
||||
<div
|
||||
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">
|
||||
|
||||
@@ -136,6 +136,7 @@ const handleDelete = (row) => {
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
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 {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user