WokerTask/public/admin/assets/index.20afcf1a.js

2 lines
5.3 KiB
JavaScript

import{C as W,D as z,w as G,F as H,J as K,P as M,Q as O,R as X}from"./element-plus.ff90c99c.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import{f as Z,b as ee}from"./index.87cea444.js";import{u as oe}from"./usePaging.bd7a7dec.js";import{u as te}from"./useDictOptions.15bfecbd.js";import{e as ae,a as le}from"./user_role.914ee5b4.js";import"./lodash.3e731b89.js";import{_ as se}from"./edit.vue_vue_type_script_setup_true_name_userRoleEdit_lang.d71a3497.js";import{_ as ne}from"./auth.vue_vue_type_script_setup_true_lang.5974777a.js";import{d as B,s as R,r as y,$ as re,aq as ie,o as n,c as ue,W as o,Q as a,u as t,U as p,R as c,P as i,a as $,j as me,T as x,n as D}from"./@vue.f8dfc830.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./axios.c2babb35.js";import"./vue-router.6d4cf914.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.3a7f085f.js";import"./color.5ae3e2dd.js";import"./clone.7bcb5228.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.37836f15.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.79024f1a.js";import"./index.000b2a9c.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";import"./user_menu.0e0cbf65.js";const pe={class:"mt-4"},de={class:"flex mt-4 justify-end"},ce=B({name:"userRoleLists"}),ro=B({...ce,setup(_e){const C=R(),F=y(!1),d=re({name:"",desc:"",menu_arr:"",sort:""}),w=y([]),P=s=>{w.value=s.map(({id:e})=>e)},{dictData:S}=te(""),{pager:_,getLists:f,resetParams:U,resetPage:T}=oe({fetchFun:le,params:d}),A=async()=>{var s;F.value=!0,await D(),(s=C.value)==null||s.open("add")},L=async s=>{var e,r;F.value=!0,await D(),(e=C.value)==null||e.open("edit"),(r=C.value)==null||r.setFormData(s)},h=R(),k=y(!1),N=async s=>{var e,r;k.value=!0,await D(),(e=h.value)==null||e.open(),(r=h.value)==null||r.setFormData(s)},g=async s=>{await Z.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ae({id:s}),f()};return f(),(s,e)=>{const r=W,b=z,u=G,I=H,E=K,j=ee,m=M,q=O,Q=Y,v=ie("perms"),J=X;return n(),ue("div",null,[o(E,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[o(I,{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(T)},{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(j,{name:"el-icon-Plus"})]),default:a(()=>[p(" \u65B0\u589E ")]),_:1})),[[v,["user.user_role/add"]]]),c((n(),i(u,{disabled:!t(w).length,onClick:e[2]||(e[2]=l=>g(t(w)))},{default:a(()=>[p(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[v,["user.user_role/delete"]]]),$("div",pe,[o(q,{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=>L(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"])]),$("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})),[[J,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"])):x("",!0),t(k)?(n(),i(ne,{key:1,ref_key:"authRef",ref:h,onSuccess:t(f),onClose:e[5]||(e[5]=l=>k.value=!1)},null,8,["onSuccess"])):x("",!0)])}}});export{ro as default};