1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-34cacdd2","chunk-2d0df437"],{"88bc":function(e,t,r){(function(t){var r=1/0,a=9007199254740991,n="[object Arguments]",o="[object Function]",l="[object GeneratorFunction]",i="[object Symbol]",s="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")();function d(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function f(e,t){var r=-1,a=e?e.length:0,n=Array(a);while(++r<a)n[r]=t(e[r],r,e);return n}function m(e,t){var r=-1,a=t.length,n=e.length;while(++r<a)e[n+r]=t[r];return e}var p=Object.prototype,h=p.hasOwnProperty,b=p.toString,v=u.Symbol,g=p.propertyIsEnumerable,w=v?v.isConcatSpreadable:void 0,y=Math.max;function C(e,t,r,a,n){var o=-1,l=e.length;r||(r=R),n||(n=[]);while(++o<l){var i=e[o];t>0&&r(i)?t>1?C(i,t-1,r,a,n):m(n,i):a||(n[n.length]=i)}return n}function j(e,t){return e=Object(e),O(e,t,(function(t,r){return r in e}))}function O(e,t,r){var a=-1,n=t.length,o={};while(++a<n){var l=t[a],i=e[l];r(i,l)&&(o[l]=i)}return o}function x(e,t){return t=y(void 0===t?e.length-1:t,0),function(){var r=arguments,a=-1,n=y(r.length-t,0),o=Array(n);while(++a<n)o[a]=r[t+a];a=-1;var l=Array(t+1);while(++a<t)l[a]=r[a];return l[t]=o,d(e,this,l)}}function R(e){return F(e)||k(e)||!!(w&&e&&e[w])}function N(e){if("string"==typeof e||D(e))return e;var t=e+"";return"0"==t&&1/e==-r?"-0":t}function k(e){return L(e)&&h.call(e,"callee")&&(!g.call(e,"callee")||b.call(e)==n)}var F=Array.isArray;function A(e){return null!=e&&I(e.length)&&!$(e)}function L(e){return _(e)&&A(e)}function $(e){var t=S(e)?b.call(e):"";return t==o||t==l}function I(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function S(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _(e){return!!e&&"object"==typeof e}function D(e){return"symbol"==typeof e||_(e)&&b.call(e)==i}var q=x((function(e,t){return null==e?{}:j(e,f(C(t,1),N))}));e.exports=q}).call(this,r("c8ba"))},a119:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:800,visible:e.visible,confirmLoading:e.confirmLoading,cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"部门角色名称"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["roleName",e.validatorRules.roleName],expression:"['roleName', validatorRules.roleName]"}],attrs:{placeholder:"请输入部门角色名称"}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"部门角色编码"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["roleCode",e.validatorRules.roleCode],expression:"['roleCode', validatorRules.roleCode]"}],attrs:{placeholder:"请输入部门角色编码"}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"描述"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["description",e.validatorRules.description],expression:"['description', validatorRules.description]"}],attrs:{placeholder:"请输入描述"}})],1)],1)],1)],1)},n=[],o=r("0fea"),l=r("88bc"),i=r.n(l),s=r("4ec3"),c={name:"SysDepartRoleModal",data:function(){return{title:"操作",visible:!1,model:{},labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,form:this.$form.createForm(this),validatorRules:{roleName:{rules:[{required:!0,message:"请输入部门角色名称!"},{min:2,max:30,message:"长度在 2 到 30 个字符",trigger:"blur"}]},roleCode:{rules:[{required:!0,message:"请输入部门角色编码!"},{min:0,max:64,message:"长度不超过 64 个字符",trigger:"blur"},{validator:this.validateRoleCode}]},description:{rules:[{min:0,max:126,message:"长度不超过 126 个字符",trigger:"blur"}]}},url:{add:"/sys/sysDepartRole/add",edit:"/sys/sysDepartRole/edit"}}},created:function(){},methods:{add:function(e){this.edit({},e)},edit:function(e,t){var r=this;this.departId=t,this.form.resetFields(),this.model=Object.assign({},e),this.visible=!0,this.$nextTick((function(){r.form.setFieldsValue(i()(r.model,"roleName","roleCode","description"))}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){var e=this,t=this;this.form.validateFields((function(r,a){if(!r){t.confirmLoading=!0;var n="",l="";e.model.id?(n+=e.url.edit,l="put"):(n+=e.url.add,l="post");var i=Object.assign(e.model,a);i.departId=e.departId,Object(o["i"])(n,i,l).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()},validateRoleCode:function(e,t,r){if(/[\u4E00-\u9FA5]/g.test(t))r("部门角色编码不可输入汉字!");else{var a={tableName:"sys_depart_role",fieldName:"role_code",fieldVal:t,dataId:this.model.id};Object(s["m"])(a).then((function(e){e.success?r():r(e.message)}))}}}},u=c,d=r("2877"),f=Object(d["a"])(u,a,n,!1,null,"814d02b0",null);t["default"]=f.exports}}]);
|