(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-299d5891"],{"2a3d":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("win",{attrs:{title:t.setting.title,width:"800px",loading:t.loading},on:{close:t.close}},[r("el-form",{staticClass:"demo-ruleForm",attrs:{model:t.formData,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"角色配置",prop:"roleSetting"}},[r("el-checkbox",{on:{change:t.handleCheckAllChange},model:{value:t.checkAll,callback:function(e){t.checkAll=e},expression:"checkAll"}},[t._v("全选")]),t._v(" "),r("div",{staticStyle:{margin:"15px 0"}}),t._v(" "),r("el-checkbox-group",{on:{change:t.handleCheckedCitiesChange},model:{value:t.checkedList,callback:function(e){t.checkedList=e},expression:"checkedList"}},t._l(t.roleOptions,(function(e,n){return r("el-checkbox",{key:e.role_id,attrs:{label:e.role_id}},[t._v(t._s(e.role_name))])})),1)],1)],1),t._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:t.close}}),t._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:t.save}})],1)],1)},o=[],i=r("f7d1"),a=r("f6e8"),c=r("3528"),u=r("c24f");function s(t){return s="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},s(t)}function l(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new N(n||[]);return o(a,"_invoke",{value:C(t,r,c)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function w(){}function k(){}var x={};h(x,a,(function(){return this}));var L=Object.getPrototypeOf,O=L&&L(L(G([])));O&&O!==r&&n.call(O,a)&&(x=O);var _=k.prototype=b.prototype=Object.create(x);function j(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,c){var u=d(t[o],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==s(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function C(e,r,n){var o=p;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=d(e,r,n);if("normal"===s.type){if(o=n.done?v:m,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=v,n.method="throw",n.arg=s.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(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 A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(s(e)+" is not iterable")}return w.prototype=k,o(_,"constructor",{value:k,configurable:!0}),o(k,"constructor",{value:w,configurable:!0}),w.displayName=h(k,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,h(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},j(E.prototype),h(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(_),h(_,u,"Generator"),h(_,a,(function(){return this})),h(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=G,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.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,g):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),g},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),A(r),g}},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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){h(i,n,o,a,c,"next",t)}function c(t){h(i,n,o,a,c,"throw",t)}a(void 0)}))}}var d={components:{win:i["a"],myButton:a["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!0,data_scope:null,checkAll:!1,checkedList:[],roleList:[{id:1,label:"王涵1"},{id:2,label:"王涵2"}],queryParams:{pageNum:1,pageSize:10,roleName:void 0,roleKey:void 0,status:0,orgId:1},roleOptions:[],roleCheckStrictly:!0,defaultProps:{children:"childList",label:"name"},formData:{userName:"",userCode:"",userPhone:"",sex:1,status:1,remark:"",seq:null}}},created:function(){var t=f(l().mark((function t(){return l().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.title=this.setting.title,null==this.setting.id){t.next=4;break}return t.next=4,this.getInfo();case 4:return t.next=6,this.getAllRole();case 6:this.loading=!1;case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{getAllRole:function(){var t=f(l().mark((function t(){var e=this;return l().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.data_scope=this.$store.getters.userInfo?this.$store.getters.userInfo.lv:"",t.next=3,c["k"]({dataScope:this.setting.data_scope}).then((function(t){e.roleOptions=t||[],e.loading=!1}));case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),handleCheckAllChange:function(t){this.checkedList=t?this.roleOptions.map((function(t){return t.role_id})):[]},handleCheckedCitiesChange:function(t){var e=t.length;this.checkAll=e===this.roleOptions.length},getInfo:function(){var t=f(l().mark((function t(){var e=this;return l().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,u["h"]({id:this.setting.id}).then((function(t){var r=t.data;e.formData=Object.assign(e.formData,r),e.checkedList=t.list.map((function(t){return t.role_id})),t.list.length===e.roleOptions.length&&e.handleCheckedCitiesChange(t.list)}));case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),close:function(){this.formData={userName:"",userCode:"",userPhone:"",sex:1,status:1,remark:"",seq:null},this.$emit("close")},save:function(){var t=this,e=Object.assign({},this.formData);if(e.roleList=this.checkedList,e.id){if(this.loading)return;this.loading=!0,u["m"](e).then((function(e){t.loading=!1,e?(t.$message.success("保存成功!"),t.close(),t.$emit("search")):t.$message.error("保存失败")})).catch((function(){t.loading=!1}))}}}},p=d,m=r("2877"),y=Object(m["a"])(p,n,o,!1,null,null,null);e["default"]=y.exports},3528:function(t,e,r){"use strict";r.d(e,"j",(function(){return o})),r.d(e,"k",(function(){return i})),r.d(e,"i",(function(){return a})),r.d(e,"a",(function(){return c})),r.d(e,"m",(function(){return u})),r.d(e,"g",(function(){return s})),r.d(e,"f",(function(){return l})),r.d(e,"h",(function(){return h})),r.d(e,"b",(function(){return f})),r.d(e,"l",(function(){return d})),r.d(e,"c",(function(){return p})),r.d(e,"d",(function(){return m})),r.d(e,"e",(function(){return y}));var n=r("b775");function o(t){return Object(n["a"])({url:"/system/role/list",method:"get",params:t})}function i(t){return Object(n["a"])({url:"/pc/fin/sys/server/selectByDataScope",method:"get",params:t})}function a(t){return Object(n["a"])({url:"/system/role/view/"+t,method:"get"})}function c(t){return Object(n["a"])({url:"/system/role/add",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/system/role/edit",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/system/role/dataScope",method:"put",data:t})}function l(t){return Object(n["a"])({url:"/system/role/edit",method:"post",data:t})}function h(t){return Object(n["a"])({url:"/system/role/remove/"+t,method:"get"})}function f(t){return Object(n["a"])({url:"/system/role/select/authUser/allocatedList",method:"get",params:t})}function d(t){return Object(n["a"])({url:"/system/role/select/authUser/unallocatedList",method:"get",params:t})}function p(t){return Object(n["a"])({url:"/system/role/select/authUser/cancel",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/system/role/authUser/cancelAll",method:"post",params:t})}function y(t){return Object(n["a"])({url:"/system/role/select/authUser/all",method:"post",params:t})}}}]);
|