From 6400655c5160202e0681519c8f28a4a320e39518 Mon Sep 17 00:00:00 2001
From: GGJ <357021191@qq.com>
Date: Mon, 26 Aug 2024 08:58:57 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../LN/newEnergy/newEnergyAnalysis/index.vue | 108 +++++++++++++++++-
1 file changed, 106 insertions(+), 2 deletions(-)
diff --git a/src/views/LN/newEnergy/newEnergyAnalysis/index.vue b/src/views/LN/newEnergy/newEnergyAnalysis/index.vue
index 30b678a8..a227e653 100644
--- a/src/views/LN/newEnergy/newEnergyAnalysis/index.vue
+++ b/src/views/LN/newEnergy/newEnergyAnalysis/index.vue
@@ -132,7 +132,9 @@
- 添加
+
+ 添加
+
@@ -147,6 +149,27 @@
+
+
+
+
+ {{ node.label }}
+
+
+ 删除
+
+
+
+
+
@@ -282,6 +305,87 @@ const tableData: any = ref([
crossTheLine: '越限'
}
])
+const dataSource = ref([
+ {
+ id: 1,
+ level: 0,
+ label: '0%~10%',
+ children: [
+ {
+ id: 11,
+ label: '测试',
+ children: []
+ }
+ ]
+ },
+ {
+ id: 2,
+ level: 0,
+ label: '10%~20%',
+ children: []
+ },
+ {
+ id: 3,
+ level: 0,
+ label: '20%~30%',
+ children: []
+ },
+ {
+ id: 4,
+ level: 0,
+ label: '30%~40%',
+ children: []
+ },
+ {
+ id: 5,
+ level: 0,
+ label: '40%~50%',
+ children: []
+ },
+ {
+ id: 6,
+ level: 0,
+ label: '50%~60%',
+ children: []
+ },
+ {
+ id: 7,
+ level: 0,
+ label: '60%~70%',
+ children: []
+ },
+ {
+ id: 8,
+ level: 0,
+ label: '70%~80%',
+ children: []
+ },
+ {
+ id: 9,
+ level: 0,
+ label: '80%~90%',
+ children: []
+ },
+ {
+ id: 10,
+ level: 0,
+ label: '90%~100%',
+ children: []
+ }
+])
+// 添加树
+const addTo = row => {
+ console.log('🚀 ~ addTo ~ row:', row)
+}
+// 树删除
+const remove = (node: any, data: any) => {
+ const parent = node.parent
+ const children = parent.data.children || parent.data
+ const index = children.findIndex(d => d.id === data.id)
+ children.splice(index, 1)
+ dataSource.value = [...dataSource.value]
+}
+
const options = ref({})
const tableStore = new TableStore({
url: '',
@@ -299,7 +403,7 @@ const timeClick = (row: any) => {
timePopUpBox.value = row
}
// 点击越限
-const detailClick = () => {
+const detailClick = (row: any) => {
detailRef.value.open()
}
provide('tableStore', tableStore)