ソースを参照

Merge branch 'bianww' into test-new

bianww 2 年 前
コミット
4aab760208

+ 66 - 31
src/pages/main/departWorkLists/index.vue

@@ -13,11 +13,13 @@
                 </div>
                 <el-alert type="warning" :closable="false">
                     <template slot="title">
-                        {{
+                        <span style="word-break: break-all">
+                            {{
                         checkedNode && checkedNode.length > 0
                         ? "当前选择节点名称:" + checkedNode[0].name
                         : "当前无选择节点"
                         }}
+                        </span>
                     </template>
                 </el-alert>
                 <div style="margin: 10px 0">
@@ -44,7 +46,7 @@
                 </div>
                 <div
                     style="
-                          height: calc(100% - 160px);
+                          height: calc(100% - 182px);
                           overflow-y: auto;
                           margin-top: 20px;
                         "
@@ -60,18 +62,29 @@
                         :data="menuList"
                         node-key="id"
                     >
-                            <span class="custom-tree-node" slot-scope="{ node }">
-                                <span>
-                                  <span style="color: #009cff" class=""></span>
-                                  <span
-                                      :style="
-                                      node.data.parentCode===0
-                                        ? 'font-size:14px;padding-left:5px'
-                                        : 'font-size:12px;padding-left:5px'
-                                    "
-                                  >{{ node.data.name }}</span>
+                        <span class="custom-tree-node" slot-scope="{ node }">
+                                <el-tooltip v-if="node.data.name.length >18" effect="light" :content="node.label" placement="right">
+                                    <span class="item-tit">
+                                        <span :style="
+                                            node.data.parentCode===0
+                                            ? 'font-size:14px;padding-left:5px'
+                                            : 'font-size:12px;padding-left:5px'
+                                        "
+                                        >
+                                             {{node.data.name}}
+                                        </span>
+                                    </span>
+                                </el-tooltip>
+                                <span v-else class="item-tit">
+                                   <span  :style="
+                                              node.data.parentCode===0
+                                                ? 'font-size:14px;padding-left:5px'
+                                                : 'font-size:12px;padding-left:5px'
+                                                ">
+                                         {{ node.label }}
+                                    </span>
                                 </span>
-                            </span>
+                        </span>
                     </el-tree>
                 </div>
             </div>
@@ -123,6 +136,7 @@
                         ref="multipleTable"
                         :data="tableData"
                         tooltip-effect="dark"
+                        :key="tableData.id"
                         border
                         size="small"
                         style="width: 100%"
@@ -196,14 +210,14 @@
                             </template>
                         </el-table-column>
                     </el-table>
-                    <!--                        <el-pagination-->
-                    <!--                            class="pageBox"-->
-                    <!--                            @current-change="currchange"-->
-                    <!--                            layout="prev, pager, next"-->
-                    <!--                            background-->
-                    <!--                            :total="total"-->
-                    <!--                        >-->
-                    <!--                        </el-pagination>-->
+                                            <el-pagination
+                                                class="pageBox"
+                                                @current-change="currchange"
+                                                layout="total, prev, pager, next"
+                                                background
+                                                :total="total"
+                                            >
+                                            </el-pagination>
                 </div>
             </div>
         </div>
@@ -422,7 +436,6 @@ export default {
                             type: "success",
                             message: res.data.desc,
                         });
-                        this.checkedNode = [];
                         this.getData();
                         this.$refs[formName].resetFields();
                         this.addDialogStatus = false;
@@ -460,7 +473,7 @@ export default {
         },
         // 删除目录
         delMenu() {
-            if (!this.checkedNode || this.checkedNode.length !== 2) {
+            if (!this.checkedNode || this.checkedNode.length === 0) {
                 this.$message("请先选中要删除的目录");
             } else {
                 this.$confirm("即将删除此条数据, 是否删除?", "提示", {
@@ -477,6 +490,7 @@ export default {
                             },
                             data: {
                                 id: this.checkedNode[0].id,
+                                parentCode: this.checkedNode[0].parentCode
                             },
                         }).then((res) => {
                             if (res.data.result === 0) {
@@ -486,6 +500,10 @@ export default {
                                     type: "success",
                                 });
                                 this.checkedNode = [];
+                                //删除成功后渲染右边目录和表格数据
+                                this.catalogueName="部门工作清单";
+                                this.params.mkdirId='-1';//确保查不到数据
+                                this.getList(this.params, this.pageSize);
                                 this.getData();
                             }else if(res.data.result === 1) {
                                 this.$notify({
@@ -674,7 +692,7 @@ export default {
                 data: v,
             }).then((res) => {
                 if(res.data.result==0){
-                    this.tableData=res.data.body
+                    this.tableData=res.data.body.data
                     this.tableData.forEach(item=>{
                         item.stateNm=item.state=='1'?'开启':'关闭';
                     });
@@ -684,7 +702,7 @@ export default {
                         type: "error",
                     });
                 }
-                // this.total = res.data.totalRecord;
+                this.total = res.data.body.totalRecord;
                 this.loading = false;
             });
         },
@@ -701,7 +719,7 @@ export default {
 }
 .pageBox {
     text-align: right;
-    margin-top: 10px;
+    margin-top: 5px;
 }
 
 .info-line {
@@ -798,7 +816,7 @@ export default {
         }
 
         .inner-left {
-            width: 22%;
+            width: 320px;
             padding: 0 20px;
             border: 1px solid #ddd;
             border-radius: 5px;
@@ -812,13 +830,13 @@ export default {
         }
 
         .inner-right {
-            width: 76%;
-            margin-left: 2%;
-            overflow-y: auto;
+            flex: 1;
+            margin: 0 2%;
+            //overflow-y: auto;
             //   border-left: 1px solid #ddd;
             height: calc(100vh - 220px);
             .tabBoxClass {
-                height: calc(100% - 85px);
+                height: calc(100% - 120px);
             }
         }
     }
@@ -912,4 +930,21 @@ export default {
         }
     }
 }
+.custom-tree-node {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    font-size: 14px;
+    padding-right: 8px;
+    // .item-tit{
+    //     color: #ffffff;
+    // }
+}
+.el-tree ::v-deep .custom-tree-node,
+.el-tree ::v-deep .custom-tree-node .item-tit{
+    overflow: hidden!important;
+    text-overflow:ellipsis!important;
+    white-space: nowrap!important;
+}
 </style>

+ 11 - 1
src/pages/main/departWorkLists/sheet.vue

@@ -247,6 +247,13 @@ export default {
             //查看无法编辑
             return this.type=="view"?false:true;
         },
+        addInputPlace(){
+            this.$nextTick(()=>{
+                let element = document.getElementById('luckysheet_info_detail_input');
+                element.placeholder = '请输入标题'
+                element.style['min-width'] = '120px'
+            })
+        },
         async handleQuery() {
             const {
                 data: {
@@ -279,8 +286,9 @@ export default {
                     showsheetbar: false,
                     data:[{}],
                     userInfo:undefined,
-                    title:"请输入标题"
+                    title:""
                 })
+                this.addInputPlace();
                 if (!this.fullscreen){
                     let interval = setInterval(()=>{
                         let elementById = document.getElementById("luckysheet-icon-morebtn-div");
@@ -316,6 +324,7 @@ export default {
                                         userInfo:export_json.info.name.creater
 
                                     })
+                                    this.addInputPlace();
                                     if (!this.fullscreen){
                                         let interval = setInterval(()=>{
                                             let elementById = document.getElementById("luckysheet-icon-morebtn-div");
@@ -387,6 +396,7 @@ export default {
                                 title:name,
                                 userInfo:name.creater
                             });
+                            this.addInputPlace();
                             if (!this.fullscreen){
                                 let interval = setInterval(()=>{
                                     let elementById = document.getElementById("luckysheet-icon-morebtn-div");