Просмотр исходного кода

移除加载状态,新增个人文档库关联功能

yusheng 6 месяцев назад
Родитель
Сommit
e18f431a94
2 измененных файлов с 14 добавлено и 9 удалено
  1. 3 2
      src/components/addDoc/doc_template.vue
  2. 11 7
      src/components/addDoc/main.vue

+ 3 - 2
src/components/addDoc/doc_template.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="ele-body" style="height:60vh;overflow: auto;">
-    <el-card shadow="never" v-loading="loading">
+    <el-card shadow="never" >
       <ele-split-layout
         width="210px"
         allow-collapse
@@ -23,6 +23,7 @@
               :expand-on-click-node="false"
               :default-expand-all="true"
               @node-click="onNodeClick"
+              
             >
               <span class="custom-tree-node" slot-scope="{ node, data }">
                 <ElementTreeLine
@@ -66,7 +67,7 @@ export default {
 
   data() {
     return {
-      loading: true,
+      // loading: true,
       // 列表数据
       data: [],
       // fileType:0,

+ 11 - 7
src/components/addDoc/main.vue

@@ -20,9 +20,12 @@
     >
       <template v-slot:toolbar v-if="type != 'view'">
         <el-button type="primary" @click="fileEditOpen">本地上传</el-button>
-        <el-button type="primary" @click="fileShow = true">
+        <el-button type="primary" @click="openFileList(0)">
           关联文档库
         </el-button>
+        <el-button type="primary" @click="openFileList(1)">
+          关联个人文档库
+        </el-button>
       </template>
       <!-- 操作列 -->
       <template v-slot:action="{ row }">
@@ -168,6 +171,12 @@
     created() {},
 
     methods: {
+      openFileList(type) {
+        this.fileShow = true;
+        this.$nextTick(() => {
+          this.$refs.doc_templateRef.query(type);
+        });
+      },
       open(fileId, type) {
         //查看详情:view 新增:add
         this.showEditFlag = true;
@@ -177,12 +186,7 @@
         }
         this.init();
       },
-      openFileList(type) {
-        this.fileShow = true;
-        this.$nextTick(() => {
-          this.$refs.doc_templateRef.query(type);
-        });
-      },
+
       fileEditOpen() {
         this.$refs.fileEditRef.open();
       },