1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
|
webpackJsonp([218],{"W/rM":function(e,t){},ZMW8:function(e,t){},"rMf+":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("BO1k"),i=a.n(o),l=a("woOf"),s=a.n(l),n=a("d7EF"),r=a.n(n),c=a("//Fk"),d=a.n(c),p=a("mvHQ"),u=a.n(p),h=a("Dd8w"),m=a.n(h),f=a("Dod7"),v=a("ysqt"),b=a("Xnfr"),g=a("iDdT"),D=a("3MlD"),w=a("G9gL"),_=a("0zcq"),C=a("bzuE"),y=a("NYxO"),P={components:{btnInput:v.a,DialogChooseSingleUser:D.a,DialogChooseSingleDevice:w.a,DialogChooseCheckProject:g.a,dialogChoosePoint:_.a},data:function(){return{formData:{code:"",name:"",standard:"",type:239,deviceType:"",manHour:"",labourPrice:"",deptId:"",operator:"",deviceId:"",remark:"",whetherExamine:0,whetherCollect:0,processCheck:[],uploadAttachment:[]},uomList:[],pointList:[],pointData:[],btn:!1,loading:!1,isDisabled:!1,fileDocList:[],options:[],deviceoptions:[],selectDeptId:[],getUserList:[],depOptions:[],config:C.a,deviceLoading:!1,ChoosePointVisible:!1,chooseDevicesVisible:!1,chooseUserVisible:!1,ChooseCheckProjectVisible:!1,dialogTitle:"选择配置",CheckProjects:[],pointProjects:[],btnDisabled:!0,whetherCollectBtn:!0,rulesForm:{name:[{required:!0,message:"请填写工序名称",trigger:"blur"}]},uploadAttachment:[],tableData:[],uploadUrl:f.a.uploadUrl,ftpPrefix:f.a.ftpPrefix,fullscreenLoading:!1,auto_upload:!1}},mounted:function(){this.initData()},watch:{formData:{handler:function(e){e.deviceType?this.btn=!1:(this.btn=!0,this.formData.deviceId="",this.formData.deviceName="",this.formData.whetherCollect=0),e.deviceName||(this.formData.whetherCollect=0),0==this.formData.whetherCollect&&(this.pointData=[],this.whetherCollectBtn=!0),0==this.formData.whetherExamine&&(this.tableData=[])},deep:!0}},methods:m()({},Object(y.d)({removeTagNav:"tagNav/removeTagNav"}),{handleSelectionChange_point:function(e){this.pointProjects=e},getPoint:function(e){var t=this;e&&(console.log(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.CheckProjects&&(console.log(this.pointProjects),this.pointProjects.forEach(function(t){var a=e.pointData.findIndex(function(e){if(e.onlyId==t.onlyId)return!0});e.pointData.splice(a,1)}))},gotoIndex:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.push({path:"/basic/process",query:{t:Date.now()}}),this.formData={},this.tableData=[]},getName:function(e){var t;t=this.deviceoptions.find(function(t){return t.id===e}),this.formData.deviceId="",this.formData.deviceName="",this.formData.deviceTypeName=t.name?t.name:""},save:function(){var e=this;this.$refs.form.validate(function(t){if(t){if(null!=e.uploadAttachment&&e.uploadAttachment.length>0){var a=[];e.uploadAttachment.forEach(function(e){var t={fileName:e.fileName,filePath:e.filePath};a.push(t)}),e.formData.uploadAttachment=u()(a)}var o=[];console.log(e.tableData);var i=!0;if(e.tableData.forEach(function(e){if(e.min>e.max)i=!1;else{var t={proId:e.id,uom:e.uom,min:e.min,max:e.max,pointId:e.pointId};o.push(t)}}),!i)return void e.$message({message:"目标值下限不能大于目标值上限",type:"warning"});console.log(e.pointData);var l=[];if(e.pointData.forEach(function(e){l.push(e.pointId)}),e.formData.pointList=l,e.formData.processCheck=u()(o),e.isDisabled)return;e.isDisabled=!0,e.$api.processAPI.addAndChangeProcess(e.formData).then(function(t){e.isDisabled=!1,console.log(t),0===t.code?(e.$message({message:t.msg,type:"success"}),e.gotoIndex()):e.$message({message:t.msg,type:"error"})})}})},getCheckProjects:function(e){var t=this;console.log(e);var a=[];e.forEach(function(e){t.$set(e,"onlyId",Date.now()),a.push(e)}),this.tableData=this.tableData.concat(a)},removeCheckProject:function(){var e=this;this.CheckProjects&&(console.log(this.CheckProjects),this.CheckProjects.forEach(function(t){var a=e.tableData.findIndex(function(e){if(e.onlyId==t.onlyId&&e.id==t.id)return!0});e.tableData.splice(a,1)}))},handlePartChange:function(e){this.CheckProjects=e},getDevice:function(e){var t=this;console.log(e),e&&(this.form
|