From a38281e697cde9f45926a6af0c88bec14501fec0 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Tue, 15 Feb 2022 11:06:34 +0800
Subject: [PATCH] 68个表格在1366*768下的适配,保安单位情况智能分析中的图表的适配以及其按钮会被遮住不能点击

---
 src/views/dispatch/dispatchChildoperableSee.vue |  168 ++++++++++++++++++++++++++++---------------------------
 1 files changed, 86 insertions(+), 82 deletions(-)

diff --git a/src/views/dispatch/dispatchChildoperableSee.vue b/src/views/dispatch/dispatchChildoperableSee.vue
index 5fa188e..13c450c 100644
--- a/src/views/dispatch/dispatchChildoperableSee.vue
+++ b/src/views/dispatch/dispatchChildoperableSee.vue
@@ -1,29 +1,30 @@
 <template>
-  <basic-container>
-    <div
-      :class="[
-        'dispatchChildoperable',
-        $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
-      ]"
+  <basic-container
+    :class="[
+      'dispatchChildoperable',
+      $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
+      $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
+    ]"
+  >
+    <avue-crud
+      class="tablesss"
+      :option="option1"
+      :data="data1"
+      :page.sync="page1"
+      ref="crudrec1"
+      v-model="form"
+      :table-loading="loading1"
+      :before-open="beforeOpen"
+      @row-save="rowSave1"
+      @search-change="searchChange1"
+      @search-reset="searchReset1"
+      @row-update="rowUpdate1"
+      @row-del="rowDel1"
+      @selection-change="selectionChange1"
+      @refresh-change="refreshChange1"
+      @on-load="onLoad1"
     >
-      <avue-crud
-        :option="option1"
-        :data="data1"
-        :page.sync="page1"
-        ref="crudrec1"
-        v-model="form"
-        :table-loading="loading1"
-        :before-open="beforeOpen"
-        @row-save="rowSave1"
-        @search-change="searchChange1"
-        @search-reset="searchReset1"
-        @row-update="rowUpdate1"
-        @row-del="rowDel1"
-        @selection-change="selectionChange1"
-        @refresh-change="refreshChange1"
-      >
-      </avue-crud>
-    </div>
+    </avue-crud>
   </basic-container>
 </template>
 
@@ -34,7 +35,7 @@
   update1,
   remove1,
   getDispatcherUnitByDeptId,
-  overDispatcher,
+  overDispatcher
 } from "@/api/dispatch/dispatch";
 import { update, getListByDeptId } from "@/api/system/user";
 import { mapState } from "vuex";
@@ -51,7 +52,7 @@
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        ...this.$store.state.control.changePageSize,
+        ...this.$store.state.control.changePageSize
       },
       form: {},
       query1: {},
@@ -69,6 +70,7 @@
         editBtnText: "变更派遣",
         // addBtn: false,
         // menuWidth: 160,
+        menu: false,
         align: "center",
         selection: true,
         ...this.$store.state.control.clearOtherBut,
@@ -84,7 +86,7 @@
             // searchSpan: 4,
             minWidth: 210,
             addDisplay: false,
-            editDisplay: false,
+            editDisplay: false
           },
           {
             label: "保安公司",
@@ -97,7 +99,7 @@
             cascaderItem: ["userIds"],
             props: {
               label: "title",
-              value: "id",
+              value: "id"
             },
             width: 180,
             dicUrl: `/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697`,
@@ -105,9 +107,9 @@
               {
                 required: true,
                 message: "请输入保安公司",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "派遣单位",
@@ -117,7 +119,7 @@
             // dicUrl: "/api/dispatcherUnit/page-tree?deptId={{key}}",
             props: {
               label: "name",
-              value: "id",
+              value: "id"
             },
             hide: true,
             searchSpan: 4,
@@ -128,9 +130,9 @@
               {
                 required: true,
                 message: "请输入派遣单位",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "保安员",
@@ -144,7 +146,7 @@
             hide: true,
             props: {
               label: "realName",
-              value: "id",
+              value: "id"
             },
             // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`,
             dicUrl: `/api/blade-user/page-security-units?status=1&deptId={{key}}`,
@@ -153,9 +155,9 @@
               {
                 required: true,
                 message: "请选择保安",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "保安员",
@@ -177,9 +179,9 @@
               {
                 required: true,
                 message: "请选择保安",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
 
           {
@@ -193,9 +195,9 @@
               {
                 required: true,
                 message: "请输入身份证",
-                trigger: "click",
-              },
-            ],
+                trigger: "click"
+              }
+            ]
             // search: true,
             // searchSpan: 4,
             // overHidden: true
@@ -222,9 +224,9 @@
               {
                 required: true,
                 message: "请输入派遣时间",
-                trigger: "click",
-              },
-            ],
+                trigger: "click"
+              }
+            ]
             // overHidden: true
           },
           {
@@ -239,9 +241,9 @@
               {
                 required: true,
                 message: "请输入结束时间",
-                trigger: "click",
-              },
-            ],
+                trigger: "click"
+              }
+            ]
             // search: true,
             // searchSpan: 4,
             // overHidden: true
@@ -264,9 +266,9 @@
               {
                 required: true,
                 message: "请输入时间",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "派遣地址",
@@ -276,15 +278,15 @@
               {
                 required: true,
                 message: "请输入派遣地址",
-                trigger: "click",
-              },
-            ],
+                trigger: "click"
+              }
+            ]
             // search: true,
             // searchSpan: 4,
             // overHidden: true
-          },
-        ],
-      },
+          }
+        ]
+      }
     };
   },
   created() {
@@ -306,17 +308,17 @@
     // },
     ids1() {
       let ids1 = [];
-      this.selectionList1.forEach((ele) => {
+      this.selectionList1.forEach(ele => {
         ids1.push(ele.id);
       });
       return ids1.join(",");
     },
     ...mapState({
-      userInfo: (state) => state.user.userInfo,
+      userInfo: state => state.user.userInfo
     }),
     deps() {
       return this.form.deptId;
-    },
+    }
   },
 
   methods: {
@@ -352,15 +354,15 @@
       // }
 
       adddata1(form).then(
-        (res) => {
+        res => {
           this.onLoad1(this.page1);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           done();
         },
-        (error) => {
+        error => {
           window.console.log(error);
           loading();
         }
@@ -387,11 +389,11 @@
           this.onLoad1(this.page1);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           done();
         },
-        (error) => {
+        error => {
           window.console.log(error);
           loading();
         }
@@ -401,7 +403,7 @@
       this.$confirm("确定结束当前派遣?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           return overDispatcher(row);
@@ -410,7 +412,7 @@
           this.onLoad1(this.page1);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
         });
     },
@@ -425,7 +427,7 @@
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           return remove1(this.ids1);
@@ -434,7 +436,7 @@
           this.onLoad1(this.page1);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           this.$refs.crudrec1.toggleSelection();
         });
@@ -480,13 +482,13 @@
           ...params,
           beginTime: releaseTimeRange[0],
           overTime: releaseTimeRange[1],
-          ...this.query,
+          ...this.query
         };
         values.releaseTimeRange = null;
       } else {
         values = {
           ...params,
-          ...this.query,
+          ...this.query
         };
       }
 
@@ -505,19 +507,20 @@
         page.pageSize,
         // Object.assign(params, this.query)
         values
-      ).then((res) => {
+      ).then(res => {
         const data = res.data.data;
         this.page1.total = data.total;
         this.data1 = data.records;
         this.loading1 = false;
         // this.$nextTick(() => this.$refs.crudrec1.dicInit("cascader"));
-        console.log(this.form, 111111);
+        this.$store.commit("setWindowSizeHeightAdd");
+        // console.log(this.form, 111111);
       });
     },
     initData(type) {
       var that = this;
       if (type == 1) {
-        getDispatcherUnitByDeptId(null).then((res) => {
+        getDispatcherUnitByDeptId(null).then(res => {
           const dispatcherUnitIdColumn = that.findObject(
             this.option1.column,
             "dispatcherUnitId"
@@ -526,19 +529,19 @@
         });
       }
       if (type == 2) {
-        getDispatcherUnitByDeptId(that.userInfo.dept_id).then((res) => {
+        getDispatcherUnitByDeptId(that.userInfo.dept_id).then(res => {
           const dispatcherUnitIdColumn = that.findObject(
             this.option1.column,
             "dispatcherUnitId"
           );
           dispatcherUnitIdColumn.dicData = res.data.data;
         });
-        getListByDeptId(that.userInfo.dept_id, 1).then((res) => {
+        getListByDeptId(that.userInfo.dept_id, 1).then(res => {
           const userIdsColumn = that.findObject(this.option1.column, "userIds");
           userIdsColumn.dicData = res.data.data;
         });
       }
-    },
+    }
   },
   //  watch: {
   //   // "form.deptId"() {
@@ -548,8 +551,9 @@
   //   }
   // },
   mounted() {
-    this.onLoad1(this.page1, this.query1);
-  },
+    this.$store.commit("setWindowSizeHeightAdd");
+    // this.onLoad1(this.page1, this.query1);
+  }
 };
 </script>
 

--
Gitblit v1.9.3