From 01954e3f6e742b5100ad0ba738686fbcb0ad8b14 Mon Sep 17 00:00:00 2001 From: ko1234 Date: Fri, 15 Nov 2024 18:12:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E6=BA=90=E7=AE=A1=E7=90=86=E8=89=B2?= =?UTF-8?q?=E7=B3=BB=E6=94=B9=E8=AE=8A=20|=20=E5=9C=96=E8=B3=87=E5=AE=B6?= =?UTF-8?q?=E6=9A=AB=E5=AD=98=E5=8D=80=E8=88=87=E8=B7=AF=E5=BE=91=E6=AC=84?= =?UTF-8?q?=E4=BD=8D=20|=20=E7=B3=BB=E7=B5=B1=E5=B0=8F=E5=8D=A1fitToView?= =?UTF-8?q?=E9=80=80=E5=BE=8C=E4=B8=80=E9=BB=9E=20|=20=E4=B8=8A=E5=82=B3?= =?UTF-8?q?=E7=B5=84=E4=BB=B6=E6=96=B0=E5=A2=9E=E6=A0=BC=E5=BC=8F=E8=AA=AA?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- public/favicon.ico | Bin 0 -> 9662 bytes public/favicon.png | Bin 9081 -> 0 bytes src/apis/graph/index.js | 4 +- src/assets/img/chart-title02.svg | 13 +- src/components/customUI/Modal.vue | 2 +- src/components/customUI/Upload.vue | 2 + src/config/cn.json | 21 ++- src/config/tw.json | 21 ++- src/config/us.json | 27 +++- .../components/AssetTableModalRightInfo.vue | 1 + .../components/DashboardElecChart.vue | 25 ++-- .../components/BillingDegreeChart.vue | 6 +- .../components/CarbonEmissionChart.vue | 48 +++++-- .../components/CarbonEmissionModal.vue | 105 +++++++++++++++ .../components/ElecConsumption.vue | 7 +- .../components/ImmediateDemandChart.vue | 46 +++++-- .../components/ImmediateDemandModal.vue | 125 ++++++++++++++++++ .../components/IntervalBillChart.vue | 6 +- .../components/MonthlyElecBillChart.vue | 6 +- src/views/graphManagement/GraphManagement.vue | 5 +- .../components/GraphSidebar.vue | 32 +++-- .../graphManagement/components/GraphTable.vue | 74 +++++++++-- src/views/history/History.vue | 10 +- src/views/system/components/SystemCard.vue | 22 ++- 25 files changed, 510 insertions(+), 100 deletions(-) create mode 100644 public/favicon.ico delete mode 100644 public/favicon.png create mode 100644 src/views/energyManagement/components/CarbonEmissionModal.vue create mode 100644 src/views/energyManagement/components/ImmediateDemandModal.vue diff --git a/index.html b/index.html index 3cfef16..0f7fd58 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - + c#H5Jg8Z5C=#A6DfjpVUYkS_XgGxbOarNH}IYy&=FLoxn%Pa^UiiIQxQtatHM|9GWGX*?_t9k$`}Kn2m7StS9ZlU-jC?8C!*P_A#@k!5E z5%Vn0Fc}%(P zR4mE91JD@r@Y#Maz>@40Sh6emxt`1#TU_XjIj+NJx+ayHz*`wE(TxYH2m7m3peOp; zf%hfc;TnhiOs(-O=8Di){jb#=uq9IW*_q%Q_|RK@r)YsbneVlS&JpyS!aUq-e81fc z@MUE7aF%Ui{s#TCg#7GHk5sWiS5dKV=gP+H~3W%wf-#f0Cn$rwI4+8MUL`TbwaKqFv;0+JC)lpNBaYcx!PaQ`#^u={sH%Ypx|i_|Fk==Bigdw KV(dyWDpRVk};pH-v6i3J(P{S5fE^G{68R$xmVjFATZzn@GP%F|hfSeLGIH4IUY#y~t%@fcQ|fA+fEgF2E^x*_@#$HKnRoxeHw-vBTph0H z8Lg<0@+gGl4ke%1+`)ak{b{G_xWPJ zvqL-?<~LLXm+hpI5#~cdWPK6$Jb~!vRyPFeKMt9Cqi0q9am%tVXcW1(BoqF>paaoR<;k-Mr)Mx@qN3d0yNN5tvgV(MMleE%|dYrztuL|u96-YF9M6@OLtlvGf0=5qSX0P zV^Uxx=afmBwOi`u0N4qyBYC{d{S!SrAZA2d@mmDzW+AekolEE3{)+aA~tsZXi9 z=~&cby2U4ojl3%i=)z+>+C!G(cA+XVZw!v&=g+}aV+{{87Ng7E5&u-+rA4LzCJODy zsJ%6WA{XVnw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oX#V@G4NA({+ShXX4%B9;$gVIoBLumY)EpX&tvdGr-@3suawH*&LhiM~U= j|1(SSzZoLO-` { }); }; -export const delGraphData = async (id) => { - const res = await instance.post(DELETE_GRAPH_TABLE_API, { id }); +export const delGraphData = async (id, hard_delete = false, recover_delete = false) => { + const res = await instance.post(DELETE_GRAPH_TABLE_API, { id, hard_delete, recover_delete }); return apihandler(res.code, res.data, { msg: res.msg, diff --git a/src/assets/img/chart-title02.svg b/src/assets/img/chart-title02.svg index d9cb565..c18a121 100644 --- a/src/assets/img/chart-title02.svg +++ b/src/assets/img/chart-title02.svg @@ -1 +1,12 @@ - \ No newline at end of file + + + + + + + + diff --git a/src/components/customUI/Modal.vue b/src/components/customUI/Modal.vue index d8f80ce..7e7e77a 100644 --- a/src/components/customUI/Modal.vue +++ b/src/components/customUI/Modal.vue @@ -60,7 +60,7 @@ onMounted(() => { {{ title }} -
+
diff --git a/src/components/customUI/Upload.vue b/src/components/customUI/Upload.vue index 9a9b3fb..b10c5f8 100644 --- a/src/components/customUI/Upload.vue +++ b/src/components/customUI/Upload.vue @@ -9,6 +9,7 @@ const props = defineProps({ getFileList: Function, multiple: Boolean, baseUrl: String, + formats: { type: String, default: "txt、doc、xls、pdf、png、jpg" } }); const acceptFileType = [ @@ -265,6 +266,7 @@ const revokeURL = (src) => {

{{ $t("upload.title") }}

{{ $t("upload.description") }}

+

{{ $t("upload.formats") }} : {{props.formats}}

diff --git a/src/config/cn.json b/src/config/cn.json index aadea3c..77aec9f 100644 --- a/src/config/cn.json +++ b/src/config/cn.json @@ -12,7 +12,8 @@ }, "upload": { "title": "选择一个文件或拖放到这里", - "description": "档案不超过 10MB" + "description": "档案不超过 10MB", + "formats": "档案格式" }, "dashboard": { "yesterday_today": "昨天/今天", @@ -55,6 +56,11 @@ "green_elec": "绿电", "immediate_demand": "即时需量", "average_demand": "平均需量", + "real_time_Trend": "即时趋势", + "contract_capacity": "契约容量", + "alert_capacity": "警戒容量", + "reset_value": "复归值", + "edit_automatic_demand": "编辑自动需量", "elec_bills": "今年电费累计(元)", "interval_elec_charges": "区间电费(元)", "year_carbon_emission": "今年碳排当量累计(公斤)", @@ -71,7 +77,9 @@ "var_elec_cost": "流动电费", "fixed_elec_cost": "基本电费", "total_elec_cost": "总电费", - "carbon_equivalent": "碳排当量" + "carbon_equivalent": "碳排当量", + "edit_carbon_emission": "编辑碳排放系数", + "carbon_emission_coefficient":"碳排放系数" }, "alarm": { "title": "显示警告", @@ -191,7 +199,10 @@ "index": "编号", "oriOrgName": "档案", "operation": "功能", - "upload": "图资上传" + "folder_path": "资料夹路径", + "upload": "图资上传", + "staging_area": "删除暂存区", + "no_path": "无资料夹路径" }, "assetManagement": { "title": "资产管理", @@ -272,10 +283,12 @@ "start_time_placeholder": "请输入预计开始日期", "rename": "重新命名", "download": "下载", - "confirm": "确认" + "confirm": "确认", + "restore": "复原" }, "msg":{ "sure_to_delete": "是否确认删除该项目?", + "sure_to_delete_permanent": "是否确认永久删除该项目?", "delete_success": "删除成功", "delete_failed": "删除失败" } diff --git a/src/config/tw.json b/src/config/tw.json index 63a1f3b..d4bd684 100644 --- a/src/config/tw.json +++ b/src/config/tw.json @@ -12,7 +12,8 @@ }, "upload": { "title": "選擇一個文件或拖放到這裡", - "description": "檔案不超過 10MB" + "description": "檔案不超過 10MB", + "formats": "檔案格式" }, "dashboard": { "yesterday_today": "昨天/今天", @@ -55,6 +56,11 @@ "green_elec": "綠電", "immediate_demand": "即時需量", "average_demand": "平均需量", + "real_time_Trend": "即時趨勢", + "contract_capacity": "契約容量", + "alert_capacity": "警戒容量", + "reset_value": "復歸值", + "edit_automatic_demand": "編輯自動需量", "elec_bills": "今年電費累計(元)", "interval_elec_charges": "區間電費(元)", "year_carbon_emission": "今年碳排當量累計(公斤)", @@ -71,7 +77,9 @@ "var_elec_cost": "流動電費", "fixed_elec_cost": "基本電費", "total_elec_cost": "總電費", - "carbon_equivalent": "碳排當量" + "carbon_equivalent": "碳排當量", + "edit_carbon_emission": "編輯碳排放係數", + "carbon_emission_coefficient":"碳排放係數" }, "alarm": { "title": "顯示警告", @@ -191,7 +199,10 @@ "index": "編號", "oriOrgName": "檔案", "operation": "功能", - "upload": "圖資上傳" + "folder_path": "資料夾路徑", + "upload": "圖資上傳", + "staging_area": "刪除暫存區", + "no_path": "無資料夾路徑" }, "assetManagement": { "title": "資產管理", @@ -272,10 +283,12 @@ "start_time_placeholder": "請輸入預計開始日期", "rename": "重新命名", "download": "下載", - "confirm": "確認" + "confirm": "確認", + "restore": "復原" }, "msg":{ "sure_to_delete": "是否確認刪除該項目?", + "sure_to_delete_permanent": "是否確認永久刪除該項目?", "delete_success": "刪除成功", "delete_failed": "刪除失敗" } diff --git a/src/config/us.json b/src/config/us.json index 5afce41..8088271 100644 --- a/src/config/us.json +++ b/src/config/us.json @@ -12,7 +12,8 @@ }, "upload": { "title": "Select a file or drag and drop here", - "description": "File size cannot exceed 10MB" + "description": "File size cannot exceed 10MB", + "formats": "File formats" }, "history": { "title": "Historical Data", @@ -53,8 +54,13 @@ "elec_consumption": "Real-time distribution of electricity consumption", "total_elec": "Total electricity consumption", "green_elec": "Green electricity", - "immediate_demand": "immediate demand", - "average_demand": "average demand", + "immediate_demand": "Immediate demand", + "average_demand": "Average demand", + "real_time_Trend": "Real-time Trend", + "contract_capacity": "Contract Capacity", + "alert_capacity": "Alert Capacity", + "reset_value": "Reset Value", + "edit_automatic_demand": "Edit automatic demand", "elec_bills": "Total electricity bills this year (yuan)", "interval_elec_charges": "Interval electricity charges (yuan)", "year_carbon_emission": "Cumulative carbon emission equivalent this year (kg)", @@ -71,7 +77,9 @@ "var_elec_cost": "Var. Elec. Cost", "fixed_elec_cost": "Fixed Elec. Cost", "total_elec_cost": "Total Elec. Cost", - "carbon_equivalent": "Carbon Equivalent" + "carbon_equivalent": "Carbon Equivalent", + "edit_carbon_emission": "Edit carbon emission coefficient", + "carbon_emission_coefficient":"Carbon emission coefficient" }, "alarm": { "title": "Warning", @@ -191,7 +199,10 @@ "index": "Serial Number", "oriOrgName": "File", "operation": "Function", - "upload": "Upload" + "folder_path": "Folder Path", + "upload": "Upload", + "staging_area": "Staging Area", + "no_path": "No path" }, "assetManagement": { "title": "Asset Management", @@ -272,10 +283,12 @@ "start_time_placeholder": "Please enter expected start date", "rename": "Rename", "download": "Download", - "confirm": "Confirm" + "confirm": "Confirm", + "restore": "Restore" }, - "msg":{ + "msg": { "sure_to_delete": "Are you sure to delete this item?", + "sure_to_delete_permanent": "Are you sure you want to permanently delete this item?", "delete_success": "Delete successfully", "delete_failed": "Delete failed" } diff --git a/src/views/AssetManagement/components/AssetTableModalRightInfo.vue b/src/views/AssetManagement/components/AssetTableModalRightInfo.vue index eb1099c..dea4c70 100644 --- a/src/views/AssetManagement/components/AssetTableModalRightInfo.vue +++ b/src/views/AssetManagement/components/AssetTableModalRightInfo.vue @@ -280,6 +280,7 @@ const onCancel = () => { :getFileList="updateFileList" :multiple="false" class="col-span-2" + formats="svg" > diff --git a/src/views/dashboard/components/DashboardElecChart.vue b/src/views/dashboard/components/DashboardElecChart.vue index 65bfe02..47d1b43 100644 --- a/src/views/dashboard/components/DashboardElecChart.vue +++ b/src/views/dashboard/components/DashboardElecChart.vue @@ -9,11 +9,11 @@ const yesterdayTodayData = { categories: ["00:00", "01:00", "02:00", "03:00", "04:00", "05:00", "06:00", "07:00", "08:00", "09:00", "10:00", "11:00"], values: [ { - name: `2024.10.21 ${t("dashboard.electricity_consumption")}`, + name: `2024.11.8 ${t("dashboard.electricity_consumption")}`, value: [8, 8, 8, 8, 8, 15, 25, 65, 75, 60, 70, 65], }, { - name: `2024.10.20 ${t("dashboard.electricity_consumption")}`, + name: `2024.11.7 ${t("dashboard.electricity_consumption")}`, value: [10, 10, 10, 10, 10, 20, 30, 80, 90, 70, 80, 85], }, ], @@ -74,9 +74,9 @@ const generateCylinderChartOption = (categories, values) => { x2: 1, // 向右漸層 y2: 0, // 水平漸層 colorStops: [ - { offset: 0, color: "#acd7e4" }, // 左側顏色 - { offset: 0.5, color: "#0ca9d4" }, // 中間顏色 - { offset: 1, color: "#acd7e4" }, // 右側顏色 + { offset: 0, color: "#17CEE3" }, // 左側顏色 + { offset: 0.5, color: "#398ECA" }, // 中間顏色 + { offset: 1, color: "#17CEE3" }, // 右側顏色 ], }, }, @@ -94,9 +94,9 @@ const generateCylinderChartOption = (categories, values) => { x2: 1, // 向右漸層 y2: 0, // 水平漸層 colorStops: [ - { offset: 0, color: "#fff6b3" }, // 左側顏色 - { offset: 0.5, color: "#ffe000" }, // 中間顏色 - { offset: 1, color: "#fff6b3" }, // 右側顏色 + { offset: 0, color: "#62E39A" }, // 左側顏色 + { offset: 0.5, color: "#05AA9A" }, // 中間顏色 + { offset: 1, color: "#62E39A" }, // 右側顏色 ], }, }, @@ -125,7 +125,7 @@ const generateCylinderChartOption = (categories, values) => { symbolPosition: "end", data: values[1].value, itemStyle: { - color: "#c3ae1a", + color: "#05AA9A", borderWidth: 10, borderColor: "#fff", borderType: "solid", @@ -153,7 +153,7 @@ const generateCylinderChartOption = (categories, values) => { symbolPosition: "start", data: values[1].value, itemStyle: { - color: "#ffe000", + color: "#05AA9A", }, z: 12, }, @@ -201,18 +201,17 @@ const weekComparisonOption = generateCylinderChartOption(

- {{ $t("dashboard.yesterday_today") }}
{{ $t("dashboard.elec_consumption_comparison_trend") }} (kWH)

- 2024.10.20 {{ $t("dashboard.electricity_consumption") }} + 2024.11.8 {{ $t("dashboard.electricity_consumption") }}
- 2024.10.21 {{ $t("dashboard.electricity_consumption") }} + 2024.11.7 {{ $t("dashboard.electricity_consumption") }}
diff --git a/src/views/energyManagement/components/BillingDegreeChart.vue b/src/views/energyManagement/components/BillingDegreeChart.vue index ba0e0a0..3384cdb 100644 --- a/src/views/energyManagement/components/BillingDegreeChart.vue +++ b/src/views/energyManagement/components/BillingDegreeChart.vue @@ -49,7 +49,7 @@ const defaultChartOption = ref({ stack: "total", data: [], itemStyle: { - color: "#45f4ef", + color: "#398ECA", }, }, { @@ -58,7 +58,7 @@ const defaultChartOption = ref({ stack: "total", data: [], itemStyle: { - color: "#ffd345", + color: "#05AA9A", }, }, { @@ -67,7 +67,7 @@ const defaultChartOption = ref({ stack: "total", data: [], itemStyle: { - color: "#64ed81", + color: "#62E39A", }, }, ], diff --git a/src/views/energyManagement/components/CarbonEmissionChart.vue b/src/views/energyManagement/components/CarbonEmissionChart.vue index 9b0f2a5..a42e5e2 100644 --- a/src/views/energyManagement/components/CarbonEmissionChart.vue +++ b/src/views/energyManagement/components/CarbonEmissionChart.vue @@ -1,11 +1,11 @@ + + + + diff --git a/src/views/energyManagement/components/ElecConsumption.vue b/src/views/energyManagement/components/ElecConsumption.vue index ff91348..c2c60f0 100644 --- a/src/views/energyManagement/components/ElecConsumption.vue +++ b/src/views/energyManagement/components/ElecConsumption.vue @@ -53,10 +53,11 @@ const loadData = async () => { const rawData = res.data; const totalValue = rawData.reduce((acc, item) => acc + item.value, 0); + const sortedData = [...rawData].sort((a, b) => b.value - a.value); // 構造 data 節點 const data = [ { name: "Total", value: totalValue, percentage: 100 }, - ...rawData.map((item) => ({ + ...sortedData.map((item) => ({ name: item.key, value: item.value, percentage: item.percentage, @@ -64,14 +65,14 @@ const loadData = async () => { ]; // 構造 links 連結 - const links = rawData.map((item, index) => ({ + const links = sortedData.map((item, index) => ({ source: "Total", target: item.key, value: item.value, percentage: item.percentage, })); - const colors = ["#45f4ef", "#f5d54e", "#63ed84", "#5a5cac", "#ff5e5e", "#e266fe"]; + const colors = ["#45f4ef", "#398ECA", "#05AA9A", "#62E39A", "#17CEE3", "#E9971F"]; // 更新 chartOption chartOption.series[0].data = data.map((item, index) => ({ ...item, diff --git a/src/views/energyManagement/components/ImmediateDemandChart.vue b/src/views/energyManagement/components/ImmediateDemandChart.vue index bb33db7..452e62c 100644 --- a/src/views/energyManagement/components/ImmediateDemandChart.vue +++ b/src/views/energyManagement/components/ImmediateDemandChart.vue @@ -1,7 +1,11 @@ + + + + diff --git a/src/views/energyManagement/components/IntervalBillChart.vue b/src/views/energyManagement/components/IntervalBillChart.vue index facb883..d24c529 100644 --- a/src/views/energyManagement/components/IntervalBillChart.vue +++ b/src/views/energyManagement/components/IntervalBillChart.vue @@ -14,9 +14,9 @@ const dateRange = ref({ // 圖表配置 const chartConfig = { colors: { - peak: "#3c50e0", - semiPeak: "#6577f3", - offPeak: "#8fd0ef", + peak: "#398ECA", + semiPeak: "#05AA9A", + offPeak: "#62E39A", }, textColor: "#ffffff", fontSize: 14, diff --git a/src/views/energyManagement/components/MonthlyElecBillChart.vue b/src/views/energyManagement/components/MonthlyElecBillChart.vue index 0c4a20f..a711e50 100644 --- a/src/views/energyManagement/components/MonthlyElecBillChart.vue +++ b/src/views/energyManagement/components/MonthlyElecBillChart.vue @@ -50,7 +50,7 @@ const defaultChartOption = ref({ stack: "total", data: [], itemStyle: { - color: "#ffd345", + color: "#398ECA", }, }, { @@ -59,7 +59,7 @@ const defaultChartOption = ref({ stack: "total", data: [], itemStyle: { - color: "#45f4ef", + color: "#05AA9A", }, }, { @@ -68,7 +68,7 @@ const defaultChartOption = ref({ stack: "total", data: [], itemStyle: { - color: "#64ed81", + color: "#62E39A", }, }, ], diff --git a/src/views/graphManagement/GraphManagement.vue b/src/views/graphManagement/GraphManagement.vue index 3122bbe..0aa1460 100644 --- a/src/views/graphManagement/GraphManagement.vue +++ b/src/views/graphManagement/GraphManagement.vue @@ -4,10 +4,11 @@ import GraphTable from "./components/GraphTable.vue"; import { provide, ref } from "vue"; const current_dir = ref(null); +const sidebar_data = ref([]); const updateCurrentDir = (d) => { current_dir.value = d; }; -provide("current_dir", { current_dir, updateCurrentDir }); +provide("current_dir", { current_dir, updateCurrentDir, sidebar_data }); -./GraphSidebarDropdown.vue diff --git a/src/views/graphManagement/components/GraphTable.vue b/src/views/graphManagement/components/GraphTable.vue index 14328ca..48d52d6 100644 --- a/src/views/graphManagement/components/GraphTable.vue +++ b/src/views/graphManagement/components/GraphTable.vue @@ -7,6 +7,7 @@ import { downloadExcelByHref } from "@/util/downloadExcel"; import { useI18n } from "vue-i18n"; const { t } = useI18n(); const { openToast, cancelToastOpen } = inject("app_toast"); +const { sidebar_data } = inject("current_dir"); const FILE_BASEURL = import.meta.env.VITE_FILE_API_BASEURL; const columns = computed(() => [ @@ -15,14 +16,18 @@ const columns = computed(() => [ key: "index", width: 100, }, + { + title: t("graphManagement.folder_path"), + key: "folderPath", + }, { title: t("graphManagement.oriOrgName"), key: "oriOrgName", - width: "60%", }, { title: t("graphManagement.operation"), key: "operation", + width: "25%", }, ]); @@ -32,7 +37,7 @@ const { searchParams } = useSearchParams(); const getData = async (id) => { const res = await getGraphData(id); if (res.isSuccess) { - dataSource.value = res.data.map((d) => ({ ...d, key: d.id })); + dataSource.value = res.data.map((d) => ({ ...d, key: d.id, parentId: d.layer_id })); } }; @@ -43,17 +48,29 @@ const updateEditRecord = (data) => { editRecord.value = data; }; -const delRecord = async (id) => { - openToast("warning", t("msg.sure_to_delete"), "body", async () => { - await cancelToastOpen(); - const res = await delGraphData(id); +const delRecord = async (id, hard_delete = false, recover_delete = false) => { + if (recover_delete) { + const res = await delGraphData(id, false, recover_delete); if (res.isSuccess) { - getData(parseInt(searchParams.value.id)); - openToast("success", t("msg.delete_success")); + getData(0); } else { openToast("error", res.msg); } - }); + }else{ + const confirmMessage = hard_delete + ? t("msg.sure_to_delete_permanent") + : t("msg.sure_to_delete"); + openToast("warning", confirmMessage, "body", async () => { + await cancelToastOpen(); + const res = await delGraphData(id,hard_delete,false); + if (res.isSuccess) { + getData(parseInt(searchParams.value.id > 0 ? parseInt(searchParams.value.id) : 0)); + openToast("success", t("msg.delete_success")); + } else { + openToast("error", res.msg); + } + }); + } }; watch( @@ -61,7 +78,7 @@ watch( (newVal) => { if (newVal.value.id) { updateEditRecord(null); - getData(parseInt(newVal.value.id)); + getData(newVal.value.id > 0 ? parseInt(newVal.value.id) : 0); } }, { @@ -70,6 +87,17 @@ watch( } ); +const getFolderPath = (id, nodes = sidebar_data.value) => { + for (const node of nodes) { + if (node.id === id) return node.remark; + if (node.children && node.children.length > 0) { + const childPath = getFolderPath(id, node.children); + if (childPath) return `${childPath}`; + } + } + return null; +}; + const downloadFile = async (record) => { console.log(record); downloadExcelByHref( @@ -82,12 +110,20 @@ const downloadFile = async (record) => {