gameapi-client/dist-API/assets/index.DZhQjEpD.js

2 lines
7.8 KiB
JavaScript
Raw Permalink Normal View History

2025-08-14 10:33:48 +08:00
import{r as m,C as ge,J as ye,k as n,G as Y,o as u,c as I,H as f,I as z,f as a,d as e,e as l,l as M,K as j,L as A,m as _,D as $,q as r,n as q,t as P,B as ve,h as be,Q as he}from"./index.R3qQMktZ.js";import{l as we,g as ke,u as Ve,a as Ce,d as Te,r as xe}from"./type.YY2uAgoo.js";const Ne={class:"app-container"},Se={class:"dialog-footer"},De=ve({name:"Dict"}),$e=Object.assign(De,{setup(Ue){const{proxy:p}=be(),{sys_normal_disable:x}=p.useDict("sys_normal_disable"),B=m([]),y=m(!1),N=m(!0),C=m(!0),S=m([]),E=m(!0),F=m(!0),D=m(0),U=m(""),k=m([]),G=ge({form:{},queryParams:{pageNum:1,pageSize:10,dictName:void 0,dictType:void 0,status:void 0},rules:{dictName:[{required:!0,message:"字典名称不能为空",trigger:"blur"}],dictType:[{required:!0,message:"字典类型不能为空",trigger:"blur"}]}}),{queryParams:d,form:i,rules:H}=ye(G);function b(){N.value=!0,we(p.addDateRange(d.value,k.value)).then(s=>{B.value=s.rows,D.value=s.total,N.value=!1})}function J(){y.value=!1,R()}function R(){i.value={dictId:void 0,dictName:void 0,dictType:void 0,status:"0",remark:void 0},p.resetForm("dictRef")}function T(){d.value.pageNum=1,b()}function O(){k.value=[],p.resetForm("queryRef"),T()}function W(){R(),y.value=!0,U.value="添加字典类型"}function X(s){S.value=s.map(o=>o.dictId),E.value=s.length!=1,F.value=!s.length}function K(s){R();const o=s.dictId||S.value;ke(o).then(h=>{i.value=h.data,y.value=!0,U.value="修改字典类型"})}function Z(){p.$refs.dictRef.validate(s=>{s&&(i.value.dictId!=null?Ve(i.value).then(o=>{p.$modal.msgSuccess("修改成功"),y.value=!1,b()}):Ce(i.value).then(o=>{p.$modal.msgSuccess("新增成功"),y.value=!1,b()}))})}function L(s){const o=s.dictId||S.value;p.$modal.confirm('是否确认删除字典编号为"'+o+'"的数据项?').then(function(){return Te(o)}).then(()=>{b(),p.$modal.msgSuccess("删除成功")}).catch(()=>{})}function ee(){p.download("system/dict/type/export",{...d.value},`dict_${new Date().getTime()}.xlsx`)}function te(){xe().then(()=>{p.$modal.msgSuccess("刷新成功"),he().cleanDict()})}return b(),(s,o)=>{const h=n("el-input"),g=n("el-form-item"),le=n("el-option"),ae=n("el-select"),oe=n("el-date-picker"),c=n("el-button"),Q=n("el-form"),V=n("el-col"),ne=n("right-toolbar"),de=n("el-row"),v=n("el-table-column"),ie=n("router-link"),se=n("dict-tag"),ue=n("el-table"),re=n("pagination"),pe=n("el-radio"),ce=n("el-radio-group"),me=n("el-dialog"),w=Y("hasPermi"),fe=Y("loading");return u(),I("div",Ne,[f(e(Q,{model:a(d),ref:"queryRef",inline:!0,"label-width":"68px"},{default:l(()=>[e(g,{label:"字典名称",prop:"dictName"},{default:l(()=>[e(h,{modelValue:a(d).dictName,"onUpdate:modelValue":o[0]||(o[0]=t=>a(d).dictName=t),placeholder:"请输入字典名称",clearable:"",style:{width:"240px"},onKeyup:M(T,["enter"])},null,8,["modelValue"])]),_:1}),e(g,{label:"字典类型",prop:"dictType"},{default:l(()=>[e(h,{modelValue:a(d).dictType,"onUpdate:modelValue":o[1]||(o[1]=t=>a(d).dictType=t),placeholder:"请输入字典类型",clearable:"",style:{width:"240px"},onKeyup:M(T,["enter"])},null,8,["modelValue"])]),_:1}),e(g,{label:"状态",prop:"status"},{default:l(()=>[e(ae,{modelValue:a(d).status,"onUpdate:modelValue":o[2]||(o[2]=t=>a(d).status=t),placeholder:"字典状态",clearable:"",style:{width:"240px"}},{default:l(()=>[(u(!0),I(j,null,A(a(x),t=>(u(),_(le,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(g,{label:"创建时间",style:{width:"308px"}},{default:l(()=>[e(oe,{modelValue:a(k),"onUpdate:modelValue":o[3]||(o[3]=t=>$(k)?k.value=t:null),"value-format":"YYYY-MM-DD",type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},null,8,["modelValue"])]),_:1}),e(g,null,{default:l(()=>[e(c,{type:"primary",icon:"Search",onClick:T},{default:l(()=>[r("搜索")]),_:1}),e(c,{icon:"Refresh",onClick:O},{default:l(()=>[r("重置")]),_:1})]),_:1})]),_:1},8,["model"]),[[z,a(C)]]),e(de,{gutter:10,class:"mb8"},{default:l(()=>[e(V,{span:1.5},{default:l(()=>[f((u(),_(c,{type:"primary",plain:"",icon:"Plus",onClick: