| 1 |
- !function(){function e(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,a,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",l=o.toStringTag||"@@toStringTag";function i(e,o,r,l){var i=o&&o.prototype instanceof c?o:c,d=Object.create(i.prototype);return t(d,"_invoke",function(e,t,o){var r,l,i,c=0,d=o||[],f=!1,s={p:0,n:0,v:n,a:v,f:v.bind(n,4),d:function(e,t){return r=e,l=0,i=n,s.n=t,u}};function v(e,t){for(l=e,i=t,a=0;!f&&c&&!o&&a<d.length;a++){var o,r=d[a],v=s.p,p=r[2];e>3?(o=p===t)&&(i=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=n):r[0]<=v&&((o=e<2&&v<r[1])?(l=0,s.v=t,s.n=r[1]):v<p&&(o=e<3||r[0]>t||t>p)&&(r[4]=e,r[5]=t,s.n=p,l=0))}if(o||e>1)return u;throw f=!0,t}return function(o,d,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===d&&v(d,p),l=d,i=p;(a=l<2?n:i)||!f;){r||(l?l<3?(l>1&&(s.n=-1),v(l,i)):s.n=i:s.v=i);try{if(c=2,r){if(l||(o="next"),a=r[o]){if(!(a=a.call(r,i)))throw TypeError("iterator result is not an object");if(!a.done)return a;i=a.value,l<2&&(l=0)}else 1===l&&(a=r.return)&&a.call(r),l<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),l=1);r=n}else if((a=(f=s.n<0)?i:e.call(t,s))!==u)break}catch(a){r=n,l=1,i=a}finally{c=1}}return{value:a,done:f}}}(e,r,l),!0),d}var u={};function c(){}function d(){}function f(){}a=Object.getPrototypeOf;var s=[][r]?a(a([][r]())):(t(a={},r,function(){return this}),a),v=f.prototype=c.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,t(e,l,"GeneratorFunction")),e.prototype=Object.create(v),e}return d.prototype=f,t(v,"constructor",f),t(f,"constructor",d),d.displayName="GeneratorFunction",t(f,l,"GeneratorFunction"),t(v),t(v,l,"Generator"),t(v,r,function(){return this}),t(v,"toString",function(){return"[object Generator]"}),(e=function(){return{w:i,m:p}})()}function t(e,n,a,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}t=function(e,n,a,o){function l(n,a){t(e,n,function(e){return this._invoke(n,a,e)})}n?r?r(e,n,{value:a,enumerable:!o,configurable:!o,writable:!o}):e[n]=a:(l("next",0),l("throw",1),l("return",2))},t(e,n,a,o)}function n(e,t,n,a,o,r,l){try{var i=e[r](l),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(a,o)}function a(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}System.register(["./index-legacy-c2eb0980.js","./index-legacy-7f6656e1.js","./CusNavigation.vue_vue_type_style_index_0_scoped_5a71d35e_lang-legacy-2e6df359.js","./CusNavigation-legacy-ce721f1c.js","./ReloadOutlined-legacy-23a37b93.js"],function(t,o){"use strict";var r,l,i,u,c,d,f,s,v,p,b,g,y,h,m,x,w,k,_,S,C,O,j,F,T,z,R;return{setters:[function(e){r=e.p,l=e.a},function(e){i=e.d,u=e.i,c=e.v,d=e.k,f=e.n,s=e.o,v=e.b,p=e.w,b=e.H,g=e.r,y=e.c,h=e.y,m=e.e,x=e.p,w=e.Z,k=e.R,_=e._,S=e.f,C=e.F,O=e.J,j=e.S,F=e.t,T=e.M},null,function(e){z=e.C},function(e){R=e.R}],execute:function(){var o=document.createElement("style");o.textContent="[data-v-704aa3a6] .ant-table-wrapper{height:0px;flex-grow:1}[data-v-704aa3a6] .ant-spin-nested-loading{height:100%}[data-v-704aa3a6] .ant-spin-container{height:100%;display:flex;flex-direction:column}[data-v-704aa3a6] .ant-table{flex-grow:1;height:0px}[data-v-704aa3a6] .ant-table-container{height:100%;display:flex;flex-direction:column}[data-v-704aa3a6] .ant-table-body{overflow-y:auto!important;flex-grow:1;border-bottom:1px solid #eee;border-right:1px solid #eee}[data-v-704aa3a6] .ant-table-body::-webkit-scrollbar{width:1px;height:8px;background:#0058FF}[data-v-704aa3a6] .ant-table-body::-webkit-scrollbar-track{width:1px;background:#eee}[data-v-704aa3a6] .ant-table-body::-webkit-scrollbar-thumb{width:1px;background:#0058FF}[data-v-704aa3a6] .ant-table-body::-webkit-scrollbar-thumb:hover{background:#0058FF}[data-v-704aa3a6] .ant-table-body::-webkit-scrollbar-corner{width:1px;background:#eee}.cus-forbidden[data-v-704aa3a6]:hover{cursor:not-allowed}[data-v-68fc58ba] .ant-table-wrapper{height:0px;flex-grow:1}[data-v-68fc58ba] .ant-spin-nested-loading{height:100%}[data-v-68fc58ba] .ant-spin-container{height:100%;display:flex;flex-direction:column}[data-v-68fc58ba] .ant-table{flex-grow:1;height:0px}[data-v-68fc58ba] .ant-table-container{height:100%;display:flex;flex-direction:column}[data-v-68fc58ba] .ant-table-body{overflow-y:auto!important;flex-grow:1;border-bottom:1px solid #eee;border-right:1px solid #eee}[data-v-68fc58ba] .ant-table-body::-webkit-scrollbar{width:1px;height:8px;background:#0058FF}[data-v-68fc58ba] .ant-table-body::-webkit-scrollbar-track{width:1px;background:#eee}[data-v-68fc58ba] .ant-table-body::-webkit-scrollbar-thumb{width:1px;background:#0058FF}[data-v-68fc58ba] .ant-table-body::-webkit-scrollbar-thumb:hover{background:#0058FF}[data-v-68fc58ba] .ant-table-body::-webkit-scrollbar-corner{width:1px;background:#eee}.cus-forbidden[data-v-68fc58ba]:hover{cursor:not-allowed}\n",document.head.appendChild(o);var I=i({__name:"Add",emits:["onSuccess"],setup:function(e,t){var n=t.expose,a=t.emit,o=u(null),l=u(!1),i=u(!0),m=a,x=c({id:void 0,name:"",description:""}),w=function(e){var t;console.log("handleOK",e),null===(t=o.value)||void 0===t||t.validate().then(function(){var e;console.log("11"),e="",e=i.value?"/role/add":"/role/edit",r({url:e,data:x},function(e){console.log(e),h.info(e.msg),_(),m("onSuccess",e)})},function(){console.log("22")})},k=function(){l.value=!0},_=function(){l.value=!1};return d(function(){console.log("onMounted")}),f(function(){console.log("onUnmounted")}),n({add:function(){var e;i.value=!0,b(x),null===(e=o.value)||void 0===e||e.clearValidate(),k()},update:function(e){var t;i.value=!1,Object.assign(x,e),null===(t=o.value)||void 0===t||t.clearValidate(),k()}}),function(e,t){var n=g("a-input"),a=g("a-form-item"),r=g("a-textarea"),i=g("a-form"),u=g("a-modal");return s(),v(u,{title:"添加设备",visible:l.value,"onUpdate:visible":t[3]||(t[3]=function(e){return l.value=e}),maskClosable:!1,bodyStyle:{height:"500px","overflow-y":"auto"},cancelText:"取消",okText:"确定",onOk:w},{default:p(function(){return[y(i,{ref_key:"formRef",ref:o,model:x,name:"basic","label-align":"left","label-col":{span:4},"wrapper-col":{span:20},autocomplete:"off",layout:"vertical"},{default:p(function(){return[y(a,{"wrapper-col":{offset:0,span:24},label:"角色标识",name:"id",rules:[{required:!0,message:"请输入用户名!"}]},{default:p(function(){return[y(n,{size:"large",value:x.id,"onUpdate:value":t[0]||(t[0]=function(e){return x.id=e})},null,8,["value"])]}),_:1}),y(a,{"wrapper-col":{offset:0,span:24},label:"角色名称",name:"name",rules:[{required:!0,message:"请输入用户编号!"}]},{default:p(function(){return[y(n,{size:"large",value:x.name,"onUpdate:value":t[1]||(t[1]=function(e){return x.name=e})},null,8,["value"])]}),_:1}),y(a,{"wrapper-col":{offset:0,span:24},label:"描述",name:"description",rules:[{required:!1,message:"请输入设备名称!"}]},{default:p(function(){return[y(r,{value:x.description,"onUpdate:value":t[2]||(t[2]=function(e){return x.description=e}),placeholder:"请输入描述","allow-clear":""},null,8,["value"])]}),_:1})]}),_:1},8,["model"])]}),_:1},8,["visible"])}}}),U=i({__name:"Detail",setup:function(e,t){var n=t.expose,o=u(!1),r=function(e){console.log(e),o.value=!1};return d(function(){}),n({show:function(){o.value=!0},hidden:function(){o.value=!1}}),function(e,t){var n=g("a-modal");return s(),v(n,{title:"产品功能",visible:o.value,"onUpdate:visible":t[0]||(t[0]=function(e){return o.value=e}),maskClosable:!1,width:480,cancelText:"取消",okText:"确定",onOk:r},{default:p(function(){return a(t[1]||(t[1]=[m("div",null," 详情 ",-1)]))}),_:1},8,["visible"])}}}),A={style:{"font-weight":"bold"}},P={key:0},G={key:1},K={key:2},E={key:3},q={key:4,style:{color:"red"}},M=i({__name:"Permission",emits:["onSuccess"],setup:function(t,o){var i=o.expose,b=o.emit,_=c({}),S=u([]),C=u({checkStrictly:!0,selectedRowKeys:[],onChange:function(e){C.value.selectedRowKeys=e}}),O=u(!1),j=function(){var t,a=(t=e().m(function t(){return e().w(function(e){for(;;)switch(e.n){case 0:return O.value=!0,e.n=1,l({url:"/permission/list",data:void 0}).then(function(e){var t=e.data,n=w(t);S.value=n}).then(function(){return l({url:"/permission/listByRoleId",data:{id:T.id}})}).then(function(e){for(var t=[],n=0;n<e.data.length;n++)t.push(e.data[n].id);C.value.selectedRowKeys=t,O.value=!1}).catch(function(e){h.error(e)});case 1:return e.a(2)}},t)}),function(){var e=this,a=arguments;return new Promise(function(o,r){var l=t.apply(e,a);function i(e){n(l,o,r,i,u,"next",e)}function u(e){n(l,o,r,i,u,"throw",e)}i(void 0)})});return function(){return a.apply(this,arguments)}}(),F=b,T=c({id:void 0,name:"",description:""}),z=function(e){console.log("handleOK",e),r({url:"/role/authPermission",data:{roleId:T.id,permissionIds:C.value.selectedRowKeys}},function(e){console.log(e),h.info(e.msg),U(),F("onSuccess",e)})},R=u(!1),I=u(null),U=function(){R.value=!1};return d(function(){console.log("onMounted")}),f(function(){console.log("onUnmounted")}),i({update:function(e){Object.assign(T,e),j(),R.value=!0,k(function(){var e;_.y=(null===(e=I.value)||void 0===e?void 0:e.clientHeight)-48})}}),function(e,t){var n=g("a-table-column"),o=g("a-table"),r=g("a-modal");return s(),v(r,{title:"添加权限",visible:R.value,"onUpdate:visible":t[0]||(t[0]=function(e){return R.value=e}),maskClosable:!1,width:800,bodyStyle:{height:"500px","overflow-y":"auto"},cancelText:"取消",okText:"确定",onOk:z},{default:p(function(){return[m("div",{ref_key:"table_container",ref:I,style:{display:"flex","flex-direction":"column",overflow:"hidden",height:"100%"}},[y(o,{"data-source":S.value,pagination:!1,scroll:_,bordered:!0,loading:O.value,size:"middle",indentSize:10,"row-selection":C.value},{default:p(function(){return[y(n,{"data-index":"title",width:180,fixed:"left"},{title:p(function(){return a(t[1]||(t[1]=[m("span",{style:{"margin-left":"23px"}},"功能名称",-1)]))}),_:1}),y(n,{title:"ID","data-index":"key",width:60,fixed:"left"}),y(n,{title:"功能类型",width:180,fixed:"left"},{default:p(function(e){var t=e.record;return[m("div",A,["01"==t.type?(s(),x("span",P,"目录")):"02"==t.type?(s(),x("span",G,"菜单")):"03"==t.type?(s(),x("span",K,"按钮")):"04"==t.type?(s(),x("span",E,"功能")):(s(),x("span",q,"未知"))])]}),_:1}),y(n,{title:"请求路径","data-index":"url"})]}),_:1},8,["data-source","scroll","loading","row-selection"])],512)]}),_:1},8,["visible"])}}}),H=_(M,[["__scopeId","data-v-704aa3a6"]]),N={class:"cus-animation",style:{height:"100%",width:"100%",padding:"16px 20px",display:"flex","flex-direction":"column"}},W={style:{display:"flex","justify-content":"space-between","align-items":"flex-end"}},D={style:{display:"flex"}},J=["onClick"],V=["onClick"],B=["onClick"],Q={key:0,style:{"margin-left":"26px"}};t("default",_(i({__name:"Index",setup:function(e){var t=u(null),n=c({x:1300}),a=c({pageSize:20,current:1,size:"default",showQuickJumper:!0,showTotal:function(e){return"共 ".concat(e," 条数据")},onChange:function(e,t){console.log("111",e,t),this.current=e,this.pageSize=t,f()}}),o=u([]),l=u(!1),i=c({size:20,page:1,sort:"createtime",order:"desc",keyWord:""}),f=function(){l.value=!0,i.size=a.pageSize,i.page=a.current,r({url:"/role/search",data:i},function(e){console.log(e),a.total=e.total,o.value=e.data,l.value=!1})},v=function(){a.current=1,f()},b=u(null),w=u(null),k=function(e){var t;console.log(e),null===(t=w.value)||void 0===t||t.add()},_=u(null),A=function(e){console.log(e),f()};return d(function(){var e;n.y=(null===(e=t.value)||void 0===e?void 0:e.clientHeight)-113,f()}),function(e,u){var c=g("a-button"),d=g("a-tooltip"),P=g("a-input"),G=g("a-form-item"),K=g("a-form"),E=g("a-table-column"),q=g("a-popconfirm"),M=g("a-table");return s(),x(C,null,[m("div",N,[y(S(z),{title:"角色管理"}),m("div",W,[m("div",D,[y(c,{type:"primary",style:{"margin-right":"10px",background:"#0058FF"},onClick:k},{icon:p(function(){return[y(S(O))]}),default:p(function(){return[u[1]||(u[1]=m("span",null,"添加",-1))]}),_:1}),y(K,{layout:"inline",model:i},{default:p(function(){return[y(G,null,{default:p(function(){return[y(P,{allowClear:"",value:i.keyWord,"onUpdate:value":u[0]||(u[0]=function(e){return i.keyWord=e}),placeholder:"请输入要查询的内容",style:{width:"280px"}},{suffix:p(function(){return[y(d,{title:"点击搜索",onClick:v},{default:p(function(){return[y(S(j),{style:{color:"rgba(0, 0, 0, 0.45)"}})]}),_:1})]}),_:1},8,["value"])]}),_:1})]}),_:1},8,["model"])]),m("div",null,[y(d,{onClick:f},{default:p(function(){return[y(S(R),{style:{"font-size":"16px"}})]}),_:1})])]),m("div",{ref_key:"table_container",ref:t,style:{"margin-top":"9px","border-top":"1px solid #eee",display:"flex","flex-direction":"column",overflow:"hidden",height:"0px","flex-grow":"1"}},[y(M,{"data-source":o.value,pagination:a,scroll:n,bordered:!0,loading:l.value,size:"middle"},{default:p(function(){return[y(E,{title:"序号",width:60,fixed:"left",align:"center"},{default:p(function(e){var t=e.index;return[m("div",null,F(t+1),1)]}),_:1}),y(E,{title:"角色标识","data-index":"id",width:150,fixed:"left",align:"center"}),y(E,{title:"角色名称","data-index":"name",width:200,fixed:"left"}),y(E,{title:"描述","data-index":"description","min-width":200}),y(E,{title:"操作",width:240,fixed:"right"},{default:p(function(e){var t=e.record;return[m("div",null,[m("a",{style:{"margin-left":"0px"},onClick:function(e){return function(e){var t;console.log(e),null===(t=_.value)||void 0===t||t.show(e)}(t)}},"查看",8,J),m("a",{style:{"margin-left":"26px"},onClick:function(e){return function(e){var t;console.log(e),null===(t=w.value)||void 0===t||t.update(e)}(t)}},"编辑",8,V),m("a",{style:{"margin-left":"26px"},onClick:function(e){return function(e){var t;console.log(e),null===(t=b.value)||void 0===t||t.update(e)}(t)}},"权限",8,B),y(q,{title:"确定删除?",okText:"确定",cancelText:"取消",onConfirm:function(e){return function(e){console.log(e);var t={id:e.id};r({url:"/role/delete",data:t},function(e){console.log(e),h.info(e.msg),f()})}(t)}},{default:p(function(){return["supermanager"!=t.id?(s(),x("a",Q,"删除")):T("",!0)]}),_:2},1032,["onConfirm"])])]}),_:1})]}),_:1},8,["data-source","pagination","scroll","loading"])],512)]),y(I,{ref_key:"addRef",ref:w,onOnSuccess:A},null,512),y(U,{ref_key:"detailRef",ref:_},null,512),y(H,{ref_key:"permissionRef",ref:b},null,512)],64)}}}),[["__scopeId","data-v-68fc58ba"]]))}}})}();
|