diff --git a/src/api/project-manage/index.js b/src/api/project-manage/index.js index b983f01..37ca9e1 100644 --- a/src/api/project-manage/index.js +++ b/src/api/project-manage/index.js @@ -138,3 +138,10 @@ export const getProjectConclusionProcess = () => { method: "get" }); }; +//获取前置流程 +export const getPreProcess= () => { + return request({ + url: '/workflow/details/pre/process', + method: "get" + }); +}; diff --git a/src/components/DetailComponent/ProjectApply.vue b/src/components/DetailComponent/ProjectApply.vue index 045b9d7..dc4c654 100644 --- a/src/components/DetailComponent/ProjectApply.vue +++ b/src/components/DetailComponent/ProjectApply.vue @@ -4,7 +4,11 @@ - +
点击
+ + + +
@@ -29,6 +33,30 @@ 重新提交 返回 + + + + + + + + + + + + + + + + + + + + + + @@ -49,6 +77,7 @@ import { } from "@/api/project-manage"; import {useProcessStore} from '@/stores/processStore.js'; import {useTagsView} from '@/stores/tagsview.js' +import {getPreProcess} from "@/api/project-manage"; const router = useRouter() const route = useRoute() @@ -73,8 +102,22 @@ const props = defineProps({ formData: { type: Object, default: {} + }, + step: { + type: String, + default: "20" } }) +const preProcessList = ref([]) +//暂存数据 +const currentList=ref([]) +const searchPreProcess = ref({ + requestName:'' +}) +const pageInfo = reactive({ + pageNum: 1, + pageSize: 10, +}) const rules = reactive({ // requirementName: [{required: true, message: '请选择前置流程', trigger: 'blur'}], }) @@ -83,13 +126,26 @@ const processStore = useProcessStore() const otherFileList = ref([]) const localFormData = ref({}) const attachment = ref() +const showPreTable = ref(false) const showTable = ref(true) const loading = ref(false) const processDiagramViewer = ref(false) const name = ref(router.currentRoute.value.name) const deploymentId = ref() const projectId = ref(route.query.projectId) -const step = ref(route.query.step) +const handleShowPreTable = () => { + showPreTable.value = true +} +const getPreProcessList = () => { + // 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) + }) +} const getTitleName = (type) => { switch (type) { case 'apply': @@ -150,10 +206,10 @@ const handleSubmit = async () => { // if (localFormData.value.singleFile !== undefined) { // localFormData.value.singleFile = getFileParam(localFormData.value.singleFile) // } - console.log('attachment.value.singleFile',attachment.value,attachment.value.singleFile) - if(localFormData.value.singleFile){ + console.log('attachment.value.singleFile', attachment.value, attachment.value.singleFile) + if (localFormData.value.singleFile) { - }else { + } else { if (attachment.value.singleFile == null) { attachment.value.validate() ElNotification({ @@ -176,19 +232,19 @@ const handleSubmit = async () => { } console.log('params', params) let res - if (step.value === '20') { + if (props.step === '20') { if (props.mode === 'resubmit') { res = await resubmitApply(params) } else { res = await projectApply(params) } - } else if (step.value === '40') { + } else if (props.step === '40') { if (props.mode === 'resubmit') { res = await resubmitCheck(params) } else { res = await projectCheck(params) } - } else if (step.value === '50') { + } else if (props.step === '50') { if (props.mode === 'resubmit') { res = await resubmitConclusion(params) } else { @@ -202,15 +258,15 @@ const handleSubmit = async () => { }) if (res.code === 1000) { tagsViewStore.delVisitedViews(router.currentRoute.value.path) - if (step.value === '20') { + if (props.step === '20') { await router.push({ name: 'Initiation' }) - } else if (step.value === '40') { + } else if (props.step === '40') { await router.push({ name: 'Implementation' }) - } else if (step.value === '50') { + } else if (props.step === '50') { await router.push({ name: 'Filing' }) @@ -223,11 +279,11 @@ const init = async () => { if (!id) return; processDiagramViewer.value = false let res - if (step.value === '20') { + if (props.step === '20') { res = await getApplyProcess(id) - } else if (step.value === '40') { + } else if (props.step === '40') { res = await getProjectCheckProcess(id) - } else if (step.value === '50') { + } else if (props.step === '50') { res = await getProjectConclusionProcess(id) } if (res.code === 1000) { @@ -255,6 +311,7 @@ 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 527ac2e..dafc23d 100644 --- a/src/views/project-management/implementation/detail.vue +++ b/src/views/project-management/implementation/detail.vue @@ -39,6 +39,7 @@ diff --git a/src/views/workflow/process/index.vue b/src/views/workflow/process/index.vue index 99c3dac..3c4314e 100644 --- a/src/views/workflow/process/index.vue +++ b/src/views/workflow/process/index.vue @@ -18,8 +18,8 @@ 搜索 新增 重置 - 导出 - + +