East il y a 3 ans
Parent
commit
a1c4f99248

+ 2 - 1
src/components/bioSafety/QueryConditions.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-18 10:40:12
- * @LastEditTime: 2021-09-27 16:59:23
+ * @LastEditTime: 2021-11-18 10:23:12
  * @LastEditors: Please set LastEditors
  * @Description: 查询条件组件
  * @FilePath: \hyyfClient\src\components\bioSafety\QueryConditions.vue
@@ -61,6 +61,7 @@
                     v-model="formData[`${item.field}`]" 
                     :start-placeholder="item.placeholder[0]"
                     :end-placeholder="item.placeholder[1]"
+                    value-format="yyyy-MM-dd"
                     type="daterange"
                     clearable
                     class="date-picker-reset">

+ 17 - 0
src/utils/api.js

@@ -454,3 +454,20 @@ export function getYingFu(data) {
     params: data
   })
 }
+
+/** 人员管理 - 人脸门禁 - Token */
+export function getFaceToken(data) {
+  return axios({
+    url: 'http://192.168.1.171:9987/token/getToken',
+    method: 'get',
+    params: data
+  })
+}
+/** 人员管理 - 人脸门禁 - 查询 */
+export function getFaceGuard(data) {
+  return axios({
+    url: 'http://192.168.1.171:9987/person/get_person_record',
+    method: 'post',
+    data: data
+  })
+}

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

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-16 11:27:35
- * @LastEditTime: 2021-10-11 16:25:13
+ * @LastEditTime: 2021-11-18 11:23:40
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \hyyfClient\src\views\BioSafety\PersonAdmin.vue
@@ -56,6 +56,7 @@ import TableFooter from "../../components/TableFooter"
 
 import { formItems, propFormData } from './personAdmin/queryCondition.config'
 import { titles, tableItems, tableShows } from './personAdmin/table.config'
+import { getFaceToken, getFaceGuard } from '../../utils/api'
 
 export default {
   name: "PersonAdmin",
@@ -92,6 +93,7 @@ export default {
     this.title = titles[this.btnSelected - 1]
     this.tableItems = tableItems[this.btnSelected - 1]
     this.tableShows = tableShows
+    this.handleQuery()
   },
   methods: {
     // 获取选中的按钮情况
@@ -105,6 +107,23 @@ export default {
     // 获取查询条件
     handleQuery(params) {
       console.log(params)
+      let queryParams = {
+        pageNum: this.pageNum,
+        pageSize: this.size,
+        // startSwingTime: params.time[0] + ' 00:00:00',
+        // endSwingTime: params.time[1] + ' 23:59:59',
+        startSwingTime: '2021-11-17 00:00:00',
+        endSwingTime: '2021-11-18 23:59:59',
+        openType: 61 // 进门,刷脸
+      }
+      getFaceGuard(queryParams).then(async (res) => {
+        console.log('res:', res)
+        console.log(JSON.parse(res.result))
+        // 结果是 JSON 格式
+        this.listData = JSON.parse(res.result).data.pageData
+        const token = await getFaceToken()
+        console.log('token:', token)
+      })
     },
     // 修改size
     sizeChange(val) {

+ 12 - 35
src/views/BioSafety/personAdmin/table.config.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-18 16:06:51
- * @LastEditTime: 2021-09-22 16:22:29
+ * @LastEditTime: 2021-11-18 13:28:18
  * @LastEditors: Please set LastEditors
  * @Description: 表格的配置
  * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\table.config.js
@@ -66,51 +66,28 @@ const tableItems1 = [
 
 const tableItems2 = [
   {
-    prop: 'time',
+    prop: 'swingTime',
     label: '时间',
-    minWidth: '100',
-    slotName: 'time'
+    minWidth: '120',
+    slotName: 'swingTime'
   },
   {
-    prop: 'photo',
+    prop: 'recordImage',
     label: '人员图片',
     minWidth: '150',
-    slotName: 'photo'
+    slotName: 'recordImage'
   },
   {
-    prop: 'name',
+    prop: 'personName',
     label: '姓名',
-    minWidth: '150',
-    slotName: 'name'
+    minWidth: '60',
+    slotName: 'personName'
   },
   {
-    prop: 'enterRegion',
+    prop: 'channelName',
     label: '进入区域',
-    minWidth: '150',
-    slotName: 'enterRegion'
-  },
-  {
-    prop: 'region',
-    label: '负责区域',
-    minWidth: '150',
-    slotName: 'region'
-  },
-  {
-    prop: 'status',
-    label: '状态',
-    minWidth: '100',
-    slotName: 'status'
-  },
-  {
-    prop: 'backlist',
-    label: '黑名单',
-    minWidth: '150',
-    slotName: 'backlist'
-  },
-  {
-    label: '操作',
-    minWidth: '150',
-    slotName: 'handler'
+    width: '120',
+    slotName: 'channelName'
   }
 ]
 

+ 4 - 0
src/views/PdcData/Analysis.vue

@@ -380,6 +380,7 @@ export default {
       getInventoryLines({}).then(res => {
         if (res.code === 10000) {
           this.inventoryLinesData = res.data
+          console.log(this.inventoryLinesData)
         } else {
           this.inventoryLinesData = {
             boarStock: [],
@@ -399,6 +400,8 @@ export default {
           // this.inventoryLinesData = res.data
           console.log(res.data)
           this.inventoryPieData = res.data.slice(0, 6)
+          console.log('-----------存栏结构数据')
+          console.log(this.inventoryPieData)
           this.inventoryItemsData = [res.data[1].stockQuantity, res.data[6].stockQuantity, res.data[7].stockQuantity, res.data[8].stockQuantity, res.data[2].stockQuantity, res.data[9].stockQuantity]
           this.productionPercents = [res.data[12].rate*100, res.data[13].rate*100, res.data[14].rate*100, res.data[15].rate*100, res.data[16].rate*100]
           this.productionItems = [res.data[17].stockQuantity, res.data[18].stockQuantity, res.data[19].stockQuantity, res.data[20].stockQuantity, res.data[21].stockQuantity, res.data[22].stockQuantity, res.data[23].stockQuantity, res.data[24].stockQuantity]
@@ -440,6 +443,7 @@ export default {
       getSalesChart(params).then(res => {
         if (res.code === 10000) {
           this.salesChartData = res.data
+          console.log(this.salesChartData)
         }
       })
     },

+ 2 - 2
src/views/PdcData/analysis/CostPie.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-12 08:39:43
- * @LastEditTime: 2021-10-12 10:10:54
+ * @LastEditTime: 2021-10-26 17:54:52
  * @LastEditors: Please set LastEditors
  * @Description: 成本分析扇形图
  * @FilePath: \hyyfClient\src\views\PdcData\analysis\CostPie.vue
@@ -110,4 +110,4 @@ export default {
   width: 100%;
   height: 100%;
 }
-</style>>
+</style>