2 lines
4.3 KiB
JavaScript
2 lines
4.3 KiB
JavaScript
import{C as j,D as A,w as M,F as q,L as K,M as O,N as Q,O as Z}from"./element-plus.7e347b00.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.af250dfd.js";import{f as G,b as H}from"./index.fd76ab8a.js";import{u as J}from"./usePaging.6a6670f9.js";import{u as W}from"./useDictOptions.dc8aa87e.js";import{e as X,a as Y}from"./user_label.59ec81bb.js";import"./lodash.4e6d2a38.js";import{_ as ee}from"./edit.vue_vue_type_script_setup_true_name_userLabelEdit_lang.c5a56069.js";import{d as y,s as te,r as g,Z as ae,ap as oe,o as s,c as le,U as e,L as t,u as a,R as r,M as p,K as m,a as w,j as ne,Q as se,n as D}from"./@vue.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.1071aff1.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const ie={class:"mt-4"},re={class:"flex mt-4 justify-end"},me=y({name:"userLabelLists"}),Xe=y({...me,setup(ue){const d=te(),c=g(!1),_=ae({label_name:""}),k=g([]),B=l=>{k.value=l.map(({label_id:o})=>o)},{dictData:V}=W(""),{pager:u,getLists:f,resetParams:x,resetPage:L}=J({fetchFun:Y,params:_}),$=async()=>{var l;c.value=!0,await D(),(l=d.value)==null||l.open("add")},N=async l=>{var o,b;c.value=!0,await D(),(o=d.value)==null||o.open("edit"),(b=d.value)==null||b.setFormData(l)},E=async l=>{await G.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await X({label_id:l}),f()};return f(),(l,o)=>{const b=j,h=A,i=M,P=q,F=K,R=H,v=O,U=Q,S=z,C=oe("perms"),T=Z;return s(),le("div",null,[e(F,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(P,{class:"mb-[-16px]",model:a(_),inline:""},{default:t(()=>[e(h,{label:"\u6807\u7B7E\u540D\u79F0",prop:"label_name"},{default:t(()=>[e(b,{class:"w-[280px]",modelValue:a(_).label_name,"onUpdate:modelValue":o[0]||(o[0]=n=>a(_).label_name=n),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6807\u7B7E\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(h,null,{default:t(()=>[e(i,{type:"primary",onClick:a(L)},{default:t(()=>[r("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(i,{onClick:a(x)},{default:t(()=>[r("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),p((s(),m(F,{class:"!border-none",shadow:"never"},{default:t(()=>[p((s(),m(i,{type:"primary",onClick:$},{icon:t(()=>[e(R,{name:"el-icon-Plus"})]),default:t(()=>[r(" \u65B0\u589E ")]),_:1})),[[C,["user_label.user_label/add"]]]),p((s(),m(i,{disabled:!a(k).length,onClick:o[1]||(o[1]=n=>E(a(k)))},{default:t(()=>[r(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[C,["user_label.user_label/delete"]]]),w("div",ie,[e(U,{data:a(u).lists,onSelectionChange:B},{default:t(()=>[e(v,{type:"selection",width:"55"}),e(v,{label:"ID",prop:"label_id",width:"100"}),e(v,{label:"\u6807\u7B7E\u540D\u79F0",prop:"label_name","show-overflow-tooltip":""}),e(v,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:n})=>[p((s(),m(i,{type:"primary",link:"",onClick:I=>N(n)},{default:t(()=>[r(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[C,["user_label.user_label/edit"]]]),p((s(),m(i,{type:"danger",link:"",onClick:I=>E(n.label_id)},{default:t(()=>[r(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[C,["user_label.user_label/delete"]]])]),_:1})]),_:1},8,["data"])]),w("div",re,[e(S,{modelValue:a(u),"onUpdate:modelValue":o[2]||(o[2]=n=>ne(u)?u.value=n:null),onChange:a(f)},null,8,["modelValue","onChange"])])]),_:1})),[[T,a(u).loading]]),a(c)?(s(),m(ee,{key:0,ref_key:"editRef",ref:d,"dict-data":a(V),onSuccess:a(f),onClose:o[3]||(o[3]=n=>c.value=!1)},null,8,["dict-data","onSuccess"])):se("",!0)])}}});export{Xe as default};
|