UNPKG

vkd-components

Version:

vkd typeCode

7 lines (6 loc) 109 kB
/*! * vkd-components v1.3.4 * (c) 2018 shangwenxue * Released under the MIT License. */ module.exports=function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=80)}([function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}},function(t,e){var n=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var i=n(33)("wks"),o=n(26),a=n(2).Symbol,r="function"==typeof a;(t.exports=function(t){return i[t]||(i[t]=r&&a[t]||(r?a:o)("Symbol."+t))}).store=i},function(t,e){t.exports=function(t,e,n,i,o,a){var r,s=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(r=t,s=t.default);var d="function"==typeof s?s.options:s;e&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0),n&&(d.functional=!0),o&&(d._scopeId=o);var u;if(a?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},d._ssrRegister=u):i&&(u=i),u){var c=d.functional,f=c?d.render:d.beforeCreate;c?(d._injectStyles=u,d.render=function(t,e){return u.call(e),f(t,e)}):d.beforeCreate=f?[].concat(f,u):[u]}return{esModule:r,exports:s,options:d}}},function(t,e){function n(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var a=i(o);return[n].concat(o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"})).concat([a]).join("\n")}return[n].join("\n")}function i(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i=n(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(i[a]=!0)}for(o=0;o<t.length;o++){var r=t[o];"number"==typeof r[0]&&i[r[0]]||(n&&!r[2]?r[2]=n:n&&(r[2]="("+r[2]+") and ("+n+")"),e.push(r))}},e}},function(t,e,n){function i(t,e){for(var n=0;n<e.length;n++)for(var i=e[n].parts,o=0;o<i.length;o++){var a=i[o],r=a.media||"default",s=t[r];s?s.ids.indexOf(a.id)<0&&(s.ids.push(a.id),s.css+="\n"+a.css):t[r]={ids:[a.id],css:a.css,media:a.media}}}function o(t,e){for(var n=0;n<e.length;n++)for(var i=e[n].parts,o=0;o<i.length;o++){var a=i[o];t[a.id]={ids:[a.id],css:a.css,media:a.media}}}function a(t){var e="";for(var n in t){var i=t[n];e+='<style data-vue-ssr-id="'+i.ids.join(" ")+'"'+(i.media?' media="'+i.media+'"':"")+">"+i.css+"</style>"}return e}var r=n(180);t.exports=function(t,e,n,s){if(s||"undefined"==typeof __VUE_SSR_CONTEXT__||(s=__VUE_SSR_CONTEXT__),s){s.hasOwnProperty("styles")||(Object.defineProperty(s,"styles",{enumerable:!0,get:function(){return a(s._styles)}}),s._renderStyles=a);var l=s._styles||(s._styles={});e=r(t,e),n?i(l,e):o(l,e)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=n(81);e.default={getNeelShowLevelData:function(){return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.get(String((0,a.GETSTAFFWEBREQUESTURL)())+"/organization/typeCodes")}.bind(void 0),getDepartmentLevelInfo:function(t){return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.get(String((0,a.GETSTAFFWEBREQUESTURL)())+"/organization/levelInfo",{params:t})}.bind(void 0),addDeptInfo:function(t){var e=t.params,n=t.typeCode;return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.post(String((0,a.GETSTAFFWEBREQUESTURL)())+"/organization/dept?typeCode="+String(n),e)}.bind(void 0),editDeptInfo:function(t){var e=t.params,n=t.typeCode;return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.put(String((0,a.GETSTAFFWEBREQUESTURL)())+"/organization/dept?typeCode="+String(n),e)}.bind(void 0),transDeptInfo:function(t){var e=t.params,n=t.typeCode;return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.post(String((0,a.GETSTAFFWEBREQUESTURL)())+"/organization/moveDept?typeCode="+String(n),e)}.bind(void 0),deleteDeptInfo:function(t){var e=t.params,n=t.typeCode;return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.delete(String((0,a.GETSTAFFWEBREQUESTURL)())+"/organization/dept?typeCode="+String(n),{params:e})}.bind(void 0),getTreeDataList:function(t){var e=t.params,n=void 0===e?{}:e,i=t.typeCode;return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.get(String((0,a.GETSTAFFWEBREQUESTURL)())+"/organization/dept?typeCode="+String(i),{params:n})}.bind(void 0),getStaffDataList:function(t){var e=t.params,n=void 0===e?{}:e,i=t.typeCode;return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.get(String((0,a.GETSTAFFWEBREQUESTURL)())+"/organization/staff?typeCode="+String(i),{params:n})}.bind(void 0),getVagueData:function(t){var e=t.params,n=void 0===e?{}:e,i=t.typeCode;return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.get(String((0,a.GETSTAFFWEBREQUESTURL)())+"/member/staff/vague?typeCode="+String(i),{params:n})}.bind(void 0),deleteStaffInfo:function(t){var e=t.params,n=t.typeCode;return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.delete(String((0,a.GETSTAFFWEBREQUESTURL)())+"/member/staffs?typeCode="+String(n),{params:e})}.bind(void 0),transStaffInfo:function(t){var e=t.params,n=t.typeCode;return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.put(String((0,a.GETSTAFFWEBREQUESTURL)())+"/member/staff?typeCode="+String(n),e)}.bind(void 0),addStaffInfo:function(t){var e=t.params,n=t.typeCode;return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.post(String((0,a.GETSTAFFWEBREQUESTURL)())+"/member/staff?typeCode="+String(n),e)}.bind(void 0),queryEmailData:function(t){var e=t.params,n=t.typeCode;return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.get(String((0,a.GETSTAFFWEBREQUESTURL)())+"/member/staff/email?typeCode="+String(n),{params:e})}.bind(void 0),updateTrainNum:function(t){return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.post(String((0,a.GETSTAFFWEBREQUESTURL)())+"/staff/expand/update",t)}.bind(void 0),findStaffByKeyWords:function(t){return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.get(String((0,a.GETSTAFFWEBREQUESTURL)())+"/member/staff/findStaffByKeyWords",{params:t})}.bind(void 0),getDeptInfo:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.get(String((0,a.GETSTAFFWEBREQUESTURL)())+"/organization/dept/info",{params:t})}.bind(void 0),getTrainNumConfig:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.default)(void 0,void 0),a.STAFFWEBREQUEST.get(String((0,a.GETSTAFFWEBREQUESTURL)())+"/staff/expand/typeCodes",{params:t})}.bind(void 0),getUploadTrainNum:function(){return(0,o.default)(void 0,void 0),String((0,a.GETSTAFFWEBREQUESTURL)())+"/staff/expand/upload"}.bind(void 0)}},function(t,e,n){var i=n(14);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(15)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(2),o=n(1),a=n(21),r=n(13),s=n(12),l=function(t,e,n){var d,u,c,f=t&l.F,p=t&l.G,h=t&l.S,v=t&l.P,m=t&l.B,g=t&l.W,b=p?o:o[e]||(o[e]={}),_=b.prototype,y=p?i:h?i[e]:(i[e]||{}).prototype;p&&(n=e);for(d in n)(u=!f&&y&&void 0!==y[d])&&s(b,d)||(c=u?y[d]:n[d],b[d]=p&&"function"!=typeof y[d]?n[d]:m&&u?a(c,i):g&&y[d]==c?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(c):v&&"function"==typeof c?a(Function.call,c):c,v&&((b.virtual||(b.virtual={}))[d]=c,t&l.R&&_&&!_[d]&&r(_,d,c)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},function(t,e,n){var i=n(8),o=n(65),a=n(36),r=Object.defineProperty;e.f=n(9)?Object.defineProperty:function(t,e,n){if(i(t),e=a(e,!0),i(n),o)try{return r(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(11),o=n(24);t.exports=n(9)?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(66),o=n(27);t.exports=function(t){return i(o(t))}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports={}},function(t,e,n){var i=n(70),o=n(29);t.exports=Object.keys||function(t){return i(t,o)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(20);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=!0},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(11).f,o=n(12),a=n(3)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,a)&&i(t,a,{configurable:!0,value:e})}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(14),o=n(2).document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){"use strict";function i(t){var e,n;this.promise=new t(function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i}),this.resolve=o(e),this.reject=o(n)}var o=n(20);t.exports.f=function(t){return new i(t)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(33)("keys"),o=n(26);t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var i=n(2),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(27);t.exports=function(t){return Object(i(t))}},function(t,e,n){var i=n(14);t.exports=function(t,e){if(!i(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!i(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var i=n(2),o=n(1),a=n(22),r=n(38),s=n(11).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=a?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:r.f(t)})}},function(t,e,n){e.f=n(3)},function(t,e,n){"use strict";var i=n(120)(!0);n(67)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){n(123);for(var i=n(2),o=n(13),a=n(18),r=n(3)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){var d=s[l],u=i[d],c=u&&u.prototype;c&&!c[r]&&o(c,r,d),a[d]=a.Array}},function(t,e,n){"use strict";function i(t){var e;e=n(178),e.__inject__&&e.__inject__(t)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(48),a=n.n(o);for(var r in o)["default","default"].indexOf(r)<0&&function(t){n.d(e,t,function(){return o[t]})}(r);var s=n(167),l=n(4),d=i,u=l(a.a,s.a,!1,d,"data-v-6f743ecd","36d92d0a");u.options.__file="src/src/components/autocomplete.vue",e.default=u.exports},function(t,e){t.exports=require("element-ui")},function(t,e){t.exports=require("lodash")},function(t,e){t.exports=require("vue")},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(60),a=i(o),r=n(86),s=i(r),l=n(0),d=i(l),u=n(7),c=i(u),f=n(145),p=i(f),h=n(152),v=i(h),m=n(154),g=i(m),b=n(151),_=i(b),y=n(153),S=i(y),x={ADD:"dialogAddDeptFormVisible",EDIT:"dialogEditFormVisible",TRANS:"dialogTransFormVisible",DELETE:"dialogDeleteFormVisible"};e.default={name:"StaffManagement",props:{staffAuthInfo:{type:Array,default:function(){return(0,d.default)(void 0,void 0),[]}.bind(void 0)},authCodeList:{type:Array,default:function(){return(0,d.default)(void 0,void 0),[]}.bind(void 0)},typeCode:{type:[String,Number],required:!0},isShowNav:{type:Boolean,default:!1},leads:{type:Boolean,default:!1},env:{type:String,deafult:"prod"}},beforeMount:function(){this.isShowNav&&(this.setTitle("组织架构"),this.$store.commit("showTopPanel"),this.$store.commit("showBottomPanel"))},created:function(){window.envVal=this.env,this.getIsNeedShowLevel(),this.getTreeDataList()},mounted:function(){this.isEditShow(this.authCodeList)},watch:{"$route.params.typeCode":function(){this.initDataListCon(),this.isEditShow(this.authCodeList)},typeCode:function(){this.initDataListCon()},treeFilterText:function(t){t?this.$refs.staffTree.filter(t):this.initDataListCon()}},data:function(){return{buttonEditVisible:{isEditShow:!1,isTrainNumShow:!1},isShowLevel:!1,defaultExpandedKeys:[],treeFilterText:"",nodeListData:[],transStaffsTreeListData:[],tableStaffListData:[],defaultProps:{children:"children",label:"name"},storeData:{store:null,data:null},condition:{deptId:null,deptName:"",pageNo:1,pageSize:10,totalStaffNum:0,status:"NORMAL",condition:"",staffId:null},multipleSelection:[],dialogAddDeptFormVisible:!1,dialogEditFormVisible:!1,dialogTransFormVisible:!1,dialogDeleteFormVisible:!1,dialogFormData:{editName:"",editNodeId:"",nodeParentName:"",nodeParentId:"",type:"",level:""}}},components:{addDept:p.default,tableDataList:S.default,editDept:v.default,deleteDept:_.default,transDept:g.default},methods:{isEditShow:function(t){var e=this;t.forEach(function(t){(0,d.default)(this,e),-1!==this.staffAuthInfo.indexOf("ACCESS_STAFFWEB_ORG_EDITOR_"+String(t.authCode))?this.buttonEditVisible["isEditor"+String(t.authCode)]=!0:this.buttonEditVisible["isEditor"+String(t.authCode)]=!1}.bind(this)),this.authCodeList.forEach(function(t){(0,d.default)(this,e),t.code===this.$route.params.typeCode&&(this.buttonEditVisible.isEditShow=this.buttonEditVisible["isEditor"+String(t.authCode)])}.bind(this))},initDataListCon:function(){this.defaultExpandedKeys=[],this.nodeListData=[],this.tableStaffListData=[],this.isShowLevel=!1,this.getIsNeedShowLevel(),this.getTreeDataList()},getStaffs:function(t){this.$emit("getStaffs",t)},getIsNeedShowLevel:function(){var t=this,e=this.typeCode,n=this;c.default.getNeelShowLevelData().then(function(i){if((0,d.default)(this,t),0===i.code){var o=i.data||[];n.isShowLevel=-1!==o.indexOf(+e)}else n.$message.error(i.message)}.bind(this)).catch(function(){(0,d.default)(this,t),n.$message.error("服务器错误!")}.bind(this))},handleClosePop:function(t){t&&this[x[t]]&&(this[x[t]]=!1)},getTreeDataList:function(){var t=this,e=this.typeCode;c.default.getTreeDataList({typeCode:e}).then(function(e){if((0,d.default)(this,t),0===e.code){var n=e.data||{};this.nodeListData=[n],this.defaultExpandedKeys=[n.id||""],this.transStaffsTreeListData=[n],this.condition.deptId=n.id,this.condition.deptName=n.name,this.getTableDataByCondition(this.condition)}else this.$message.error(e.message)}.bind(this)).catch(function(){(0,d.default)(this,t),this.$message.error("服务器错误!")}.bind(this))},filterNode:function(t,e){return!t||-1!==e.name.indexOf(t)},initDialogData:function(t,e){var n=this;(0,s.default)(x).forEach(function(t){return(0,d.default)(this,n),this[x[t]]&&(this[x[t]]=!1)}.bind(this)),this.dialogFormData=(0,a.default)({},this.dialogFormData,t),e&&(this[x[e]]=!0)},handleTreeNode:function(t,e,n){var i=t.data,o=t.store,a=t.parent,r=e.id,s=e.parentId,l=e.name,d=e.level;this.initDialogData({editName:"",editNodeId:"",nodeParentName:"",nodeParentId:"",type:"",level:""}),this.storeData.store=o,this.storeData.data=i;var u={nodeParentId:s,editNodeId:r,level:d};"ADD"===n&&(u.nodeParentName=l),"EDIT"===n&&(u.editName=l,u.nodeParentName=a.data.name||l),"DELETE"===n&&(u.editName=l),"TRANS"===n&&(u.editName=l,u.nodeParentName=a.data.name||l),this.initDialogData(u,n)},deleteTreeData:function(){this.storeData.store.remove(this.storeData.data),this.getTableDataByCondition(this.condition)},addTreeData:function(t){this.storeData.store.append(t,this.storeData.data)},editTreeData:function(t){(0,a.default)(this.storeData.data,t),this.getTableDataByCondition(this.condition)},transTreeData:function(){this.getTreeDataList()},handleNodeClick:function(t,e,n){"my-custom-tree-node-name"===event.target.className&&(this.condition={deptId:t.id,deptName:t.name,pageNo:1,pageSize:10,totalStaffNum:0,status:"NORMAL",condition:""},this.getTableDataByCondition(this.condition))},getTableDataByCondition:function(t){var e=this,n=this.typeCode;t.pageNo||(t.pageNo=1),/-/.test(t.condition)||delete t.staffId,c.default.getStaffDataList({params:t,typeCode:n}).then(function(t){if((0,d.default)(this,e),0!==t.code&&t.message)return this.$message({message:t.message,type:"error"});var n=t;this.tableStaffListData=n.data&&n.data.list||[],this.condition.totalStaffNum=n.data&&n.data.totalSize;var i=[];if(this.tableStaffListData.length)for(var o=0,a=(this.tableStaffListData||[]).length;o<a;++o){var r=this.tableStaffListData[o];i.push(r.staffId);for(var s=[],l=0,u=(r.depts||[]).length;l<u;++l)l>=3||s.push(r.depts[l].name);r.deptsDes=s.join(","),(r.depts||[]).length>3&&(r.deptsDes+=" ...");var c=r.roles&&r.roles.split(" "),f="";f=c.join(","),r.roleViewNew=f}}.bind(this)).catch(function(t){(0,d.default)(this,e),t.message&&this.$message({message:t.message,type:"error"})}.bind(this))},renderContent:function(t,e){var n=this,i=e.node,o=e.data;e.store;return t("span",{class:"my-custom-tree-node"},[t("span",{class:"my-custom-tree-node-name"},[o.name]),t("el-button",{attrs:{size:"mini",icon:"el-icon-plus"},directives:[{name:"show",value:this.buttonEditVisible.isEditShow}],on:{click:function(){return(0,d.default)(this,n),this.handleTreeNode(i,o,"ADD")}.bind(this)}}),t("el-button",{attrs:{size:"mini",icon:"el-icon-edit"},directives:[{name:"show",value:1!==o.parentId&&this.buttonEditVisible.isEditShow}],on:{click:function(){return(0,d.default)(this,n),this.handleTreeNode(i,o,"EDIT")}.bind(this)}}),t("el-button",{attrs:{size:"mini",icon:"el-icon-share"},directives:[{name:"show",value:1!==o.parentId&&this.buttonEditVisible.isEditShow}],on:{click:function(){return(0,d.default)(this,n),this.handleTreeNode(i,o,"TRANS")}.bind(this)}}),t("el-button",{attrs:{size:"mini",icon:"el-icon-delete"},directives:[{name:"show",value:1!==o.parentId&&this.buttonEditVisible.isEditShow}],on:{click:function(){return(0,d.default)(this,n),this.handleTreeNode(i,o,"DELETE")}.bind(this)}}),t("span",{class:"treeRowDashedLine"}),t("span",{class:"lvName",directives:[{name:"show",value:o.levelName}],attrs:{size:"mini"}},[o.levelName])])}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=i(o),r=n(7),s=i(r);e.default={props:["formData","isShowLevel","typeCode"],data:function(){var t=this.formData,e=t.editNodeId,n=t.nodeParentName,i={editName:""};return this.isShowLevel&&(i.level=""),{deptLevel:[],btnLoading:!1,visible:!0,editNodeId:e,nodeParentName:n,dialogFormData:i,rules:{editName:[{required:!0,message:"请输入部门名称",trigger:"blur"},{min:1,max:20,message:"部门名称只能是20字以内的中文、字母和数字!",trigger:"blur"}]}}},created:function(){var t=this,e=this.typeCode,n=this;this.isShowLevel&&s.default.getDepartmentLevelInfo({typeCode:e,parentId:n.editNodeId,deptId:""}).then(function(e){(0,a.default)(this,t),0===e.code?n.deptLevel=e.data||[]:n.$message.error(e.message)}.bind(this)).catch(function(){(0,a.default)(this,t),n.$message.error("服务器错误!")}.bind(this))},methods:{handleClose:function(){this.visible=!1,this.$emit("closePop","ADD")},doAddDepts:function(){var t=this,e=this.typeCode,n=this;this.$refs.ruleForm.validate(function(i){if((0,a.default)(this,t),!i)return console.log("error submit!!"),!1;n.btnLoading=!0;var o=n.dialogFormData.editName,r={name:o,parentId:n.editNodeId};n.dialogFormData.hasOwnProperty("level")&&(r.level=n.dialogFormData.level||""),s.default.addDeptInfo({params:r,typeCode:e}).then(function(e){if((0,a.default)(this,t),n.btnLoading=!1,0===e.code){var i="",o=r.level||"";(n.deptLevel||[]).forEach(function(e){(0,a.default)(this,t),e.level===+o&&(i=e.levelName)}.bind(this));var s=e.data||{};e.data.levelName||(s.levelName=i),n.$emit("addTreeData",s),n.handleClose(),n.$message({type:"success",message:"添加成功!"})}else n.$message.error(e.message)}.bind(this)).catch(function(){(0,a.default)(this,t),n.btnLoading=!1,n.$message.error("服务器错误!")}.bind(this))}.bind(this))}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=i(o),r=n(7),s=i(r),l=n(41),d=i(l);e.default={props:["dialogAddStaffFormVisible","condition","typeCode"],data:function(){return{staffId:"",username:"",creating:!1,staffEmailList:[]}},components:{vkdAutoComplete:d.default},methods:{initUser:function(){this.staffId="",this.username=""},handleClose:function(){this.dialogAddStaffFormVisible.show=!1},doAddStaff:function(){var t=this,e=this.typeCode;if(!this.staffId)return void this.$message.error("请选择正确的员工");var n=this;this.creating=!0;var i={staffId:this.staffId,deptId:this.condition.deptId};s.default.addStaffInfo({params:i,typeCode:e}).then(function(e){(0,a.default)(this,t),n.creating=!1,0===e.code?(n.$message({type:"success",message:"添加成功!"}),n.handleClose(),n.$emit("clearMultipleSelection")):n.$message.error(e.message)}.bind(this)).catch(function(e){(0,a.default)(this,t),n.creating=!1,console.log(e),n.$message.error("服务器错误!")}.bind(this))},querySearchAsync:function(t,e){var n=this,i=this,o=i.typeCode;if(t){var r={email:t};s.default.queryEmailData({params:r,typeCode:o}).then(function(t){(0,a.default)(this,n);var i=[];t.data.forEach(function(t){i.push({value:t.name+"<"+t.email+">",selectId:t.id})}),e(i)}.bind(this)).catch(function(t){(0,a.default)(this,n),console.log(t),i.$message.error("服务器错误!")}.bind(this))}},handleSelect:function(t){this.username=t.value,this.staffId=t.selectId},cbSelect:function(t){this.staffId=t.staffId}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=i(o),r=n(7),s=i(r);e.default={name:"vkdAutoComplete",props:["val","typeCode","status","deptId","actionType","disabledStatus"],data:function(){return{state:this.val,timeout:null}},computed:{type:function(){var t=this.state&&this.state.toString().trim().toLocaleLowerCase(),e=/^r\d+$/,n=/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/,i=/^[1][0-9]{10}$/,o=/[\u4e00-\u9fa5]/g,a="username";return e.test(t)&&(a="jobNum"),n.test(t)&&(a="email"),i.test(t)&&(a="mobile"),o.test(t)&&(a="name"),a}},methods:{getContent:function(t){var e=t[this.type];return(!e||e&&"name"===this.type)&&(e=t.username),String(t.name)+" <"+String(e)+">"},handleSelect:function(t){this.state=String(t.name)+"-"+String("name"!==this.type?t[this.type]||t.username:t.username),this.$emit("cbSelect",t)},querySearchAsync:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments[1],i=e.toString().trim();if(i){var o={keyWords:i,fields:this.type,status:this.status||"",typeCode:this.typeCode||"",deptId:this.deptId||"",size:10};"addStaffAuto"===this.actionType&&delete o.typeCode,"editStaffAuto"===this.actionType&&delete o.deptId,s.default.findStaffByKeyWords(o).then(function(e){if((0,a.default)(this,t),0===e.code){var i=e.data||[];n(i)}else this.$message.error(e.message)}.bind(this)).catch(function(e){(0,a.default)(this,t),console.log(e),this.$message.error("服务器错误!")}.bind(this))}}},watch:{state:function(t){this.$emit("update:val",t)},val:function(t){this.state=t}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(59),a=i(o),r=n(0),s=i(r),l=n(7),d=i(l);e.default={name:"importTrainNumber",data:function(){return{dialogVisible:!1,fileList:[],maxFileNum:1,butStatus:!1,url:d.default.getUploadTrainNum()}},computed:{},methods:{handleExport:function(){var t=this;this.windowOpenBlank("http://cardinfo-file.vipkid.com.cn/staffweb/file/cc-train-template.xlsx"),setTimeout(function(){(0,s.default)(this,t),this.dialogVisible=!1}.bind(this))},windowOpenBlank:function(t,e){if("_blank"===e){window.open("","").location.href=t}else window.open(t)},handleImport:function(){this.initUpload(),this.dialogVisible=!0},initUpload:function(){this.fileList=[],this.butStatus=!1},handleClose:function(t){t()},submitUpload:function(){this.$refs.upload.submit()},resetUpload:function(){this.$refs.upload.clearFiles(),this.initUpload()},beforeAvatarUpload:function(t){var e=t.name&&t.name.split(".");return"xls"===e[1]||"xlsx"===e[1]?t:(this.$message.error("上传文件只能是 xls/xlsx 格式!"),!1)},handleRemove:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.butStatus=!!+JSON.parse((0,a.default)(e)).length,t},handleChange:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.name||"",i=["xls","xlsx"],o=-1!==i.indexOf(n.split(".").slice(-1)[0]);o||this.$message.warning("请上传excel文件");var r=t.size/1024/1024<2;return r||this.$message.warning("上传文件大小不能超过2MB!"),!(!o||!r)&&(this.butStatus=!!+JSON.parse((0,a.default)(e)).length,t)},handleSuccess:function(t,e,n){if(0===t.code){var i=t.data||[];if(i.length){var o=i.join(", ");this.$message.success("除了工号为 "+String(o)+" 其它的都上传成功!")}else this.$message.success("上传成功!");this.dialogVisible=!1,this.$emit("importCb")}else this.$message({message:t.message,type:"error"})},handleError:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$message.error(t.message)},handlePreview:function(t){}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"trainNumInput",props:{dataObj:{type:Object}},data:function(){var t=this.dataObj.rowData||{};return{currentData:t,initTrainNum:t.trainNum||"",maxNum:50}},methods:{handleEditTrainNum:function(t){this.$emit("handleEditTrainNum",t)},handleSaveTrainNum:function(t){new RegExp("^[一-龥-a-zA-Z0-9]{0,"+String(this.maxNum)+"}$").test(t.trainNum)?this.$emit("handleSaveTrainNum",t):this.$message.warning("期数格式:支持英文字符,-,数字,中文字符,最多填写 "+String(this.maxNum)+" 字符的长度")},handleUndoTrainNum:function(t){this.$emit("handleEditTrainNum",t,"undo")}},computed:{status:function(){return this.currentData.isEditStatus},butStatus:function(){var t=this.currentData.trainNum||"",e=(t.trim()||"").length;return e>0&&e<this.maxNum&&t!==this.initTrainNum}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"treeNode",props:{node:{type:Object,defautl:{}},treeProps:{},multiple:{},currentNodeId:{},eventHub:{},query:{type:String},isQuering:{type:Boolean}},data:function(){return{}},methods:{handleClick:function(t,e){var n=e.target.getAttribute("class");t.expanded?this.$set(t,"expanded",!1):this.$set(t,"expanded",!0),n.indexOf("icon")>-1||this.eventHub.$emit("node-click",t,e)},handleTitleVisible:function(t){return(t.replace(/[^\x00-\xff]/g,"..")||[]).length>28?t:""}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=i(o),r=n(61),s=i(r),l=n(44),d=i(l),u=n(42),c=n(149),f=i(c),p=n(82),h=i(p),v=n(144),m=i(v),g=n(84);d.default.component(u.Scrollbar.name,u.Scrollbar),d.default.component(u.Tag.name,u.Tag),e.default={name:"tree",components:{treeNode:f.default},props:{treeData:{type:Array,default:[]},treeProps:{type:Object,default:{label:"label",children:"children"}},placeholder:{type:String,default:"请选择"},value:{},multiple:{type:Boolean}},created:function(){this.eventHub.$on("node-click",this.handleNodeClick),this.setDefaultValue()},updated:function(){this.isDefault=!0},computed:{showCloseIcon:function(){return this.hovering&&void 0!==this.value&&""!==this.value&&!this.multiple}},watch:{value:function(t){this.isDefault&&this.setDefaultValue()},treeData:function(t){if(t){var e;this.treeNodes=(e={},(0,s.default)(e,this.treeProps.children,(0,g.objArrDeepCopy)(t,{visible:!0})),(0,s.default)(e,"visible",!0),e),this.isDefault&&this.setDefaultValue()}},checkedKeys:function(t){this.placetext=(t||"").length?"":this.placeholder,this.multiple&&(setTimeout(function(){this.resetTreeTop()}.bind(this),400),this.isDefault||this.setInputFocus())}},data:function(){var t;return{treeNodes:(t={},(0,s.default)(t,this.treeProps.children,(0,g.objArrDeepCopy)(this.treeData,{visible:!0})),(0,s.default)(t,"visible",!0),t),placetext:this.placeholder,currentNodeId:"",currentSelected:"",treeSelected:"",treeVisible:!1,eventHub:new d.default,isQuering:!1,query:"",checkedItems:[],checkedKeys:[],isDefault:!0,error:{message:"",data:""},hovering:!1}},methods:{resetValue:function(){this.multiple?(this.checkedItems=[],this.checkedKeys=[],this.$emit("setSelectedId",[])):(this.treeSelected="",this.currentNodeId="",this.$emit("setSelectedId",""))},handleCloseTree:function(t){this.showCloseIcon?this.resetValue():(this.treeVisible=void 0!==t&&t,this.multiple&&(this.treeSelected="",this.handleFilter(),t&&this.setInputFocus()))},handleNodeClick:function(t,e){e&&(this.isDefault=!1),this.multiple?this.hasSameItem(this.checkedItems,t)?this.handleDelItem(t,e):(this.handleAddItem(t),this.$emit("setSelectedId",this.checkedKeys)):(this.currentNodeId=t.id,this.treeSelected=t[this.treeProps.label],this.currentSelected=this.treeSelected,this.$emit("setSelectedId",t.id))},setDefaultValue:function(){this.multiple?this.setCheckedKeys(this.value):this.setSelected(this.value)},setSelected:function(t){var e=this,n=e.treeNodes;e.resetValue(),e.findTreeItem(t,n),this.currentNodeId||this.setErrorMessage(t)},setCheckedKeys:function(t){var e=this,n=this.treeNodes;this.resetValue(),t.forEach(function(t){e.findTreeItem(t,n)}),this.getNotExistedItem(t,this.checkedKeys)},findTreeItem:function(t,e){for(var n=this,i=e[n.treeProps.children]||[],o=0;o<i.length;o++){if(i[o].id===t){n.multiple?n.handleAddItem(i[o]):n.handleNodeClick(i[o]);break}n.findTreeItem(t,i[o])}},handleFilter:(0,m.default)(1e3,function(){this.isQuering=!0,this.isQuering&&(this.query=this.treeSelected,this.treeFilterMethod(this.treeNodes))}),treeFilterMethod:function(t){var e=this,n=this,i=t[n.treeProps.children]||[];if(i.length&&i.forEach(function(t){(0,a.default)(this,e),t.visible=t[n.treeProps.label].toLowerCase().indexOf(n.query.toLowerCase())>-1,n.treeFilterMethod(t)}.bind(this)),!t.visible&&i.length){var o=!0;i.forEach(function(t){(0,a.default)(this,e),t.visible&&(o=!1)}.bind(this)),t.visible=!1===o}t.visible&&(this.$set(t,"expanded",!0),""===n.query&&(t.expanded=!1))},handleAutoComplete:function(){setTimeout(function(){this.query="",this.currentNodeId?this.treeSelected=this.currentSelected:this.multiple||(this.treeSelected="",this.handleFilter()),this.isQuery&&(this.treeVisible=!1),this.isQuery=!1}.bind(this),250)},handleAddItem:function(t){this.checkedItems.push(t),this.checkedKeys.push(t.id),this.$set(t,"checked",!0)},handleDelItem:function(t,e){e&&(this.isDefault=!1),this.checkedKeys.splice(this.checkedKeys.indexOf(t.id),1),this.checkedItems.splice(this.checkedItems.indexOf(t),1),this.$set(t,"checked",!1),this.$emit("setSelectedId",this.checkedKeys)},hasSameItem:function(t,e){return t.indexOf(e)>-1},getNotExistedItem:function(t,e){var n=this,i=[];t.forEach(function(t){(0,a.default)(this,n),e.indexOf(t)>-1||i.push(t)}.bind(this)),this.setErrorMessage(i)},setErrorMessage:function(t){if(t&&t.toString()){var e=t instanceof Array?t.toString():t;this.error.message="发现不存在的部门id:"+e,this.error.data=t,this.$emit("errorCallback",this.error)}},resetTreeTop:function(){this.$nextTick(function(){var t=this.$refs.atsTree.querySelector(".ats-input-multiple"),e=this.$refs.atsTree.querySelector(".ats-tree-scrollbar"),n=t.offsetHeight;e.style.top=n+5+"px"})},setInputFocus:function(){this.$refs.multipleInput.focus()},handleTitleVisible:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!t)return"";for(var e=0,n=0;n<t.length;n++)t.charCodeAt(n)>255?e+=2:e+=1;return e>=15?t:""}},filters:{showEllips:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!t)return"";for(var e=0,n=0;n<t.length;n++)if(t.charCodeAt(n)>255?e+=2:e+=1,e>=15){t=t.substring(0,n)+"...";break}return t}},directives:{Clickoutside:h.default}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=i(o),r=n(7),s=i(r);e.default={props:["dialogFormData","typeCode"],data:function(){return{btnLoading:!1,visible:!0}},methods:{handleClose:function(){this.visible=!1,this.$emit("closePop","DELETE")},doDeleteDepts:function(){var t=this,e=this.typeCode;this.btnLoading=!0,s.default.deleteDeptInfo({params:{deptId:this.dialogFormData.editNodeId},typeCode:e}).then(function(e){(0,a.default)(this,t),this.btnLoading=!1,0===e.code?(this.$emit("deleteTreeData"),this.handleClose(),this.$message({type:"success",message:"删除成功!"})):this.$message.error(e.message)}.bind(this)).catch(function(){(0,a.default)(this,t),this.btnLoading=!1,this.$message.error("服务器错误!")}.bind(this))}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=i(o),r=n(7),s=i(r),l=n(41),d=i(l);e.default={props:["formData","isShowLevel","typeCode"],components:{vkdAutoComplete:d.default},data:function(){var t=this.formData,e=t.editNodeId,n=t.nodeParentId,i=t.nodeParentName,o=t.editName,a=t.level,r={editName:o,manager:"",hrDeptId:""};return this.isShowLevel&&(r.level=a||""),{deptLevel:[],btnLoading:!1,visible:!0,editNodeId:e,managerId:"",nodeParentId:n,nodeParentName:i,treeProps:{label:"name",children:"children"},dialogFormData:r,rules:{editName:[{required:!0,message:"请输入活动名称",trigger:"blur"},{min:1,max:20,message:"部门名称只能是20字以内的中文、字母和数字!",trigger:"blur"}]}}},created:function(){var t=this,e=this.typeCode,n=this;this.isShowLevel&&s.default.getDepartmentLevelInfo({typeCode:e,parentId:n.nodeParentId,deptId:n.editNodeId}).then(function(e){(0,a.default)(this,t),0===e.code?n.deptLevel=e.data||[]:n.$message.error(e.message)}.bind(this)).catch(function(){(0,a.default)(this,t),n.$message.error("服务器错误!")}.bind(this)),s.default.getDeptInfo({deptId:n.editNodeId,typeCode:e}).then(function(e){if((0,a.default)(this,t),0===e.code){var i=e.data||{},o=i.managerInfo;o&&(this.dialogFormData.manager=o.name||"",this.managerId=o.staffId||""),i.hrDeptId&&(this.dialogFormData.hrDeptId=i.hrDeptId)}else n.$message.error(e.message)}.bind(this)).catch(function(){(0,a.default)(this,t),n.$message.error("服务器错误!")}.bind(this))},methods:{handleClose:function(){this.visible=!1,this.$emit("closePop","EDIT")},doEditDepts:function(){var t=this,e=this.typeCode,n=this;this.$refs.ruleForm.validate(function(i){if((0,a.default)(this,t),!i)return console.log("error submit!!"),!1;n.btnLoading=!0;var o=n.dialogFormData.editName,r={name:o,deptId:n.editNodeId,managerId:n.managerId};n.dialogFormData.manager||(r.managerId=""),n.dialogFormData.hasOwnProperty("level")&&(r.level=n.dialogFormData.level||""),s.default.editDeptInfo({params:r,typeCode:e}).then(function(e){if((0,a.default)(this,t),n.btnLoading=!1,0===e.code){var i="",s=r.level||"";(n.deptLevel||[]).forEach(function(e){(0,a.default)(this,t),e.level===+s&&(i=e.levelName)}.bind(this));var l={level:s,levelName:i,name:o};n.$emit("editTreeData",l),n.handleClose(),n.$message({type:"success",message:"更新成功!"})}else n.$message.error(e.message)}.bind(this)).catch(function(){(0,a.default)(this,t),n.btnLoading=!1,n.$message.error("服务器错误!")}.bind(this))}.bind(this))},cbSelect:function(t){this.managerId=t.staffId}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(58),a=i(o),r=n(60),s=i(r),l=n(0),d=i(l),u=n(43),c=(i(u),n(7)),f=i(c),p=n(146),h=i(p),v=n(155),m=i(v),g=n(182),b=i(g),_=n(148),y=i(_),S=n(147),x=i(S),w=n(41),C=i(w);e.default={props:["condition","tableStaffListData","transStaffsTreeListData","typeCode","leads","staffAuthInfo","authCodeList","buttonEditVisible"],watch:{"condition.condition":function(){this.doSearch()},tableStaffListData:function(t,e){this.ifshowLocked?this.staffShowList=this.tableStaffListData:(this.staffShowList=[],this.tableStaffListData.forEach(function(t){"NORMAL"===t.status&&this.staffShowList.push(t)}))}},beforeCreate:function(){var t=this;f.default.getTrainNumConfig().then(function(e){(0,d.default)(this,t),0===e.code?this.showTrainNumList=e.data||[]:this.$message.error(e.message)}.bind(this)).catch(function(e){(0,d.default)(this,t),this.$message.error(e.message)}.bind(this))},computed:{isShowTrainNum:function(){return-1!==this.showTrainNumList.indexOf(+this.typeCode)},allRoleShow:function(){var t=this;return function(e){return e.length<76?e:e.length>=76?t.isShowAllRole?e:e.substring(0,76):void 0}}},data:function(){var t="";try{t=b.default.getEntity().id}catch(e){t=JSON.parse(localStorage.getItem("userInfo")).id}return{isShowAllRole:!1,multipleSelection:[],dialogAddStaffFormVisible:{show:!1},dialogTransStaffFormVisible:{show:!1},staffId:t,staffInfo:null,ifshowLocked:!0,staffShowList:[],showTrainNumList:[]}},components:{addStaff:h.default,transStaffs:m.default,trainNumInput:y.default,importTrainNumber:x.default,vkdAutoComplete:C.default},methods:{roleShowSwitch:function(){this.isShowAllRole?this.isShowAllRole=!1:this.isShowAllRole=!0},cbSelect:function(t){this.condition.staffId=t.staffId},handleImportCb:function(){this.$emit("getTableDataByCondition",this.condition)},doSearch:function(){this.condition.pageNo=1,this.$emit("getTableDataByCondition",this.condition)},doReset:function(){(0,s.default)(this.condition,{pageNo:1,status:"",condition:"",staffId:null}),this.$emit("getTableDataByCondition",this.condition)},handleSelectionChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.multipleSelection=t},handleCurrentChange:function(){this.$emit("getTableDataByCondition",this.condition)},handleConfirm:function(){if(!this.multipleSelection.length)return void this.$message.error("请选择员工");this.$emit("handleGetStaffs",this.multipleSelection)},delStaff:function(){var t=this,e=this.typeCode;if(!this.multipleSelection.length)return void this.$message.error("请选择要删除的员工");var n=!1;this.$confirm("确定将勾选的人员从组织架构中删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){if((0,d.default)(this,t),!n){n=!0;var i=[];this.multipleSelection.forEach(function(t){i.push(t.staffId)});var o={staffIds:i.join(",")};f.default.deleteStaffInfo({params:o,typeCode:e}).then(function(e){(0,d.default)(this,t),n=!1,0===e.code?(this.$message({type:"success",message:"删除成功!"}),this.$emit("getTableDataByCondition",this.condition)):this.$message.error(e.message)}.bind(this)).catch(function(e){(0,d.default)(this,t),n=!1,console.log(e),this.$message.error("服务器错误!")}.bind(this))}}.bind(this)).catch(function(){(0,d.default)(this,t),this.$message({type:"info",message:"已取消删除"})}.bind(this))},addStaffShow:function(){this.dialogAddStaffFormVisible.show=!0},staffTransShow:function(){if(this.multipleSelection.length){var t=!0,e=!1,n=void 0;try{for(var i,o=(0,a.default)(this.multipleSelection);!(t=(i=o.next()).done);t=!0){if("LOCKED"===i.value.status)return void this.$message.error("请勿迁移离职员工")}}catch(t){e=!0,n=t}finally{try{!t&&o.return&&o.return()}finally{if(e)throw n}}this.dialogTransStaffFormVisible.show=!0}else this.$message.error("请选择要迁移的员工")},clearMultipleSelection:function(){this.$emit("getTableDataByCondition",this.condition)},filterStaffShowList:function(){if(this.ifshowLocked)this.staffShowList=this.tableStaffListData;else{this.staffShowList=[];var t=!0,e=!1,n=void 0;try{for(var i,o=(0,a.default)(this.tableStaffListData);!(t=(i=o.next()).done);t=!0){var r=i.value;"NORMAL"===r.status&&this.staffShowList.push(r)}}catch(t){e=!0,n=t}finally{try{!t&&o.return&&o.return()}finally{if(e)throw n}}}},tableRowClassName:function(t,e){return"LOCKED"===t.status?"lock-row":""},querySearchAsync:function(t,e){var n=this,i=this.typeCode;if(t){var o="";o=/^[\u4E00-\u9FA5]+$/.test(t)?"name":parseInt(t)?"mobile":"username";var a={keyWords:t,fields:o,status:this.condition.status,size:10};f.default.getVagueData({params:a,typeCode:i}).then(function(t){(0,d.default)(this,n);var i=[];t.data.forEach(function(t){"mobile"===o?i.push({value:t.name+"<"+t.mobile+">",selectValue:t.mobile}):i.push({value:t.name+"<"+t.username+">",selectValue:t.username})}),e(i)}.bind(this)).catch(function(t){(0,d.default)(this,n),console.log(t),this.$message.error("服务器错误!")}.bind(this))}},handleSelect:function(t){this.condition.condition=t.selectValue},handleEditTrainNum:function(t,e){var n=this;this.staffShowList=(this.staffShowList||[]).map(function(i){return(0,d.default)(this,n),i.isEditStatus="undo"!==e&&i.staffId===t.staffId,i}.bind(this))},restTrainNum:function(){var t=this;this.staffShowList=(this.staffShowList||[]).map(function(e){return(0,d.default)(this,t),e.isEditStatus=!1,e}.bind(this))},handleSaveTrainNum:function(t){var e=this,n={staffId:t.staffId,trainNum:t.trainNum};f.default.updateTrainNum(n).then(function(n){(0,d.default)(this,e),0===n.code?(this.$message({type:"success",message:"更改成功!"}),this.staffShowList=(this.staffShowList||[]).map(function(n){return(0,d.default)(this,e),n.staffId===t.staffId&&(n.trainNum=t.trainNum,n.isEditStatus=!1),n}.bind(this))):(this.restTrainNum(),this.$message.error(n.message))}.bind(this)).catch(function(t){(0,d.default)(this,e),console.log(t),this.$message.error("服务器错误!")}.bind(this))}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=i(o),r=n(59),s=i(r),l=n(43),d=i(l),u=n(7),c=i(u),f=n(150),p=i(f),h=n(42);e.default={props:["formData","data","typeCode"],data:function(){var t=this.formData,e=t.editNodeId,n=t.nodeParentId;return{btnLoading:!1,visible:!0,treeData:JSON.parse((0,s.default)(this.data)),editNodeId:e,nodeParentId:n,treeProps:{label:"name",children:"children"},dialogFormData:{selectorLevelId:+n||""}}},components:{treeSelect:p.default},computed:{btnCurrentStatus:function(){return!this.dialogFormData.selectorLevelId||+this.dialogFormData.selectorLevelId==+this.nodeParentId}},methods:{handleOkStatus:function(){var t=this,e=this,n=this.editNodeId,i=this.typeCode,o=d.default.get(this.dialogFormData,"selectorLevelId");if(!o)return void e.$message.error("请选择上级部门!");e.btnLoading=!0,c.default.transDeptInfo({params:{deptId:n,targetDeptId:o},typeCode:i}).then(function(n){(0,a.default)(this,t),e.btnLoading=!1,0===n.code?(e.$emit("transTreeData"),e.handleClose(),e.$message({type:"success",message:"更改部门成功!"})):e.$message.error(n.message)}.bind(this)).catch(function(){(0,a.default)(this,t),e.btnLoading=!1,e.$message.error("服务器错误!")}.bind(this))},setSelectedId:function(t){this.dialogFormData.selectorLevelId=t},showTreeError:function(t){h.Message.info(t.message)},handleClose:function(){this.visible=!1,this.$emit("closePop","TRANS")}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(58),a=i(o),r=n(0),s=i(r),l=n(7),d=i(l);e.default={props:["dialogTransStaffFormVisible","list","deptId","typeCode","transStaffsTreeListData"],data:function(){return{creating:!1,defaultProps:{children:"children",label:"name"}}},methods:{handleClose:function(){this.dialogTransStaffFormVisible.show=!1},handleNodeClick:function(t,e){var n=t.id;e&&this.$refs.staffTree.setCheckedKeys([n],!1,!1)},doTransStaffs:function(){var t=this,e=this,n=this.typeCode,i=this.$refs.staffTree.getCheckedKeys();if(!i.length)return this.dialogTransStaffFormVisible.show=!1,void this.$message.error("请选择要迁移的组!");var o=[],r=!0,l=!1,u=void 0;try{for(var c,f=(0,a.default)(this.list);!(r=(c=f.next()).done);r=!0){var p=c.value;o.push(p.staffId)}}catch(t){l=!0,u=t}finally{try{!r&&f.return&&f.return()}finally{if(l)throw u}}var h={deptId:i[0],staffIds:o};this.creating=!0,d.default.transStaffInfo({params:h,typeCode:n}).then(function(n){(0,s.default)(this,t),e.creating=!1,n.code?e.$message.error(n.message):(e.dialogTransStaffFormVisible.show=!1,e.$refs.staffTree.setCheckedKeys([]),e.$emit("clearMultipleSelection"),e.$message({message:"操作成功(非兼任员工可以迁移,兼任员工不可迁移)",type:"warning"}))}.bind(this)).catch(function(){(0,s.default)(this,t),e.creating=!1,e.$message.error("服务器错误!")}.bind(this))}}}},function(t,e,n){t.exports={default:n(90),__esModule:!0}},function(t,e,n){t.exports={default:n(91),__esModule:!0}},function(t,e,n){t.exports={default:n(92),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var i=n(85),o=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=function(t,e,n){return e in t?(0,o.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(89),a=i(o),r=n(88),s=i(r),l="function"==typeof s.default&&"symbol"==typeof a.default?function(t){return typeof t}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":typeof t};e.default="function"==typeof s.default&&"symbol"===l(a.default)?function(t){return void 0===t?"undefined":l(t)}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":void 0===t?"undefined":l(t)}},function(t,e,n){var i=n(17),o=n(3)("toStringTag"),a="Arguments"==i(function(){return arguments}()),r=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=r(e=Object(t),o))?n:a?i(e):"Object"==(s=i(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var i=n(2).document;t.exports=i&&i.documentElement},function(t,e,n){t.exports=!n(9)&&!n(15)(function(){return 7!=Object.defineProperty(n(28)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(17);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){"use strict";var i=n(22),o=n(10),a=n(73),r=n(13),s=n(18),l=n(107),d=n(25),u=n(116),c=n(3)("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,h,v,m,g){l(n,e,h);var b,_,y,S=function(t){if(!f&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",w="values"==v,C=!1,E=t.prototype,T=E[c]||E["@@iterator"]||v&&E[v],D=T||S(v),N=v?w?S("entries"):D:void 0,I="Array"==e?E.entries||T:T;if(I&&(y=u(I.call(new t)))!==Object.prototype&&y.next&&(d(y,x,!0),i||"function"==typeof y[c]||r(y,c,p)),w&&T&&"values"!==T.name&&(C=!0,D=function(){return T.call(this)}),i&&!g||!f&&!C&&E[c]||r(E,c,D),s[e]=D,s[x]=p,v)if(b={values:w?D:S("values"),keys:m?D:S("keys"),entries:N},g)for(_ in b)_ in E||a(E,_,b[_]);else o(o.P+o.F*(f||C),e,b);return b}},function(t,e,n){var i=n(8),o=n(113),a=n(29),r=n(32)("IE_PROTO"),s=function(){},l=function(){var t,e=n(28)("iframe"),i=a.length;for(e.style.display="none",n(64).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;i--;)delete l.prototype[a[i]];return l()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=i(t),n=new s,s.prototype=null,n[r]=t):n=l(),void 0===e?n:o(n,e)}},function(t,e,n){var i=n(70),o=n(29).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},function(t,e,n){var i=n(12),o=n(16),a=n(100)(!1),r=n(32)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),l=0,d=[];for(n in s)n!=r&&i(s,n)&&d.push(n);for(;e.length>l;)i(s,n=e[l++])&&(~a(d,n)||d.push(n));return d}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var i=n(8),o=n(14),a=n(30);t.exports=function(t,e){if(i(t),o(e)&&e.constructor===t)return e;var n=a.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){t.exports=n(13)},function(t,e,n){var i=n(8),o=n(20),a=n(3)("species");t.exports=function(t,e){var n,r=i(t).constructor;return void 0===r||void 0==(n=i(r)[a])?e:o(n)}}