whychw
2021-05-24 8e85954e958bcb1bba811884dbc9cde65e94aa04
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4c5282cc"],{"2cd1":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.show?i("div",{staticClass:"progress-load"},[i("div",{staticClass:"progress-load-content"},[i("div",{staticClass:"progress-bg"}),i("div",{staticClass:"progress-container"},[i("el-progress",{attrs:{type:"circle","stroke-width":8,width:90,percentage:t.percentage}}),i("div",{staticClass:"progress-text"},[t._v(t._s(t.text))])],1)])]):t._e()},a=[],o=(i("a9e3"),{props:{show:{type:Boolean,default:!1},percentage:{type:[Number,String],default:0},text:{type:String,default:""}}}),n=o,r=(i("bfe8"),i("2877")),c=Object(r["a"])(n,s,a,!1,null,"5f036459",null);e["a"]=c.exports},"8f85":function(t,e,i){"use strict";var s=i("c600"),a=i.n(s);a.a},a9e3:function(t,e,i){"use strict";var s=i("83ab"),a=i("da84"),o=i("94ca"),n=i("6eeb"),r=i("5135"),c=i("c6b6"),l=i("7156"),d=i("c04e"),u=i("d039"),f=i("7c73"),v=i("241c").f,_=i("06cf").f,m=i("9bf2").f,p=i("58a8").trim,h="Number",b=a[h],g=b.prototype,C=c(f(g))==h,y=function(t){var e,i,s,a,o,n,r,c,l=d(t,!1);if("string"==typeof l&&l.length>2)if(l=p(l),e=l.charCodeAt(0),43===e||45===e){if(i=l.charCodeAt(2),88===i||120===i)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:s=2,a=49;break;case 79:case 111:s=8,a=55;break;default:return+l}for(o=l.slice(2),n=o.length,r=0;r<n;r++)if(c=o.charCodeAt(r),c<48||c>a)return NaN;return parseInt(o,s)}return+l};if(o(h,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var x,w=function(t){var e=arguments.length<1?0:t,i=this;return i instanceof w&&(C?u((function(){g.valueOf.call(i)})):c(i)!=h)?l(new b(y(e)),i,w):y(e)},F=s?v(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),k=0;F.length>k;k++)r(b,x=F[k])&&!r(w,x)&&m(w,x,_(b,x));w.prototype=g,g.constructor=w,n(a,h,w)}},b3f2:function(t,e,i){},b918:function(t,e,i){},bfe8:function(t,e,i){"use strict";var s=i("b3f2"),a=i.n(s);a.a},c600:function(t,e,i){},cbc7:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"main"},[i("div",{staticClass:"flex_contain"},[t._l(t.list,(function(e,s){return i("div",{key:s,staticClass:"item border-angle"},[i("div",{staticClass:"item-inner"},[i("div",{staticClass:"btn_main"},[i("div",{staticClass:"lay_label vertical_middle"},[t._v(t._s(e.dev_name))]),i("div",{staticClass:"lay_content vertical_middle"},[i("div",{directives:[{name:"btn-confirm",rawName:"v-btn-confirm",value:t.$root.authorization?t.handleConfirm:t.$root.notAllow,expression:"$root.authorization ? handleConfirm : $root.notAllow"}],staticClass:"btn",attrs:{disabled:!t.$root.authorization,"data-fn":"switchOff","data-confirmTxt":"全部分闸确认",param:JSON.stringify(["CONTEXT.list["+s+"]"])}},[t._v("全部分闸")]),i("div",{staticClass:"btn btn_export",on:{click:function(i){return t.exportData(e)}}},[t._v("数据导出")])])]),i("div",{staticClass:"info_voltage"},[i("div",{staticClass:"lay_label vertical_middle"},[t._v(" 是否允许合闸 ")]),i("div",{staticClass:"lay_content vertical_middle"},[i("div",{staticClass:"indicator",class:{status_off:!e.allow_close,status_normal:e.allow_close}})])]),i("div",{staticClass:"info_voltage"},[i("div",{staticClass:"lay_label vertical_middle"},[t._v(" 电压 ")]),i("div",{staticClass:"lay_content txt_strong vertical_middle"},[t._v(" "+t._s(e.actual_mov)+" V ")])]),i("div",{staticClass:"info_electricity"},[i("div",{staticClass:"lay_label vertical_middle"},[t._v(" 电流 ")]),i("div",{staticClass:"lay_content txt_strong vertical_middle"},[t._v(" "+t._s(e.actual_curr)+" A ")])]),i("div",{staticClass:"info_power"},[i("div",{staticClass:"lay_label bdb vertical_middle"},[t._v(" 已输出功率 ")]),i("div",{staticClass:"lay_content txt_strong vertical_middle"},[t._v(" "+t._s(e.output_power)+" kVA ")])]),i("div",{staticClass:"btn_sub_grp"},t._l(t.max_button_num,(function(s){return i("div",{key:s,staticClass:"row"},[s<=e.FZ_button_num?i("div",{staticClass:"lay_label vertical_middle"},[t._v("KM"+t._s(s)+" ("+t._s(e["FZ_b"+s+"_power"])+"kVA)")]):i("div",{staticClass:"lay_label vertical_middle"}),i("div",{staticClass:"lay_content"},[i("div",{staticClass:"vertical_middle"},[s<=e.FZ_button_num?i("div",{staticClass:"switch_yc"},[i("label",{staticClass:"checkbox",on:{click:function(e){t.$root.authorization?t.$root.doNothing():t.$root.notAllow()}}},[i("input",{directives:[{name:"model",rawName:"v-model",value:e["FZ_b"+s],expression:"item['FZ_b' + idx]"}],staticClass:"input",attrs:{type:"checkbox",disabled:!t.$root.authorization,value:"1"},domProps:{checked:Array.isArray(e["FZ_b"+s])?t._i(e["FZ_b"+s],"1")>-1:e["FZ_b"+s]},on:{click:function(i){return t.switch3DHandle(e,s)},change:function(i){var a=e["FZ_b"+s],o=i.target,n=!!o.checked;if(Array.isArray(a)){var r="1",c=t._i(a,r);o.checked?c<0&&t.$set(e,"FZ_b"+s,a.concat([r])):c>-1&&t.$set(e,"FZ_b"+s,a.slice(0,c).concat(a.slice(c+1)))}else t.$set(e,"FZ_b"+s,n)}}}),t._m(0,!0),i("span",{staticClass:"bg"})])]):t._e()]),i("div",{staticClass:"vertical_middle"},[s<=e.FZ_button_num?i("div",{staticClass:"indicator",class:{status_off:!e["FZ_fw"+s],status_normal:e["FZ_fw"+s]}}):t._e()])])])})),0)])])})),t.list.length?t._e():i("div",{staticClass:"data_empty vertical_middle"},[t._v("暂无数据")])],2),i("div",{staticClass:"footer"},[i("div",{staticClass:"btn-grp"},[i("div",{staticClass:"btn",on:{click:function(e){return t.goTo("/load/main")}}},[t._v("主画面")]),i("div",{staticClass:"btn"},[t._v("手动加载")]),i("div",{staticClass:"btn",on:{click:function(e){return t.goTo("/load/auto")}}},[t._v("自动加载")]),i("div",{staticClass:"btn",on:{click:function(e){return t.goTo("/load/burst")}}},[t._v("突加突卸")])])]),i("el-dialog",{staticClass:"el-dialog-center",attrs:{top:"0vh",title:"操作失败",visible:t.confirm.show,width:"5.2rem","close-on-click-modal":!1,"close-on-press-escape":!0,"show-close":!1},on:{"update:visible":function(e){return t.$set(t.confirm,"show",e)},closed:function(e){t.confirm.show=!1}}},[i("flex-layout",[i("div",{staticClass:"color-black"},[i("div",{staticClass:"dialog_content"},[t._v(t._s(t.confirm.txt)+"操作失败, 点击确认后撤销操作")])]),i("div",{staticClass:"color-black dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.confirmOk}},[t._v("确定")])],1)])],1),i("el-dialog",{attrs:{title:t.confirmTxt,visible:t.confirmVisible,width:"300px"},on:{"update:visible":function(e){t.confirmVisible=e}}},[i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.confirmVisible=!1}}},[t._v("取 消")]),i("el-button",{attrs:{type:"primary"},on:{click:t.callBack}},[t._v("确 定")])],1)]),i("el-dialog",{attrs:{title:"数据导出",visible:t.exportDialogVisible,width:"400px"},on:{"update:visible":function(e){t.exportDialogVisible=e}}},[i("label",{staticClass:"pr_o6em"},[t._v("选择日期")]),i("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",size:"small","picker-options":t.pickerOptions,placeholder:"选择日期"},model:{value:t.export_date,callback:function(e){t.export_date=e},expression:"export_date"}}),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.exportDialogVisible=!1}}},[t._v("关 闭")]),i("el-button",{attrs:{type:"primary"},on:{click:t.exportCsv}},[t._v("导 出")])],1)],1),i("progress-load",{attrs:{show:t.progress.show,percentage:t.progress.value,text:t.progress.text}})],1)},a=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span",{staticClass:"handle"},[i("span",{staticClass:"active"},[t._v("ON")]),i("span",{staticClass:"core"}),i("span",{staticClass:"inactive"},[t._v("OFF")])])}],o=(i("4160"),i("c975"),i("b0c0"),i("a9e3"),i("b680"),i("b64b"),i("ac1f"),i("5319"),i("1276"),i("159b"),i("e621")),n=i("2cd1"),r={name:"ManualLoad",components:{ProgressLoad:n["a"],FlexLayout:o["a"]},data:function(){return{progress:{show:!1,value:0,text:""},export_id:0,export_name:"",exportDialogVisible:!1,export_date:(new Date).format("yyyy-MM-dd"),pickerOptions:{disabledDate:function(t){return t&&t.valueOf()>Date.now().valueOf()||t.valueOf()<Date.now().valueOf()-2592e6}},confirmTxt:"",confirmVisible:!1,cbFn:null,cbParam:null,max_button_num:0,timer:new this.$common.Timeout,info:[],list:[],FzBList:{},FzBIgnore:{},confirm:{btnList:{a:{name:"KM1",dev_id:1,FzB:"FzB11"}},curBtnList:{},show:!1,txt:""}}},methods:{goTo:function(t){this.$router.push({path:t})},callBack:function(){var t=this;this.confirmVisible=!1;var e=[];this.cbParam.forEach((function(i){if("string"==typeof i&&i.indexOf("CONTEXT")>-1){var s=i.split(".");s.length>2&&console.warn("目前不支持深层属性参数");var a=s[1];if(a.indexOf("[")>-1){var o=/\[|\]/,n=a.split(o);e.push(t[n[0]][n[1]])}else e.push(t[a])}else e.push(i)})),this[this.cbFn].apply(this,e)},handleConfirm:function(t){this.confirmTxt=t.confirmTxt,this.cbFn=t.cbFn,this.cbParam=t.cbParam,this.confirmVisible=!0},getInfo:function(){var t=this;return this.$api.load.getInfo().then((function(e){e=JSON.parse(e.data.result),e.code&&(t.info=e.data)}))},switchOff:function(t){var e=this,i={all_open:"1",dev_name:t.dev_name,dev_id:t.dev_id,dev_ip:t.dev_ip};this.$api.load.allBtnControl(i).then((function(t){t=JSON.parse(t.data.result),t.code?e.$message({type:"success",message:t.msg}):e.$message({type:"error",message:t.msg})})).catch((function(t){console.warn(t)}))},getStatus:function(){var t=this;this.$api.load.getManualStatus().then((function(e){var i=JSON.parse(e.data.result),s=[];i.code&&(t.info.forEach((function(e,a){s[a]={},t.max_button_num=t.max_button_num>e.FZ_button_num?t.max_button_num:e.FZ_button_num;for(var o=0,n=i.data.length;o<n;o++)if(i.data[o].dev_id==e.dev_id){var r=function(){var n=i.data[o],r=/^FZ_b\d+$/;return Object.keys(n).forEach((function(e){r.test(e)&&(t.checkFzBIgnore(n.dev_id,e)?(n[e]=t.FzBIgnore[e+n.dev_id].value,t.FzBIgnore[e+n.dev_id].time--,0==t.FzBIgnore[e+n.dev_id].time&&delete t.FzBIgnore[e+n.dev_id]):t.checkFzBIsChange(n.dev_id,e)?n[e]=1==n[e]:n[e]=t.FzBList[e+n.dev_id])})),s[a]=n,s[a]["dev_ip"]=e.dev_ip,"break"}();if("break"===r)break}})),t.list=s)}))},loop:function(){var t=this;this.timer.start((function(){t.getStatus(),t.timer.open()}),1e3)},checkFzBIsChange:function(t,e){var i=!0;return Object.keys(this.FzBList).forEach((function(s){s==e+t&&(i=!1)})),i},checkFzBIgnore:function(t,e){var i=!1;return Object.keys(this.FzBIgnore).forEach((function(s){s==e+t&&(i=!0)})),i},switch3DHandle:function(t,e){var i=this,s={dev_id:t.dev_id,dev_name:t.dev_name,num:e,dev_ip:t.dev_ip},a="FZ_b"+e;s[a]=t[a]?2:1,this.$set(this.FzBList,a+t.dev_id,1==s[a]?1:0),this.$api.load.btnControl(s).then((function(o){if(o=JSON.parse(o.data.result),o.code)i.$message({type:"success",message:o.msg}),delete i.FzBList[a+t.dev_id],i.$set(i.FzBIgnore,a+t.dev_id,{time:5,value:1==s[a]});else if(i.$message({type:"error",message:o.msg}),i.confirm.btnList[a+t.dev_id]={name:"KM"+e,dev_id:t.dev_id,FzB:a+t.dev_id},!i.confirm.show){var n="";Object.keys(i.confirm.btnList).forEach((function(t){n+=(""!=n?"、":"")+"机柜"+i.confirm.btnList[t].dev_id+": "+i.confirm.btnList[t].name,i.confirm.curBtnList[t]=i.confirm.btnList[t]})),i.confirm.txt=n,i.confirm.show=!0}})).catch((function(t){console.warn(t)}))},confirmOk:function(){var t=this;Object.keys(this.confirm.curBtnList).forEach((function(e){var i=t.confirm.curBtnList[e];delete t.FzBList[i.FzB],delete t.confirm.btnList[e]})),this.confirm.curBtnList={},this.confirm.show=!1,Object.keys(this.confirm.btnList).length&&setTimeout((function(){if(!t.confirm.show){var e="";Object.keys(t.confirm.btnList).forEach((function(i){e+="机柜"+t.confirm.btnList[i].dev_id+": "+t.confirm.btnList[i].name,t.confirm.curBtnList[i]=t.confirm.btnList[i]})),t.confirm.txt=e,t.confirm.show=!0}}),100)},exportData:function(t){this.export_id=t.dev_id,this.export_name=t.dev_name,this.exportDialogVisible=!0},getProgress:function(){var t=this;this.exportDialogVisible=!1,this.$api.common.getProgress().then((function(e){e=JSON.parse(e.data.result);var i=e.data[0]?Number(e.data[0].toFixed(0)):0;t.progress.value=i,t.progress.text=0==i?"数据加载中...":"文件下载中...",e.data<100&&t.progress.show?setTimeout(t.getProgress,50):t.progress.value=100}))},exportCsv:function(){var t=this,e={dev_name:this.export_name.replace(/#/g,"号"),dev_id:this.export_id,export_num:1,table_name:this.export_date.replace(/-/g,"_"),record_time:this.export_date+" 00:00:00"};this.progress.show=!0,this.$api.common.clearProgress().then((function(){t.getProgress(),t.$api.common.download(e).then((function(e){if(e=JSON.parse(e.data.result),1==e.code){t.progress.show=!1,t.progress.value=0;var i=e.data[0],s=document.createElement("a");s.href=encodeURI(t.$config.url+"tomcat7_csv/"+i.fileName),s.download=i.fileName,document.body.appendChild(s),s.click(),document.body.removeChild(s),setTimeout((function(){t.progress.show=!1,t.progress.value=0}),1e3)}else t.progress.show=!1,t.progress.value=0,t.$layer.msg("生成文件失败!")})).catch((function(e){t.progress.show=!1,t.progress.value=0,t.$layer.msg("生成文件失败!"),console.warn(e)}))}))}},mounted:function(){var t=this;this.getInfo().then((function(){t.loop()}))},destroyed:function(){this.timer.stop()}},c=r,l=(i("f1e5"),i("2877")),d=Object(l["a"])(c,s,a,!1,null,"2475e643",null);e["default"]=d.exports},e621:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"flex-layout",class:t.getRootClass,style:t.getRootStyle},[i("div",{staticClass:"flex-layout-header"},[t._t("header")],2),i("div",{staticClass:"flex-layout-body"},[t._t("default")],2),i("div",{staticClass:"flex-layout-footer"},[t._t("footer")],2)])},a=[],o={props:{direction:{type:String,default:""},height:{type:String,default:"100%"}},computed:{getRootClass:function(){return{"direction-row":"row"==this.direction}},getRootStyle:function(){return{height:this.height}}}},n=o,r=(i("8f85"),i("2877")),c=Object(r["a"])(n,s,a,!1,null,"38fade03",null);e["a"]=c.exports},f1e5:function(t,e,i){"use strict";var s=i("b918"),a=i.n(s);a.a}}]);