WokerTask/public/admin/assets/index.63ad9382.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.10e48c93.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.579ca8f7.js";import{f as Z,b as ee}from"./index.5a613cc5.js";import{u as oe}from"./usePaging.60d02673.js";import{u as te}from"./useDictOptions.d46d4fb9.js";import{e as ae,a as le}from"./user_role.22f7a8dd.js";import"./lodash.08438971.js";import{_ as se}from"./edit.vue_vue_type_script_setup_true_name_userRoleEdit_lang.ca7f8fe1.js";import{_ as ne}from"./auth.vue_vue_type_script_setup_true_lang.3837b2e2.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,u as t,R as p,M as c,K as i,a as $,k as me,Q as x,n as D}from"./@vue.51d7f2d8.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.105476b3.js";import"./vue-router.9f65afb1.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.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.40d5feba.js";import"./index.cfb3fa32.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.js";import"./user_menu.7cf51c9f.js";const pe={class:"mt-4"},de={class:"flex mt-4 justify-end"},ce=R({name:"userRoleLists"}),lo=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:le,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 ae({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"]]]),$("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"])]),$("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"])):x("",!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"])):x("",!0)])}}});export{lo as default};