You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
4.8 KiB
1 line
4.8 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f1b46b8c"],{"47fd":function(e,t,n){"use strict";n("da26")},"88bc":function(e,t,n){(function(t){var n=1/0,r=9007199254740991,a="[object Arguments]",i="[object Function]",c="[object GeneratorFunction]",s="[object Symbol]",o="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,u=o||l||Function("return this")();function d(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function h(e,t){var n=-1,r=e?e.length:0,a=Array(r);while(++n<r)a[n]=t(e[n],n,e);return a}function f(e,t){var n=-1,r=t.length,a=e.length;while(++n<r)e[a+n]=t[n];return e}var p=Object.prototype,m=p.hasOwnProperty,b=p.toString,y=u.Symbol,v=p.propertyIsEnumerable,k=y?y.isConcatSpreadable:void 0,g=Math.max;function w(e,t,n,r,a){var i=-1,c=e.length;n||(n=I),a||(a=[]);while(++i<c){var s=e[i];t>0&&n(s)?t>1?w(s,t-1,n,r,a):f(a,s):r||(a[a.length]=s)}return a}function L(e,t){return e=Object(e),j(e,t,(function(t,n){return n in e}))}function j(e,t,n){var r=-1,a=t.length,i={};while(++r<a){var c=t[r],s=e[c];n(s,c)&&(i[c]=s)}return i}function x(e,t){return t=g(void 0===t?e.length-1:t,0),function(){var n=arguments,r=-1,a=g(n.length-t,0),i=Array(a);while(++r<a)i[r]=n[t+r];r=-1;var c=Array(t+1);while(++r<t)c[r]=n[r];return c[t]=i,d(e,this,c)}}function I(e){return O(e)||K(e)||!!(k&&e&&e[k])}function C(e){if("string"==typeof e||E(e))return e;var t=e+"";return"0"==t&&1/e==-n?"-0":t}function K(e){return S(e)&&m.call(e,"callee")&&(!v.call(e,"callee")||b.call(e)==a)}var O=Array.isArray;function F(e){return null!=e&&A(e.length)&&!T(e)}function S(e){return D(e)&&F(e)}function T(e){var t=$(e)?b.call(e):"";return t==i||t==c}function A(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function $(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function D(e){return!!e&&"object"==typeof e}function E(e){return"symbol"==typeof e||D(e)&&b.call(e)==s}var W=x((function(e,t){return null==e?{}:L(e,h(w(t,1),C))}));e.exports=W}).call(this,n("c8ba"))},c63e:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-modal",{attrs:{width:e.modalWidth,visible:e.visible,title:"部门搜索",confirmLoading:e.confirmLoading,cancelText:"关闭",wrapClassName:"ant-modal-cust-warp"},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[[n("a-form",{attrs:{form:e.form}},[n("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"上级部门"}},[n("a-tree",{attrs:{multiple:"",treeCheckable:"tree",checkable:"",expandedKeys:e.expandedKeysss,checkedKeys:e.checkedKeys,allowClear:"true",checkStrictly:!0,dropdownStyle:{maxHeight:"200px",overflow:"auto"},treeData:e.departTree,placeholder:"请选择上级部门"},on:{expand:e.onExpand,check:e.onCheck}})],1)],1)]],2)},a=[],i=n("88bc"),c=n.n(i),s=n("0fea"),o=n("4ec3"),l={name:"DepartWindow",components:{},data:function(){return{checkedKeys:[],expandedKeysss:[],userId:"",model:{},userDepartModel:{userId:"",departIdList:[]},departList:[],modalWidth:400,departTree:[],title:"操作",visible:!1,labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,headers:{},form:this.$form.createForm(this),url:{userId:"/sys/user/generateUserId"}}},methods:{add:function(e,t){this.checkedKeys=e,this.userId=t,this.edit({})},edit:function(e){var t=this;this.departList=[],this.queryDepartTree(),this.form.resetFields(),this.visible=!0,this.model=Object.assign({},e);var n=c()(this.model,"id","userId","departIdList");this.$nextTick((function(){t.form.setFieldsValue(n)}))},close:function(){this.$emit("close"),this.visible=!1,this.departList=[],this.checkedKeys=[]},handleSubmit:function(){var e=this,t=this;this.form.validateFields((function(n){if(!n)if(t.confirmLoading=!0,null==e.userId)Object(s["c"])(e.url.userId).then((function(n){if(n.success){var r={userId:n.result,departIdList:e.departList};t.$emit("ok",r)}})).finally((function(){t.departList=[],t.confirmLoading=!1,t.close()}));else{var r={userId:e.userId,departIdList:e.departList};t.departList=[],t.$emit("ok",r),t.confirmLoading=!1,t.close()}}))},handleCancel:function(){this.close()},onCheck:function(e,t){this.departList=[],this.checkedKeys=e.checked;for(var n=t.checkedNodes,r=0;r<n.length;r++){var a=n[r].data.props,i={key:"",value:"",title:""};i.key=a.value,i.value=a.value,i.title=a.title,this.departList.push(i)}},queryDepartTree:function(){var e=this;Object(o["G"])().then((function(t){if(t.success&&(e.departTree=t.result,e.checkedKeys&&e.checkedKeys.length>0)){var n=[],r=t.result;r&&r.length>0&&(r.forEach((function(e){n.push(e.key)})),e.expandedKeysss=n)}}))},onExpand:function(e){this.expandedKeysss=e},modalFormOk:function(){}}},u=l,d=(n("47fd"),n("2877")),h=Object(d["a"])(u,r,a,!1,null,"56367c89",null);t["default"]=h.exports},da26:function(e,t,n){}}]); |