1 line
28 KiB
JavaScript
1 line
28 KiB
JavaScript
webpackJsonp([95],{IiBl:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("BO1k"),o=a.n(i),s=a("woOf"),r=a.n(s),l=a("d7EF"),n=a.n(l),c=a("//Fk"),d=a.n(c),u=a("mvHQ"),p=a.n(u),m=a("Dd8w"),h=a.n(m),f=a("Dod7"),v=a("Xnfr"),b=a("ysqt"),D=a("iDdT"),g=a("3MlD"),y=a("OAOF"),_=a("0zcq"),w=a("bzuE"),C=a("NYxO"),P={components:{btnInput:b.a,DialogChooseSingleUser:g.a,DialogChooseSingleDevice:y.a,DialogChooseCheckProject:D.a,dialogChoosePoint:_.a},data:function(){return{formData:{code:"",name:"",standard:"",type:"",deviceType:"",manHour:"",labourPrice:"",deptId:"",operator:"",deviceId:"",remark:"",whetherExamine:0,whetherCollect:0,processCheck:[],uploadAttachment:[],id:""},deviceLoading:!1,isDisabled:!1,pointData:[],uomList:[],pointList:[],auditStatus:"",ProcessId:"",loading:!1,options:[],btn:!1,deviceoptions:[],selectDeptId:[],getUserList:[],depOptions:[],config:w.a,pointProjects:[],whetherCollectBtn:!0,ChoosePointVisible:!1,chooseDevicesVisible:!1,chooseUserVisible:!1,ChooseCheckProjectVisible:!1,dialogTitle:"选择配置",CheckProjects:[],btnDisabled:!0,rulesForm:{name:[{required:!0,message:"请填写工序名称",trigger:"blur"}]},uploadAttachment:[],fileDocList:[],tableData:[],uploadUrl:f.a.uploadUrl,ftpPrefix:f.a.ftpPrefix,fullscreenLoading:!1,auto_upload:!1}},mounted:function(){this.initialize(),this.getDetail()},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:h()({},Object(C.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)}))},whetherCollectChange:function(e){1===this.formData.whetherCollect?this.whetherCollectBtn=!1:this.whetherCollectBtn=!0},audit:function(){var e=this,t=Number(this.$route.query.id);this.$confirm("确认审核吗?","提示",{type:"warning"}).then(function(){e.$api.processAPI.audit(t).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getDetail()):e.$message({message:t.msg,type:"error"})})})},disAudit:function(){var e=this,t=Number(this.$route.query.id);this.$confirm("确认反审核吗?","提示",{type:"warning"}).then(function(){e.$api.processAPI.backToAudit(t).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getDetail()):e.$message({message:t.msg,type:"error"})})})},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},getDetail:function(){var e=this,t=Number(this.$route.query.id);this.ProcessId=t,this.$api.processAPI.detailProcess(t).then(function(t){if(t.processlist.forEach(function(t){e.$set(e.formData,"auditStatus",t.auditSign?t.auditSign:""),e.auditStatus=e.formData.auditStatus,e.formData.code=t.code,e.formData.name=t.name,e.formData.standard=t.standard?t.standard:"",e.formData.type=t.type?t.type:"",e.formData.deviceType=t.deviceType?t.deviceType:"",e.formData.manHour=t.manHour?t.manHour:"",e.formData.labourPrice=t.labourPrice?t.labourPrice:"",e.formData.deptId=t.deptId?t.deptId:"",e.formData.operatorName=t.operatorName?t.operatorName:"",e.formData.operator=t.operator?t.operator:"",e.formData.deviceId=t.deviceId?t.deviceId:"",e.formData.deviceName=t.deviceName?t.deviceName:"",e.formData.remark=t.remark?t.remark:"",e.formData.whetherExamine=t.whetherExamine?t.whetherExamine:0,e.formData.whetherCollect=t.whetherCollect?t.whetherCollect:0}),t.fileList&&t.fileList.length>0){e.fileDocList=[];for(var a=0;a<t.fileList.length;a++){var i={name:t.fileList[a].fileName,url:e.ftpPrefix+t.fileList[a].filePath},o={fileName:t.fileList[a].fileName,filePath:t.fileList[a].filePath};e.fileDocList.push(i),e.uploadAttachment.push(o)}}e.setDefaultDept();var s=[];t.processCheckDetail.forEach(function(e){var t={code:e.code,id:e.proId,name:e.proName,norm:e.norm,remark:e.remark,method:e.method,min:e.min,max:e.max,uom:e.uom,pointId:e.pointId};s.push(t)}),e.tableData=s,t.processAutoCollectDetail.forEach(function(t){e.$set(t,"onlyId",t.pointId+"_"+Math.random())}),e.pointData=t.processAutoCollectDetail?t.processAutoCollectDetail:[],1===e.formData.whetherExamine&&(e.btnDisabled=!1),1===e.formData.whetherCollect&&(e.whetherCollectBtn=!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=[]},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=p()(a)}var i=[],o=!0;if(e.tableData.forEach(function(e){if(e.min>e.max)o=!1;else{var t={proId:e.id,uom:e.uom,min:e.min,max:e.max,pointId:e.pointId};i.push(t)}}),!o)return void e.$message({message:"目标值下限不能大于目标值上限",type:"warning"});var s=[];if(e.pointData.forEach(function(e){s.push(e.pointId)}),e.formData.pointList=s,console.log(e.formData.pointList),e.formData.processCheck=p()(i),e.isDisabled)return;e.isDisabled=!0,e.$api.processAPI.addAndChangeProcess({id:e.ProcessId,code:e.formData.code,name:e.formData.name,standard:e.formData.standard?e.formData.standard:"",type:e.formData.type?e.formData.type:"",deviceType:e.formData.deviceType?e.formData.deviceType:"",manHour:e.formData.manHour?e.formData.manHour:"",labourPrice:e.formData.labourPrice?e.formData.labourPrice:"",deptId:e.formData.deptId?e.formData.deptId:"",operator:e.formData.operator?e.formData.operator:"",whetherExamine:e.formData.whetherExamine?e.formData.whetherExamine:0,whetherCollect:e.formData.whetherCollect?e.formData.whetherCollect:0,deviceId:e.formData.deviceId?e.formData.deviceId:"",remark:e.formData.remark?e.formData.remark:"",processCheck:e.formData.processCheck?e.formData.processCheck:[],pointList:e.formData.pointList?e.formData.pointList:[],uploadAttachment:e.formData.uploadAttachment}).then(function(t){e.isDisabled=!1,0===t.code?(e.$message({message:t.msg,type:"success"}),e.gotoIndex()):e.$message({message:t.msg,type:"error"})})}})},getCheckProjects:function(e){var t=[];e.forEach(function(e){t.push(e)}),this.tableData=this.tableData.concat(t)},removeCheckProject:function(){var e=this;this.CheckProjects&&this.CheckProjects.forEach(function(t){var a=e.tableData.findIndex(function(e){if(e.id==t.id)return!0});e.tableData.splice(a,1)})},handlePartChange:function(e){this.CheckProjects=e},getDevice:function(e){var t=this;e&&(this.formData.deviceId=e.id,this.formData.deviceName=e.name,this.$api.netWorkingAPI.measurePointList({deviceId:e.id}).then(function(e){0===e.code?(e.data.datas.forEach(function(e){1==e.isManualInput?e.isManualInput="是":e.isManualInput="否"}),t.pointList=e.data.datas?e.data.datas:[]):t.pointList=[]}))},getUser:function(e){console.log(e);e&&(this.formData.operatorName=e.name,this.formData.operator=e.id,this.selectDeptId=e.deptId,this.formData.deptId=e.deptId,this.setDefaultDept())},handleChange:function(e){this.formData.deptId=e.length>=1?e[e.length-1]:"",this.selectDeptId=e},initialize:function(){var e=this;this.$api.netWorkingAPI.measurePointList({deviceId:this.formData.id}).then(function(t){0===t.code?(t.data.datas.forEach(function(e){1==e.isManualInput?e.isManualInput="是":e.isManualInput="否"}),e.pointList=t.data.datas?t.data.datas:[]):e.pointList=[]}),this.$api.processAPI.processTypeList({type:"process_type"}).then(function(t){e.options=t.datas}),this.$api.processAPI.processTypeList({type:"uom_type"}).then(function(t){e.uomList=t.datas}),this.$api.processAPI.processTypeList({type:"device_type"}).then(function(t){e.deviceoptions=t.datas}),d.a.all([this.$api.commonAPI.getDeptsTree(),this.$api.roleAPI.list()]).then(function(t){var a=n()(t,2),i=a[0],o=a[1];0===i.code&&(e.depOptions=i.data.children,e.setDefaultDept(),e.setDeptList(e.depOptions)),0===o.code&&(e.roleList=o.datas)}).catch(function(e){console.log(e)}),this.formData.operator&&(this.loading=!0,this.$api.userAPI.detail(this.formData.operator).then(function(t){e.loading=!1,0===t.code&&(e.formData=r()({},e.formData,t.user),e.setDefaultDept())}))},setDefaultDept:function(){if(this.depOptions.length>0&&this.formData.deptId){var e=p()(this.formData.deptId),t=this.treeFindPath(this.depOptions,function(t){return t.id===e});this.selectDeptId=JSON.parse(p()(t))}},treeFindPath:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return[];var i=!0,s=!1,r=void 0;try{for(var l,n=o()(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 d=this.treeFindPath(c.children,t,a);if(d.length)return d}a.pop()}}catch(e){s=!0,r=e}finally{try{!i&&n.return&&n.return()}finally{if(s)throw r}}return[]},setDeptList:function(e){var t=!0,a=!1,i=void 0;try{for(var s,r=o()(e);!(t=(s=r.next()).done);t=!0){var l=s.value;l.hasChildren?this.setDeptList(l.children):l.children=void 0}}catch(e){a=!0,i=e}finally{try{!t&&r.return&&r.return()}finally{if(a)throw i}}},agreeChange:function(e){1===this.formData.whetherExamine?this.btnDisabled=!1:this.btnDisabled=!0},resetFields:function(){this.$refs.form.resetFields()},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))})},onPreview:function(e){e.url?window.open(e.url):e.raw&&window.open(this.ftpPrefix+e.raw.filePath)},uploadSuccess:function(e,t){"操作成功"===e.msg&&this.uploadAttachment.push({filePath:e.filePath,fileName:e.fileName})},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;v.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)},handleRemove:function(e,t){if(e.raw){for(var a=void 0,i=0;i<this.uploadAttachment.length;i++)this.uploadAttachment[i].filePath==e.raw.filePath&&(a=i);this.uploadAttachment.splice(a,1)}else{for(var o=void 0,s=0;s<this.uploadAttachment.length;s++)this.uploadAttachment[s].filePath==e.url.substr(1)&&(o=s);this.uploadAttachment.splice(o,1)}}})},I={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary"},on:{click:e.gotoIndex}},[e._v(e._s(e.config.cancelText))]),e._v(" "),179!=e.auditStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"basic:process:edit",expression:"'basic:process:edit'"}],attrs:{type:"primary",disabled:e.isDisabled},on:{click:e.save}},[e._v("保存")]):e._e(),e._v(" "),178==this.auditStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"basic:process:audit",expression:"'basic:process:audit'"}],attrs:{type:"primary",size:"small"},on:{click:e.audit}},[e._v("审核")]):e._e(),e._v(" "),179==this.auditStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"basic:process:reverseAudit",expression:"'basic:process:reverseAudit'"}],attrs:{type:"primary",size:"small"},on:{click:e.disAudit}},[e._v("反审核")]):e._e()],1),e._v(" "),a("div",{staticClass:"sys-form"},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"form",attrs:{"lable-width":"120px","label-width":"80px",model:e.formData,rules:e.rulesForm}},[a("div",{staticClass:"flex process-box"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"工序代码"}},[a("el-input",{attrs:{placeholder:"请输入工序代码",disabled:179==e.auditStatus},model:{value:e.formData.code,callback:function(t){e.$set(e.formData,"code",t)},expression:"formData.code"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{prop:"name",label:"工序名称"}},[a("el-input",{attrs:{placeholder:"请输入工序名称",disabled:179==e.auditStatus},model:{value:e.formData.name,callback:function(t){e.$set(e.formData,"name",t)},expression:"formData.name"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"基准良率"}},[a("el-input-number",{attrs:{min:0,max:100,label:"描述文字",size:"small",disabled:179==e.auditStatus},model:{value:e.formData.standard,callback:function(t){e.$set(e.formData,"standard",t)},expression:"formData.standard"}}),e._v(" (%)\n ")],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"工序类型"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择",disabled:179==e.auditStatus},model:{value:e.formData.type,callback:function(t){e.$set(e.formData,"type",t)},expression:"formData.type"}},e._l(e.options,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"设备类型"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择",disabled:179==e.auditStatus},on:{change:e.getName},model:{value:e.formData.deviceType,callback:function(t){e.$set(e.formData,"deviceType",t)},expression:"formData.deviceType"}},e._l(e.deviceoptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"生产设备",prop:"deviceId"}},[a("btn-input",{attrs:{valueText:e.formData.deviceName,valueId:e.formData.deviceId,chooseVisible:e.chooseDevicesVisible,showBtn:!e.btn&&179!=e.auditStatus},on:{"update:valueText":function(t){return e.$set(e.formData,"deviceName",t)},"update:value-text":function(t){return e.$set(e.formData,"deviceName",t)},"update:valueId":function(t){return e.$set(e.formData,"deviceId",t)},"update:value-id":function(t){return e.$set(e.formData,"deviceId",t)},"update:chooseVisible":function(t){e.chooseDevicesVisible=t},"update:choose-visible":function(t){e.chooseDevicesVisible=t}}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"单件工价"}},[a("el-input-number",{attrs:{min:0,label:"描述文字",size:"small",disabled:179==e.auditStatus},model:{value:e.formData.labourPrice,callback:function(t){e.$set(e.formData,"labourPrice",t)},expression:"formData.labourPrice"}}),e._v(" (元/件)\n ")],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"生产部门",prop:"deptId"}},[a("el-cascader",{attrs:{disabled:179==e.auditStatus,clearable:"",options:e.depOptions,props:{expandTrigger:"hover",label:"text",value:"id",checkStrictly:!0}},on:{change:e.handleChange},model:{value:e.selectDeptId,callback:function(t){e.selectDeptId=t},expression:"selectDeptId"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"操作工",prop:"operatorName"}},[a("btn-input",{attrs:{valueText:e.formData.operatorName,valueId:e.formData.operator,chooseVisible:e.chooseUserVisible,showBtn:!e.btn&&179!=e.auditStatus},on:{"update:valueText":function(t){return e.$set(e.formData,"operatorName",t)},"update:value-text":function(t){return e.$set(e.formData,"operatorName",t)},"update:valueId":function(t){return e.$set(e.formData,"operator",t)},"update:value-id":function(t){return e.$set(e.formData,"operator",t)},"update:chooseVisible":function(t){e.chooseUserVisible=t},"update:choose-visible":function(t){e.chooseUserVisible=t}}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"单件工时"}},[a("el-input-number",{attrs:{min:0,label:"描述文字",size:"small",disabled:179==e.auditStatus},model:{value:e.formData.manHour,callback:function(t){e.$set(e.formData,"manHour",t)},expression:"formData.manHour"}}),e._v(" (分钟)\n ")],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"备注"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autosize:{minRows:4},clearable:"",disabled:179==e.auditStatus},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1),e._v(" "),a("div",{staticClass:"flex process-box"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"是否检验"}},[a("el-radio-group",{on:{change:e.agreeChange},model:{value:e.formData.whetherExamine,callback:function(t){e.$set(e.formData,"whetherExamine",t)},expression:"formData.whetherExamine"}},[a("el-radio",{attrs:{label:1,disabled:179==e.auditStatus}},[e._v("是")]),e._v(" "),a("el-radio",{attrs:{label:0,disabled:179==e.auditStatus}},[e._v("否")])],1)],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"是否自动采集"}},[a("el-radio-group",{attrs:{disabled:!e.formData.deviceId},on:{change:e.whetherCollectChange},model:{value:e.formData.whetherCollect,callback:function(t){e.$set(e.formData,"whetherCollect",t)},expression:"formData.whetherCollect"}},[a("el-radio",{attrs:{label:1,disabled:179==e.auditStatus}},[e._v("是")]),e._v(" "),a("el-radio",{attrs:{label:0,disabled:179==e.auditStatus}},[e._v("否")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"SOP上传"}},[a("el-upload",{directives:[{name:"loading",rawName:"v-loading.lock",value:e.fullscreenLoading,expression:"fullscreenLoading",modifiers:{lock:!0}}],ref:"upload",attrs:{action:e.uploadUrl,"on-success":e.uploadSuccess,"on-remove":e.handleRemove,"file-list":e.fileDocList,"on-preview":e.onPreview,"auto-upload":e.auto_upload,"on-change":e.onChange,accept:".gif,.png,.jpg,.bmp"}},[a("el-button",{attrs:{size:"small",type:"primary",disabled:179==e.auditStatus}},[e._v("点击上传")]),e._v(" "),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("附件最大100M,支持格式:JPG、PNG、GIF、BMP")])],1)],1)],1),e._v(" "),a("el-divider",{attrs:{"content-position":"left"}},[e._v("选择配置")]),e._v(" "),a("el-form-item",{staticClass:"childlist",attrs:{prop:"childList"}},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary",size:"small",disabled:e.btnDisabled||179==e.auditStatus},on:{click:function(t){e.ChooseCheckProjectVisible=!0}}},[e._v("选择配置")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"small",disabled:179==e.auditStatus},on:{click:function(t){return e.removeCheckProject()}}},[e._v("删除")])],1),e._v(" "),a("el-table",{attrs:{border:"","header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"},data:e.tableData},on:{"selection-change":e.handlePartChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"行号",type:"index",width:"50"}}),e._v(" "),a("el-table-column",{attrs:{prop:"code",align:"center",width:"120",label:"检验项目代码","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticStyle:{width:"100%"},attrs:{clearable:"",disabled:179==e.auditStatus},model:{value:t.row.code,callback:function(a){e.$set(t.row,"code",a)},expression:"scope.row.code"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"name",align:"center",label:"检验项目名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"norm",align:"center",label:"检验标准","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"method",align:"center",label:"检验方法","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"uom",align:"center",width:"120",label:"单位"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{attrs:{clearable:"",placeholder:"单位"},model:{value:t.row.uom,callback:function(a){e.$set(t.row,"uom",a)},expression:"scope.row.uom"}},e._l(e.uomList,function(t){return a("el-option",{key:t.id,attrs:{disabled:179==e.auditStatus,label:t.name,value:t.id}})}),1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"min",align:"center",width:"180",label:"目标值下限"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{disabled:179==e.auditStatus,size:"small","controls-position":"right"},model:{value:t.row.min,callback:function(a){e.$set(t.row,"min",a)},expression:"scope.row.min"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"max",align:"center",width:"180",label:"目标值上限"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{disabled:179==e.auditStatus,size:"small","controls-position":"right"},model:{value:t.row.max,callback:function(a){e.$set(t.row,"max",a)},expression:"scope.row.max"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"pointId",align:"center",width:"120",label:"测点配置"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{attrs:{clearable:"",placeholder:"测点"},model:{value:t.row.pointId,callback:function(a){e.$set(t.row,"pointId",a)},expression:"scope.row.pointId"}},e._l(e.pointList,function(t){return a("el-option",{key:t.id,attrs:{disabled:179==e.auditStatus,label:t.pointName,value:t.id}})}),1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"remark",align:"center",label:"备注","show-overflow-tooltip":""}})],1)],1),e._v(" "),a("el-divider",{attrs:{"content-position":"left"}},[e._v("自动采集配置")]),e._v(" "),a("el-form-item",{staticClass:"childlist",attrs:{prop:"childList"}},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary",size:"small",disabled:e.whetherCollectBtn||179==e.auditStatus},on:{click:function(t){e.ChoosePointVisible=!0}}},[e._v("选择测点")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"small",disabled:179==e.auditStatus},on:{click:function(t){return e.removePointProjects()}}},[e._v("删除")])],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.deviceLoading,expression:"deviceLoading"}],ref:"pointtb",attrs:{id:"out-table_point",border:"",data:e.pointData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"selection-change":e.handleSelectionChange_point}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"gatewayNo",align:"center",label:"网关序号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"serialNo",align:"center",label:"测点ID"}}),e._v(" "),a("el-table-column",{attrs:{prop:"pointName",align:"center",label:"名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"rwTypeName",align:"center",label:"读写类型"}}),e._v(" "),a("el-table-column",{attrs:{prop:"childTypeName",align:"center",label:"子类型"}}),e._v(" "),a("el-table-column",{attrs:{prop:"uomName",align:"center",label:"单位"}}),e._v(" "),a("el-table-column",{attrs:{prop:"isManualInput",align:"center",label:"手工输入"}}),e._v(" "),a("el-table-column",{attrs:{prop:"useTypeName",align:"center",label:"使用类别"}}),e._v(" "),a("el-table-column",{attrs:{prop:"impowerTypeName",align:"center",label:"授权方式"}}),e._v(" "),a("el-table-column",{attrs:{prop:"formatTypeName",align:"center",label:"格式"}})],1)],1)],1)],1),e._v(" "),a("DialogChooseSingleDevice",{attrs:{visible:e.chooseDevicesVisible,type:e.formData.deviceType,typeName:e.formData.deviceTypeName},on:{"update:visible":function(t){e.chooseDevicesVisible=t},change:e.getDevice}}),e._v(" "),a("DialogChooseSingleUser",{attrs:{visible:e.chooseUserVisible},on:{"update:visible":function(t){e.chooseUserVisible=t},change:e.getUser}}),e._v(" "),a("DialogChooseCheckProject",{attrs:{visible:e.ChooseCheckProjectVisible},on:{"update:visible":function(t){e.ChooseCheckProjectVisible=t},change:e.getCheckProjects}}),e._v(" "),a("dialogChoosePoint",{attrs:{visible:e.ChoosePointVisible,deviceId:e.formData.deviceId},on:{"update:visible":function(t){e.ChoosePointVisible=t},change:e.getPoint}})],1)},staticRenderFns:[]};var x=a("VU/8")(P,I,!1,function(e){a("htw8"),a("mjbc")},"data-v-3b28bff4",null);t.default=x.exports},OAOF:function(e,t,a){"use strict";var i={name:"dialogChooseSingleDevice",props:{id:{type:String,default:""},type:"",typeName:"",visible:{type:Boolean,default:!1}},watch:{visible:function(e,t){e!==t&&(e&&this.initData(),this.innerVisible=e)},innerVisible:function(e,t){e!==t&&this.$emit("update:visible",e)}},data:function(){return{subsetList:[],subsetAll:[],subsetTotal:0,searchData_Subset:{pageno:1,pagesize:5},callBackData:[],innerVisible:this.visible,loading:!1,dialogLoading:!1,deviceType:[],deviceDept:[],addVisible:!1}},computed:{},methods:{initData:function(){var e=this;this.$api.dictAPI.getDictsByType("device_type").then(function(t){0===t.code&&(e.deviceType=t.data)}),this.$api.commonAPI.getDepts().then(function(t){0===t.code&&(e.deviceDept=t.datas)}),this.searchSubset()},searchSubset:function(e){var t=this;this.type&&(this.searchData_Subset.type=this.type,this.searchData_Subset.typeName=this.typeName),this.dialogLoading=!0,this.$api.deviceAPI.advancedQuery(this.searchData_Subset).then(function(e){console.log(e),t.dialogLoading=!1,0===e.code&&(t.subsetList=e.data?e.data.datas:[],t.subsetTotal=e.data?e.data.totalRows:0)})},ckSubsetAll:function(e){this.subsetAll=e},subsetSizeChange:function(e){this.searchData_Subset.pagesize=e,this.searchSubset()},subsetCurrentChange:function(e){this.searchData_Subset.pageno=e,this.searchSubset()},submit:function(e){this.$emit("change",e),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:{readonly:"",size:"small"},model:{value:e.searchData_Subset.typeName,callback:function(t){e.$set(e.searchData_Subset,"typeName",t)},expression:"searchData_Subset.typeName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"设备名称"}},[a("el-input",{attrs:{placeholder:"名称模糊查询",clearable:""},model:{value:e.searchData_Subset.nameAndType,callback:function(t){e.$set(e.searchData_Subset,"nameAndType",t)},expression:"searchData_Subset.nameAndType"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.searchSubset(1)}}},[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"}],attrs:{data:e.subsetList,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}}},[a("el-table-column",{attrs:{prop:"serialno",label:"设备编号",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name","show-overflow-tooltip":"",label:"设备名称",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"model",label:"规格型号",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.submit(t.row)}}},[e._v("选择")])]}}])})],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)])},staticRenderFns:[]},s=a("VU/8")(i,o,!1,null,null,null);t.a=s.exports},htw8:function(e,t){},mjbc:function(e,t){}}); |