From 8c9f4f20341274df1c2326a1ce7fbc59770afc65 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期日, 02 三月 2025 23:45:41 +0800
Subject: [PATCH] Merge branch 'dev'
---
src/views/projectProcess/components/RunProcess.vue | 68 ++++++++++++++++++++++++++++++----
1 files changed, 60 insertions(+), 8 deletions(-)
diff --git a/src/views/projectProcess/components/RunProcess.vue b/src/views/projectProcess/components/RunProcess.vue
index 92c6530..49bf79b 100644
--- a/src/views/projectProcess/components/RunProcess.vue
+++ b/src/views/projectProcess/components/RunProcess.vue
@@ -3,7 +3,7 @@
<el-dialog
:title="`娴佺▼鍚姩锛歚 + projectInfo.projectName"
:visible.sync="show"
- width="950px"
+ width="1050px"
:destroy-on-close="true"
:close-on-click-modal="false"
:before-close="handleClose">
@@ -14,7 +14,17 @@
<div v-else>鏈粦瀹氭祦绋�</div>
</div>
</div>
- <div style="margin-top: 20px">
+ <div style="margin-top: 10px">
+ <el-form :inline="true" :model="queryParams" size="small">
+ <el-form-item label="娴佺▼鍚嶇О">
+ <el-input placeholder="娴佺▼鍚嶇О鎼滅储" clearable @clear="search" v-model="queryParams.name"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="search">鎼滅储</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div style="margin-top: 0px">
<el-table
ref="myTable"
:data="processList"
@@ -27,7 +37,14 @@
</el-table-column>
<el-table-column
prop="name"
+ :show-overflow-tooltip="true"
+ min-width="200"
label="娴佺▼鍚嶇О"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="version"
+ label="娴佺▼鐗堟湰"
>
</el-table-column>
<el-table-column
@@ -72,10 +89,18 @@
</template>
</el-table-column>
</el-table>
+ <pagination
+ v-show="total>0"
+ :total="total"
+ :page.sync="queryParams.currentPage"
+ :limit.sync="queryParams.pageSize"
+ :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>
@@ -83,6 +108,7 @@
<script>
import {projectSetProcess, startProcess} from "@/api/projectProcess/projectProcess";
+import {getProcessConfigInfoPage} from "@/api/projectProcess/processConfigInfo";
export default {
dicts: ['sys_project_type', 'sys_funding_type', 'sys_investment_type', 'sys_key_categories'],
@@ -95,10 +121,6 @@
projectInfo: {
required: true, // 椤圭洰id銆佸悕绉�
type: Object
- },
- processList: { // 娴佺▼鍒楄〃
- required: true,
- type: Array
},
nowProcessDefId: { // 褰撳墠椤圭洰缁戝畾鐨勫畾涔塱d
required: true,
@@ -117,18 +139,44 @@
this.setSelect(this.nowProcessDefId)
},
deep: true
+ },
+ processList: {
+ handler(newVal, oldVal) {
+ this.setSelect(this.nowProcessDefId)
+ },
+ deep: true
}
},
data() {
return {
+ startLoading: false,
+ setLoading: false,
+ processList: [],
+ total:0,
+ queryParams: {
+ pageSize: 8,
+ currentPage: 1,
+ name: ""
+ },
selectProcessDefId: '', // 缁勪欢鍐呴儴閫変腑鐨勬祦绋媔d
selectProcessName: '', // 缁勪欢鍐呴儴閫変腑鐨勬祦绋媔d
}
},
created() {
+ this.getList()
console.log(this.nowProcessInsId, typeof this.nowProcessInsId, "wwwww")
},
methods: {
+ search() {
+ this.queryParams.currentPage = 1
+ this.getList()
+ },
+ getList() {
+ getProcessConfigInfoPage(this.queryParams).then(res => {
+ this.processList = res.data;
+ this.total = res.total
+ });
+ },
setSelect(value) {
console.log("璋冪敤鍊硷細", value)
this.processList.forEach((item,index) => {
@@ -155,8 +203,10 @@
},
// 鍚姩娴佺▼
startProcess() {
+ this.startLoading = true
startProcess(this.projectInfo.projectId, this.selectProcessDefId).then(res => {
this.$message.success(res.msg);
+ this.startLoading = false
this.handleClose()
})
},
@@ -170,8 +220,10 @@
projectId: this.projectInfo.projectId,
processDefId: this.selectProcessDefId
}
+ this.setLoading = true
projectSetProcess(data).then(res => {
this.$message.success("鍙樻洿鎴愬姛")
+ this.setLoading = false
this.handleClose()
})
},
--
Gitblit v1.8.0