heyang 2 years ago
parent
commit
772e3f31b9

+ 3 - 27
src/api/executeThePlan.js

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

+ 3 - 27
src/api/laboratory/subject.js

@@ -128,35 +128,11 @@ export function startUrl(data) {
   })
 }
 
-//根据ID查询摄像头地址(南湖)
-export function startUrlNH(query) {
-  return request({
-    url: '/nanhu/api/play/startList/',
-    type:'video',
-    method: 'get',
-    params: 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({
-    url: '/wenchang/api/play/startList/',
-    type:'video',
-    method: 'get',
-    params: query
-  })
-}
+
+
+
 
 //播放文字接口
 export function mangerVoice(data,id) {

+ 5 - 5
src/views/comprehensive/laboratoryManagement/subject/index.vue

@@ -261,7 +261,7 @@
 import mqtt from 'mqtt'
 import flvjs from 'flv.js'
 import { hardWareControl,alarmControl } from "@/api/laboratory/hardware";
-import { authListSubject,subjectInfo,updateSubject,mangerVoice,startUrl,startUrlJiNanDaXue } from "@/api/laboratory/subject";
+import { authListSubject,subjectInfo,updateSubject,mangerVoice,startUrl, } from "@/api/laboratory/subject";
 import { filterDept } from "@/api/medicUniversity-3_1/index";
 import addSubject from "./addSubject.vue";
 import deviceList from "./deviceList.vue";
@@ -528,7 +528,7 @@ export default {
             page:"1",
           };
           let urlText = window.location.href;
-          if(urlText.indexOf(localStorage.getItem('cameraIntranetAgent')) != -1){
+          if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
             startUrl(obj).then(res => {
               if(res.code == 200){
                 if(!res.data[0]){
@@ -552,7 +552,7 @@ export default {
               }
             });
           }else{
-            startUrlJiNanDaXue(obj).then(res => {
+            startUrl(obj).then(res => {
               if(res.code == 200){
                 if(!res.data[0]){
                   this.msgError("视频配置异常请联系管理员")
@@ -639,7 +639,7 @@ export default {
                 page:"1",
               };
               let urlText = window.location.href;
-              if(urlText.indexOf(localStorage.getItem('cameraIntranetAgent')) != -1){
+              if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
                 startUrl(obj).then(res => {
                   if(res.code == 200){
                     if(!res.data[0]){
@@ -665,7 +665,7 @@ export default {
                   }
                 });
               }else{
-                startUrlJiNanDaXue(obj).then(res => {
+                startUrl(obj).then(res => {
                   if(res.code == 200){
                     if(!res.data[0]){
                       this.msgError("视频配置异常请联系管理员")

+ 3 - 60
src/views/comprehensive/laboratoryManagement/subject/indexOne.vue

@@ -280,7 +280,7 @@
 import mqtt from 'mqtt'
 import flvjs from 'flv.js'
 import { hardWareControl,alarmControl } from "@/api/laboratory/hardware";
-import { authListSubject,subjectInfo,updateSubject,mangerVoice,startUrl,startUrlWC,getDetalis } from "@/api/laboratory/subject";
+import { authListSubject,subjectInfo,updateSubject,mangerVoice,startUrl,getDetalis } from "@/api/laboratory/subject";
 import { filterDept } from "@/api/medicUniversity-3_1/index";
 import addSubject from "./addSubject.vue";
 import deviceList from "./deviceListOne.vue";
@@ -546,63 +546,6 @@ export default {
         }
         this.$set(this.newData,'labHardwareVOListTwo',listTwo);
         this.pageType = 6;
-        // let obj = {
-        //   count:"100",
-        //   deviceIds:list.join(),
-        //   page:"1",
-        // };
-        // let urlText = window.location.href;
-        // if(urlText.indexOf("192.168") != -1){
-        //   startUrl(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 obj = {
-        //             name:response.data.name + response.data.subAddrr.room,
-        //             videoType:"flv",
-        //             divId:'divId'+i,
-        //             url:res.data[i].result.body.data.ws_flv,
-        //           }
-        //           videoList.push(obj)
-        //         }
-        //         this.$set(this.newData,'videoData',videoList);
-        //         this.pageType = 6;
-        //       }
-        //     }
-        //   });
-        // }else{
-        //   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 = 'wss://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,
-        //           }
-        //           videoList.push(obj)
-        //         }
-        //         this.$set(this.newData,'videoData',videoList);
-        //         this.pageType = 6;
-        //       }
-        //     }
-        //   });
-        // }
       })
     },
     // 开启关闭验证
@@ -659,7 +602,7 @@ export default {
                 page:"1",
               };
               let urlText = window.location.href;
-              if(urlText.indexOf(localStorage.getItem('cameraIntranetAgent')) != -1){
+              if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
                 startUrl(obj).then(res => {
                   if(res.code == 200){
                     if(!res.data[0]){
@@ -685,7 +628,7 @@ export default {
                   }
                 });
               }else{
-                startUrlWC(obj).then(res => {
+                startUrl(obj).then(res => {
                   if(res.code == 200){
                     if(!res.data[0]){
                       this.msgError("视频配置异常请联系管理员")

+ 5 - 5
src/views/comprehensive/laboratoryManagement/subject/indexTwo.vue

@@ -261,7 +261,7 @@
 import mqtt from 'mqtt'
 import flvjs from 'flv.js'
 import { hardWareControl,alarmControl } from "@/api/laboratory/hardware";
-import { authListSubject,subjectInfo,updateSubject,mangerVoice,startUrl,startUrlWC } from "@/api/laboratory/subject";
+import { authListSubject,subjectInfo,updateSubject,mangerVoice,startUrl } from "@/api/laboratory/subject";
 import { filterDept } from "@/api/medicUniversity-3_1/index";
 import addSubject from "./addSubject.vue";
 import deviceList from "./deviceList.vue";
@@ -527,7 +527,7 @@ export default {
             page:"1",
           };
           let urlText = window.location.href;
-          if(urlText.indexOf(localStorage.getItem('cameraIntranetAgent')) != -1){
+          if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
             startUrl(obj).then(res => {
               if(res.code == 200){
                 if(!res.data[0]){
@@ -551,7 +551,7 @@ export default {
               }
             });
           }else{
-            startUrlWC(obj).then(res => {
+            startUrl(obj).then(res => {
               if(res.code == 200){
                 if(!res.data[0]){
                   this.msgError("视频配置异常请联系管理员")
@@ -638,7 +638,7 @@ export default {
                 page:"1",
               };
               let urlText = window.location.href;
-              if(urlText.indexOf(localStorage.getItem('cameraIntranetAgent')) != -1){
+              if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
                 startUrl(obj).then(res => {
                   if(res.code == 200){
                     if(!res.data[0]){
@@ -664,7 +664,7 @@ export default {
                   }
                 });
               }else{
-                startUrlWC(obj).then(res => {
+                startUrl(obj).then(res => {
                   if(res.code == 200){
                     if(!res.data[0]){
                       this.msgError("视频配置异常请联系管理员")

+ 11 - 3
src/views/comprehensive/system/publicConfig/exploitConfig.vue

@@ -26,16 +26,24 @@
         <p>摄像头配置</p>
       </div>
       <div class="form-max-box">
-        <el-form-item label="代理访问地址:">
+        <el-form-item label="代理访问地址-外网:">
           <el-input placeholder="请输入"  v-model="form.cameraExtranetAgent">
             <template slot="prepend">https://</template>
           </el-input>
         </el-form-item>
-        <i class="tip"><i class="el-icon-question"></i>根据部署内外网环境来配置的调用地址</i>
+        <i class="tip"><i class="el-icon-question"></i>根据部署外网环境来配置的调用地址</i>
+      </div>
+      <div class="form-max-box">
+        <el-form-item label="代理访问地址-内网:">
+          <el-input placeholder="请输入"  v-model="form.cameraIntranetAgent">
+            <template slot="prepend">http://</template>
+          </el-input>
+        </el-form-item>
+        <i class="tip"><i class="el-icon-question"></i>根据部署内网环境来配置的调用地址</i>
       </div>
       <div class="form-max-box">
         <el-form-item label="内网地址IP段:">
-          <el-input placeholder="请输入"  v-model="form.cameraIntranetAgent" style="width: 300px">
+          <el-input placeholder="请输入"  v-model="form.ipIdentify" style="width: 300px">
           </el-input>
         </el-form-item>
         <i class="tip"><i class="el-icon-question"></i>用于判断用户当前访问的是内网地址还是外网地址</i>

+ 3 - 3
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,startUrlJiNanDaXue,startUrl } from '@/api/executeThePlan.js'
+  import { evacuate, closure, lineEvacuate, IntelligentGuidance,getRedis,getDeviceList,textParseUrlIps,getCameraByFloor,startUrl } from '@/api/executeThePlan.js'
   import mqtt from 'mqtt'
   import { subjectInfo } from "@/api/laboratory/subject";
   export default {
@@ -522,7 +522,7 @@
           deviceIds:list,
         };
         let urlText = window.location.href;
-        if(urlText.indexOf(localStorage.getItem('cameraIntranetAgent')) != -1){
+        if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
           const { data } = await startUrl(obj);
           if(data){
             self.videoPageList = [];
@@ -540,7 +540,7 @@
             this.videoPageNumButton({page:1,limit:4});
           }
         } else {
-          const { data } = await startUrlJiNanDaXue(obj);
+          const { data } = await startUrl(obj);
           if(data){
             self.videoPageList = [];
             for(let i=0;i<data.length;i++){

+ 3 - 3
src/views/emergencyEvacuationBigOne.vue

@@ -116,7 +116,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,startUrlWC,startUrl } from '@/api/executeThePlan.js'
+  import { evacuate, closure, lineEvacuate,getRedis,getDeviceList,textParseUrlIps,getCameraByFloor,startUrl } from '@/api/executeThePlan.js'
   import mqtt from 'mqtt'
   import { subjectInfo } from "@/api/laboratory/subject";
   export default {
@@ -543,7 +543,7 @@
           deviceIds:list,
         };
         let urlText = window.location.href;
-        if(urlText.indexOf(localStorage.getItem('cameraIntranetAgent')) != -1){
+        if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
           const { data } = await startUrl(obj);
           if(data){
             self.videoPageList = [];
@@ -561,7 +561,7 @@
             this.videoPageNumButton({page:1,limit:4});
           }
         } else {
-          const { data } = await startUrlWC(obj);
+          const { data } = await startUrl(obj);
           if(data){
             self.videoPageList = [];
             for(let i=0;i<data.length;i++){

+ 3 - 3
src/views/login.vue

@@ -145,7 +145,7 @@ export default {
           //摄像头代理访问地址
           localStorage.setItem('cameraExtranetAgent',urlText+response.data.cameraExtranetAgent)
           //摄像头地址ip段
-          localStorage.setItem('cameraIntranetAgent',response.data.cameraIntranetAgent)
+          localStorage.setItem('ipIdentify',response.data.ipIdentify)
           //摄像头访问地址
           localStorage.setItem('cameraUrl','wss://'+response.data.cameraExtranetUrl)
           //MQTT地址
@@ -160,9 +160,9 @@ export default {
           //文件预览地址
           localStorage.setItem('filePreviewUrl',urlText+response.data.fileIntranetUrl)
           //摄像头代理访问地址
-          localStorage.setItem('cameraExtranetAgent',urlText+response.data.cameraExtranetAgent)
+          localStorage.setItem('cameraExtranetAgent',urlText+response.data.cameraIntranetAgent)
           //摄像头地址ip段
-          localStorage.setItem('cameraIntranetAgent',response.data.cameraIntranetAgent)
+          localStorage.setItem('ipIdentify',response.data.ipIdentify)
           //摄像头访问地址
           localStorage.setItem('cameraUrl','wss://'+response.data.cameraIntranetUrl)
           //MQTT地址