East 3 rokov pred
rodič
commit
893c690e02

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 16069 - 21
package-lock.json


+ 9 - 1
src/utils/chenApi.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-11-18 13:40:39
- * @LastEditTime: 2021-11-18 17:49:02
+ * @LastEditTime: 2021-11-19 14:43:06
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \hyyfClient\src\utils\chenApi.js
@@ -36,3 +36,11 @@ export function getCarWash(params) {
   })
 }
 
+/* 车辆管理 - 车辆洗消 - 总数 */
+export function getCarWashTotal(params) {
+  return axios({
+    url: 'http://192.168.1.171:9987/accident/accident_record_xixiao_totalpage',
+    method: 'post',
+    data: params
+  })
+}

+ 33 - 4
src/views/BioSafety/CarAdmin.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-13 17:52:31
- * @LastEditTime: 2021-11-18 19:37:02
+ * @LastEditTime: 2021-11-19 15:02:04
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \hyyfClient\src\views\BioSafety\CarAdmin.vue
@@ -42,9 +42,13 @@
       <template v-slot:originalPicPath="slotProps">
         <img :src="slotProps.row.originalPicPath" @click="clickImg(slotProps.row.originalPicPath)"  alt="车辆通行" width="120"/>
       </template>
+      <template v-slot:alarmPicture="slotProps">
+        <img :src="slotProps.row.alarmPicture" @click="clickImg(slotProps.row.alarmPicture)"  alt="车辆通行" width="120"/>
+      </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
       :totals="total"
@@ -74,7 +78,8 @@ import TableFooter from "../../components/TableFooter";
 import { formItems, propFormData } from './carAdmin/queryCondition.config'
 import { titles, tableItems, tableShows } from './carAdmin/table.config'
 
-import { getCarPassage, getCarWash } from '../../utils/chenApi'
+import { getCarPassage, getCarWash, getCarWashTotal } from '../../utils/chenApi'
+import { getFaceToken } from '../../utils/api'
 
 export default {
   name: "CarAdmin",
@@ -141,6 +146,7 @@ export default {
         this.carPassage()
       } else if (this.btnSelected === 2) {
         this.carWash()
+        this.carWashTotal()
       }
     },
     // 修改size
@@ -205,15 +211,38 @@ export default {
         alarmType: 303,
         dbType: 0
       }
-      getCarWash(queryParams).then(res => {
+      getCarWash(queryParams).then(async res => {
         console.log('res:', JSON.parse(res.result))
         const result = JSON.parse(res.result)
         this.listData = result.data.pageData
+        const { token } = await getFaceToken()
+        this.listData.forEach(item => {
+          item.alarmPicture = `https://36.26.62.70:447/evo-pic/${item.alarmPicture}?token=${token}&oss_addr=172.16.3.223:8925`
+        })
       })
     },
     // 车辆洗消 - 按钮
     clickEvent(row) {
       console.log(row)
+    },
+    // 车辆洗消 - 总条数
+    carWashTotal() {
+      let queryParams = {
+        "orgCodeList": [], 
+        "nodeCodeList": [
+          "1002871$1$0$0",
+          "1002872$1$0$0",
+          "1002873$1$0$0"
+        ], 
+        "deviceCategory": 1, 
+        "alarmStartDateString": this.params.time[0] + ' 00:00:00', 
+        "alarmEndDateString": this.params.time[1] + ' 23:59:59', 
+        "alarmType": 303, 
+        "dbType": 0 
+      }
+      getCarWashTotal(queryParams).then(res => {
+        this.total = JSON.parse(res.result).data.value
+      })
     }
   },
 }

+ 149 - 6
src/views/BioSafety/DeadPig.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-16 11:27:35
- * @LastEditTime: 2021-09-28 08:58:08
+ * @LastEditTime: 2021-11-19 15:55:26
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \hyyfClient\src\views\BioSafety\DeadPig.vue
@@ -12,13 +12,32 @@
     <query-conditions :formItems="formItems" :propFormData="propFormData" @getQueryParams="handleQuery"></query-conditions>
 
     <!-- 表格 -->
-    <new-table :title="title" :listData="listData" :tableItems="tableItems" :shows="tableShows" :height="535"></new-table>
+    <new-table 
+      :title="title" 
+      :listData="listData" 
+      :tableItems="tableItems" 
+      :shows="tableShows" 
+      :height="535">
+      <template v-slot:alarmPicture="slotProps">
+        <img :src="slotProps.row.alarmPicture" @click="clickImg(slotProps.row.alarmPicture)"  alt="车辆通行" width="380"/>
+      </template>
+    </new-table>
     <table-footer
       :totals="total"
       :size="size"
       @sizeChange="sizeChange"
       @pageChange="pageChange">
     </table-footer>
+    <el-dialog
+      title="图片"
+      :visible.sync="dialogVisible"
+      width="50%">
+      <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>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -30,6 +49,9 @@ import TableFooter from "../../components/TableFooter"
 import { formItems, propFormData } from './deadPig/queryCondition.config'
 import { title, tableItems, tableShows } from './deadPig/table.config'
 
+import { getCarWash, getCarWashTotal } from '../../utils/chenApi'
+import { getFaceToken } from '../../utils/api'
+
 export default {
   name: "DeadPig",
   components: {
@@ -49,7 +71,10 @@ export default {
       total: 0,
       size: 20,
       pageNum: 1,
-      selectId: ''
+      selectId: '',
+      params: {},
+      dialogVisible: false,
+      imgUrl: ''
     }
   },
   mounted() {
@@ -58,21 +83,28 @@ export default {
     this.title = title
     this.tableItems = tableItems
     this.tableShows = tableShows
+    this.pigManage()
+    this.pigTotal()
   },
   methods: {
     // 获取查询条件
     handleQuery(params) {
       console.log(params)
+      this.params = params
+      this.pigManage()
+      this.pigTotal()
     },
     // 修改size
     sizeChange(val) {
       this.size = val;
-      this.init();
+      // this.init();
+      this.pigManage()
     },
     // 修改页数
     pageChange(val) {
       this.pageNum= val;
-      this.init();
+      // this.init();
+      this.pigManage()
     },
     init() {
       let params = {
@@ -82,7 +114,118 @@ export default {
       }
       console.log(params)
       // 获取后端数据
-    }
+    },
+    // 死猪管理
+    pigManage() {
+      let queryParams = {
+        pageNum: this.pageNum,
+        pageSize: this.size,
+        alarmStartDateString: this.params.time[0] + ' 00:00:00',
+        alarmEndDateString: this.params.time[1] + ' 23:59:59',
+        nodeCodeList: [
+          "1002874$1$0$0", 
+          "1002875$1$0$0", 
+          "1002876$1$0$0", 
+          "1002877$1$0$0", 
+          "1002878$1$0$0",
+          "1002879$1$0$0",
+          "1002880$1$0$0",
+          "1002881$1$0$0",
+          "1002882$1$0$0",
+          "1002883$1$0$0",
+          "1002884$1$0$0",
+          "1002885$1$0$0",
+          "1002886$1$0$0",
+          "1002887$1$0$0",
+          "1002888$1$0$0",
+          "1002889$1$0$0",
+          "1002890$1$0$0",
+          "1002891$1$0$0",
+          "1002892$1$0$0",
+          "1002893$1$0$0",
+          "1002894$1$0$0",
+          "1002895$1$0$0",
+          "1002896$1$0$0",
+          "1002897$1$0$0",
+          "1002898$1$0$0",
+          "1002899$1$0$0",
+          "1002900$1$0$0",
+          "1002901$1$0$0",
+          "1002902$1$0$0",
+          "1002903$1$0$0",
+          "1002904$1$0$0",
+          "1002905$1$0$0",
+          "1002906$1$0$0",
+          "1002907$1$0$0",
+          "1002908$1$0$0",
+          "1002909$1$0$0",
+          "1002910$1$0$0",
+          "1002911$1$0$0",
+          "1002912$1$0$0",
+          "1002913$1$0$0",
+          "1002939$1$0$0",
+          "1002939$1$0$1",
+          "1002939$1$0$2",
+          "1002939$1$0$3",
+          "1002939$1$0$4",
+          "1002939$1$0$5",
+          "1002939$1$0$6",
+          "1002939$1$0$7",
+          "1002939$1$0$8",
+          "1002939$1$0$9",
+          "1002940$1$0$0",
+          "1002940$1$0$1",
+          "1002940$1$0$2",
+          "1002940$1$0$3",
+          "1002940$1$0$4",
+          "1002940$1$0$5",
+          "1002940$1$0$6",
+          "1002940$1$0$7",
+          "1002939$1$0$10",
+          "1002939$1$0$11",
+          "1002939$1$0$12",
+          "1002939$1$0$13",
+          "1002939$1$0$14",
+          "1002939$1$0$15",
+        ],
+        deviceCategory: 1,
+        alarmType: 303,
+        dbType: 0
+      }
+      getCarWash(queryParams).then(async res => {
+        console.log('res:', JSON.parse(res.result))
+        const result = JSON.parse(res.result)
+        this.listData = result.data.pageData
+        const { token } = await getFaceToken()
+        this.listData.forEach(item => {
+          item.alarmPicture = `https://36.26.62.70:447/evo-pic/${item.alarmPicture}?token=${token}&oss_addr=172.16.3.223:8925`
+        })
+      })
+    },
+    // 死猪管理 - 总数
+    pigTotal() {
+      let queryParams = {
+        "orgCodeList": [], 
+        "nodeCodeList": [
+          "1002871$1$0$0",
+          "1002872$1$0$0",
+          "1002873$1$0$0"
+        ], 
+        "deviceCategory": 1, 
+        "alarmStartDateString": this.params.time[0] + ' 00:00:00', 
+        "alarmEndDateString": this.params.time[1] + ' 23:59:59', 
+        "alarmType": 303, 
+        "dbType": 0 
+      }
+      getCarWashTotal(queryParams).then(res => {
+        this.total = JSON.parse(res.result).data.value
+      })
+    },
+    // 点击图片放大
+    clickImg(url) {
+      this.dialogVisible = true
+      this.imgUrl = url
+    },
   },
 }
 </script>

+ 2 - 2
src/views/BioSafety/PersonAdmin.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-16 11:27:35
- * @LastEditTime: 2021-11-18 16:22:13
+ * @LastEditTime: 2021-11-19 14:45:43
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \hyyfClient\src\views\BioSafety\PersonAdmin.vue
@@ -75,7 +75,7 @@ export default {
       btnNames: [ // 按钮情况
         { id: 1, name: '档案管理' },
         { id: 2, name: '人脸门禁' },
-        { id: 3, name: '赶猪监管' }
+        // { id: 3, name: '赶猪监管' }
       ],
       btnSelected: 2, // 选中的按钮
       formItems: [], // 传给 QueryCondition 组件的 formItems

+ 1 - 1
src/views/BioSafety/carAdmin/table.config.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-18 16:06:51
- * @LastEditTime: 2021-11-18 19:37:40
+ * @LastEditTime: 2021-11-19 13:39:06
  * @LastEditors: Please set LastEditors
  * @Description: 表格的配置
  * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\table.config.js

+ 9 - 2
src/views/BioSafety/deadPig/queryCondition.config.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-18 15:19:29
- * @LastEditTime: 2021-09-26 14:47:25
+ * @LastEditTime: 2021-11-19 14:54:38
  * @LastEditors: Please set LastEditors
  * @Description: 筛选条件的 formItems 和 propFormData
  * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\queryCondition.config.js
@@ -13,9 +13,16 @@ export const formItems = [
     placeholder: '请选择位置',
     field: 'place',
     options: []
+  },
+  {
+    type: 'datepicker',
+    label: '时间:',
+    placeholder: ['开始时间', '结束时间'],
+    field: 'time'
   }
 ]
 
 export const propFormData = {
-  place: ''
+  place: '',
+  time: []
 }

+ 8 - 13
src/views/BioSafety/deadPig/table.config.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-18 16:06:51
- * @LastEditTime: 2021-09-26 14:49:43
+ * @LastEditTime: 2021-11-19 15:00:45
  * @LastEditors: Please set LastEditors
  * @Description: 表格的配置
  * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\table.config.js
@@ -10,28 +10,23 @@ export const title = '数据列表'
 
 export const tableItems = [
   {
-    prop: 'startTime',
+    prop: 'alarmDate',
     label: '开始时间',
     minWidth: '100',
-    slotName: 'startTime'
+    slotName: 'alarmDate'
   },
   {
-    prop: 'endTime',
-    label: '结束时间',
+    prop: 'alarmPicture',
+    label: '图片',
     minWidth: '150',
-    slotName: 'endTime'
+    slotName: 'alarmPicture'
   },
   {
-    prop: 'location',
+    prop: 'alarmPosition',
     label: '位置',
     minWidth: '150',
-    slotName: 'location'
+    slotName: 'alarmPosition'
   },
-  {
-    label: '操作',
-    minWidth: '150',
-    slotName: 'handler'
-  }
 ]
 
 export const tableShows = {