Browse Source

2021-12-30

East 3 years ago
parent
commit
631127edf1

+ 11 - 2
src/views/BioSafety/CarAdmin.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-13 17:52:31
- * @LastEditTime: 2021-12-29 17:59:44
+ * @LastEditTime: 2021-12-30 17:39:41
  * @LastEditors: Please set LastEditors
  * @Description: 生物安全 - 车辆管理
  * @FilePath: \hyyfClient\src\views\BioSafety\CarAdmin.vue
@@ -437,9 +437,18 @@ export default {
     handleQuery(params) {
       this.pageNum = 1;
       this.params = params;
+      const loading = this.$loading({
+        lock: true,
+        text: "加载中...",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)",
+      });
 
       this.listData = [];
-      this.getPageFn(this.btnSelected)[0]();
+      this.getPageFn(this.btnSelected).forEach(async (fn) => {
+        await fn();
+      });
+      loading.close();
     },
     // 修改size
     async sizeChange(val) {

+ 10 - 1
src/views/BioSafety/PersonAdmin.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-16 11:27:35
- * @LastEditTime: 2021-12-27 08:54:07
+ * @LastEditTime: 2021-12-30 17:38:30
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \hyyfClient\src\views\BioSafety\PersonAdmin.vue
@@ -281,6 +281,9 @@ export default {
         openType: 61, // 进门,刷脸
       };
       getFaceGuard(queryParams).then(async (res) => {
+        if (!res.result) {
+          return;
+        }
         // 结果是 JSON 格式
         this.listData = JSON.parse(res.result).data.pageData;
         this.listData.forEach((item) => {
@@ -290,6 +293,9 @@ export default {
         });
         // 近 7 小时进出统计
         const recordRes = await getRecord({});
+        if (!res.result) {
+          return;
+        }
         if (recordRes.code === 0) {
           const timeList = [];
           const dataList = [];
@@ -319,6 +325,9 @@ export default {
         openType: 61, // 进门,刷脸
       };
       getFaceGuardTotal(queryParams).then((res) => {
+        if (!res.result) {
+          return;
+        }
         this.total = JSON.parse(res.result).data;
         if (this.isTotal === false) {
           this.total1 = JSON.parse(res.result).data;

+ 0 - 16
src/views/BioSafety/carAdmin/queryCondition.config.js

@@ -22,13 +22,6 @@ const propFormData1 = {
 }
 
 const formItems2 = [
-  // {
-  //   type: 'select',
-  //   label: '位置:',
-  //   placeholder: '请选择位置',
-  //   field: 'region',
-  //   options: []
-  // },
   {
     type: 'datepicker',
     label: '时间:',
@@ -38,18 +31,10 @@ const formItems2 = [
 ]
 
 const propFormData2 = {
-  // region: '',
   time: [timeDate(new Date().getTime()), timeDate(new Date().getTime())]
 }
 
 const formItems3 = [
-  // {
-  //   type: 'select',
-  //   label: '输入搜索:',
-  //   placeholder: '请选择地点',
-  //   field: 'place',
-  //   options: []
-  // },
   {
     type: 'datepicker',
     label: '时间:',
@@ -59,7 +44,6 @@ const formItems3 = [
 ]
 
 const propFormData3 = {
-  // place: '',
   time: [timeDate(new Date().getTime() - 1000 * 60 * 60 * 24 * 3), timeDate(new Date().getTime())]
 }