From fc0451ca32fe830d6654dbea6920f9477850c389 Mon Sep 17 00:00:00 2001
From: clay <20932067@zju.edu.cn>
Date: Wed, 24 Jul 2024 21:21:36 +0800
Subject: [PATCH] =?UTF-8?q?feat=20:=20=E5=8A=A8=E6=80=81=E5=89=8D=E7=BD=AE?=
=?UTF-8?q?=E6=B5=81=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DetailComponent/ApprovalDetail.vue | 115 ++++++++++--------
src/components/DetailComponent/Opinion.vue | 12 +-
.../DetailComponent/ProjectApply.vue | 16 ---
.../process/config/FormAuthorityConfig.vue | 2 +-
4 files changed, 76 insertions(+), 69 deletions(-)
diff --git a/src/components/DetailComponent/ApprovalDetail.vue b/src/components/DetailComponent/ApprovalDetail.vue
index 205e5e9..3d7c8db 100644
--- a/src/components/DetailComponent/ApprovalDetail.vue
+++ b/src/components/DetailComponent/ApprovalDetail.vue
@@ -63,7 +63,8 @@
-
@@ -184,7 +185,8 @@ const editSingleTableConfig = reactive({
label: '文件名',
align: 'center',
width: 400,
- currentRender: ({row, index}) => (
clickToPreview(row)}>{row.originalFileName}
)
+ currentRender: ({row, index}) => (
+ clickToPreview(row)}>{row.originalFileName}
)
},
{
prop: 'tag',
@@ -233,6 +235,24 @@ const editSingleTableConfig = reactive({
}
]
})
+let preProcess = {
+ label: '前置流程',
+ prop: 'preProcess',
+ colProps: {
+ span: 24
+ },
+ labelWidth: 'left',
+ component: () => (
+
+ {
+ props.formData.preProcess ? props.formData.preProcess.map(item => {
+ return
{item.requestName}
+ }) :
{'--'}
+ }
+
+ )
+}
const schema = computed(() => {
let arr
if (props.type == 'approval') {
@@ -271,7 +291,9 @@ const schema = computed(() => {
)
},
- {
+ ]
+ if (props.preProcessShow == 'EDIT') {
+ preProcess = {
label: '前置流程',
prop: 'preProcess',
colProps: {
@@ -281,33 +303,32 @@ const schema = computed(() => {
component: () => (
{
- props.formData.preProcess ? props.formData.preProcess.map(item => {
- return
{item.requestName}
- }) :
{'--'}
+
}
)
+ }
+ }
+ arr.push(preProcess)
+ arr.push({
+ label: '项目立项附件',
+ prop: 'singleFile',
+ colProps: {
+ span: 24
},
- {
- label: '项目立项附件',
- prop: 'singleFile',
- colProps: {
- span: 24
- },
- labelWidth: 'left',
- component: () => {
- let singleFileArray = [props.formData.singleFile]
- return
-
- }
- },
- ]
+ labelWidth: 'left',
+ component: () => {
+ let singleFileArray = [props.formData.singleFile]
+ return
+
+ }
+ })
} else if (props.type == 'execute') {
- arr = [
- {
+ arr = []
+ if (props.preProcessShow == 'EDIT') {
+ preProcess = {
label: '前置流程',
prop: 'preProcess',
colProps: {
@@ -317,30 +338,28 @@ const schema = computed(() => {
component: () => (
{
- props.formData.preProcess ? props.formData.preProcess.map(item => {
- return
{item.requestName}
- }) :
{'--'}
+
}
)
+ }
+ }
+ arr.push(preProcess)
+ arr.push({
+ label: '项目验收附件',
+ prop: 'singleFile',
+ colProps: {
+ span: 24
},
- {
- label: '项目验收附件',
- prop: 'singleFile',
- colProps: {
- span: 24
- },
- labelWidth: 'left',
- component: () => {
- let singleFileArray = [props.formData.singleFile]
- return
-
- }
- },
- ]
+ labelWidth: 'left',
+ component: () => {
+ let singleFileArray = [props.formData.singleFile]
+ return
+
+ }
+ })
} else if (props.type == 'archivist') {
arr = [
{
@@ -384,7 +403,7 @@ const schema = computed(() => {
const filePreviewParam = ref({
fileUrl: '',
fileName: '',
- fileType: 'pdf'
+ fileType: ''
})
const filePreviewShow = ref(false)
const route = useRoute()
@@ -397,14 +416,14 @@ const _value = computed({
emit("update:value", val);
}
})
-const clickToPreview=(row)=>{
+const clickToPreview = (row) => {
filePreviewShow.value = false
filePreviewParam.value = {
fileUrl: row.url,
fileName: row.originalFileName,
fileType: row.fileType
}
- nextTick(()=>{
+ nextTick(() => {
filePreviewShow.value = true
})
}
diff --git a/src/components/DetailComponent/Opinion.vue b/src/components/DetailComponent/Opinion.vue
index 9b775e6..ca96e5d 100644
--- a/src/components/DetailComponent/Opinion.vue
+++ b/src/components/DetailComponent/Opinion.vue
@@ -141,8 +141,10 @@ const handleReject = async () => {
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
- tagsViewStore.delVisitedViews(router.currentRoute.value.path)
- back()
+ if (res.code === 1000){
+ tagsViewStore.delVisitedViews(router.currentRoute.value.path)
+ back()
+ }
}
const handleAgree = async () => {
@@ -158,8 +160,10 @@ const handleAgree = async () => {
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
- tagsViewStore.delVisitedViews(router.currentRoute.value.path)
- back()
+ if (res.code === 1000){
+ tagsViewStore.delVisitedViews(router.currentRoute.value.path)
+ back()
+ }
}
diff --git a/src/components/DetailComponent/ProjectApply.vue b/src/components/DetailComponent/ProjectApply.vue
index 03f2f25..e21d2f6 100644
--- a/src/components/DetailComponent/ProjectApply.vue
+++ b/src/components/DetailComponent/ProjectApply.vue
@@ -539,22 +539,6 @@ const getFileParam = (item) => {
}
}
const handleSubmit = async () => {
- if (deploymentData.value.deploymentName === '重大项目立项' || deploymentData.value.deploymentName === '重大项目验收') {
- if (localFormData.value.preProcess == undefined) {
- if (JSON.parse(localStorage.getItem('preProcess'))?.length > 0) {
-
- } else {
- ElNotification({
- title: '提示',
- message: '请选择前置流程!',
- type: 'error'
- })
- return;
- }
-
- }
- }
-
let files = []
if (props.mode === 'resubmit') {
attachment.value.allFileList.forEach(item => {
diff --git a/src/views/workflow/process/config/FormAuthorityConfig.vue b/src/views/workflow/process/config/FormAuthorityConfig.vue
index a29044b..9115596 100644
--- a/src/views/workflow/process/config/FormAuthorityConfig.vue
+++ b/src/views/workflow/process/config/FormAuthorityConfig.vue
@@ -104,7 +104,7 @@ const formPermsLoadMosr = (oldPermMap, perms) => {
id: perm.id, //todo ,id 就是字段名称
title: perm.title,
required: perm.required,
- perm: 'H'
+ perm: 'R'
});
}