liuhh 2 роки тому
батько
коміт
077b2d6192

+ 8 - 0
src/pages/main/departWorkLists/index.vue

@@ -514,7 +514,15 @@ export default {
                 this.catalogueName = clickNode[1].name + '-' + clickNode[0].name
                 this.params.mkdirId = clickNode[0].id + ''
                 this.getList(this.params, this.pageSize);
+            }else if(clickNode.length === 1){
+                //父目录,则显示新建按钮只显示表头
+                this.catalogueName =data.name
+                this.params.mkdirId=data.id;
+                this.getList(this.params, this.pageSize);
             }
+            //返回列表页面
+            this.addOnlineWordFlag=false;
+            this.workListFlag=true;
         },
         getParent(node, list){
             if (node.level > 0){

+ 9 - 2
src/pages/main/departWorkLists/sheet.vue

@@ -336,7 +336,7 @@ export default {
                                                                   { row_focus: row, column_focus: column },
                                                               ]) {
                                         if (!that.handleAllow({ row, column })) {
-                                            that.$message.error("查看无法编辑");
+                                            that.$message.error("当前为【查看】状态,无法编辑");
                                         }
                                     },
                                     // cellUpdated: function (row, column) {
@@ -363,7 +363,7 @@ export default {
                                                                     { row_focus: row, column_focus: column },
                                                                 ]) {
                                         if (!that.handleAllow({ row, column })) {
-                                            that.$message.error("查看无法编辑");
+                                            that.$message.error("当前为【查看】状态,无法编辑");
                                             return false;
                                         }
                                     },
@@ -492,6 +492,13 @@ export default {
                     message: '文档内容为空',
                 });
                 return;
+            },
+            if('请输入标题'== workbook_name || !workbook_name){
+                this.$message({
+                    type: "error",
+                    message: '请输入标题',
+                });
+                return;
             }
             let value = {
                 // templateId: this.id,