chunk-4f4c3266.75a61477.js 13 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4f4c3266"],{"107c7":function(e,t,n){"use strict";n("b0c0");var o=n("f2bf"),a={class:"com-table"},l=["onClick"],c=["onMouseenter"];function i(e,t,n,i,r,s){var u=Object(o["resolveComponent"])("el-scrollbar");return Object(o["openBlock"])(),Object(o["createElementBlock"])("table",a,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(n.data.column,(function(e,t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:t,class:Object(o["normalizeClass"])({light:e.is_light}),style:Object(o["normalizeStyle"])({width:e.width}),onClick:function(t){return s.onSort(e)}},Object(o["toDisplayString"])(e.name),15,l)})),128))])]),Object(o["createVNode"])(u,null,{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("tbody",{style:Object(o["normalizeStyle"])({height:n.height})},[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(s.tableData,(function(e,a){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:a},[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(n.data.column,(function(n,a){return Object(o["openBlock"])(),Object(o["createElementBlock"])("td",{key:a,style:Object(o["normalizeStyle"])({width:n.width}),class:Object(o["normalizeClass"])({light:r.hoverRow==e||r.hoverCol==n,num:n.is_num,"always-light":n.is_light||e.is_light}),onMouseenter:function(t){return s.hover(e,n)},onMouseleave:t[0]||(t[0]=function(e){return s.leave()})},[(Object(o["openBlock"])(),Object(o["createBlock"])(Object(o["resolveDynamicComponent"])(n.type?n.type:"div"),Object(o["mergeProps"])(n.props,{innerHTML:s.template(n,e[n.field]),onClick:function(t){return s.onClick(n,e)}}),null,16,["innerHTML","onClick"]))],46,c)})),128))])})),128))],4)]})),_:1})])}n("a9e3"),n("4e82");var r={name:"ComTable",components:{},props:{data:Object,showHover:{type:Boolean,default:!0},showColHover:{type:Boolean,default:!1},canScroll:{type:Boolean,default:!0},pageSize:{type:Number,default:0},height:{type:String,default:""}},emits:{onPagging:null},data:function(){return{hoverRow:-1,hoverCol:-1,sortCol:"",sortType:"",currentPage:1}},computed:{tableData:function(){var e=this;if(""==this.sortCol)return this.data.data;var t=this.data.data;return t.sort((function(t,n){var o=1;return"ASC"==e.sortType?o=1:"DESC"==e.sortType&&(o=-1),t[e.sortCol]>n[e.sortCol]?1*o:t[e.sortCol]<n[e.sortCol]?-1*o:0})),t},pageable:function(){return 0!=this.pageSize},pages:function(){return this.pageable?parseInt(this.data.total/this.pageSize)+1:0},startRow:function(){return this.pageable?(this.currentPage-1)*this.pageSize:0},endRow:function(){return this.pageable?this.currentPage*this.pageSize:this.data.data.length}},methods:{clearCheckBox:function(e){this.$nextTick((function(){setTimeout((function(){for(var e=document.querySelectorAll(".curCheckBox"),t=0;t<e.length;t++)e[t].checked=!1}),e||300)}))},onClick:function(e,t){e.click&&e.click(event,t)},onSort:function(e){if(1==e.sortable)switch(this.sortCol=e.field,this.sortType){case"":this.sortType="DESC";break;case"DESC":this.sortType="ASC";break;case"ASC":this.sortType="DESC";break}},template:function(e,t){return e.template?e.template(t):t},hover:function(e,t){this.showHover&&(this.hoverRow=e,this.showColHover&&(this.hoverCol=t))},leave:function(){this.hoverRow=-1,this.hoverCol=-1},handleCurrentChange:function(e){this.currentPage=e,this.$emit("onPagging",{pageIndex:this.currentPage,pageSize:this.pageSize,start:this.startRow,end:this.endRow})}},beforeCreate:function(){},created:function(){},beforeMount:function(){},mounted:function(){},beforeUpdate:function(){},updated:function(){}},s=n("6b0d"),u=n.n(s);const d=u()(r,[["render",i]]);t["a"]=d},"10cd":function(e,t,n){"use strict";n("45fb")},"24b1":function(e,t,n){"use strict";n.r(t);var o=n("f2bf"),a={class:"assess-config"},l={class:"assess-header"},c={class:"query mg-b-8"},i={class:"query-items"},r={class:"query-item"},s=Object(o["createElementVNode"])("div",{class:"lable"},"模型:",-1),u={class:"search-input"},d={class:"query-actions"},b={class:"assess-bottom"};function m(e,t,n,m,p,f){var h=Object(o["resolveComponent"])("el-input"),v=Object(o["resolveComponent"])("ComTable"),O=Object(o["resolveComponent"])("popup-create"),j=Object(o["resolveComponent"])("el-dialog");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",a,[Object(o["createElementVNode"])("div",l,[Object(o["createElementVNode"])("div",c,[Object(o["createElementVNode"])("div",i,[Object(o["createElementVNode"])("div",r,[s,Object(o["createElementVNode"])("div",u,[Object(o["createVNode"])(h,{modelValue:p.content,"onUpdate:modelValue":t[0]||(t[0]=function(e){return p.content=e})},null,8,["modelValue"])])])]),Object(o["createElementVNode"])("div",d,[Object(o["createElementVNode"])("button",{class:"btn green mg-l-30",onClick:t[1]||(t[1]=function(){return f.onClickSearch&&f.onClickSearch.apply(f,arguments)})},"搜索"),Object(o["createElementVNode"])("button",{class:"btn green mg-l-30",onClick:t[2]||(t[2]=function(){return f.onClickCreate&&f.onClickCreate.apply(f,arguments)})},"新增")])])]),Object(o["createElementVNode"])("div",b,[Object(o["createVNode"])(v,{data:p.tableData,height:"85vh"},null,8,["data"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(j,{title:"新增模型",modelValue:p.isvisiable,"onUpdate:modelValue":t[3]||(t[3]=function(e){return p.isvisiable=e}),width:"45%",top:"15vh","custom-class":"modal","close-on-click-modal":!1,"before-close":f.onClickDialogClose},{default:Object(o["withCtx"])((function(){return[Object(o["createVNode"])(O,{data:p.editform,station:p.stations,onOnClick:f.onClickComplete},null,8,["data","station","onOnClick"])]})),_:1},8,["modelValue","before-close"])])])}n("d3b7"),n("159b");var p=n("107c7"),f=(n("b0c0"),function(e){return Object(o["pushScopeId"])("data-v-a229c840"),e=e(),Object(o["popScopeId"])(),e}),h={class:"assess-create"},v={class:"top"},O={class:"query mg-b-8"},j={class:"query-items flex-column"},C={class:"query-item flex-row"},k=f((function(){return Object(o["createElementVNode"])("div",{class:"lable item-name"},"模块:",-1)})),g={class:"search-input item-content"},y={class:"query-item flex-row"},V=f((function(){return Object(o["createElementVNode"])("div",{class:"lable item-name"},"场站:",-1)})),E={class:"search-input item-content"},w={class:"query-item flex-row"},N=f((function(){return Object(o["createElementVNode"])("div",{class:"lable item-name"},"日期:",-1)})),B={class:"search-input item-content"},S={class:"query-item flex-row"},q=f((function(){return Object(o["createElementVNode"])("div",{class:"lable item-name"},"是否启用:",-1)})),D={class:"search-input item-content"},x={class:"bottom"};function _(e,t,n,a,l,c){var i=Object(o["resolveComponent"])("el-input"),r=Object(o["resolveComponent"])("el-option"),s=Object(o["resolveComponent"])("el-select");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",h,[Object(o["createElementVNode"])("div",v,[Object(o["createElementVNode"])("div",O,[Object(o["createElementVNode"])("div",j,[Object(o["createElementVNode"])("div",C,[k,Object(o["createElementVNode"])("div",g,[Object(o["createVNode"])(i,{modelValue:l.form.name,"onUpdate:modelValue":t[0]||(t[0]=function(e){return l.form.name=e}),placeholder:"请填写"},null,8,["modelValue"])])]),Object(o["createElementVNode"])("div",y,[V,Object(o["createElementVNode"])("div",E,[Object(o["createVNode"])(s,{modelValue:l.form.wpids,"onUpdate:modelValue":t[1]||(t[1]=function(e){return l.form.wpids=e}),multiple:"","collapse-tags":"","popper-class":"select"},{default:Object(o["withCtx"])((function(){return[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(l.stations,(function(e){return Object(o["openBlock"])(),Object(o["createBlock"])(r,{key:e.label,value:e.id,label:e.name},null,8,["value","label"])})),128))]})),_:1},8,["modelValue"])])]),Object(o["createElementVNode"])("div",w,[N,Object(o["createElementVNode"])("div",B,[Object(o["createVNode"])(s,{modelValue:l.form.timetypes,"onUpdate:modelValue":t[2]||(t[2]=function(e){return l.form.timetypes=e}),multiple:"","popper-class":"select"},{default:Object(o["withCtx"])((function(){return[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(l.dates,(function(e){return Object(o["openBlock"])(),Object(o["createBlock"])(r,{key:e.label,value:e.label,label:e.label},null,8,["value","label"])})),128))]})),_:1},8,["modelValue"])])]),Object(o["createElementVNode"])("div",S,[q,Object(o["createElementVNode"])("div",D,[Object(o["createVNode"])(s,{modelValue:l.form.isenable,"onUpdate:modelValue":t[3]||(t[3]=function(e){return l.form.isenable=e}),"popper-class":"select"},{default:Object(o["withCtx"])((function(){return[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(l.enables,(function(e){return Object(o["openBlock"])(),Object(o["createBlock"])(r,{key:e.value,value:e.value,label:e.label},null,8,["value","label"])})),128))]})),_:1},8,["modelValue"])])])])])]),Object(o["createElementVNode"])("div",x,[Object(o["createElementVNode"])("button",{class:"btn green mg-l-30",onClick:t[4]||(t[4]=function(){return c.onClickClear&&c.onClickClear.apply(c,arguments)})},"清空"),Object(o["createElementVNode"])("button",{class:"btn green mg-l-30",onClick:t[5]||(t[5]=function(){return c.onClickSave&&c.onClickSave.apply(c,arguments)})},"保存")])])}n("25f0"),n("ac1f"),n("1276");var T=n("bc3a"),L=n.n(T),A={name:"popup-create",props:{data:Object,station:Array},data:function(){return{form:{},dates:[{label:"日"},{label:"月"},{label:"年"}],stations:[],enables:[{value:"0",label:"否"},{value:"1",label:"是"}]}},emits:{onClick:null},created:function(){this.stations=this.station,this.form=this.convertArray(this.data)},methods:{onClickClear:function(){this.form={}},onClickSave:function(){this.requestSave()},requestSave:function(){var e=this;if(void 0!=this.form.name){var t={name:this.form.name,wpids:this.form.wpids.toString(),timetypes:this.form.timetypes.toString(),isenable:this.form.isenable};this.form.id&&(t.id=this.form.id),L()({method:"post",url:"http://10.155.32.4:8034/evaluation/saveModelMain/",data:t,header:{"Content-Type":"application/json"}}).then((function(t){t.data.success&&(e.form={},e.$emit("onClick",!0))}))}},convertArray:function(e){return void 0!=e.wpids&&void 0!=e.timetypes&&(e.wpids=e.wpids.split(","),e.timetypes=e.timetypes.split(","),e.isenable="是"==e.isenable?1:0),e}},watch:{data:function(e){this.form=this.convertArray(e)}}},M=(n("10cd"),n("6b0d")),z=n.n(M);const P=z()(A,[["render",_],["__scopeId","data-v-a229c840"]]);var U=P,R={components:{ComTable:p["a"],PopupCreate:U},data:function(){var e=this;return{content:"",stations:[],editform:{},isvisiable:!1,tableData:{column:[{name:"名称",field:"name",is_light:!1},{name:"时间",field:"createdate",is_light:!1},{name:"场站",field:"wpids",is_num:!1,is_light:!1},{name:"是否启用",field:"isenable",is_num:!1,is_light:!1},{name:"操作",is_num:!1,is_light:!1,width:100,template:function(){return"<el-button type='text' style='cursor: pointer;' value='edit'>编辑</el-button>&nbsp<el-button type='text' style='cursor: pointer;' value='delete'>删除</el-button>&nbsp<el-button type='text' style='cursor: pointer;' value='config'>配置</el-button>&nbsp"},click:function(t,n){e.onClickOption(t,n)}}],data:[]}}},created:function(){this.requestList(),this.requestStations()},methods:{onClickCreate:function(){this.isvisiable=!0},onClickSearch:function(){this.requestList()},onClickDialogClose:function(){this.isvisiable=!1,this.editform={}},onClickOption:function(e,t){var n=this;"delete"==e.target.getAttribute("value")&&n.$confirm("确认删除?").then((function(e){n.requestDelete(t)})).catch((function(e){})),"edit"==e.target.getAttribute("value")&&(n.isvisiable=!0,n.editform=t)},onClickComplete:function(e){this.isvisiable=!1,this.requestList()},requestList:function(){var e=this;e.API.requestData({method:"GET",baseURL:"http://10.155.32.4:8034/",subUrl:"/evaluation/modelMainList",data:{name:e.content},success:function(t){for(var n in 200==t.code&&(e.tableData.data=t.data),e.tableData.data)e.tableData.data[n].createdate=new Date(t.data[n].createdate).formatDate("yyyy-MM-dd"),e.tableData.data[n].isenable=1==t.data[n].isenable?"是":"否"}})},requestStations:function(){var e=this;e.API.requestData({method:"GET",subUrl:"powercompare/windfarmAllAjax",success:function(t){var n=[];t.data.forEach((function(e){-1!==e.id.indexOf("FDC")&&n.push(e)})),e.stations=n}})},requestDelete:function(e){var t=this;t.API.requestData({method:"DELETE",baseURL:"http://10.155.32.4:8034/",subUrl:"/evaluation/delModelMain/"+e.id,success:function(e){200==e.code&&t.requestList()}})}}};n("919d");const I=z()(R,[["render",m]]);t["default"]=I},"45fb":function(e,t,n){},"4fa6":function(e,t,n){},"919d":function(e,t,n){"use strict";n("4fa6")}}]);
  2. //# sourceMappingURL=chunk-4f4c3266.75a61477.js.map