(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9eb5e1a0","chunk-20a44e36","chunk-2d0b9fa4"],{"10da":function(e,t,r){"use strict";var i=r("918f"),n=r.n(i);n.a},"34f3":function(e,t,r){"use strict";r.r(t);var i=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("a-modal",{attrs:{title:e.title,width:800,ok:!1,visible:e.visible,confirmLoading:e.confirmLoading,okButtonProps:{props:{disabled:e.disableSubmit}},cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[r("a-spin",{attrs:{spinning:e.confirmLoading}},[r("a-form-model",{ref:"form",attrs:{model:e.model,rules:e.validatorRules}},[r("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"车间编码",prop:"productionCode",hidden:!1,hasFeedback:""}},[r("a-input",{attrs:{id:"productionCode",placeholder:"请输入产线/车间编号"},model:{value:e.model.productionCode,callback:function(t){e.$set(e.model,"productionCode",t)},expression:"model.productionCode"}})],1),r("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"车间名称",prop:"productionName",hidden:!1,hasFeedback:""}},[r("a-input",{attrs:{id:"departName",placeholder:"请输入产线/车间名称"},model:{value:e.model.productionName,callback:function(t){e.$set(e.model,"productionName",t)},expression:"model.productionName"}})],1),r("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,hidden:e.seen,label:"上级车间",hasFeedback:""}},[r("a-tree-select",{staticStyle:{width:"100%"},attrs:{dropdownStyle:{maxHeight:"200px",overflow:"auto"},treeData:e.departTree,placeholder:"请选择上级车间",disabled:e.condition},model:{value:e.model.parentId,callback:function(t){e.$set(e.model,"parentId",t)},expression:"model.parentId"}})],1),r("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"排序"}},[r("a-input-number",{model:{value:e.model.productionOrder,callback:function(t){e.$set(e.model,"productionOrder",t)},expression:"model.productionOrder"}})],1),r("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"备注"}},[r("a-textarea",{attrs:{placeholder:"请输入备注"},model:{value:e.model.memo,callback:function(t){e.$set(e.model,"memo",t)},expression:"model.memo"}})],1)],1)],1)],1)},n=[],o=r("0fea"),a=r("4ec3"),s=(r("88bc"),{name:"ProductionModal",components:{},data:function(){return{departTree:[],orgTypeData:[],phoneWarning:"",departName:"",title:"操作",seen:!1,visible:!1,condition:!0,disableSubmit:!1,model:{},menuhidden:!1,menuusing:!0,labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,validatorRules:{productionName:[{required:!0,message:"请输入产线/车间名称!"}]},url:{add:"/mdc/mdcProduction/add"},dictDisabled:!0}},created:function(){},methods:{loadTreeData:function(){var e=this;Object(a["D"])().then((function(t){if(t.success){e.departTree=[];for(var r=0;r<t.result.length;r++){var i=t.result[r];e.departTree.push(i)}}}))},add:function(e){e?(this.seen=!1,this.dictDisabled=!1):(this.seen=!0,this.dictDisabled=!0),this.edit(e)},edit:function(e){this.visible=!0,this.model=Object.assign({},this.defaultModel,e),this.loadTreeData(),this.model.parentId=null!=e?e.toString():null},close:function(){this.$emit("close"),this.disableSubmit=!1,this.visible=!1,this.$refs.form.resetFields()},handleOk:function(){var e=this,t=this;this.$refs.form.validate((function(r){if(!r)return!1;t.confirmLoading=!0,Object(o["h"])(e.url.add,e.model,"post").then((function(e){e.success?(t.$notification.success({message:"消息",description:e.message}),t.loadTreeData(),t.$emit("ok")):t.$notification.warning({message:"消息",description:e.message})})).finally((function(){t.confirmLoading=!1,t.close()}))}))},handleCancel:function(){this.close()}}}),l=s,c=r("2877"),d=Object(c["a"])(l,i,n,!1,null,"1a357936",null);t["default"]=d.exports},4127:function(e,t,r){"use strict";var i=r("d233"),n=r("b313"),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,l=Array.prototype.push,c=function(e,t){l.apply(e,s(t)?t:[t])},d=Date.prototype.toISOString,u={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,formatter:n.formatters[n["default"]],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,r,n,o,a,l,d,p,f,h,m,y,g){var b=t;if("function"===typeof d?b=d(r,b):b instanceof Date?b=h(b):"comma"===n&&s(b)&&(b=b.join(",")),null===b){if(o)return l&&!y?l(r,u.encoder,g):r;b=""}if("string"===typeof b||"number"===typeof b||"boolean"===typeof b||i.isBuffer(b)){if(l){var v=y?r:l(r,u.encoder,g);return[m(v)+"="+m(l(b,u.encoder,g))]}return[m(r)+"="+m(String(b))]}var k,w=[];if("undefined"===typeof b)return w;if(s(d))k=d;else{var C=Object.keys(b);k=p?C.sort(p):C}for(var S=0;S<k.length;++S){var x=k[S];a&&null===b[x]||(s(b)?c(w,e(b[x],"function"===typeof n?n(r,x):r,n,o,a,l,d,p,f,h,m,y,g)):c(w,e(b[x],r+(f?"."+x:"["+x+"]"),n,o,a,l,d,p,f,h,m,y,g)))}return w},f=function(e){if(!e)return u;if(null!==e.encoder&&void 0!==e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||u.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=n["default"];if("undefined"!==typeof e.format){if(!o.call(n.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var i=n.formatters[r],a=u.filter;return("function"===typeof e.filter||s(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:u.addQueryPrefix,allowDots:"undefined"===typeof e.allowDots?u.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:u.charsetSentinel,delimiter:"undefined"===typeof e.delimiter?u.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:u.encode,encoder:"function"===typeof e.encoder?e.encoder:u.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:u.encodeValuesOnly,filter:a,formatter:i,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:u.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:u.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:u.strictNullHandling}};e.exports=function(e,t){var r,i,n=e,o=f(t);"function"===typeof o.filter?(i=o.filter,n=i("",n)):s(o.filter)&&(i=o.filter,r=i);var l,d=[];if("object"!==typeof n||null===n)return"";l=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var u=a[l];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var h=0;h<r.length;++h){var m=r[h];o.skipNulls&&null===n[m]||c(d,p(n[m],m,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.formatter,o.encodeValuesOnly,o.charset))}var y=d.join(o.delimiter),g=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),y.length>0?g+y:""}},4328:function(e,t,r){"use strict";var i=r("4127"),n=r("9e6a"),o=r("b313");e.exports={formats:o,parse:n,stringify:i}},"918f":function(e,t,r){},"9a95":function(e,t,r){"use strict";r.r(t);var i=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("a-card",{attrs:{bordered:!1}},[this.productionId?[r("div",{staticClass:"table-page-search-wrapper"},[r("a-form",{attrs:{layout:"inline"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchQuery(t)}}},[r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{md:6,sm:12}},[r("a-form-item",{attrs:{label:"设备编号"}},[r("a-input",{attrs:{placeholder:"请输入设备编号"},model:{value:e.queryParam.equipmentId,callback:function(t){e.$set(e.queryParam,"equipmentId",t)},expression:"queryParam.equipmentId"}})],1)],1),r("a-col",{attrs:{md:6,sm:8}},[r("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.searchQuery}},[e._v("查询")]),r("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",icon:"reload"},on:{click:e.searchReset}},[e._v("重置")])],1)],1)],1)],1),r("div",{staticClass:"table-operator",staticStyle:{"border-top":"5px"}},[e.selectedRowKeys.length>0?r("a-dropdown",[r("a-menu",{attrs:{slot:"overlay"},on:{click:e.handleMenuClick},slot:"overlay"},[r("a-menu-item",{key:"1"},[r("a-icon",{attrs:{type:"delete"},on:{click:e.batchDel}}),e._v("\n 批量移除\n ")],1)],1),r("a-button",{staticStyle:{"margin-left":"8px"}},[e._v("\n 批量操作\n "),r("a-icon",{attrs:{type:"down"}})],1)],1):e._e()],1),r("a-table",{ref:"table",attrs:{bordered:"",size:"middle",rowKey:"id",scroll:{x:500},columns:e.columns,dataSource:e.dataSource,pagination:e.ipagination,loading:e.loading,rowSelection:{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange}},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"action",fn:function(t,i){return r("span",{},[r("a-popconfirm",{attrs:{title:"确定移除吗?"},on:{confirm:function(){return e.handleDelete(i.id)}}},[r("a",[e._v("移除")])])],1)}}],null,!1,3254967262)})]:r("a-card",{staticStyle:{height:"200px"},attrs:{bordered:!1}},[r("a-empty",[r("span",{attrs:{slot:"description"},slot:"description"},[e._v(" 请先选择一个部门! ")])])],1)],2)},n=[],o=r("ca00"),a=(r("4ec3"),r("b65a")),s=r("0fea"),l=r("4328"),c=r.n(l),d={name:"ProductionEquipment",mixins:[a["a"]],data:function(){return{queryParam:{},columns:[{title:"#",dataIndex:"",key:"rowIndex",width:60,align:"center",customRender:function(e,t,r){return parseInt(r)+1}},{title:"设备编号",align:"center",dataIndex:"equipmentId",width:120},{title:"设备名称",align:"center",width:150,dataIndex:"equipmentName"},{title:"设备类型",align:"center",width:120,dataIndex:"equipmentType"},{title:"驱动类型",align:"center",width:80,dataIndex:"driveType"},{title:"操作",dataIndex:"action",scopedSlots:{customRender:"action"},align:"center",width:120}],disableMixinCreated:!0,productionId:"",title:"部门权限配置",visible:!1,loading:!1,url:{list:"/mdc/mdcEquipment/equipmentListByProduction",removeEquipmentForDepart:"/mdc/mdcEquipment/removeEquipmentForProduction",serachEquipment:"/mdc/mdcEquipment/equipmentListByProduction",removeEquipmentsForProduction:"/mdc/mdcEquipment/removeEquipmentsForProduction"}}},methods:{show:function(e){this.productionId=e,this.loadData()},close:function(){this.reset(),this.$emit("close"),this.visible=!1},searchReset:function(){this.queryParam={},this.loadData()},searchQuery:function(){var e=this;this.queryParam.equipmentId;this.loading=!0;var t=this.getQueryParams();t.pageNo=this.ipagination.current,t.pageSize=this.ipagination.pageSize,Object(s["c"])(this.url.serachEquipment,{equipmentId:this.queryParam.equipmentId,productionId:this.productionId,pageNo:t.pageNo,pageSize:t.pageSize}).then((function(t){t.success?(e.dataSource=t.result.records||t.result,t.result.total?e.ipagination.total=t.result.total:e.ipagination.total=0):e.$notification.warning({message:"消息",description:t.message})})).finally((function(){e.loading=!1}))},handleTableChange:function(e,t,r){Object.keys(r).length>0&&(this.isorter.column=r.field,this.isorter.order="ascend"==r.order?"asc":"desc"),this.ipagination=e,this.loadData()},loadData:function(){var e=this,t=this.getQueryParams();t.pageNo=this.ipagination.current,t.pageSize=this.ipagination.pageSize,this.loading=!0,Object(s["c"])(this.url.list,t).then((function(t){t.success?(e.dataSource=t.result.records||t.result,t.result.total?e.ipagination.total=t.result.total:e.ipagination.total=0):e.$notification.warning({message:"消息",description:t.message})})).finally((function(){e.loading=!1}))},getQueryParams:function(){var e={};this.superQueryParams&&(e["superQueryParams"]=encodeURI(this.superQueryParams),e["superQueryMatchType"]=this.superQueryMatchType);var t=Object.assign(e,this.queryParam,this.isorter,this.filters);return t.field=this.getQueryField(),t.pageNo=this.ipagination.current,t.pageSize=this.ipagination.pageSize,t.productionId=this.productionId,!(this.getCustomQueryParams&&(t=this.getCustomQueryParams(t),!t))&&Object(o["d"])(t)},handleDelete:function(e){var t=this;Object(s["i"])(this.url.removeEquipmentForDepart,c.a.stringify({productionId:this.productionId,equipmentId:e})).then((function(e){e.success?(t.$notification.success({message:"消息",description:e.message}),t.loadData(t.productionId)):t.$notification.warning({message:"消息",description:e.message})})).finally((function(){}))},handleMenuClick:function(e){1==e.key&&this.batchDel()},batchDel:function(){if(this.url.removeEquipmentsForProduction)if(this.selectedRowKeys.length<=0)this.$notification.warning({message:"消息",description:"请选择一条记录"});else{for(var e="",t=0;t<this.selectedRowKeys.length;t++)e+=this.selectedRowKeys[t]+",";var r=this;this.$confirm({title:"确认删除",content:"是否删除选中数据?",onOk:function(){var t=this;r.loading=!0,Object(s["i"])(r.url.removeEquipmentsForProduction,c.a.stringify({productionId:r.productionId,equipmentIds:e})).then((function(e){e.success?(r.reCalculatePage(r.selectedRowKeys.length),t.$notification.success({message:"消息",description:e.message}),r.loadData(r.productionId),r.onClearSelected()):t.$notification.warning({message:"消息",description:e.message})})).finally((function(){r.loading=!1}))}})}else this.$message.error("请设置url.removeEquipmentsForProduction属性!")}}},u=d,p=r("2877"),f=Object(p["a"])(u,i,n,!1,null,"d10afa96",null);t["default"]=f.exports},"9e6a":function(e,t,r){"use strict";var i=r("d233"),n=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:i.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s="utf8=%26%2310003%3B",l="utf8=%E2%9C%93",c=function(e,t){var r,c={},d=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,u=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,u),f=-1,h=t.charset;if(t.charsetSentinel)for(r=0;r<p.length;++r)0===p[r].indexOf("utf8=")&&(p[r]===l?h="utf-8":p[r]===s&&(h="iso-8859-1"),f=r,r=p.length);for(r=0;r<p.length;++r)if(r!==f){var m,y,g=p[r],b=g.indexOf("]="),v=-1===b?g.indexOf("="):b+1;-1===v?(m=t.decoder(g,o.decoder,h),y=t.strictNullHandling?null:""):(m=t.decoder(g.slice(0,v),o.decoder,h),y=t.decoder(g.slice(v+1),o.decoder,h)),y&&t.interpretNumericEntities&&"iso-8859-1"===h&&(y=a(y)),y&&t.comma&&y.indexOf(",")>-1&&(y=y.split(",")),n.call(c,m)?c[m]=i.combine(c[m],y):c[m]=y}return c},d=function(e,t,r){for(var i=t,n=e.length-1;n>=0;--n){var o,a=e[n];if("[]"===a&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(s,10);r.parseArrays||""!==s?!isNaN(l)&&a!==s&&String(l)===s&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(o=[],o[l]=i):o[s]=i:o={0:i}}i=o}return i},u=function(e,t,r){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,s=o.exec(i),l=s?i.slice(0,s.index):i,c=[];if(l){if(!r.plainObjects&&n.call(Object.prototype,l)&&!r.allowPrototypes)return;c.push(l)}var u=0;while(null!==(s=a.exec(i))&&u<r.depth){if(u+=1,!r.plainObjects&&n.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(s[1])}return s&&c.push("["+i.slice(s.index)+"]"),d(c,t,r)}},p=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?o.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:o.comma,decoder:"function"===typeof e.decoder?e.decoder:o.decoder,delimiter:"string"===typeof e.delimiter||i.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"===typeof e.depth?e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}};e.exports=function(e,t){var r=p(t);if(""===e||null===e||"undefined"===typeof e)return r.plainObjects?Object.create(null):{};for(var n="string"===typeof e?c(e,r):e,o=r.plainObjects?Object.create(null):{},a=Object.keys(n),s=0;s<a.length;++s){var l=a[s],d=u(l,n[l],r);o=i.merge(o,d,r)}return i.compact(o)}},b313:function(e,t,r){"use strict";var i=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return i.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},d233:function(e,t,r){"use strict";var i=Object.prototype.hasOwnProperty,n=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e){while(e.length>1){var t=e.pop(),r=t.obj[t.prop];if(n(r)){for(var i=[],o=0;o<r.length;++o)"undefined"!==typeof r[o]&&i.push(r[o]);t.obj[t.prop]=i}}},s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)"undefined"!==typeof e[i]&&(r[i]=e[i]);return r},l=function e(t,r,o){if(!r)return t;if("object"!==typeof r){if(n(t))t.push(r);else{if(!t||"object"!==typeof t)return[t,r];(o&&(o.plainObjects||o.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!==typeof t)return[t].concat(r);var a=t;return n(t)&&!n(r)&&(a=s(t,o)),n(t)&&n(r)?(r.forEach((function(r,n){if(i.call(t,n)){var a=t[n];a&&"object"===typeof a&&r&&"object"===typeof r?t[n]=e(a,r,o):t.push(r)}else t[n]=r})),t):Object.keys(r).reduce((function(t,n){var a=r[n];return i.call(t,n)?t[n]=e(t[n],a,o):t[n]=a,t}),a)},c=function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},d=function(e,t,r){var i=e.replace(/\+/g," ");if("iso-8859-1"===r)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(n){return i}},u=function(e,t,r){if(0===e.length)return e;var i="string"===typeof e?e:String(e);if("iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var n="",a=0;a<i.length;++a){var s=i.charCodeAt(a);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?n+=i.charAt(a):s<128?n+=o[s]:s<2048?n+=o[192|s>>6]+o[128|63&s]:s<55296||s>=57344?n+=o[224|s>>12]+o[128|s>>6&63]+o[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&i.charCodeAt(a)),n+=o[240|s>>18]+o[128|s>>12&63]+o[128|s>>6&63]+o[128|63&s])}return n},p=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],i=0;i<t.length;++i)for(var n=t[i],o=n.obj[n.prop],s=Object.keys(o),l=0;l<s.length;++l){var c=s[l],d=o[c];"object"===typeof d&&null!==d&&-1===r.indexOf(d)&&(t.push({obj:o,prop:c}),r.push(d))}return a(t),e},f=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},h=function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},m=function(e,t){return[].concat(e,t)};e.exports={arrayToObject:s,assign:c,combine:m,compact:p,decode:d,encode:u,isBuffer:h,isRegExp:f,merge:l}},e99f:function(e,t,r){"use strict";r.r(t);var i=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("a-row",{attrs:{gutter:10}},[r("a-col",{attrs:{md:12,sm:24}},[r("a-card",{attrs:{bordered:!1}},[r("a-row",{staticStyle:{"margin-left":"14px"}},[r("a-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleAdd(1)}}},[e._v("添加车间")]),r("a-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleAdd(2)}}},[e._v("添加下级")]),r("a-button",{attrs:{type:"primary",icon:"download"},on:{click:function(t){return e.handleExportXls("车间信息")}}},[e._v("导出")]),r("a-upload",{attrs:{name:"file",showUploadList:!1,multiple:!1,headers:e.tokenHeader,action:e.importExcelUrl},on:{change:e.handleImportExcel}},[r("a-button",{attrs:{type:"primary",icon:"import"}},[e._v("导入")])],1),e.selectedKeys.length>0?r("a-button",{on:{click:e.handleDelete}},[e._v("删除")]):e._e(),e.checkedKeys.length>0?r("a-button",{attrs:{title:"删除多条数据"},on:{click:e.batchDel}},[e._v("批量删除")]):e._e()],1),e._v("\n `\n "),r("div",{staticStyle:{background:"#fff","padding-left":"16px",height:"100%","margin-top":"5px"}},[r("a-alert",{attrs:{type:"info",showIcon:!0}},[r("div",{attrs:{slot:"message"},slot:"message"},[e._v("\n 当前选择:"),this.currSelected.title?r("span",[e._v(e._s(e.getCurrSelectedTitle()))]):e._e(),this.currSelected.title?r("a",{staticStyle:{"margin-left":"10px"},on:{click:e.onClearSelected}},[e._v("取消选择")]):e._e()])]),r("a-input-search",{staticStyle:{width:"100%","margin-top":"10px"},attrs:{placeholder:"请输入车间名称"},on:{search:e.onSearch}}),r("a-col",{attrs:{md:10,sm:24}},[r("a-tree",{attrs:{checkable:"",multiple:"",selectedKeys:e.selectedKeys,checkedKeys:e.checkedKeys,treeData:e.departTree,checkStrictly:e.checkStrictly,expandedKeys:e.iExpandedKeys,autoExpandParent:e.autoExpandParent},on:{select:e.onSelect,check:e.onCheck,rightClick:e.rightHandle,expand:e.onExpand}})],1)],1)],1),r("div",{staticClass:"drawer-bottom-button"},[r("a-dropdown",{attrs:{trigger:["click"],placement:"topCenter"}},[r("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[r("a-menu-item",{key:"1",on:{click:function(t){return e.switchCheckStrictly(1)}}},[e._v("父子关联")]),r("a-menu-item",{key:"2",on:{click:function(t){return e.switchCheckStrictly(2)}}},[e._v("取消关联")]),r("a-menu-item",{key:"3",on:{click:e.checkALL}},[e._v("全部勾选")]),r("a-menu-item",{key:"4",on:{click:e.cancelCheckALL}},[e._v("取消全选")]),r("a-menu-item",{key:"5",on:{click:e.expandAll}},[e._v("展开所有")]),r("a-menu-item",{key:"6",on:{click:e.closeAll}},[e._v("合并所有")])],1),r("a-button",[e._v("\n 树操作\n "),r("a-icon",{attrs:{type:"up"}})],1)],1)],1)],1),r("a-col",{attrs:{md:12,sm:24}},[r("a-tabs",{attrs:{defaultActiveKey:"1"}},[r("a-tab-pane",{key:"1",attrs:{tab:"基本信息"}},[e.selectedKeys.length>0?r("a-card",{attrs:{bordered:!1}},[r("a-form-model",{ref:"form",attrs:{model:e.model,rules:e.validatorRules}},[r("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"productionCode",label:"车间编号"}},[r("a-input",{attrs:{placeholder:"请输入产线/车间编号"},model:{value:e.model.productionCode,callback:function(t){e.$set(e.model,"productionCode",t)},expression:"model.productionCode"}})],1),r("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"productionName",label:"车间名称"}},[r("a-input",{attrs:{placeholder:"请输入产线/车间名称"},model:{value:e.model.productionName,callback:function(t){e.$set(e.model,"productionName",t)},expression:"model.productionName"}})],1),r("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"上级车间"}},[r("a-tree-select",{staticStyle:{width:"100%"},attrs:{dropdownStyle:{maxHeight:"200px",overflow:"auto"},treeData:e.treeData,disabled:e.disable,placeholder:"无"},model:{value:e.model.parentId,callback:function(t){e.$set(e.model,"parentId",t)},expression:"model.parentId"}})],1),r("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"排序"}},[r("a-input-number",{model:{value:e.model.productionOrder,callback:function(t){e.$set(e.model,"productionOrder",t)},expression:"model.productionOrder"}})],1),r("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"备注"}},[r("a-textarea",{attrs:{placeholder:"请输入备注"},model:{value:e.model.memo,callback:function(t){e.$set(e.model,"memo",t)},expression:"model.memo"}})],1)],1),r("div",{staticClass:"anty-form-btn"},[r("a-button",{attrs:{type:"default",htmlType:"button",icon:"sync"},on:{click:e.emptyCurrForm}},[e._v("重置")]),r("a-button",{attrs:{type:"primary",htmlType:"button",icon:"form"},on:{click:e.submitCurrForm}},[e._v("保存")])],1)],1):r("a-card",[r("a-empty",[r("span",{attrs:{slot:"description"},slot:"description"},[e._v(" 请先选择一个车间! ")])])],1)],1),r("a-tab-pane",{key:"2",attrs:{tab:"设备列表",forceRender:""}},[r("production-equipment",{ref:"departAuth"})],1)],1)],1),r("production-modal",{ref:"departModal",on:{ok:e.loadTree}})],1)},n=[],o=r("9a95"),a=r("4ec3"),s=r("0fea"),l=r("b65a"),c=r("34f3"),d={name:"ProductionManager",mixins:[l["a"]],components:{ProductionEquipment:o["default"],ProductionModal:c["default"]},data:function(){return{iExpandedKeys:[],loading:!1,autoExpandParent:!0,currFlowId:"",currFlowName:"",disable:!0,treeData:[],visible:!1,departTree:[],rightClickSelectedKey:"",rightClickSelectedOrgCode:"",hiding:!0,model:{},dropTrigger:"",depart:{},disableSubmit:!1,checkedKeys:[],selectedKeys:[],autoIncr:1,currSelected:{},allTreeKeys:[],checkStrictly:!0,labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},graphDatasource:{nodes:[],edges:[]},validatorRules:{productionName:[{required:!0,message:"请输入产线/车间名称!"}]},url:{delete:"/mdc/mdcProduction/delete",edit:"/mdc/mdcProduction/edit",deleteBatch:"/mdc/mdcProduction/deleteBatch",exportXlsUrl:"/mdc/mdcProduction/exportXls",importExcelUrl:"/mdc/mdcProduction/importExcel"},orgCategoryDisabled:!1,isIncludesNotLeaf:!1}},computed:{importExcelUrl:function(){return"".concat(window._CONFIG["domianURL"],"/").concat(this.url.importExcelUrl)}},methods:{loadData:function(){this.refresh()},loadTree:function(){var e=this,t=this;t.treeData=[],t.departTree=[],Object(a["M"])().then((function(r){if(r.success){e.allTreeKeys=[];for(var i=0;i<r.result.length;i++){var n=r.result[i];t.treeData.push(n),t.departTree.push(n),t.setThisExpandedKeys(n),t.getAllKeys(n)}e.loading=!1}}))},setThisExpandedKeys:function(e){if(e.children&&e.children.length>0){this.iExpandedKeys.push(e.key);for(var t=0;t<e.children.length;t++)this.setThisExpandedKeys(e.children[t])}},refresh:function(){this.loading=!0,this.loadTree()},rightHandle:function(e){e.event;var t=e.node;this.dropTrigger="contextmenu";var r=t.dataRef;this.rightClickSelectedKey=r.id,this.rightClickSelected=r,this.rightClickSelectedOrgCode=r.orgCode},onExpand:function(e){this.iExpandedKeys=e,this.autoExpandParent=!1},backFlowList:function(){this.$router.back(-1)},dropStatus:function(e){0==e&&(this.dropTrigger="")},closeDrop:function(){this.dropTrigger=""},addRootNode:function(){this.$refs.nodeModal.add(this.currFlowId,"")},batchDel:function(){if(this.isIncludesNotLeaf=!1,this.includesNotLeaf(this.departTree),this.isIncludesNotLeaf)this.$notification.warning({message:"消息",description:"选中项包含已挂载子节点车间"});else if(this.checkedKeys.length<=0)this.$notification.warning({message:"消息",description:"请选择一条记录"});else{for(var e="",t=0;t<this.checkedKeys.length;t++)e+=this.checkedKeys[t]+",";var r=this;this.$confirm({title:"确认删除",content:"确定要删除所选中的 "+this.checkedKeys.length+" 条数据?",onOk:function(){Object(s["a"])(r.url.deleteBatch,{ids:e}).then((function(e){e.success?(r.$notification.success({message:"消息",description:e.message}),r.loadTree(),r.onClearSelected()):r.$notification.warning({message:"消息",description:e.message})}))}})}},includesNotLeaf:function(e){for(var t=0;t<e.length;t++)e[t].leaf||this.includesNotLeaf(e[t].children),this.checkedKeys.includes(e[t].id)&&!e[t].leaf&&(this.isIncludesNotLeaf=!0)},onSearch:function(e){var t=this;e?Object(a["X"])({keyWord:e}).then((function(e){if(e.success){t.departTree=[];for(var r=0;r<e.result.length;r++){var i=e.result[r];t.departTree.push(i)}}else t.$notification.warning({message:"消息",description:e.message})})):t.loadTree()},nodeModalOk:function(){this.loadTree()},nodeModalClose:function(){},hide:function(){this.visible=!1},onCheck:function(e,t){this.hiding=!1,this.checkStrictly?this.checkedKeys=e.checked:this.checkedKeys=e},onSelect:function(e,t){this.hiding=!1,this.deleteTrigger="leftClick";var r=t.node.dataRef;this.currSelected=Object.assign({},r),this.model=this.currSelected,this.selectedKeys=[r.key],this.model.parentId=r.parentId,this.setValuesToForm(r),this.$refs.departAuth.show(r.id)},setValuesToForm:function(e){"1"==e.orgCategory?this.orgCategoryDisabled=!0:this.orgCategoryDisabled=!1},getCurrSelectedTitle:function(){return this.currSelected.title?this.currSelected.title:""},onClearSelected:function(){this.hiding=!0,this.checkedKeys=[],this.currSelected={},this.selectedKeys=[],this.$refs.departAuth.departId=""},handleNodeTypeChange:function(e){this.currSelected.nodeType=e},notifyTriggerTypeChange:function(e){this.currSelected.notifyTriggerType=e},receiptTriggerTypeChange:function(e){this.currSelected.receiptTriggerType=e},submitCurrForm:function(){var e=this;this.$refs.form.validate((function(t){if(t){if(!e.currSelected.id)return void e.$notification.warning({message:"消息",description:"请点击选择要修改车间!"});Object(s["h"])(e.url.edit,e.currSelected,"put").then((function(t){t.success?(e.$notification.success({message:"消息",description:"保存成功"}),e.loadTree()):e.$notification.warning({message:"消息",description:t.message})}))}}))},emptyCurrForm:function(){this.$refs.form.resetFields(),this.model={}},nodeSettingFormSubmit:function(){this.$refs.form.validate((function(e){}))},openSelect:function(){this.$refs.sysDirectiveModal.show()},handleAdd:function(e){if(1==e)this.$refs.departModal.add(),this.$refs.departModal.title="新增";else if(2==e){var t=this.currSelected.key;if(!t)return this.$notification.warning({message:"消息",description:"请先点击选中上级车间!"}),!1;this.$refs.departModal.add(this.selectedKeys),this.$refs.departModal.title="新增"}else this.$refs.departModal.add(this.rightClickSelectedKey),this.$refs.departModal.title="新增"},handleDelete:function(){var e=this;this.currSelected.leaf?this.$confirm({title:"确认删除",content:"确定要删除 ".concat(e.currSelected.productionName," 吗?"),onOk:function(){Object(a["l"])({id:e.currSelected.id}).then((function(t){t.success?(e.$notification.success({message:"消息",description:"删除成功"}),e.loadTree(),e.onClearSelected()):e.$notification.warning({message:"消息",description:"删除失败"})}))}}):this.$notification.warning({message:"消息",description:"此车间已挂载子节点"})},selectDirectiveOk:function(e){this.nodeSettingForm.setFieldsValue({directiveCode:e.directiveCode}),this.currSelected.sysCode=e.sysCode},getFlowGraphData:function(e){if(this.graphDatasource.nodes.push({id:e.id,text:e.flowNodeName}),e.children.length>0)for(var t=0;t<e.children.length;t++){var r=e.children[t];this.graphDatasource.edges.push({source:e.id,target:r.id}),this.getFlowGraphData(r)}},expandAll:function(){this.iExpandedKeys=this.allTreeKeys},closeAll:function(){this.iExpandedKeys=[]},checkALL:function(){this.checkStriccheckStrictlytly=!1,this.checkedKeys=this.allTreeKeys},cancelCheckALL:function(){this.checkedKeys=[]},switchCheckStrictly:function(e){1==e?this.checkStrictly=!1:2==e&&(this.checkStrictly=!0)},getAllKeys:function(e){if(this.allTreeKeys.push(e.key),e.children&&e.children.length>0)for(var t=0;t<e.children.length;t++)this.getAllKeys(e.children[t])}},created:function(){this.currFlowId=this.$route.params.id,this.currFlowName=this.$route.params.name}},u=d,p=(r("10da"),r("2877")),f=Object(p["a"])(u,i,n,!1,null,"75acf7c2",null);t["default"]=f.exports}}]);
|