1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-48fc4f06","chunk-2d0df843"],{8034:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t._self._c;return e("a-drawer",{staticStyle:{height:"calc(100% - 55px)",overflow:"auto","padding-bottom":"53px"},attrs:{title:t.title,maskClosable:!0,width:"600",placement:"right",closable:!0,visible:t.visible},on:{close:t.close}},[e("a-spin",{attrs:{spinning:t.confirmLoading}},[t.designNameOption.length>0?e("a-form",{attrs:{form:t.form}},[e("a-form-item",{attrs:{label:""}},[e("a-col",{attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[e("a-card",{style:{marginTop:"12px",height:"auto"}},[e("a-checkbox-group",{staticStyle:{width:"100%"},on:{change:t.designNameChange},model:{value:t.designNameValue,callback:function(e){t.designNameValue=e},expression:"designNameValue"}},[e("a-row",[t._l(t.designNameOption,(function(r){return[e("a-col",{attrs:{span:6}},[e("a-checkbox",{attrs:{value:r.value}},[t._v(t._s(r.text))])],1)]}))],2)],1)],1)],1)],1)],1):e("div",[e("h3",[t._v("无可配置角色!")])])],1),e("div",{staticClass:"drawer-bootom-button"},[e("a-dropdown",{staticStyle:{float:"left"},attrs:{trigger:["click"],placement:"topCenter"}},[e("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[e("a-menu-item",{key:"1",on:{click:t.checkALL}},[t._v("全部勾选")]),e("a-menu-item",{key:"2",on:{click:t.cancelCheckALL}},[t._v("取消全选")])],1),e("a-button",[t._v("\n 操作 "),e("a-icon",{attrs:{type:"up"}})],1)],1),e("a-popconfirm",{attrs:{title:"确定放弃编辑?",okText:"确定",cancelText:"取消"},on:{confirm:t.close}},[e("a-button",{staticStyle:{"margin-right":".8rem"}},[t._v("取消")])],1),e("a-button",{attrs:{type:"primary"},on:{click:function(e){return t.handleSubmit(!0)}}},[t._v("保存")])],1)],1)},o=[],i=r("0fea"),a=r("d579");r("89f2");function s(t,e){var r="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=c(t))||e&&t&&"number"===typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function c(t,e){if(t){if("string"===typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var l={name:"DeptRoleUserModal",components:{JEllipsis:a["default"]},data:function(){return{currentDeptId:"",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:{},url:{add:"/sys/sysDepartRole/deptRoleUserAdd",getDeptRoleList:"/sys/sysDepartRole/getDeptRoleList",getDeptRoleByUserId:"/sys/sysDepartRole/getDeptRoleByUserId"},designNameOption:[],userId:"",newRoleId:"",oldRoleId:"",designNameValue:[],desformList:[]}},created:function(){},methods:{add:function(t,e){this.userId=t.id,this.currentDeptId=e,this.loadDesformList(),this.edit({})},edit:function(t){var e=this;this.form.resetFields(),this.model=Object.assign({},t),this.visible=!0,Object(i["c"])(this.url.getDeptRoleByUserId,{userId:this.userId}).then((function(t){if(t.success){var r,n=[],o=s(t.result);try{for(o.s();!(r=o.n()).done;){var i=r.value;n.push(i.droleId)}}catch(a){o.e(a)}finally{o.f()}e.oldRoleId=n.join(","),e.designNameValue=n,e.newRoleId=n.join(",")}}))},close:function(){this.$emit("close"),this.visible=!1},handleSubmit:function(){var t=this;t.confirmLoading=!0;var e=this.url.add,r="post",n=Object.assign(this.model,{});n.userId=this.userId,n.newRoleId=this.newRoleId,n.oldRoleId=this.oldRoleId,Object(i["i"])(e,n,r).then((function(e){e.success?(t.$message.success(e.message),t.$emit("reload"),t.$emit("ok")):t.$message.warning(e.message)})).finally((function(){t.confirmLoading=!1,t.close()}))},handleCancel:function(){this.designNameOption=[],this.designNameValue=[],this.close()},designNameChange:function(t){this.newRoleId=t.join(",")},checkALL:function(){var t,e=[],r=s(this.desformList);try{for(r.s();!(t=r.n()).done;){var n=t.value;e.push(n.id)}}catch(o){r.e(o)}finally{r.f()}this.designNameValue=e,this.newRoleId=e.join(",")},cancelCheckALL:function(){this.designNameValue=[],this.newRoleId=""},loadDesformList:function(){var t=this;Object(i["c"])(this.url.getDeptRoleList,{departId:this.currentDeptId,userId:this.userId}).then((function(e){if(e.success){t.desformList=e.result;var r,n=[],o=s(t.desformList);try{for(o.s();!(r=o.n()).done;){var i=r.value;n.push({value:i.id,text:i.roleName})}}catch(a){o.e(a)}finally{o.f()}t.designNameOption=n}}))}}},f=l,h=(r("eaf5"),r("2877")),d=Object(h["a"])(f,n,o,!1,null,"518ec681",null);e["default"]=d.exports},"89f2":function(t,e,r){"use strict";r.d(e,"b",(function(){return c})),r.d(e,"a",(function(){return l}));var n=r("4ec3");r("0fea");function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",s=n.asyncIterator||"@@asyncIterator",c=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(E){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return j()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(E){return{type:"throw",arg:E}}}t.wrap=l;var h={};function d(){}function p(){}function v(){}var m={};u(m,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(O([])));g&&g!==e&&r.call(g,a)&&(m=g);var b=v.prototype=d.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(i,a,s,c){var u=f(t[i],t,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==o(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,c)}),(function(t){n("throw",t,s,c)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,c)}))}c(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=v,u(b,"constructor",v),u(v,"constructor",p),p.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(L.prototype),u(L.prototype,s,(function(){return this})),t.AsyncIterator=L,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new L(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),u(b,c,"Generator"),u(b,a,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function a(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,o)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function s(t){a(i,n,o,s,c,"next",t)}function c(t){a(i,n,o,s,c,"throw",t)}s(void 0)}))}}function c(t){return u.apply(this,arguments)}function u(){return u=s(i().mark((function t(e){var r,o;return i().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return","字典Code不能为空!");case 2:if(!Object(n["t"])(e)){t.next=7;break}return r={},r.result=Object(n["t"])(e),r.success=!0,t.abrupt("return",r);case 7:return t.next=9,Object(n["f"])(e);case 9:return o=t.sent,t.abrupt("return",o);case 11:case"end":return t.stop()}}),t)}))),u.apply(this,arguments)}function l(t,e){if(null!=e&&0!=e.length){if(!t)return"字典Code不能为空!";if(Object(n["t"])(t)){var r=Object(n["t"])(t).filter((function(t){return t["value"]==e}));if(r&&r.length>0)return r[0]["text"]}}}},a330:function(t,e,r){},d579:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t._self._c;return e("a-tooltip",{attrs:{placement:"topLeft"}},[e("template",{slot:"title"},[e("span",[t._v(t._s(t.value))])]),t._v("\n "+t._s(t._f("ellipsis")(t.value,t.length))+"\n")],2)},o=[],i={name:"JEllipsis",props:{value:{type:String,required:!1},length:{type:Number,required:!1,default:25}}},a=i,s=r("2877"),c=Object(s["a"])(a,n,o,!1,null,"4de15389",null);e["default"]=c.exports},eaf5:function(t,e,r){"use strict";r("a330")}}]);
|