From 04c1175cf86eb49dac8e30b8fc80d253ab46a18f Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Wed, 29 May 2024 21:34:37 +0800
Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E6=8F=90=E4=BA=A4/?=
=?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8F=90=E4=BA=A4=E6=8C=89=E9=92=AE=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/project-demand/requirement/add.vue | 10 +-
src/views/project-demand/summary/add.vue | 10 +-
.../project-management/filing/conclusion.vue | 4 +-
.../implementation/check.vue | 4 +-
.../implementation/uploadFee.vue | 139 ++++++++++--------
.../project-management/initiation/apply.vue | 55 +++----
6 files changed, 116 insertions(+), 106 deletions(-)
diff --git a/src/views/project-demand/requirement/add.vue b/src/views/project-demand/requirement/add.vue
index 0d2df9c..de6c83b 100644
--- a/src/views/project-demand/requirement/add.vue
+++ b/src/views/project-demand/requirement/add.vue
@@ -50,8 +50,8 @@
- 提交
- 重新提交
+ 提交
+ 重新提交
返回
@@ -90,6 +90,7 @@ const formData = ref({
fileList: []
})
const showTinymce = ref(true)
+const routerName = ref(router.currentRoute.value.name)
const processDiagramViewer = ref(false)
const typeOption = ref([
{
@@ -174,11 +175,10 @@ const handleDownload = (row) => {
})
}
const compositeParam = (item) => {
- let name=router.currentRoute.value.name
let tag = ''
- if (!formData.value.collectType && name === 'Requirement/add') {
+ if (!formData.value.collectType && routerName.value === 'Requirement/add') {
tag = '需求征集'
- }else if(name === 'Requirement/edit'){
+ }else if(routerName.value === 'Requirement/edit'){
tag = '需求征集'
}
return {
diff --git a/src/views/project-demand/summary/add.vue b/src/views/project-demand/summary/add.vue
index ec42aa4..e0ed07f 100644
--- a/src/views/project-demand/summary/add.vue
+++ b/src/views/project-demand/summary/add.vue
@@ -4,8 +4,8 @@
-
-
+
+
@@ -227,9 +227,9 @@
- 存为草稿
- 发布
- 重新发布
+ 存为草稿
+ 发布
+ 重新发布
diff --git a/src/views/project-management/filing/conclusion.vue b/src/views/project-management/filing/conclusion.vue
index af87adb..a5374d1 100644
--- a/src/views/project-management/filing/conclusion.vue
+++ b/src/views/project-management/filing/conclusion.vue
@@ -11,8 +11,8 @@
- 提交
- 重新提交
+ 提交
+ 重新提交
diff --git a/src/views/project-management/implementation/check.vue b/src/views/project-management/implementation/check.vue
index 8d2eb12..7a820a2 100644
--- a/src/views/project-management/implementation/check.vue
+++ b/src/views/project-management/implementation/check.vue
@@ -18,8 +18,8 @@
- 提交
- 重新提交
+ 提交
+ 重新提交
diff --git a/src/views/project-management/implementation/uploadFee.vue b/src/views/project-management/implementation/uploadFee.vue
index 3c8fac6..8423f1a 100644
--- a/src/views/project-management/implementation/uploadFee.vue
+++ b/src/views/project-management/implementation/uploadFee.vue
@@ -1,54 +1,58 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 删除
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
添加一行
@@ -67,17 +71,22 @@ import {useRoute} from "vue-router";
const route = useRoute()
const tagsViewStore = useTagsView()
const formData = ref({})
-const tableData = ref([
- {
- projectId: route.query.id,
- projectName: '',
- time: '',
- projectCost: '',
- researchStage: '',
- digest: '',
- afterTax: ''
- }
-])
+const rules = reactive({
+ auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
+})
+const tableForm = reactive({
+ tableData: [
+ {
+ projectId: route.query.id,
+ projectName: '',
+ time: '',
+ projectCost: '',
+ researchStage: '',
+ digest: '',
+ afterTax: ''
+ }
+ ]
+})
const handleAdd = () => {
let row = {
projectId: route.query.id,
@@ -88,18 +97,18 @@ const handleAdd = () => {
digest: '',
afterTax: ''
}
- tableData.value.push(row)
+ tableForm.tableData.push(row)
}
const handleDelete = (index) => {
- tableData.value.splice(index, 1)
+ tableForm.tableData.splice(index, 1)
}
const handleSubmit = (instance) => {
// if (!instance) return
// instance.validate(async (valid) => {
// if (!valid) return
let params = {}
- console.log('params', tableData.value)
- const res = addLedger(tableData.value)
+ console.log('params', tableForm.tableData)
+ const res = addLedger(tableForm.tableData)
ElNotification({
title: '提示',
message: res.msg,
@@ -107,7 +116,7 @@ const handleSubmit = (instance) => {
})
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
- router.push({
+ router.push({
name: 'Implementation'
})
}
diff --git a/src/views/project-management/initiation/apply.vue b/src/views/project-management/initiation/apply.vue
index b35577b..5c1e3b1 100644
--- a/src/views/project-management/initiation/apply.vue
+++ b/src/views/project-management/initiation/apply.vue
@@ -12,14 +12,15 @@
+ @getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
+ :preview="name === 'Initiation/edit'"/>
- 提交
- 重新提交
+ 提交
+ 重新提交
@@ -28,7 +29,7 @@
import {useTagsView} from '@/stores/tagsview.js'
import {ElMessage, ElNotification} from "element-plus";
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
-import {getApplyProcess, projectApply,resubmitApply,getApplyDetail} from "@/api/project-manage";
+import {getApplyProcess, projectApply, resubmitApply, getApplyDetail} from "@/api/project-manage";
import {useProcessStore} from '@/stores/processStore.js';
const tagsViewStore = useTagsView()
@@ -88,10 +89,10 @@ const tableConfig = reactive({
const loading = ref(false)
const processInstanceData = ref()
const processDiagramViewer = ref(true)
-const name=ref(router.currentRoute.value.name)
+const name = ref(router.currentRoute.value.name)
const compositeParam = (item) => {
let tag = ''
- if (name.value === 'Initiation/apply'||name.value === 'Initiation/edit') {
+ if (name.value === 'Initiation/apply' || name.value === 'Initiation/edit') {
tag = '项目立项申请'
}
return {
@@ -100,12 +101,12 @@ const compositeParam = (item) => {
originalFileName: item.originalFilename,
fileType: item.fileType,
url: item.url,
- tag:tag
+ tag: tag
}
}
const getAttachment = (val) => {
console.log('上传文件getAttachment', val)
- file.value=compositeParam(val)
+ file.value = compositeParam(val)
}
const getOtherFile = (val) => {
console.log('上传文件getOtherFile', val)
@@ -125,15 +126,15 @@ const getFileParam = (item) => {
const handleSubmit = (instance) => {
if (!instance) return
instance.validate(async (valid) => {
- if(JSON.stringify(file.value) === "{}"){
+ if (JSON.stringify(file.value) === "{}") {
attachment.value.validate()
- }else {
+ } else {
attachment.value.clearValidate()
}
if (!valid) return
let files = []
- let singleFile={}
- if(file.value.fileId!==undefined){
+ let singleFile = {}
+ if (file.value.fileId !== undefined) {
singleFile = {
fileId: file.value.fileId
}
@@ -146,9 +147,9 @@ const handleSubmit = (instance) => {
requirementId: route.query.id,
fileList: files,
singleFile: singleFile,
- projectId:route.query.projectId,
+ projectId: route.query.projectId,
}
- console.log('params',params)
+ console.log('params', params)
let res = await projectApply(params)
ElNotification({
title: '提示',
@@ -163,27 +164,27 @@ const handleSubmit = (instance) => {
}
})
}
-const handleResubmit =async () => {
+const handleResubmit = async () => {
let files = []
- let singleFile={}
+ let singleFile = {}
let fileArray
- if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
+ 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'){
+ if (attachment.value.singleFile !== null && name.value === 'Initiation/edit') {
singleFile = {
fileId: attachment.value.singleFile.fileId
}
- fileArray=attachment.value.allFileList
- }else {
+ fileArray = attachment.value.allFileList
+ } else {
if (file.value.fileId !== undefined) {
singleFile = {
fileId: file.value.fileId
}
}
- fileArray=otherFileList.value
+ fileArray = otherFileList.value
}
fileArray.forEach(item => {
files.push(getFileParam(item))
@@ -193,9 +194,9 @@ const handleResubmit =async () => {
requirementId: route.query.id,
fileList: files,
singleFile: singleFile,
- projectId:route.query.projectId,
+ projectId: route.query.projectId,
}
- console.log('params',params)
+ console.log('params', params)
let res = await resubmitApply(params)
ElNotification({
title: '提示',
@@ -218,11 +219,11 @@ const getDetailInfo = async () => {
})
if (res.code === 1000) {
formData.value = res.data.formData
- loading.value=false
+ loading.value = false
}
})
}
-const init = () => {
+const init = () => {
getApplyProcess(route.query.projectId).then(res => {
ElNotification({
title: '提示',
@@ -232,7 +233,7 @@ const init = () => {
processDiagramViewer.value = false
if (res.code === 1000) {
let data = res.data
- deploymentId.value=data.deploymentId
+ deploymentId.value = data.deploymentId
processInstanceData.value = data
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
@@ -250,7 +251,7 @@ init()
onMounted(async () => {
await init()
if (name.value === 'Initiation/edit') {
- loading.value=true
+ loading.value = true
await getDetailInfo()
}
})