Jelajahi Sumber

监控右边列表对应左边视频框

yf_wsy 3 tahun lalu
induk
melakukan
96fc3f644f
4 mengubah file dengan 15804 tambahan dan 32 penghapusan
  1. 2 2
      config/index.js
  2. 15786 20
      package-lock.json
  3. 2 1
      src/components/Index.vue
  4. 14 9
      src/pages/Monitor.vue

+ 2 - 2
config/index.js

@@ -14,7 +14,7 @@ module.exports = {
         // target: 'http://192.168.1.8:8000/',
         // target: 'http://192.168.1.112:8005/',
         // target: 'http://192.168.1.106:8000/',
-        target: 'http://192.168.1.123:8005/',
+        target: 'http://192.168.1.66:9000/',
         changeOrigin: true,
         pathRewrite: {
           '/': '' //重写接口
@@ -22,7 +22,7 @@ module.exports = {
       },
     },
     // Various Dev Server settings
-    host: '192.168.1.123', // can be overwritten by process.env.HOST
+    host: '192.168.1.66', // can be overwritten by process.env.HOST
     port: 8003, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     errorOverlay: true,

File diff ditekan karena terlalu besar
+ 15786 - 20
package-lock.json


+ 2 - 1
src/components/Index.vue

@@ -4,7 +4,7 @@
       <div v-if="userinfo.logo">
         <img
           :src="userinfo.logo"
-          alt=""jktype
+          alt="jktype"
           style="position: absolute; left: 20px; top: 20px; max-width: 250px"
         />
       </div>
@@ -139,6 +139,7 @@
               <el-tree
                 :data="data"
                 :props="defaultProps"
+                :default-expand-all="true"
                 @node-click="handleNodeClick"
                 @node-contextmenu="rightClick"
               ></el-tree>

+ 14 - 9
src/pages/Monitor.vue

@@ -88,7 +88,7 @@
               class="iconfont icon-quanping fSBtn"
             ></i>
             <div
-              style="width: 100%; height: 100%"
+              style="width: 90%; height: 90%"
               :id="'my-video' + count"
             ></div>
           </div>
@@ -207,7 +207,8 @@
             class="playBack"
             @click="playBackDialogVisible = true"
           ></div> -->
-          <div @click="taskFacility"  v-show="addrPolt" class="addequip"></div>
+          <!-- <div @click="taskFacility"  v-show="addrPolt" class="addequip"></div> -->
+          <div @click="addEquipDialogVisible = true" class="addequip"></div>
           <div @click="fScreenFun()" class="fSBtn1"></div>
         </div>
       </div>
@@ -274,7 +275,7 @@
       </div>
     </el-dialog>
     <!-- 添加设备 -->
-    <!-- <el-dialog
+     <el-dialog
       title="添加设备"
       :visible.sync="addEquipDialogVisible"
       width="400px"
@@ -307,7 +308,7 @@
         <el-button @click="addEquipDialogVisible = false">取 消</el-button>
         <el-button type="primary" @click="addEquipSubm">确定</el-button>
       </div>
-    </el-dialog> -->
+    </el-dialog> 
   </div>
 </template>
 <script>
@@ -333,7 +334,7 @@ export default {
       html: "", //插件播放内容
       picUrl: "", //视频拍照地址
       playBackDialogVisible: false,
-      // addEquipDialogVisible: false,
+      addEquipDialogVisible: false,
       fScreen: false, //默认多个监控非全屏
       oneFScreen: false, //单个监控全屏状态
       btnFlag: true, //全屏按钮显示控制
@@ -367,7 +368,7 @@ export default {
       siteVal: "",
       plotDataArr: [], // 地块原始数据数组
       plotData: {},
-      addrPolt: false, // 设备分配判断
+      addrPolt: true, // 设备分配判断
     };
   },
   filters: {
@@ -389,6 +390,7 @@ export default {
   },
   watch: {
     siteVal(val) {
+      console.log("11111111111111",val);
       if (val !== '') {
         this.addrPolt = true
       } else {
@@ -423,7 +425,7 @@ export default {
           page: this.currPage,
           equip_type: 2,
           site_id: id,
-          page_size: 19,
+          page_size: 12,
           plot_id: this.plotData.plot_id !== undefined ? this.plotData.plot_id : '',
         }),
       }).then((res) => {
@@ -442,10 +444,11 @@ export default {
           page: this.currPage,
           equip_type: 2,
           site_id: this.objData.id,
-          page_size: 19,
+          page_size: 12,
         }),
       }).then((res) => {
         this.Idlist = res.data.data;
+        this.initMonitor()
       });
     },
     //视频分页
@@ -521,8 +524,10 @@ export default {
     //分屏默认显示视频
     initMonitor() {
       this.id = this.Idlist[0].device_id; //第一台设备id
+      console.log("IdlistIdlistIdlistIdlist",this.Idlist);
       this.videotape = this.Idlist[0].videotape; //第一台是否有回放
       this.divName = "my-video1"; //第一台选中
+      console.log("divNamedivName",this.divName);
       this.selected = 1; //第一台选中
       for (let item = 1; item < this.divNum + 1; item++) {
         if (this.Idlist[item - 1]) {
@@ -945,7 +950,7 @@ li {
       font-size: 14px;
       .viewLists {
         // height: 50%;
-        height: 75%;
+        height: 442px;
         overflow: auto;
         padding: 0;
         li {