From 5eb411831a12d1d8f08adf97723319544f4ec00c Mon Sep 17 00:00:00 2001 From: liujun Date: Sun, 7 Apr 2024 10:55:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=8E=A8=E8=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xgf/flow/components/entrust.vue | 1 - src/views/xgf/flow/components/list.vue | 41 +++++++++++++++-------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/views/xgf/flow/components/entrust.vue b/src/views/xgf/flow/components/entrust.vue index 3ed7437..c532295 100644 --- a/src/views/xgf/flow/components/entrust.vue +++ b/src/views/xgf/flow/components/entrust.vue @@ -116,7 +116,6 @@ export default { }, methods: { async init(e) { - console.log(e) this.loading = true this.visible = true this.heirloom = JSON.stringify(e) diff --git a/src/views/xgf/flow/components/list.vue b/src/views/xgf/flow/components/list.vue index c847310..8d7c3b0 100644 --- a/src/views/xgf/flow/components/list.vue +++ b/src/views/xgf/flow/components/list.vue @@ -30,11 +30,14 @@ ref="multipleTable" :data="varList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" + :row-key="getRowKey" + :reserve-selection="true" tooltip-effect="dark" border fit - highlight-current-row> - + highlight-current-row + @select="handleRowSelect"> + @@ -59,13 +62,14 @@
批量同意 + 批量委托
- + @@ -122,7 +126,8 @@ export default { STATUS: '', add: false, // 新增按钮 del: false, // 删除按钮 - edit: false // 修改按钮 + edit: false, // 修改按钮 + selectedRowKeys: [] } }, created() { @@ -131,14 +136,16 @@ export default { this.hasButton() }, methods: { + getRowKey(row) { + return row.XGF_USER_ID + }, + handleRowSelect(rows, row) { + console.log(rows) + this.selectedRowKeys = rows.map(row => row.XGF_USER_ID) + console.log(this.selectedRowKeys) + }, handleSelectWithDifferentStatus(row, rowIndex) { - if (row.STATUS === 0) { - // 不禁用 - return true - } else { - // 禁用 - return false - } + return row.power_flag === '1' && ((row.FLOWS_TYPE === '1' && row.FLOWS_STEP === 1) || (row.FLOWS_TYPE === '2' && row.FLOWS_STEP === 0)) }, getQuery() { if (this.$refs.multipleTable) { @@ -169,10 +176,13 @@ export default { this.listLoading = false this.varList = data.list this.total = data.page.totalResult + }).catch((e) => { + this.listLoading = false }) - .catch((e) => { - this.listLoading = false - }) + }, + updateList() { + this.$refs.multipleTable.clearSelection() + this.getList() }, handleShow(row) { this.$refs.userInfos.init(row) @@ -189,6 +199,9 @@ export default { entrust(row) { this.$refs.entrust.init(row) }, + entrustByBatch() { + this.$refs.entrust.init(this.$refs.multipleTable.selection) + }, getUserInfo(row) { this.$refs.userInfo.init(row) },