From ba772ed9b7e6009f57bd6b4f95f43ff61b12dd9b Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期一, 07 七月 2025 10:10:15 +0800 Subject: [PATCH] zongjianshenhe --- src/views/sampling/sampling/index.vue | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/views/sampling/sampling/index.vue b/src/views/sampling/sampling/index.vue index 7d97733..3deb70f 100644 --- a/src/views/sampling/sampling/index.vue +++ b/src/views/sampling/sampling/index.vue @@ -79,7 +79,7 @@ <div style="width: 100%; margin-left: 10px; display: flex"> <div style="width: 40%; margin-right: 20px"> - <el-table id="ta" v-loading="loading1" ref="tb" :data="samplingList" @selection-change="handleSelectionChange" + <el-table id="ta" v-loading="loading1" ref="tb" :data="samplingList" @selection-change="handleSelectionChange" @current-change="handleCurrentChangess" border height="520px" :row-class-name="tableRowClassName"> <el-table-column type="selection" width="40" align="center" :selectable="selectable" /> <el-table-column label="浣撴鍙�" align="center" prop="tjNumber" width="160px" /> @@ -250,7 +250,7 @@ piliangList: [], msg: "", getNumbr: null, - valueUrl: "ws://127.0.0.1/websocket", + valueUrl: "ws://127.0.0.1:6789/websocket", webSocket: null, list: [], selectList: [], @@ -629,6 +629,13 @@ this.handleQuery(); // 閲嶆柊鏌ヨ }, + handleCurrentChangess(val) { + if (val != null) { + this.$refs.tb.toggleRowSelection(val, true); + this.handleSelectionChange(val); + } + }, + handleSelectionChange(selection) { this.piliangList = selection; const selectedCount = selection.length; -- Gitblit v1.8.0