From 3432c3100ccb4c3b78dc0a5f7f242bdcda503a63 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期三, 18 六月 2025 10:45:49 +0800 Subject: [PATCH] 1、终端程序呼叫页面呼叫原因组件由输入框改为多行文本域 2、设备管理页面新增设备图片字段同时在新增和编辑设备时添加设备图片 3、设备监控以及设备看板页面新增故障状态同时替换设备图片为设备管理页面中维护的设备图片而不再是设备所属设备类型图片以及三色灯增加故障状态灯 --- src/views/tms/WarehouseTree.vue | 36 +++++++++++++++--------------------- 1 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/views/tms/WarehouseTree.vue b/src/views/tms/WarehouseTree.vue index d17e14d..490df2f 100644 --- a/src/views/tms/WarehouseTree.vue +++ b/src/views/tms/WarehouseTree.vue @@ -2,7 +2,7 @@ <a-card :loading="cardLoading" :bordered="false" - title="浠撳簱绠$悊" + :title="title" style="height: 100%;" > <a-spin :spinning="loading"> @@ -160,7 +160,13 @@ components: { Tooltip, }, - props: ['value'], + props: { + value: {}, + title: { + type: String, + default: '' + } + }, data() { return { searchInput: '', @@ -170,8 +176,7 @@ selectedKeys: [], expandedKeys: [], url: { - factoryTreeList: '/base/warehouse/loadTree', - getAllSiteList: '/base/site/getAllList', + warehouseTreeList: '/tms/warehouse/loadTree' }, searchValue: '', dataList: [], @@ -184,24 +189,9 @@ } }, created() { - this.getAllSiteId(); this.queryTreeData(); - this.closeAll(); }, methods: { - getAllSiteId() { - getAction(this.url.getAllSiteList).then((res) => { - if (res.success) { - let allSiteList = res.result; - for (let i = 0; i < allSiteList.length; i++) { - const site = allSiteList[i]; - this.allSiteIds.push(site.id); - } - } else { - this.$message.warn(res.message); - } - }) - }, getCurrSelectedTitle() { return !this.currSelected.title ? '' : this.currSelected.title; }, @@ -223,12 +213,13 @@ queryTreeData() { this.loading = true; this.cardLoading = true; - getAction(this.url.factoryTreeList).then((res) => { + getAction(this.url.warehouseTreeList).then((res) => { if (res.success) { this.dataList = []; this.allTreeKeys = []; this.treeDataSource = res.result; this.generateList(res.result); + this.expandAll() } else { this.$message.warn(res.message); } @@ -302,7 +293,7 @@ this.expandedKeys = this.allTreeKeys; }, closeAll() { - this.expandedKeys = this.allSiteIds; + this.expandedKeys = [] }, refreshTree() { this.queryTreeData(); @@ -311,6 +302,9 @@ mounted() { this.$bus.$on('queryTreeData', this.queryTreeData); }, + beforeDestroy() { + this.$bus.$off('queryTreeData', this.queryTreeData); + }, //鐩戝惉 watch: { currSelected(val) {//鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 -- Gitblit v1.9.3