2124-legacy.0ed01c98.js 13 KB

1
  1. "use strict";(self["webpackChunkyui_pc"]=self["webpackChunkyui_pc"]||[]).push([[2124],{6239:function(t,e,i){i.d(e,{A:function(){return d}});i(62010);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"hui-left-tree"},[e("div",{staticClass:"hui-left-tree-title"},[e("svg-icon",{attrs:{name:"zhuangshi",width:"16",height:"20"}}),e("span",{staticClass:"hui-left-tree-sub"},[t._v(t._s(t.title))])],1),e("div",{staticClass:"hui-left-tree-content"},[e("el-collapse",t._l(t.treeData,(function(i){return e("el-collapse-item",{key:i.id},[e("template",{slot:"title"},[e("i",{staticClass:"iconfont huifont-shuzhuangcaidantubiao"}),e("span",{staticClass:"el-collapse-name"},[t._v(t._s(i.name))])]),e("div",[e("el-tree",{attrs:{data:i.projectItemTargetList,props:t.defaultProps},scopedSlots:t._u([{key:"default",fn:function(i){var n=i.node,o=i.data;return e("div",{staticClass:"custom-tree-node"},[e("div",{staticClass:"label"},[t._v(t._s(n.label))]),!t.hasRoom||o.roomId?e("div",{class:t.nowData.id===o.id?"active":"",on:{click:function(e){return e.stopPropagation(),t.nodeClick(o)}}},[e("i",{class:t.iconfontClass})]):t._e()])}}],null,!0)})],1)],2)})),1)],1)])},o=[],r=(i(28706),i(62062),i(6414)),a=i(27039),s={props:{title:{type:String,default:"空间列表"},iconfontClass:{type:String,default:"iconfont huifont-shexiangtou"},type:{type:String,default:""},hasRoom:{type:Boolean,default:!1},isCancel:{type:Boolean,default:!0}},data:function(){return{treeData:[],defaultProps:{children:"children",label:"name"},nowData:{}}},mounted:function(){this.init()},methods:{init:function(){var t=this;(0,r.fb)(this.$store.getters.project.id).then((function(e){if(e.state)if(t.hasRoom){t.defaultProps["label"]="optionName",t.treeData=(0,a.mz)(e.data.projectItemList||[]);for(var i=[],n=0;n<t.treeData.length;n++)if(t.treeData[n].projectItemTargetList)for(var o=0;o<t.treeData[n].projectItemTargetList.length;o++)t.treeData[n].projectItemTargetList[o].projectItemTargetRoomList&&(i=i.concat(t.treeData[n].projectItemTargetList[o].projectItemTargetRoomList));"isInit"!==t.type||t.nowData.id||t.nodeClick(i[0],"isInit")}else t.defaultProps["label"]="name",t.treeData=e.data.projectItemList.map((function(e){return e.projectItemTargetList=e.projectItemTargetList.map((function(i){return i["bimIntegrateId"]=e.bimIntegrateId,i["projectItemName"]=e.name,"isInit"!==t.type||t.nowData.id||t.nodeClick(i,"isInit"),i})),e})),0===t.treeData.length&&t.nodeClick({},"isInit")}))},nodeClick:function(t,e){if(this.isCancel)this.nowData=this.nowData.id===t.id?{}:t,this.$emit("treeclick",this.nowData,e);else{if(this.nowData.id===t.id)return;this.nowData=t,this.$emit("treeclick",this.nowData,e)}}}},c=s,u=i(845),l=(0,u.A)(c,n,o,!1,null,null,null),d=l.exports},20024:function(t,e,i){i.r(e),i.d(e,{default:function(){return y}});i(62010);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"work-monitor"},[e("div",{staticClass:"yui-tree-box"},[e("project-item-tree",{attrs:{type:"isInit"},on:{treeclick:t.treeclick}}),t.isInit?e("div",{staticClass:"hui-tree-content"},[e("bim-model",{ref:"operationModels",attrs:{type:"monitor",item:t.target},on:{click3DMaker:t.clickVideo}})],1):t._e(),e("div",{staticClass:"placeholder"})],1),e("div",{class:"monitor-box"+(t.isOpen?" open":"")},[e("div",{staticClass:"monitor-tag",on:{click:function(e){t.isOpen=!t.isOpen}}},[t._m(0)]),e("div",{staticClass:"hui-flex box-background"},[e("div",{staticClass:"monitor-box-title"},[t.target.id?e("span",[t._v(t._s(t.target.projectItemName)+" / "+t._s(t.target.name))]):e("span",[t._v("全部列表")])]),0===t.list.length?e("div",{staticClass:"hui-flex-box hui-no-tips"},[e("empty",{attrs:{description:"该位置暂未绑定摄像头",width:"120"}})],1):e("div",{staticClass:"monitor-list hui-flex-box"},t._l(t.list,(function(i,n){return e("div",{key:i.id,staticClass:"monitor-item"},[e("div",{staticClass:"monitor-item-box"},[e("play-video",{ref:i.deviceSerialNumber,refInFor:!0,attrs:{sourceUrl:"ezopen://open.ys7.com/".concat(i.deviceSerialNumber,"/1.live"),template:"simple"}}),e("div",{staticClass:"monitor-space"},[t._v(t._s(i.name))]),e("div",{staticClass:"video-mask",on:{click:function(e){return t.clickVideo(i)}}},[e("i",{staticClass:"iconfont huifont-shuzhuangcaidanxiala"})])],1)])})),0)])]),t.isVideo?e("div",{staticClass:"video-toggle"},[e("div",{staticClass:"title"},[t._m(1),e("span",{staticClass:"label"},[t._v("摄像头")]),e("i",{staticClass:"el-icon-close",on:{click:t.closeVideo}})]),e("div",{staticClass:"video-toggle-box"},[t.nowVideo.id&&t.isVideo?e("play-video",{ref:"playVideo",attrs:{sourceUrl:"ezopen://open.ys7.com/".concat(t.nowVideo.deviceSerialNumber,"/1.hd.live"),template:"pcLive"},on:{closeVideoModel:function(e){t.isVideo=!1}}}):t._e()],1)]):t._e(),t.isVideo?e("div",{staticClass:"video-mask"}):t._e()])},o=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"iconfont-box"},[e("i",{staticClass:"iconfont huifont-a-zhankaishousuo"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"title-icon"},[e("i")])}],r=(i(28706),i(2008),i(26099),function(){var t=this,e=t._self._c;return e("div",{staticClass:"bim-model-box"},[1===t.nullType?e("div",{staticClass:"space-null"},[e("img",{attrs:{src:t.nullImage,alt:""}}),e("div",{staticClass:"space-null-text"},[t._v("您还未进行楼宇设置,请先设置楼宇!")])]):t._e(),2===t.nullType?e("div",{staticClass:"space-null"},[e("img",{attrs:{src:t.nullImage,alt:""}}),e("div",{staticClass:"space-null-text"},[t._v("该单位建筑暂未集成模型")])]):t._e(),3===t.nullType?e("div",{staticClass:"space-null"},[e("img",{attrs:{src:t.nullImage,alt:""}}),e("div",{staticClass:"space-null-text"},[t._v("模型集成中,请稍后再试")])]):t._e(),e("div",{directives:[{name:"show",rawName:"v-show",value:4===t.nullType,expression:"nullType === 4"}],staticClass:"previewBim",attrs:{id:"previewBim"+t._uid}})])}),a=[],s=(i(50113),i(79432),i(39805)),c=i(50104),u={props:["item","type"],data:function(){return{nullType:"",nullImage:i(89211),bimViewer:null,renderSuccess:!1,target:{},deviceList:[],signList:[{id:1,name:"摄像头",iconPath:"./assets/shexiangtou.png"},{id:2,name:"门禁",iconPath:"./assets/menjin.png"},{id:3,name:"停车",iconPath:"./assets/car.png"},{id:4,name:"照明",iconPath:"./assets/zhaoming.png"}]}},beforeDestroy:function(){this.bimViewer&&this.renderSuccess&&this.bimViewer.destroy()},mounted:function(){this.target=this.item,this.changeProject()},methods:{changeProject:function(t){var e=this;if(t&&(this.target=t),!this.target.id)return this.nullType=1;this.target.bimIntegrateId?this.$nextTick((function(){e.initBIM()})):this.nullType=2},initModelPosition:function(){for(var t=this,e=this.deviceList.filter((function(e){return e.projectItemTargetId===t.target.id&&1===e.type})),i=function(i){if(e[i].modelBindType&&3===e[i].modelBindType&&e[i].modelBindContent&&e[i].modelBindPosition){var n=t.signList.find((function(t){return t.id==e[i].modelBindContent})),o=JSON.parse(e[i].modelBindPosition);t.bimViewer.add3DMaker("image",o,n.iconPath,(function(i){var n=i.id.split("-")[1];t.$emit("click3DMaker",e.find((function(t){return t.id==n})))}),"monitor-"+e[i].id)}},n=0;n<e.length;n++)i(n)},initBIM:function(){var t=this;(0,c.MJ)(this.target.bimIntegrateId).then((function(e){if(e.state){if(!e.data)return t.nullType=3;if(t.nullType=4,t.bimViewer)return t.bimViewer.changeView({newToken:e.data,bimIntegrateId:t.target.bimIntegrateId});t.bimViewer=new s.A({dom:document.getElementById("previewBim"+t._uid),viewToken:e.data,bimIntegrateId:t.target.bimIntegrateId,renderSuccess:function(){t.renderSuccess=!0,"3102248339366592"===t.target.bimIntegrateId&&(t.bimViewer.hideComponentsByObjectData([{categoryId:"-2000038",levelName:"标高 1"}]),t.bimViewer.overrideComponentsColorByObjectData([{family:"楼板",levelName:"标高 1"}],"#cecece"),t.bimViewer.overrideComponentsColorByObjectData([{family:"基本墙",levelName:"标高 1"}],"#afa6ab")),t.initModelPosition()},click:function(t){console.log(t)}})}else t.nullType}))}}},l=u,d=i(845),p=(0,d.A)(l,r,a,!1,null,null,null),f=p.exports,m=i(6239),h=i(91943),v=i(16247),g={data:function(){return{target:{},list:[],isOpen:!1,isVideo:!1,nowVideo:{},isInit:!1,deviceList:[]}},mounted:function(){},components:{bimModel:f,projectItemTree:m.A,playVideo:v.A},methods:{init:function(){var t=this;this.deviceList=[];var e={projectId:this.$store.getters.project.id,sign:"monitor"};(0,h.Jt)(e).then((function(e){e.state&&(t.sortDeviceList(e.data),t.list=t.deviceList.filter((function(e){return e.projectItemTargetId===t.target.id&&1===e.type})),t.$refs.operationModels&&(t.$refs.operationModels.deviceList=t.deviceList))}))},sortDeviceList:function(t){for(var e=0;e<t.length;e++)this.deviceList=this.deviceList.concat(t[e].deviceList),t[e].children&&t[e].children.length>0&&this.sortDeviceList(t[e].children)},treeclick:function(t,e){var i=this;this.target=t,"isInit"===e?(this.init(),this.isInit=!0):this.list=this.deviceList.filter((function(t){return t.projectItemTargetId===i.target.id&&1===t.type})),this.$refs.operationModels&&"isInit"!=e&&this.$refs.operationModels.changeProject(t)},clickVideo:function(t){this.nowVideo=t,this.$refs[this.nowVideo.deviceSerialNumber][0].stop(),this.isVideo=!0},closeVideo:function(){this.$refs[this.nowVideo.deviceSerialNumber][0]&&this.$refs[this.nowVideo.deviceSerialNumber][0].play(),this.$refs.playVideo.destroy()}}},b=g,w=(0,d.A)(b,n,o,!1,null,null,null),y=w.exports},91943:function(t,e,i){i.d(e,{$n:function(){return C},AC:function(){return h},Ah:function(){return m},Aj:function(){return f},CR:function(){return _},Dt:function(){return r},Gb:function(){return S},HV:function(){return D},Id:function(){return u},JH:function(){return v},Jb:function(){return d},Jt:function(){return a},Kw:function(){return c},Ls:function(){return l},M2:function(){return A},M9:function(){return M},O1:function(){return y},Ol:function(){return b},Tt:function(){return L},Up:function(){return g},WQ:function(){return k},Wb:function(){return P},Yy:function(){return x},Z_:function(){return T},ak:function(){return w},c8:function(){return I},eM:function(){return p},gz:function(){return V},ml:function(){return s},p9:function(){return B},q_:function(){return j},uM:function(){return o},zk:function(){return N}});i(28706);var n=i(98150);function o(t,e){return(0,n.A)({url:"/api/operateDeviceLevel/init/".concat(t,"/").concat(e),method:"get"})}function r(t,e){return(0,n.A)({url:"/api/operateDeviceLevel/getOperateOrganizationId/".concat(t,"/").concat(e),method:"get"})}function a(t){return(0,n.A)({url:"/api/operateDeviceLevel/get",method:"post",data:t})}function s(t){return(0,n.A)({url:"/api/operateDeviceLevel/".concat(t),method:"delete"})}function c(t){return(0,n.A)({url:"/api/operateDeviceLevel",method:"post",data:t})}function u(t){return(0,n.A)({url:"/api/operateDeviceLevel",method:"put",data:t})}function l(t,e,i){return(0,n.A)({url:"/api/operateFlowData/".concat(t,"/").concat(e),method:"post",data:i})}function d(t){return(0,n.A)({url:"/api/operateFlowData/".concat(t),method:"get"})}function p(t){return(0,n.A)({url:"/api/operateFlowData/batch",method:"post",data:t})}function f(t){return(0,n.A)({url:"/api/operateFlowData",method:"post",data:t})}function m(t){return(0,n.A)({url:"/api/operateFlowData",method:"put",data:t})}function h(t){return(0,n.A)({url:"/api/operateFlowData/".concat(t),method:"delete"})}function v(t){return t["flowType"]=5,(0,n.A)({url:"/flow/projectFlow",method:"post",data:t})}function g(t){return(0,n.A)({url:"/flow/projectFlow/".concat(t),method:"get"})}function b(t){return(0,n.A)({url:"/flow/projectFlow/".concat(t,"/actions"),method:"get"})}function w(t,e,i){return(0,n.A)({url:"/flow/projectFlow/".concat(t,"/actions/").concat(e),method:"post",data:i})}function y(t){return(0,n.A)({url:"/api/operateDevice",method:"post",data:t})}function I(t){return(0,n.A)({url:"/api/operateDevice",method:"put",data:t})}function C(t){return console.log(t),(0,n.A)({url:"/api/operateDevice/".concat(t),method:"get"})}function D(t){return(0,n.A)({url:"/api/godown/query",method:"post",data:t})}function A(t){return(0,n.A)({url:"/api/godown",method:"post",data:t})}function _(t){return(0,n.A)({url:"/api/godown",method:"put",data:t})}function k(t){return(0,n.A)({url:"/api/godown/".concat(t),method:"delete"})}function L(t){return(0,n.A)({url:"/api/operateDeviceModel/query",method:"post",data:t})}function j(t){return(0,n.A)({url:"/api/operateDeviceModel",method:"post",data:t})}function V(t){return(0,n.A)({url:"/api/operateDeviceModel/".concat(t),method:"get"})}function T(t){return(0,n.A)({url:"/api/encodingGenerator/type/query",method:"post",data:t})}function x(t){return(0,n.A)({url:"/api/encodingGenerator",method:"post",data:t})}function M(t){return(0,n.A)({url:"/api/operateFlowData/count/".concat(t),method:"get"})}function P(t){return(0,n.A)({url:"/api/test/deviceSensor/count/".concat(t),method:"get"})}function B(t){return(0,n.A)({url:"/api/test/deviceLiveData/".concat(t),method:"get"})}function S(t){return(0,n.A)({url:"/api/test/giveAlarm/".concat(t),method:"get"})}function N(t){return(0,n.A)({url:"/api/test/deviceLiveData/history/".concat(t),method:"get"})}},89211:function(t,e,i){t.exports=i.p+"static/img/dataNull.d2cfeb61.png"},77552:function(t,e,i){i.d(e,{A:function(){return n}});i(16280);function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},36654:function(t,e,i){i.d(e,{A:function(){return r}});var n=i(45438);function o(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(0,n.A)(o.key),o)}}function r(t,e,i){return e&&o(t.prototype,e),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}}}]);