From 6c8c096b7e815bb69bca1a43b0ef624b6e9334eb Mon Sep 17 00:00:00 2001 From: qiuhongwu Date: Tue, 20 Feb 2024 17:07:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BC=96=E5=8F=B7=20=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=A1=8C=E9=80=89=E4=B8=AD=E5=A4=8D=E9=80=89?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/heli/plan/projectOrderDialog.vue | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/plan/projectOrderDialog.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/plan/projectOrderDialog.vue index 10932690..6142d187 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/plan/projectOrderDialog.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/plan/projectOrderDialog.vue @@ -29,7 +29,7 @@ + class="hl-table" @selection-change="handleSelectionChange" @row-click="clickRow" selection> @@ -107,6 +107,8 @@ 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() // 消息弹窗 @@ -182,8 +184,9 @@ const resetQuery = () => { handleQuery() } -const multipleTable = ref() -const multipleSelection = ref([]) +const multipleTable:any = ref>() +const multipleSelection:any = ref([]) + const handleSelectionChange = (val: ProjectOrderVO[]) => { if (val.length > 1) { multipleTable.value.clearSelection() @@ -194,6 +197,14 @@ const handleSelectionChange = (val: ProjectOrderVO[]) => { } +const clickRow = (row: any) => { + if(row){ + multipleTable.value!.toggleRowSelection(row, undefined) + }else{ + multipleTable.value!.clearSelection() + } +} + /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 const submitForm = () => {