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

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/742
This commit is contained in:
2024-08-28 06:19:33 +00:00
17 changed files with 465 additions and 435 deletions

View File

@@ -1,28 +1,28 @@
<template> <template>
<el-form :model="formData" ref="applyForm" :rules="rules" :label-position="labelPosition" style="margin-left: 5px"> <el-form :model="formData" ref="applyForm" :rules="rules" :label-position="labelPosition" style="margin-left: 5px">
<el-row> <el-row>
<!-- <el-col :span="24">-->
<!-- <el-form-item :label="label" prop="attachment" >-->
<!-- <template v-if="preview">-->
<!-- <file-upload @getFile="getAttachment" :multiple="false"-->
<!-- :disabled="singleFileArray?.length>0?true:false" title="如需修改需求申请书附件,请先删除文件再上传!"/>-->
<!-- <fvTable style="width: 100%;max-height: 80px;" height="80" v-if="singleFileArray?.length>0"-->
<!-- :tableConfig="editSingleTableConfig"-->
<!-- :data="singleFileArray" :isSettingCol="false" :pagination="false">-->
<!-- </fvTable>-->
<!-- </template>-->
<!-- <template v-else-if="!preview">-->
<!-- <file-upload @getFile="getAttachment" :multiple="false"-->
<!-- :disabled="isSingleFile"/>-->
<!-- <fvTable style="width: 100%;max-height: 80px;" v-if="showSingleTable" height="80"-->
<!-- :tableConfig="singleTableConfig"-->
<!-- :data="_singleFileValue" :isSettingCol="false" :pagination="false">-->
<!-- </fvTable>-->
<!-- </template>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="label" prop="attachment" > <el-form-item :label="label" prop="" required>
<template v-if="preview">
<file-upload @getFile="getAttachment" :multiple="false"
:disabled="singleFileArray?.length>0?true:false" title="如需修改需求申请书附件,请先删除文件再上传!"/>
<fvTable style="width: 100%;max-height: 80px;" height="80" v-if="singleFileArray?.length>0"
:tableConfig="editSingleTableConfig"
:data="singleFileArray" :isSettingCol="false" :pagination="false">
</fvTable>
</template>
<template v-else-if="!preview">
<file-upload @getFile="getAttachment" :multiple="false"
:disabled="isSingleFile"/>
<fvTable style="width: 100%;max-height: 80px;" v-if="showSingleTable" height="80"
:tableConfig="singleTableConfig"
:data="_singleFileValue" :isSettingCol="false" :pagination="false">
</fvTable>
</template>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="其他文件" :label-width="tag==='需求上报'?120:106">
<file-upload @getFile="getOtherFile"/> <file-upload @getFile="getOtherFile"/>
<fvTable style="width: 100%;max-height: 160px;" v-if="showTable" height="160" :tableConfig="tableConfig" <fvTable style="width: 100%;max-height: 160px;" v-if="showTable" height="160" :tableConfig="tableConfig"
:data="allFileList" :isSettingCol="false" :pagination="false"> :data="allFileList" :isSettingCol="false" :pagination="false">
@@ -240,11 +240,12 @@ const editSingleTableConfig = reactive({
}) })
const singleFileArray = ref([]) const singleFileArray = ref([])
const rules = reactive({ const rules = reactive({
attachment: [{required: true, message: '请上传附件', trigger: ['blur', 'change']}], // attachment: [{required: true, message: '请上传附件', trigger: ['blur', 'change']}],
}) })
const applyForm = ref() const applyForm = ref()
const singleFile = ref({}) const singleFile = ref({})
const isSingleFile = ref(false) const isSingleFile = ref(false)
const isHaveOneFile = ref(false)
const allFileList = ref([]) const allFileList = ref([])
if (localStorage.getItem('singleFile')) { if (localStorage.getItem('singleFile')) {
singleFileArray.value.push(JSON.parse(localStorage.getItem('singleFile'))) singleFileArray.value.push(JSON.parse(localStorage.getItem('singleFile')))
@@ -276,16 +277,18 @@ const _otherFileListValue = computed({
} }
}) })
if (_otherFileListValue.value && _otherFileListValue.value.length > 0) { if (_otherFileListValue.value && _otherFileListValue.value.length > 0) {
isHaveOneFile.value=true
_otherFileListValue.value.forEach(item => { _otherFileListValue.value.forEach(item => {
allFileList.value.push(item) allFileList.value.push(item)
}) })
} }
watch(() => props.showSingleTable, (newVal) => { // watch(() => props.showSingleTable, (newVal) => {
props.showSingleTable = newVal // props.showSingleTable = newVal
}, {deep: true}) // }, {deep: true})
watch(() => props.formData.fileList, (newVal) => { watch(() => props.formData.fileList, (newVal) => {
if (props.preview) { if (props.preview) {
newVal?.forEach(item => { newVal?.forEach(item => {
isHaveOneFile.value=true
allFileList.value.push(item) allFileList.value.push(item)
}) })
} }
@@ -329,6 +332,9 @@ watch(() => props.showTable, (newVal) => {
watch(() => isSingleFile.value, (newVal) => { watch(() => isSingleFile.value, (newVal) => {
isSingleFile.value = newVal isSingleFile.value = newVal
}, {deep: true}) }, {deep: true})
watch(() => isHaveOneFile.value, (newVal) => {
isHaveOneFile.value = newVal
}, {deep: true})
// watch(() => singleFile.value, (newVal) => { // watch(() => singleFile.value, (newVal) => {
// singleFile.value = newVal // singleFile.value = newVal
// }, {deep: true}) // }, {deep: true})
@@ -364,6 +370,7 @@ const handleDelete = (row, type) => {
_singleFileValue.value.splice(_singleFileValue.value.findIndex((item) => item.fileId === row.fileId), 1); _singleFileValue.value.splice(_singleFileValue.value.findIndex((item) => item.fileId === row.fileId), 1);
isSingleFile.value = false isSingleFile.value = false
} else { } else {
isHaveOneFile.value=false
allFileList.value.splice(allFileList.value.findIndex((item) => item.fileId === row.fileId), 1); allFileList.value.splice(allFileList.value.findIndex((item) => item.fileId === row.fileId), 1);
} }
} }
@@ -373,7 +380,6 @@ const handleSingleDelete = (row) => {
handleDelete(row, 'single') handleDelete(row, 'single')
} }
const getAttachment = (val) => { const getAttachment = (val) => {
// console.log('getAttachment', val)
isSingleFile.value = true isSingleFile.value = true
emit('getAttachment', val) emit('getAttachment', val)
} }
@@ -394,6 +400,7 @@ const getOtherFile = (val) => {
} else { } else {
allFileList.value = _otherFileListValue.value allFileList.value = _otherFileListValue.value
} }
isHaveOneFile.value=true
emit('getOtherFile', val) emit('getOtherFile', val)
} }
const deleteAttachment = (val) => { const deleteAttachment = (val) => {
@@ -458,7 +465,8 @@ defineExpose({
}, },
allFileList, allFileList,
singleFile, singleFile,
isSingleFile isSingleFile,
isHaveOneFile,
}) })
</script> </script>

View File

@@ -259,22 +259,22 @@ const schema = computed(() => {
} }
} }
arr.push(preProcess) arr.push(preProcess)
arr.push({ // arr.push({
label: '项目立项附件', // label: '项目立项附件',
prop: 'singleFile', // prop: 'singleFile',
colProps: { // colProps: {
span: 24 // span: 24
}, // },
labelWidth: 'left', // labelWidth: 'left',
component: () => { // component: () => {
let singleFileArray = [props.formData.singleFile] // let singleFileArray = [props.formData.singleFile]
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80" // return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
tableConfig={editSingleTableConfig} // tableConfig={editSingleTableConfig}
data={singleFileArray} isSettingCol={false} pagination={false}> // data={singleFileArray} isSettingCol={false} pagination={false}>
</fvTable> // </fvTable>
: <span>--</span> // : <span>--</span>
} // }
}) // })
} else if (props.type == 'execute') { } else if (props.type == 'execute') {
arr = [{ arr = [{
label: '部门分管领导', label: '部门分管领导',
@@ -312,60 +312,60 @@ const schema = computed(() => {
} }
} }
arr.push(preProcess) arr.push(preProcess)
arr.push( // arr.push(
{ // {
label: '项目验收附件', // label: '项目验收附件',
prop: 'singleFile', // prop: 'singleFile',
colProps: { // colProps: {
span: 24 // span: 24
}, // },
labelWidth: 'left', // labelWidth: 'left',
component: () => { // component: () => {
let singleFileArray = [props.formData.singleFile] // let singleFileArray = [props.formData.singleFile]
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80" // return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
tableConfig={editSingleTableConfig} // tableConfig={editSingleTableConfig}
data={singleFileArray} isSettingCol={false} pagination={false}> // data={singleFileArray} isSettingCol={false} pagination={false}>
</fvTable> // </fvTable>
: <span>--</span> // : <span>--</span>
} // }
}) // })
} else if (props.type == 'archivist') { } else if (props.type == 'archivist') {
arr = [ arr = [
{ // {
label: '项目归档附件', // label: '项目归档附件',
prop: 'singleFile', // prop: 'singleFile',
colProps: { // colProps: {
span: 24 // span: 24
}, // },
labelWidth: 'left', // labelWidth: 'left',
component: () => { // component: () => {
let singleFileArray = [props.formData.singleFile] // let singleFileArray = [props.formData.singleFile]
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80" // return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
tableConfig={editSingleTableConfig} // tableConfig={editSingleTableConfig}
data={singleFileArray} isSettingCol={false} pagination={false}> // data={singleFileArray} isSettingCol={false} pagination={false}>
</fvTable> // </fvTable>
: <span>--</span> // : <span>--</span>
} // }
}, // },
] ]
} else if (props.type == 'phase') { } else if (props.type == 'phase') {
arr = [ arr = [
{ // {
label: '阶段变更附件', // label: '阶段变更附件',
prop: 'singleFile', // prop: 'singleFile',
colProps: { // colProps: {
span: 24 // span: 24
}, // },
labelWidth: 'left', // labelWidth: 'left',
component: () => { // component: () => {
let singleFileArray = [props.formData.singleFile] // let singleFileArray = [props.formData.singleFile]
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80" // return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
tableConfig={editSingleTableConfig} // tableConfig={editSingleTableConfig}
data={singleFileArray} isSettingCol={false} pagination={false}> // data={singleFileArray} isSettingCol={false} pagination={false}>
</fvTable> // </fvTable>
: <span>--</span> // : <span>--</span>
} // }
}, // },
] ]
} }
return arr return arr

View File

@@ -1,6 +1,6 @@
<template> <template>
<el-form :label-position="labelAlign"> <el-form :label-position="labelAlign">
<el-form-item :label="title?'其他文件':''" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign" :label-width="title?95:''" :style="{marginTop: '10px',marginLeft: tag!=='需求上报'?'15px':'0'}"> <el-form-item :label="title" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign" :style="{marginTop: '10px',marginLeft: tag!=='需求上报'?'15px':'0'}">
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/> <file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
<!-- :style="{width:isOpenPrint?'610px': '100%'}" table-layout="auto" id="printTable"--> <!-- :style="{width:isOpenPrint?'610px': '100%'}" table-layout="auto" id="printTable"-->
<fvTable style="width:100%;max-height: 160px;" v-if="processViewer" height="160" :tableConfig="tableConfig" <fvTable style="width:100%;max-height: 160px;" v-if="processViewer" height="160" :tableConfig="tableConfig"

View File

@@ -491,7 +491,7 @@ const handleSubmit = async () => {
files.push(getFileParam(item)) files.push(getFileParam(item))
}) })
} }
if (attachment.value.singleFile == null) { if (!attachment.value.isHaveOneFile) {
attachment.value.validate() attachment.value.validate()
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -616,6 +616,7 @@ const init = async () => {
} }
watchEffect(() => { watchEffect(() => {
console.info("🚀 ~method:;props.formData.projectChargePerson -----", props.formData.projectChargePerson)
if (props.formData.projectChargePerson == null) { if (props.formData.projectChargePerson == null) {
projectChargePersonUserList.value = [] projectChargePersonUserList.value = []
} else { } else {
@@ -628,9 +629,9 @@ watchEffect(() => {
} }
projectPersonUserList.value = props.formData.projectPersonList ? props.formData.projectPersonList : [] projectPersonUserList.value = props.formData.projectPersonList ? props.formData.projectPersonList : []
let flag = Object.keys(props.formData).length && (localFormData.value = props.formData) let flag = Object.keys(props.formData).length && (localFormData.value = props.formData)
if (props.formData.projectChargePerson != null) { // if (props.formData.projectChargePerson != null) {
localFormData.value.projectChargePerson = props.formData.projectChargePerson.id // localFormData.value.projectChargePerson = props.formData.projectChargePerson.id
} // }
if (localStorage.getItem('preProcess')) { if (localStorage.getItem('preProcess')) {
let param = JSON.parse(localStorage.getItem('preProcess')) let param = JSON.parse(localStorage.getItem('preProcess'))

View File

@@ -1,5 +1,5 @@
<template> <template>
<el-row> <el-row style="padding-bottom: 20px">
<el-col :span="24"> <el-col :span="24">
<baseTitle :title="'项目附件'"></baseTitle> <baseTitle :title="'项目附件'"></baseTitle>
</el-col> </el-col>
@@ -16,9 +16,10 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button> <el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
<el-button v-if="uploadState&&isLineBtn" color="#DED0B2" @click="handleUpload">上传附件</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-col :span="24" style="margin-bottom: 8px;margin-left: 15px"> <el-col v-if="!isLineBtn" :span="24" style="margin-bottom: 8px;margin-left: 15px">
<el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button> <el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>
</el-col> </el-col>
<fvTable style="width: 100%;min-height:311px;max-height: 311px" v-if="showAttachmentTable" height="311" <fvTable style="width: 100%;min-height:311px;max-height: 311px" v-if="showAttachmentTable" height="311"
@@ -44,6 +45,17 @@ const attachmentParam = reactive({
const uploadState = ref(false) const uploadState = ref(false)
const tagsOption = ref([]) const tagsOption = ref([])
const showAttachmentTable = ref(true) const showAttachmentTable = ref(true)
const props = defineProps({
fileNameTableWidth: {
type: String,
default: '400'
},
isLineBtn: {
type: Boolean,
default: false
},
})
const executeTableConfig = reactive({ const executeTableConfig = reactive({
columns: [ columns: [
{ {
@@ -57,6 +69,7 @@ const executeTableConfig = reactive({
prop: 'originalFileName', prop: 'originalFileName',
label: '文件名', label: '文件名',
align: 'center', align: 'center',
width: props.fileNameTableWidth,
currentRender: ({row, index}) => ( currentRender: ({row, index}) => (
<div style="color: #2a99ff;cursor: pointer;" onClick={() => clickToPreview(row)}>{row.originalFileName}</div>) <div style="color: #2a99ff;cursor: pointer;" onClick={() => clickToPreview(row)}>{row.originalFileName}</div>)
}, },

View File

@@ -56,19 +56,19 @@
</el-col> </el-col>
</el-row> </el-row>
<baseTitle title="需求上报申请书" style="margin-bottom: 10px">></baseTitle> <baseTitle title="需求上报申请书" style="margin-bottom: -3px;"></baseTitle>
<el-row gutter="20" style="margin-bottom: -15px;"> <!-- <el-row gutter="20" style="margin-bottom: -15px;">-->
<el-col :span="24"> <!-- <el-col :span="24">-->
<single-file-component tag="需求上报" v-model:value="localFormData.singleFile" :processViewer="processViewer"/> <!-- <single-file-component tag="需求上报" v-model:value="localFormData.singleFile" :processViewer="processViewer"/>-->
<!-- <el-form-item>--> <!-- &lt;!&ndash; <el-form-item>&ndash;&gt;-->
<!-- {{localFormData.singleFile}}--> <!-- &lt;!&ndash; {{localFormData.singleFile}}&ndash;&gt;-->
<!-- <el-button type="primary" link @click="handleDownload(localFormData.singleFile)" style="font-size: 16px">--> <!-- &lt;!&ndash; <el-button type="primary" link @click="handleDownload(localFormData.singleFile)" style="font-size: 16px">&ndash;&gt;-->
<!-- {{ localFormData.singleFile?.originalFileName }}--> <!-- &lt;!&ndash; {{ localFormData.singleFile?.originalFileName }}&ndash;&gt;-->
<!-- </el-button>--> <!-- &lt;!&ndash; </el-button>&ndash;&gt;-->
<!-- </el-form-item>--> <!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<baseTitle title="附件文件" style="margin-bottom: 0"></baseTitle> <!--/* <baseTitle title="附件文件" style="margin-bottom: 0"></baseTitle>*/-->
<el-row gutter="20" style="margin-bottom: -18px;"> <el-row gutter="20" style="margin-bottom: -18px;">
<el-col :span="24"> <el-col :span="24">
<file-component tag="需求上报" <file-component tag="需求上报"

View File

@@ -2,7 +2,7 @@
<div style="padding: 0 30px" id="printBox"> <div style="padding: 0 30px" id="printBox">
<div style="display: flex;justify-content: space-between"> <div style="display: flex;justify-content: space-between">
<baseTitle title="项目基本信息"></baseTitle> <baseTitle title="项目基本信息"></baseTitle>
<el-button v-print="print" ref color="#ded0b2" icon="Printer" style="margin-top: 15px" @click="handlePrint(print)"> 打印</el-button> <el-button v-print="print" color="#ded0b2" icon="Printer" style="margin-top: 15px" @click="handlePrint(print)"> 打印</el-button>
</div> </div>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm> <fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
<div class="steps-box"> <div class="steps-box">
@@ -553,20 +553,13 @@ const getBaseInfo = async () => {
const {code, data} = await getBaseInfoApi(route.query.projectId) const {code, data} = await getBaseInfoApi(route.query.projectId)
// console.log('data.procedure', data.procedure, route.query.step) // console.log('data.procedure', data.procedure, route.query.step)
if (route.query.step === '30'||route.query.step === '40') { if (route.query.step === '30'||route.query.step === '40') {
if (data.procedure.indexOf('30') == -1||data.procedure.indexOf('40') == -1) {
data.procedure.push('30')
data.procedure.push('40')
}
}
else if (route.query.step === '10'||route.query.step === '20') {
if (data.procedure.indexOf('40') != -1||data.procedure.indexOf('50') != -1) {
data.procedure.push('30')
}
}
else if (route.query.step === '50') {
if (data.procedure.indexOf('30') == -1) { if (data.procedure.indexOf('30') == -1) {
data.procedure.push('30') data.procedure.push('30')
} }
if (data.procedure.indexOf('40') == -1) {
data.procedure.push('40')
}
} else if (route.query.step === '50') {
if (data.procedure.indexOf('50') == -1) { if (data.procedure.indexOf('50') == -1) {
data.procedure.push('50') data.procedure.push('50')
} }

View File

@@ -3,7 +3,8 @@
<baseTitle title="项目基本信息"></baseTitle> <baseTitle title="项目基本信息"></baseTitle>
<el-form :model="formData" ref="summaryForm" :rules="rules" :label-width="!formData.isSpecialFund?120:160" <el-form :model="formData" ref="summaryForm" :rules="rules" :label-width="!formData.isSpecialFund?120:160"
:scroll-to-error="true"> :scroll-to-error="true">
<el-row gutter="30" style="margin-bottom: -18px;" :style="{marginLeft:!formData.isSpecialFund?'-8.5px':'-48.5px'}"> <el-row gutter="30" style="margin-bottom: -18px;"
:style="{marginLeft:!formData.isSpecialFund?'-8.5px':'-48.5px'}">
<el-col :span="6"> <el-col :span="6">
<el-form-item label="承办单位"> <el-form-item label="承办单位">
<Tooltip :content="authStore.userinfo?.subCompanyName" placement="bottom-start" width="240" <Tooltip :content="authStore.userinfo?.subCompanyName" placement="bottom-start" width="240"
@@ -151,7 +152,8 @@
<span>{{ formData.specialFund }}</span> <span>{{ formData.specialFund }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6" v-if="!route.query.id && formData.isSpecialFund" :style="{marginLeft:!formData.isSpecialFund?'0':route.query.id?'':'-40px'}"> <el-col :span="6" v-if="!route.query.id && formData.isSpecialFund"
:style="{marginLeft:!formData.isSpecialFund?'0':route.query.id?'':'-40px'}">
<el-form-item label="所属专项资金" prop="specialFundId"> <el-form-item label="所属专项资金" prop="specialFundId">
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金名称" clearable filterable> <el-select v-model="formData.specialFundId" placeholder="请选择专项资金名称" clearable filterable>
<el-option <el-option
@@ -174,17 +176,20 @@
{{ optionalChargeLeadershipList.length !== 0 ? '更改' : '请选择' }} {{ optionalChargeLeadershipList.length !== 0 ? '更改' : '请选择' }}
</el-button> </el-button>
<div v-for="(item,index) in optionalChargeLeadershipList" :key="item.id" style="margin-right: 5px"> <div v-for="(item,index) in optionalChargeLeadershipList" :key="item.id" style="margin-right: 5px">
{{ item.name }}{{index != optionalChargeLeadershipList?.length - 1 ? '' : ''}} {{ item.name }}{{ index != optionalChargeLeadershipList?.length - 1 ? '' : '' }}
</div> </div>
<user-picker :multiple="true" ref="optionalChargeLeadershipPickerRef" title="请选择分管领导" @cancelOrClear="optionalChargeLeaderPickerOkOrCancel" <user-picker :multiple="true" ref="optionalChargeLeadershipPickerRef" title="请选择分管领导"
@cancelOrClear="optionalChargeLeaderPickerOkOrCancel"
v-model:value="optionalChargeLeadershipList" @ok="optionalChargeLeaderPickerOkOrCancel"/> v-model:value="optionalChargeLeadershipList" @ok="optionalChargeLeaderPickerOkOrCancel"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<baseTitle title="预期知识产权"></baseTitle> <baseTitle title="预期知识产权"></baseTitle>
<el-row gutter="30" style="margin-bottom: -18px;" :style="{marginLeft:!formData.isSpecialFund?'-8.5px':'-48.5px'}"> <el-row gutter="30" style="margin-bottom: -18px;"
:style="{marginLeft:!formData.isSpecialFund?'-8.5px':'-48.5px'}">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="预期成果形式" prop="resultForm" :style="{marginRight:!formData.isSpecialFund?'0':route.query.id?'':'40px'}"> <el-form-item label="预期成果形式" prop="resultForm"
:style="{marginRight:!formData.isSpecialFund?'0':route.query.id?'':'40px'}">
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable multiple> <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')"
@@ -235,7 +240,8 @@
</el-col> </el-col>
</el-row> </el-row>
<baseTitle title="项目描述"></baseTitle> <baseTitle title="项目描述"></baseTitle>
<el-row gutter="30" style="margin-bottom: -18px;" :style="{marginLeft:!formData.isSpecialFund?'-8.5px':'-48.5px'}"> <el-row gutter="30" style="margin-bottom: -18px;"
:style="{marginLeft:!formData.isSpecialFund?'-8.5px':'-48.5px'}">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="现有业务描述" prop="serviceDescription"> <el-form-item label="现有业务描述" prop="serviceDescription">
<el-input v-model="formData.serviceDescription" placeholder="请输入现有业务描述" rows="4" type="textarea" <el-input v-model="formData.serviceDescription" placeholder="请输入现有业务描述" rows="4" type="textarea"
@@ -254,10 +260,13 @@
</el-form> </el-form>
<baseTitle title="附件文件"></baseTitle> <baseTitle title="附件文件"></baseTitle>
<div :style="{marginRight:!formData.isSpecialFund?'20px':'80px'}"> <div :style="{marginRight:!formData.isSpecialFund?'20px':'80px'}">
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" v-model:otherFileList="otherFileList" <AttachmentUpload ref="attachment" label="需求申请书附件"
@getAttachment="getAttachment" v-model:singleList="singleList" :showTable="showTable"
:showSingleTable="showSingleTable" v-model:otherFileList="otherFileList"
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" tag="需求上报" @getOtherFile="getOtherFile"
:showSingleTable="showSingleTable" @getAttachment="getAttachment"
v-model:singleList="singleList"
:showFileList="true" :formData="formData" tag="需求上报"
:preview="name === 'Summary/edit'"/> :preview="name === 'Summary/edit'"/>
</div> </div>
<div class="approval-record"> <div class="approval-record">
@@ -478,7 +487,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)
} }
if (!attachment.value.isSingleFile) { if (!attachment.value.isHaveOneFile) {
attachment.value.validate() attachment.value.validate()
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -496,7 +505,6 @@ const handleSubmit = debounce(async (instance) => {
requirementId: route.query.id ? route.query.id : '-1' requirementId: route.query.id ? route.query.id : '-1'
} }
console.log('params', params) console.log('params', params)
let res = await requirementReported(params) let res = await requirementReported(params)
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -532,7 +540,7 @@ const handleResubmit = debounce((instance) => {
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)
} }
if (attachment.value.singleFile == null) { if (!attachment.value.isHaveOneFile) {
attachment.value.validate() attachment.value.validate()
ElNotification({ ElNotification({
title: '提示', title: '提示',

View File

@@ -435,6 +435,7 @@ const handlePhaseChangeEdit = (row) => {
router.push({ router.push({
name: 'Phase/edit', name: 'Phase/edit',
query: { query: {
id: row.requirementId,
projectId:row.projectId projectId:row.projectId
} }
}) })

View File

@@ -1,20 +1,29 @@
<template> <template>
<div class="apply-block" v-loading="loading"> <div class="apply-block" v-loading="loading">
<baseTitle title="项目基本信息"></baseTitle> <baseTitle title="项目基本信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm> <fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left"
style="margin-left: 15px"></fvForm>
<baseTitle title="阶段变更信息" style="margin-top: -10px"></baseTitle> <baseTitle title="阶段变更信息" style="margin-top: -10px"></baseTitle>
<el-form :model="formData" label-width="auto"> <el-form :model="formData" label-width="auto" :rules="rules">
<el-form-item label="抄送人员" label-width="110"> <el-form-item label="抄送人员" label-width="110">
<Ttsup :modelValue="chooseUserInfo()" @clickCopyUser="chooseUser"/> <Ttsup :modelValue="chooseUserInfo()" @clickCopyUser="chooseUser"/>
</el-form-item> </el-form-item>
<el-form-item label="变更状态" label-width="110" prop="changeState">
<el-select v-model="formData.changeState" placeholder="请选择变更状态" filterable clearable style="width: 300px">
<el-option v-for="item in cacheStore.getDict('fee_stage')" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form> </el-form>
<user-picker :multiple="true" ref="userPicker" title="请选择抄送人员" v-model:value="userList" @ok="ccPersonPickerOkOrCancel" @cancelOrClear="ccPersonPickerOkOrCancel"/> <user-picker :multiple="true" ref="userPicker" title="请选择抄送人员" v-model:value="userList"
@ok="ccPersonPickerOkOrCancel" @cancelOrClear="ccPersonPickerOkOrCancel"/>
<AttachmentUpload ref="attachment" label="阶段变更附件" :showTable="showTable" v-model:otherFileList="otherFileList" <AttachmentUpload ref="attachment" label="阶段变更附件" :showTable="showTable" v-model:otherFileList="otherFileList"
@getAttachment="getAttachment" v-model:singleList="singleList" :showSingleTable="showSingleTable" @getAttachment="getAttachment" v-model:singleList="singleList" :showSingleTable="showSingleTable"
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" tag="阶段变更" @getOtherFile="getOtherFile" :showFileList="true" :formData="formData" tag="阶段变更"
:preview="name === 'Phase/edit'"/> :preview="name === 'Phase/edit'"/>
<div class="approval-record" > <div class="approval-record">
<div class="approval-title" style="margin-top: -15px"> <div class="approval-title" style="margin-top: -15px">
<baseTitle title="审批记录"></baseTitle> <baseTitle title="审批记录"></baseTitle>
<div class="diagram"> <div class="diagram">
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
@@ -24,8 +33,9 @@
/> />
</div> </div>
</div> </div>
<el-empty :image-size="100" description="暂无审批记录" v-if="processDiagramViewer&& !opentionData?.operationList&&!changeDiagram"/> <el-empty :image-size="100" description="暂无审批记录"
<!-- <process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>--> v-if="processDiagramViewer&& !opentionData?.operationList&&!changeDiagram"/>
<!-- <process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>-->
<div class="process"> <div class="process">
<operation-render <operation-render
v-if="processDiagramViewer&& opentionData?.operationList && opentionData?.operationList.length > 0&&!changeDiagram" v-if="processDiagramViewer&& opentionData?.operationList && opentionData?.operationList.length > 0&&!changeDiagram"
@@ -55,6 +65,7 @@ import {getBaseInfoApi} from "@/components/steps/api";
import {useCacheStore} from '@/stores/cache.js' import {useCacheStore} from '@/stores/cache.js'
import {toThousands} from '@/utils/changePrice.js' import {toThousands} from '@/utils/changePrice.js'
const cacheStore = useCacheStore() const cacheStore = useCacheStore()
const changeDiagram = ref(false) const changeDiagram = ref(false)
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
@@ -67,7 +78,9 @@ const showSingleTable = ref(false)
const singleList = ref([]) const singleList = ref([])
const name = ref(router.currentRoute.value.name) const name = ref(router.currentRoute.value.name)
const loading = ref(false) const loading = ref(false)
const formData = ref({}) const formData = ref({
changeState:'1'
})
const file = ref({}) const file = ref({})
const deploymentId = ref() const deploymentId = ref()
const showTable = ref(true) const showTable = ref(true)
@@ -77,6 +90,9 @@ const processDiagramViewer = ref(true)
const userList = ref([]) const userList = ref([])
const processStore = useProcessStore() const processStore = useProcessStore()
const baseFormData = ref([]) const baseFormData = ref([])
const rules = reactive({
changeState: [{required: true, message: '请选择变更状态', trigger: ['blur', 'change']}],
})
const schema = computed(() => { const schema = computed(() => {
return [ return [
{ {
@@ -214,7 +230,7 @@ const schema = computed(() => {
<div> <div>
{ {
baseFormData.value?.economicEstimate ? baseFormData.value?.economicEstimate ?
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span> <span>{toThousands(baseFormData.value?.economicEstimate)}</span>
: <span>{'--'}</span> : <span>{'--'}</span>
} }
</div> </div>
@@ -330,9 +346,9 @@ const compositeParam = (item) => {
} }
const getAttachment = (val) => { const getAttachment = (val) => {
// console.log('上传文件getAttachment', val) // console.log('上传文件getAttachment', val)
showSingleTable.value=false showSingleTable.value = false
formData.value.singleFile = compositeParam(val) formData.value.singleFile = compositeParam(val)
singleList.value.push( compositeParam(val)) singleList.value.push(compositeParam(val))
nextTick(() => { nextTick(() => {
showSingleTable.value = true showSingleTable.value = true
if (attachment.value.singleFile == null) { if (attachment.value.singleFile == null) {
@@ -372,7 +388,7 @@ const chooseUser = () => {
userPicker.value.showUserPicker() userPicker.value.showUserPicker()
} }
const chooseUserInfo = () => { const chooseUserInfo = () => {
if(userList.value==null)return; if (userList.value == null) return;
if (userList.value.length > 0) { if (userList.value.length > 0) {
return userList.value.map(item => { return userList.value.map(item => {
return item.name return item.name
@@ -382,7 +398,7 @@ const chooseUserInfo = () => {
} }
} }
const ccPersonPickerOkOrCancel = (select) => { const ccPersonPickerOkOrCancel = (select) => {
console.log('select',select) console.log('select', select)
userList.value = select userList.value = select
} }
const handleSubmit = async () => { const handleSubmit = async () => {
@@ -391,7 +407,7 @@ const handleSubmit = async () => {
files.push(getFileParam(item)) files.push(getFileParam(item))
}) })
let userIds = [] let userIds = []
if (userList.value&&userList.value.length > 0) { if (userList.value && userList.value.length > 0) {
userIds = userList.value?.map(item => { userIds = userList.value?.map(item => {
return item.id return item.id
}) })
@@ -403,11 +419,12 @@ const handleSubmit = async () => {
deploymentId: deploymentId.value, deploymentId: deploymentId.value,
requirementId: route.query.id, requirementId: route.query.id,
fileList: files, fileList: files,
singleFile: formData.value.singleFile, // singleFile: formData.value.singleFile,
projectId: route.query.projectId, projectId: route.query.projectId,
userIds: userIds userIds: userIds,
changeState:formData.value.changeState
} }
if (!attachment.value.isSingleFile) { if (!attachment.value.isHaveOneFile) {
attachment.value.validate() attachment.value.validate()
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -418,7 +435,7 @@ const handleSubmit = async () => {
} else { } else {
attachment.value.clearValidate() attachment.value.clearValidate()
} }
console.log('params',params) console.log('params', params)
let res = await submitPhaseChange(params) let res = await submitPhaseChange(params)
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -432,7 +449,7 @@ const handleSubmit = async () => {
}) })
} }
} }
const handleResubmit = (instance) => { const handleResubmit = () => {
let otherFiles = [] let otherFiles = []
if (name.value === 'Phase/edit') { if (name.value === 'Phase/edit') {
attachment.value.allFileList?.forEach(item => { attachment.value.allFileList?.forEach(item => {
@@ -440,12 +457,12 @@ const handleResubmit = (instance) => {
}) })
} }
let userIds = [] let userIds = []
if (userList.value&&userList.value.length > 0) { if (userList.value && userList.value.length > 0) {
userIds = userList.value?.map(item => { userIds = userList.value?.map(item => {
return item.id return item.id
}) })
} }
if (attachment.value.singleFile == null) { if (!attachment.value.isHaveOneFile) {
attachment.value.validate() attachment.value.validate()
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -460,9 +477,10 @@ const handleResubmit = (instance) => {
deploymentId: deploymentId.value, deploymentId: deploymentId.value,
requirementId: route.query.id, requirementId: route.query.id,
fileList: otherFiles, fileList: otherFiles,
singleFile: attachment.value.singleFile, // singleFile: attachment.value.singleFile,
projectId: route.query.projectId, projectId: route.query.projectId,
userIds: userIds userIds: userIds,
changeState:formData.value.changeState
} }
// console.log('重新提交params', params) // console.log('重新提交params', params)
resubmitPhaseForm(params).then(res => { resubmitPhaseForm(params).then(res => {
@@ -510,7 +528,7 @@ const getDetailInfo = async () => {
type: res.code === 1000 ? 'success' : 'error' type: res.code === 1000 ? 'success' : 'error'
}) })
if (res.code === 1000) { if (res.code === 1000) {
userList.value=res.data.formData.userInfoList?res.data.formData.userInfoList:[] userList.value = res.data.formData.userInfoList ? res.data.formData.userInfoList : []
formData.value = res.data.formData formData.value = res.data.formData
opentionData.value = res.data opentionData.value = res.data
loading.value = false loading.value = false
@@ -529,6 +547,6 @@ onMounted(async () => {
<style scoped> <style scoped>
.apply-block { .apply-block {
margin: 15px 0; margin: 15px 0;
padding: 0 30px ; padding: 0 30px;
} }
</style> </style>

View File

@@ -3,7 +3,12 @@
<baseTitle title="项目基本信息"></baseTitle> <baseTitle title="项目基本信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm> <fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
<baseTitle title="阶段变更详情" style="margin-top: -10px"></baseTitle> <baseTitle title="阶段变更详情" style="margin-top: -10px"></baseTitle>
<div style="color: #606266;font-size: 14px;height:25px;"><span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">抄送人</span>{{copyName?copyName:'--'}}</div> <div style="color: #606266;font-size: 14px;height:32px;line-height: 32px"><span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">抄送人</span>{{copyName?copyName:'--'}}</div>
<div style="color: #606266;font-size: 14px;display: flex;height:40px;line-height: 32px">
<span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">变更状态</span>
<!-- {{changeState=='1'?'开发阶段':'研究阶段'}}-->
<tag dict-type="fee_stage" :value="changeState"/>
</div>
<ApprovalDetail :formData="summaryData.formData" :data="summaryData" type="phase" <ApprovalDetail :formData="summaryData.formData" :data="summaryData" type="phase"
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/> :processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
<opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId" :taskUserOptionList="summaryData.taskUserOptionList" v-model:value="auditOpinion"></opinion> <opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId" :taskUserOptionList="summaryData.taskUserOptionList" v-model:value="auditOpinion"></opinion>
@@ -28,6 +33,7 @@ const processStore = useProcessStore()
const loading = ref(false) const loading = ref(false)
const auditOpinion = ref('') const auditOpinion = ref('')
const copyName = ref('') const copyName = ref('')
const changeState = ref('')
const fileListShow = ref('READ') const fileListShow = ref('READ')
const baseFormData = ref([]) const baseFormData = ref([])
const schema = computed(() => { const schema = computed(() => {
@@ -275,6 +281,7 @@ const getInfo = async () => {
if (code === 1000) { if (code === 1000) {
summaryData.value = data; summaryData.value = data;
copyName.value= data.formData.userInfoList?.map(item=>item.name).join('') copyName.value= data.formData.userInfoList?.map(item=>item.name).join('')
changeState.value= data.formData.changeState
loading.value = false loading.value = false
processStore.setDesign(data) processStore.setDesign(data)
processStore.runningList.value = data.runningList; processStore.runningList.value = data.runningList;

View File

@@ -1,33 +1,6 @@
<template> <template>
<div v-loading="loading"> <div v-loading="loading">
<el-row v-if="type==='execute'">
<el-col :span="24">
<baseTitle :title="'附件信息'" style="margin-bottom: 5px"></baseTitle>
</el-col>
<el-form :model="attachmentParam" inline style="margin-top: 15px;margin-left: 15px" @submit.prevent>
<el-form-item label="标签" prop="tag">
<el-select v-model="attachmentParam.tag" placeholder="请选择标签" clearable filterable style="width: 200px">
<el-option
v-for="item in tagsOption"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="handleSearchImplementationFileList" color="#DED0B2">搜索</el-button>
</el-form-item>
</el-form>
<fvTable style="width: 100%;min-height:160px;max-height: 160px" v-if="showAttachmentTable" height="160" :tableConfig="executeTableConfig"
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
</template>
</fvTable>
</el-row>
<baseTitle v-if="type!='phase'" :title="getTagName(type)+'信息'" ></baseTitle> <baseTitle v-if="type!='phase'" :title="getTagName(type)+'信息'" ></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>form = e" style="margin-left: 15px"></fvForm> <fvForm :schema="schema" @getInstance="(e)=>form = e" style="margin-left: 15px"></fvForm>
<el-form :model="formData" label-width="auto"> <el-form :model="formData" label-width="auto">
<file-component <file-component
@@ -87,56 +60,7 @@ const filePreviewParam = ref({
fileType: 'pdf' fileType: 'pdf'
}) })
const filePreviewShow = ref(false) const filePreviewShow = ref(false)
const attachmentParam = reactive({
tag: ''
})
const tagsOption = ref([])
const executeTableConfig = reactive({
columns: [
{
prop: 'index',
type: 'index',
label: '序号',
align: 'center',
width: 85,
},
{
prop: 'originalFileName',
label: '文件名',
align: 'center',
width: 300
},
{
prop: 'tag',
label: '标签',
align: 'center'
},
{
prop: 'size',
label: '文件大小',
align: 'center',
width: 150,
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
},
{
prop: 'oper',
label: '操作',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
return (
<div>
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
</div>
)
}
}
]
})
const changeDiagram = ref(false) const changeDiagram = ref(false)
const showAttachmentTable = ref(true)
const props = defineProps({ const props = defineProps({
formData: { formData: {
type: Object, type: Object,
@@ -177,7 +101,6 @@ const props = defineProps({
} }
}) })
const form = ref() const form = ref()
const otherAttachmentList = ref([])
const editSingleTableConfig = reactive({ const editSingleTableConfig = reactive({
columns: [ columns: [
{ {
@@ -334,24 +257,40 @@ const schema = computed(() => {
} }
} }
arr.push(preProcess) arr.push(preProcess)
arr.push({ // arr.push({
label: '项目立项附件', // label: '项目立项附件',
prop: 'singleFile', // prop: 'singleFile',
// colProps: {
// span: 24
// },
// labelWidth: 'left',
// component: () => {
// let singleFileArray = [props.formData.singleFile]
// return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
// tableConfig={editSingleTableConfig}
// data={singleFileArray} isSettingCol={false} pagination={false}>
// </fvTable>
// : <span>--</span>
// }
// })
} else if (props.type == 'execute') {
arr = [{
label: '部门分管领导',
prop: 'optionalChargeLeadership',
colProps: { colProps: {
span: 24 span: 24
}, },
labelWidth: 'left', labelWidth: 'left',
component: () => { component: () => (
let singleFileArray = [props.formData.singleFile] <div>
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80" {
tableConfig={editSingleTableConfig} props.formData.optionalChargeLeadership?.length > 0 ? props.formData.optionalChargeLeadership.map(item => {
data={singleFileArray} isSettingCol={false} pagination={false}> return <span>{item.name} </span>
</fvTable> }) : <span>{'--'}</span>
: <span>--</span> }
} </div>
}) )
} else if (props.type == 'execute') { }]
arr = []
if (props.preProcessShow == 'EDIT') { if (props.preProcessShow == 'EDIT') {
preProcess = { preProcess = {
label: '前置流程', label: '前置流程',
@@ -370,77 +309,60 @@ const schema = computed(() => {
} }
} }
arr.push(preProcess) arr.push(preProcess)
arr.push( // arr.push(
{ // {
label: '部门分管领导', // label: '项目验收附件',
prop: 'optionalChargeLeadership', // prop: 'singleFile',
colProps: { // colProps: {
span: 24 // span: 24
}, // },
labelWidth: 'left', // labelWidth: 'left',
component: () => ( // component: () => {
<div> // let singleFileArray = [props.formData.singleFile]
{ // return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
props.formData.optionalChargeLeadership?.length > 0 ? props.formData.optionalChargeLeadership.map(item => { // tableConfig={editSingleTableConfig}
return <span>{item.name} </span> // data={singleFileArray} isSettingCol={false} pagination={false}>
}) : <span>{'--'}</span> // </fvTable>
} // : <span>--</span>
</div> // }
) // })
},
{
label: '项目验收附件',
prop: 'singleFile',
colProps: {
span: 24
},
labelWidth: 'left',
component: () => {
let singleFileArray = [props.formData.singleFile]
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
tableConfig={editSingleTableConfig}
data={singleFileArray} isSettingCol={false} pagination={false}>
</fvTable>
: <span>--</span>
}
})
} else if (props.type == 'archivist') { } else if (props.type == 'archivist') {
arr = [ arr = [
{ // {
label: '项目归档附件', // label: '项目归档附件',
prop: 'singleFile', // prop: 'singleFile',
colProps: { // colProps: {
span: 24 // span: 24
}, // },
labelWidth: 'left', // labelWidth: 'left',
component: () => { // component: () => {
let singleFileArray = [props.formData.singleFile] // let singleFileArray = [props.formData.singleFile]
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80" // return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
tableConfig={editSingleTableConfig} // tableConfig={editSingleTableConfig}
data={singleFileArray} isSettingCol={false} pagination={false}> // data={singleFileArray} isSettingCol={false} pagination={false}>
</fvTable> // </fvTable>
: <span>--</span> // : <span>--</span>
} // }
}, // },
] ]
} else if (props.type == 'phase') { } else if (props.type == 'phase') {
arr = [ arr = [
{ // {
label: '阶段变更附件', // label: '阶段变更附件',
prop: 'singleFile', // prop: 'singleFile',
colProps: { // colProps: {
span: 24 // span: 24
}, // },
labelWidth: 'left', // labelWidth: 'left',
component: () => { // component: () => {
let singleFileArray = [props.formData.singleFile] // let singleFileArray = [props.formData.singleFile]
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80" // return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
tableConfig={editSingleTableConfig} // tableConfig={editSingleTableConfig}
data={singleFileArray} isSettingCol={false} pagination={false}> // data={singleFileArray} isSettingCol={false} pagination={false}>
</fvTable> // </fvTable>
: <span>--</span> // : <span>--</span>
} // }
}, // },
] ]
} }
return arr return arr
@@ -467,49 +389,6 @@ const clickToPreview=(row)=>{
filePreviewShow.value = true filePreviewShow.value = true
}) })
} }
const getTagsOption = () => {
if (!route.query.projectId) return
getTags(route.query.projectId).then(res => {
if (res.code === 1000) {
tagsOption.value = res.data
}else{
ElNotification({
title: '提示',
message: res.msg,
type: 'error'
})
}
})
}
const handleSearchImplementationFileList = () => {
let params = {
targetId: route.query.projectId,
targetState: "40"
}
if (attachmentParam.tag) {
tagsOption.value.forEach(item => {
if (item.value === attachmentParam.tag) {
attachmentParam.tag = item.label
}
})
params.tag = attachmentParam.tag
}
searchImplementationFileList(params).then(res => {
showAttachmentTable.value = false
if (res.code === 1000) {
otherAttachmentList.value = res.data.fileList
nextTick(() => {
showAttachmentTable.value = true
})
}else{
ElNotification({
title: '提示',
message: res.msg,
type: 'error'
})
}
})
}
const getTagName = (type) => { const getTagName = (type) => {
switch (type) { switch (type) {
case 'approval': case 'approval':
@@ -537,15 +416,25 @@ const handleDownload = (row) => {
watchEffect(() => { watchEffect(() => {
Object.keys(props.formData).length && (form.value?.setValues(props.formData)) Object.keys(props.formData).length && (form.value?.setValues(props.formData))
}) })
if (props.formData.mode == 'view' && props.type == 'execute') {
handleSearchImplementationFileList()
getTagsOption()
}
watch(() => props.loading, (newVal) => { watch(() => props.loading, (newVal) => {
props.loading = newVal props.loading = newVal
}, {deep: true}) }, {deep: true})
</script> </script>
<style lang="scss" scoped> <style scoped lang="scss">
:deep(.el-table__header) {
.is-leaf:first-child {
.cell {
margin-left: -55px !important;
}
}
}
:deep(.el-table__body) {
.el-table__cell:first-child {
.cell {
margin-left: -27px !important;
}
}
}
</style> </style>

View File

@@ -197,8 +197,7 @@ const rollbackHandler = async () => {
type: res.code === 1000 ? 'success' : 'error' type: res.code === 1000 ? 'success' : 'error'
}) })
if (res.code === 1000) { if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path) location.reload()
back()
} }
} }
const handleAgree = async () => { const handleAgree = async () => {

View File

@@ -1,31 +1,35 @@
<template> <template>
<baseTitle title="项目基本信息"></baseTitle> <div id="printBox">
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm> <div style="display: flex;justify-content: space-between">
<div class="steps-box"> <baseTitle title="项目基本信息"></baseTitle>
<el-steps :active="localActive" finish-status="success"> <el-button v-print="print" color="#ded0b2" icon="Printer" style="margin-top: 15px" @click="handlePrint(print)"> 打印</el-button>
<el-step </div>
v-for="(item, index) in localSteps" <fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
:key="item.key" <div class="steps-box">
:title="item.title" <el-steps :active="localActive" finish-status="success">
:class="stepClass(index)" <el-step
@click="handleStep(item.key, index)" v-for="(item, index) in localSteps"
:key="item.key"
:title="item.title"
:class="stepClass(index)"
@click="handleStep(item.key, index)"
>
<template #icon>
<el-icon style="font-size: 20px;" :class="index == localActive ? 'is-active' : 'is-end'" v-if="localStepSuccess.includes(index)"><SuccessFilled /></el-icon>
<el-icon style="font-size: 20px; color: gray;" v-else><WarningFilled /></el-icon>
</template>
</el-step>
</el-steps>
</div>
> <!-- 步骤内容 -->
<template #icon> <div>
<el-icon style="font-size: 20px;" :class="index == localActive ? 'is-active' : 'is-end'" v-if="localStepSuccess.includes(index)"><SuccessFilled /></el-icon> <slot name="content" :localActive="localActive"></slot>
<el-icon style="font-size: 20px; color: gray;" v-else><WarningFilled /></el-icon> <!-- <template v-for="(item, index) in stepList" :key="item.key">
</template> <component v-if="localActive == index" v-bind="item.props || {}" :is="item.component" />
</el-step> </template> -->
</el-steps> </div>
</div> </div>
<!-- 步骤内容 -->
<div>
<slot name="content" :localActive="localActive"></slot>
<!-- <template v-for="(item, index) in stepList" :key="item.key">
<component v-if="localActive == index" v-bind="item.props || {}" :is="item.component" />
</template> -->
</div>
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
@@ -57,7 +61,34 @@ const props = defineProps({
default: '' default: ''
} }
}) })
const print = ref({
id: 'printBox',//这里的id就是上面我们的打印区域id实现指哪打哪
popTitle: '配置页眉标题', // 打印配置页上方的标题
extraHead: '', // 最上方的头部文字附加在head标签上的额外标签使用逗号分割
preview: false, // 是否启动预览模式默认是false
previewTitle: '预览的标题', // 打印预览的标题
previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印
zIndex: 20002, // 预览窗口的z-index默认是20002最好比默认值更高
previewBeforeOpenCallback() {
console.log('正在加载预览窗口!');
}, // 预览窗口打开之前的callback
previewOpenCallback() {
console.log('已经加载完预览窗口,预览打开了!')
}, // 预览窗口打开时的callback
beforeOpenCallback() {
console.log('开始打印之前!')
}, // 开始打印之前的callback
openCallback() {
console.log('执行打印了!')
}, // 调用打印时的callback
closeCallback() {
console.log('关闭了打印工具!')
emits('closePrint')
}, // 关闭打印的callback(无法区分确认or取消)
clickMounted() {
console.log('点击v-print绑定的按钮了')
},
})
const route = useRoute() const route = useRoute()
const emits = defineEmits(['stepChange', 'setDetail']) const emits = defineEmits(['stepChange', 'setDetail'])
@@ -79,6 +110,10 @@ const localSteps = ref([
title: '项目立项', title: '项目立项',
key: 'approve', key: 'approve',
}, },
{
title: '项目实施',
key: 'implement',
},
{ {
title: '项目验收', title: '项目验收',
key: 'execute', key: 'execute',
@@ -279,7 +314,7 @@ const schema = computed(() => {
// } // }
// }, // },
{ {
label: '所属专项资金项目', label: '所属专项资金',
prop: 'specialFund', prop: 'specialFund',
colProps: { colProps: {
span: 24 span: 24
@@ -303,9 +338,12 @@ const schema = computed(() => {
}) })
const localStepSuccess = ref([]) const localStepSuccess = ref([])
const handlePrint=(print)=>{
emits('openPrint',print)
}
// 格式化详情步骤条 // 格式化详情步骤条
const formatProcedure = (data) => { const formatProcedure = (data) => {
console.info("🚀 ~method:formatProcedure -----", data)
let arr = [] let arr = []
if (data instanceof Array) { if (data instanceof Array) {
data.forEach(item => { data.forEach(item => {
@@ -317,12 +355,15 @@ const formatProcedure = (data) => {
case '20': case '20':
arr.push(1) arr.push(1)
break break
case '40': case '30':
arr.push(2) arr.push(2)
break break
case '50': case '40':
arr.push(3) arr.push(3)
break break
case '50':
arr.push(4)
break
} }
} else { } else {
switch (item) { switch (item) {
@@ -335,12 +376,15 @@ const formatProcedure = (data) => {
case '20': case '20':
arr.push(2) arr.push(2)
break break
case '40': case '30':
arr.push(3) arr.push(3)
break break
case '50': case '40':
arr.push(4) arr.push(4)
break break
case '50':
arr.push(5)
break
} }
} }
@@ -388,9 +432,9 @@ const formatActive = (val) => {
newVal == 0 && (active = '00') newVal == 0 && (active = '00')
newVal == 1 && (active = '10') newVal == 1 && (active = '10')
newVal == 2 && (active = '20') newVal == 2 && (active = '20')
// val == 3 && (active = '30') newVal == 3 && (active = '30')
newVal == 3 && (active = '40') newVal == 4 && (active = '40')
newVal == 4 && (active = '50') newVal == 5 && (active = '50')
return active return active
} }
@@ -414,9 +458,12 @@ const handleStep = (key, index) => {
active = '20' active = '20'
break break
case 2: case 2:
active = '40' active = '30'
break break
case 3: case 3:
active = '40'
break
case 4:
active = '50' active = '50'
break break
} }
@@ -432,9 +479,12 @@ const handleStep = (key, index) => {
active = '20' active = '20'
break break
case 3: case 3:
active = '40' active = '30'
break break
case 4: case 4:
active = '40'
break
case 5:
active = '50' active = '50'
break break
} }
@@ -448,6 +498,7 @@ const handleStep = (key, index) => {
type: 'warning' type: 'warning'
}) })
} }
//匹配字典值,返回对应值的字典标签 //匹配字典值,返回对应值的字典标签
const filterDict = (data, value) => { const filterDict = (data, value) => {
if (data === undefined || value === undefined) return; if (data === undefined || value === undefined) return;
@@ -478,8 +529,11 @@ const getBaseInfo = async () => {
try { try {
const {code, data} = await getBaseInfoApi(route.query.projectId) const {code, data} = await getBaseInfoApi(route.query.projectId)
// console.log('data.procedure',data.procedure,route.query.step) // console.log('data.procedure',data.procedure,route.query.step)
if(route.query.step==='40'){ if (route.query.step === '30'||route.query.step === '40') {
if(data.procedure.indexOf('40')==-1){ if (data.procedure.indexOf('30') == -1) {
data.procedure.push('30')
}
if (data.procedure.indexOf('40') == -1) {
data.procedure.push('40') data.procedure.push('40')
} }
}else if(route.query.step==='50'){ }else if(route.query.step==='50'){
@@ -504,7 +558,13 @@ watchEffect(() => {
}) })
watchEffect(() => { watchEffect(() => {
if (props.reportType === 'direct') { if (props.reportType === 'direct') {
localSteps.value = localSteps.value.slice(1) let steps = []
for (const step of localSteps.value) {
if (step.key !== 'collect') {
steps.push(step)
}
}
localSteps.value = steps
} }
}) })
</script> </script>

View File

@@ -22,7 +22,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="实用性新型专利(项)" prop="newPatent"> <el-form-item label="新型专利(项)" prop="newPatent">
<span>{{ localFormData.newPatent }}</span> <span>{{ localFormData.newPatent }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -51,27 +51,27 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="研发项目关键内容描述" prop="contentDescription"> <el-form-item label="建设目标描述" prop="contentDescription">
<span style="white-space: pre-wrap">{{ localFormData.contentDescription }}</span> <span style="white-space: pre-wrap">{{ localFormData.contentDescription }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<baseTitle title="需求上报申请书" style="margin-bottom: 10px">></baseTitle> <baseTitle title="需求上报申请书" style="margin-bottom: -3px">></baseTitle>
<el-row gutter="20" style="margin-bottom: -15px;"> <el-row gutter="20" style="margin-bottom: -15px;">
<el-col :span="24"> <!-- <el-col :span="24">-->
<single-file-component tag="需求上报" :fileNameTableWidth="300" :fullscreen="true" <!-- <single-file-component tag="需求上报" :fileNameTableWidth="300" :fullscreen="true"-->
v-model:value="localFormData.singleFile" :processViewer="processViewer" <!-- v-model:value="localFormData.singleFile" :processViewer="processViewer"-->
labelAlign="top"/> <!-- labelAlign="top"/>-->
<!-- <el-form-item label="需求上报申请书" label-position="top" style="display:block;">--> <!-- &lt;!&ndash; <el-form-item label="需求上报申请书" label-position="top" style="display:block;">&ndash;&gt;-->
<!-- &lt;!&ndash; style="font-size: 16px"&ndash;&gt;--> <!-- &lt;!&ndash; &lt;!&ndash; style="font-size: 16px"&ndash;&gt;&ndash;&gt;-->
<!-- <el-button type="primary" link @click="handleDownload(localFormData.singleFile)">--> <!-- &lt;!&ndash; <el-button type="primary" link @click="handleDownload(localFormData.singleFile)">&ndash;&gt;-->
<!-- {{ localFormData.singleFile?.originalFileName }}--> <!-- &lt;!&ndash; {{ localFormData.singleFile?.originalFileName }}&ndash;&gt;-->
<!-- </el-button>--> <!-- &lt;!&ndash; </el-button>&ndash;&gt;-->
<!-- </el-form-item>--> <!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
</el-col> <!-- </el-col>-->
<el-col :span="24" style="margin-top: -15px;"> <!-- <el-col :span="24" style="margin-top: -15px;">-->
<baseTitle title="附件文件" style="margin-bottom: 0"></baseTitle> <!-- <baseTitle title="附件文件" style="margin-bottom: 0"></baseTitle>-->
</el-col> <!-- </el-col>-->
<el-col :span="24"> <el-col :span="24">
<file-component <file-component
tag="需求上报" :fileNameTableWidth="300" :fullscreen="true" tag="需求上报" :fileNameTableWidth="300" :fullscreen="true"

View File

@@ -3,7 +3,7 @@
<StepsMoblie :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail" <StepsMoblie :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail"
@stepChange="stepChange" @stepChange="stepChange"
:reportType="route.query.id==='-1'?'direct':''"> :reportType="route.query.id==='-1'?'direct':''">
<template #content> <template #content v-if="detailShow">
<collection-detail :formData="detailData.formData" <collection-detail :formData="detailData.formData"
:data="detailData" :data="detailData"
:processViewer="commonProvessViewer" :processViewer="commonProvessViewer"
@@ -23,13 +23,18 @@
:data="detailData" :data="detailData"
:processViewer="commonProvessViewer" :processViewer="commonProvessViewer"
:fileListShow="fileListShow" :fileListShow="fileListShow"
:preProcessShow="preProcessShow"
v-model:value="auditOpinion"/> v-model:value="auditOpinion"/>
<div v-if="showActive == '30'">
<project-attachment fileNameTableWidth="300" :isLineBtn="true"/>
</div>
<ApprovalDetail type="execute" <ApprovalDetail type="execute"
v-if="showActive == '40'" v-if="showActive == '40'"
:formData="detailData.formData" :formData="detailData.formData"
:data="detailData" :data="detailData"
:processViewer="commonProvessViewer" :processViewer="commonProvessViewer"
:fileListShow="fileListShow" :fileListShow="fileListShow"
:preProcessShow="preProcessShow"
v-model:value="auditOpinion"/> v-model:value="auditOpinion"/>
<ApprovalDetail type="archivist" <ApprovalDetail type="archivist"
v-if="showActive == '50'" v-if="showActive == '50'"
@@ -37,6 +42,7 @@
:data="detailData" :data="detailData"
:processViewer="commonProvessViewer" :processViewer="commonProvessViewer"
:fileListShow="fileListShow" :fileListShow="fileListShow"
:preProcessShow="preProcessShow"
v-model:value="auditOpinion"/> v-model:value="auditOpinion"/>
<!-- <project-apply-moblie :title="applyTitle"--> <!-- <project-apply-moblie :title="applyTitle"-->
<!-- v-if="editShow"--> <!-- v-if="editShow"-->
@@ -46,7 +52,8 @@
<!-- :formData="detailData.formData"/>--> <!-- :formData="detailData.formData"/>-->
</template> </template>
</StepsMoblie> </StepsMoblie>
<opinion-moblie v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId" :taskUserOptionList="detailData.taskUserOptionList" <opinion-moblie v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
:taskUserOptionList="detailData.taskUserOptionList"
v-model:value="auditOpinion"/> v-model:value="auditOpinion"/>
</div> </div>
</template> </template>
@@ -70,13 +77,16 @@ const applyTitle = ref('apply')
const loading = ref(false) const loading = ref(false)
const processStore = useProcessStore() const processStore = useProcessStore()
const fileListShow = ref('READ') const fileListShow = ref('READ')
const preProcessShow = ref('READ')
const detailShow = ref(false)
const mode = ref('') const mode = ref('')
const currentStep = ref() const currentStep = ref()
const auditOpinion = ref('') const auditOpinion = ref('')
route.query.step == '10' && (currentStep.value = 1) route.query.step == '10' && (currentStep.value = 1)
route.query.step == '20' && (currentStep.value = 2) route.query.step == '20' && (currentStep.value = 2)
route.query.step == '40' && (currentStep.value = 3) route.query.step == '30' && (currentStep.value = 3)
route.query.step == '50' && (currentStep.value = 4) route.query.step == '40' && (currentStep.value = 4)
route.query.step == '50' && (currentStep.value = 5)
const showActive = ref() const showActive = ref()
const detailData = ref({}) const detailData = ref({})
const commonProvessViewer = ref(true) const commonProvessViewer = ref(true)
@@ -87,7 +97,9 @@ const getAllInfo = async (state) => {
state: "0" state: "0"
} }
try { try {
detailShow.value = false
fileListShow.value = 'READ' fileListShow.value = 'READ'
preProcessShow.value = 'READ'
commonProvessViewer.value = false commonProvessViewer.value = false
const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state) const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
if (code === 1000) { if (code === 1000) {
@@ -102,9 +114,13 @@ const getAllInfo = async (state) => {
processStore.passList.value = data.passList; processStore.passList.value = data.passList;
nextTick(() => { nextTick(() => {
commonProvessViewer.value = true commonProvessViewer.value = true
detailShow.value = true
if (data.formPermMap && data.formPermMap["fileList"]) { if (data.formPermMap && data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm fileListShow.value = data.formPermMap["fileList"].perm
} }
if (data.formPermMap && data.formPermMap["preProcess"]) {
preProcessShow.value = data.formPermMap["preProcess"].perm
}
}) })
changeModel(state, mode.value) changeModel(state, mode.value)
loading.close() loading.close()
@@ -139,11 +155,21 @@ const changeModel = (active, mode) => {
} }
const setDetail = (active) => { const setDetail = (active) => {
showActive.value = active showActive.value = active
if (active == '30') {
changeModel(30, 'view')
detailShow.value = true
return;
}
getAllInfo(active) getAllInfo(active)
} }
const stepChange = (data) => { const stepChange = (data) => {
showActive.value = data.active showActive.value = data.active
if (data.active == '30') {
changeModel(30, 'view')
detailShow.value = true
return;
}
getAllInfo(data.active) getAllInfo(data.active)
} }
</script> </script>

View File

@@ -3,7 +3,12 @@
<baseTitle title="项目基本信息"></baseTitle> <baseTitle title="项目基本信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left"></fvForm> <fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left"></fvForm>
<baseTitle title="阶段变更详情" style="margin-top: -10px"></baseTitle> <baseTitle title="阶段变更详情" style="margin-top: -10px"></baseTitle>
<div style="color: #606266;font-size: 14px;height:25px;"><span style="display:inline-block;text-align: right;margin-right: 14px">抄送人</span>{{copyName?copyName:'--'}}</div> <div style="color: #606266;font-size: 14px;height:32px;line-height: 32px"><span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">抄送人</span>{{copyName?copyName:'--'}}</div>
<div style="color: #606266;font-size: 14px;display: flex;height:40px;line-height: 32px;margin-bottom: -10px">
<span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">变更状态</span>
<!-- {{changeState=='1'?'开发阶段':'研究阶段'}}-->
<tag dict-type="fee_stage" :value="changeState"/>
</div>
<ApprovalDetailMoblie :formData="summaryData.formData" :data="summaryData" type="phase" <ApprovalDetailMoblie :formData="summaryData.formData" :data="summaryData" type="phase"
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/> :processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
<opinion-moblie v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId" <opinion-moblie v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId"
@@ -30,6 +35,7 @@ const summaryProcessViewer = ref(true)
const processStore = useProcessStore() const processStore = useProcessStore()
const loading = ref(false) const loading = ref(false)
const auditOpinion = ref('') const auditOpinion = ref('')
const changeState = ref('')
const copyName = ref('') const copyName = ref('')
const fileListShow = ref('READ') const fileListShow = ref('READ')
const baseFormData = ref([]) const baseFormData = ref([])
@@ -278,6 +284,7 @@ const getInfo = async () => {
if (code === 1000) { if (code === 1000) {
summaryData.value = data; summaryData.value = data;
copyName.value= data.formData.userInfoList?.map(item=>item.name).join('') copyName.value= data.formData.userInfoList?.map(item=>item.name).join('')
changeState.value= data.formData.changeState
loading.value = false loading.value = false
processStore.setDesign(data) processStore.setDesign(data)
processStore.runningList.value = data.runningList; processStore.runningList.value = data.runningList;