data_center/public/admin/assets/index.ece0e356.js

2 lines
5.2 KiB
JavaScript

import{B as M,C as O,w as z,D as G,I as H,O as J,P as W,Q as X}from"./element-plus.9c2fdfa8.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.261df48b.js";import{f as Z,b as ee}from"./index.6e8143ba.js";import{u as oe}from"./usePaging.c22e2b6f.js";import{u as te}from"./useDictOptions.a13e8a93.js";import{a as ae,e as le}from"./user_role.8b15b571.js";import"./lodash.47b8af7d.js";import{_ as se}from"./edit.vue_vue_type_script_setup_true_name_userRoleEdit_lang.161a07de.js";import{_ as ne}from"./auth.vue_vue_type_script_setup_true_lang.110012d3.js";import{d as R,s as B,r as y,$ as re,af as ie,o as n,c as ue,U as o,L as a,M as c,u as t,K as i,Q as $,R as p,a as x,k as me,n as D}from"./@vue.53f8d7c3.js";import"./@vueuse.038954e7.js";import"./@element-plus.37f92579.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.96be3cef.js";import"./vue-router.e2f4a118.js";import"./pinia.bd103f5d.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.efc99072.js";import"./color.e83714e9.js";import"./clone.fb54e01d.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.b4b577c6.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.9cf3e967.js";import"./index.6be73b2c.js";import"./index.vue_vue_type_style_index_0_scoped_187b1ead_lang.33043b78.js";import"./user_menu.7fa3aa0e.js";const pe={class:"mt-4"},de={class:"flex mt-4 justify-end"},ce=R({name:"userRoleLists"}),so=R({...ce,setup(_e){const C=B(),F=y(!1),d=re({name:"",desc:"",menu_arr:"",sort:""}),k=y([]),P=s=>{k.value=s.map(({id:e})=>e)},{dictData:S}=te(""),{pager:_,getLists:f,resetParams:U,resetPage:L}=oe({fetchFun:ae,params:d}),A=async()=>{var s;F.value=!0,await D(),(s=C.value)==null||s.open("add")},I=async s=>{var e,r;F.value=!0,await D(),(e=C.value)==null||e.open("edit"),(r=C.value)==null||r.setFormData(s)},w=B(),h=y(!1),N=async s=>{var e,r;h.value=!0,await D(),(e=w.value)==null||e.open(),(r=w.value)==null||r.setFormData(s)},g=async s=>{await Z.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await le({id:s}),f()};return f(),(s,e)=>{const r=M,b=O,u=z,T=G,E=H,Q=ee,m=J,j=W,q=Y,v=ie("perms"),K=X;return n(),ue("div",null,[o(E,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[o(T,{class:"mb-[-16px]",model:t(d),inline:""},{default:a(()=>[o(b,{label:"\u540D\u79F0",prop:"name"},{default:a(()=>[o(r,{class:"w-[280px]",modelValue:t(d).name,"onUpdate:modelValue":e[0]||(e[0]=l=>t(d).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(b,{label:"\u63CF\u8FF0",prop:"desc"},{default:a(()=>[o(r,{class:"w-[280px]",modelValue:t(d).desc,"onUpdate:modelValue":e[1]||(e[1]=l=>t(d).desc=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u63CF\u8FF0"},null,8,["modelValue"])]),_:1}),o(b,null,{default:a(()=>[o(u,{type:"primary",onClick:t(L)},{default:a(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(u,{onClick:t(U)},{default:a(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),c((n(),i(E,{class:"!border-none",shadow:"never"},{default:a(()=>[c((n(),i(u,{type:"primary",onClick:A},{icon:a(()=>[o(Q,{name:"el-icon-Plus"})]),default:a(()=>[p(" \u65B0\u589E ")]),_:1})),[[v,["user.user_role/add"]]]),c((n(),i(u,{disabled:!t(k).length,onClick:e[2]||(e[2]=l=>g(t(k)))},{default:a(()=>[p(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[v,["user.user_role/delete"]]]),x("div",pe,[o(j,{data:t(_).lists,onSelectionChange:P},{default:a(()=>[o(m,{type:"selection",width:"55"}),o(m,{label:"ID",prop:"id","show-overflow-tooltip":""}),o(m,{label:"\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),o(m,{label:"\u63CF\u8FF0",prop:"desc","show-overflow-tooltip":""}),o(m,{label:"\u6743\u9650id",prop:"menu_arr","show-overflow-tooltip":""}),o(m,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),o(m,{label:"\u64CD\u4F5C",width:"210",fixed:"right"},{default:a(({row:l})=>[c((n(),i(u,{type:"primary",link:"",onClick:V=>I(l)},{default:a(()=>[p(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[v,["user.user_role/edit"]]]),c((n(),i(u,{link:"",type:"primary",onClick:V=>N(l)},{default:a(()=>[p(" \u5206\u914D\u6743\u9650 ")]),_:2},1032,["onClick"])),[[v,["auth.role/edit"]]]),c((n(),i(u,{type:"danger",link:"",onClick:V=>g(l.id)},{default:a(()=>[p(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[v,["user.user_role/delete"]]])]),_:1})]),_:1},8,["data"])]),x("div",de,[o(q,{modelValue:t(_),"onUpdate:modelValue":e[3]||(e[3]=l=>me(_)?_.value=l:null),onChange:t(f)},null,8,["modelValue","onChange"])])]),_:1})),[[K,t(_).loading]]),t(F)?(n(),i(se,{key:0,ref_key:"editRef",ref:C,"dict-data":t(S),onSuccess:t(f),onClose:e[4]||(e[4]=l=>F.value=!1)},null,8,["dict-data","onSuccess"])):$("",!0),t(h)?(n(),i(ne,{key:1,ref_key:"authRef",ref:w,onSuccess:t(f),onClose:e[5]||(e[5]=l=>h.value=!1)},null,8,["onSuccess"])):$("",!0)])}}});export{so as default};