tft-fe/dist/js/839.ec7017d6.js
2023-02-22 13:59:09 +08:00

1 line
3.3 KiB
JavaScript

"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[839],{839:function(t,e,a){a.r(e),a.d(e,{default:function(){return y}});var i=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"}})])},s=[],n=a(7171),r=a(475),l=a(5468),o=a(381),m=a.n(o),h={name:"particleLineChart",mixins:[l.Z],data(){return{formConfig:[{type:"datePicker",label:"检验时间",dateType:"datetime",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",placeholder:"抽检时间",param:"checkOutTime",defaultSelect:"",width:200},{type:"input",label:"合格上线",placeholder:"合格上线",param:"maxLine"},{type:"button",btnName:"确认",name:"search",color:"primary"}],chartDom:"",chart:"",chartHeight:(0,r.NC)(320),checkOutTime:"",maxLine:""}},mounted(){this.chartDom=document.getElementById("particleLineChart"),this.chart=n.S1(this.chartDom),window.addEventListener("resize",(()=>{this.chartHeight=(0,r.NC)(320)})),this.formConfig[0].defaultSelect=m()().format("YYYY-MM-DD HH:mm:ss"),this.getMsg()},methods:{buttonClick(t){console.log(t),"search"===t.btnName&&(this.checkOutTime=t.checkOutTime,this.maxLine=t.maxLine,this.getMsg())},getMsg(){let t=[],e=[],a=[],i=[],s=[],n=[],r={};for(let l=0;l<1e3;l++)t.push(m()().add(l,"days").format("YYYY-MM-DD HH:mm:ss")),e.push(Math.floor(80*Math.random()+10)),a.push(Math.floor(100*Math.random()+20)),i.push(Math.floor(130*Math.random()+30)),s.push(Math.floor(150*Math.random()+40)),n.push(e[l]+a[l]+i[l]+s[l]);r.time=t,r.sList=e,r.mList=a,r.lList=i,r.xlList=s,r.sumList=n,this.getChart(r)},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=h,c=a(1001),p=(0,c.Z)(d,i,s,!1,null,"06ca839a",null),y=p.exports}}]);