From 509756bb9310a63e5d66bcc357f895a40e6d3be2 Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期日, 19 五月 2024 00:31:13 +0800
Subject: [PATCH] Merge branch 'master' of http://www.beijingsoft.cn:9090/r/smart-web

---
 src/views/dnc/document/index.vue |  151 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 145 insertions(+), 6 deletions(-)

diff --git a/src/views/dnc/document/index.vue b/src/views/dnc/document/index.vue
index 036843e..d638315 100644
--- a/src/views/dnc/document/index.vue
+++ b/src/views/dnc/document/index.vue
@@ -1,19 +1,158 @@
 <!--
  * @Date: 2024-05-16 22:40:01
  * @LastEditors: Sneed
- * @LastEditTime: 2024-05-16 22:40:07
+ * @LastEditTime: 2024-05-18 21:35:42
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/document/index.vue
 -->
 <template>
-    <div>
-        鎴戠殑鏂囨。
-    </div>
+    <el-main style="height: 100%;">
+        <el-card shadow="never" style="height: 100%;" body-style="height: 100%">
+            <el-container>
+                <el-aside width="200px">
+                    <el-container>
+                        <el-main>
+                            <el-tree default-expand-all ref="group" node-key="id" :data="treeData" :props="{
+                                label: 'name',
+                            }" @node-click="nodeClick" highlight-current :current-node-key="selectNode.id">
+                                <template #default="{ node, data }">
+                                    <span :class="data.isGroup ? 'active' : ''" class="custom-tree-node">
+                                        <span>{{
+                                            node.label || data.code }}</span>
+                                    </span>
+                                </template>
+                            </el-tree>
+                        </el-main>
+                        <!-- <el-footer>
+                            <el-button type="primary" round @click="addFolder">鏂板鏂囦欢澶�</el-button>
+                        </el-footer> -->
+                    </el-container>
+                </el-aside>
+                <el-container>
+                    <el-header>
+                        <el-button type="">杩斿洖涓婁竴绾�</el-button>
+                        <el-dropdown style="margin-left: 8px;">
+                            <el-button type="primary">
+                                鏂板缓<el-icon class="el-icon--right"><el-icon-arrow-down /></el-icon>
+                            </el-button>
+                            <template #dropdown>
+                                <el-dropdown-menu>
+                                    <el-dropdown-item @click="addFolder">鏂囦欢澶�</el-dropdown-item>
+                                    <el-dropdown-item>鏂囦欢</el-dropdown-item>
+                                </el-dropdown-menu>
+                            </template>
+                        </el-dropdown>
+                        <el-button type="primary" style="margin-left: 8px;">涓婁紶鏂囦欢</el-button>
+                        <el-dropdown style="margin-left: 8px;">
+                            <el-button type="primary">
+                                鏇村鎿嶄綔<el-icon class="el-icon--right"><el-icon-arrow-down /></el-icon>
+                            </el-button>
+                            <template #dropdown>
+                                <el-dropdown-menu>
+                                    <el-dropdown-item>澶嶅埗</el-dropdown-item>
+                                    <el-dropdown-item>绉诲姩</el-dropdown-item>
+                                </el-dropdown-menu>
+                            </template>
+                        </el-dropdown>
+                        <el-button style="margin-left: 8px;" type="danger" plain>鍒犻櫎</el-button>
+                        <el-button-group style="margin-left: auto;">
+                            <el-button type="primary">
+                                <el-icon>
+                                    <el-icon-fold />
+                                </el-icon>
+                            </el-button>
+                            <el-button type="primary">
+                                <el-icon>
+                                    <el-icon-grid />
+                                </el-icon>
+                            </el-button>
+                        </el-button-group>
+                        <el-input v-model="input3" style="margin-left: 8px;max-width: 240px" placeholder="璇疯緭鍏ュ叧閿瘝"
+                            class="input-with-select">
+                            <template #append>
+                                <el-button type="primary" class="header-search" @click="search">
+                                    <el-icon>
+                                        <el-icon-search />
+                                    </el-icon>
+                                </el-button>
+
+                            </template>
+                        </el-input>
+                    </el-header>
+                </el-container>
+            </el-container>
+        </el-card>
+        <el-dialog v-model="visible" title="鏂板缓鏂囦欢澶�" width="500">
+            <el-form :model="form" :rules="rules" ref="dialogForm" label-width="120px" label-position="center">
+                <el-form-item label="鏂囦欢澶瑰悕绉�" prop="name">
+                    <el-input v-model="form.name" />
+                </el-form-item>
+            </el-form>
+            <template #footer>
+                <div class="dialog-footer">
+                    <el-button type="primary" @click="saveFolder">
+                        纭畾
+                    </el-button>
+                </div>
+            </template>
+        </el-dialog>
+    </el-main>
 </template>
 
 <script>
 export default {
-
+    data() {
+        return {
+            treeData: [],
+            selectNode: {},
+            visible: false,
+            form: {},
+            rules: {
+                name: [{
+                    required: true, message: '蹇呭~'
+                }]
+            }
+        }
+    },
+    created() {
+        this.init()
+    },
+    methods: {
+        init() {
+            this.$HTTP.get(`/api/blade-dnc/folder/folder-tree`).then(res => {
+                this.treeData = [{
+                    group: true,
+                    id: 0,
+                    name: '鎴戠殑鏂囨。',
+                    children: res.data
+                }]
+                this.selectNode = {
+                    group: true,
+                    id: 0,
+                    name: '鎴戠殑鏂囨。',
+                }
+            })
+        },
+        nodeClick(node) {
+            this.selectNode = node
+        },
+        search() {
+            alert(1)
+        },
+        // 鏂板鏂囦欢澶�
+        addFolder() {
+            this.visible = true
+            this.form = {}
+        },
+        saveFolder() {
+            console.log(this.form)
+            this.$HTTP
+        }
+    }
 }
 </script>
 
-<style lang="scss" scoped></style>
\ No newline at end of file
+<style lang="scss" scoped>
+.header-search {
+    cursor: pointer;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3