From 6fc598e35e32e31272bbd1851bbb79318d5b3d98 Mon Sep 17 00:00:00 2001
From: wangzenghua <1048523306@qq.com>
Date: Tue, 25 Mar 2025 07:08:37 +0100
Subject: [PATCH] =?UTF-8?q?feat:=E5=9C=9F=E5=9C=B0=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/router/modules/trace.js | 12 +-
.../src/utils/index.js | 22 +-
.../component/landCassification/index-bak.vue | 421 +++++++++++++++++
.../component/landCassification/index.vue | 432 ++++++++----------
4 files changed, 636 insertions(+), 251 deletions(-)
create mode 100644 sub-government-affairs-service/src/views/dict/component/landCassification/index-bak.vue
diff --git a/sub-government-affairs-service/src/router/modules/trace.js b/sub-government-affairs-service/src/router/modules/trace.js
index f745b80..df876cb 100644
--- a/sub-government-affairs-service/src/router/modules/trace.js
+++ b/sub-government-affairs-service/src/router/modules/trace.js
@@ -9,12 +9,6 @@ export default [
redirect: '/sub-government-affairs-service/trace-home',
meta: { title: '溯源管理', icon: 'Document' },
children: [
- {
- path: '/sub-government-affairs-service/trace-index',
- name: 'trace-index',
- component: () => import('@/views/trace/statistic/index.vue'),
- meta: { title: '溯源首页', icon: 'Document' },
- },
{
path: '/sub-government-affairs-service/record',
name: 'record',
@@ -78,6 +72,12 @@ export default [
},
],
},
+ {
+ path: '/sub-government-affairs-service/trace-statistic',
+ name: 'trace-statistic',
+ component: () => import('@/views/trace/statistic/index.vue'),
+ meta: { title: '溯源统计', icon: 'Document' },
+ },
],
},
];
diff --git a/sub-government-affairs-service/src/utils/index.js b/sub-government-affairs-service/src/utils/index.js
index 8563816..fb825cc 100644
--- a/sub-government-affairs-service/src/utils/index.js
+++ b/sub-government-affairs-service/src/utils/index.js
@@ -3,7 +3,7 @@
* @Author: zenghua.wang
* @Date: 2022-02-23 21:12:37
* @LastEditors: zenghua.wang
- * @LastEditTime: 2025-02-11 17:18:36
+ * @LastEditTime: 2025-03-24 10:05:36
*/
import lodash from 'lodash';
import dayjs from 'dayjs';
@@ -123,6 +123,26 @@ export const setDicLabel = (dicData, value) => {
}
return label;
};
+/**
+ * @Title 将tree数据结构打平
+ * @param {*} tree
+ * @returns
+ */
+export const flattenTree = (tree) => {
+ const result = [];
+ function traverse(node) {
+ result.push(node);
+ if (node.children && node.children.length > 0) {
+ node.children.forEach((child) => traverse(child));
+ }
+ }
+ if (Array.isArray(tree)) {
+ tree.forEach((item) => traverse(item));
+ } else {
+ traverse(tree);
+ }
+ return result;
+};
/**
* @Title 数组交集
* @param {*} arr1
diff --git a/sub-government-affairs-service/src/views/dict/component/landCassification/index-bak.vue b/sub-government-affairs-service/src/views/dict/component/landCassification/index-bak.vue
new file mode 100644
index 0000000..a788ddc
--- /dev/null
+++ b/sub-government-affairs-service/src/views/dict/component/landCassification/index-bak.vue
@@ -0,0 +1,421 @@
+
+
+
+
+
+
+
+
+ {{ data.label }}
+
+
+
+
+
+
+
+ 新增
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sub-government-affairs-service/src/views/dict/component/landCassification/index.vue b/sub-government-affairs-service/src/views/dict/component/landCassification/index.vue
index 54b1255..9d5d3c2 100644
--- a/sub-government-affairs-service/src/views/dict/component/landCassification/index.vue
+++ b/sub-government-affairs-service/src/views/dict/component/landCassification/index.vue
@@ -1,107 +1,90 @@
-
-
-
-
-
-
-
- {{ data.label }}
-
-
-
-
-
-
-
- 新增
- 导出
-
+
+
+
+
+
+
+ {{ data.landType }}
+
+
+
+
+
+
+
+ 导出
+
-
-
-
-
-
-
-
-
+
+ 启用
+ 禁用
+
+
+
+
+
+
+
+
+
-
-