fix : 修复详情基本信息显示位置、项目验收、结项操作放在详情页面
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="apply-block">
|
||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||
<el-form :model="formData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="前置流程">
|
||||
@@ -25,8 +25,8 @@
|
||||
<process-diagram-viewer mode="view" idName="projectApply" v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" v-if="route.query.state==0" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else-if="route.query.state==3" @click="handleSubmit(applyForm)">重新提交</el-button>
|
||||
<el-button color="#DED0B2" v-if="route.query.state==0" @click="handleSubmit">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else-if="route.query.state==3" @click="handleSubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,7 +36,20 @@
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getApplyProcess, projectApply, resubmitApply, getApplyDetail} from "@/api/project-manage";
|
||||
import {
|
||||
getApplyProcess,
|
||||
projectApply,
|
||||
resubmitApply,
|
||||
getApplyDetail,
|
||||
getProjectCheckProcess,
|
||||
projectCheck,
|
||||
resubmitCheck,
|
||||
getCheckDetail,
|
||||
projectConclusion,
|
||||
resubmitConclusion,
|
||||
getConclusionDetail,
|
||||
getProjectConclusionProcess
|
||||
} from "@/api/project-manage";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
@@ -69,16 +82,14 @@ const showTable = ref(true)
|
||||
const loading = ref(false)
|
||||
const processDiagramViewer = ref(false)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const applyForm = ref()
|
||||
const formRef = ref()
|
||||
const deploymentId = ref()
|
||||
const projectId = ref(route.query.projectId)
|
||||
const step = ref(route.query.step)
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
// let tag = ''
|
||||
// if (name.value === 'Initiation/apply' || route.query.state==3) {
|
||||
// tag = props.title
|
||||
// }
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
@@ -108,10 +119,10 @@ const getFileParam = (item) => {
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
const handleSubmit =async () => {
|
||||
// if (!formRef.value) return
|
||||
// formRef.value.validate(async (valid) => {
|
||||
// if (!valid) return
|
||||
let files = []
|
||||
if (route.query.state === '3') {
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
@@ -141,14 +152,28 @@ const handleSubmit = (instance) => {
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: formData.value.singleFile,
|
||||
projectId: route.query.projectId,
|
||||
projectId: projectId.value,
|
||||
}
|
||||
console.log('params', params)
|
||||
let res
|
||||
if (route.query.state === '3') {
|
||||
res = await resubmitApply(params)
|
||||
} else {
|
||||
res = await projectApply(params)
|
||||
if (step.value === '20') {
|
||||
if (route.query.state === '3') {
|
||||
res = await resubmitApply(params)
|
||||
} else {
|
||||
res = await projectApply(params)
|
||||
}
|
||||
} else if (step.value === '40') {
|
||||
if (route.query.state === '3') {
|
||||
res = await resubmitCheck(params)
|
||||
} else {
|
||||
res = await projectCheck(params)
|
||||
}
|
||||
} else if (step.value === '50') {
|
||||
if (route.query.state === '3') {
|
||||
res = await resubmitConclusion(params)
|
||||
} else {
|
||||
res = await projectConclusion(params)
|
||||
}
|
||||
}
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -157,94 +182,81 @@ const handleSubmit = (instance) => {
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Initiation'
|
||||
})
|
||||
if (step.value === '20') {
|
||||
await router.push({
|
||||
name: 'Initiation'
|
||||
})
|
||||
}else if (step.value === '40') {
|
||||
await router.push({
|
||||
name: 'Implementation'
|
||||
})
|
||||
}else if (step.value === '50') {
|
||||
await router.push({
|
||||
name: 'Filing'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
// })
|
||||
}
|
||||
// const handleResubmit = async () => {
|
||||
// let files = []
|
||||
// if (route.query.state == 3) {
|
||||
// attachment.value.allFileList.forEach(item => {
|
||||
// files.push(getFileParam(item))
|
||||
// })
|
||||
// }
|
||||
// if (attachment.value.singleFile == null) {
|
||||
// attachment.value.validate()
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: '请上传附件',
|
||||
// type: 'error'
|
||||
// })
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
// let params = {
|
||||
// deploymentId: deploymentId.value,
|
||||
// requirementId: route.query.id,
|
||||
// fileList: files,
|
||||
// singleFile: attachment.value.singleFile,
|
||||
// projectId: route.query.projectId,
|
||||
// }
|
||||
// console.log('params', params, attachment.value.singleFile)
|
||||
// let res = await resubmitApply(params)
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
// await router.push({
|
||||
// name: 'Initiation'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
const init = () => {
|
||||
if (!route.query.projectId) return;
|
||||
const init = async () => {
|
||||
let id = projectId.value
|
||||
if (!id) return;
|
||||
processDiagramViewer.value = false
|
||||
getApplyProcess(route.query.projectId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value = data.deploymentId
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
if (!route.query.projectId) return;
|
||||
getApplyDetail(route.query.projectId).then(res => {
|
||||
let res
|
||||
if (step.value === '20') {
|
||||
res = await getApplyProcess(id)
|
||||
} else if (step.value === '40') {
|
||||
res = await getProjectCheckProcess(id)
|
||||
}else if (step.value === '50') {
|
||||
res = await getProjectConclusionProcess(id)
|
||||
}
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value = data.deploymentId
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
type: 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
let id = projectId.value
|
||||
if (!id) return;
|
||||
let res
|
||||
loading.value = true
|
||||
if (step.value === '20') {
|
||||
res = await getApplyDetail(id)
|
||||
} else if (step.value === '40') {
|
||||
res = await getCheckDetail(id)
|
||||
}else if (step.value === '50') {
|
||||
res = await getConclusionDetail(id)
|
||||
}
|
||||
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
loading.value = false
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
if (route.query.state == 3) {
|
||||
loading.value = true
|
||||
await getDetailInfo()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -100,15 +100,15 @@ const schema = computed(() => {
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
@@ -119,7 +119,7 @@ const schema = computed(() => {
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
]
|
||||
})
|
||||
@@ -275,6 +275,16 @@ const getBaseInfo = async () => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||
console.log('data.procedure',data.procedure,route.query.step)
|
||||
if(route.query.step==='40'){
|
||||
if(data.procedure.indexOf('40')==-1){
|
||||
data.procedure.push('40')
|
||||
}
|
||||
}else if(route.query.step==='50'){
|
||||
if(data.procedure.indexOf('50')==-1){
|
||||
data.procedure.push('50')
|
||||
}
|
||||
}
|
||||
localStepSuccess.value = formatProcedure(data.procedure)
|
||||
baseForm.value.setValues(data)
|
||||
emits('setDetail', formatActive(localActive.value))
|
||||
|
||||
@@ -51,8 +51,8 @@ const schema = computed(() => {
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
@@ -65,13 +65,12 @@ const schema = computed(() => {
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
]
|
||||
})
|
||||
const baseForm = ref()
|
||||
|
||||
@@ -7,22 +7,23 @@
|
||||
:data="commonForm"
|
||||
:processViewer="commonProvessViewer"
|
||||
v-show="showActive == '00'"
|
||||
:loading="loading"
|
||||
v-model:value="auditOpinion"
|
||||
/>
|
||||
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"
|
||||
:processViewer="commonProvessViewer" :fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="approval" v-show="showActive == '20'&&!showApply" :formData="commonForm.formData"
|
||||
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
|
||||
:data="commonForm" :processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData"
|
||||
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
|
||||
<ApprovalDetail type="execute" v-show="showActive == '40'&&!showCheck" :formData="commonForm.formData"
|
||||
:data="commonForm" :processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"
|
||||
<ApprovalDetail type="archivist" v-show="showActive == '50'&&!showFiling" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<project-apply v-if="showApply&&showActive == '20'" :data="commonForm"/>
|
||||
<project-apply title="项目验收" v-if="showCheck&&showActive == '40'" :data="commonForm"/>
|
||||
<project-apply title="项目结项" v-if="showFiling&&showActive == '50'" :data="commonForm"/>
|
||||
</template>
|
||||
</steps>
|
||||
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"
|
||||
@@ -40,6 +41,8 @@ import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||
|
||||
const route = useRoute()
|
||||
const showApply = ref(false)
|
||||
const showCheck = ref(false)
|
||||
const showFiling = ref(false)
|
||||
const loading = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const fileListShow = ref('READ')
|
||||
@@ -57,11 +60,8 @@ const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
try {
|
||||
commonProvessViewer.value = false
|
||||
loading.value = true
|
||||
const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if (code === 1000) {
|
||||
loading.value = false
|
||||
} else {
|
||||
if (code !== 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
@@ -92,13 +92,37 @@ const getAllInfo = async (state) => {
|
||||
}
|
||||
}
|
||||
const changeModel = (active) => {
|
||||
if (route.query.state === '0' && active === '20') {
|
||||
showApply.value = true
|
||||
} else if (route.query.state === '3' && active === '20') {
|
||||
showApply.value = true
|
||||
getAllInfo(active)
|
||||
if (route.query.step === '20' && active === '20') {
|
||||
if (route.query.state === '0') {
|
||||
showApply.value = true
|
||||
} else if (route.query.state === '3') {
|
||||
showApply.value = true
|
||||
getAllInfo(active)
|
||||
} else {
|
||||
showApply.value = false
|
||||
getAllInfo(active)
|
||||
}
|
||||
} else if (route.query.step === '40' && active === '40') {
|
||||
if (route.query.state === '0') {
|
||||
showCheck.value = true
|
||||
} else if (route.query.state === '3') {
|
||||
showCheck.value = true
|
||||
getAllInfo(active)
|
||||
} else {
|
||||
showCheck.value = false
|
||||
getAllInfo(active)
|
||||
}
|
||||
} else if (route.query.step === '50' && active === '50') {
|
||||
if (route.query.state === '0') {
|
||||
showFiling.value = true
|
||||
} else if (route.query.state === '3') {
|
||||
showFiling.value = true
|
||||
getAllInfo(active)
|
||||
} else {
|
||||
showFiling.value = false
|
||||
getAllInfo(active)
|
||||
}
|
||||
} else {
|
||||
showApply.value = false
|
||||
getAllInfo(active)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ const schema = computed(() => {
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
@@ -40,13 +40,12 @@ const schema = computed(() => {
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
]
|
||||
})
|
||||
const baseForm = ref()
|
||||
|
||||
@@ -103,8 +103,8 @@ const schema = computed(() => {
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
@@ -117,13 +117,12 @@ const schema = computed(() => {
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
]
|
||||
})
|
||||
const baseForm = ref()
|
||||
|
||||
Reference in New Issue
Block a user