East před 3 roky
rodič
revize
77f32108fc

+ 10 - 1
src/utils/chenApi.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-11-18 13:40:39
- * @LastEditTime: 2021-12-05 13:27:51
+ * @LastEditTime: 2021-12-05 14:09:31
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \hyyfClient\src\utils\chenApi.js
@@ -54,6 +54,15 @@ export function getCarWashVideo(params) {
   })
 }
 
+/* 车辆烘干 */
+export function getCarDrying(params) {
+  return axios({
+    url: 'http://192.168.1.171:8089/baseTelecomRoom/list',
+    method: 'get',
+    params: params
+  })
+}
+
 /* 人员管理 */
 // 档案管理
 export function getPersonFiles(params) {

+ 43 - 12
src/views/BioSafety/CarAdmin.vue

@@ -1,9 +1,9 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-13 17:52:31
- * @LastEditTime: 2021-12-01 18:04:42
+ * @LastEditTime: 2021-12-05 14:56:15
  * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
+ * @Description: 生物安全 - 车辆管理
  * @FilePath: \hyyfClient\src\views\BioSafety\CarAdmin.vue
 -->
 <template>
@@ -17,11 +17,13 @@
 
     <!-- 筛选条件 -->
     <query-conditions
+      v-if="btnSelected !== 3"
       :formItems="formItems"
       :propFormData="propFormData"
       :defaultEmit="true"
       @getQueryParams="handleQuery"
-    ></query-conditions>
+    >
+    </query-conditions>
 
     <!-- 表格 -->
     <new-table
@@ -68,9 +70,9 @@
         />
       </template>
       <template v-slot:handler="slotProps">
-        <el-button size="mini" @click="clickEvent(slotProps.row)"
-          >查看回放</el-button
-        >
+        <el-button size="mini" @click="clickEvent(slotProps.row)">
+          查看回放
+        </el-button>
       </template>
     </new-table>
     <table-footer
@@ -84,9 +86,9 @@
       <img :src="imgUrl" alt="车辆通行" width="100%" />
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogVisible = false"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="dialogVisible = false">
+          确 定
+        </el-button>
       </span>
     </el-dialog>
     <el-dialog title="回放视频" :visible.sync="videoVisible" width="50%">
@@ -123,6 +125,7 @@ import {
   getCarWash,
   getCarWashTotal,
   getCarWashVideo,
+  getCarDrying,
 } from "../../utils/chenApi";
 import { getFaceToken } from "../../utils/api";
 
@@ -142,7 +145,7 @@ export default {
         { id: 2, name: "车辆洗消" },
         { id: 3, name: "车辆烘干" },
       ],
-      btnSelected: 2, // 选中的按钮
+      btnSelected: 3, // 选中的按钮
       formItems: [], // 传给 QueryCondition 组件的 formItems
       propFormData: {}, // 传给 QueryCondition 组件的 propFormData
       title: "", // 传给 BioTable 组件的 title
@@ -172,6 +175,8 @@ export default {
       this.carPassage();
     } else if (this.btnSelected === 2) {
       this.carWash();
+    } else {
+      this.carDrying();
     }
   },
   methods: {
@@ -181,30 +186,42 @@ export default {
       this.propFormData = propFormData[id - 1];
       this.title = titles[id - 1];
       this.tableItems = tableItems[id - 1];
+      this.pageNum = 1;
+      this.listData = [];
       if (this.btnSelected === 1) {
         this.carPassage();
       } else if (this.btnSelected === 2) {
         this.carWash();
+      } else {
+        this.carDrying();
       }
     },
     // 获取查询条件
     handleQuery(params) {
-      console.log(params);
+      this.pageNum = 1;
       this.params = params;
+
+      this.listData = [];
       if (this.btnSelected === 1) {
         this.carPassage();
       } else if (this.btnSelected === 2) {
         this.carWash();
         this.carWashTotal();
+      } else {
+        this.carDrying();
       }
     },
     // 修改size
     sizeChange(val) {
       this.size = val;
+      this.pageNum = 1;
+      this.listData = [];
       if (this.btnSelected === 1) {
         this.carPassage();
       } else if (this.btnSelected === 2) {
         this.carWash();
+      } else {
+        this.carDrying();
       }
     },
     // 修改页数
@@ -214,6 +231,8 @@ export default {
         this.carPassage();
       } else if (this.btnSelected === 2) {
         this.carWash();
+      } else {
+        this.carDrying();
       }
     },
     init() {
@@ -276,7 +295,7 @@ export default {
         happendTime: row.alarmDate,
         channelId: row.nodeCode,
       }).then((res) => {
-        if (res.code === 0) {
+        if (res.code === 10000) {
           this.rtsp = res.URL;
           this.videoVisible = true;
         }
@@ -297,6 +316,18 @@ export default {
         this.total = JSON.parse(res.result).data.value;
       });
     },
+    // 车辆烘干
+    carDrying() {
+      getCarDrying({
+        current: this.pageNum,
+        size: this.size,
+      }).then((res) => {
+        if (res.code === 10000) {
+          this.listData = res.data.records;
+          this.total = this.listData.length;
+        }
+      });
+    },
   },
 };
 </script>

+ 6 - 6
src/views/BioSafety/carAdmin/queryCondition.config.js

@@ -50,12 +50,12 @@ const formItems3 = [
   //   field: 'place',
   //   options: []
   // },
-  {
-    type: 'datepicker',
-    label: '时间:',
-    placeholder: ['开始时间', '结束时间'],
-    field: 'time'
-  }
+  // {
+  //   type: 'datepicker',
+  //   label: '时间:',
+  //   placeholder: ['开始时间', '结束时间'],
+  //   field: 'time'
+  // }
 ]
 
 const propFormData3 = {

+ 10 - 27
src/views/BioSafety/carAdmin/table.config.js

@@ -1,12 +1,13 @@
 /*
  * @Author: your name
  * @Date: 2021-09-18 16:06:51
- * @LastEditTime: 2021-11-19 13:39:06
+ * @LastEditTime: 2021-12-05 14:57:21
  * @LastEditors: Please set LastEditors
  * @Description: 表格的配置
  * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\table.config.js
  */
-export const titles = ['车辆档案', '门禁记录', '人员列表']
+// export const titles = ['车辆档案', '门禁记录', '设备列表']
+export const titles = ['', '', '']
 
 const tableItems1 = [
   {
@@ -87,39 +88,21 @@ const tableItems2 = [
 
 const tableItems3 = [
   {
-    prop: 'place',
-    label: '烘干地点',
+    prop: 'deviceName',
+    label: '设备名称',
     minWidth: '150',
-    slotName: 'place'
+    slotName: 'deviceName'
   },
   {
-    prop: 'photo',
-    label: '车辆图片',
-    minWidth: '150',
-    slotName: 'photo'
-  },
-  {
-    prop: 'startTime',
-    label: '开始时间',
+    prop: 'deviceRoom',
+    label: '设备位置',
     minWidth: '150',
-    slotName: 'startTime'
-  },
-  {
-    prop: 'status',
-    label: '状态',
-    minWidth: '150',
-    slotName: 'status'
-  },
-  {
-    prop: 'endTime',
-    label: '结束时间',
-    minWidth: '150',
-    slotName: 'endTime'
+    slotName: 'deviceRoom'
   },
   {
     label: '操作',
     minWidth: '150',
-    slotName: 'handler'
+    slotName: 'handlerDrying'
   }
 ]