From 02cb7ae4d616e943e2b8660044c535db51ef4203 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 27 十一月 2024 16:32:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/projectProcess/components/RunProcess.vue | 42 ++++++++++++++++++++++++------------------
src/views/projectProcess/index.vue | 14 +++++++++-----
2 files changed, 33 insertions(+), 23 deletions(-)
diff --git a/src/views/projectProcess/components/RunProcess.vue b/src/views/projectProcess/components/RunProcess.vue
index 24e17a8..94d5327 100644
--- a/src/views/projectProcess/components/RunProcess.vue
+++ b/src/views/projectProcess/components/RunProcess.vue
@@ -10,7 +10,7 @@
<div>
<div style="display: flex; flex-direction: row; justify-content: center; align-items: center;font-size: 24px">
<div>褰撳墠娴佺▼锛�</div>
- <div v-if="nowProcessId">{{nowProcessName}}</div>
+ <div v-if="nowProcessId">{{selectProcessName}}</div>
<div v-else>鏈粦瀹氭祦绋�</div>
</div>
</div>
@@ -103,43 +103,47 @@
nowProcessId: { // 褰撳墠椤圭洰缁戝畾鐨勬祦绋媔d
required: true,
type: String
- },
- nowProcessName: {
- required: true,
- type: String
}
},
watch: {
// 鐩戝惉鍥炴樉鍊�
- nowProcessId(newVal, oldVal) {
- console.log("浼犲叆鍊硷細", newVal, this.processList)
- this.processList.forEach((item,index) => {
- console.log(item.id, newVal, item.id === newVal)
- if(item.id === newVal){
- console.log("wwwwwww")
- this.selectProcessId = newVal
- this.$nextTick(() => {
- this.$refs.myTable.toggleRowSelection(item);
- })
- }
- })
+ projectInfo: {
+ handler(newVal, oldVal) {
+ console.log("浼犲叆鍊硷細", newVal, this.processList)
+ this.setSelect(this.nowProcessId)
+ },
+ deep: true
}
},
data() {
return {
selectProcessId: '', // 缁勪欢鍐呴儴閫変腑鐨勬祦绋媔d
+ selectProcessName: '', // 缁勪欢鍐呴儴閫変腑鐨勬祦绋媔d
}
},
methods: {
+ setSelect(value) {
+ console.log("璋冪敤鍊硷細", value)
+ this.processList.forEach((item,index) => {
+ console.log(item.id, value, item.id === value)
+ if(item.id === value){
+ this.selectProcessName = item.name
+ this.$nextTick(() => {
+ this.$refs.myTable.toggleRowSelection(item);
+ })
+ }
+ })
+ },
// 瀹炵幇el-table鍗曢��
handleSelectionChange(val) {
console.log(val, "閫変腑")
if (val.length > 1) {
this.$refs.myTable.clearSelection();
- this.$refs.myTable.toggleRowSelection(val.pop());
+ this.$refs.myTable.toggleRowSelection(val[val.length - 1]);
}
if(val.length != 0){
this.selectProcessId = val[val.length - 1].id;
+ console.log("閫変腑id锛�", this.selectProcessId)
}
},
// 鍚姩娴佺▼
@@ -162,6 +166,8 @@
})
},
handleClose() {
+ this.selectProcessId = ""
+ this.selectProcessName = ""
this.$emit("close")
}
}
diff --git a/src/views/projectProcess/index.vue b/src/views/projectProcess/index.vue
index ce1a2f3..af37779 100644
--- a/src/views/projectProcess/index.vue
+++ b/src/views/projectProcess/index.vue
@@ -270,9 +270,8 @@
:currentColumns="columns"
/>
- <RunProcess :show="showRunProcess"
+ <RunProcess ref="runProcess" :show="showRunProcess"
:now-process-id="nowProcessId"
- :now-process-name="nowProcessName"
:project-info="projectRunFrom"
:process-list="processList"
@close="closeRunProcess">
@@ -306,7 +305,6 @@
processList: [],
showRunProcess: false,
nowProcessId: '',
- nowProcessName: '',
isImportOrExport: false,
fileDialogVisible: false,
//鏄惁闇�瑕佹柊澧炴寜閽�(鍌ㄨ搫椤圭洰闇�瑕�)
@@ -390,6 +388,10 @@
},
methods: {
closeRunProcess() {
+ this.projectRunFrom = {
+ projectId: null,
+ projectName: ''
+ }
this.showRunProcess = false
this.getList()
},
@@ -398,10 +400,12 @@
// 鎷垮埌娴佺▼鍒楄〃 TODO 鏍规嵁椤圭洰绫诲瀷鍋氱瓫閫�
getProcessConfigInfoList().then(response => {
this.processList = response.data;
+ this.nowProcessId = row.flowableProcessId;
+ // // 闃叉锛歩d娌″彉涓嶈Е鍙戠洃鍚�
+ // this.$refs.runProcess.setSelect(row.flowableProcessId);
this.projectRunFrom.projectId = row.id;
this.projectRunFrom.projectName = row.projectName;
- this.nowProcessId = row.flowableProcessId;
- this.nowProcessName = row.flowableProcessName;
+
this.showRunProcess = true;
});
},
--
Gitblit v1.8.0