From a3dbb8fe40e06f9abd9718f14aaa7311bddbc150 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 13 二月 2025 21:46:05 +0800
Subject: [PATCH] 除了项目中心,其它项目页面都不显示审核状态
---
src/views/flowable/task/myProcess/detail/index.vue | 82 +++++++++++++++++++++++++++++-----------
1 files changed, 59 insertions(+), 23 deletions(-)
diff --git a/src/views/flowable/task/myProcess/detail/index.vue b/src/views/flowable/task/myProcess/detail/index.vue
index 3bde1b8..ca06721 100644
--- a/src/views/flowable/task/myProcess/detail/index.vue
+++ b/src/views/flowable/task/myProcess/detail/index.vue
@@ -10,39 +10,30 @@
<!--琛ㄥ崟淇℃伅-->
<el-tab-pane label="琛ㄥ崟淇℃伅" name="1">
<!--鍒濆鍖栨祦绋嬪姞杞借〃鍗曚俊鎭�-->
- <el-col :span="16" :offset="4">
+ <el-col :span="16" :offset="4" v-loading="formLoading" class="tab-min-height">
<div v-if="formDataList && formDataList.length > 0">
<div v-for="(formDataObj, index) in formDataList" :key="index" class="form-warp" style="position: relative">
<div v-if="formDataObj.current">
- <!-- 褰撳墠鑺傜偣鍙崗鍚屻�佽浆鍔炵瓑鎿嶄綔 -->
- <div style="position: absolute; top: 4px; right: 4px; display: flex;justify-content: center; align-items: center;">
- <el-button size="small" type="primary" @click="submitForm">纭骞舵彁浜�</el-button>
- <el-button size="small" type="primary" disabled @click="submitForm">鍗忓悓鍔炵悊(鍔熻兘寮�鍙戜腑)</el-button>
- <el-button size="small" type="primary" @click="openDelegation(formDataList[0].beforeNodeName)">杞姙</el-button>
- </div>
- <div style="margin-bottom: 15px;color: #E6A23C">褰撳墠闃舵锛�<span style="color: #409EFF">{{formDataObj.beforeNodeName}}</span></div>
+ <div class="current">褰撳墠闃舵锛�<span>{{formDataObj.beforeNodeName}}</span></div>
</div>
<div v-else-if="formDataList.length > 1">
- <!-- 鍓嶇疆鑺傜偣鍙┏鍥� -->
- <div style="position: absolute; top: 4px; right: 4px">
- <el-button type="danger" size="small" @click="openRejectTask(formDataObj.beforeNodeDefId)">椹� 鍥�</el-button>
- </div>
- <div style="margin-bottom: 15px;color: #E6A23C">鍓嶇疆闃舵锛�<span style="color: #F56C6C">{{formDataObj.beforeNodeName}}</span></div>
+ <div class="before">鍓嶇疆闃舵锛�<span>{{formDataObj.beforeNodeName}}</span></div>
</div>
- <div v-if="formDataObj.formJson !== null && formDataObj.formJson !== ''">
- <v-form-render :form-data="formDataObj.formJson" :ref="'form' + index"/>
+ <div v-if="formDataObj != null && formDataObj.formJsonObj != null">
+ <v-form-render :form-data="formDataObj.formJsonObj.formJson" :ref="'form' + index"/>
</div>
<div v-else>
<el-alert
- title="鑺傜偣鏈粦瀹氳〃鍗�"
+ title="鏈粦瀹氳〃鍗�"
type="warning"
:closable="false"
>
</el-alert>
</div>
<div v-if="formDataList.length <= 1">
+ <div class="before_none">鍓嶇疆闃舵锛�<span>涓嶅瓨鍦ㄥ墠缃樁娈�</span></div>
<el-alert
- title="涓嶅瓨鍦ㄥ墠缃妭鐐�"
+ title="涓嶅瓨鍦ㄥ墠缃樁娈�"
type="warning"
:closable="false"
>
@@ -104,7 +95,9 @@
</el-tab-pane>
<!--娴佺▼鍥�-->
<el-tab-pane label="娴佺▼鍥�" name="3">
- <bpmn-viewer :flowData="flowData" :procInsId="taskForm.procInsId"/>
+ <div class="tab-min-height" v-loading="imgLoading">
+ <bpmn-viewer :flowData="flowData" :procInsId="taskForm.procInsId"/>
+ </div>
</el-tab-pane>
</el-tabs>
</el-card>
@@ -126,6 +119,8 @@
props: {},
data() {
return {
+ formLoading: false, // 鍔犺浇琛ㄥ崟
+ imgLoading: false, // 鍔犺浇娴佺▼鍥�
projectName: '',
flowName: '',
// 妯″瀷xml鏁版嵁
@@ -158,12 +153,14 @@
this.flowName = this.$route.query && this.$route.query.flowName;
// 娴佺▼浠诲姟閲嶈幏鍙栧彉閲忚〃鍗�
this.processVariables( this.taskForm.taskId)
- this.getFlowRecordList(this.taskForm.procInsId, this.taskForm.deployId);
+ this.getFlowRecordList(this.taskForm.procInsId);
},
methods: {
handleClick(tab, event) {
if (tab.name === '3'){
- flowXmlAndNode({procInsId:this.taskForm.procInsId,deployId:this.taskForm.deployId}).then(res => {
+ this.imgLoading = true
+ flowXmlAndNode({processInsId:this.taskForm.procInsId,deployId:this.taskForm.deployId}).then(res => {
+ this.imgLoading = false
this.flowData = res.data;
})
}
@@ -183,9 +180,9 @@
}
},
/** 娴佺▼娴佽浆璁板綍 */
- getFlowRecordList(procInsId, deployId) {
+ getFlowRecordList(procInsId) {
const that = this
- const params = {procInsId: procInsId, deployId: deployId}
+ const params = {procInsId: procInsId}
flowRecord(params).then(res => {
that.flowRecordList = res.data.flowList;
}).catch(res => {
@@ -195,6 +192,7 @@
/** 鑾峰彇娴佺▼鍙橀噺鍐呭 */
processVariables(taskId) {
if (taskId) {
+ this.formLoading = true
// 鎻愪氦娴佺▼鐢宠鏃跺~鍐欑殑琛ㄥ崟瀛樺叆浜嗘祦绋嬪彉閲忎腑鍚庣画浠诲姟澶勭悊鏃堕渶瑕佸睍绀�
flowTaskFormDetail(taskId).then(res => {
this.formDataList = res.data
@@ -203,7 +201,6 @@
this.formDataList.forEach((formDataObj, index) => {
console.log("琛ㄥ崟鏁版嵁鍒楄〃", formDataObj.formJson)
let that = this
- console.log(eval("that.$refs.form" + index)[0])
if (formDataObj.formJsonObj) {
eval("that.$refs.form" + index)[0].setFormJson(formDataObj.formJsonObj.formJson);
@@ -216,6 +213,7 @@
// this.formJson = this.formDataList[0].formJsonObj.formJson
})
}
+ this.formLoading = false
// this.$nextTick(() => {
// // 鍥炴樉琛ㄥ崟
// this.$refs.vFormRef.setFormJson(res.data.formJson);
@@ -283,4 +281,42 @@
margin-bottom: 20px;
box-shadow: rgba(67, 71, 85, 0.27) 0px 0px 0.25em, rgba(90, 125, 188, 0.05) 0px 0.25em 1em;
}
+.before {
+ span {
+ color: #F56C6C
+ }
+ margin-bottom: 15px;
+ color: #E6A23C
+}
+.before_none {
+ span {
+ color: #F56C6C
+ }
+ margin-bottom: 15px;
+ margin-top: 15px;
+ color: #E6A23C
+}
+.reject-but {
+ position: absolute;
+ top: 4px;
+ right: 4px
+}
+.current {
+ span {
+ color: #409EFF
+ }
+ margin-bottom: 15px;
+ color: #E6A23C
+}
+.op-list {
+ position: absolute;
+ top: 4px;
+ right: 4px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+.tab-min-height {
+ min-height: 500px;
+}
</style>
--
Gitblit v1.8.0