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 1/3] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E6=8F=90?= =?UTF-8?q?=E4=BA=A4/=E9=87=8D=E6=96=B0=E6=8F=90=E4=BA=A4=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=98=BE=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 @@ @@ -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() } }) From 94528cfa065a9b8e7d7fb80ea7d82fbbc5403d1d Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Thu, 30 May 2024 16:05:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/project-manage/index.js | 27 ++-- src/views/expense-management/ledger/index.vue | 4 +- src/views/expense-management/share/index.vue | 41 ++--- src/views/project-demand/requirement/add.vue | 6 +- .../project-demand/requirement/index.vue | 2 +- src/views/project-demand/summary/add.vue | 16 +- src/views/project-demand/summary/index.vue | 98 +++++++----- .../project-management/filing/conclusion.vue | 137 ++++++++--------- src/views/project-management/filing/index.vue | 4 +- .../implementation/account.vue | 13 +- .../implementation/attachment.vue | 92 ++++------- .../implementation/index.vue | 4 +- .../implementation/share.vue | 4 +- .../implementation/upload.vue | 100 +++++++++++- .../implementation/uploadFee.vue | 144 +++++++++++------- .../project-management/initiation/index.vue | 13 +- src/views/special-fund/add.vue | 6 +- src/views/special-fund/index.vue | 2 +- 18 files changed, 412 insertions(+), 301 deletions(-) diff --git a/src/api/project-manage/index.js b/src/api/project-manage/index.js index 7826909..d35ab80 100644 --- a/src/api/project-manage/index.js +++ b/src/api/project-manage/index.js @@ -55,13 +55,18 @@ export const getProjectCheckProcess = (projectId) => { method: "get" }); }; -export const getImplementationAttachment = (projectId) => { +export const getImplementationAttachment = (params) => { return request({ - url: '/workflow/mosr/project/implementation/tags', + url: '/workflow/mosr/project/implementation/attachments', method: "get", - params:{ - projectId:projectId - } + params:params + }); +}; +export const uploadAttachment= (data) => { + return request({ + url: '/workflow/mosr/project/implementation/upload', + method: "post", + data: data }); }; export const addLedger = (data) => { @@ -99,15 +104,3 @@ export const getProjectConclusionProcess = () => { method: "get" }); }; - -//文件查询 -export const searchFile = (targetId,tag) => { - return request({ - url: '/workflow/process/file/query', - method: "get", - params:{ - targetId:targetId, - tag:tag - } - }); -}; diff --git a/src/views/expense-management/ledger/index.vue b/src/views/expense-management/ledger/index.vue index 7966eb8..fb0a6f8 100644 --- a/src/views/expense-management/ledger/index.vue +++ b/src/views/expense-management/ledger/index.vue @@ -12,11 +12,11 @@ const router = useRouter() const route = useRoute() const searchConfig = reactive([ { - label: '名称', + label: '需求名称', prop: 'requirementName', component: 'el-input', props: { - placeholder: '请输入名称查询', + placeholder: '请输入需求名称查询', clearable: true, filterable: true, checkStrictly: true diff --git a/src/views/expense-management/share/index.vue b/src/views/expense-management/share/index.vue index 1120d54..dc44199 100644 --- a/src/views/expense-management/share/index.vue +++ b/src/views/expense-management/share/index.vue @@ -11,11 +11,11 @@ const router = useRouter(); const searchConfig = reactive([ { - label: '名称', + label: '项目名称', prop: 'projectName', component: 'el-input', props: { - placeholder: '请输入名称查询', + placeholder: '请输入项目名称查询', clearable: true, filterable: true, checkStrictly: true @@ -36,17 +36,17 @@ const tableIns = ref() const tableConfig = reactive({ columns: [ { - prop: 'requirementName', + prop: 'shareName', label: '分摊名称', align: 'center' }, { - prop: 'collectType', + prop: 'apportionmentMonth', label: '分摊月份', align: 'center' }, { - prop: 'deadline', + prop: 'generationTime', label: '生成时间', align: 'center' }, @@ -54,9 +54,8 @@ const tableConfig = reactive({ prop: 'state', label: '状态', align: 'center', - width: 200, showOverflowTooltip: false, - currentRender: ({row, index}) => () + currentRender: ({row, index}) => () }, { prop: 'oper', @@ -65,22 +64,25 @@ const tableConfig = reactive({ showOverflowTooltip: false, currentRender: ({row, index}) => { let btn = [] - let buttons = new Set(Array.from(row.buttons)) - if (buttons.has("details")) { + let buttons + if(row.buttons){ + buttons = new Set(Array.from(row.buttons)) + } + // if (buttons.has("details")) { btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'}) - } - if (buttons.has("edit")) { + // } + // if (buttons.has("edit")) { btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'}) - } + // } // if (buttons.has("delete")) { // btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'}) // } - if (buttons.has("report")) { + // if (buttons.has("report")) { btn.push({label: '明细导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'}) - } - if (buttons.has("report")) { + // } + // if (buttons.has("report")) { btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'}) - } + // } return (
{ @@ -96,17 +98,18 @@ const tableConfig = reactive({ )) } { - buttons.has("delete") ? + // buttons.has("delete") ? handleDelete(row)}/> : '' + onDelete={() => handleDelete(row)}/> + // : '' }
) } } ], - api: '', + api: '/workflow/mosr/cost/allocation', btns: [ {name: '添加分摊', key: 'add', color: '#DED0B2'} ], diff --git a/src/views/project-demand/requirement/add.vue b/src/views/project-demand/requirement/add.vue index de6c83b..8c9c1a6 100644 --- a/src/views/project-demand/requirement/add.vue +++ b/src/views/project-demand/requirement/add.vue @@ -2,8 +2,8 @@
- - + + - - + {{item.label}} - - + {{item.label}} @@ -259,11 +261,11 @@ const showTable = ref(true) const otherFileList = ref([]) const file = ref({}) const formData = ref({ - industryUniversityResearch:0, - governmentDeclaration:0, + industryUniversityResearch:'0', + governmentDeclaration:'0', }) const rules = reactive({ - projectName: [{required: true, message: '请输入名称', trigger: 'blur'}], + projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}], specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}], startTime: [{required: true, message: '请选择开始时间', trigger: 'blur'}], rdSubject: [{required: true, message: '请输入研发主体', trigger: 'blur'}], diff --git a/src/views/project-demand/summary/index.vue b/src/views/project-demand/summary/index.vue index fad2ccc..94a39fa 100644 --- a/src/views/project-demand/summary/index.vue +++ b/src/views/project-demand/summary/index.vue @@ -7,7 +7,6 @@ import {reactive, ref, shallowRef} from 'vue'; import fvSelect from '@/fvcomponents/fvSelect/index.vue' import {useRouter} from 'vue-router'; - const localData = reactive({}) const tableIns = ref() @@ -16,10 +15,12 @@ const router = useRouter() const searchConfig = reactive([ { - label: '名称', + label: '需求名称', prop: 'requirementName', props: { - placeholder: '请输入' + placeholder: '请输入需求名称', + clearable: true, + checkStrictly: true }, component: 'el-input', colProps: {} @@ -28,42 +29,52 @@ const searchConfig = reactive([ label: '项目类型', prop: 'projectType', component: shallowRef(fvSelect), - props: {}, + props: { + placeholder: '请选择项目类型', + cacheKey: 'project_type', + clearable: true, + filterable: true, + }, colProps: {} }, { label: '研发主体', prop: 'productMainBody', component: shallowRef(fvSelect), - props: {}, - colProps: {} - }, - { - label: '项目影响', - prop: 'projectEffect', - component: shallowRef(fvSelect), - props: {}, - colProps: {} - }, - { - label: '起止时间', - prop: 'startTime', - component: 'el-date-picker', - props: {}, - colProps: {} - }, - { - label: '最小金额', - prop: 'minMoney', - component: 'el-input', - colProps: {} - }, - { - label: '最大金额', - prop: 'maxMoney', - component: 'el-input', + props: { + placeholder: '请选择研发主体', + cacheKey: 'rd_subject', + clearable: true, + filterable: true + }, colProps: {} }, + // { + // label: '项目影响', + // prop: 'projectEffect', + // component: shallowRef(fvSelect), + // props: {}, + // colProps: {} + // }, + // { + // label: '起止时间', + // prop: 'startTime', + // component: 'el-date-picker', + // props: {}, + // colProps: {} + // }, + // { + // label: '最小金额', + // prop: 'minMoney', + // component: 'el-input', + // colProps: {} + // }, + // { + // label: '最大金额', + // prop: 'maxMoney', + // component: 'el-input', + // colProps: {} + // }, ]) const tableConfig = reactive({ @@ -100,7 +111,10 @@ const tableConfig = reactive({ { prop: 'startTime', label: '起止时间', - align: 'center' + align: 'center', + currentRender: ({row}) => { + return row.startTime + ' 至 ' + row.endTime + } }, { prop: 'state', @@ -108,7 +122,7 @@ const tableConfig = reactive({ align: 'center', showOverflowTooltip: false, currentRender: ({row, index}) => { - if (row.state !== null&&row.state != 0) { + if (row.state !== null && row.state != 0) { return () } else { return '--' @@ -127,13 +141,13 @@ const tableConfig = reactive({ btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'}) } if (buttons.has("edit")) { - btn.push({label: '编辑',prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'}) + btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'}) } // if (buttons.has("delete")) { // btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'}) // } if (buttons.has("report")) { - btn.push({label: '上报',prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'}) + btn.push({label: '上报', prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'}) } return (
@@ -175,26 +189,26 @@ const search = (val) => { const handleAdd = (row) => { router.push({ - name:'Summary/add', + name: 'Summary/add', query: { - id:row.requirementId + id: row.requirementId } }) } const handleEdit = (row) => { router.push({ - name:'Summary/edit', + name: 'Summary/edit', query: { - id:row.requirementId, - projectId:row.projectId + id: row.requirementId, + projectId: row.projectId } }) } const handleDetail = (row) => { router.push({ - name:'Summary/detail', + name: 'Summary/detail', query: { - id:row.requirementId, + id: row.requirementId, projectId: row.projectId, state: row.state } diff --git a/src/views/project-management/filing/conclusion.vue b/src/views/project-management/filing/conclusion.vue index a5374d1..390e722 100644 --- a/src/views/project-management/filing/conclusion.vue +++ b/src/views/project-management/filing/conclusion.vue @@ -1,17 +1,16 @@