From d2570148ec3884de3af721bd99c4b7acbbdee075 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 09 五月 2023 17:07:26 +0800
Subject: [PATCH] 前端代码提交

---
 Source/UBCS-WEB/src/const/code/classifyTreeOptionDialog.js |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/Source/UBCS-WEB/src/const/code/classifyTreeOptionDialog.js b/Source/UBCS-WEB/src/const/code/classifyTreeOptionDialog.js
new file mode 100644
index 0000000..c812387
--- /dev/null
+++ b/Source/UBCS-WEB/src/const/code/classifyTreeOptionDialog.js
@@ -0,0 +1,35 @@
+import { treeTopCodeClassify } from "@/api/code/codeclassify";
+
+export default {
+    nodeKey: 'oid',
+    border: true,
+    lazy: true,
+    treeLoad: function (node, resolve) {
+      // const parentId = (node.level === 0) ? 0 : node.data.id;
+      treeTopCodeClassify({"queryAllLevel": true,"loadType": "all","multipleSelect": false}).then( res=> {
+        resolve(res.data.map(classifyitem => {
+          let item = {
+            "hasChildren": false,
+            "oid": classifyitem.oid,
+            "key": classifyitem.oid,
+            "parentId": 0,
+            "title": classifyitem.text,
+            "value": classifyitem.oid,
+          }
+          return {
+            ...item,
+            leaf: !item.hasChildren
+          }
+        }))
+      });
+    },
+    addBtn: false,
+    menu: false,
+    size: 'small',
+    props: {
+      labelText: '鏍囬',
+      label: 'title',
+      value: 'value',
+      children: 'children'
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.3