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/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,21 +80,23 @@ 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() +const changeDiagram = ref(false) const emit = defineEmits(["getAttachment", "getOtherFile"]) const props = defineProps({ title: { @@ -110,21 +126,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 +156,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 +249,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 +270,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 +284,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 +336,6 @@ const handleSubmit = async () => { }) } } - // }) } const init = async () => { let id = projectId.value @@ -311,7 +374,6 @@ watchEffect(() => { return Object.keys(props.formData).length && (localFormData.value = props.formData) }) -getPreProcessList() onMounted(async () => { await init() }) 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/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/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 @@ - +