Browse Source

Merge branch 'master' of http://60.171.161.56:20000/tjf/deviceManage

andywu 1 week ago
parent
commit
a5573d50dd

+ 10 - 0
ruoyi-ui/src/api/manage/equipmentManage.js

@@ -9,6 +9,16 @@ export function listEquipmentManage(query) {
   })
 }
 
+// 查询设备管理列表
+export function listEquipmentManageNoPage(query) {
+  return request({
+    url: '/manage/equipmentManage/listNoPage',
+    method: 'get',
+    params: query
+  })
+}
+
+
 // 查询设备管理详细
 export function getEquipmentManage(equipmentId) {
   return request({

+ 83 - 23
ruoyi-ui/src/views/shipinggaoj/channelNumber/index.vue

@@ -119,29 +119,61 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-
     <!-- 添加或修改通道管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
-        <el-form-item label="通道编号" prop="channelNum">
-          <el-input v-model="form.channelNum" placeholder="请输入通道编号" />
-        </el-form-item>
-        <el-form-item label="视频地址" prop="videoAddress">
-          <el-input v-model="form.videoAddress" placeholder="请输入视频地址" />
-        </el-form-item>
-        <el-form-item label="探测协议类型" prop="protocolType">
-                  <el-select style="width:100%" v-model="form.protocolType" placeholder="请选择探测协议类型">
-                    <el-option
-                      v-for="dict in dict.type.probing_protocol"
-                      :key="dict.value"
-                      :label="dict.label"
-                      :value="dict.value"
-                    ></el-option>
-                  </el-select>
-                </el-form-item>
-        <el-form-item label="通道描述" prop="channelDetails">
-          <el-input v-model="form.channelDetails" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="选择设备" prop="channelNum">
+              <el-select style="width: 100%;" v-model="form.equipmentId" placeholder="请选择">
+                  <el-option
+                  @click.native="issheg(item)"
+                    v-for="item in equipmentManageList"
+                    :key="item.equipmentId"
+                    :label="item.equipmentName"
+                    :value="item.equipmentId">
+                  </el-option>
+                </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="编号" prop="channelNum">
+              <el-input v-model="form.channelNum" placeholder="请输入通道编号" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="视频地址" prop="videoAddress">
+              <el-input v-model="form.videoAddress" placeholder="请输入视频地址" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="账号" prop="account">
+              <el-input v-model="form.account" placeholder="请输入账号" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="探测协议类型" prop="protocolType">
+                      <el-select style="width:100%" v-model="form.protocolType" placeholder="请选择探测协议类型">
+                        <el-option
+                          v-for="dict in dict.type.probing_protocol"
+                          :key="dict.value"
+                          :label="dict.label"
+                          :value="dict.value"
+                        ></el-option>
+                      </el-select>
+                    </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="密码" prop="password">
+              <el-input v-model="form.password" placeholder="请输入密码" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="通道描述" prop="channelDetails">
+              <el-input v-model="form.channelDetails" type="textarea" placeholder="请输入内容" />
+            </el-form-item>
+          </el-col>
+        </el-row>
        <!-- <el-form-item label="删除标志" prop="delFlag">
           <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
         </el-form-item> -->
@@ -159,7 +191,7 @@
 
 <script>
 import { listChannelNumber, getChannelNumber, delChannelNumber, addChannelNumber, updateChannelNumber } from "@/api/system/channelNumber"
-
+import { listEquipmentManageNoPage,  } from "@/api/manage/equipmentManage"
 export default {
   name: "ChannelNumber",
   dicts: ['probing_protocol'],
@@ -199,12 +231,20 @@ export default {
         channelNum: [
                   { required: true, message: "不能为空", trigger: "blur" }
                 ],
+        account: [
+                  { required: true, message: "不能为空", trigger: "blur" }
+                ],
+        password: [
+                  { required: true, message: "不能为空", trigger: "blur" }
+                ],
       },
        tableMaxHeight:'200',
+       equipmentManageList:[]
     }
   },
   created() {
     this.getList()
+    this.getListsehb()
     window.onresize = () => {
     	      this.changeTableMaxHeight()
     	    }
@@ -226,6 +266,14 @@ export default {
         this.loading = false
       })
     },
+    /** 查询设备管理列表 */
+        getListsehb() {
+          this.loading = true
+          listEquipmentManageNoPage().then(response => {
+            this.equipmentManageList = response.rows
+            this.loading = false
+          })
+        },
     // 取消按钮
     cancel() {
       this.open = false
@@ -244,7 +292,8 @@ export default {
         createTime: null,
         updateBy: null,
         updateTime: null,
-        remark: null
+        remark: null,
+        equipmentId:null
       }
       this.resetForm("form")
     },
@@ -269,6 +318,11 @@ export default {
       this.reset()
       this.open = true
       this.title = "添加通道管理"
+      if(this.equipmentManageList.length !=0){
+        this.form.equipmentId = this.equipmentManageList[0].equipmentId
+        this.form.equipmentNum = this.equipmentManageList[0].equipmentNum
+        this.form.equipmentName = this.equipmentManageList[0].equipmentName
+      }
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -316,6 +370,12 @@ export default {
         ...this.queryParams
       }, `channelNumber_${new Date().getTime()}.xlsx`)
     },
+    // 设备选择
+    issheg(row){
+      this.form.equipmentId = row.equipmentId
+      this.form.equipmentNum = row.equipmentNum
+      this.form.equipmentName = row.equipmentName
+    },
     // 获取屏幕高度
         showFilterForm () {
               this.filterActive = !this.filterActive

+ 41 - 10
ruoyi-ui/src/views/shipinggaoj/huabuhaik/index.vue

@@ -82,7 +82,9 @@
         <!-- v-if="isshoe" -->
         <el-col :span='14' style="padding-left: 30px; background-color: #fff;border-radius: 10px;padding: 20px; height: 100vh;" >
           <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 18px;">
-            <p style="margin: 0;border-left: 6px solid #03BF8A;margin-left: -20px;padding-left: 10px;font-weight: 800;">实时预览</p>
+            <p style="margin: 0;border-left: 6px solid #03BF8A;margin-left: -20px;padding-left: 10px;font-weight: 800;">实时预览
+
+            </p>
             <div>
 
               <!-- <el-button type="danger" plain>删除</el-button>
@@ -93,6 +95,7 @@
             </div>
           </div>
           <div class="dflext mb10">
+
             <div>
               <el-button type="primary"  @click="clickEnableDraw">绘图</el-button>
               <el-button type="primary" plain @click="clickAddSnapPolygon">添加图形</el-button>
@@ -107,8 +110,10 @@
             </div>
             <!-- <el-button type="primary" plain @click="clickCapturePic">抓图</el-button> -->
           </div>
+          <span style="font-size: 12px;color: red;">先点击绘图按钮,在点击添加图片按钮开始绘制,若绘制多个框每次绘制前需点击添加图片按钮,绘制完成后点击获取坐标点
+          。</span>
          <div style="width: 100%; height: 480px;">
-           <div v-if="isfse" id="divPlugin" style="width: 100%; height: 480px;" ></div>
+           <div v-if="isfse" id="divPlugin" style="width: 100%; height: 440px;" ></div>
 
          </div>
 
@@ -343,7 +348,7 @@ export default {
   },
   created() {
     this.isfse = false
-    this.getList();
+    // this.getList();
     this.getListtd()
   window.onresize = () => {
   	      this.changeTableMaxHeight()
@@ -383,7 +388,21 @@ export default {
       let queryParams = {}
       listChannelNumbernopa().then(response => {
         this.channelNumberList = response.rows
-        this.total = response.total
+        if(this.channelNumberList.length !=0){
+                  let snghs = this.channelNumberList[0].videoAddress.split('@')
+                  let snghst = snghs[1].split(':')
+                  let snsgduan = snghst[1].split('/')
+                   console.log(snghs,snghst,snsgduan)
+                  let sgse={'ip':snghst[0],'duank':snsgduan[0],
+                  'account':this.channelNumberList[0].account,
+                  'password':this.channelNumberList[0].password,
+                  }
+           this.getVideo(sgse)
+           WebVideoCtrl.I_ShowPlugin()
+           this.loading = false
+        }
+        // getWarnManage(this.$route.query.id).then(response => {
+          // this.form = response.data
         this.loading = false
       })
     },
@@ -618,14 +637,23 @@ export default {
       this.isfse = false
       if(WebVideoCtrl){
         console.log(this.szDeviceIdentify)
+        this.clickDelAllSnapPolygon()
       	WebVideoCtrl.I_Logout(this.szDeviceIdentify)
         WebVideoCtrl.I_StopAllPlay()
       	WebVideoCtrl.I_DestroyPlugin()
         WebVideoCtrl.I_Resize()
       }
-      	// WebVideoCtrl.I_StopAllPlay()
+      let snghs = val.videoAddress.split('@')
+             let snghst = snghs[1].split(':')
+             let snsgduan = snghst[1].split('/')
+              console.log(snghs,snghst,snsgduan)
+             let sgse={'ip':snghst[0],'duank':snsgduan[0],
+             'account':val.account,
+             'password':val.password,
+             }
+      this.getVideo(sgse)
+      WebVideoCtrl.I_ShowPlugin()
       // this.clickStartRealPlay('192.168.101.64', '80',1, 0, 1);
-      this.getVideo()
 
     },
 
@@ -670,8 +698,6 @@ export default {
 					this.player.play()
 					console.log('播放')
 				},900)
-
-
 	          }
 	        }, 500);
 	      },
@@ -751,7 +777,11 @@ export default {
     this.loading = true
     // getWarnManage(this.$route.query.id).then(response => {
       // this.form = response.data
-
+     const url = new URL('rtsp://admin:zxy123456@192.168.101.64:554/h264/ch1/main/av_stream');
+             const auth = url.username + ':' + url.password;
+             console.log(url.username,url.password,8)
+             // this.username = url.username;
+             // this.password = url.password;
       this.getVideo()
       WebVideoCtrl.I_ShowPlugin()
       this.loading = false
@@ -1160,7 +1190,8 @@ export default {
     getVideo(row) {
     	var that=this;
        this.isfse  = true
-    	this.initVideoPlay('192.168.101.64', '80', 'admin', 'zxy123456','divPlugin')
+       console.log(row)
+    	this.initVideoPlay(row.ip, '80', row.account, row.password,'divPlugin')
     },
     // 有插件
     initVideoPlay(ip, port, username, password,id) {