chunk-1f86139a.7178b741.js 10 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1f86139a"],{"1af6":function(e,t,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"2a60":function(e,t,n){"use strict";var r=n("edd9"),a=n.n(r);a.a},4426: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("div",{staticClass:"m-container"},[n("h2",[n("el-page-header",{attrs:{content:("create"==e.pageType?"添加":"修改")+"角色"},on:{back:e.onCancel}})],1),e._v(" "),n("div",{staticClass:"m-core"},[n("el-form",{ref:"form",attrs:{"label-width":"120px",width:"500px"}},[n("el-form-item",{attrs:{label:"角色名称",prop:"roleName"}},[n("el-input",{model:{value:e.result.roleName,callback:function(t){e.$set(e.result,"roleName",t)},expression:"result.roleName"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"角色描述"}},[n("el-input",{attrs:{type:"textarea"},model:{value:e.result.roleDesc,callback:function(t){e.$set(e.result,"roleDesc",t)},expression:"result.roleDesc"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"基本权限"}},[n("el-checkbox",{attrs:{indeterminate:e.isIndeterminate},on:{change:e.onCheckAll},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v("全选")]),e._v(" "),n("el-tree",{ref:"tree",attrs:{data:e.data,"show-checkbox":"","node-key":"id",accordion:"","highlight-current":"","default-checked-keys":e.result.menuIds,props:e.defaultProps},on:{check:e.onTreeCheck},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.node,a=t.data;return n("div",{},[e._v("\n "+e._s(r.label)+"\n "),1==a.type?n("el-tag",{attrs:{size:"mini",effect:"dark"}},[e._v("按钮")]):e._e()],1)}}])})],1),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("立即"+e._s("create"==e.pageType?"创建":"修改"))]),e._v(" "),n("el-button",{on:{click:function(t){return e.onReSet("form")}}},[e._v("重置")])],1)],1)],1)])},a=[],o=(n("7f7f"),n("ac6a"),n("6762"),n("2fdb"),n("96cf"),n("3b8d")),u=n("a745"),i=n.n(u);function c(e){if(i()(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}var s=n("774e"),d=n.n(s),l=n("c8bb"),h=n.n(l);function f(e){if(h()(Object(e))||"[object Arguments]"===Object.prototype.toString.call(e))return d()(e)}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function m(e){return c(e)||f(e)||p()}var g=n("99b4"),b=(n("4360"),n("1a62")),y={data:function(){return{organId:null,pageType:this.$route.query.type,id:this.$route.query.id,page:this.$route.query.page,isIndeterminate:!1,data:[],defaultProps:{children:"children",label:"label"},result:{roleName:null,roleDesc:null},checkAll:!1,splice:[],allChildIds:[],slideCount:0}},mounted:function(){this.lookSilder()},methods:{onSubmit:function(){var e=this,t=this.$refs.tree.getCheckedKeys(),n=this.$refs.tree.getHalfCheckedKeys(),r=[].concat(m(t),m(n));"update"==this.pageType?Object(g["A"])({id:this.id,organId:this.organId,roleDesc:this.result.roleDesc,roleName:this.result.roleName,menuIds:r}).then((function(t){e.messageTips("修改",t)})):"create"==this.pageType&&Object(g["y"])({organId:this.organId,roleDesc:this.result.roleDesc,roleName:this.result.roleName,menuIds:r}).then((function(t){e.messageTips("添加",t)}))},messageTips:function(e,t){200==t.code?(this.$message.success("修改成功"),this.$router.push({path:"/specialSetup/adminManager",query:{page:this.page}})):this.$message.error(t.msg)},lookSilder:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t,n,r,a,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(b["c"])({hid:0});case 2:if(t=e.sent,n=[],200==t.code&&(n=this.setTableData(t.data),this.data=n),"update"!=this.pageType){e.next=10;break}return e.next=8,Object(g["k"])({id:this.id});case 8:r=e.sent,200==r.code&&(a=r.data,this.checkAll=a.menuIds.length>=this.slideCount,this.isIndeterminate=a.menuIds.length>0&&a.menuIds.length<this.slideCount,o=this.getParent(a.menuIds,n),a.menuIds=o,this.result=a);case 10:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),onTreeCheck:function(){var e=this.$refs.tree.getCheckedKeys();this.checkAll=e.length>=this.slideCount,this.isIndeterminate=e.length>0&&e.length<this.slideCount},onCheckAll:function(e){e?this.$refs.tree.setCheckedNodes(this.data):this.$refs.tree.setCheckedNodes([])},getParent:function(e,t){var n=JSON.parse(JSON.stringify(e));this.getAllChildIds(t);for(var r=this.allChildIds,a=e.length;a>0;a--)r.includes(e[a-1])||n.splice(a-1,1);return n},getAllChildIds:function(e){var t=this,n=this.allChildIds;e.forEach((function(e,r){e.children&&e.children.length>0?t.getAllChildIds(e.children):n.push(e.id)}))},setTableData:function(e){var t=this,n=[];return n=e.map((function(e){var n={};return n={id:e.id,name:e.name,label:e.name,type:e.type,path:e.path,permission:e.permission,icon:e.icon,parentId:e.parentId},t.slideCount++,e.sysMenus&&e.sysMenus.length>0&&(n.children=t.setTableData(e.sysMenus)),n})),n},onReSet:function(){this.$refs.tree.setCheckedNodes([]),this.result={roleName:null,roleDesc:null},this.checkAll=!1},onCancel:function(){this.$router.push({path:"/specialSetup/adminManager",query:{page:this.$route.query.page}})}}},O=y,v=(n("2a60"),n("2877")),j=Object(v["a"])(O,r,a,!1,null,"5cf4b211",null);t["default"]=j.exports},"549b":function(e,t,n){"use strict";var r=n("d864"),a=n("63b6"),o=n("241e"),u=n("b0dc"),i=n("3702"),c=n("b447"),s=n("20fd"),d=n("7cd6");a(a.S+a.F*!n("4ee1")((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,a,l,h=o(e),f="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,b=0,y=d(h);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),void 0==y||f==Array&&i(y))for(t=c(h.length),n=new f(t);t>b;b++)s(n,b,g?m(h[b],b):h[b]);else for(l=y.call(h),n=new f;!(a=l.next()).done;b++)s(n,b,g?u(l,m,[a.value,b],!0):a.value);return n.length=b,n}})},"54a1":function(e,t,n){n("6c1c"),n("1654"),e.exports=n("95d5")},"774e":function(e,t,n){e.exports=n("d2d5")},"95d5":function(e,t,n){var r=n("40c3"),a=n("5168")("iterator"),o=n("481b");e.exports=n("584a").isIterable=function(e){var t=Object(e);return void 0!==t[a]||"@@iterator"in t||o.hasOwnProperty(r(t))}},"99b4":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return s})),n.d(t,"x",(function(){return d})),n.d(t,"v",(function(){return l})),n.d(t,"C",(function(){return h})),n.d(t,"B",(function(){return f})),n.d(t,"D",(function(){return p})),n.d(t,"w",(function(){return m})),n.d(t,"h",(function(){return g})),n.d(t,"j",(function(){return b})),n.d(t,"m",(function(){return y})),n.d(t,"i",(function(){return O})),n.d(t,"z",(function(){return v})),n.d(t,"k",(function(){return j})),n.d(t,"A",(function(){return k})),n.d(t,"y",(function(){return C})),n.d(t,"d",(function(){return I})),n.d(t,"f",(function(){return A})),n.d(t,"e",(function(){return w})),n.d(t,"g",(function(){return x})),n.d(t,"n",(function(){return q})),n.d(t,"o",(function(){return S})),n.d(t,"q",(function(){return $})),n.d(t,"p",(function(){return _})),n.d(t,"l",(function(){return N})),n.d(t,"t",(function(){return T})),n.d(t,"r",(function(){return D})),n.d(t,"u",(function(){return P})),n.d(t,"s",(function(){return M}));var r=n("b775"),a=n("4328"),o=n.n(a),u="/api-web";function i(e){return Object(r["a"])({url:u+"/cooperationOrgan/add",method:"post",data:o.a.stringify(e)})}function c(e){return Object(r["a"])({url:u+"/cooperationOrgan/update",method:"put",data:o.a.stringify(e)})}function s(e){return Object(r["a"])({url:u+"/cooperationOrgan/del/".concat(e),method:"post"})}function d(e){return Object(r["a"])({url:u+"/cooperationOrgan/queryPage",method:"get",params:e})}function l(e){return Object(r["a"])({url:u+"/cooperationOrgan/queryByOrganId",method:"get",params:e})}function h(e){return Object(r["a"])({url:u+"/school/queryPage",method:"get",params:e})}function f(e){return Object(r["a"])({url:u+"/school/add",method:"post",data:o.a.stringify(e)})}function p(e){return Object(r["a"])({url:u+"/school/update",method:"post",data:o.a.stringify(e)})}function m(e){return Object(r["a"])({url:u+"/employee/queryEmployByOrganId",method:"get",params:e})}function g(e){return Object(r["a"])({url:u+"/employee/add",method:"post",data:e})}function b(e){return Object(r["a"])({url:u+"/employee/update",method:"post",data:e})}function y(e){return Object(r["a"])({url:"/api-auth/role/queryPage",method:"get",params:e})}function O(e){return Object(r["a"])({url:u+"/employee/employeeOperate",method:"post",data:o.a.stringify(e)})}function v(e){return Object(r["a"])({url:"/api-auth/role/queryPage",method:"get",params:e})}function j(e){return Object(r["a"])({url:"/api-auth/role/".concat(e.id),method:"get"})}function k(e){return Object(r["a"])({url:"/api-auth/role/update",method:"post",data:e})}function C(e){return Object(r["a"])({url:"/api-auth/role/add",method:"post",data:e})}function I(e){return Object(r["a"])({url:u+"/courseScheduleRewards/queryPage",method:"get",params:e})}function A(e){return Object(r["a"])({url:u+"/courseScheduleRewards/query",method:"get",params:e})}function w(e){return Object(r["a"])({url:u+"/courseScheduleRewards/add",method:"post",data:o.a.stringify(e)})}function x(e){return Object(r["a"])({url:u+"/courseScheduleRewards/update",method:"post",data:o.a.stringify(e)})}function q(e){return Object(r["a"])({url:u+"/hotWordLabelManage/queryPage",method:"get",params:e})}function S(e){return Object(r["a"])({url:u+"/hotWordLabelManage/add",method:"post",data:o.a.stringify(e)})}function $(e){return Object(r["a"])({url:u+"/hotWordLabelManage/update",method:"post",data:o.a.stringify(e)})}function _(e){return Object(r["a"])({url:u+"/hotWordLabelManage/del/".concat(e),method:"post"})}function N(e){return Object(r["a"])({url:u+"/school/queryByOrganId",method:"get",params:e})}function T(e){return Object(r["a"])({url:u+"/paymentConfig/queryPage",method:"get",params:e})}function D(e){return Object(r["a"])({url:u+"/paymentConfig/add",method:"post",data:o.a.stringify(e)})}function P(e){return Object(r["a"])({url:u+"/paymentConfig/update",method:"post",data:o.a.stringify(e)})}function M(e){return Object(r["a"])({url:u+"/paymentConfig/del/"+e.id,method:"post"})}},a745:function(e,t,n){e.exports=n("f410")},c8bb:function(e,t,n){e.exports=n("54a1")},d2d5:function(e,t,n){n("1654"),n("549b"),e.exports=n("584a").Array.from},edd9:function(e,t,n){},f410:function(e,t,n){n("1af6"),e.exports=n("584a").Array.isArray}}]);