pages-videoList-videoList.31d5a023.js 6.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-videoList-videoList"],{"23db":function(e,t,i){"use strict";(function(e){var n=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("96cf");var o=n(i("1da1")),a={data:function(){return{d:{CMD:1},deviceData:[],onLineVideoList:[],matchedDeviceList:[],modalName:null,openId:"",reCount:0,count:0,loadingStatus:!1}},onLoad:function(e){this.getDeviceManage({company_code:uni.getStorageSync("selectedCode")}),this.chk_video()},computed:{},methods:{chk_video:function(){var t=this;uni.request({url:"https://fire.usky.cn:8443/YtIoT/cgi-bin/demo2.cgi",data:"queryJson:"+JSON.stringify({CMD:1}),method:"post",header:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},success:function(i){if(t.onLineVideoList=i.data.RESULT.LIST,t.openId.length>0){e.log("doododododododo");for(var n=0;n<t.onLineVideoList.length;n++)if(t.openId==t.onLineVideoList[n].DEVICE)if(t.reCount++,t.onLineVideoList[n].ONAIR)++t.count>2?(t.loadingStatus=!1,uni.navigateTo({url:"/pages/videoList/videoDetail/videoDetail?deviceCode="+t.onLineVideoList[n].DEVICE})):setTimeout(t.chk_video,5e3);else{if(t.reCount>7){t.loadingStatus=!1,uni.showToast({title:"远程摄像头链接超时,请稍后再试",icon:"none"});break}setTimeout(t.chk_video,5e3)}}else{for(var o=0;o<t.onLineVideoList.length;o++)for(var a=0;a<t.deviceData.length;a++)t.onLineVideoList[o].DEVICE==t.deviceData[a].owner_code&&t.matchedDeviceList.push({DEVICE:t.onLineVideoList[o].DEVICE,ALIVEVALUE:t.onLineVideoList[o].ALIVEVALUE,ONAIR:t.onLineVideoList[o].ONAIR});e.log("this.matchedDeviceList"),e.log(t.matchedDeviceList)}}})},open_video:function(t){var i=this;this.openId!=t.DEVICE&&(this.openId=t.DEVICE),e.log("this.openId"),e.log(this.openId),e.log("this.onLineVideoList"),e.log(this.onLineVideoList);for(var n=0;n<this.onLineVideoList.length;n++)if(this.onLineVideoList[n].DEVICE==this.openId&&this.onLineVideoList[n].ONAIR)return void uni.navigateTo({url:"/pages/videoList/videoDetail/videoDetail?deviceType=2&companyCode="+uni.getStorageSync("selectedCode")+"&deviceCode="+t.DEVICE});this.count=0,this.reCount=0,this.loadingStatus=!0,uni.request({url:"https://fire.usky.cn:8443/YtIoT/cgi-bin/demo2.cgi",data:"queryJson:"+JSON.stringify({CMD:3,BODY:{DEVICE:t.DEVICE,ACTION:1,IDX:7}}),method:"post",header:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},success:function(e){setTimeout(i.chk_video,5e3)}})},getDeviceManage:function(){var t=arguments,i=this;return(0,o.default)(regeneratorRuntime.mark((function n(){var o,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=t.length>0&&void 0!==t[0]?t[0]:{},n.next=3,i.$myRequest({url:"VideoMonitoring/getVideoList",data:o});case 3:a=n.sent,i.deviceData=a.data.data,e.log(i.deviceData);case 6:case"end":return n.stop()}}),n)})))()}}};t.default=a}).call(this,i("5a52")["default"])},"37f0":function(e,t,i){"use strict";i.r(t);var n=i("d16b"),o=i("f9a2");for(var a in o)"default"!==a&&function(e){i.d(t,e,(function(){return o[e]}))}(a);i("69d2");var s,r=i("f0c5"),c=Object(r["a"])(o["default"],n["b"],n["c"],!1,null,"26d71db0",null,!1,n["a"],s);t["default"]=c.exports},"69d2":function(e,t,i){"use strict";var n=i("bdf6"),o=i.n(n);o.a},bc02:function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.loadingMask[data-v-26d71db0]{width:100%;height:100%;position:absolute;left:0;background:rgba(0,0,0,.3);z-index:1000;color:#000;justify-content:center;align-items:center;display:flex;text-align:center;padding-top:%?100?%;font-size:%?34?%}',""]),e.exports=t},bdf6:function(e,t,i){var n=i("bc02");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4f06").default;o("07470d45",n,!0,{sourceMap:!1,shadowMode:!1})},d16b:function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return n}));var o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{},[e.loadingStatus?i("v-uni-view",{staticClass:"loadingMask"},[e._v("Loading...")]):e._e(),i("v-uni-view",{staticClass:"cu-list menu-avatar"},[this.openId||this.onLineVideoList.length?e._e():i("v-uni-view",{staticClass:"text-center margin-top-lg"},[e._v("加载中...")]),!this.matchedDeviceList.length&&this.onLineVideoList.length?i("v-uni-view",{staticClass:"text-center margin-top-lg"},[e._v("暂无数据")]):e._e(),e._l(e.matchedDeviceList,(function(t,n){return i("v-uni-view",{key:n,staticClass:"cu-item",class:e.modalName=="move-box-"+n?"move-cur":"",attrs:{"data-target":"move-box-"+n}},[3==t.ALIVEVALUE?i("v-uni-view",{staticClass:"cu-avatar round lg",staticStyle:{opacity:".7"}},[i("v-uni-image",{staticClass:"image-bg",attrs:{src:"/static/video-icon-on.png"}})],1):i("v-uni-view",{staticClass:"cu-avatar round lg",staticStyle:{opacity:".7"}},[i("v-uni-image",{staticClass:"image-bg",attrs:{src:"/static/video-icon-off.png"}})],1),3==t.ALIVEVALUE?i("v-uni-view",{on:{click:function(i){arguments[0]=i=e.$handleEvent(i),e.open_video(t)}}},[i("v-uni-view",{staticClass:"content"},[i("v-uni-view",{},[e._v(e._s(t.DEVICE))])],1),i("v-uni-view",{staticClass:"nav-right num"},[i("v-uni-view",{staticClass:"online"},[e._v("在线"),i("v-uni-text",{staticClass:"icon iconfont margin-right-xs margin-left-lg"},[e._v("")])],1)],1)],1):i("v-uni-view",[i("v-uni-view",{staticClass:"content"},[i("v-uni-view",{},[e._v(e._s(t.DEVICE))])],1),i("v-uni-view",{staticClass:"nav-right num"},[i("v-uni-view",{staticClass:"offline"},[e._v("离线"),i("v-uni-text",{staticClass:"icon iconfont margin-right-xs margin-left-lg"},[e._v("")])],1)],1)],1)],1)}))],2),i("v-uni-input",{staticStyle:{opacity:"0"},attrs:{type:"hidden"},model:{value:e.openId,callback:function(t){e.openId=t},expression:"openId"}})],1)},a=[]},f9a2:function(e,t,i){"use strict";i.r(t);var n=i("23db"),o=i.n(n);for(var a in n)"default"!==a&&function(e){i.d(t,e,(function(){return n[e]}))}(a);t["default"]=o.a}}]);