| 1 |
- !function(){function e(e){return function(e){if(Array.isArray(e))return n(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 n(e,t);var l={}.toString.call(e).slice(8,-1);return"Object"===l&&e.constructor&&(l=e.constructor.name),"Map"===l||"Set"===l?Array.from(e):"Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?n(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 n(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,l=Array(n);t<n;t++)l[t]=e[t];return l}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(n,t){"use strict";var l,a,o,r,i,u,d,c,f,s,p,v,b,m,g,y,h,x,w,_,k,C,S;return{setters:[function(e){l=e.p},function(e){a=e.d,o=e.i,r=e.v,i=e.k,u=e.n,d=e.o,c=e.b,f=e.w,s=e.H,p=e.r,v=e.c,b=e.y,m=e.e,g=e.p,y=e.f,h=e.F,x=e.Z,w=e.J,_=e.S,k=e._},null,function(e){C=e.C},function(e){S=e.R}],execute:function(){var t=document.createElement("style");t.textContent="[data-v-bf24cb9b] .ant-table-wrapper{height:0px;flex-grow:1}[data-v-bf24cb9b] .ant-spin-nested-loading{height:100%}[data-v-bf24cb9b] .ant-spin-container{height:100%;display:flex;flex-direction:column}[data-v-bf24cb9b] .ant-table{flex-grow:1;height:0px}[data-v-bf24cb9b] .ant-table-container{height:100%;display:flex;flex-direction:column}[data-v-bf24cb9b] .ant-table-body{overflow-y:auto!important;flex-grow:1;border-bottom:1px solid #eee;border-right:1px solid #eee}[data-v-bf24cb9b] .ant-table-body::-webkit-scrollbar{width:1px;height:8px;background:#0058FF}[data-v-bf24cb9b] .ant-table-body::-webkit-scrollbar-track{width:1px;background:#eee}[data-v-bf24cb9b] .ant-table-body::-webkit-scrollbar-thumb{width:1px;background:#0058FF}[data-v-bf24cb9b] .ant-table-body::-webkit-scrollbar-thumb:hover{background:#0058FF}[data-v-bf24cb9b] .ant-table-body::-webkit-scrollbar-corner{width:1px;background:#eee}.cus-forbidden[data-v-bf24cb9b]:hover{cursor:not-allowed}\n",document.head.appendChild(t);var U=a({__name:"Add",emits:["onSuccess"],setup:function(e,n){var t=n.expose,a=n.emit,m=o(null),g=o(!1),y=o(!0),h=a,x=o([{value:"01",label:"目录"},{value:"02",label:"菜单"},{value:"03",label:"按钮"},{value:"04",label:"功能"}]),w=r({id:void 0,pid:0,name:"",title:"",type:"",description:"",url:"",orders:0}),_=function(e){var n;console.log("handleOK",e),null===(n=m.value)||void 0===n||n.validate().then(function(){var e;console.log("11"),e="",e=y.value?"/permission/add":"/permission/edit",w.path instanceof Array&&(w.pid=w.path[w.path.length-1]),l({url:e,data:w},function(e){console.log(e),b.info(e.msg),C(),h("onSuccess",e)})},function(){console.log("22")})},k=function(){g.value=!0},C=function(){g.value=!1},S=o([]);return i(function(){console.log("onMounted")}),u(function(){console.log("onUnmounted")}),t({add:function(){var e;y.value=!0,s(w),null===(e=m.value)||void 0===e||e.clearValidate(),k()},update:function(e){var n;y.value=!1,Object.assign(w,e),e.path||(w.path=[]),null===(n=m.value)||void 0===n||n.clearValidate(),k()},updateOption:function(e){S.value=e}}),function(e,n){var t=p("a-input"),l=p("a-form-item"),a=p("a-select"),o=p("a-cascader"),r=p("a-textarea"),i=p("a-form"),u=p("a-modal");return d(),c(u,{title:"添加资源",visible:g.value,"onUpdate:visible":n[7]||(n[7]=function(e){return g.value=e}),maskClosable:!1,bodyStyle:{height:"500px","overflow-y":"auto"},cancelText:"取消",okText:"确定",onOk:_},{default:f(function(){return[v(i,{ref_key:"formRef",ref:m,model:w,name:"basic","label-align":"left","label-col":{span:4},"wrapper-col":{span:20},autocomplete:"off",layout:"vertical"},{default:f(function(){return[v(l,{"wrapper-col":{offset:0,span:24},label:"资源名称",name:"name",rules:[{required:!0,message:"请输入用户名!"}]},{default:f(function(){return[v(t,{size:"large",value:w.name,"onUpdate:value":n[0]||(n[0]=function(e){return w.name=e})},null,8,["value"])]}),_:1}),v(l,{"wrapper-col":{offset:0,span:24},label:"资源标识",name:"title",rules:[{required:!0,message:"请输入资源标题!"}]},{default:f(function(){return[v(t,{size:"large",value:w.title,"onUpdate:value":n[1]||(n[1]=function(e){return w.title=e})},null,8,["value"])]}),_:1}),v(l,{"wrapper-col":{offset:0,span:24},label:"资源类型",name:"type",rules:[{required:!0,message:"请输入设备名称!"}]},{default:f(function(){return[v(a,{size:"large",value:w.type,"onUpdate:value":n[2]||(n[2]=function(e){return w.type=e}),options:x.value},null,8,["value","options"])]}),_:1}),v(l,{"wrapper-col":{offset:0,span:24},label:"上级资源",name:"path"},{default:f(function(){return[v(o,{fieldNames:{label:"name",value:"id"},value:w.path,"onUpdate:value":n[3]||(n[3]=function(e){return w.path=e}),options:S.value,placeholder:"请选择上级资源","change-on-select":"",size:"large"},null,8,["value","options"])]}),_:1}),v(l,{"wrapper-col":{offset:0,span:24},label:"排序",name:"orders"},{default:f(function(){return[v(t,{size:"large",value:w.orders,"onUpdate:value":n[4]||(n[4]=function(e){return w.orders=e})},null,8,["value"])]}),_:1}),v(l,{"wrapper-col":{offset:0,span:24},label:"请求路径",name:"url"},{default:f(function(){return[v(t,{size:"large",value:w.url,"onUpdate:value":n[5]||(n[5]=function(e){return w.url=e})},null,8,["value"])]}),_:1}),v(l,{"wrapper-col":{offset:0,span:24},label:"描述",name:"description",rules:[{required:!1,message:"请输入设备名称!"}]},{default:f(function(){return[v(r,{value:w.description,"onUpdate:value":n[6]||(n[6]=function(e){return w.description=e}),placeholder:"请输入描述","allow-clear":""},null,8,["value"])]}),_:1})]}),_:1},8,["model"])]}),_:1},8,["visible"])}}}),z=a({__name:"Detail",setup:function(n,t){var l=t.expose,a=o(!1),r=function(e){console.log(e),a.value=!1};return i(function(){}),l({show:function(){a.value=!0},hidden:function(){a.value=!1}}),function(n,t){var l=p("a-modal");return d(),c(l,{title:"产品功能",visible:a.value,"onUpdate:visible":t[0]||(t[0]=function(e){return a.value=e}),maskClosable:!1,width:480,cancelText:"取消",okText:"确定",onOk:r},{default:f(function(){return e(t[1]||(t[1]=[m("div",null," 详情 ",-1)]))}),_:1},8,["visible"])}}}),j={class:"cus-animation",style:{height:"100%",width:"100%",padding:"16px 20px",display:"flex","flex-direction":"column"}},A={style:{display:"flex","justify-content":"space-between","align-items":"flex-end"}},F={style:{display:"flex"}},O={style:{"font-weight":"bold"}},T={key:0},q={key:1},I={key:2},R={key:3},N={key:4,style:{color:"red"}},W=["onClick"],E=["onClick"];n("default",k(a({__name:"Index",setup:function(n){var t=r({x:1600}),a=o([]),u=o(!1),c=r({size:20,page:1,sort:"orders",order:"asc",keyWord:""}),s=function(){u.value=!0,l({url:"/permission/list",data:void 0},function(e){var n,t=e.data;console.log(t);var l=x(t);console.log(l),a.value=l,u.value=!1,null===(n=H.value)||void 0===n||n.updateOption(l)})},k=function(){s()},H=o(null),M=function(e){var n;console.log(e),null===(n=H.value)||void 0===n||n.add()},V=o(null),D=function(e){console.log(e),s()},J=o(null);return i(function(){var e;t.y=(null===(e=J.value)||void 0===e?void 0:e.clientHeight)-113,s()}),function(n,o){var r=p("a-button"),i=p("a-tooltip"),x=p("a-input"),K=p("a-form-item"),Z=p("a-form"),$=p("a-table-column"),B=p("a-popconfirm"),G=p("a-table");return d(),g(h,null,[m("div",j,[v(y(C),{title:"资源管理"}),m("div",A,[m("div",F,[v(r,{type:"primary",style:{"margin-right":"10px",background:"#0058FF"},onClick:M},{icon:f(function(){return[v(y(w))]}),default:f(function(){return[o[1]||(o[1]=m("span",null,"添加",-1))]}),_:1}),v(Z,{layout:"inline",model:c},{default:f(function(){return[v(K,null,{default:f(function(){return[v(x,{allowClear:"",value:c.keyWord,"onUpdate:value":o[0]||(o[0]=function(e){return c.keyWord=e}),placeholder:"请输入要查询的内容",style:{width:"280px"}},{suffix:f(function(){return[v(i,{title:"点击搜索",onClick:k},{default:f(function(){return[v(y(_),{style:{color:"rgba(0, 0, 0, 0.45)"}})]}),_:1})]}),_:1},8,["value"])]}),_:1})]}),_:1},8,["model"])]),m("div",null,[v(i,{onClick:s},{default:f(function(){return[v(y(S),{style:{"font-size":"16px"}})]}),_:1})])]),m("div",{ref_key:"table_container",ref:J,style:{"margin-top":"9px","border-top":"1px solid #eee",display:"flex","flex-direction":"column",overflow:"hidden",height:"0px","flex-grow":"1"}},[v(G,{"data-source":a.value,pagination:!1,scroll:t,bordered:!0,loading:u.value,size:"middle",indentSize:15},{default:f(function(){return[v($,{"data-index":"title",width:180,fixed:"left"},{title:f(function(){return e(o[2]||(o[2]=[m("span",{style:{"margin-left":"23px"}},"功能名称",-1)]))}),_:1}),v($,{title:"功能类型",width:180,fixed:"left"},{default:f(function(e){var n=e.record;return[m("div",O,["01"==n.type?(d(),g("span",T,"目录")):"02"==n.type?(d(),g("span",q,"菜单")):"03"==n.type?(d(),g("span",I,"按钮")):"04"==n.type?(d(),g("span",R,"功能")):(d(),g("span",N,"未知"))])]}),_:1}),v($,{title:"排序","data-index":"orders",width:180}),v($,{title:"请求路径","data-index":"url",width:200}),v($,{title:"描述","data-index":"description","min-width":200}),v($,{title:"操作",width:200,fixed:"right"},{default:f(function(n){var t=n.record;return[m("div",null,[m("a",{style:{"margin-left":"0px"},onClick:function(e){return function(e){var n;console.log(e),null===(n=V.value)||void 0===n||n.show(e)}(t)}},"查看",8,W),m("a",{style:{"margin-left":"26px"},onClick:function(e){return function(e){var n;console.log(e),null===(n=H.value)||void 0===n||n.update(e)}(t)}},"编辑",8,E),v(B,{title:"确定删除?",okText:"确定",cancelText:"取消",onConfirm:function(e){return function(e){console.log(e);var n={id:e.id};l({url:"/permission/delete",data:n},function(e){console.log(e),b.info(e.msg),s()})}(t)}},{default:f(function(){return e(o[3]||(o[3]=[m("a",{style:{"margin-left":"26px"}},"删除",-1)]))}),_:1},8,["onConfirm"])])]}),_:1})]}),_:1},8,["data-source","scroll","loading"])],512)]),v(U,{ref_key:"addRef",ref:H,onOnSuccess:D},null,512),v(z,{ref_key:"detailRef",ref:V},null,512)],64)}}}),[["__scopeId","data-v-bf24cb9b"]]))}}})}();
|