cuikaidong
2025-08-08 c495c1ae53473d54af136ea00da84bf51c50d521
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3f53b50f","chunk-7c4624a4"],{4851:function(e,t,a){},"5dce":function(e,t,a){"use strict";var r=a("4851"),o=a.n(r);o.a},"72bc":function(e,t,a){"use strict";var r=a("e57d"),o=a.n(r);o.a},bd80:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-drawer",{staticStyle:{height:"100%",overflow:"auto","padding-bottom":"53px"},attrs:{title:e.title,maskClosable:!0,width:e.drawerWidth,placement:"right",closable:!0,visible:e.visible},on:{close:e.handleCancel}},[a("template",{slot:"title"},[a("div",{staticStyle:{width:"100%"}},[a("span",[e._v(e._s(e.title))]),a("span",{staticStyle:{display:"inline-block",width:"calc(100% - 51px)","padding-right":"10px","text-align":"right"}},[a("a-button",{staticStyle:{height:"20px",width:"20px",border:"0px"},attrs:{icon:"appstore"},on:{click:e.toggleScreen}})],1)])]),a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form-model",{ref:"form",attrs:{model:e.model,rules:e.validatorRules}},[a("a-form-model-item",{attrs:{label:"用户账号",labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"username"}},[a("a-input",{attrs:{placeholder:"请输入用户账号",readOnly:!!e.model.id},model:{value:e.model.username,callback:function(t){e.$set(e.model,"username",t)},expression:"model.username"}})],1),e.model.id?e._e():[a("a-form-model-item",{attrs:{label:"登录密码",labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"password"}},[a("a-input",{attrs:{type:"password",placeholder:"请输入登录密码"},model:{value:e.model.password,callback:function(t){e.$set(e.model,"password",t)},expression:"model.password"}})],1),a("a-form-model-item",{attrs:{label:"确认密码",labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"confirmpassword"}},[a("a-input",{attrs:{type:"password",placeholder:"请重新输入登录密码"},on:{blur:e.handleConfirmBlur},model:{value:e.model.confirmpassword,callback:function(t){e.$set(e.model,"confirmpassword",t)},expression:"model.confirmpassword"}})],1)],a("a-form-model-item",{attrs:{label:"用户姓名",labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"realname"}},[a("a-input",{attrs:{placeholder:"请输入用户姓名"},model:{value:e.model.realname,callback:function(t){e.$set(e.model,"realname",t)},expression:"model.realname"}})],1),a("a-form-model-item",{attrs:{label:"工号",labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"workNo"}},[a("a-input",{attrs:{placeholder:"请输入工号"},model:{value:e.model.workNo,callback:function(t){e.$set(e.model,"workNo",t)},expression:"model.workNo"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:!e.roleDisabled,expression:"!roleDisabled"}],attrs:{label:"角色分配",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("j-multi-select-tag",{attrs:{disabled:e.disableSubmit,options:e.rolesOptions,placeholder:"请选择角色"},model:{value:e.model.selectedroles,callback:function(t){e.$set(e.model,"selectedroles",t)},expression:"model.selectedroles"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:!e.departDisabled,expression:"!departDisabled"}],attrs:{label:"部门分配",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("j-select-depart",{attrs:{multi:!0,backDepart:!0,treeOpera:!0},on:{back:e.backDepartInfo},model:{value:e.model.selecteddeparts,callback:function(t){e.$set(e.model,"selecteddeparts",t)},expression:"model.selecteddeparts"}},[e._v(">")])],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:!e.productionDisabled,expression:"!productionDisabled"}],attrs:{label:"车间分配",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("j-select-production",{attrs:{multi:!0,backProduction:!0,treeProductOpera:!0},on:{back:e.backProductionInfo},model:{value:e.model.selectedProduction,callback:function(t){e.$set(e.model,"selectedProduction",t)},expression:"model.selectedProduction"}})],1),1==e.departIdShow?a("a-form-model-item",{attrs:{label:"负责部门",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("j-multi-select-tag",{attrs:{disabled:e.disableSubmit,options:e.nextDepartOptions,placeholder:"请选择负责部门"},model:{value:e.model.departIds,callback:function(t){e.$set(e.model,"departIds",t)},expression:"model.departIds"}})],1):e._e(),a("a-form-model-item",{attrs:{label:"头像",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("j-image-upload",{staticClass:"avatar-uploader",attrs:{text:"上传"},model:{value:e.model.avatar,callback:function(t){e.$set(e.model,"avatar",t)},expression:"model.avatar"}})],1),a("a-form-model-item",{attrs:{label:"生日",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择生日",format:e.dateFormat,getCalendarContainer:function(e){return e.parentNode}},model:{value:e.model.birthday,callback:function(t){e.$set(e.model,"birthday",t)},expression:"model.birthday"}})],1),a("a-form-model-item",{attrs:{label:"性别",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-select",{attrs:{placeholder:"请选择性别",getPopupContainer:function(e){return e.parentNode}},model:{value:e.model.sex,callback:function(t){e.$set(e.model,"sex",t)},expression:"model.sex"}},[a("a-select-option",{attrs:{value:1}},[e._v("男")]),a("a-select-option",{attrs:{value:2}},[e._v("女")])],1)],1),a("a-form-model-item",{attrs:{label:"邮箱",labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"email"}},[a("a-input",{attrs:{placeholder:"请输入邮箱"},model:{value:e.model.email,callback:function(t){e.$set(e.model,"email",t)},expression:"model.email"}})],1),a("a-form-model-item",{attrs:{label:"手机号码",labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"phone"}},[a("a-input",{attrs:{placeholder:"请输入手机号码"},model:{value:e.model.phone,callback:function(t){e.$set(e.model,"phone",t)},expression:"model.phone"}})],1),a("a-form-model-item",{attrs:{label:"座机",labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"telephone"}},[a("a-input",{attrs:{placeholder:"请输入座机"},model:{value:e.model.telephone,callback:function(t){e.$set(e.model,"telephone",t)},expression:"model.telephone"}})],1)],2)],1),a("div",{directives:[{name:"show",rawName:"v-show",value:!e.disableSubmit,expression:"!disableSubmit"}],staticClass:"drawer-bootom-button"},[a("a-popconfirm",{attrs:{title:"确定放弃编辑?",okText:"确定",cancelText:"取消"},on:{confirm:e.handleCancel}},[a("a-button",{staticStyle:{"margin-right":".8rem"}},[e._v("取消")])],1),a("a-button",{attrs:{type:"primary",loading:e.confirmLoading},on:{click:e.handleSubmit}},[e._v("提交")])],1)],2)},o=[],n=a("c1df"),l=a.n(n),i=a("2b0e"),s=a("9fb0"),d=a("0fea"),c=a("4ec3"),u=a("c82c"),h=a("c318"),p={name:"EquipmentModal",components:{JSelectProduction:h["default"]},data:function(){return{departDisabled:!1,productionDisabled:!1,roleDisabled:!1,modalWidth:800,drawerWidth:700,modaltoggleFlag:!0,confirmDirty:!1,userId:"",disableSubmit:!1,dateFormat:"YYYY-MM-DD",validatorRules:{username:[{required:!0,message:"请输入用户账号!"},{validator:this.validateUsername}],password:[{required:!0,pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,message:"密码由8位数字、大小写字母和特殊符号组成!"},{validator:this.validateToNextPassword,trigger:"change"}],confirmpassword:[{required:!0,message:"请重新输入登录密码!"},{validator:this.compareToFirstPassword}],realname:[{required:!0,message:"请输入用户名称!"}],phone:[{required:!1,message:"请输入手机号!"},{validator:this.validatePhone}],email:[{validator:this.validateEmail}],roles:{},workNo:[{required:!0,message:"请输入工号"},{validator:this.validateWorkNo}],telephone:[{pattern:/^0\d{2,3}-[1-9]\d{6,7}$/,message:"请输入正确的座机号码"}]},departIdShow:!1,title:"操作",visible:!1,model:{},labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},uploadLoading:!1,confirmLoading:!1,headers:{},url:{fileUpload:window._CONFIG["domianURL"]+"/sys/common/upload",userWithDepart:"/sys/user/userDepartList",userProductionList:"/sys/user/userProductionList",userId:"/sys/user/generateUserId",syncUserByUserName:"/act/process/extActProcess/doSyncUserByUserName",queryTenantList:"/sys/tenant/queryList"},tenantsOptions:[],rolesOptions:[],nextDepartOptions:[],nextProductionOptions:[]}},created:function(){var e=i["default"].ls.get(s["a"]);this.headers={"X-Access-Token":e},this.initRoleList(),this.initTenantList()},computed:{uploadAction:function(){return this.url.fileUpload}},methods:{add:function(){this.refresh(),this.edit({activitiSync:"1",userIdentity:1})},edit:function(e){var t=this;t.visible=!0,this.resetScreenSize(),t.userId=e.id,t.model=Object.assign({},{selectedroles:"",selecteddeparts:""},e),t.model=Object.assign({},{selectedroles:"",selectedProduction:""},e),2==this.model.userIdentity?this.departIdShow=!0:this.departIdShow=!1,e.hasOwnProperty("id")&&(t.getUserRoles(e.id),t.getUserDeparts(e.id))},isDisabledAuth:function(e){return Object(u["a"])(e)},toggleScreen:function(){this.modaltoggleFlag?this.modalWidth=window.innerWidth:this.modalWidth=800,this.modaltoggleFlag=!this.modaltoggleFlag},resetScreenSize:function(){var e=document.body.clientWidth;this.drawerWidth=e<500?e:700},initTenantList:function(){var e=this;Object(d["c"])(this.url.queryTenantList).then((function(t){t.success&&(e.tenantsOptions=t.result.map((function(e,t,a){var r={label:e.name,value:e.id+""};return r})))}))},initRoleList:function(){var e=this;Object(c["T"])().then((function(t){t.success&&(e.rolesOptions=t.result.map((function(e,t,a){var r={label:e.roleName,value:e.id};return r})))}))},getUserRoles:function(e){var t=this;Object(c["S"])({userid:e}).then((function(e){e.success&&(t.model.selectedroles=e.result.join(","))}))},getUserDeparts:function(e){var t=this;Object(d["c"])(t.url.userWithDepart,{userId:e}).then((function(e){if(e.success){for(var a=[],r=[],o=0;o<e.result.length;o++)r.push(e.result[o].key),a.push({value:e.result[o].key,label:e.result[o].title});t.model.selecteddeparts=r.join(","),t.model.selectedProduction=r.join(","),t.nextDepartOptions=a}})),Object(d["c"])(t.url.userProductionList,{userId:e}).then((function(e){if(e.success){for(var a=[],r=[],o=0;o<e.result.length;o++)r.push(e.result[o].key),a.push({value:e.result[o].key,label:e.result[o].title});t.model.selectedProduction=r.join(","),t.nextProductionOptions=a}}))},backDepartInfo:function(e){this.model.departIds=this.model.selecteddeparts,this.nextDepartOptions=e.map((function(e,t,a){var r={label:e.text,value:e.value+""};return r}))},backProductionInfo:function(e){this.model.productionIds=this.model.selectedProduction,this.nextProductionOptions=e.map((function(e,t,a){var r={label:e.text,value:e.value+""};return r}))},refresh:function(){this.userId="",this.nextDepartOptions=[],this.nextProductionOptions=[],this.departIdShow=!1},close:function(){this.$emit("close"),this.visible=!1,this.disableSubmit=!1,this.nextDepartOptions=[],this.nextProductionOptions=[],this.departIdShow=!1,this.$refs.form.resetFields()},moment:l.a,handleSubmit:function(){var e=this,t=this;this.$refs.form.validate((function(a){if(!a)return!1;var r;t.confirmLoading=!0,2!==e.model.userIdentity&&(e.model.departIds=""),e.model.id?r=Object(c["u"])(e.model):(e.model.id=e.userId,r=Object(c["f"])(e.model)),r.then((function(e){e.success?(t.$message.success(e.message),t.$emit("ok")):t.$message.warning(e.message)})).finally((function(){t.confirmLoading=!1,t.close()}))}))},handleCancel:function(){this.close()},validateToNextPassword:function(e,t,a){var r=this.model.confirmpassword;t&&r&&t!==r&&a("两次输入的密码不一样!"),t&&this.confirmDirty&&this.$refs.form.validateField(["confirmpassword"]),a()},compareToFirstPassword:function(e,t,a){t&&t!==this.model.password?a("两次输入的密码不一样!"):a()},validatePhone:function(e,t,a){if(t)if(new RegExp(/^1[3|4|5|7|8|9][0-9]\d{8}$/).test(t)){var r={tableName:"sys_user",fieldName:"phone",fieldVal:t,dataId:this.userId};Object(c["o"])(r).then((function(e){e.success?a():a("手机号已存在!")}))}else a("请输入正确格式的手机号码!");else a()},validateEmail:function(e,t,a){if(t)if(new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(t)){var r={tableName:"sys_user",fieldName:"email",fieldVal:t,dataId:this.userId};Object(c["o"])(r).then((function(e){e.success?a():a("邮箱已存在!")}))}else a("请输入正确格式的邮箱!");else a()},validateUsername:function(e,t,a){var r={tableName:"sys_user",fieldName:"username",fieldVal:t,dataId:this.userId};Object(c["o"])(r).then((function(e){e.success?a():a("用户名已存在!")}))},validateWorkNo:function(e,t,a){var r={tableName:"sys_user",fieldName:"work_no",fieldVal:t,dataId:this.userId};Object(c["o"])(r).then((function(e){e.success?a():a("工号已存在!")}))},handleConfirmBlur:function(e){var t=e.target.value;this.confirmDirty=this.confirmDirty||!!t},beforeUpload:function(e){var t=e.type;if(t.indexOf("image")<0)return this.$message.warning("请上传图片"),!1},identityChange:function(e){1===e.target.value?this.departIdShow=!1:this.departIdShow=!0}}},m=p,f=(a("ddef"),a("2877")),b=Object(f["a"])(m,r,o,!1,null,"2896125c",null);t["default"]=b.exports},c318:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"components-input-demo-presuffix"},[a("a-input",{attrs:{placeholder:"请点击选择车间",readOnly:"",disabled:e.disabled},on:{click:e.openModal},model:{value:e.textVals,callback:function(t){e.textVals=t},expression:"textVals"}},[a("a-icon",{attrs:{slot:"prefix",type:"cluster",title:"车间选择控件"},slot:"prefix"}),e.storeVals?a("a-icon",{attrs:{slot:"suffix",type:"close-circle",title:"清空"},on:{click:e.handleEmpty},slot:"suffix"}):e._e()],1),a("j-select-production-modal",{ref:"innerDepartSelectModal",attrs:{"modal-width":e.modalWidth,multi:e.multi,rootOpened:e.rootOpened,"production-id":e.value,store:e.storeField,text:e.textField,treeProductOpera:e.treeProductOpera},on:{ok:e.handleOK,initComp:e.initComp}})],1)},o=[],n=a("c3b6"),l=a("a9c5");function i(e,t){var a;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(a=s(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,l=!0,i=!1;return{s:function(){a=e[Symbol.iterator]()},n:function(){var e=a.next();return l=e.done,e},e:function(e){i=!0,n=e},f:function(){try{l||null==a.return||a.return()}finally{if(i)throw n}}}}function s(e,t){if(e){if("string"===typeof e)return d(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}var c={name:"JSelectProduction",components:{JSelectProductionModal:n["default"]},props:{modalWidth:{type:Number,default:500,required:!1},multi:{type:Boolean,default:!1,required:!1},rootOpened:{type:Boolean,default:!0,required:!1},value:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},customReturnField:{type:String,default:""},backProduction:{type:Boolean,default:!1,required:!1},store:{type:String,default:"id",required:!1},text:{type:String,default:"productionName",required:!1},treeProductOpera:{type:Boolean,default:!1,required:!1}},data:function(){return{visible:!1,confirmLoading:!1,storeVals:"",textVals:""}},computed:{storeField:function(){var e=this.customReturnField;return e||(e=this.store),Object(l["c"])(e)},textField:function(){return Object(l["c"])(this.text)}},mounted:function(){this.storeVals=this.value},watch:{value:function(e){this.storeVals=e}},methods:{initComp:function(e){this.textVals=e},backProductInfo:function(){if(!0===this.backProduction&&this.storeVals&&this.storeVals.length>0){for(var e=this.storeVals.split(","),t=this.textVals.split(","),a=[],r=0;r<e.length;r++)a.push({value:e[r],text:t[r]});this.$emit("back",a)}},openModal:function(){this.$refs.innerDepartSelectModal.show()},handleOK:function(e){if(!e&&e.length<=0)this.textVals="",this.storeVals="";else{var t,a=[],r=[],o=i(e);try{for(o.s();!(t=o.n()).done;){var n=t.value;a.push(n[this.storeField]),r.push(n[this.textField])}}catch(l){o.e(l)}finally{o.f()}this.storeVals=a.join(","),this.textVals=r.join(",")}this.$emit("change",this.storeVals),this.backProductInfo()},getDepartNames:function(){return this.departNames},handleEmpty:function(){this.handleOK("")}},model:{prop:"value",event:"change"}},u=c,h=(a("5dce"),a("2877")),p=Object(h["a"])(u,r,o,!1,null,"6af1d7b1",null);t["default"]=p.exports},c3b6:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("j-modal",{attrs:{title:"选择车间",width:e.modalWidth,visible:e.visible,confirmLoading:e.confirmLoading,wrapClassName:"j-production-select-modal",switchFullscreen:"",cancelText:"关闭"},on:{ok:e.handleSubmit,cancel:e.handleCancel,"update:fullscreen":e.isFullscreen}},[a("a-spin",{attrs:{tip:"Loading...",spinning:!1}},[a("a-input-search",{staticStyle:{"margin-bottom":"1px"},attrs:{placeholder:"请输入车间名称按回车进行搜索"},on:{search:e.onSearch}}),a("a-tree",{class:e.treeScreenClass,attrs:{checkable:"",treeData:e.treeData,checkStrictly:e.checkStrictly,autoExpandParent:e.autoExpandParent,expandedKeys:e.expandedKeys,checkedKeys:e.checkedKeys},on:{check:e.onCheck,select:e.onSelect,expand:e.onExpand},scopedSlots:e._u([{key:"title",fn:function(t){var r=t.title;return[r.indexOf(e.searchValue)>-1?a("span",[e._v("\n          "+e._s(r.substr(0,r.indexOf(e.searchValue)))+"\n          "),a("span",{staticStyle:{color:"#f50"}},[e._v(e._s(e.searchValue))]),e._v("\n          "+e._s(r.substr(r.indexOf(e.searchValue)+e.searchValue.length))+"\n        ")]):a("span",[e._v(e._s(r))])]}}])})],1)],1)},o=[],n=a("4ec3");function l(e,t){var a;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(a=d(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,l=!0,i=!1;return{s:function(){a=e[Symbol.iterator]()},n:function(){var e=a.next();return l=e.done,e},e:function(e){i=!0,n=e},f:function(){try{l||null==a.return||a.return()}finally{if(i)throw n}}}}function i(e){return u(e)||c(e)||d(e)||s()}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){if(e){if("string"===typeof e)return h(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?h(e,t):void 0}}function c(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function u(e){if(Array.isArray(e))return h(e)}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}var p={name:"JSelectProductionModal",props:["modalWidth","multi","rootOpened","productionId","store","text","treeOpera"],data:function(){return{visible:!1,confirmLoading:!1,treeData:[],autoExpandParent:!0,expandedKeys:[],dataList:[],checkedKeys:[],checkedRows:[],searchValue:"",checkStrictly:!1,fullscreen:!1}},created:function(){this.loadDepart()},watch:{productionId:function(){this.initDepartComponent()},visible:{handler:function(){this.initDepartComponent(!0)}}},computed:{treeScreenClass:function(){return{"my-dept-select-tree":!0,fullscreen:this.fullscreen}}},methods:{show:function(){this.visible=!0,this.checkedRows=[],this.checkedKeys=[]},loadDepart:function(){var e=this;Object(n["M"])().then((function(t){if(t.success){var a=i(t.result);e.reWriterWithSlot(a),e.treeData=a,e.initDepartComponent(),e.rootOpened&&e.initExpandedKeys(t.result)}}))},initDepartComponent:function(e){var t=[],a=1==e?"key":this.text;if(this.productionId){var r,o=this.productionId.split(","),n=l(this.dataList);try{for(n.s();!(r=n.n()).done;){var i=r.value;o.indexOf(i[this.store])>=0&&t.push(i[a])}}catch(s){n.e(s)}finally{n.f()}}1==e?this.checkedKeys=[].concat(t):this.$emit("initComp",t.join(","))},reWriterWithSlot:function(e){var t,a=l(e);try{for(a.s();!(t=a.n()).done;){var r=t.value;if(r.children&&r.children.length>0){this.reWriterWithSlot(r.children);var o=Object.assign({},r);o.children={},this.dataList.push(o)}else this.dataList.push(r),r.scopedSlots={title:"title"}}}catch(n){a.e(n)}finally{a.f()}},initExpandedKeys:function(e){if(e&&e.length>0){var t,a=[],r=l(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.children&&o.children.length>0&&a.push(o.id)}}catch(n){r.e(n)}finally{r.f()}this.expandedKeys=[].concat(a)}else this.expandedKeys=[]},onCheck:function(e,t){var a=this;if(this.multi)this.checkStrictly?this.checkedKeys=e.checked:this.checkedKeys=e,this.checkedRows=this.getCheckedRows(this.checkedKeys);else{var r=e.checked.filter((function(e){return a.checkedKeys.indexOf(e)<0}));this.checkedKeys=i(r),this.checkedRows=0===this.checkedKeys.length?[]:[t.node.dataRef]}},onSelect:function(e,t){if(this.checkStrictly){var a=[];if(a.push(e[0]),this.checkedKeys&&0!==this.checkedKeys.length&&this.multi){var r,o=t.node.dataRef.key;if(this.checkedKeys.indexOf(o)>=0)this.checkedKeys=this.checkedKeys.filter((function(e){return e!==o}));else(r=this.checkedKeys).push.apply(r,a)}else this.checkedKeys=[].concat(a),this.checkedRows=[t.node.dataRef];this.checkedRows=this.getCheckedRows(this.checkedKeys)}},onExpand:function(e){this.expandedKeys=e,this.autoExpandParent=!1},handleSubmit:function(){if(this.checkedKeys&&0!=this.checkedKeys.length){var e=this.getCheckedRows(this.checkedKeys),t=this.checkedKeys.join(",");this.$emit("ok",e,t)}else this.$emit("ok","");this.handleClear()},handleCancel:function(){this.handleClear()},handleClear:function(){this.visible=!1,this.checkedKeys=[]},getParentKey:function(e,t){for(var a,r=0;r<t.length;r++){var o=t[r];o.children&&(o.children.some((function(t){return t.key===e}))?a=o.key:this.getParentKey(e,o.children)&&(a=this.getParentKey(e,o.children)))}return a},onSearch:function(e){var t=this,a=this.dataList.map((function(a){return a.title.indexOf(e)>-1?t.getParentKey(a.key,t.treeData):null})).filter((function(e,t,a){return e&&a.indexOf(e)===t}));Object.assign(this,{expandedKeys:a,searchValue:e,autoExpandParent:!0})},getCheckedRows:function(e){var t,a=function e(t,a){var r,o=l(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(n.id===a)return n;if(n.children instanceof Array){var i=e(n.children,a);if(null!=i)return i}}}catch(s){o.e(s)}finally{o.f()}return null},r=[],o=l(e);try{for(o.s();!(t=o.n()).done;){var n=t.value,i=a(this.treeData,n);null!=i&&r.push(i)}}catch(s){o.e(s)}finally{o.f()}return r},switchCheckStrictly:function(e){1==e?this.checkStrictly=!1:2==e&&(this.checkStrictly=!0)},isFullscreen:function(e){this.fullscreen=e}}},m=p,f=(a("72bc"),a("2877")),b=Object(f["a"])(m,r,o,!1,null,"0f208d9f",null);t["default"]=b.exports},c95a:function(e,t,a){},ddef:function(e,t,a){"use strict";var r=a("c95a"),o=a.n(r);o.a},e57d:function(e,t,a){}}]);