dedsudiyu 2 years ago
parent
commit
e0efe40aec

+ 9 - 0
src/api/executeThePlan.js

@@ -88,3 +88,12 @@ export function startUrlNH(query) {
   })
 }
 
+//根据ID查询摄像头地址(暨南大学)
+export function startUrlJiNanDaXue(query) {
+  return request({
+    url: '/jinandaxue/api/play/startList/',
+    type:'video',
+    method: 'get',
+    params: query
+  })
+}

+ 10 - 0
src/api/laboratory/subject.js

@@ -138,6 +138,16 @@ export function startUrlNH(query) {
   })
 }
 
+//根据ID查询摄像头地址(暨南大学)
+export function startUrlJiNanDaXue(query) {
+  return request({
+    url: '/jinandaxue/api/play/startList/',
+    type:'video',
+    method: 'get',
+    params: query
+  })
+}
+
 //根据ID查询摄像头地址(文昌)
 export function startUrlWC(query) {
   return request({

+ 49 - 120
src/views/comprehensive/laboratoryManagement/subject/index.vue

@@ -258,7 +258,7 @@
   import mqtt from 'mqtt'
   import flvjs from 'flv.js'
   import { hardWareControl,alarmControl } from "@/api/laboratory/hardware";
-  import { authListSubject,subjectInfo,updateSubject,mangerVoice,startUrl,startUrlNH,startUrlWC } from "@/api/laboratory/subject";
+  import { authListSubject,subjectInfo,updateSubject,mangerVoice,startUrl,startUrlJiNanDaXue } from "@/api/laboratory/subject";
   import { listDepartments } from "@/api/system/dept";
   import addSubject from "./addSubject.vue";
   import deviceList from "./deviceList.vue";
@@ -547,68 +547,32 @@
                 }
               });
             }else{
-              if(response.data.deptId == 102){
-                startUrlWC(obj).then(res => {
-                  if(res.code == 200){
-                    if(!res.data[0]){
-                      this.msgError("视频配置异常请联系管理员")
-                      this.newData.videoData = [];
-                      this.pageType = 6;
-                    }else{
-                      let videoList = [];
-                      for(let i=0;i<res.data.length;i++){
-                        // let text = window.location.href.split('://')[0]+'://' + 'lab.sxitdlc.com/wenchang/stream/';
-                        // let url = res.data[i].result.body.data.flv;
-                        let text = 'ws://lab.sxitdlc.com/wenchang/stream/';
-                        let url = res.data[i].result.body.data.ws_flv;
-                        url = url.split("rtp/");
-                        let newUrl = text+'rtp/'+url[1];
-                        let obj = {
-                          name:response.data.name + response.data.subAddrr.room,
-                          videoType:"flv",
-                          divId:'divId'+i,
-                          url:newUrl,
-                        }
-                        videoList.push(obj)
-                      }
-                      this.$set(this.newData,'videoData',videoList);
-                      this.pageType = 6;
-                    }
-                  }
-                });
-              }else if(response.data.deptId == 113){
-                startUrlNH(obj).then(res => {
-                  if(res.code == 200){
-                    if(!res.data[0]){
-                      this.msgError("视频配置异常请联系管理员")
-                      this.newData.videoData = [];
-                      this.pageType = 6;
-                    }else{
-                      let videoList = [];
-                      for(let i=0;i<res.data.length;i++){
-                        // let text = window.location.href.split('://')[0]+'://' + 'lab.sxitdlc.com/nanhu/stream/';
-                        // let url = res.data[i].result.body.data.flv;
-                        let text = 'ws://lab.sxitdlc.com/nanhu/stream/';
-                        let url = res.data[i].result.body.data.ws_flv;
-                        url = url.split("rtp/");
-                        let newUrl = text+'rtp/'+url[1];
-                        let obj = {
-                          name:response.data.name + response.data.subAddrr.room,
-                          videoType:"flv",
-                          divId:'divId'+i,
-                          url:newUrl,
-                        }
-                        videoList.push(obj)
+              startUrlJiNanDaXue(obj).then(res => {
+                if(res.code == 200){
+                  if(!res.data[0]){
+                    this.msgError("视频配置异常请联系管理员")
+                    this.newData.videoData = [];
+                    this.pageType = 6;
+                  }else{
+                    let videoList = [];
+                    for(let i=0;i<res.data.length;i++){
+                      let text = 'ws://lab.sxitdlc.com/jinandaxue/stream/';
+                      let url = res.data[i].result.body.data.ws_flv;
+                      url = url.split("rtp/");
+                      let newUrl = text+'rtp/'+url[1];
+                      let obj = {
+                        name:response.data.name + response.data.subAddrr.room,
+                        videoType:"flv",
+                        divId:'divId'+i,
+                        url:newUrl,
                       }
-                      this.$set(this.newData,'videoData',videoList);
-                      this.pageType = 6;
+                      videoList.push(obj)
                     }
+                    this.$set(this.newData,'videoData',videoList);
+                    this.pageType = 6;
                   }
-                });
-              }else{
-                this.$set(this.newData,'videoData',[]);
-                this.pageType = 6;
-              }
+                }
+              });
             }
           })
         },
@@ -692,69 +656,34 @@
                       }
                     });
                   }else{
-                    if(this.checkedSubject.deptId == 102){
-                      startUrlWC(obj).then(res => {
-                        if(res.code == 200){
-                          if(!res.data[0]){
-                            this.msgError("视频配置异常请联系管理员")
-                            return
-                          }
-                          let videoList = [];
-                          for(let i=0;i<res.data.length;i++){
-                            // let text = window.location.href.split('://')[0]+'://' + 'lab.sxitdlc.com/wenchang/stream/';
-                            // let url = res.data[i].result.body.data.flv;
-                            let text = 'ws://lab.sxitdlc.com/wenchang/stream/';
-                            let url = res.data[i].result.body.data.ws_flv;
-                            url = url.split("rtp/");
-                            let newUrl = text+'rtp/'+url[1];
-                            let obj = {
-                              name:self.checkedSubject.name + self.checkedSubject.subAddrr.room,
-                              videoType:"flv",
-                              divId:'divId'+i,
-                              url:newUrl,
-                            }
-                            videoList.push(obj)
-                          }
-                          this.$set(this.checkedSubject,'videoData',videoList);
-                          if(this.rightButtonType == 3){
-                            setTimeout(function(){
-                              self.videoFunction();
-                            },1000);
-                          }
+                    startUrlJiNanDaXue(obj).then(res => {
+                      if(res.code == 200){
+                        if(!res.data[0]){
+                          this.msgError("视频配置异常请联系管理员")
+                          return
                         }
-                      });
-                    }else if(this.checkedSubject.deptId == 113){
-                      startUrlNH(obj).then(res => {
-                        if(res.code == 200){
-                          if(!res.data[0]){
-                            this.msgError("视频配置异常请联系管理员")
-                            return
-                          }
-                          let videoList = [];
-                          for(let i=0;i<res.data.length;i++){
-                            // let text = window.location.href.split('://')[0]+'://' + 'lab.sxitdlc.com/nanhu/stream/';
-                            // let url = res.data[i].result.body.data.flv;
-                            let text = 'ws://lab.sxitdlc.com/nanhu/stream/';
-                            let url = res.data[i].result.body.data.ws_flv;
-                            url = url.split("rtp/");
-                            let newUrl = text+'rtp/'+url[1];
-                            let obj = {
-                              name:self.checkedSubject.name + self.checkedSubject.subAddrr.room,
-                              videoType:"flv",
-                              divId:'divId'+i,
-                              url:newUrl,
-                            }
-                            videoList.push(obj)
-                          }
-                          this.$set(this.checkedSubject,'videoData',videoList);
-                          if(this.rightButtonType == 3){
-                            setTimeout(function(){
-                              self.videoFunction();
-                            },1000);
+                        let videoList = [];
+                        for(let i=0;i<res.data.length;i++){
+                          let text = 'ws://lab.sxitdlc.com/jinandaxue/stream/';
+                          let url = res.data[i].result.body.data.ws_flv;
+                          url = url.split("rtp/");
+                          let newUrl = text+'rtp/'+url[1];
+                          let obj = {
+                            name:self.checkedSubject.name + self.checkedSubject.subAddrr.room,
+                            videoType:"flv",
+                            divId:'divId'+i,
+                            url:newUrl,
                           }
+                          videoList.push(obj)
                         }
-                      });
-                    }
+                        this.$set(this.checkedSubject,'videoData',videoList);
+                        if(this.rightButtonType == 3){
+                          setTimeout(function(){
+                            self.videoFunction();
+                          },1000);
+                        }
+                      }
+                    });
                   }
                 }else{
                   this.$set(this.checkedSubject,'videoData',[]);

+ 3 - 5
src/views/emergencyEvacuationBig.vue

@@ -115,7 +115,7 @@
   import { lablayout, lineEvacuateTow } from "@/api/laboratory/emergencyEvacuation";
   import { getListStatus } from '@/api/bigData/index.js'
   import flvjs from 'flv.js'
-  import { evacuate, closure, lineEvacuate, IntelligentGuidance,getRedis,getDeviceList,textParseUrlIps,getCameraByFloor,startUrlNH,startUrl } from '@/api/executeThePlan.js'
+  import { evacuate, closure, lineEvacuate, IntelligentGuidance,getRedis,getDeviceList,textParseUrlIps,getCameraByFloor,startUrlJiNanDaXue,startUrl } from '@/api/executeThePlan.js'
   import mqtt from 'mqtt'
   export default {
     name: 'emergencyEvacuationBig',
@@ -523,13 +523,11 @@
             this.videoPageNumButton({page:1,limit:4});
           }
         } else {
-          const { data } = await startUrlNH(obj);
+          const { data } = await startUrlJiNanDaXue(obj);
           if(data){
             self.videoPageList = [];
             for(let i=0;i<data.length;i++){
-              // let text = window.location.href.split('://')[0]+'://' + 'lab.sxitdlc.com/nanhu/stream/';
-              // let url = data[i].result.body.data.flv;
-              let text = 'ws://lab.sxitdlc.com/nanhu/stream/';
+              let text = 'ws://lab.sxitdlc.com/jinandaxue/stream/';
               let url = data[i].result.body.data.ws_flv;
               url = url.split("rtp/");
               let newUrl = text+'rtp/'+url[1];

+ 24 - 8
src/views/medicUniversity-3_1/chemicalManagement/chemicalLibrary/ChemicalInfo/listPage.vue

@@ -326,15 +326,31 @@
         let self = this;
         this.$refs["dialogForm"].validate(valid => {
           if (valid) {
-            for(let i=0;i<self.dialogData.maxList.length;i++){
-              let maxNum = parseFloat(self.dialogData.maxList[i].maxNum);
-              let num = 0;
-              for(let o=0;o<self.dialogData.maxList[i].list.length;o++){
-                num = num + parseFloat(self.dialogData.maxList[i].list[o].chemicalAmount)
+            if(this.$store.state.settings.smartAlarmType == 0){
+              for(let i=0;i<self.dialogData.maxList.length;i++){
+                let maxNum = parseFloat(self.dialogData.maxList[i].maxNum);
+                let num = 0;
+                for(let o=0;o<self.dialogData.maxList[i].list.length;o++){
+                  num = num + parseFloat(self.dialogData.maxList[i].list[o].chemicalAmount)
+                }
+                if(num>maxNum){
+                  this.msgError(self.dialogData.maxList[i].name+' 总容器容量大于可存放量');
+                  return
+                }
               }
-              if(num>maxNum){
-                this.msgError(self.dialogData.maxList[i].name+' 总容器容量大于可存放量');
-                return
+            }else if(this.$store.state.settings.smartAlarmType == 1){
+              for(let i=0;i<self.dialogData.maxList.length;i++){
+                let maxNum = parseFloat(self.dialogData.maxList[i].maxNum);
+                let num = 0;
+                for(let o=0;o<self.dialogData.maxList[i].chemicalJoinCabinetSonList.length;o++){
+                  for(let x=0;x<self.dialogData.maxList[i].chemicalJoinCabinetSonList[o].list.length;x++){
+                    num = num + parseFloat(self.dialogData.maxList[i].chemicalJoinCabinetSonList[o].list[x].chemicalAmount)
+                  }
+                }
+                if(num>maxNum){
+                  this.msgError(self.dialogData.maxList[i].name+' 总容器容量大于可存放量');
+                  return
+                }
               }
             }
             let obj = {