2 lines
5.5 KiB
JavaScript
2 lines
5.5 KiB
JavaScript
import{I as j,y as z,G,H,w as J,D as Q,C as W,L as X,V as Y,M as Z,N as ee}from"./element-plus.258bf9e7.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.60e89e82.js";import{l as oe,f as ae,a as le}from"./index.ec401e3b.js";import{d as P,s as ne,r as D,a0 as se,a5 as ie,ai as ue,o as l,c as x,V as e,M as t,L as r,u as n,S as de,aa as T,a as E,O as m,k as re,T as u,n as $}from"./@vue.ab566ce7.js";import{c as pe,i as me}from"./dict.771ee3e5.js";import{u as ce}from"./usePaging.f6660143.js";import{_ as _e}from"./edit.vue_vue_type_script_setup_true_lang.60b1d9ef.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.1d82ee7c.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.50cbfcc9.js";import"./tslib.60310f1a.js";import"./zrender.a255a587.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.9492d03b.js";const fe={class:"dict-type"},ye=u("\u67E5\u8BE2"),ve=u("\u91CD\u7F6E"),Ce=u(" \u65B0\u589E "),he=u(" \u5220\u9664 "),ge={class:"mt-4"},be=u("\u6B63\u5E38"),ke=u("\u505C\u7528"),Ee=u(" \u7F16\u8F91 "),we=u(" \u6570\u636E\u7BA1\u7406 "),Be=u(" \u5220\u9664 "),Fe={class:"flex justify-end mt-4"},Ve=P({name:"dictType"}),ct=P({...Ve,setup(De){const y=ne(),v=D(!1),d=se({name:"",type:"",status:""}),{pager:c,getLists:C,resetPage:g,resetParams:R}=ce({fetchFun:pe,params:d}),b=D([]),S=s=>{b.value=s.map(({id:o})=>o)},K=async()=>{var s;v.value=!0,await $(),(s=y.value)==null||s.open("add")},L=async s=>{var o,_;v.value=!0,await $(),(o=y.value)==null||o.open("edit"),(_=y.value)==null||_.setFormData(s)},w=async s=>{await ae.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await me({id:s}),C()};return C(),(s,o)=>{const _=j,h=z,k=G,N=H,p=J,A=Q,B=W,F=le,i=X,V=Y,I=ie("router-link"),U=Z,q=te,f=ue("perms"),M=ee;return l(),x("div",fe,[e(B,{class:"!border-none",shadow:"never"},{default:t(()=>[e(A,{ref:"formRef",class:"mb-[-16px]",model:d,inline:""},{default:t(()=>[e(h,{label:"\u5B57\u5178\u540D\u79F0"},{default:t(()=>[e(_,{class:"w-[280px]",modelValue:d.name,"onUpdate:modelValue":o[0]||(o[0]=a=>d.name=a),clearable:"",onKeyup:T(n(g),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(h,{label:"\u5B57\u5178\u7C7B\u578B"},{default:t(()=>[e(_,{class:"w-[280px]",modelValue:d.type,"onUpdate:modelValue":o[1]||(o[1]=a=>d.type=a),clearable:"",onKeyup:T(n(g),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(h,{label:"\u72B6\u6001"},{default:t(()=>[e(N,{class:"w-[280px]",modelValue:d.status,"onUpdate:modelValue":o[2]||(o[2]=a=>d.status=a)},{default:t(()=>[e(k,{label:"\u5168\u90E8",value:""}),e(k,{label:"\u6B63\u5E38",value:1}),e(k,{label:"\u505C\u7528",value:0})]),_:1},8,["modelValue"])]),_:1}),e(h,null,{default:t(()=>[e(p,{type:"primary",onClick:n(g)},{default:t(()=>[ye]),_:1},8,["onClick"]),e(p,{onClick:n(R)},{default:t(()=>[ve]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),e(B,{class:"!border-none mt-4",shadow:"never"},{default:t(()=>[E("div",null,[m((l(),r(p,{type:"primary",onClick:K},{icon:t(()=>[e(F,{name:"el-icon-Plus"})]),default:t(()=>[Ce]),_:1})),[[f,["setting.dict.dict_type/add"]]]),m((l(),r(p,{disabled:!b.value.length,type:"danger",onClick:o[3]||(o[3]=a=>w(b.value))},{icon:t(()=>[e(F,{name:"el-icon-Delete"})]),default:t(()=>[he]),_:1},8,["disabled"])),[[f,["setting.dict.dict_type/delete"]]])]),m((l(),x("div",ge,[E("div",null,[e(U,{data:n(c).lists,size:"large",onSelectionChange:S},{default:t(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(i,{label:"ID",prop:"id"}),e(i,{label:"\u5B57\u5178\u540D\u79F0",prop:"name","min-width":"120"}),e(i,{label:"\u5B57\u5178\u7C7B\u578B",prop:"type","min-width":"120"}),e(i,{label:"\u72B6\u6001"},{default:t(({row:a})=>[a.status==1?(l(),r(V,{key:0},{default:t(()=>[be]),_:1})):(l(),r(V,{key:1,type:"danger"},{default:t(()=>[ke]),_:1}))]),_:1}),e(i,{label:"\u5907\u6CE8",prop:"remark","show-tooltip-when-overflow":""}),e(i,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","min-width":"180"}),e(i,{label:"\u64CD\u4F5C",width:"190",fixed:"right"},{default:t(({row:a})=>[m((l(),r(p,{link:"",type:"primary",onClick:O=>L(a)},{default:t(()=>[Ee]),_:2},1032,["onClick"])),[[f,["setting.dict.dict_type/edit"]]]),m((l(),r(p,{type:"primary",link:""},{default:t(()=>[e(I,{to:{path:n(oe)("setting.dict.dict_data/lists"),query:{id:a.id}}},{default:t(()=>[we]),_:2},1032,["to"])]),_:2},1024)),[[f,["setting.dict.dict_data/lists"]]]),m((l(),r(p,{link:"",type:"danger",onClick:O=>w(a.id)},{default:t(()=>[Be]),_:2},1032,["onClick"])),[[f,["setting.dict.dict_type/delete"]]])]),_:1})]),_:1},8,["data"])]),E("div",Fe,[e(q,{modelValue:n(c),"onUpdate:modelValue":o[4]||(o[4]=a=>re(c)?c.value=a:null),onChange:n(C)},null,8,["modelValue","onChange"])])])),[[M,n(c).loading]])]),_:1}),v.value?(l(),r(_e,{key:0,ref_key:"editRef",ref:y,onSuccess:n(C),onClose:o[5]||(o[5]=a=>v.value=!1)},null,8,["onSuccess"])):de("",!0)])}}});export{ct as default};
|