From 25d2d180a690218b0c53c109962db9f4c89cd4f2 Mon Sep 17 00:00:00 2001
From: leiqunqing <zhengqifeng@hnkhzn.com>
Date: 星期一, 19 一月 2026 11:03:03 +0800
Subject: [PATCH] 添加前端
---
代码管理/WCS/WIDESEAWCS_Client/src/components/basic/VolTable.vue | 124 +++++++++++++++++++++++++++++++----------
1 files changed, 93 insertions(+), 31 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/components/basic/VolTable.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/components/basic/VolTable.vue"
index af51360..85020ad 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/components/basic/VolTable.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/components/basic/VolTable.vue"
@@ -890,41 +890,103 @@
if (!column) {
return;
}
- //姝e湪缂栬緫鏃讹紝绂佹鍑哄彂rowClick浜嬩欢
- if (this.edit.rowIndex == -1) {
- this.$emit("rowClick", { row, column, event });
- }
- // 鐐瑰嚮琛屼簨浠�(2020.11.07)
+ // ===== 浼樺寲锛氶殧绂诲閫夋鐐瑰嚮浜嬩欢锛岄伩鍏嶅啋娉″共鎵� 寮�濮� =====
+ // 鍒ゆ柇鐐瑰嚮鐩爣鏄惁鏄閫夋锛堟垨澶嶉�夋鎵�鍦ㄧ殑鍗曞厓鏍�/鍥炬爣锛�
+ const targetEl = event.target;
+ const isCheckbox = targetEl.classList.contains('el-checkbox__input') ||
+ targetEl.closest('.el-checkbox__input') ||
+ targetEl.closest('.el-table-column--selection');
+ // 濡傛灉鐐瑰嚮鐨勬槸澶嶉�夋鍖哄煙锛岀洿鎺ヨ繑鍥烇紝涓嶆墽琛岃閫変腑閫昏緫
+ if (isCheckbox) {
+ return;
+ }
+ // ===== 浼樺寲锛氶殧绂诲閫夋鐐瑰嚮浜嬩欢 缁撴潫 =====
- if (!this.doubleEdit) {
- return;
- }
- // 鐐瑰嚮鍏朵粬琛屾椂锛屽鏋滅偣鍑荤殑琛屼笌姝e湪缂栬緫鐨勮鐩稿悓锛屼繚鎸佺紪杈戠姸鎬�
- if (this.clickEdit && this.edit.rowIndex != -1) {
- if (row.elementIndex == this.edit.rowIndex) {
- // 鐐瑰嚮鐨勫崟鍏冩牸濡傛灉涓嶅彲浠ョ紪杈戯紝鐩存帴缁撴潫缂栬緫
- // 2020.10.12淇缁撴潫缂栬緫鏃讹紝element table楂樼増鏈睘鎬ц幏鍙栦笉鍒扮殑闂
- let _col = this.columns.find((x) => {
- return x.field == ((event && event.property) || column.property);
- });
- if (_col && (!_col.edit || _col.readonly)) {
- if (this.rowEndEdit(row, event)) {
- this.edit.rowIndex = -1;
- }
- }
- return;
- }
- if (this.rowEndEdit(row, event && event.property ? event : column)) {
+ // ===== 浼樺寲锛氱偣鍑昏閫変腑/鍒囨崲澶嶉�夋 寮�濮� =====
+ // 1. 鍒ゆ柇鏄惁鏄剧ず澶嶉�夋锛坈k涓簍rue锛夛紝涓嶆樉绀哄垯鏃犻渶澶勭悊
+ // 2. 缂栬緫鐘舵�佷笅涓嶈Е鍙戯紙閬垮厤骞叉壈缂栬緫鍔熻兘锛�
+ if (this.ck && this.edit.rowIndex === -1) {
+ // 3. 鍗曢�夊満鏅紙single涓簍rue锛夛細鍏堟竻绌烘墍鏈夐�変腑椤癸紝鍐嶅己鍒堕�変腑褰撳墠琛岋紙淇濇寔鍗曢�夐�昏緫锛�
+ if (this.single) {
+ this.$refs.table.clearSelection(); // 娓呯┖鎵�鏈夐�変腑
+ this.$refs.table.toggleRowSelection(row, true); // 鍗曢�夊満鏅己鍒堕�変腑褰撳墠琛�
+ }
+ // 4. 澶氶�夊満鏅紙single涓篺alse锛夛細涓嶄紶绗簩涓弬鏁帮紝瀹炵幇鍒囨崲閫変腑/鍙栨秷鐘舵��
+ else {
+ this.$refs.table.toggleRowSelection(row); // 鍒囨崲鐘舵�侊紝鏀寔鍙栨秷閫変腑
+ }
+ }
+ // ===== 浼樺寲锛氱偣鍑昏閫変腑/鍒囨崲澶嶉�夋 缁撴潫 =====
+
+ // 姝e湪缂栬緫鏃讹紝绂佹瑙﹀彂rowClick浜嬩欢
+ if (this.edit.rowIndex == -1) {
+ this.$emit("rowClick", { row, column, event });
+ }
+ // 鐐瑰嚮琛屼簨浠�(2020.11.07)
+ if (!this.doubleEdit) {
+ return;
+ }
+ // 鐐瑰嚮鍏朵粬琛屾椂锛屽鏋滅偣鍑荤殑琛屼笌姝e湪缂栬緫鐨勮鐩稿悓锛屼繚鎸佺紪杈戠姸鎬�
+ if (this.clickEdit && this.edit.rowIndex != -1) {
+ if (row.elementIndex == this.edit.rowIndex) {
+ // 鐐瑰嚮鐨勫崟鍏冩牸濡傛灉涓嶅彲浠ョ紪杈戯紝鐩存帴缁撴潫缂栬緫
+ // 2020.10.12淇缁撴潫缂栬緫鏃讹紝element table楂樼増鏈睘鎬ц幏鍙栦笉鍒扮殑闂
+ let _col = this.columns.find((x) => {
+ return x.field == ((event && event.property) || column.property);
+ });
+ if (_col && (!_col.edit || _col.readonly)) {
+ if (this.rowEndEdit(row, event)) {
this.edit.rowIndex = -1;
}
- //褰撴鍦ㄧ紪杈戯紝涓旂偣鍑诲埌鍏朵粬琛屾椂锛屽湪鍘熺紪杈戠殑琛岀粨鏉熺紪杈戝悗锛岃Е鍙戞柊琛岀殑rowClick浜嬩欢
- //姝e湪缂栬緫鏃讹紝绂佹鍑哄彂rowClick浜嬩欢
- if (this.edit.rowIndex == -1) {
- this.$emit("rowClick", { row, column, event });
- }
}
- this.rowBeginEdit(row, column);
- },
+ return;
+ }
+ if (this.rowEndEdit(row, event && event.property ? event : column)) {
+ this.edit.rowIndex = -1;
+ }
+ //褰撴鍦ㄧ紪杈戯紝涓旂偣鍑诲埌鍏朵粬琛屾椂锛屽湪鍘熺紪杈戠殑琛岀粨鏉熺紪杈戝悗锛岃Е鍙戞柊琛岀殑rowClick浜嬩欢
+ //姝e湪缂栬緫鏃讹紝绂佹瑙﹀彂rowClick浜嬩欢
+ if (this.edit.rowIndex == -1) {
+ this.$emit("rowClick", { row, column, event });
+ }
+ }
+ this.rowBeginEdit(row, column);
+},
+ // //姝e湪缂栬緫鏃讹紝绂佹鍑哄彂rowClick浜嬩欢
+ // if (this.edit.rowIndex == -1) {
+ // this.$emit("rowClick", { row, column, event });
+ // }
+ // // 鐐瑰嚮琛屼簨浠�(2020.11.07)
+
+ // if (!this.doubleEdit) {
+ // return;
+ // }
+ // // 鐐瑰嚮鍏朵粬琛屾椂锛屽鏋滅偣鍑荤殑琛屼笌姝e湪缂栬緫鐨勮鐩稿悓锛屼繚鎸佺紪杈戠姸鎬�
+ // if (this.clickEdit && this.edit.rowIndex != -1) {
+ // if (row.elementIndex == this.edit.rowIndex) {
+ // // 鐐瑰嚮鐨勫崟鍏冩牸濡傛灉涓嶅彲浠ョ紪杈戯紝鐩存帴缁撴潫缂栬緫
+ // // 2020.10.12淇缁撴潫缂栬緫鏃讹紝element table楂樼増鏈睘鎬ц幏鍙栦笉鍒扮殑闂
+ // let _col = this.columns.find((x) => {
+ // return x.field == ((event && event.property) || column.property);
+ // });
+ // if (_col && (!_col.edit || _col.readonly)) {
+ // if (this.rowEndEdit(row, event)) {
+ // this.edit.rowIndex = -1;
+ // }
+ // }
+ // return;
+ // }
+ // if (this.rowEndEdit(row, event && event.property ? event : column)) {
+ // this.edit.rowIndex = -1;
+ // }
+ // //褰撴鍦ㄧ紪杈戯紝涓旂偣鍑诲埌鍏朵粬琛屾椂锛屽湪鍘熺紪杈戠殑琛岀粨鏉熺紪杈戝悗锛岃Е鍙戞柊琛岀殑rowClick浜嬩欢
+ // //姝e湪缂栬緫鏃讹紝绂佹鍑哄彂rowClick浜嬩欢
+ // if (this.edit.rowIndex == -1) {
+ // this.$emit("rowClick", { row, column, event });
+ // }
+ // }
+ // this.rowBeginEdit(row, column);
+ // },
dowloadFile(file) {
this.base.dowloadFile(
file.path,
--
Gitblit v1.9.3