tft-fe/dist/js/3813.435d2e60.js

1 line
6.3 KiB
JavaScript
Raw Normal View History

2023-05-30 09:00:50 +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 h}});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=[],i=r(7171),o=r(475),s=r(5468),u=r(2334),l=r(381),c=r.n(l),m={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,o.NC)(320),listQuery:{startTime:"",endTime:""},checkOutTime:"",maxLine:""}},mounted(){this.chartDom=document.getElementById("particleLineChart"),this.chart=i.S1(this.chartDom),window.addEventListener("resize",(()=>{this.chartHeight=(0,o.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=[],i=[],o={};(0,u.vD)({...this.listQuery}).then((s=>{console.log(s),0===s.code&&s.data.length>0&&(s.data.map((o=>{console.log(o),t.push(c()(o.hour).format("YY-MM-DD HH:mm:ss")),e.push(o.s),r.push(o.m),n.push(o.l),a.push(o.xl),i.push(o.sum)})),o.time=t,o.sList=e,o.mList=r,o.lList=n,o.xlList=a,o.sumList=i,this.getChart(o))}))},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=m,p=r(1001),y=(0,p.Z)(d,n,a,!1,null,"ecee4654",null),h=y.exports},2334:function(t,e,r){r.d(e,{Af:function(){return s},F0:function(){return y},G$:function(){return x},Jt:function(){return L},ON:function(){return l},QI:function(){return o},Qd:function(){return h},YU:function(){return p},dy:function(){return D},eT:function(){return m},gP:function(){return Z},iF:function(){return c},jA:function(){return i},kT:function(){return q},nE:function(){return g},pS:function(){return u},pw:func