fix : 修复项目申请/验收/结项功能

This commit is contained in:
2024-05-19 20:39:54 +08:00
parent 4a90f4bc1e
commit 1f4389eb5e
10 changed files with 409 additions and 122 deletions

View File

@@ -13,6 +13,10 @@
<AttachmentUpload label="项目验收附件" :showTable="showTable" :otherFileList="otherFileList"
@getAttachment="getAttachment"
@getOtherFile="getOtherFile" :showFileList="true"/>
<div class="approval-record">
<baseTitle title="流程"></baseTitle>
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
</div>
<div class="oper-page-btn">
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
</div>
@@ -20,11 +24,21 @@
</template>
<script setup lang="jsx">
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import {getProjectCheckProcess, projectCheck} from "@/api/project-manage";
import { ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js';
const formData = ref({})
const fileList = ref(null)
const fileList = ref([])
const applyForm = ref()
const deploymentId = ref()
const showTable = ref(true)
const otherFileList = ref([])
const processInstanceData = ref()
const processDiagramViewer = ref(true)
const processStore = useProcessStore()
const router = useRouter()
const route = useRoute()
const compositeParam = (item) => {
let tag=''
if(router.currentRoute.value.name==='Implementation/check'){
@@ -79,24 +93,46 @@ const handleSubmit = (instance) => {
files.push(getFileParam(item))
})
let params = {
// deploymentId: deploymentId.value,
files: files
deploymentId: deploymentId.value,
requirementId: route.query.id,
files: files,
projectId:route.query.projectId,
}
console.log('params',params)
// let res = await requirementReported(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: 'Summary'
// })
// }
let res = await projectCheck(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: 'Implementation'
})
}
})
}
const init = () => {
getProjectCheckProcess().then(res => {
processDiagramViewer.value = false
if (res.code === 1000) {
let data = res.data
deploymentId.value=data.deploymentId
processInstanceData.value = data
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
})
}
})
}
init()
</script>
<style scoped>