(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-b797"],{"6aJB":function(t,a,e){"use strict";e.r(a);var i={data:function(){return{MachineValue:"",Machine:[],colors:[],state:[],table1:[],table:[],OptationValue:"",Optation:[],opName:"",daterange:"",Xdata:[],Ydata:[],Ydata1:[],kaiji:[],guanji:[],gongzuo:[],num:0,trigGer:!0,stationNumber:!0,selectionStatus:!1}},created:function(){this.fetchData()},methods:{fetchData:function(){var t=this,a=this.CreateData("11","车间生产管理工艺_加工顺序调整_查询工位及人员",[]);this.ExecDatabase(a).then(function(a){for(var e=0;e<a.data.length;e++)t.Machine.push({label:a.data[e].终端编号,value:a.data[e].终端编号,value2:a.data[e].设备名称})})},searchData:function(){var t=this;if(this.daterange){this.Xdata=[],this.Ydata=[],this.Ydata1=[];var a=[];a[0]=["工位号",this.MachineValue],a[1]=["开始时间",this.daterange];var e=this.CreateData("11","MES_电流数据查询",a);this.ExecDatabase(e).then(function(a){for(var e=0;e<a.data.length;e++)t.Xdata[e]=a.data[e].采集时间,t.Ydata[e]=a.data[e].电流,t.Ydata1[e]=Number(a.data[e].状态代码)}).then(function(a){t.drawLine1()})}else this.$message.warning("请选择日期")},drawLine1:function(){this.$echarts.init(document.getElementById("myChart1")).setOption({title:{textStyle:{color:"black",fontSize:16}},tooltip:{trigger:"axis"},grid:{top:"20%",left:"3%",right:"4%",bottom:"3%",containLabel:!0},legend:{data:this.Ydata},xAxis:{type:"category",data:this.Xdata,axisLine:{lineStyle:{color:"black"}}},yAxis:[{name:"电流值",type:"value",position:"right",axisLine:{lineStyle:{color:"black"}}},{name:"状态",type:"value",position:"left",axisLine:{lineStyle:{color:"black"}},axisLabel:{formatter:function(t){var a=[];return 1===t?a.push("关机"):2===t?a.push("开机"):3===t&&a.push("运行"),a}}}],series:[{name:"电流值",data:this.Ydata,type:"line",itemStyle:{normal:{lineStyle:{color:"blcak"}}}},{name:"状态",data:this.Ydata1,type:"line",yAxisIndex:1,itemStyle:{normal:{lineStyle:{color:"red"}}}}]})}}},n=(e("E7iw"),e("KHd+")),l=Object(n.a)(i,function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("el-card",{staticStyle:{height:"880px"}},[e("el-select",{staticStyle:{width:"160px","margin-bottom":"90px","margin-top":"20px","margin-left":"500px"},attrs:{filterable:"",size:"small",placeholder:"选择工位-设备"},model:{value:t.MachineValue,callback:function(a){t.MachineValue=a},expression:"MachineValue"}},t._l(t.Machine,function(a){return e("el-option",{key:a.value,attrs:{label:a.label,value:a.value}},[e("div",{staticStyle:{float:"left"}},[t._v(t._s(a.label))]),t._v(" "),e("div",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(a.value2))])])})),t._v(" "),e("span",{staticStyle:{"font-size":"13px",color:"black"}},[t._v("查询时间")]),t._v(" "),e("span",[t._v("选择日期")]),t._v(" "),e("el-date-picker",{staticStyle:{width:"160px"},attrs:{size:"small",type:"date",placeholder:"选择日期","value-format":"yyyy-MM-dd",format:"yyyy-MM-dd"},model:{value:t.daterange,callback:function(a){t.daterange=a},expression:"daterange"}}),t._v(" "),e("el-button",{staticStyle:{"margin-left":"15px","margin-top":"20px"},attrs:{type:"primary",plain:"",size:"small",icon:"el-icon-search"},on:{click:function(a){t.searchData()}}},[t._v("查询")]),t._v(" "),e("div",{staticStyle:{width:"1620px",height:"520px",margin:"auto"},attrs:{id:"myChart1"}})],1)],1)},[],!1,null,"2f5eafd6",null);l.options.__file="index.vue";a.default=l.exports},E7iw:function(t,a,e){"use strict";var i=e("mt2k");e.n(i).a},mt2k:function(t,a,e){}}]);