webpackJsonp([1],{GmHr:function(e,t){},M8ec:function(e,t){},eBbZ:function(e,t){},mc36:function(e,t){},qmMI:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=a("bOdI"),s=a.n(o),l=a("BO1k"),r=a.n(l),n=a("woOf"),c=a.n(n),u=a("d7EF"),d=a.n(u),h=a("//Fk"),p=a.n(h),f=a("mvHQ"),m=a.n(f),b=a("Dd8w"),v=a.n(b),g=a("Dod7"),w=a("ysqt"),D=a("bzuE"),_=a("GKmE"),y=a("lbHh"),I=a.n(y),x=a("3MlD"),P=a("0zcq"),C=a("zj8Z"),k=a("G9gL"),$=a("iDdT"),S=a("pU78"),N=a("NYxO"),L=a("Xnfr"),A={components:{btnInput:w.a,DialogChooseSingleUser:x.a,DialogChooseSingleDevice:k.a,DialogChooseProcess:C.a,DialogChooseCheckProject:$.a,tagSingleUsers:S.a,dialogChoosePoint:P.a},data:function(){return{formData:{createTime:"",code:"",name:"",auditId:"",version:"",remark:"",createBy:"",createName:"",processAndProject:[],useStatus:"1"},auditStatus:"",deletProcessCheckIds:[],initiateProList:[],deletCraftItemIds:[],currentChildIndex:0,truelabel:1,currentIndex:0,thisDeviceId:"",falselabel:0,tableData:[],ProList:[],approveList:[],selectDeptId:[],chooseParts:[],depOptions:[],uomList:[],pointList:[],pointData:[],pointProjects:[],chooseCheckProjectVisible:!1,ChoosePointDialogVisible:!1,ChoosePointVisible:!1,chooseProVisible:!1,deviceLoading:!1,chooseUserVisible:!1,chooseDevicesVisible:!1,chooseProcessVisible:!1,dialogLoading:!1,btndisabled:!0,isDisabled:!1,dialogTitle:"选择配置",options:[],loading:!1,config:D.a,deviceId:"",deviceName:"",uploadAttachment:[],fileDocList:[],uploadUrl:g.a.uploadUrl,ftpPrefix:g.a.ftpPrefix,fullscreenLoading:!1,auto_upload:!1,dialogVisible:!1,ruleForm:{name:[{required:!0,message:"请填写工艺名称",trigger:"blur"}]}}},mounted:function(){var e=I.a.get("userName");this.formData.createName=e,console.log(Object(_.c)()),console.log(/\d{4}-\d{1,2}-\d{1,2}/g.exec(Object(_.c)())),this.formData.createTime=/\d{4}-\d{1,2}-\d{1,2}/g.exec(Object(_.c)())[0],this.initData(),this.$route.query.id&&(this.formData.id=this.$route.query.id,this.getDetail())},watch:{currentIndex:function(e){console.log(e),this.currentChildIndex=e}},methods:v()({},Object(N.d)({removeTagNav:"tagNav/removeTagNav"}),(i={whetherExamineChange:function(e){var t=this;0==this.tableData[e].whetherExamine&&(this.tableData[e].pro.forEach(function(e){t.deletProcessCheckIds.push(e.id)}),console.log(this.deletProcessCheckIds),this.$set(this.tableData[e],"pro",[]),this.$set(this.tableData[e],"proDetail",[]),this.ProList=[])},whetherCollectChange:function(e){0==this.tableData[e].whetherCollect&&(this.$set(this.tableData[e],"pointList",[]),this.$set(this.tableData[e],"processAutoCollectDetail",[]),this.pointList=[])},showPoint:function(e,t){var a=this;console.log(e),this.thisDeviceId=e.deviceId,e.deviceId&&this.$api.netWorkingAPI.measurePointList({deviceId:e.deviceId}).then(function(e){0===e.code?a.pointList=e.data?e.data.datas:[]:a.pointList=[]}),e.processAutoCollectDetail?this.pointData=JSON.parse(m()(e.processAutoCollectDetail)):this.pointData=[],this.currentChildIndex=t,this.ChoosePointDialogVisible=!0},submitPoint:function(){var e=[];this.pointData.forEach(function(t){e.push(t.pointId)}),this.$set(this.tableData[this.currentChildIndex],"processAutoCollectDetail",this.pointData),this.$set(this.tableData[this.currentChildIndex],"pointList",e),this.ChoosePointDialogVisible=!1},handleSelectionChange_point:function(e){console.log(e),this.pointProjects=e},getPoint:function(e){var t=this;console.log(e),e&&e.forEach(function(e){t.$set(e,"onlyId",e.id+"_"+Date.now()),t.$set(e,"pointId",e.id),delete e.id,t.pointData.push(e)})},removePointProjects:function(){var e=this;this.pointProjects&&this.$confirm("确认删除选中的联网采集配置吗?","提示",{type:"warning"}).then(function(){e.pointProjects.forEach(function(t){console.log(t);var a=e.pointData.findIndex(function(e){if(console.log(e),e.onlyId&&t.onlyId){if(e.onlyId==t.onlyId)return!0}else if(e.itemId==t.itemId)return!0});e.pointData.splice(a,1)})})},showPro1:function(e,t){if(this.uploadAttachment=[],this.ftpPrefix=[],e.uploadAttachment&&""!=e.uploadAttachment){var a=JSON.parse(e.uploadAttachment);this.fileDocList=[];for(var i=0;i0&&e.deptId){var a=m()(e.deptId),i=t.treeFindPath(t.depOptions,function(e){return e.id===a});e.selectDeptId=JSON.parse(m()(i))}e.only=Date.now(),e.processId=e.id,e.newId=e.id,e.demand=e.demand?e.demand:"",e.whetherExamine=void 0!=e.whetherExamine?e.whetherExamine:0,e.whetherOutsource=void 0!=e.whetherOutsource?e.whetherOutsource:0,e.whetherCollect=void 0!=e.whetherCollect?e.whetherCollect:0,e.whetherOutsource=void 0!=e.whetherOutsource?e.whetherOutsource:0,e.autoDispatch=void 0!=e.autoDispatch?e.autoDispatch:0,e.totalHour=e.totalHour?e.totalHour:0,e.standard=e.standard?e.standard:0,e.type=e.type?e.type:"",e.planStartTime=t.today_time,e.planEndTime=t.tomorrow_time,e.pointList=[],e.processAutoCollectDetail&&e.processAutoCollectDetail.forEach(function(a){t.$set(a,"onlyId",a.pointId+"_"+Date.now()),e.pointList.push(a.pointId)});var o=[];e.uploadAttachment&&e.uploadAttachment.forEach(function(e){var t={fileName:e.fileName,filePath:e.filePath};o.push(t)}),e.uploadAttachment=m()(o),e.pro=[],e.proDetail&&e.proDetail.forEach(function(t){t.newId=t.proId;var a={proId:t.proId,whetherCheck:t.whetherCheck?t.whetherCheck:0,remark:t.remark?t.remark:"",uom:t.uom?t.uom:"",min:t.min?t.min:"",max:t.max?t.max:"",pointId:t.pointId?t.pointId:""};e.pro.push(a)}),e.id&&delete e.id;var s=c()({},s,e);t.tableData.push(s),t.tableData=t.unique(t.tableData)})}),s()(i,"unique",function(e){for(var t=0;t2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return[];var i=!0,o=!1,s=void 0;try{for(var l,n=r()(e);!(i=(l=n.next()).done);i=!0){var c=l.value;if(a.push(c.id),t(c))return a;if(c.children){var u=this.treeFindPath(c.children,t,a);if(u.length)return u}a.pop()}}catch(e){o=!0,s=e}finally{try{!i&&n.return&&n.return()}finally{if(o)throw s}}return[]}),s()(i,"setDeptList",function(e){var t=!0,a=!1,i=void 0;try{for(var o,s=r()(e);!(t=(o=s.next()).done);t=!0){var l=o.value;l.hasChildren?this.setDeptList(l.children):l.children=void 0}}catch(e){a=!0,i=e}finally{try{!t&&s.return&&s.return()}finally{if(a)throw i}}}),s()(i,"setDefaultDept",function(){if(this.depOptions.length>0&&this.formData.proDept){var e=m()(this.formData.proDept),t=this.treeFindPath(this.depOptions,function(t){return t.id===e});this.selectDeptId=JSON.parse(m()(t))}}),s()(i,"setDefaultDeptChild",function(){var e=this;this.depOptions.length>0&&this.tableData.length>0&&this.tableData.forEach(function(t){if(e.depOptions.length>0&&t.deptId){var a=m()(t.deptId),i=e.treeFindPath(e.depOptions,function(e){return e.id===a});t.selectDeptId=JSON.parse(m()(i))}})}),s()(i,"handleChangeScope",function(e){var t=e.selectDeptId[e.selectDeptId.length-1];this.$set(e,"deptId",t)}),s()(i,"showDeviceName",function(e,t){this.currentChildIndex=t,this.chooseDevicesVisible=!0}),s()(i,"getDevice",function(e){e&&(this.$set(this.tableData[this.currentChildIndex],"deviceName",e.name),this.$set(this.tableData[this.currentChildIndex],"deviceId",e.id),this.$set(this.tableData[this.currentChildIndex],"pointList",[]),this.$set(this.tableData[this.currentChildIndex],"processAutoCollectDetail",[]),this.tableData[this.currentChildIndex].proDetail.forEach(function(e){e.pointId=""}),this.tableData[this.currentChildIndex].pro.forEach(function(e){e.pointId="",console.log(e)}),this.pointList=[])}),s()(i,"handlePartChange",function(e){this.chooseParts=e}),s()(i,"resetFields",function(){this.$refs.form.resetFields()}),s()(i,"httpRequest",function(e,t,a){var i=this,o=new FormData;o.append("file",e,t),this.$api.commonAPI.uploadUrl(o).then(function(t){i.fullscreenLoading=!1,0==t.code?(i.$message({message:"上传成功",type:"success",duration:2e3}),a?a.filePath=t.filePath:e.filePath=t.filePath,i.uploadAttachment.push({filePath:t.filePath,fileName:t.fileName})):(i.fullscreenLoading=!1,i.$message.error("上传失败"),i.$refs.upload.uploadFiles.splice(i.$refs.upload.uploadFiles.length-1,1))})}),s()(i,"onPreview",function(e){e.url?window.open(e.url):e.raw&&window.open(this.ftpPrefix+e.raw.filePath)}),s()(i,"onChange",function(e,t){if(e.size>1e8)return this.$message.error("上传文件不能超过100M!"),this.$refs.upload.fileList=this.$refs.upload.fileList,this.$refs.upload.uploadFiles.splice(this.$refs.upload.uploadFiles.length-1,1),!1;if(e=e.raw,/image\/\w+/.test(e.type)){this.fullscreenLoading=!0;var a=this;L.a.compressAccurately(e,400).then(function(t){t.size?a.httpRequest(t,e.name,e):(a.$message.error("压缩图片失败"),a.fullscreenLoading=!1,a.$refs.upload.uploadFiles.splice(a.$refs.upload.uploadFiles.length-1,1))}).catch(function(t){a.httpRequest(e,e.name)})}else this.fullscreenLoading=!0,this.httpRequest(e,e.name)}),s()(i,"handleRemove",function(e,t){if(e.raw){for(var a=void 0,i=0;i0&&this.subsetAll.forEach(function(e){t.push(e)}),this.$emit("change",t),this.innerVisible=!1},resetFields:function(){this.$refs.form&&this.$refs.form.resetFields()}}},o={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],attrs:{center:"",title:"选择工序",visible:e.innerVisible,width:"900px"},on:{"update:visible":function(t){e.innerVisible=t}}},[a("div",[a("el-form",{attrs:{inline:""}},[a("el-form-item",{attrs:{label:"工序名称"}},[a("el-input",{attrs:{placeholder:"请输入工序名称",clearable:""},model:{value:e.searchData_Subset.name,callback:function(t){e.$set(e.searchData_Subset,"name",t)},expression:"searchData_Subset.name"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.searchSubset}},[e._v("查询")])],1)],1)],1),e._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.dialogLoading,expression:"dialogLoading"}],ref:"tb",attrs:{data:e.subsetList,border:"","header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"row-click":e.clickRow,"selection-change":e.ckSubsetAll}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"code",align:"center",fixed:"",label:"工序代码","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",align:"center",fixed:"",label:"工序名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"standard",align:"center",label:"基准良率","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"typeName",align:"center",label:"工序类型","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"whetherExamine",align:"center",label:"是否检验","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.whetherExamine?a("div",[e._v("是")]):a("div",[e._v("否")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"whetherCollect",align:"center",label:"是否自动采集","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.whetherCollect?a("div",[e._v("是")]):a("div",[e._v("否")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"manHour",align:"center",label:"单件工时(分钟)","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"labourPrice",align:"center",label:"单件工价(元/件)","show-overflow-tooltip":""}})],1)],1),e._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":e.searchData_Subset.pageno,"page-sizes":[5,10,20],"page-size":e.searchData_Subset.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.subsetTotal},on:{"update:currentPage":function(t){return e.$set(e.searchData_Subset,"pageno",t)},"update:current-page":function(t){return e.$set(e.searchData_Subset,"pageno",t)},"size-change":e.subsetSizeChange,"current-change":e.subsetCurrentChange}})],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:function(t){return e.submit()}}},[e._v("确定")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.innerVisible=!1}}},[e._v("关闭")])],1)])},staticRenderFns:[]};var s=a("VU/8")(i,o,!1,function(e){a("M8ec")},null,null);t.a=s.exports}});