From f67241a72e48a90cbcca28acbc2ce9aaffdfa43d Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期三, 27 十一月 2024 18:38:41 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/projectProcess/components/RunProcess.vue | 42 ++++++++++++--------- src/components/FileUpload/index.vue | 10 +++- src/views/projectProcess/index.vue | 14 ++++-- 3 files changed, 40 insertions(+), 26 deletions(-) diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index e00f7af..6ae8059 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -153,7 +153,7 @@ // 涓婁紶鎴愬姛鍥炶皟 handleUploadSuccess(res, file) { if (res.code === 200) { - this.uploadList.push({ name: res.fileName, url: res.fileName }); + this.uploadList.push({ name: res.newFileName, originalName: res.originalFilename , url: res.fileName }); this.uploadedSuccessfully(); } else { this.number--; @@ -166,7 +166,9 @@ // 鍒犻櫎鏂囦欢 handleDelete(index) { this.fileList.splice(index, 1); - this.$emit("input", this.listToString(this.fileList)); + // this.$emit("input", this.listToString(this.fileList)); + //淇敼涓鸿繑鍥炴暟缁� + this.$emit("input", this.fileList); }, // 涓婁紶缁撴潫澶勭悊 uploadedSuccessfully() { @@ -174,7 +176,9 @@ this.fileList = this.fileList.concat(this.uploadList); this.uploadList = []; this.number = 0; - this.$emit("input", this.listToString(this.fileList)); + // this.$emit("input", this.listToString(this.fileList)); + //淇敼涓鸿繑鍥炴暟缁� + this.$emit("input", this.fileList); this.$modal.closeLoading(); } }, 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