2 lines
5.5 KiB
JavaScript
Executable File
2 lines
5.5 KiB
JavaScript
Executable File
import{B as z,C as O,Q,R as G,w as H,D as J,I as W,L as X,_ as Y,M as Z,N as ee}from"./element-plus.317dd699.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.f549c02e.js";import{j as oe,f as ae,b as le}from"./index.ffa405f0.js";import{d as $,s as ne,r as D,$ as se,a4 as ie,af as ue,o as l,c as x,U as e,L as t,K as r,u as n,R as de,a9 as R,a as E,M as p,k as re,S as i,n as T}from"./@vue.e8706010.js";import{c as me,i as pe}from"./dict.b8431f80.js";import{u as ce}from"./usePaging.160b82b8.js";import{_ as _e}from"./edit.vue_vue_type_script_setup_true_lang.88efb7ec.js";import"./@vueuse.1e5a6e21.js";import"./@element-plus.196c7323.js";import"./lodash-es.29c53eac.js";import"./dayjs.f7363e4f.js";import"./axios.3af9fe4b.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"./lodash.873faf2b.js";import"./vue-router.12d45bc3.js";import"./pinia.dfca86b4.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.1a2c9cae.js";import"./color.3050aad5.js";import"./clone.3b081931.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.21f7a9fd.js";import"./ms.a9ae1d6d.js";import"./nprogress.fd69c5bf.js";import"./vue-clipboard3.9796a14d.js";import"./clipboard.2bdac801.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.2cdc8407.js";import"./index.882ba4be.js";const fe={class:"dict-type"},ye=i("\u67E5\u8BE2"),ve=i("\u91CD\u7F6E"),Ce=i(" \u65B0\u589E "),ge=i(" \u5220\u9664 "),he={class:"mt-4"},be=i("\u6B63\u5E38"),ke=i("\u505C\u7528"),Ee=i(" \u7F16\u8F91 "),Be=i(" \u6570\u636E\u7BA1\u7406 "),we=i(" \u5220\u9664 "),Fe={class:"flex justify-end mt-4"},Ve=$({name:"dictType"}),_t=$({...Ve,setup(De){const y=ne(),v=D(!1),u=se({name:"",type:"",status:""}),{pager:c,getLists:C,resetPage:h,resetParams:K}=ce({fetchFun:me,params:u}),b=D([]),P=s=>{b.value=s.map(({id:o})=>o)},S=async()=>{var s;v.value=!0,await T(),(s=y.value)==null||s.open("add")},L=async s=>{var o,_;v.value=!0,await T(),(o=y.value)==null||o.open("edit"),(_=y.value)==null||_.setFormData(s)},B=async s=>{await ae.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await pe({id:s}),C()};return C(),(s,o)=>{const _=z,g=O,k=Q,N=G,m=H,U=J,w=W,F=le,d=X,V=Y,A=ie("router-link"),I=Z,j=te,f=ue("perms"),q=ee;return l(),x("div",fe,[e(w,{class:"!border-none",shadow:"never"},{default:t(()=>[e(U,{ref:"formRef",class:"mb-[-16px]",model:u,inline:""},{default:t(()=>[e(g,{label:"\u5B57\u5178\u540D\u79F0"},{default:t(()=>[e(_,{class:"w-[280px]",modelValue:u.name,"onUpdate:modelValue":o[0]||(o[0]=a=>u.name=a),clearable:"",onKeyup:R(n(h),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(g,{label:"\u5B57\u5178\u7C7B\u578B"},{default:t(()=>[e(_,{class:"w-[280px]",modelValue:u.type,"onUpdate:modelValue":o[1]||(o[1]=a=>u.type=a),clearable:"",onKeyup:R(n(h),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(g,{label:"\u72B6\u6001"},{default:t(()=>[e(N,{class:"w-[280px]",modelValue:u.status,"onUpdate:modelValue":o[2]||(o[2]=a=>u.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(g,null,{default:t(()=>[e(m,{type:"primary",onClick:n(h)},{default:t(()=>[ye]),_:1},8,["onClick"]),e(m,{onClick:n(K)},{default:t(()=>[ve]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),e(w,{class:"!border-none mt-4",shadow:"never"},{default:t(()=>[E("div",null,[p((l(),r(m,{type:"primary",onClick:S},{icon:t(()=>[e(F,{name:"el-icon-Plus"})]),default:t(()=>[Ce]),_:1})),[[f,["setting.dict.dict_type/add"]]]),p((l(),r(m,{disabled:!b.value.length,type:"danger",onClick:o[3]||(o[3]=a=>B(b.value))},{icon:t(()=>[e(F,{name:"el-icon-Delete"})]),default:t(()=>[ge]),_:1},8,["disabled"])),[[f,["setting.dict.dict_type/delete"]]])]),p((l(),x("div",he,[E("div",null,[e(I,{data:n(c).lists,size:"large",onSelectionChange:P},{default:t(()=>[e(d,{type:"selection",width:"55"}),e(d,{label:"ID",prop:"id"}),e(d,{label:"\u5B57\u5178\u540D\u79F0",prop:"name","min-width":"120"}),e(d,{label:"\u5B57\u5178\u7C7B\u578B",prop:"type","min-width":"120"}),e(d,{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(d,{label:"\u5907\u6CE8",prop:"remark","show-tooltip-when-overflow":""}),e(d,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","min-width":"180"}),e(d,{label:"\u64CD\u4F5C",width:"190",fixed:"right"},{default:t(({row:a})=>[p((l(),r(m,{link:"",type:"primary",onClick:M=>L(a)},{default:t(()=>[Ee]),_:2},1032,["onClick"])),[[f,["setting.dict.dict_type/edit"]]]),p((l(),r(m,{type:"primary",link:""},{default:t(()=>[e(A,{to:{path:n(oe)("setting.dict.dict_data/lists"),query:{id:a.id}}},{default:t(()=>[Be]),_:2},1032,["to"])]),_:2},1024)),[[f,["setting.dict.dict_data/lists"]]]),p((l(),r(m,{link:"",type:"danger",onClick:M=>B(a.id)},{default:t(()=>[we]),_:2},1032,["onClick"])),[[f,["setting.dict.dict_type/delete"]]])]),_:1})]),_:1},8,["data"])]),E("div",Fe,[e(j,{modelValue:n(c),"onUpdate:modelValue":o[4]||(o[4]=a=>re(c)?c.value=a:null),onChange:n(C)},null,8,["modelValue","onChange"])])])),[[q,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{_t as default};
|