From c032b2bc602acebec311243e7e2ebeae35f9785c Mon Sep 17 00:00:00 2001 From: qiuhongwu Date: Tue, 20 Feb 2024 16:40:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=8F=91=E8=B4=A7=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BC=96=E5=8F=B7=E5=BC=B9=E6=A1=86=E5=A4=8D?= =?UTF-8?q?=E9=80=89=E6=A1=86=20=E7=82=B9=E5=87=BB=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=A1=8C=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../heli/deliverorder/projectOrderDialog.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/deliverorder/projectOrderDialog.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/deliverorder/projectOrderDialog.vue index f23c3e0a..ba4f84f0 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/deliverorder/projectOrderDialog.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/deliverorder/projectOrderDialog.vue @@ -54,6 +54,8 @@ :show-overflow-tooltip="true" class="hl-table" @selection-change="handleSelectionChange" + @row-click="clickRow" ref="multipleTable" + selection > @@ -155,6 +157,7 @@ import { getIntDictOptions, getStrDictOptions, DICT_TYPE } from '@/utils/dict' import { dateFormatter, dateFormatter2, formatDate } from '@/utils/formatTime' import * as ProjectOrderApi from '@/api/heli/projectorder' import {ref} from "vue"; +import { ElTable } from 'element-plus' import {ProjectOrderVO} from "@/api/heli/projectorder"; const message = useMessage() // 消息弹窗 @@ -230,11 +233,20 @@ const resetQuery = () => { handleQuery() } -const multipleSelection = ref([]) -const handleSelectionChange = (val: ProjectOrderVO[]) => { +const multipleTable = ref>() +const multipleSelection = ref([]) +const handleSelectionChange = (val: []) => { + multipleSelection.value = val } +const clickRow = (row: any) => { + if(row){ + multipleTable.value!.toggleRowSelection(row, undefined) + }else{ + multipleTable.value!.clearSelection() + } +} /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 const submitForm = () => {