From 31d78dd4e988cfce8f0a16678f2041849cc0dce3 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 06 六月 2025 18:07:52 +0800 Subject: [PATCH] 工作台 --- src/views/projectProcess/components/RunProcess.vue | 30 +++++++++++++++++++++--------- 1 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/views/projectProcess/components/RunProcess.vue b/src/views/projectProcess/components/RunProcess.vue index 0681311..fe229da 100644 --- a/src/views/projectProcess/components/RunProcess.vue +++ b/src/views/projectProcess/components/RunProcess.vue @@ -94,13 +94,13 @@ :total="total" :page.sync="queryParams.currentPage" :limit.sync="queryParams.pageSize" - page-sizes="8" + :page-sizes="[8]" @pagination="getList" /> </div> <span slot="footer" class="dialog-footer"> - <el-button type="danger" @click="startProcess" :disabled="(nowProcessInsId !== '') || (selectProcessDefId === '')">鍚姩娴佺▼</el-button> - <el-button type="primary" @click="changeProcess" :disabled="((nowProcessDefId === selectProcessDefId) && nowProcessInsId !== '') || selectProcessDefId === '' || nowProcessInsId === ''">娴佺▼鍙樻洿</el-button> + <el-button type="danger" v-loading="startLoading" @click="startProcess" :disabled="(nowProcessInsId !== '') || (selectProcessDefId === '')">鍚姩娴佺▼</el-button> + <el-button type="primary" v-loading="setLoading" @click="changeProcess" :disabled="((nowProcessDefId === selectProcessDefId) && nowProcessInsId !== '') || selectProcessDefId === '' || nowProcessInsId === ''">娴佺▼鍙樻洿</el-button> </span> </el-dialog> </div> @@ -122,10 +122,6 @@ required: true, // 椤圭洰id銆佸悕绉� type: Object }, - // processList: { // 娴佺▼鍒楄〃 - // required: true, - // type: Array - // }, nowProcessDefId: { // 褰撳墠椤圭洰缁戝畾鐨勫畾涔塱d required: true, type: String @@ -134,6 +130,10 @@ required: true, type: String }, + projectType: { + required: true, + type: String + } }, watch: { // 鐩戝惉鍥炴樉鍊� @@ -153,6 +153,8 @@ }, data() { return { + startLoading: false, + setLoading: false, processList: [], total:0, queryParams: { @@ -205,8 +207,15 @@ }, // 鍚姩娴佺▼ startProcess() { - startProcess(this.projectInfo.projectId, this.selectProcessDefId).then(res => { + this.startLoading = true + const data = { + projectId: this.projectInfo.projectId, + processDefId: this.selectProcessDefId, + projectType: this.projectType + } + startProcess(data).then(res => { this.$message.success(res.msg); + this.startLoading = false this.handleClose() }) }, @@ -218,10 +227,13 @@ } const data = { projectId: this.projectInfo.projectId, - processDefId: this.selectProcessDefId + processDefId: this.selectProcessDefId, + projectType: this.projectType } + this.setLoading = true projectSetProcess(data).then(res => { this.$message.success("鍙樻洿鎴愬姛") + this.setLoading = false this.handleClose() }) }, -- Gitblit v1.8.0