2024-06-25 16:56:14 +08:00
|
|
|
import{P as Q,a0 as W,Q as G,R as J,D as X,C as Y,w as Z,F as ee,I as te,L as ae,M as oe,N as le}from"./element-plus.0a93cab1.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_lang.3863431c.js";import{f as se,b as ie}from"./index.f0edef73.js";import{u as ue}from"./vue-router.43c06794.js";import{d as L,r as P,s as de,a0 as T,am as re,o as s,c as w,W as e,O as a,u as o,V as me,a7 as pe,M as d,a8 as ce,T as r,a as D,P as v,j as _e,S as fe,n as R}from"./@vue.c3e77981.js";import{c as ye,e as ve,f as ge}from"./dict.68a354fe.js";import{u as be}from"./usePaging.d25ebf19.js";import{_ as Ce}from"./edit.vue_vue_type_script_setup_true_lang.305e75eb.js";import"./@vueuse.a48d0173.js";import"./@element-plus.12c58ce2.js";import"./lodash-es.2b5acb28.js";import"./dayjs.16ed1fda.js";import"./axios.a8078129.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.b082b0c1.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.a2abcd4b.js";import"./pinia.b5130627.js";import"./css-color-function.975e80a5.js";import"./color.d986aa86.js";import"./clone.704d8332.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.ded7f805.js";import"./vue-clipboard3.987889a8.js";import"./clipboard.af74a91f.js";import"./echarts.8535e5a6.js";import"./zrender.3eba8991.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b8b719e9.js";import"./index.7aed2c51.js";const Ee={class:"dict-type"},ke={class:"mt-4"},we={class:"flex justify-end mt-4"},De=L({name:"dictData"}),dt=L({...De,setup(Fe){const{query:N}=ue(),g=P(!1),_=de(),i=T({type:"",type_id:Number(N.id),name:"",status:""}),E=T({dict_type:[]}),{pager:f,getLists:y,resetPage:F,resetParams:S}=be({fetchFun:ge,params:i}),k=P([]),A=n=>{k.value=n.map(({id:t})=>t)},I=async()=>{var t,m;g.value=!0,await R();const n=E.dict_type.find(p=>p.id==i.type_id);(t=_.value)==null||t.setFormData({type_value:n==null?void 0:n.type,type_id:n.id}),(m=_.value)==null||m.open("add")},U=async n=>{var t,m;g.value=!0,await R(),(t=_.value)==null||t.open("edit"),(m=_.value)==null||m.setFormData(n)},h=async n=>{await se.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ye({id:n}),y()},K=async()=>{const n=await ve({page_type:0});E.dict_type=n.lists};return y(),K(),(n,t)=>{const m=Q,p=G,V=J,b=X,j=Y,c=Z,q=ee,B=te,x=ie,u=ae,$=W,M=oe,O=ne,C=re("perms"),z=le;return s(),w("div",Ee,[e(B,{class:"!border-none",shadow:"never"},{default:a(()=>[e(m,{class:"mb-4",content:"\u6570\u636E\u7BA1\u7406",onBack:t[0]||(t[0]=l=>n.$router.back())}),e(q,{ref:"formRef",class:"mb-[-16px]",model:o(i),inline:""},{default:a(()=>[e(b,{label:"\u5B57\u5178\u540D\u79F0"},{default:a(()=>[e(V,{class:"w-[280px]",modelValue:o(i).type_id,"onUpdate:modelValue":t[1]||(t[1]=l=>o(i).type_id=l),onChange:o(y)},{default:a(()=>[(s(!0),w(me,null,pe(o(E).dict_type,l=>(s(),d(p,{label:l.name,value:l.id,key:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),e(b,{label:"\u6570\u636E\u540D\u79F0"},{default:a(()=>[e(j,{class:"w-[280px]",modelValue:o(i).name,"onUpdate:modelValue":t[2]||(t[2]=l=>o(i).name=l),clearable:"",onKeyup:ce(o(F),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(b,{label:"\u6570\u636E\u72B6\u6001"},{default:a(()=>[e(V,{class:"w-[280px]",modelValue:o(i).status,"onUpdate:modelValue":t[3]||(t[3]=l=>o(i).status=l)},{default:a(()=>[e(p,{label:"\u5168\u90E8",value:""}),e(p,{label:"\u6B63\u5E38",value:1}),e(p,{label:"\u505C\u7528",value:0})]),_:1},8,["modelValue"])]),_:1}),e(b,null,{default:a(()=>[e(c,{type:"primary",onClick:o(F)},{default:a(()=>[r("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(c,{onClick:o(S)},{default:a(()=>[r("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),e(B,{class:"!border-none mt-4",shadow:"never"},{default:a(()=>[D("div",null,[v((s(),d(c,{type:"primary",onClick:I},{icon:a(()=>[e(x,{name:"el-icon-Plus"})]),default:a(()=>[r(" \u6DFB\u52A0\u6570\u636E ")
|