Przeglądaj źródła

Merge branch 'master' of http://192.168.1.7:3000/xsh1997/hyyfScreen

East 3 lat temu
rodzic
commit
f92f442098

+ 17 - 17
src/utils/api.js

@@ -3,7 +3,7 @@ import axios from './http';
 /** 获取天气 **/
 /** 获取天气 **/
 export function getWeather(data) {
 export function getWeather(data) {
   return axios({
   return axios({
-    url: '/produce/weather/info',
+    url: '/env/weather/info',
     method: 'post',
     method: 'post',
     params: data
     params: data
   })
   })
@@ -39,7 +39,7 @@ export function getFarmId(data) {
 // 首页生态检测
 // 首页生态检测
 export function getScreen(data) {
 export function getScreen(data) {
   return axios({
   return axios({
-    url: 'produce/room/listLargeScreen',
+    url: 'env/room/listLargeScreen',
     method: 'get',
     method: 'get',
     params: data,
     params: data,
   })
   })
@@ -47,7 +47,7 @@ export function getScreen(data) {
 
 
 export function getEnv(data) {
 export function getEnv(data) {
   return axios({
   return axios({
-    url: 'produce/room/getAllRoomEnvironment',
+    url: 'env/room/getAllRoomEnvironment',
     method: 'get',
     method: 'get',
     params: data
     params: data
   })
   })
@@ -56,7 +56,7 @@ export function getEnv(data) {
 /* 环境查询 */
 /* 环境查询 */
 export function getByRoom(data) {
 export function getByRoom(data) {
   return axios({
   return axios({
-    url: '/produce/room/listByRoom',
+    url: '/env/room/listByRoom',
     method: 'post',
     method: 'post',
     data: data
     data: data
   })
   })
@@ -65,7 +65,7 @@ export function getByRoom(data) {
 /** 栋舍饮用水 **/
 /** 栋舍饮用水 **/
 export function getListWater(data) {
 export function getListWater(data) {
   return axios({
   return axios({
-    url: '/produce/dayWater/listWater',
+    url: '/env/dayWater/listWater',
     method: 'post',
     method: 'post',
     data: data
     data: data
   })
   })
@@ -109,7 +109,7 @@ export function getVideo(data) {
 /** 车辆通行图标**/
 /** 车辆通行图标**/
 export function getCar(data) {
 export function getCar(data) {
   return axios({
   return axios({
-    url: '/produce/screen/car/count_car_record',
+    url: '/video/screen/car/count_car_record',
     method: 'get',
     method: 'get',
     params: data
     params: data
   })
   })
@@ -118,7 +118,7 @@ export function getCar(data) {
 /** 门禁管理图表 **/
 /** 门禁管理图表 **/
 export function getRecord(data) {
 export function getRecord(data) {
   return axios({
   return axios({
-    url: '/produce/screen/person/count_person_record',
+    url: '/video/screen/person/count_person_record',
     method: 'get',
     method: 'get',
     params: data
     params: data
   })
   })
@@ -154,7 +154,7 @@ export function romVideo(data) {
 /** 死猪 **/
 /** 死猪 **/
 export function getSizhu(data) {
 export function getSizhu(data) {
   return axios({
   return axios({
-    url: '/produce/screen/sizhu/count_sizhu_record',
+    url: '/video/screen/sizhu/count_sizhu_record',
     method: 'get',
     method: 'get',
     params: data
     params: data
   })
   })
@@ -163,7 +163,7 @@ export function getSizhu(data) {
 /** 车辆通行列表 **/
 /** 车辆通行列表 **/
 export function getCarList(data) {
 export function getCarList(data) {
   return axios({
   return axios({
-    url: '/produce/car/get_car_record',
+    url: '/video/car/get_car_record',
     method: 'get',
     method: 'get',
     params: data
     params: data
   })
   })
@@ -172,7 +172,7 @@ export function getCarList(data) {
 /** 人脸闸机 **/
 /** 人脸闸机 **/
 export function getPersonList(data) {
 export function getPersonList(data) {
   return axios({
   return axios({
-    url: '/produce/person/get_person_record',
+    url: '/video/person/get_person_record',
     method: 'post',
     method: 'post',
     data: data
     data: data
   })
   })
@@ -181,7 +181,7 @@ export function getPersonList(data) {
 /** 人员管理 - 人脸门禁 - Token */
 /** 人员管理 - 人脸门禁 - Token */
 export function getFaceToken(data) {
 export function getFaceToken(data) {
   return axios({
   return axios({
-    url: '/produce/token/getToken',
+    url: '/video/token/getToken',
     method: 'get',
     method: 'get',
     params: data
     params: data
   })
   })
@@ -190,7 +190,7 @@ export function getFaceToken(data) {
 /** 死猪 **/
 /** 死猪 **/
 export function getSizhuList(data) {
 export function getSizhuList(data) {
   return axios({
   return axios({
-    url: '/produce/accident/accident_record_xixiao',
+    url: '/video/accident/accident_record_xixiao',
     method: 'post',
     method: 'post',
     data: data
     data: data
   })
   })
@@ -217,7 +217,7 @@ export function getAlarmList(data) {
 /** 车辆烘干  **/
 /** 车辆烘干  **/
 export function getHoure(data) {
 export function getHoure(data) {
   return axios({
   return axios({
-    url: '/produce/telecom/listeventByHoure',
+    url: '/video/telecom/listeventByHoure',
     method: 'get',
     method: 'get',
     params: data
     params: data
   })
   })
@@ -244,7 +244,7 @@ export function getAlarmRate(data) {
 /**  事件分布 **/
 /**  事件分布 **/
 export function getCountByDay(data) {
 export function getCountByDay(data) {
   return axios({
   return axios({
-    url: '/produce/screen/alarmCount/CountByDay',
+    url: '/video/screen/alarmCount/CountByDay',
     method: 'get',
     method: 'get',
     params: data
     params: data
   })
   })
@@ -253,7 +253,7 @@ export function getCountByDay(data) {
 /** 门禁管理违规 **/
 /** 门禁管理违规 **/
 export function getDoor(data) {
 export function getDoor(data) {
   return axios({
   return axios({
-    url: '/produce/screen/person/count_person_record_fail_success',
+    url: '/video/screen/person/count_person_record_fail_success',
     method: 'get',
     method: 'get',
     params: data
     params: data
   })
   })
@@ -262,7 +262,7 @@ export function getDoor(data) {
 /* 车辆洗消 - 视频回放 */
 /* 车辆洗消 - 视频回放 */
 export function getCarWashVideo(params) {
 export function getCarWashVideo(params) {
   return axios({
   return axios({
-    url: '/produce/video/getVideoRecord',
+    url: '/video/video/getVideoRecord',
     method: 'post',
     method: 'post',
     data: params
     data: params
   })
   })
@@ -273,7 +273,7 @@ export function getCarWashVideo(params) {
 /** 首页生物安全 **/
 /** 首页生物安全 **/
 export function getAlarmAndPig(params) {
 export function getAlarmAndPig(params) {
   return axios({
   return axios({
-    url: '/produce/screen/index/dataList',
+    url: '/video/screen/index/dataList',
     method: 'get',
     method: 'get',
     params: params
     params: params
   })
   })

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

@@ -12,7 +12,8 @@
             <div class="alarm-title-right"></div>
             <div class="alarm-title-right"></div>
           </div>
           </div>
           <div class="alarm-content" style="background: #0F152B">
           <div class="alarm-content" style="background: #0F152B">
-            <chart-pie :data="alarmPie"></chart-pie>
+            <chart-pie v-if="alarmPie.length > 0" :data="alarmPie"></chart-pie>
+            <div style="line-height: 200px; font-size: 22px; color: white">暂无数据</div>
           </div>
           </div>
         </div>
         </div>
         <div class="alarm-divide" v-loading="listLoading"
         <div class="alarm-divide" v-loading="listLoading"
@@ -397,6 +398,9 @@ export default {
         if(res.code === 10000) {
         if(res.code === 10000) {
           this.alarmList = res.data;
           this.alarmList = res.data;
           this.alarmLoading = false;
           this.alarmLoading = false;
+        } else {
+          this.alarmLoading = false;
+          this.alarmList = [{msg: '暂无报警数据'}]
         }
         }
       })
       })
       getWeekInfo({}).then(res => {
       getWeekInfo({}).then(res => {
@@ -427,6 +431,8 @@ export default {
         if(res.code === 10000) {
         if(res.code === 10000) {
           this.alarmPie = res.data;
           this.alarmPie = res.data;
           this.dayLoading = false;
           this.dayLoading = false;
+        } else {
+          this.dayLoading = false;
         }
         }
       })
       })
       getCountByDay({}).then(res => {
       getCountByDay({}).then(res => {
@@ -439,6 +445,8 @@ export default {
           })
           })
           this.pieData = res.data;
           this.pieData = res.data;
           this.pieLoading = false;
           this.pieLoading = false;
+        } else {
+          this.pieLoading = false;
         }
         }
       })
       })
     },
     },

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

@@ -38,11 +38,20 @@ export default {
     init() {
     init() {
       let that = this;
       let that = this;
       let options = {
       let options = {
+        title: {
+          text: '近7日数据',
+          left: 'center',
+          textStyle: {
+            fontSize: 16,
+            color: '#fff'
+          },
+          top: '5%'
+        },
         grid: {
         grid: {
           left: '2%',
           left: '2%',
           right: '2%',
           right: '2%',
           bottom: '2%',
           bottom: '2%',
-          top: '2%',
+          top: '5%',
           containLabel: true
           containLabel: true
         },
         },
         tooltip: {
         tooltip: {

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

@@ -140,7 +140,7 @@ export default {
             left: '22%',
             left: '22%',
             top: '43%',
             top: '43%',
             style: {
             style: {
-              text: '报警总量',
+              text: '今日报警总量',
               fontSize: 15,
               fontSize: 15,
               fill: 'rgb(192, 188, 189)'
               fill: 'rgb(192, 188, 189)'
             }
             }

+ 9 - 5
src/views/BioSafety/BioSafety.vue

@@ -315,9 +315,10 @@
 import { swiper, swiperSlide } from 'vue-awesome-swiper'
 import { swiper, swiperSlide } from 'vue-awesome-swiper'
 import 'swiper/css/swiper.css'
 import 'swiper/css/swiper.css'
 import ChartBar from "@/views/BioSafety/chart/ChartBar";
 import ChartBar from "@/views/BioSafety/chart/ChartBar";
-import {getCar, getRecord, getSizhu, getCarList, getPersonList, getFaceToken, getSizhuList, getHoure, getDoor, getCarWashVideo, getAlarmAndPig} from "@/utils/api";
+import {getCar, getRecord, getSizhu, getCarList, getPersonList, getSizhuList, getHoure, getDoor, getCarWashVideo, getAlarmAndPig} from "@/utils/api";
 import axios from "axios";
 import axios from "axios";
 import {timeDate} from "@/utils";
 import {timeDate} from "@/utils";
+import { mapState } from "vuex";
 
 
 export default {
 export default {
   name: "BioSafety",
   name: "BioSafety",
@@ -407,6 +408,9 @@ export default {
       cameraTwo: 'rtsp://admin:hmkj6688@172.16.3.180/cam/realmonitor?channel=1&subtype=0',
       cameraTwo: 'rtsp://admin:hmkj6688@172.16.3.180/cam/realmonitor?channel=1&subtype=0',
     }
     }
   },
   },
+  computed: {
+    ...mapState(['ip'])
+  },
   methods: {
   methods: {
     init() {
     init() {
       var that = this;
       var that = this;
@@ -448,7 +452,7 @@ export default {
           const result = JSON.parse(res.result);
           const result = JSON.parse(res.result);
           this.carListContent = result.data.pageData;
           this.carListContent = result.data.pageData;
           this.carListContent.forEach((item) => {
           this.carListContent.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];
             item.devChnName = item.devChnName.split("_")[0];
           });
           });
           // this.carListContent = res.data;
           // this.carListContent = res.data;
@@ -465,10 +469,10 @@ export default {
       getPersonList(params1).then(async res => {
       getPersonList(params1).then(async res => {
           let result = JSON.parse(res.result);
           let result = JSON.parse(res.result);
           this.personList = result.data.pageData;
           this.personList = result.data.pageData;
-          const { token } = await getFaceToken();
+
           this.personList.forEach((item) => {
           this.personList.forEach((item) => {
             item.channelName = item.channelName.split("人脸门禁")[0];
             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 = `${this.ip}/video/picture/get?alarmPicture=${item.recordImage}`;
           });
           });
           that.personLoading = false;
           that.personLoading = false;
         let queryParams = {
         let queryParams = {
@@ -551,7 +555,7 @@ export default {
           const result = JSON.parse(res.result);
           const result = JSON.parse(res.result);
           this.sizhuList = result.data.pageData;
           this.sizhuList = result.data.pageData;
           this.sizhuList.forEach((item) => {
           this.sizhuList.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}`;
           });
           });
         })
         })
 
 

+ 2 - 2
src/views/Home/Home.vue

@@ -126,11 +126,11 @@
           <div class="case-content">
           <div class="case-content">
             <div class="case-one">
             <div class="case-one">
               <span style="padding-left: 20px; padding-right: 40px">今日累计</span>
               <span style="padding-left: 20px; padding-right: 40px">今日累计</span>
-              <span><strong class="sign">325</strong>kw/h</span>
+              <span><strong class="sign">0</strong>kw/h</span>
             </div>
             </div>
             <div class="case-one">
             <div class="case-one">
               <span style="padding-left: 20px; padding-right: 40px">本月累计</span>
               <span style="padding-left: 20px; padding-right: 40px">本月累计</span>
-              <span><strong class="sign">9325</strong>kw/h</span>
+              <span><strong class="sign">0</strong>kw/h</span>
             </div>
             </div>
           </div>
           </div>
         </div>
         </div>