From 3f7de153da7345d3b862e5c9fa4ec4c2b83a5f41 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Tue, 11 Jun 2024 18:47:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=AB=8B=E9=A1=B9/=E9=AA=8C=E6=94=B6=E5=89=8D?= =?UTF-8?q?=E7=BD=AE=E6=B5=81=E7=A8=8B=E5=B1=95=E7=A4=BA=E5=8F=8A=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E9=83=A8=E5=88=86=E9=A1=B5=E9=9D=A2=E5=88=86=E9=A1=B5?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AttachmentUpload.vue | 6 +- .../DetailComponent/ApprovalDetail.vue | 22 ++- .../DetailComponent/ProjectApply.vue | 130 ++++++++++++------ .../implementation/detail.vue | 1 + src/views/rapid/regular/index.vue | 4 +- src/views/rapid/source/index.vue | 4 +- src/views/system/config/index.vue | 4 +- src/views/workflow/about/index.vue | 4 +- src/views/workflow/approve/index.vue | 4 +- src/views/workflow/initiated/index.vue | 4 +- src/views/workflow/listen/index.vue | 4 +- src/views/workflow/process/ProcessEdit.vue | 4 +- src/views/workflow/process/index.vue | 4 +- src/views/workflow/task/index.vue | 4 +- 14 files changed, 135 insertions(+), 64 deletions(-) diff --git a/src/components/AttachmentUpload.vue b/src/components/AttachmentUpload.vue index 0dc29f1..34c444e 100644 --- a/src/components/AttachmentUpload.vue +++ b/src/components/AttachmentUpload.vue @@ -7,9 +7,9 @@ {{ singleFile ? singleFile?.originalFileName : formData.singleFile?.originalFileName }} - 删除 + 删除 - @@ -66,18 +71,19 @@ import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.v import {ElNotification} from "element-plus"; import { getApplyProcess, - projectApply, - resubmitApply, + getPreProcess, getProjectCheckProcess, + getProjectConclusionProcess, + projectApply, projectCheck, - resubmitCheck, projectConclusion, - resubmitConclusion, - getProjectConclusionProcess + resubmitApply, + resubmitCheck, + resubmitConclusion } from "@/api/project-manage"; import {useProcessStore} from '@/stores/processStore.js'; import {useTagsView} from '@/stores/tagsview.js' -import {getPreProcess} from "@/api/project-manage"; +import Paging from "@/components/pagination/index.vue"; const router = useRouter() const route = useRoute() @@ -110,21 +116,28 @@ const props = defineProps({ }) const preProcessList = ref([]) //暂存数据 -const currentList=ref([]) -const searchPreProcess = ref({ - requestName:'' +const currentList = ref([]) +const total = ref(0) +const preProcessForm = reactive({ + requestName: '' }) const pageInfo = reactive({ pageNum: 1, pageSize: 10, }) const rules = reactive({ - // requirementName: [{required: true, message: '请选择前置流程', trigger: 'blur'}], + requestName: [{required: true, message: '请选择前置流程', trigger: 'blur'}], }) const tagsViewStore = useTagsView() const processStore = useProcessStore() const otherFileList = ref([]) -const localFormData = ref({}) +const localFormData = ref({ + preProcess: { + requestId: null, + requestName: '', + baseUrl: '' + } +}) const attachment = ref() const showPreTable = ref(false) const showTable = ref(true) @@ -133,19 +146,55 @@ const processDiagramViewer = ref(false) const name = ref(router.currentRoute.value.name) const deploymentId = ref() const projectId = ref(route.query.projectId) +const searchPreProcess = () => { + getPreProcessList() + +} +const handleReset = () => { + preProcessForm.requestName = '' + getPreProcessList() +} const handleShowPreTable = () => { showPreTable.value = true + getPreProcessList() } const getPreProcessList = () => { - // loading.value=true + loading.value = true getPreProcess().then(res => { - console.log('浅灰的', res) - // loading.value=false - // baseUrl.value=res.data.baseUrl - // currentList.value=res.data - preProcessList.value = res.data.slice(0,10) + loading.value = false + let searchArray = [] + let regexPattern = ("%" + preProcessForm.requestName + "%").replace(/%/g, '.*').replace(/_/g, '.'); + let regex = new RegExp('^' + regexPattern + '$'); + res.data.filter((item) => { + if (regex.test(item.requestName)) { + searchArray.push(item) + } + }) + total.value = searchArray.length + currentList.value = searchArray + preProcessList.value = currentList.value.slice(0, 10) }) } +const chooseProProcess = (item) => { + localFormData.value.preProcess = { + requestId: item.requestId, + requestName: item.requestName, + baseUrl: item.baseUrl + } + showPreTable.value = false +} + +//切换每页显示条数 +const handleSizeChange = (val) => { + pageInfo.pageSize = val; + preProcessList.value = currentList.value.slice((pageInfo.pageNum - 1) * val, pageInfo.pageNum * val) +}; + +//点击页码进行分页功能 +const handleCurrentChange = (val) => { + pageInfo.pageNum = val; + preProcessList.value = currentList.value.slice((val - 1) * pageInfo.pageSize, val * pageInfo.pageSize) +}; const getTitleName = (type) => { switch (type) { case 'apply': @@ -190,9 +239,13 @@ const getFileParam = (item) => { } } const handleSubmit = async () => { - // if (!formRef.value) return - // formRef.value.validate(async (valid) => { - // if (!valid) return + if (localFormData.value.preProcess === undefined) { + ElNotification({ + title: '提示', + message: '请选择前置流程', + type: 'error' + }) + } let files = [] if (props.mode === 'resubmit') { attachment.value.allFileList.forEach(item => { @@ -207,9 +260,9 @@ const handleSubmit = async () => { // localFormData.value.singleFile = getFileParam(localFormData.value.singleFile) // } console.log('attachment.value.singleFile', attachment.value, attachment.value.singleFile) - if (localFormData.value.singleFile) { - - } else { + // if (localFormData.value.singleFile) { + // + // } else { if (attachment.value.singleFile == null) { attachment.value.validate() ElNotification({ @@ -221,14 +274,15 @@ const handleSubmit = async () => { } else { attachment.value.clearValidate() } - } + // } let params = { deploymentId: deploymentId.value, requirementId: route.query.id, fileList: files, - singleFile: localFormData.value.singleFile, + singleFile: attachment.value.singleFile, projectId: projectId.value, + preProcess: JSON.stringify(localFormData.value.preProcess) } console.log('params', params) let res @@ -272,7 +326,6 @@ const handleSubmit = async () => { }) } } - // }) } const init = async () => { let id = projectId.value @@ -311,7 +364,6 @@ watchEffect(() => { return Object.keys(props.formData).length && (localFormData.value = props.formData) }) -getPreProcessList() onMounted(async () => { await init() }) diff --git a/src/views/project-management/implementation/detail.vue b/src/views/project-management/implementation/detail.vue index dafc23d..3a23cd6 100644 --- a/src/views/project-management/implementation/detail.vue +++ b/src/views/project-management/implementation/detail.vue @@ -82,6 +82,7 @@ const getAllInfo = async (state) => { commonProvessViewer.value = false const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state) if (code === 1000) { + data.formData.preProcess = data.formData.preProcess ? JSON.parse(data.formData.preProcess) : undefined detailData.value = data mode.value = data.formData.mode processStore.setDesign(data) diff --git a/src/views/rapid/regular/index.vue b/src/views/rapid/regular/index.vue index 8bdd0b8..afa5ebc 100644 --- a/src/views/rapid/regular/index.vue +++ b/src/views/rapid/regular/index.vue @@ -269,13 +269,13 @@ const handleSelect = async (selection, row) => { //切换每页显示条数 const handleSizeChange = async (val) => { - pageInfo.value.pageSize = val + pageInfo.pageSize = val await getList() } //点击页码进行分页功能 const handleCurrentChange = async (val) => { - pageInfo.value.pageNum = val + pageInfo.pageNum = val await getList() } const handleMoreDelete=(regularId,regularNameList)=>{ diff --git a/src/views/rapid/source/index.vue b/src/views/rapid/source/index.vue index 7cc22ef..5c53de6 100644 --- a/src/views/rapid/source/index.vue +++ b/src/views/rapid/source/index.vue @@ -339,13 +339,13 @@ const handleSelect = async (selection) => { //切换每页显示条数 const handleSizeChange = async (val) => { - pageInfo.value.pageSize = val + pageInfo.pageSize = val await getList() } //点击页码进行分页功能 const handleCurrentChange = async (val) => { - pageInfo.value.pageNum = val + pageInfo.pageNum = val await getList() } const handleMoreDelete = (dsId, sourceNameList) => { diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue index 0b311d8..0f07356 100644 --- a/src/views/system/config/index.vue +++ b/src/views/system/config/index.vue @@ -271,13 +271,13 @@ const handleSelect = async (selection) => { //切换每页显示条数 const handleSizeChange = async (val) => { - pageInfo.value.pageSize = val + pageInfo.pageSize = val await getList() } //点击页码进行分页功能 const handleCurrentChange = async (val) => { - pageInfo.value.pageNum = val + pageInfo.pageNum = val await getList() } const handleMoreDelete = (configId, configName) => { diff --git a/src/views/workflow/about/index.vue b/src/views/workflow/about/index.vue index c415c85..4c05f2e 100644 --- a/src/views/workflow/about/index.vue +++ b/src/views/workflow/about/index.vue @@ -129,13 +129,13 @@ const getList = async () => { //切换每页显示条数 const handleSizeChange = async (val) => { - pageInfo.value.pageSize = val + pageInfo.pageSize = val await getList() } //点击页码进行分页功能 const handleCurrentChange = async (val) => { - pageInfo.value.pageNum = val + pageInfo.pageNum = val await getList() } diff --git a/src/views/workflow/approve/index.vue b/src/views/workflow/approve/index.vue index 3eb9c5b..87679de 100644 --- a/src/views/workflow/approve/index.vue +++ b/src/views/workflow/approve/index.vue @@ -151,13 +151,13 @@ const getList = async () => { } //切换每页显示条数 const handleSizeChange = async (val) => { - pageInfo.value.pageSize = val + pageInfo.pageSize = val await getList() } //点击页码进行分页功能 const handleCurrentChange = async (val) => { - pageInfo.value.pageNum = val + pageInfo.pageNum = val await getList() } diff --git a/src/views/workflow/initiated/index.vue b/src/views/workflow/initiated/index.vue index 0d5086f..7214352 100644 --- a/src/views/workflow/initiated/index.vue +++ b/src/views/workflow/initiated/index.vue @@ -131,13 +131,13 @@ const getList = async () => { //切换每页显示条数 const handleSizeChange = async (val) => { - pageInfo.value.pageSize = val + pageInfo.pageSize = val await getList() } //点击页码进行分页功能 const handleCurrentChange = async (val) => { - pageInfo.value.pageNum = val + pageInfo.pageNum = val await getList() } diff --git a/src/views/workflow/listen/index.vue b/src/views/workflow/listen/index.vue index 0c3b274..bc1e942 100644 --- a/src/views/workflow/listen/index.vue +++ b/src/views/workflow/listen/index.vue @@ -308,13 +308,13 @@ const handleSelect = async (selection) => { //切换每页显示条数 const handleSizeChange = async (val) => { - pageInfo.value.pageSize = val + pageInfo.pageSize = val await getList() } //点击页码进行分页功能 const handleCurrentChange = async (val) => { - pageInfo.value.pageNum = val + pageInfo.pageNum = val await getList() } const handleMoreDelete=(listenId,listenNameList)=>{ diff --git a/src/views/workflow/process/ProcessEdit.vue b/src/views/workflow/process/ProcessEdit.vue index ba89649..02854ee 100644 --- a/src/views/workflow/process/ProcessEdit.vue +++ b/src/views/workflow/process/ProcessEdit.vue @@ -77,7 +77,7 @@ const timer = ref(null) const validComponents = ref(['processSetting', 'processDesign']) // const activeSelect = ref('formDesign') // const activeSelect = ref('processSetting') -const activeSelect = ref('processDesign') +const activeSelect = ref('processSetting') const validVisible = ref(false) const validStep = ref(0) const validResult = ref({}) @@ -88,7 +88,7 @@ const validOptions = ref([ // {title: '扩展设置', description: '', icon: '', status: ''} ]) onActivated(()=>{ - activeSelect.value = 'processDesign' + activeSelect.value = 'processSetting' init() }) diff --git a/src/views/workflow/process/index.vue b/src/views/workflow/process/index.vue index 3c4314e..bc1f3c9 100644 --- a/src/views/workflow/process/index.vue +++ b/src/views/workflow/process/index.vue @@ -255,13 +255,13 @@ const handleSelect = async (selection, row) => { //切换每页显示条数 const handleSizeChange = async (val) => { - pageInfo.value.pageSize = val + pageInfo.pageSize = val await getList() } //点击页码进行分页功能 const handleCurrentChange = async (val) => { - pageInfo.value.pageNum = val + pageInfo.pageNum = val await getList() } diff --git a/src/views/workflow/task/index.vue b/src/views/workflow/task/index.vue index 58f11c4..2d10689 100644 --- a/src/views/workflow/task/index.vue +++ b/src/views/workflow/task/index.vue @@ -115,13 +115,13 @@ const getList = async () => { //切换每页显示条数 const handleSizeChange = async (val) => { - pageInfo.value.pageSize = val + pageInfo.pageSize = val await getList() } //点击页码进行分页功能 const handleCurrentChange = async (val) => { - pageInfo.value.pageNum = val + pageInfo.pageNum = val await getList() } From b425e709aab4ebfaf2812f7780301685e3f386f6 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Tue, 11 Jun 2024 19:16:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=9B=BE=E5=88=87=E6=8D=A2=E5=8A=9F=E8=83=BD=E5=8F=8A?= =?UTF-8?q?=E4=BF=AE=E6=94=B9"=E7=A0=94=E5=8F=91=E9=98=B6=E6=AE=B5"?= =?UTF-8?q?=E6=96=87=E5=AD=97=E4=B8=BA=E9=A1=B9=E7=9B=AE=E9=98=B6=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/index.scss | 27 +++++++++++++++++++ .../DetailComponent/ApprovalDetail.vue | 16 ++++++++--- .../DetailComponent/CollectionDetail.vue | 26 +++++++++--------- .../DetailComponent/ProjectApply.vue | 16 ++++++++--- .../DetailComponent/SpecialFundDetail.vue | 17 +++++++++--- .../DetailComponent/SummaryDetail.vue | 16 ++++++++--- src/views/expense-management/ledger/index.vue | 9 ++++--- src/views/expense-management/share/detail.vue | 16 ++++++++--- src/views/expense-management/share/index.vue | 1 + .../implementation/account.vue | 6 ++--- .../implementation/index.vue | 2 +- .../implementation/uploadFee.vue | 6 ++--- src/views/special-fund/index.vue | 1 + 13 files changed, 122 insertions(+), 37 deletions(-) diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index c14453a..f3a4f35 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -549,3 +549,30 @@ html, body, #app, .el-container, .el-aside, .el-main { right: 15px; z-index: 5; } + +.approval-record { + padding-bottom: 30px; + position: relative; + .approval-title { + display: flex; + align-items: center; + justify-content: space-between; + + .diagram { + display: flex; + align-items: center; + + .base-title { + margin-right: 10px; + } + + //.el-switch { + // margin-left: 15px; + //} + } + } + + .process { + position: relative; + } +} diff --git a/src/components/DetailComponent/ApprovalDetail.vue b/src/components/DetailComponent/ApprovalDetail.vue index 7ac949b..34d2dd8 100644 --- a/src/components/DetailComponent/ApprovalDetail.vue +++ b/src/components/DetailComponent/ApprovalDetail.vue @@ -18,11 +18,20 @@
- +
+ +
+
流程图
+ +
+
- - +
@@ -34,6 +43,7 @@ import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.v import {ElLoading} from 'element-plus'; import {downloadFile} from "@/api/project-demand"; +const changeDiagram = ref(false) const props = defineProps({ formData: { type: Object, diff --git a/src/components/DetailComponent/CollectionDetail.vue b/src/components/DetailComponent/CollectionDetail.vue index e9f01a2..6d41fc5 100644 --- a/src/components/DetailComponent/CollectionDetail.vue +++ b/src/components/DetailComponent/CollectionDetail.vue @@ -57,11 +57,21 @@
- +
+ +
+
流程图
+ +
+
- - +
@@ -108,7 +118,7 @@ const props = defineProps({ default: '' } }) - +const changeDiagram = ref(false) const _value = computed({ get() { return props.value; @@ -142,12 +152,4 @@ watch(() => props.processViewer, (newVal) => { :deep(.el-empty__description) { margin-top: 0; } - -.approval-record { - padding-bottom: 30px; - - .process { - position: relative; - } -} diff --git a/src/components/DetailComponent/ProjectApply.vue b/src/components/DetailComponent/ProjectApply.vue index fd9c177..c882e7a 100644 --- a/src/components/DetailComponent/ProjectApply.vue +++ b/src/components/DetailComponent/ProjectApply.vue @@ -18,15 +18,24 @@ @getAttachment="getAttachment" @getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData" :preview="mode == 'resubmit'"/> -
- +
+
+ +
+
流程图
+ +
+
- +
提交 @@ -87,6 +96,7 @@ import Paging from "@/components/pagination/index.vue"; const router = useRouter() const route = useRoute() +const changeDiagram = ref(false) const emit = defineEmits(["getAttachment", "getOtherFile"]) const props = defineProps({ title: { diff --git a/src/components/DetailComponent/SpecialFundDetail.vue b/src/components/DetailComponent/SpecialFundDetail.vue index 7806e87..56e523f 100644 --- a/src/components/DetailComponent/SpecialFundDetail.vue +++ b/src/components/DetailComponent/SpecialFundDetail.vue @@ -64,11 +64,21 @@
- +
+ +
+
流程图
+ +
+
- - +
@@ -83,6 +93,7 @@ import OperationRender from '@/views/workflow/common/OperationRender.vue' import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue' import {downloadFile} from "@/api/project-demand"; +const changeDiagram = ref(false) const emit = defineEmits(['getInfo', "update:formData"]) const form = ref() diff --git a/src/components/DetailComponent/SummaryDetail.vue b/src/components/DetailComponent/SummaryDetail.vue index 33156ee..9f9ba54 100644 --- a/src/components/DetailComponent/SummaryDetail.vue +++ b/src/components/DetailComponent/SummaryDetail.vue @@ -151,11 +151,20 @@
- +
+ +
+
流程图
+ +
+
- - +
@@ -202,6 +211,7 @@ const props = defineProps({ default: '' } }) +const changeDiagram = ref(false) const localFormData = ref({}) const router = useRouter() const fundOption = ref([]) diff --git a/src/views/expense-management/ledger/index.vue b/src/views/expense-management/ledger/index.vue index 052765b..a9b2a48 100644 --- a/src/views/expense-management/ledger/index.vue +++ b/src/views/expense-management/ledger/index.vue @@ -45,11 +45,11 @@ const searchConfig = reactive([ cacheKey: 'project_cost', } }, { - label: '研发阶段', + label: '项目阶段', prop: 'researchStage', component: shallowRef(fvSelect), props: { - placeholder: '请选择研发阶段查询', + placeholder: '请选择项目阶段查询', clearable: true, filterable: true, checkStrictly: true, @@ -102,6 +102,7 @@ const tableConfig = reactive({ prop: 'projectCost', label: '项目费用', align: 'center', + showOverflowTooltip: false, currentRender: ({row, index}) => { if (row.projectCost !== null) { return () @@ -112,8 +113,9 @@ const tableConfig = reactive({ }, { prop: 'researchStage', - label: '研发阶段', + label: '项目阶段', align: 'center', + showOverflowTooltip: false, currentRender: ({row, index}) => { if (row.researchStage&&row.researchStage !== null&&row.researchStage!==undefined) { return () @@ -134,6 +136,7 @@ const tableConfig = reactive({ prop: 'source', label: '来源', align: 'center', + showOverflowTooltip: false, currentRender: ({row, index}) => { if (row.source&&row.source !== null&&row.source!==undefined) { return () diff --git a/src/views/expense-management/share/detail.vue b/src/views/expense-management/share/detail.vue index 37cf93e..a502767 100644 --- a/src/views/expense-management/share/detail.vue +++ b/src/views/expense-management/share/detail.vue @@ -37,11 +37,20 @@
- +
+ +
+
流程图
+ +
+
- - +
@@ -55,6 +64,7 @@ import {ElNotification} from "element-plus"; import {useProcessStore} from '@/stores/processStore.js'; import {getAllocationDetail} from "@/api/expense-manage"; +const changeDiagram = ref(false) const processStore = useProcessStore() const route = useRoute() const shareData = ref({}) diff --git a/src/views/expense-management/share/index.vue b/src/views/expense-management/share/index.vue index 5d4bdaa..b513f9f 100644 --- a/src/views/expense-management/share/index.vue +++ b/src/views/expense-management/share/index.vue @@ -91,6 +91,7 @@ const tableConfig = reactive({ prop: 'oper', label: '操作', align: 'center', + fixed:'right', showOverflowTooltip: false, currentRender: ({row, index}) => { let btn = [] diff --git a/src/views/project-management/implementation/account.vue b/src/views/project-management/implementation/account.vue index 9291a4e..4c19295 100644 --- a/src/views/project-management/implementation/account.vue +++ b/src/views/project-management/implementation/account.vue @@ -69,11 +69,11 @@ const searchConfig = reactive([ cacheKey: 'project_cost', } }, { - label: '研发阶段', + label: '项目阶段', prop: 'researchStage', component: shallowRef(fvSelect), props: { - placeholder: '请选择研发阶段查询', + placeholder: '请选择项目阶段查询', clearable: true, filterable: true, checkStrictly: true, @@ -131,7 +131,7 @@ const tableConfig = reactive({ }, { prop: 'researchStage', - label: '研发阶段', + label: '项目阶段', align: 'center', currentRender: ({row, index}) => { if (row.researchStage&&row.researchStage !== null&&row.researchStage!==undefined) { diff --git a/src/views/project-management/implementation/index.vue b/src/views/project-management/implementation/index.vue index 4065da3..77b68b8 100644 --- a/src/views/project-management/implementation/index.vue +++ b/src/views/project-management/implementation/index.vue @@ -183,7 +183,7 @@ const tableConfig = reactive({ }, { prop: 'researchStage', - label: '研发阶段', + label: '项目阶段', align: 'center', showOverflowTooltip: false, currentRender: ({row, index}) => { diff --git a/src/views/project-management/implementation/uploadFee.vue b/src/views/project-management/implementation/uploadFee.vue index 160e117..f20c103 100644 --- a/src/views/project-management/implementation/uploadFee.vue +++ b/src/views/project-management/implementation/uploadFee.vue @@ -31,10 +31,10 @@ - +