From ba614829f008504d2316ba0916db8f3c9af0b563 Mon Sep 17 00:00:00 2001 From: zhiyong.zhou <zhiyong.zhou@highdatas.com> Date: 星期一, 04 三月 2024 15:07:05 +0800 Subject: [PATCH] 删除多余文件 提交 --- src/views/workspace/process/ProcessInstanceTabs.vue | 89 +++++++++++++++++++++++--------------------- 1 files changed, 46 insertions(+), 43 deletions(-) diff --git a/src/views/workspace/process/ProcessInstanceTabs.vue b/src/views/workspace/process/ProcessInstanceTabs.vue index f771776..7a37b1b 100644 --- a/src/views/workspace/process/ProcessInstanceTabs.vue +++ b/src/views/workspace/process/ProcessInstanceTabs.vue @@ -1,18 +1,14 @@ <template> <div class="process-view"> - <div class="process-view__tabs" v-loading="loading"> - <el-tabs type="border-card"> - <el-tab-pane label="娴佺▼鍥�"> - <process-diagram-viewer /> - </el-tab-pane> - </el-tabs> + <process-diagram-viewer /> + </div> </div> </template> <script> -import { getProcessInstanceInfo,getFlowDetail } from "@/api/design"; +import {getFlowDetail, getWorkSetpsByBusinessId} from "@/api/design"; import ProcessDiagramViewer from "@/views/admin/layout/ProcessDiagramViewer"; export default { @@ -21,13 +17,11 @@ return { loading: false, processInstanceId: "", - taskId: "", formData: {}, currentNode: {}, processInfo: "", }; }, - methods: { convertToTreeData(data, parent,index,parentId) { const tempJson = data.find(f => @@ -56,6 +50,7 @@ "staffGroup":tempJson.board_id!=null?"":{"id":tempJson.rule_code,"name":tempJson.name}, } } + //鑺傜偣鏁扮粍鐨勫ぇ灏� 澶т簬褰撳墠寰幆鐨� 璇存槑杩樻湁瀛愰」 缁х画寰幆 if (data.length >index) { let getChildren = this.convertToTreeData(data, parent.children, index+1,parent.children.id) parent.children=getChildren @@ -65,6 +60,43 @@ getProcessInfo() { this.loading = true; let param = {"id": this.processInstanceId} + getWorkSetpsByBusinessId(param).then(rsp => { + let workSetps=rsp.data.data + console.log("workSetps", workSetps) + if(workSetps.length>0){ + let index=-1; + let resultProcess; + let noApprovalArr=workSetps.filter(item=>item.end_time===null); + ////濡傛灉鎵�鏈夎妭鐐归兘娌″鎵� 閭d箞灏卞彇index_no=1鐨刬d涓哄綋鍓嶈繍琛岀殑鑺傜偣 + if(noApprovalArr.length===workSetps.length){ + resultProcess=workSetps.find(item=>item.index_no===1) + }else{ + //鍚﹀垯灏卞彇閬嶅巻鏌ヨ 瀹℃壒鑺傜偣涓嶄负绌� index_no鏈�澶х殑 + workSetps.forEach(item => { + console.log("indexno",item.index_no) + if (item.index_no > index && item.end_time!==null) { + index = item.index_no; + resultProcess = item; + } + }) + } + + console.log("resultProcess", resultProcess) + this.$store.state.runningList .push(resultProcess.approve_step_id) + param.id=resultProcess.approve_id + this.getFlowDetail(param) + }else{ + this.$message.error("鏈煡璇㈠埌瀹℃壒娴佹暟鎹�!") + } + + console.log("workSetps", workSetps) + }).catch(err => { + this.$message.error(err) + }) + + + }, + getFlowDetail(param){ getFlowDetail(param).then(rsp => { let form = rsp.data.data; @@ -92,8 +124,6 @@ "formPerms": [] }, },1,form.id) - this.$store.state.runningList .push(form.id) - form.name=this.$Utils.decode(form.name); form.templateName = form.name @@ -102,11 +132,6 @@ form.notify = ""; form.remark = "澶囨敞璇存槑"; form.isStop = false - form.whoCommit = "[]" - form.whoEdit = "[]" - form.whoExport = "[]" - form.templateId = "Steps-B-Director" - form.formId = "Steps-B-Director" form.processDefinitionId = null this.$store.state.design = form; console.log("this.$store.state.design",this.$store.state.design) @@ -115,34 +140,12 @@ }).catch(err => { this.$message.error(err) }) .finally(() => { - this.loading = false; - }); - // getProcessInstanceInfo(this.processInstanceId, this.taskId) - // .then((rsp) => { - // console.log("娴佺▼璇︽儏", rsp.data); - // const form = { ...rsp.data.result.processTemplates }; - // const currentNode = { ...rsp.data.result?.currentNode }; - // - // form.logo = JSON.parse(form.logo); - // form.settings = JSON.parse(form.settings); - // form.process = JSON.parse(form.process); - // this.$store.state.design = form; - // this.$store.state.endList = rsp.data.result.endList; - // this.$store.state.runningList = rsp.data.result.runningList; - // this.$store.state.noTakeList = rsp.data.result.noTakeList; - // this.$store.state.detailVOList = rsp.data.result.detailVOList; - // - // this.currentNode = currentNode; - // this.form = form; - // }) - // .finally(() => { - // this.loading = false; - // }); - }, + this.loading = false; + }); + } }, beforeMount() { this.processInstanceId = this.$route.query.processInstanceId; - this.taskId = this.$route.query.taskId; }, mounted() { this.getProcessInfo(); @@ -154,8 +157,8 @@ .process-view { padding: 20px; height: 100%; - display: flex; - flex-direction: column; + //display: flex; + //flex-direction: column; box-sizing: border-box; &__header { -- Gitblit v1.8.0