1 line
5.6 KiB
JavaScript
1 line
5.6 KiB
JavaScript
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[4325],{4325: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"}})])},n=[],r=a(7171),o=a(475),s=a(5468),l=a(2334),u=a(381),m=a.n(u),c={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=r.S1(this.chartDom),window.addEventListener("resize",(()=>{this.chartHeight=(0,o.NC)(320)})),this.formConfig[0].defaultSelect=[m()().format("yyyy-MM-DD")+"T00:00:00",m()().format("yyyy-MM-DD")+"T23:59:59"],this.listQuery.startTime=m()().format("yyyy-MM-DD")+"T00:00:00",this.listQuery.endTime=m()().format("yyyy-MM-DD")+"T23:59:59",this.getList(),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=[],a=[],i=[],n=[],r=[],o={};(0,l.vD)({...this.listQuery}).then((s=>{console.log(s),0===s.code&&s.data.length>0&&(s.data.map((o=>{console.log(o),t.push(m()(o.hour).format("YY-MM-DD HH:mm:ss")),e.push(o.s),a.push(o.m),i.push(o.l),n.push(o.xl),r.push(o.sum)})),o.time=t,o.sList=e,o.mList=a,o.lList=i,o.xlList=n,o.sumList=r,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=c,p=a(1001),h=(0,p.Z)(d,i,n,!1,null,"b61f9baa",null),y=h.exports},2334:function(t,e,a){a.d(e,{Af:function(){return s},F0:function(){return h},ON:function(){return u},QI:function(){return o},Qd:function(){return y},YU:function(){return p},dy:function(){return L},eT:function(){return c},iF:function(){return m},jA:function(){return r},pS:function(){return l},pw:function(){return d},r5:function(){return f},uX:function(){return x},v:function(){return n},vD:function(){return g}});var i=a(8859);function n(t){return(0,i.Z)({url:"/quality/processDetect/page",method:"post",data:t})}function r(t){return(0,i.Z)({url:"/quality/processDetect/list",method:"post",data:t})}function o(t){return(0,i.Z)({url:"/quality/processDetect/add",method:"post",formState:!0,data:t})}function s(t){return(0,i.Z)({url:"/quality/processDetect/detectInput",method:"post",formState:!0,data:t})}function l(t){return(0,i.Z)({url:"/quality/processDetect/export",method:"post",responseType:"blob",data:t,timeout:6e4})}function u(t){return(0,i.Z)({url:"/quality/processCompleteInspetion/page",method:"post",data:t})}function m(t){return(0,i.Z)({url:"/quality/processCompleteInspetion/getDetails",method:"post",data:t})}function c(t){return(0,i.Z)({url:"/quality/processCompleteInspetion/listType",method:"post",data:t})}function d(t){return(0,i.Z)({url:"/quality/processCompleteInspetion/export",method:"post",responseType:"blob",data:t})}function p(t){return(0,i.Z)({url:"/quality/processCompleteInspetion/pageIIS",method:"post",data:t})}function h(t){return(0,i.Z)({url:"/quality/ProcessFull/queryPoint",method:"post",data:t})}function y(t){return(0,i.Z)({url:"/quality/ProcessFull/drawPoint",method:"post",data:t})}function f(t){return(0,i.Z)({url:"/quality/ProcessFull/queryPointClear",method:"post",data:t})}function g(t){return(0,i.Z)({url:"/quality/ProcessFull/confirm",method:"post",data:t})}function L(t){return(0,i.Z)({url:"/quality/ProcessFull/queryThickness",method:"post",data:t})}function x(t){return(0,i.Z)({url:"/quality/ProcessFull/drawThickness",method:"post",formState:!0,data:t})}}}]); |