2023-05-16 16:13:35 +08:00
|
|
|
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[3813],{3813:function(t,e,r){r.r(e),r.d(e,{default:function(){return y}});var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"particleLine-chart"},[e("div",{staticStyle:{"margin-bottom":"30px"}},[e("search-bar",{attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}})],1),e("div",{staticStyle:{width:"100%"},style:{height:t.chartHeight+"px"},attrs:{id:"particleLineChart"}})])},a=[],o=r(7171),i=r(475),s=r(5468),u=r(2334),l=r(381),c=r.n(l),p={name:"particleLineChart",mixins:[s.Z],data(){return{formConfig:[{type:"datePicker",label:"检验时间",dateType:"datetimerange",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-ddTHH:mm:ss",rangeSeparator:"-",startPlaceholder:"开始时间",endPlaceholder:"结束时间",param:"timeVal",defaultSelect:[],width:350},{type:"input",label:"合格上线",placeholder:"合格上线",param:"maxLine"},{type:"button",btnName:"确认",name:"search",color:"primary"}],chartDom:"",chart:"",chartHeight:(0,i.NC)(320),listQuery:{startTime:"",endTime:""},checkOutTime:"",maxLine:""}},mounted(){this.chartDom=document.getElementById("particleLineChart"),this.chart=o.S1(this.chartDom),window.addEventListener("resize",(()=>{this.chartHeight=(0,i.NC)(320)})),this.formConfig[0].defaultSelect=[c()().format("yyyy-MM-DD")+"T00:00:00",c()().format("yyyy-MM-DD")+"T23:59:59"],this.listQuery.startTime=c()().format("yyyy-MM-DD")+"T00:00:00",this.listQuery.endTime=c()().format("yyyy-MM-DD")+"T23:59:59",this.getMsg()},methods:{buttonClick(t){console.log(t),"search"===t.btnName&&(this.listQuery.startTime=t.timeVal?t.timeVal[0]:"",this.listQuery.endTime=t.timeVal?t.timeVal[1]:"",this.maxLine=t.maxLine,this.getMsg())},getMsg(){let t=[],e=[],r=[],n=[],a=[],o=[],i={};(0,u.vD)({...this.listQuery}).then((s=>{console.log(s),0===s.code&&s.data.length>0&&(s.data.map((i=>{console.log(i),t.push(c()(i.hour).format("YY-MM-DD HH:mm:ss")),e.push(i.s),r.push(i.m),n.push(i.l),a.push(i.xl),o.push(i.sum)})),i.time=t,i.sList=e,i.mList=r,i.lList=n,i.xlList=a,i.sumList=o,this.getChart(i))}))},getChart1(t){var e={color:["#5AD8A6","#5B8FF9","#5D7092","#F6BD16","#E8684A"],title:{text:"时间段玻璃颗粒数"},tooltip:{trigger:"axis"},legend:{data:["Total","M","L","S","XL"],right:"4%"},grid:{left:"3%",right:"4%",bottom:"3%"},xAxis:{type:"category",boundaryGap:!1,data:t.time},yAxis:{type:"value"},series:[{name:"Total",type:"line",data:t.sumList,markLine:{show:!1,Symbol:"none",label:{position:"end",formatter:"合格线\n"+this.maxLine},data:[{silent:!1,lineStyle:{type:"dashed",color:"#0B58FF"},yAxis:this.maxLine}]}},{name:"M",type:"line",data:t.mList},{name:"L",type:"line",data:t.lList},{name:"S",type:"line",data:t.sList},{name:"XL",type:"line",data:t.xlList}]};e&&this.chart.setOption(e)},getChart(t){console.log(t);var e={color:["#5AD8A6","#5B8FF9","#5D7092","#F6BD16","#E8684A"],title:{text:"时间段玻璃颗粒数",left:"1%"},tooltip:{trigger:"axis"},legend:{data:["Total","M","L","S","XL"],right:"4%"},grid:{left:"4%",right:"4%",bottom:"10%"},xAxis:{type:"category",boundaryGap:!1,data:t.time},yAxis:{type:"value"},dataZoom:[{startValue:"2023-02-014"},{type:"inside"}],series:[{name:"Total",type:"line",data:t.sumList,markLine:{show:!1,Symbol:"none",label:{position:"end",formatter:"合格线\n"+this.maxLine},data:[{silent:!1,lineStyle:{type:"dashed",color:"#0B58FF"},yAxis:this.maxLine}]}},{name:"M",type:"line",data:t.mList},{name:"L",type:"line",data:t.lList},{name:"S",type:"line",data:t.sList},{name:"XL",type:"line",data:t.xlList}]};e&&this.chart.setOption(e)}}},d=p,m=r(1001),h=(0,m.Z)(d,n,a,!1,null,"ecee4654",null),y=h.exports},2334:function(t,e,r){r.d(e,{AT:function(){return C},Af:function(){return s},F0:function(){return h},ON:function(){return l},QI:function(){return i},Qd:function(){return y},YU:function(){return m},an:function(){return q},bu:function(){return Z},dy:function(){return L},eT:function(){return p},fL:function(){return M},gP:function(){return S},iF:function(){return c},jA:function(){return o},kT:function(){return F},oR:func
|