Index-legacy-bc4f7b0b.js 9.6 KB

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