suyuan-breed/public/admin/assets/index.3d955e6e.js

2 lines
5.7 KiB
JavaScript

import{U as M,G as O,H as Q,C as W,B as X,w as Y,D as Z,J as ee,K as te,L as ae,M as oe,N as le}from"./element-plus.ae8e286c.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_lang.4acf6c9d.js";import{f as se,b as ie}from"./index.71fc8348.js";import{u as ue}from"./vue-router.ed788fee.js";import{d as N,r as T,s as de,_ as L,ae as re,o as n,c as k,T as e,K as a,J as d,u as i,Q as me,U as pe,a6 as ce,a8 as _e,a as w,L as v,j as fe,R as r,n as R}from"./@vue.108c970a.js";import{c as ye,e as ve,f as ge}from"./dict.0b13e0b9.js";import{u as be}from"./usePaging.2a59f422.js";import{_ as Ce}from"./edit.vue_vue_type_script_setup_true_lang.6b129048.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.664390f6.js";import"./axios.4ebfdb3f.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.e92d81a1.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.dbf33394.js";import"./color.e1b5fced.js";import"./clone.0a4e8ac3.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.f174a91e.js";import"./ms.a9ae1d6d.js";import"./nprogress.d7c3ab1b.js";import"./vue-clipboard3.add720e2.js";import"./clipboard.01ea18f5.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";import"./index.a9e38e26.js";const Ee={class:"dict-type"},he=r("\u67E5\u8BE2"),ke=r("\u91CD\u7F6E"),we=r(" \u6DFB\u52A0\u6570\u636E "),De=r(" \u5220\u9664 "),Fe={class:"mt-4"},Be=r("\u6B63\u5E38"),Ve=r("\u505C\u7528"),xe=r(" \u7F16\u8F91 "),$e=r(" \u5220\u9664 "),Te={class:"flex justify-end mt-4"},Le=N({name:"dictData"}),bt=N({...Le,setup(Re){const{query:P}=ue(),g=T(!1),_=de(),s=L({type:"",type_id:Number(P.id),name:"",status:""}),E=L({dict_type:[]}),{pager:f,getLists:y,resetPage:D,resetParams:U}=be({fetchFun:ve,params:s}),h=T([]),K=l=>{h.value=l.map(({id:t})=>t)},S=async()=>{var t,m;g.value=!0,await R();const l=E.dict_type.find(p=>p.id==s.type_id);(t=_.value)==null||t.setFormData({type_value:l==null?void 0:l.type,type_id:l.id}),(m=_.value)==null||m.open("add")},A=async l=>{var t,m;g.value=!0,await R(),(t=_.value)==null||t.open("edit"),(m=_.value)==null||m.setFormData(l)},F=async l=>{await se.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ge({id:l}),y()},I=async()=>{const l=await ye({page_type:0});E.dict_type=l.lists};return y(),I(),(l,t)=>{const m=M,p=O,B=Q,b=W,j=X,c=Y,q=Z,V=ee,x=ie,u=te,$=ae,H=oe,J=ne,C=re("perms"),z=le;return n(),k("div",Ee,[e(V,{class:"!border-none",shadow:"never"},{default:a(()=>[e(m,{class:"mb-4",content:"\u6570\u636E\u7BA1\u7406",onBack:t[0]||(t[0]=o=>l.$router.back())}),e(q,{ref:"formRef",class:"mb-[-16px]",model:s,inline:""},{default:a(()=>[e(b,{label:"\u5B57\u5178\u540D\u79F0"},{default:a(()=>[e(B,{class:"w-[280px]",modelValue:s.type_id,"onUpdate:modelValue":t[1]||(t[1]=o=>s.type_id=o),onChange:i(y)},{default:a(()=>[(n(!0),k(pe,null,ce(E.dict_type,o=>(n(),d(p,{label:o.name,value:o.id,key:o.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:s.name,"onUpdate:modelValue":t[2]||(t[2]=o=>s.name=o),clearable:"",onKeyup:_e(i(D),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(b,{label:"\u6570\u636E\u72B6\u6001"},{default:a(()=>[e(B,{class:"w-[280px]",modelValue:s.status,"onUpdate:modelValue":t[3]||(t[3]=o=>s.status=o)},{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:i(D)},{default:a(()=>[he]),_:1},8,["onClick"]),e(c,{onClick:i(U)},{default:a(()=>[ke]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),e(V,{class:"!border-none mt-4",shadow:"never"},{default:a(()=>[w("div",null,[v((n(),d(c,{type:"primary",onClick:S},{icon:a(()=>[e(x,{name:"el-icon-Plus"})]),default:a(()=>[we]),_:1})),[[C,["setting.dict.dict_data/add"]]]),v((n(),d(c,{disabled:!h.value.length,type:"danger",onClick:t[4]||(t[4]=o=>F(h.value))},{icon:a(()=>[e(x,{name:"el-icon-Delete"})]),default:a(()=>[De]),_:1},8,["disabled"])),[[C,["setting.dict.dict_data/delete"]]])]),v((n(),k("div",Fe,[w("div",null,[e(H,{data:i(f).lists,size:"large",onSelectionChange:K},{default:a(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"ID",prop:"id"}),e(u,{label:"\u6570\u636E\u540D\u79F0",prop:"name","min-width":"120"}),e(u,{label:"\u6570\u636E\u503C",prop:"value","min-width":"120"}),e(u,{label:"\u72B6\u6001"},{default:a(({row:o})=>[o.status==1?(n(),d($,{key:0},{default:a(()=>[Be]),_:1})):(n(),d($,{key:1,type:"danger"},{default:a(()=>[Ve]),_:1}))]),_:1}),e(u,{label:"\u5907\u6CE8",prop:"remark","min-width":"120","show-tooltip-when-overflow":""}),e(u,{label:"\u6392\u5E8F",prop:"sort"}),e(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:o})=>[v((n(),d(c,{link:"",type:"primary",onClick:G=>A(o)},{default:a(()=>[xe]),_:2},1032,["onClick"])),[[C,["setting.dict.dict_data/edit"]]]),v((n(),d(c,{link:"",type:"danger",onClick:G=>F(o.id)},{default:a(()=>[$e]),_:2},1032,["onClick"])),[[C,["setting.dict.dict_data/delete"]]])]),_:1})]),_:1},8,["data"])]),w("div",Te,[e(J,{modelValue:i(f),"onUpdate:modelValue":t[5]||(t[5]=o=>fe(f)?f.value=o:null),onChange:i(y)},null,8,["modelValue","onChange"])])])),[[z,i(f).loading]])]),_:1}),g.value?(n(),d(Ce,{key:0,ref_key:"editRef",ref:_,onSuccess:i(y),onClose:t[6]||(t[6]=o=>g.value=!1)},null,8,["onSuccess"])):me("",!0)])}}});export{bt as default};