From e648faba6916666758b2a0a1232b8677037a1166 Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Mon, 20 May 2024 17:56:38 +0800
Subject: [PATCH] =?UTF-8?q?fix=20:=20=E9=87=8D=E6=96=B0=E6=8F=90=E4=BA=A4?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=9D=E5=A7=8B=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/project-demand/summary/add.vue | 13 ++-
src/views/project-demand/summary/index.vue | 7 +-
.../project-management/filing/conclusion.vue | 84 ++++++++++++++--
src/views/project-management/filing/index.vue | 18 +++-
.../implementation/check.vue | 99 ++++++++++++++++---
.../implementation/index.vue | 16 ++-
.../project-management/initiation/apply.vue | 83 ++++++++++++----
.../project-management/initiation/index.vue | 10 +-
8 files changed, 270 insertions(+), 60 deletions(-)
diff --git a/src/views/project-demand/summary/add.vue b/src/views/project-demand/summary/add.vue
index f8f0ebf..089ce6f 100644
--- a/src/views/project-demand/summary/add.vue
+++ b/src/views/project-demand/summary/add.vue
@@ -221,7 +221,7 @@
+ @getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Summary/edit'"/>
@@ -250,13 +250,13 @@ const cacheStore = useCacheStore()
const processStore = useProcessStore()
const router = useRouter()
const route = useRoute()
+const attachment = ref()
const name=ref(router.currentRoute.value.name)
const loading = ref(false)
const processDiagramViewer = ref(false)
const tagsViewStore = useTagsView()
const companyOption = ref([])
const summaryForm = ref()
-const attachment = ref()
const deploymentId = ref()
const showTable = ref(true)
const otherFileList = ref([])
@@ -412,6 +412,7 @@ const handleResubmit = () => {
fileArray.forEach(item => {
otherFiles.push(getFileParam(item))
})
+ //todo requirementId
let params={
...formData.value,
deploymentId: deploymentId.value,
@@ -421,14 +422,16 @@ const handleResubmit = () => {
}
console.log('重新提交params',params)
resubmitReported(params).then(res => {
+ ElNotification({
+ title: '提示',
+ message: res.msg,
+ type: res.code === 1000 ? 'success' : 'error'
+ })
if (res.code === 1000) {
- ElMessage.success(res.msg)
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
router.push({
name: 'Summary'
})
- } else {
- ElMessage.error(res.msg)
}
})
}
diff --git a/src/views/project-demand/summary/index.vue b/src/views/project-demand/summary/index.vue
index 3e289f8..5fe891b 100644
--- a/src/views/project-demand/summary/index.vue
+++ b/src/views/project-demand/summary/index.vue
@@ -121,11 +121,11 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
- let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'},{label: '编辑', func: () => handleEdit(row), type: 'primary'},{label: '上报', func: () => handleAdd(row), type: 'primary'}]
+ let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
// if (row.state === '3') {
- // btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
+ btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
// } else if (row.state === '0') {
- // btn.push({label: '上报', func: () => handleAdd(row), type: 'primary'})
+ btn.push({label: '上报', func: () => handleAdd(row), type: 'primary'})
// }
return (
@@ -169,7 +169,6 @@ const handleAdd = (row) => {
router.push({
name: 'Summary/add',
query: {
- isAdd: 1,
id:row.requirementId
}
})
diff --git a/src/views/project-management/filing/conclusion.vue b/src/views/project-management/filing/conclusion.vue
index 99130e3..116ae89 100644
--- a/src/views/project-management/filing/conclusion.vue
+++ b/src/views/project-management/filing/conclusion.vue
@@ -2,9 +2,9 @@
-
+ @getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Filing/edit'"/>
@@ -12,6 +12,7 @@
提交
+ 重新提交
@@ -23,12 +24,16 @@ import {downloadFile} from "@/api/project-demand";
import {ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js';
import {getProjectConclusionProcess, projectConclusion} from "@/api/project-manage";
-
+const router = useRouter()
+const route = useRoute()
const tagsViewStore = useTagsView()
const formData = ref({})
const rules = reactive({
attachment: [{required: true, message: '请上传项目结项附件', trigger: 'blur'}],
})
+const attachment = ref()
+const name=ref(router.currentRoute.value.name)
+const loading = ref(false)
const file = ref({})
const applyForm = ref()
const deploymentId = ref()
@@ -37,8 +42,6 @@ const otherFileList = ref([])
const processInstanceData = ref()
const processDiagramViewer = ref(true)
const processStore = useProcessStore()
-const router = useRouter()
-const route = useRoute()
const tableConfig = reactive({
columns: [
{
@@ -90,7 +93,7 @@ const handleDownload = (row) => {
}
const compositeParam = (item) => {
let tag = ''
- if (router.currentRoute.value.name === 'Filing/conclusion') {
+ if (name.value === 'Filing/conclusion'||name.value === 'Filing/edit') {
tag = '项目结项'
}
return {
@@ -99,7 +102,6 @@ const compositeParam = (item) => {
originalFileName: item.originalFilename,
fileType: item.fileType,
url: item.url,
- processNodeTag: null,
tag: tag
}
}
@@ -119,8 +121,7 @@ const getOtherFile = (val) => {
const getFileParam = (item) => {
return {
- fileId: item.fileId,
- type: item.type
+ fileId: item.fileId
}
}
const handleSubmit = (instance) => {
@@ -165,6 +166,62 @@ const handleSubmit = (instance) => {
}
})
}
+const handleResubmit = () => {
+ let singleFile = {}
+ let otherFiles = []
+ let fileArray
+ if(name.value === 'Filing/edit'){
+ singleFile = {
+ fileId: attachment.value.singleFile.fileId
+ }
+ fileArray=attachment.value.allFileList
+ }else {
+ if (file.value.fileId !== undefined) {
+ singleFile = {
+ fileId: file.value.fileId
+ }
+ }
+ fileArray=otherFileList.value
+ }
+ fileArray.forEach(item => {
+ otherFiles.push(getFileParam(item))
+ })
+ //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: '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
+ // }
+ // })
+}
const init = () => {
getProjectConclusionProcess().then(res => {
processDiagramViewer.value = false
@@ -184,7 +241,14 @@ const init = () => {
}
})
}
-init()
+onMounted(async () => {
+ loading.value=true
+ await init()
+ if (route.query.projectId) {
+ await getDetailInfo()
+ }
+
+})