From 3ec244bf2d226a7741f64a80c43345832d6b0fca Mon Sep 17 00:00:00 2001 From: duxingchen Date: Mon, 10 Aug 2026 14:40:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=A8=E8=A7=88=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E6=97=A0=E8=AE=B0=E5=BD=95=E6=97=B6Toast=E5=8F=8B=E5=A5=BD?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=9B=BF=E4=BB=A3=E9=9D=99=E9=BB=98=E7=9F=AD?= =?UTF-8?q?=E8=B7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- track-uniapp/src/pages/scan/components/TreeCanvas.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/track-uniapp/src/pages/scan/components/TreeCanvas.vue b/track-uniapp/src/pages/scan/components/TreeCanvas.vue index 7c0a1cd..29118a6 100644 --- a/track-uniapp/src/pages/scan/components/TreeCanvas.vue +++ b/track-uniapp/src/pages/scan/components/TreeCanvas.vue @@ -42,7 +42,7 @@ + @tap="handleNodeTap(node)"> {{ node._isMain ? '主分支' : node._blabel }} {{ statusLabel(node.status) }} @@ -196,6 +196,13 @@ export default { methods: { onScale(e) { if (e?.detail?.scale) this.mvScale = e.detail.scale; }, zoomIn() { this.mvScale = Math.min(5, +(this.mvScale + 0.2).toFixed(1)); }, + handleNodeTap(node) { + if (node.records && node.records.length > 0) { + this.$emit('viewRecords', node); + } else { + uni.showToast({ title: '当前节点暂无流转记录', icon: 'none' }); + } + }, zoomOut() { this.mvScale = Math.max(0.1, +(this.mvScale - 0.2).toFixed(1)); }, fitAll() { this.mvScale = this.fitScale; this.mvX = 0; this.mvY = 0; }, fmtDate(d) { if (!d) return ""; const dt = new Date(d); return (dt.getMonth() + 1) + '/' + dt.getDate(); },