From 7be77bb648c8dc92539d02f4d678ff60b2d5f3db Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 19 六月 2025 17:51:57 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/system/modules/SelectDeviceDrawer.vue | 41 +++++++++++++++++++++++++++++------------ 1 files changed, 29 insertions(+), 12 deletions(-) diff --git a/src/views/system/modules/SelectDeviceDrawer.vue b/src/views/system/modules/SelectDeviceDrawer.vue index cdd045b..ab5cc25 100644 --- a/src/views/system/modules/SelectDeviceDrawer.vue +++ b/src/views/system/modules/SelectDeviceDrawer.vue @@ -8,15 +8,24 @@ > <a-spin :spinning="loading"> - <!-- showLine --> - <a-form> - <a-form-item> - <a-input-search @search="handleSearch" style="width:100%;" placeholder="妫�绱� 绫诲埆缂栫爜/鍚嶇О" allowClear - v-model="searchInput" @change="handleChange"/> - </a-form-item> - <a-form-item label="杞﹂棿灞傜骇锛�"> + <div class="content-container"> + <a-form> + <a-form-item> + <a-input-search @search="handleSearch" style="width:100%;" placeholder="妫�绱� 绫诲埆缂栫爜/鍚嶇О" allowClear + v-model="searchInput" @change="handleChange"/> + </a-form-item> + + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <i class="anticon anticon-info-circle ant-alert-icon"></i>宸查�夋嫨 <a style="font-weight: 600">{{ + checkedKeys.length }}</a>椤� + <a style="margin-left: 24px" @click="checkedKeys=[]">娓呯┖</a> + </div> + </a-form> + + <div> <a-tree showLine ref="tree" :expandedKeys.sync="expandedKeys" :autoExpandParent="autoExpandParent" :treeData="treeDataSource" checkable @check="onCheck" v-model="checkedKeys" + @select="handleSelectChange" @expand="onExpand"> <template slot="title" slot-scope="{ title, parentId, entity, key}"> <span v-if="title.indexOf(searchValue) > -1">{{ title.substr(0, title.indexOf(searchValue)) }} @@ -26,9 +35,8 @@ <span v-else>{{ title }}</span> </template> </a-tree> - </a-form-item> - </a-form> - + </div> + </div> </a-spin> @@ -227,11 +235,20 @@ refreshTree() { this.queryTreeData() }, + + + /** + * 鑺傜偣琚�変腑鏃惰Е鍙戯紙鐐瑰嚮鍚嶇О锛� + * @param selectedKeys 閫変腑鐨勮妭鐐筴ey闆嗗悎 + * @param event 浜嬩欢瀵硅薄 + */ + handleSelectChange(selectedKeys, event) { + event.node.$el.childNodes[1].click() + }, + onCheck(value, obj) { this.checkedKeys = value - console.log('obj,', obj) this.deviceNodes = obj.checkedNodes.filter(item => item.data.props.equipmentId).map(item => item.data.props.equipmentId) - console.log(this.deviceNodes) }, handleCancel() { this.visible = false -- Gitblit v1.9.3