xsh 3 лет назад
Родитель
Сommit
e4e7d70cae

+ 1 - 1
src/store/index.js

@@ -10,7 +10,7 @@ export default new Vuex.Store({
     mode: true,
     // 按钮权限
     buttons: [],
-    ip: 'http://192.168.1.165:8010',
+    ip: 'http://120.27.234.126:8010',
     // 所选择的farmId
     farmId: '',
     farmList: [],

+ 2 - 2
src/utils/api.js

@@ -458,7 +458,7 @@ export function getYingFu(data) {
 /** 人员管理 - 人脸门禁 - Token */
 export function getFaceToken(data) {
   return axios({
-    url: '/produce/token/getToken',
+    url: '/video/token/getToken',
     method: 'get',
     params: data
   })
@@ -466,7 +466,7 @@ export function getFaceToken(data) {
 /** 人员管理 - 人脸门禁 - 查询 */
 export function getFaceGuard(data) {
   return axios({
-    url: '/produce/person/get_person_record',
+    url: '/video/person/get_person_record',
     method: 'post',
     data: data
   })

+ 18 - 18
src/utils/chenApi.js

@@ -12,7 +12,7 @@ import axios from './http';
 /* 获取门禁所有 - 人脸门禁 +  */
 export function getFaceGuardTotal(data) {
   return axios({
-    url: '/produce/person/get_person_record_totalpage',
+    url: '/video/person/get_person_record_totalpage',
     method: 'post',
     data: data
   })
@@ -21,7 +21,7 @@ export function getFaceGuardTotal(data) {
 /* 车辆管理 - 车辆通行 */
 export function getCarPassage(data) {
   return axios({
-    url: '/produce/car/get_car_record',
+    url: '/video/car/get_car_record',
     method: 'get',
     params: data
   })
@@ -30,7 +30,7 @@ export function getCarPassage(data) {
 /* 车辆管理 - 车辆洗消 */
 export function getCarWash(params) {
   return axios({
-    url: '/produce/accident/accident_record_xixiao',
+    url: '/video/accident/accident_record_xixiao',
     method: 'post',
     data: params
   })
@@ -39,7 +39,7 @@ export function getCarWash(params) {
 /* 车辆管理 - 车辆洗消 - 总数 */
 export function getCarWashTotal(params) {
   return axios({
-    url: '/produce/accident/accident_record_xixiao_totalpage',
+    url: '/video/accident/accident_record_xixiao_totalpage',
     method: 'post',
     data: params
   })
@@ -48,7 +48,7 @@ export function getCarWashTotal(params) {
 /* 车辆洗消 - 视频回放 */
 export function getCarWashVideo(params) {
   return axios({
-    url: '/produce/video/getVideoRecord',
+    url: '/video/video/getVideoRecord',
     method: 'post',
     data: params
   })
@@ -65,7 +65,7 @@ export function getCarWashVideo(params) {
 // 数据查询
 export function getCarDrying(params) {
   return axios({
-    url: '/produce/telecom/listevent',
+    url: '/video/telecom/listevent',
     method: 'get',
     params: params
   })
@@ -73,7 +73,7 @@ export function getCarDrying(params) {
 // 温度变化
 export function getCarDryingTemp(params) {
   return axios({
-    url: '/produce/telecom/listeventdetail',
+    url: '/video/telecom/listeventdetail',
     method: 'get',
     params: params
   })
@@ -83,7 +83,7 @@ export function getCarDryingTemp(params) {
 // 档案管理
 export function getPersonFiles(params) {
   return axios({
-    url: '/produce/person/ge_person_list',
+    url: '/video/person/ge_person_list',
     method: 'post',
     data: params
   })
@@ -153,7 +153,7 @@ export function getTheSales(params) {
 }
 
 /* 电子秤 */
-// 重量详情 
+// 重量详情
 export function getDayWeight(params) {
   return axios({
     url: 'http://120.27.234.126:8010/produce/weight/getBatchWeightOnPage2',
@@ -288,7 +288,7 @@ export function getAlarmInfo(params) {
   })
 }
 
-/** 
+/**
  * 设备管理
  */
 /* 设备详情 */
@@ -300,41 +300,41 @@ export function getDeviceSummer(params) {
     params: params
   })
 }
-// 设备列表 
+// 设备列表
 // FIXME: 卓哥接口还没放到服务器上
 export function getDeviceList(params) {
   return axios({
-    url: 'http://120.27.234.126:8010/device/farm/device/listDevice',
+    url: '/admin/farm/device/listDevice',
     method: 'get',
     params: params
   })
 }
 
-// 设备新增 
+// 设备新增
 // FIXME: 卓哥接口还没放到服务器上
 export function postDeviceAdd(params) {
   return axios({
-    url: 'http://120.27.234.126:8010/device/farm/device/newDevice',
+    url: '/admin/farm/device/newDevice',
     method: 'get',
     params: params
   })
 }
 
-// 设备编辑 
+// 设备编辑
 // FIXME: 卓哥接口还没放到服务器上
 export function postDeviceEdit(params) {
   return axios({
-    url: 'http://120.27.234.126:8010/device/farm/device/editDevice',
+    url: '/admin/farm/device/editDevice',
     method: 'get',
     params: params
   })
 }
 
-// 设备删除 
+// 设备删除
 // FIXME: 卓哥接口还没放到服务器上
 export function postDeviceDel(params) {
   return axios({
-    url: 'http://120.27.234.126:8010/device/farm/device/removeDevice',
+    url: '/admin/farm/device/removeDevice',
     method: 'get',
     params: params
   })

+ 1 - 1
src/utils/http.js

@@ -15,7 +15,7 @@ let removePending = (ever) => {
 // 创建axios实例
 var instance = axios.create({
   timeout: 1000 * 12,
-  baseURL: 'http://192.168.1.165:8010'
+  baseURL: 'http://120.27.234.126:8010'
 })
 
 // 请求拦截器

+ 9 - 1
src/views/Alarm/chart/AlarmBar.vue

@@ -49,11 +49,19 @@ export default {
         this.barData.three,
       ];
       let options = {
+        title: {
+          text: '近7日数据',
+          left: 'center',
+          textStyle: {
+            fontSize: 16
+          },
+          top: '5%'
+        },
         grid: {
           left: "2%",
           right: "2%",
           bottom: "2%",
-          top: "2%",
+          top: "5%",
           containLabel: true,
         },
         tooltip: {

+ 1 - 1
src/views/Alarm/chart/AlarmPie.vue

@@ -18,7 +18,7 @@ export default {
   },
   methods: {
     init() {
-      let title = "报警总量";
+      let title = "今日报警总量";
       let color = [
         "#0E7CE2",
         "#FF8352",

+ 7 - 5
src/views/BioSafety/CarAdmin.vue

@@ -147,8 +147,8 @@ import {
   getCarDrying,
   getCarDryingTemp,
 } from "../../utils/chenApi";
-import { getFaceToken } from "../../utils/api";
 import { timeDate } from "../../utils/index";
+import { mapState } from "vuex";
 
 export default {
   name: "CarAdmin",
@@ -159,6 +159,9 @@ export default {
     TableFooter,
     ChartCarDrying,
   },
+  computed: {
+    ...mapState(['ip'])
+  },
   data() {
     return {
       btnNames: [
@@ -274,7 +277,7 @@ export default {
         const result = JSON.parse(res.result);
         this.listData = result.data.pageData;
         this.listData.forEach((item) => {
-          item.originalPicPath = `https://36.26.62.70:447/evo-apigw/${item.originalPicPath}`;
+          item.originalPicPath = `${this.ip}/video/picture/get?fileUrl=${item.originalPicPath}`;
           item.devChnName = item.devChnName.split("_")[0];
         });
         this.total = parseInt(result.data.totalRows);
@@ -304,12 +307,11 @@ export default {
         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`;
+          console.log(item)
+          item.alarmPicture = `${this.ip}/video/picture/get?alarmPicture=${item.alarmPicture}`;
         });
       });
     },

+ 5 - 3
src/views/BioSafety/DeadPig.vue

@@ -83,13 +83,13 @@ import TableFooter from "../../components/TableFooter";
 
 import { formItems, propFormData } from "./deadPig/queryCondition.config";
 import { title, tableItems, tableShows } from "./deadPig/table.config";
+import { mapState } from "vuex";
 
 import {
   getCarWash,
   getCarWashTotal,
   getCarWashVideo,
 } from "../../utils/chenApi";
-import { getFaceToken } from "../../utils/api";
 
 export default {
   name: "DeadPig",
@@ -98,6 +98,9 @@ export default {
     NewTable,
     TableFooter,
   },
+  computed: {
+    ...mapState(['ip'])
+  },
   data() {
     return {
       formItems: [], // 传给 QueryCondition 组件的 formItems
@@ -239,9 +242,8 @@ export default {
         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`;
+          item.alarmPicture = `${this.ip}/video/picture/get?alarmPicture=${item.alarmPicture}`;
         });
       });
     },

+ 8 - 7
src/views/BioSafety/PersonAdmin.vue

@@ -109,8 +109,9 @@ import { timeDate } from "../../utils/index";
 
 import { formItems, propFormData } from "./personAdmin/queryCondition.config";
 import { titles, tableItems, tableShows } from "./personAdmin/table.config";
-import { getFaceToken, getFaceGuard } from "../../utils/api";
+import { getFaceGuard } from "../../utils/api";
 import { getFaceGuardTotal, getPersonFiles } from "../../utils/chenApi";
+import { mapState } from "vuex";
 
 export default {
   name: "PersonAdmin",
@@ -120,6 +121,9 @@ export default {
     NewTable,
     TableFooter,
   },
+  computed: {
+    ...mapState(['ip'])
+  },
   data() {
     return {
       btnNames: [
@@ -225,14 +229,11 @@ export default {
         console.log(JSON.parse(res.result));
         // 结果是 JSON 格式
         this.listData = JSON.parse(res.result).data.pageData;
-        const { token } = await getFaceToken();
         this.listData.forEach((item) => {
           item.channelName = item.channelName.split("人脸门禁")[0];
           // item.recordImage = `https://36.26.62.70:447/evo-pic/${item.recordImage}?token=${token}&oss_addr=172.16.3.223:8925`;
-          item.recordImage = `http://192.168.1.171:8089/picture/get?alarmPicture=${item.recordImage}`
+          item.recordImage = `${this.ip}/video/picture/get?alarmPicture=${item.recordImage}`
         });
-        console.log(this.listData)
-        console.log("token:", token);
       });
     },
     // 人脸门禁总条数
@@ -267,10 +268,10 @@ export default {
         if (success) {
           const listData = JSON.parse(result);
           this.listData = listData.data.pageData;
+          console.log(this.listData)
           this.total = listData.data.totalRows;
-          const { token } = await getFaceToken();
           this.listData.forEach((item) => {
-            item.personBiosignatures[0].path = `https://36.26.62.70:447/evo-pic/${item.personBiosignatures[0].path}?token=${token}&oss_addr=172.16.3.223:9876`;
+            item.personBiosignatures[0].path = `${this.ip}/video/picture/get?path=${item.personBiosignatures[0].path}`;
           });
         }
       });