info.14bfd0fb.js 9.9 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["info"],{"129f":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},"4b65":function(t,e,n){},"4d7a":function(t,e,n){"use strict";n.r(e);var a=n("f2bf"),i=function(t){return Object(a["pushScopeId"])("data-v-37a23a80"),t=t(),Object(a["popScopeId"])(),t},c={class:"mg-b-8"},o={class:"wind-site-info"},r={class:"wind-site-menu"},s=i((function(){return Object(a["createElementVNode"])("div",{class:"wind-site-title"},"选择风机",-1)})),l={class:"wind-site-body"},d={class:"wind-site-info-body"},u={class:"info-menu mg-b-16"},f=["onClick"];function h(t,e,n,i,h,p){var b=Object(a["resolveComponent"])("btn-group-double"),v=Object(a["resolveComponent"])("collapse-list"),m=Object(a["resolveComponent"])("base-info"),j=Object(a["resolveComponent"])("StandAloneImg"),O=Object(a["resolveComponent"])("generator"),w=Object(a["resolveComponent"])("el-col"),I=Object(a["resolveComponent"])("warning"),g=Object(a["resolveComponent"])("el-row");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Object(a["createElementVNode"])("div",c,[Object(a["createVNode"])(b,{btnGroups:t.btnGroups,rowIndex:0,index:1,onSelect:t.select},null,8,["btnGroups","onSelect"])]),Object(a["createElementVNode"])("div",o,[Object(a["createElementVNode"])("div",r,[s,Object(a["createElementVNode"])("div",l,[Object(a["createVNode"])(v,{list:h.WindSites,allowScroll:!0,scrollHeight:"calc(100vh - 175px)",onClick:p.clickMenu},null,8,["list","onClick"])])]),Object(a["createElementVNode"])("div",d,[Object(a["createElementVNode"])("div",u,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(h.InfoBtns.data,(function(t,e){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["info-menu-item",{active:h.InfoBtns.activeIndex==e}]),key:t,onClick:function(n){return p.onInfoMenuItemClick(t,e)}},Object(a["toDisplayString"])(t.text),11,f)})),128))]),Object(a["createVNode"])(g,{style:{height:"calc(100% - 45px)"}},{default:Object(a["withCtx"])((function(){return[Object(a["createVNode"])(w,{span:16,style:{position:"relative"}},{default:Object(a["withCtx"])((function(){return[Object(a["withDirectives"])(Object(a["createVNode"])(m,{data:h.sourceMap},null,8,["data"]),[[a["vShow"],0==h.InfoBtns.activeIndex]]),Object(a["createElementVNode"])("div",{style:Object(a["normalizeStyle"])("dark"===t.$store.state.themeName?"text-align:center;":"text-align:center;background:#fff;")},[Object(a["withDirectives"])(Object(a["createVNode"])(j,{class:"sai",activeIndex:h.InfoBtns.activeIndex,onSelectSvg:p.selectSvg},null,8,["activeIndex","onSelectSvg"]),[[a["vShow"],0!=h.InfoBtns.activeIndex]])],4),Object(a["withDirectives"])(Object(a["createVNode"])(O,{class:"saig",index:h.InfoBtns.activeIndex,data:h.sourceMap},null,8,["index","data"]),[[a["vShow"],0!=h.InfoBtns.activeIndex]])]})),_:1}),Object(a["createVNode"])(w,{span:8},{default:Object(a["withCtx"])((function(){return[Object(a["createVNode"])(I,{data:h.WarnData},null,8,["data"])]})),_:1})]})),_:1})])])])}n("d3b7"),n("159b"),n("caad"),n("8a79"),n("ac1f"),n("5319"),n("99af");var p=n("e6ab"),b=n("2cb3"),v=(n("841c"),{class:"wind-site-warning"}),m={class:"search pd-16 pd-b-8"},j={class:"query"},O=Object(a["createElementVNode"])("div",{class:"empty"},null,-1),w={class:"count"},I={class:"text"},g={class:"warning-list"};function x(t,e,n,i,c,o){var r=Object(a["resolveComponent"])("el-row"),s=Object(a["resolveComponent"])("el-col"),l=Object(a["resolveComponent"])("Table");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",v,[Object(a["createElementVNode"])("div",m,[Object(a["createVNode"])(r,null,{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",j,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{class:"search-input",name:"query","onUpdate:modelValue":e[0]||(e[0]=function(t){return c.query=t})},null,512),[[a["vModelText"],c.query]])]),Object(a["createElementVNode"])("button",{class:"btn search",onClick:e[1]||(e[1]=function(){return o.search&&o.search.apply(o,arguments)})},"搜索"),O,Object(a["createElementVNode"])("button",{class:"btn empty-btn",onClick:e[2]||(e[2]=function(){return o.reset&&o.reset.apply(o,arguments)})},"重置")]})),_:1}),Object(a["createVNode"])(r,{class:"options"},{default:Object(a["withCtx"])((function(){return[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(c.options,(function(t,e){return Object(a["openBlock"])(),Object(a["createBlock"])(s,{class:Object(a["normalizeClass"])(["option-item",{active:t.isActive}]),span:8,key:t,onClick:function(n){return o.onOptionClick(t,e)}},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",w,Object(a["toDisplayString"])(t.count),1),Object(a["createElementVNode"])("div",I,Object(a["toDisplayString"])(t.text),1)]})),_:2},1032,["onClick","class"])})),128))]})),_:1})]),Object(a["createElementVNode"])("div",g,[Object(a["createVNode"])(l,{data:c.warning,canScroll:!0,height:"calc(100vh - 560px)"},null,8,["data","height"])])])}n("b0c0");var y=n("bfc3"),S={components:{Table:y["a"]},data:function(){return{query:"",options:[],ackupData:{},warning:{column:[{name:"PLC变量名",field:"name"},{name:"报警信息",field:"value"},{name:"报警状态",field:"data1",template:function(t){return 1===t?"<div class='error-state'></div>":"正常"}}],data:[]},activeArray:[],isSearch:!1}},props:{data:{type:Object,default:function(){}}},mounted:function(){this.backupData=this.BASE.deepCopy(this.data),this.riseData(this.data)},methods:{onOptionClick:function(t,e){var n=this;t.isActive=!t.isActive,this.activeArray[e]=!this.activeArray[e];var a=[];this.activeArray.forEach((function(t,e){t&&n.options[e].vos.forEach((function(t){a.push(t)}))})),this.warning.data=a,this.isSearch=!1,this.query=""},riseData:function(t){var e=[],n=[],a=0;for(var i in t)t.index=a,this.activeArray.length<a+1&&this.activeArray.push(!a),e.push({id:t[i].id,text:t[i].name,vos:t[i].vos,count:t[i].vos.length,isActive:this.activeArray[a]}),this.activeArray[a]&&t[i].vos.forEach((function(t){n.push(t)})),a++;this.options=e,this.warning.data=n,this.isSearch&&this.search()},search:function(){var t=this;if(this.isSearch=!0,this.query){var e=[];this.BASE.deepCopy(this.warning.data).forEach((function(n){-1!==n.name.indexOf(t.query)&&e.push(n)})),this.warning.data=e}else this.riseData(this.data)},reset:function(){for(var t=0;t<this.activeArray.length;t++)this.activeArray[t]=!1;this.isSearch=!1,this.query="";var e=this.BASE.deepCopy(this.backupData);this.riseData(e,!0)}},watch:{data:function(t){this.backupData=this.BASE.deepCopy(t),this.riseData(t)}}},C=(n("952f"),n("6b0d")),k=n.n(C);const E=k()(S,[["render",x]]);var N=E,V=n("efa0"),B=n("d6c8"),A=n("1620"),D=n("65da"),W=n("a621"),q={components:{collapseList:p["a"],BaseInfo:b["a"],Warning:N,StandAloneImg:V["a"],generator:B["a"],BtnGroupDouble:A["a"]},props:{id:{type:String,default:""}},data:function(){return{timmer:null,wtId:"",sourceMap:{},WarnData:{},WindSites:[],InfoBtns:{activeIndex:0,data:[{id:"base-info",text:"基本信息"},{id:"generator",text:"发电机"},{id:"gear-box",text:"齿轮箱"},{id:"pitch",text:"变桨"},{id:"yaw",text:"偏航"},{id:"hydraulic-pressure",text:"液压"},{id:"cabin-info",text:"机舱信息"}]}}},methods:{onInfoMenuItemClick:function(t,e){this.InfoBtns.activeIndex=e},selectSvg:function(t){this.InfoBtns.activeIndex=t},getColor:function(t){switch(t){case 0:return"green";case 1:return"blue";case 2:return"red";case 3:return"gray";case 4:return"orange";case 5:return"purple";case 6:return"write"}},requestData:function(t){this.getSimpleMatrixAll(t)},getSimpleMatrixAll:function(t){var e=this;D["a"].findSimpleMatrixAll({wpId:this.wtId}).then((function(t){W["a"].closeLoading();var n=[];e.WindSites.length?t.data.forEach((function(t,n){e.WindSites[n].children=[],t.fjls[0].forEach((function(t){e.WindSites[n].children.push({id:t.wtId,wpId:t.wpId,text:t.wtId.substring(t.wtId.length-3),color:e.getColor(t.fjzt)})}))})):(t.data.forEach((function(t,e){n.push({id:String(e),text:t.wpName,children:[]})})),t.data.forEach((function(t,a){t.fjls[0].forEach((function(t){n[a].children.push({id:t.wtId,wpId:t.wpId,text:t.wtId.substring(t.wtId.length-3),color:e.getColor(t.fjzt)})}))})),e.WindSites=n),t.data.length&&(e.wtId=e.wtId||t.data[0].fjls[0][0].wtId,e.getWtInfo())}))},getWtInfo:function(){var t=this;D["a"].findWtInfo({wtId:this.wtId}).then((function(e){var n=["bjmap","fdjmap","clxmap","yymap","phmap","jcmap"],a=e.data;for(var i in a)if(n.includes(i)&&i.endsWith("map")){for(var c=a[i],o=[],r=[],s=0;s<c.length;s++){var l={name:c[s][0],unit:c[s][1],value:c[s][3]};"ai"==c[s][2]?o.push(l):r.push(l)}a[i]={ai:o,di:r}}t.sourceMap=a,t.getWarnInfo()}))},getWarnInfo:function(){var t=this;D["a"].findWtWarnInfo({wtId:this.wtId}).then((function(e){t.WarnData=e.data}))},clickMenu:function(t){this.wtId=t.id,this.$router.replace("/monitor/windsite/info/".concat(this.wpId,"/").concat(t.id)),this.getWtInfo()}},created:function(){var t=this;t.wpId=t.$route.params.wpId,t.wtId=t.$route.params.wtId,t.$nextTick((function(){W["a"].showLoading(),t.requestData(!1),t.timmer=setInterval((function(){t.requestData(!1)}),t.$store.state.websocketTimeSec)}))},unmounted:function(){clearInterval(this.timmer),this.timmer=null},watch:{}};n("4f22");const M=k()(q,[["render",h],["__scopeId","data-v-37a23a80"]]);e["default"]=M},"4f22":function(t,e,n){"use strict";n("4b65")},"841c":function(t,e,n){"use strict";var a=n("c65b"),i=n("d784"),c=n("825a"),o=n("1d80"),r=n("129f"),s=n("577e"),l=n("dc4a"),d=n("14c3");i("search",(function(t,e,n){return[function(e){var n=o(this),i=void 0==e?void 0:l(e,t);return i?a(i,e,n):new RegExp(e)[t](s(n))},function(t){var a=c(this),i=s(t),o=n(e,a,i);if(o.done)return o.value;var l=a.lastIndex;r(l,0)||(a.lastIndex=0);var u=d(a,i);return r(a.lastIndex,l)||(a.lastIndex=l),null===u?-1:u.index}]}))},"952f":function(t,e,n){"use strict";n("9b38")},"9b38":function(t,e,n){}}]);
  2. //# sourceMappingURL=info.14bfd0fb.js.map