ソースを参照

部门工作清单

bianww 2 年 前
コミット
64c7e0a6a6

+ 9 - 4
src/pages/main/departWorkLists/index.vue

@@ -78,25 +78,25 @@
                     </div>
                 </div>
                 <div  class="inner-right" v-if="addOnlineWordFlag" >
-                    <simple-sheet :type="type"  @save="handleSave()" :id="tmpId" :isCreater="isCreater"/>
+                    <simple-sheet :type="type" @save="handleSave()" :id="tmpId" :mkdirId="params.mkdirId" :isCreater="isCreater"/>
                 </div>
 
                 <div class="inner-right" v-show="workListFlag">
                     <div class="search">
-                        <span>部门工作清单</span>
+                        <span>{{ catalogueName }}</span>
                     </div>
                     <div style="margin-bottom: 10px;margin-top: 10px;">
                         <el-button
                             v-if="checkedNode && checkedNode.length === 2"
                             type="primary"
                             size="mini"
-                            @click="addFile('addFile','')"
+                            @click="addFile('addFile',{delFlag:'1'})"
                                     style="width: 80px"
                         >
                             新建
                         </el-button>
                     </div>
-                    <div class="tabbox">
+                    <div class="tabBoxClass">
                         <el-table
                             height="calc(100% )"
                             class="com-table"
@@ -254,6 +254,7 @@ export default {
     },
     data() {
         return {
+            catalogueName:"部门工作清单",
             isCreater:"0",//1:创建者 0:非创建者
             addDialogStatus: false,
             tooltit: "部门工作清单",
@@ -464,6 +465,7 @@ export default {
             this.getParent(node, clickNode)
             this.checkedNode = clickNode
             if (clickNode.length === 2){
+                this.catalogueName = clickNode[1].name + '-' + clickNode[0].name
                 this.params.mkdirId = clickNode[0].id + ''
                 this.getList(this.params, this.pageSize);
             }
@@ -760,6 +762,9 @@ export default {
             overflow-y: auto;
             //   border-left: 1px solid #ddd;
             height: calc(100vh - 220px);
+            .tabBoxClass {
+                height: calc(100% - 85px);
+            }
         }
     }
 }

+ 26 - 11
src/pages/main/departWorkLists/sheet1.vue

@@ -24,15 +24,22 @@
             <!--        v-if="['template'].includes(attribute)"-->
             <!--        ><span class="sheet-container-require">*</span>模板类型:</span-->
             <!--      >-->
-                <el-upload
-                    action
-                    :on-change="handleChange"
-                    :show-file-list="false"
-                    style=""
-                    :disabled="this.type=='view'?true:false"
-                >
-                    <el-button :disabled="this.type=='view'?true:false" size="mini" type="primary">选择文件</el-button>
-                </el-upload>
+                <div style="display: flex;
+                        margin-right: 20px;
+                        background: rgb(2, 135, 251);
+                        padding: 2px;
+                        border-radius: 4px;">
+                    <el-upload
+                        action
+                        :http-request="request"
+                        :on-change="handleChange"
+                        :show-file-list="false"
+                        :disabled="this.type=='view'?true:false"
+                    >
+                        <el-button :disabled="this.type=='view'?true:false" size="mini">选择文件</el-button>
+                    </el-upload>
+                    <span style="font-size: 12px;margin-right: 5px;line-height: 2">{{ fileListName }}</span>
+                </div>
             <el-button
                 type="danger"
                 @click="handleResave"
@@ -103,6 +110,10 @@ export default {
     },
     // 模板状态按钮判断
     status: { type: String, default: "" },
+      mkdirId:{
+          type: String,
+          default:'',
+      }
   },
   data() {
     return {
@@ -204,9 +215,11 @@ export default {
         //     label: "按列",
         // },
       ],
+        fileListName:'未选择任何文件'
     };
   },
   methods: {
+      request(){},
     handleInit() {
         console.log("-----id",this.id)
 
@@ -427,8 +440,9 @@ console.log("&&&&&&&&&&&&&sss:",state,templateName)
         }
       }, 1000);
     },
-    async handleChange(response) {
-      this.handleCreate({ file: response.raw, type: "file" });
+    async handleChange(response, fileList) {
+        this.fileListName = fileList.slice(-1)[0].name;
+        this.handleCreate({ file: response.raw, type: "file" });
     },
     handleDownload() {
       exportExcel(
@@ -842,6 +856,7 @@ console.log("&&&&&&&&&&&&&sss:",state,templateName)
               templateName: workbook_name, //模板名称
               templateUrl: "", //文件链接
               state: this.state,
+              mkdirId: this.mkdirId
           };
           if("edit" ==this.type){
               value.id=this.id;