tft-fe/dist/js/2927.208556f9.js

1 рядок
16 KiB
JavaScript

"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[2927],{2804:function(t,e,a){a.d(e,{Z:function(){return c}});var l=function(){var t=this,e=t._self._c;return e("div",{staticClass:"bottom-box"},[e("div",{staticClass:"bottom-left"},[e("ul",{staticClass:"dataTab"},[e("div",{staticClass:"title"},[t._v("颗粒数据")]),t._l(t.leftList,(function(a,l){return e("li",{key:l},[e("p",{staticClass:"tabHead"},[t._v(t._s(a.name))]),e("p",{staticClass:"tabValue",attrs:{title:a.value}},[t._v(t._s(a.value))])])}))],2)]),e("div",{staticClass:"bottom-right"},[e("ul",{staticClass:"dataTab"},[e("div",{staticClass:"title"},[t._v("面检数据")]),t._l(t.rightList,(function(a,l){return e("li",{key:l},[e("p",{staticClass:"tabHead"},[t._v(t._s(a.name))]),e("p",{staticClass:"tabValue",attrs:{title:a.value}},[t._v(t._s(a.value))])])}))],2)])])},s=[],r={name:"DefectScatterPlot",data(){return{leftList:[{name:"S",value:null,key:"s"},{name:"M",value:null,key:"m"},{name:"L",value:null,key:"l"},{name:"XL",value:null,key:"xl"}],rightList:[{name:"气泡",value:null,key:"bl"},{name:"变形",value:null,key:"distortion"},{name:"纤维",value:null,key:"fiber"},{name:"划伤",value:null,key:"scratch"},{name:"点状缺陷",value:null,key:"tin"},{name:"结石",value:null,key:"stone"},{name:"铂金",value:null,key:"pt"},{name:"结节",value:null,key:"knot"},{name:"拖尾",value:null,key:"tail"},{name:"ADG",value:null,key:"adg"},{name:"锡缺陷(顶部)",value:null,key:"top"},{name:"锡缺陷(底部)",value:null,key:"bottom"},{name:"无法识别",value:null,key:"iisrest"}]}},methods:{init(t){console.log(t);for(let e=0;e<this.leftList.length;e++)this.leftList[e].value=t[this.leftList[e].key]?t[this.leftList[e].key]:null;for(let e=0;e<this.rightList.length;e++)this.rightList[e].value=t[this.rightList[e].key]?t[this.rightList[e].key]:null}}},i=r,n=a(1001),o=(0,n.Z)(i,l,s,!1,null,"4b7be4b1",null),c=o.exports},2927:function(t,e,a){a.r(e),a.d(e,{default:function(){return x}});var l=function(){var t=this,e=t._self._c;return e("div",{staticClass:"defectScatterPlot"},[e("split-pane",{on:{"on-move-end":t.moveEnd},scopedSlots:t._u([{key:"left",fn:function(){return[e("div",{staticClass:"split-pane left-box"},[e("search-bar",{attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("base-table",{attrs:{selectWidth:50,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH},on:{"selection-change":t.selectChange}})],1)]},proxy:!0},{key:"right",fn:function(){return[e("div",{staticClass:"split-pane right-box"},[e("div",{staticClass:"inner-box"},[e("div",{staticClass:"line1"},[e("span",{staticStyle:{"margin-right":"8px"}},[t._v("颗粒缺陷选择")]),e("el-radio-group",{staticStyle:{"margin-right":"24px"},attrs:{size:"small"},on:{change:t.selectType},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[e("el-radio-button",{attrs:{label:"pellet"}},[t._v("颗粒全选")]),e("el-radio-button",{attrs:{label:"surface"}},[t._v("面检全选")])],1),e("el-button",{staticStyle:{"margin-right":"14px"},attrs:{type:"primary",size:"small"},on:{click:t.drawPic}},[t._v("绘图")]),e("el-button",{attrs:{type:"primary",size:"small",plain:""},on:{click:t.exportExl}},[t._v("导出")]),e("el-button",{attrs:{type:"primary",size:"small",plain:""},on:{click:t.clearChoose}},[t._v("重置")])],1),e("div",{staticClass:"line2"},[e("el-checkbox-group",{model:{value:t.checkList,callback:function(e){t.checkList=e},expression:"checkList"}},t._l(t.list,(function(a,l){return e("el-checkbox",{key:l,attrs:{label:a.value}},[t._v(t._s(a.label))])})),1)],1),e("div",[e("span",{staticClass:"title"},[t._v("缺陷散点图"+t._s(t.showGlassId))])]),e("defect-scatter-plot-chart",{ref:"poltChart",attrs:{defectMsg:t.defectList,cornerData:t.cornerList}}),e("div",{staticClass:"bottom"},[e("div",{staticStyle:{"margin-bottom":"10px"}},[e("span",{staticClass:"title"},[t._v("合计")]),e("defect-scatter-plot-total",{ref:"plotTotal"})],1)])],1)])]},proxy:!0}]),model:{value:t.split1,callback:function(e){t.split1=e},expression:"split1"}})],1)},s=[],r=a(475),i=a(2804),n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"box"},[e("div",{staticStyle:{width:"100%"},style:{height:t.chartHeight+"px"},attrs:{id:"defectScatterPlotChart"}}),e("span",{staticClass:"text1"},[t._v(t._s(t.c2))]),e("span",{staticClass:"text2"},[t._v(t._s(t.c3))]),e("span",{staticClass:"text3"},[t._v(t._s(t.c1))]),e("span",{staticClass:"text4"},[t._v(t._s(t.c4))])])},o=[],c=a(7171),u=a(5468),d={name:"DefectScatterPlotChart",mixins:[u.Z],props:{defectMsg:{type:Object,default:()=>({})},cornerData:{type:Array,default:()=>[]}},data(){return{chart:"",chartHeight:(0,r.NC)(446),list:[{label:"S",value:"S"},{label:"M",value:"M"},{label:"L",value:"L"},{label:"XL",value:"XL"},{label:"气泡",value:"BL"},{label:"变形",value:"Distortion"},{label:"纤维",value:"Fiber"},{label:"划伤",value:"Scratch"},{label:"结节",value:"Knot"},{label:"结石",value:"Stone"},{label:"铂金",value:"Pt"},{label:"拖尾",value:"Tail"},{label:"ADG",value:"Adg"},{label:"点状缺陷",value:"Tin"},{label:"锡缺陷(顶部)",value:"Top"},{label:"锡缺陷(底部)",value:"Bottom"},{label:"无法识别",value:"Iisrest"}],c1:"",c2:"",c3:"",c4:""}},mounted(){window.addEventListener("resize",(()=>{this.chartHeight=(0,r.NC)(446)}))},watch:{defectMsg:function(){this.getChart()},cornerData:function(){this.getCorner()}},methods:{getCorner(){if(this.cornerData.length>0)for(let t=0;t<this.cornerData.length;t++)"C1"===this.cornerData[t].cornerID&&(this.c1=this.cornerData[t].deltaX+"*"+this.cornerData[t].deltaY+"□"),"C2"===this.cornerData[t].cornerID&&(this.c2=this.cornerData[t].deltaX+"*"+this.cornerData[t].deltaY+"□"),"C3"===this.cornerData[t].cornerID&&(this.c3="□"+this.cornerData[t].deltaX+"*"+this.cornerData[t].deltaY),"C4"===this.cornerData[t].cornerID&&(this.c4="□"+this.cornerData[t].deltaX+"*"+this.cornerData[t].deltaY);else this.c1="",this.c2="",this.c3="",this.c4=""},transLabel(t){let e="";for(let a=0;a<this.list.length;a++)t===this.list[a].value&&(e=this.list[a].label);return e},getChart(){null!==this.chart&&""!==this.chart&&void 0!==this.chart&&this.chart.dispose();var t=document.getElementById("defectScatterPlotChart");this.chart=c.S1(t);let e=[],a=[],l=0,s=0;for(let n in this.defectMsg){e.push(this.transLabel(n));let t=[],s={};for(let e of this.defectMsg[n]){let a=[];a.push(2600-parseInt(e.ypos)),a.push(2250-parseInt(e.xpos)),t.push(a),l++}s.name=this.transLabel(n),s.type="scatter",s.data=t,s.symbolSize=5,a.push(s)}s=l<=3e3?0:3e3<l<=7e3?1e3:7e3<l<=1e4?2e3:3e3;var r={color:["#5d7ab7","#ec795f","#925041","#fb5099","#f6bd16","#E8684A","#6DC8EC","#9270CA","#FF9D4D","#269A99","#FF99C3","#BDD2FD","#5AD8A6","#FDABAB","#BDEFDB","#5B8FF9","#404E67"],legend:{top:10,left:0,data:e,textStyle:{fontSize:9},itemWidth:10},brush:{toolbox:["rect","clear"],xAxisIndex:0,throttleType:"debounce",throttleDelay:s},tooltip:{formatter:"{c},{a}"},grid:{x:60,y:60,x2:20,y2:60,borderWidth:1},xAxis:{type:"value",nameGap:16,nameTextStyle:{fontSize:16},splitLine:{show:!0,lineStyle:{type:"dashed",color:"rgba(0, 0, 0, 0.15)"}},axisLabel:{rotate:45},max:2600,min:0,interval:100},yAxis:{type:"value",nameLocation:"end",nameGap:20,nameTextStyle:{fontSize:16},splitLine:{show:!0,lineStyle:{type:"dashed",color:"rgba(0, 0, 0, 0.15)"}},max:2250,min:0,interval:100},series:a};let i=this;this.chart.on("brushSelected",(function(t){var e=[],a=t.batch[0],l=0,s=0,r=0;t.batch[0].areas[0]&&(s=parseInt(t.batch[0].areas[0].coordRange[0][1]-t.batch[0].areas[0].coordRange[0][0]),r=parseInt(t.batch[0].areas[0].coordRange[1][1]-t.batch[0].areas[0].coordRange[1][0]));for(var n=0;n<a.selected.length;n++){var o=a.selected[n].dataIndex.length;l+=o,e.push(a.selected[n].seriesName+" : "+o)}e.push("总计 : "+l),i.chart.setOption({title:{backgroundColor:"rgba(0, 0, 0, 0.5)",text:"SELECTED DATA: \n"+e.join("\n"),right:t.batch[0].areas[0]?"10%":-100,bottom:t.batch[0].areas[0]?0:-500,textStyle:{fontSize:12,fontWeight:"normal",color:"#fff"}},graphic:[{type:"group",left:t.batch[0].areas[0]?t.batch[0].areas[0].range[0][0]:-100,top:t.batch[0].areas[0]?t.batch[0].areas[0].range[1][1]+5:-100,children:[{type:"text",z:100,style:{fill:"#333",width:220,overflow:"break",text:s+"*"+r,font:"12px Microsoft YaHei"}}]}]})})),r&&this.chart.setOption(r)}}},h=d,p=a(1001),m=(0,p.Z)(h,n,o,!1,null,"557638a7",null),f=m.exports,b=a(2334),y=a(381),v=a.n(y);const g=[{prop:"glassId",label:"ID",fixed:"left",minWidth:120},{prop:"packingStation",label:"包装工位"},{prop:"testTime",label:"检验时间",filter:r.g6,minWidth:160},{prop:"grindType",label:"研磨类型"},{prop:"electricity",label:"总电流"},{prop:"particleSum",label:"颗粒总数"},{prop:"surfaceSum",label:"面检总数"},{prop:"tin",label:"点状缺陷"},{prop:"distortion",label:"变形"},{prop:"eletricityConform",label:"工艺符合性",minWidth:100},{prop:"grindTime",label:"总研磨时间"}];var C={name:"defectScatterPlot",components:{defectScatterPlotTotal:i.Z,defectScatterPlotChart:f},data(){return{split1:.4,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:"button",btnName:"查询",name:"search",color:"primary"}],searchTime:"",listQuery:{startTime:"",endTime:""},tableProps:g,tableData:[],tableH:(0,r.NC)(290),total:0,type:"pellet",selectList:[{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"}],checkItem:"",checkList:["s","m","l","xl"],list:[{label:"S",value:"s"},{label:"M",value:"m"},{label:"L",value:"l"},{label:"XL",value:"xl"},{label:"气泡",value:"bl"},{label:"变形",value:"distortion"},{label:"纤维",value:"fiber"},{label:"划伤",value:"scratch"},{label:"结节",value:"knot"},{label:"结石",value:"stone"},{label:"铂金",value:"pt"},{label:"拖尾",value:"tail"},{label:"ADG",value:"adg"},{label:"点状缺陷",value:"tin"},{label:"锡缺陷(顶部)",value:"top"},{label:"锡缺陷(底部)",value:"bottom"},{label:"无法识别",value:"iisrest"}],selectedGlassId:[],detailMsg:{},defectList:{},cornerList:[],showGlassId:""}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,r.NC)(290)})),this.formConfig[0].defaultSelect=[v()().format("yyyy-MM-DD")+"T00:00:00",v()().format("yyyy-MM-DD")+"T23:59:59"],this.listQuery.startTime=v()().format("yyyy-MM-DD")+"T00:00:00",this.listQuery.endTime=v()().format("yyyy-MM-DD")+"T23:59:59",this.getList()},methods:{getList(){(0,b.F0)({...this.listQuery}).then((t=>{console.log(t),this.tableData=t.data}))},drawPic(){return 0===this.selectedGlassId.length?(this.$message({message:"请先勾选左侧的玻璃",type:"error"}),!1):0===this.checkList.length?(this.$message({message:"请先勾选缺陷",type:"error"}),!1):(this.getDetail(),this.getCornerData(),void(0,b.Qd)({startTime:this.listQuery.startTime,endTime:this.listQuery.endTime,glassId:this.selectedGlassId,defectType:this.checkList}).then((t=>{0===t.code?this.defectList=t.data:this.defectList={},this.$refs.poltChart.getChart()})))},getDetail(){(0,b.r5)({startTime:this.listQuery.startTime,endTime:this.listQuery.endTime,glassId:this.selectedGlassId}).then((t=>{0===t.code&&(this.detailMsg=t.data[0]||{},this.$refs.plotTotal.init(this.detailMsg))}))},getCornerData(){(0,b.nE)({glassId:this.selectedGlassId}).then((t=>{this.cornerList=t.data}))},buttonClick(t){this.listQuery.startTime=t.timeVal?t.timeVal[0]:"",this.listQuery.endTime=t.timeVal?t.timeVal[1]:"",this.getList()},selectChange(t){console.log(t);let e=[];if(t.length>0){for(let a=0;a<t.length;a++)e.push(t[a].glassId);this.selectedGlassId=e}else this.selectedGlassId=[]},selectType(t){"pellet"===t?this.checkList=["s","m","l","xl"]:"surface"===t&&(this.checkList=["bl","distortion","fiber","scratch","knot","stone","pt","tail","adg","tin","top","bottom","iisrest"])},moveEnd(){this.$refs.poltChart.getChart()},clearChoose(){this.type="",this.checkList=[]},exportExl(){(0,b.G$)({startTime:this.listQuery.startTime,endTime:this.listQuery.endTime,glassId:this.selectedGlassId,defectType:this.checkList}).then((t=>{let e="";const a=t.headers["content-disposition"];a&&(e=decodeURIComponent(a.slice(a.indexOf("filename=")+9)));const l=new Blob([t.data]),s=new FileReader;s.readAsDataURL(l),s.onload=t=>{const a=document.createElement("a");a.download=e,a.href=t.target.result,document.body.appendChild(a),a.click(),document.body.removeChild(a)}})),(0,b.Jt)({startTime:this.listQuery.startTime,endTime:this.listQuery.endTime,glassId:this.selectedGlassId,defectType:this.checkList}).then((t=>{let e="";const a=t.headers["content-disposition"];a&&(e=decodeURIComponent(a.slice(a.indexOf("filename=")+9)));const l=new Blob([t.data]),s=new FileReader;s.readAsDataURL(l),s.onload=t=>{const a=document.createElement("a");a.download=e,a.href=t.target.result,document.body.appendChild(a),a.click(),document.body.removeChild(a)}}))}}},D=C,k=(0,p.Z)(D,l,s,!1,null,"37cc2088",null),x=k.exports},2334:function(t,e,a){a.d(e,{Af:function(){return n},F0:function(){return m},G$:function(){return g},Jt:function(){return v},ON:function(){return c},QI:function(){return i},Qd:function(){return f},YU:function(){return p},dy:function(){return D},eT:function(){return d},gP:function(){return T},iF:function(){return u},jA:function(){return r},kT:function(){return x},nE:function(){return y},pS:function(){return o},pw:function(){return h},qn:function(){return L},r5:function(){return b},uX:function(){return k},v:function(){return s},vD:function(){return C}});var l=a(8859);function s(t){return(0,l.Z)({url:"/quality/processDetect/page",method:"post",data:t})}function r(t){return(0,l.Z)({url:"/quality/processDetect/list",method:"post",data:t})}function i(t){return(0,l.Z)({url:"/quality/processDetect/add",method:"post",formState:!0,data:t})}function n(t){return(0,l.Z)({url:"/quality/processDetect/detectInput",method:"post",formState:!0,data:t})}function o(t){return(0,l.Z)({url:"/quality/processDetect/export",method:"post",responseType:"blob",data:t,timeout:6e4})}function c(t){return(0,l.Z)({url:"/quality/processCompleteInspetion/page",method:"post",data:t})}function u(t){return(0,l.Z)({url:"/quality/processCompleteInspetion/getDetails",method:"post",data:t})}function d(t){return(0,l.Z)({url:"/quality/processCompleteInspetion/listType",method:"post",data:t})}function h(t){return(0,l.Z)({url:"/quality/processCompleteInspetion/export2",method:"post",responseType:"blob",data:t})}function p(t){return(0,l.Z)({url:"/quality/processCompleteInspetion/pageIIS",method:"post",data:t})}function m(t){return(0,l.Z)({url:"/quality/ProcessFull/queryPoint",method:"post",data:t})}function f(t){return(0,l.Z)({url:"/quality/ProcessFull/drawPoint",method:"post",data:t})}function b(t){return(0,l.Z)({url:"/quality/ProcessFull/queryPointClear",method:"post",data:t})}function y(t){return(0,l.Z)({url:"/quality/ProcessFull/cornerData",method:"post",data:t})}function v(t){return(0,l.Z)({url:"/quality/ProcessFull/pointExport2",method:"post",responseType:"blob",data:t,timeout:6e4})}function g(t){return(0,l.Z)({url:"/quality/ProcessFull/pointExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function C(t){return(0,l.Z)({url:"/quality/ProcessFull/confirm",method:"post",data:t})}function D(t){return(0,l.Z)({url:"/quality/ProcessFull/queryThickness",method:"post",data:t})}function k(t){return(0,l.Z)({url:"/quality/ProcessFull/drawThickness",method:"post",formState:!0,data:t})}function x(t){return(0,l.Z)({url:"/quality/productTrace/page",method:"post",data:t})}function T(t){return(0,l.Z)({url:"/quality/productTrace/pageProcess",method:"post",data:t})}function L(t){return(0,l.Z)({url:"/quality/productTrace/pageProcessParameter",method:"post",data:t})}}}]);