tft-fe/dist/js/6619.63b9b495.js

1 line
6.5 KiB
JavaScript

2023-06-30 14:01:06 +08:00
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[6619],{6619: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:"fullInspection"},[e("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH}},[t.tableBtn.length?e("method-btn",{attrs:{slot:"handleBtn",width:80,label:"操作",fixed:"right","method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"}):t._e()],1),e("pagination",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,total:t.total},on:{"update:page":function(e){return t.$set(t.listQuery,"current",e)},"update:limit":function(e){return t.$set(t.listQuery,"size",e)},pagination:function(e){return t.getList()}}})],1)},a=[],o=r(475),i=r(2334),l=r(381),u=r.n(l);const s=[{prop:"virtualcode",label:"玻璃ID"},{prop:"filetype",label:"全检类型"},{prop:"glassLength",label:"长/mm"},{prop:"glassWidth",label:"宽/mm"},{prop:"glassHeight",label:"厚/mm"},{prop:"grade",label:"产品质量"},{prop:"line",label:"产线"},{prop:"time",label:"检验时间",filter:o.g6,minWidth:160}],c=[{type:"detail",btnName:"详情"}];var d={name:"fullInspection",data(){return{formConfig:[{type:"input",label:"玻璃ID",placeholder:"玻璃ID",param:"glassId"},{type:"select",label:"全检类型",selectOptions:[{id:"精切后边检",name:"精切后边检"},{id:"终检边检",name:"终检边检"},{id:"面检",name:"面检"},{id:"复检",name:"复检"}],param:"grindType",defaultSelect:"",width:150},{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"},{type:"separate"},{type:"button",btnName:"导出",name:"export",color:"primary",plain:!0}],tableProps:s,tableData:[],tableH:(0,o.NC)(330),tableBtn:c,total:0,listQuery:{current:1,size:20}}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,o.NC)(330)}));const{listQuery:t}=this.$route.params;if(t){let e=JSON.parse(t);this.listQuery=e,this.formConfig[0].defaultSelect=e.glassId,this.formConfig[1].defaultSelect=e.grindType,this.formConfig[2].defaultSelect=[e.startTime,e.endTime]}else this.formConfig[2].defaultSelect=[u()().format("yyyy-MM-DD")+"T00:00:00",u()().format("yyyy-MM-DD")+"T23:59:59"],this.listQuery.startTime=u()().format("yyyy-MM-DD")+"T00:00:00",this.listQuery.endTime=u()().format("yyyy-MM-DD")+"T23:59:59";this.getList()},methods:{getList(){(0,i.ON)({...this.listQuery}).then((t=>{0===t.code&&t.data&&(this.tableData=t.data.records,this.total=t.data.total)}))},buttonClick(t){switch(t.btnName){case"search":this.listQuery.startTime=t.timeVal?t.timeVal[0]:"",this.listQuery.endTime=t.timeVal?t.timeVal[1]:"",this.listQuery.grindType=t.grindType,this.listQuery.glassId=t.glassId,this.listQuery.current=1,this.getList();break;default:(0,i.pw)({...this.listQuery}).then((t=>{console.log(t);let e="";const r=t.headers["content-disposition"];r&&(e=decodeURIComponent(r.slice(r.indexOf("filename=")+9)));const n=new Blob([t.data]),a=new FileReader;a.readAsDataURL(n),a.onload=t=>{const r=document.createElement("a");r.download=e,r.href=t.target.result,document.body.appendChild(r),r.click(),document.body.removeChild(r)}}))}},handleClick(t){console.log(t),"detail"===t.type&&this.$router.push({name:"fullInspectionDetail",params:{virtualcode:t.data.virtualcode,filetype:encodeURIComponent(t.data.filetype),time:t.data.time,listQuery:JSON.stringify(this.listQuery)}})}}},p=d,m=r(1001),f=(0,m.Z)(p,n,a,!1,null,null,null),y=f.exports},2334:function(t,e,r){r.d(e,{Af:function(){return l},F0:function(){return f},G$:function(){return T},Jt:function(){return g},ON:function(){return s},QI:function(){return i},Qd:function(){return y},YU:function(){retu