fix : 重新提交全流程初步完成
This commit is contained in:
@@ -229,7 +229,7 @@ const submitParam = (item) => {
|
||||
deadline: item.deadline,
|
||||
requirementId: item.requirementId ? item.requirementId : 0,
|
||||
requirementName: item.requirementName,
|
||||
files: files,
|
||||
fileList: files,
|
||||
deploymentId: processInstanceData.value.deploymentId
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="detail-block">
|
||||
<div class="detail-block" v-loading="loading">
|
||||
<el-form :model="formData" ref="demandForm" label-width="auto" :rules="rules">
|
||||
<baseTitle title="需求征集详情"></baseTitle>
|
||||
<el-row>
|
||||
@@ -87,6 +87,7 @@ const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const form = ref();
|
||||
const loading = ref(false)
|
||||
const demandForm = ref()
|
||||
const processStore = useProcessStore()
|
||||
const companyOption = ref([])
|
||||
@@ -202,6 +203,7 @@ const init = async () => {
|
||||
if (!route.query.id) return;
|
||||
await getCompanyOption()
|
||||
getInfo(route.query.id).then(res => {
|
||||
loading.value=false
|
||||
let data = res.data
|
||||
formData.value = data.formData;
|
||||
data.formData.companyIds = getDataSourceOptionItem(data.formData.companyIds)
|
||||
@@ -218,7 +220,10 @@ const init = async () => {
|
||||
})
|
||||
})
|
||||
}
|
||||
init()
|
||||
onMounted(async () => {
|
||||
loading.value=true
|
||||
await init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -344,7 +344,7 @@ const handleSubmit = async (instance) => {
|
||||
})
|
||||
let params = {
|
||||
"specialFund": "2",
|
||||
"projectName": "重新提交全流程测试",
|
||||
"projectName": "重新提交全流程测试2024520",
|
||||
"startTime": "2024-05-24 00:00:00",
|
||||
"endTime": "2024-05-29 00:00:00",
|
||||
"projectType": "3",
|
||||
@@ -363,19 +363,18 @@ const handleSubmit = async (instance) => {
|
||||
"resultForm": "3",
|
||||
"projectImpact": "3",
|
||||
"rdSubject": "3",
|
||||
"affiliatedCompanyId": 93,
|
||||
"affiliatedCompanyId": formData.value.affiliatedCompanyId,
|
||||
"serviceDescription": "3",
|
||||
"contentDescription": "3",
|
||||
"specialFundAmount": "3",
|
||||
deploymentId: deploymentId.value,
|
||||
"singleFile": singleFile,
|
||||
"files": otherFiles,
|
||||
// "requirementId":route.query.id,
|
||||
"requirementId": 102
|
||||
"requirementId":route.query.id
|
||||
}
|
||||
// ...formData.value,
|
||||
// deploymentId: deploymentId.value,
|
||||
// files: files,
|
||||
// fileList: files,
|
||||
// requirementId:102
|
||||
// }
|
||||
let res = await requirementReported(params)
|
||||
@@ -416,9 +415,9 @@ const handleResubmit = () => {
|
||||
let params={
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
files: otherFiles,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
requirementId: 102
|
||||
requirementId: route.query.id
|
||||
}
|
||||
console.log('重新提交params',params)
|
||||
resubmitReported(params).then(res => {
|
||||
@@ -473,12 +472,11 @@ const init = async () => {
|
||||
})
|
||||
}
|
||||
onMounted(async () => {
|
||||
loading.value=true
|
||||
await init()
|
||||
if (route.query.projectId) {
|
||||
loading.value=true
|
||||
await getDetailInfo()
|
||||
}
|
||||
|
||||
})
|
||||
const staging = async () => {
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
const companyOption = ref([])
|
||||
@@ -33,18 +34,25 @@ const getInfo = async (state) => {
|
||||
await getCompanyOption()
|
||||
summaryProcessViewer.value = false
|
||||
loading.value = true
|
||||
const {code, data} = await getMapProjectStateInfo(projectId, state)
|
||||
summaryData.value = data;
|
||||
loading.value = false
|
||||
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(() => {
|
||||
summaryProcessViewer.value = true
|
||||
const {code, data,msg} = await getMapProjectStateInfo(projectId, state)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if(code===1000){
|
||||
summaryData.value = data;
|
||||
loading.value = false
|
||||
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(() => {
|
||||
summaryProcessViewer.value = true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const setDetail = (active) => {
|
||||
|
||||
@@ -23,7 +23,7 @@ import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.v
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getProjectConclusionProcess, projectConclusion} from "@/api/project-manage";
|
||||
import {getProjectConclusionProcess, projectConclusion,getConclusionDetail, resubmitConclusion} from "@/api/project-manage";
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const tagsViewStore = useTagsView()
|
||||
@@ -128,11 +128,11 @@ const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
// if(JSON.stringify(file.value) == "{}"){
|
||||
// applyForm.value.validate()
|
||||
// } else {
|
||||
// applyForm.value.clearValidate()
|
||||
// }
|
||||
if(JSON.stringify(file.value) === "{}"){
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (!valid) return
|
||||
let files = []
|
||||
let singleFile={}
|
||||
@@ -147,7 +147,7 @@ const handleSubmit = (instance) => {
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: files,
|
||||
fileList: files,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
}
|
||||
@@ -170,7 +170,12 @@ const handleResubmit = () => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if(name.value === 'Filing/edit'){
|
||||
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if(attachment.value.singleFile!==null&&name.value === 'Filing/edit'){
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
}
|
||||
@@ -190,37 +195,37 @@ const handleResubmit = () => {
|
||||
let params={
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: otherFiles,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
}
|
||||
console.log('重新提交params',params)
|
||||
// resubmitReported(params).then(res => {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
// router.push({
|
||||
// name: 'Filing'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
resubmitConclusion(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Filing'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
// getDetail(route.query.projectId).then(res => {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// formData.value = res.data.formData
|
||||
// loading.value=false
|
||||
// }
|
||||
// })
|
||||
getConclusionDetail(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
loading.value=false
|
||||
}
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
getProjectConclusionProcess().then(res => {
|
||||
@@ -242,12 +247,11 @@ const init = () => {
|
||||
})
|
||||
}
|
||||
onMounted(async () => {
|
||||
loading.value=true
|
||||
await init()
|
||||
if (route.query.projectId) {
|
||||
if (name.value === 'Filing/edit') {
|
||||
loading.value=true
|
||||
await getDetailInfo()
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -19,18 +19,17 @@
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit(applyForm)">重新提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {getProjectCheckProcess, projectCheck} from "@/api/project-manage";
|
||||
import {getProjectCheckProcess, projectCheck,getCheckDetail,resubmitCheck} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {getDetail, resubmitReported} from "../../project-demand/summary/api";
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
@@ -83,11 +82,11 @@ const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
// if(JSON.stringify(file.value) == "{}"){
|
||||
// applyForm.value.validate()
|
||||
// }else {
|
||||
// applyForm.value.clearValidate()
|
||||
// }
|
||||
if(JSON.stringify(file.value) === "{}"){
|
||||
attachment.value.validate()
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (!valid) return
|
||||
let files = []
|
||||
let singleFile={}
|
||||
@@ -111,11 +110,11 @@ const handleSubmit = (instance) => {
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: files,
|
||||
fileList: files,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
}
|
||||
console.log('params',params)
|
||||
console.log('params-提交',params)
|
||||
let res = await projectCheck(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -130,61 +129,70 @@ const handleSubmit = (instance) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if(name.value === 'Implementation/edit'){
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
const handleResubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
fileArray=attachment.value.allFileList
|
||||
}else {
|
||||
if (file.value.fileId !== undefined) {
|
||||
if (attachment.value.singleFile!==null&&name.value === 'Implementation/edit') {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
}
|
||||
fileArray = attachment.value.allFileList
|
||||
} else {
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
fileArray = otherFileList.value
|
||||
}
|
||||
fileArray=otherFileList.value
|
||||
}
|
||||
fileArray.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
fileArray.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
//todo requirementId
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
console.log('重新提交params', params)
|
||||
resubmitCheck(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Implementation'
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
//todo requirementId
|
||||
let params={
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: otherFiles,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
}
|
||||
console.log('重新提交params',params)
|
||||
// resubmitReported(params).then(res => {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
// router.push({
|
||||
// name: 'Implementation'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
// getDetail(route.query.projectId).then(res => {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// formData.value = res.data.formData
|
||||
// loading.value=false
|
||||
// }
|
||||
// })
|
||||
getCheckDetail(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
loading.value=false
|
||||
}
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
getProjectCheckProcess().then(res => {
|
||||
@@ -206,12 +214,11 @@ const init = () => {
|
||||
})
|
||||
}
|
||||
onMounted(async () => {
|
||||
loading.value=true
|
||||
await init()
|
||||
if (route.query.projectId) {
|
||||
if (name.value === 'Implementation/edit'){
|
||||
loading.value=true
|
||||
await getDetailInfo()
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {ElMessage, ElNotification} from "element-plus";
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {getProcessInfo, projectApply} from "@/api/project-manage";
|
||||
import {getApplyProcess, projectApply,resubmitApply,getApplyDetail} from "@/api/project-manage";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
@@ -124,11 +124,11 @@ const getFileParam = (item) => {
|
||||
const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
// if(JSON.stringify(file.value) == "{}"){
|
||||
// applyForm.value.validate()
|
||||
// }else {
|
||||
// applyForm.value.clearValidate()
|
||||
// }
|
||||
if(JSON.stringify(file.value) === "{}"){
|
||||
attachment.value.validate()
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (!valid) return
|
||||
let files = []
|
||||
let singleFile={}
|
||||
@@ -143,7 +143,7 @@ const handleSubmit = (instance) => {
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: files,
|
||||
fileList: files,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
}
|
||||
@@ -166,7 +166,12 @@ const handleResubmit =async () => {
|
||||
let files = []
|
||||
let singleFile={}
|
||||
let fileArray
|
||||
if(name.value === 'Initiation/edit'){
|
||||
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if(attachment.value.singleFile!==null&&name.value === 'Initiation/edit'){
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
}
|
||||
@@ -185,39 +190,39 @@ const handleResubmit =async () => {
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: files,
|
||||
fileList: files,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
}
|
||||
console.log('params',params)
|
||||
// let res = await resubmit(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'
|
||||
// })
|
||||
// }
|
||||
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 getDetailInfo = async () => {
|
||||
// getDetail(route.query.projectId).then(res => {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// formData.value = res.data.formData
|
||||
// loading.value=false
|
||||
// }
|
||||
// })
|
||||
getApplyDetail(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
loading.value=false
|
||||
}
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
getProcessInfo().then(res => {
|
||||
getApplyProcess().then(res => {
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
@@ -237,12 +242,11 @@ const init = () => {
|
||||
}
|
||||
init()
|
||||
onMounted(async () => {
|
||||
loading.value=true
|
||||
await init()
|
||||
if (route.query.projectId) {
|
||||
if (name.value === 'Initiation/edit') {
|
||||
loading.value=true
|
||||
await getDetailInfo()
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ const init = () => {
|
||||
break
|
||||
}
|
||||
// let operationListNew = []
|
||||
for (let i = 0; i < props.operationList.length; i++) {
|
||||
for (let i = 0; i < props.operationList?.length; i++) {
|
||||
let operationNew = initOperationFun(props.operationList[i])
|
||||
let userList = []
|
||||
if (operationNew.userInfo) {
|
||||
|
||||
Reference in New Issue
Block a user