Newer
Older
Nanping_sponge_JXKH / spongePerformanceDist / assets / index.157af96b.js
import{M as ye,r as f,aa as ge,ae as ve,e as n,D as L,o as s,c as K,F as _,K as M,h as a,f as e,w as t,k as Q,G as j,H as A,l as y,ab as I,p as r,m as $,z as q,v as be,ai as he}from"./index.82404a61.js";import{l as we,g as Ve,u as ke,a as Ce,d as Te,r as xe}from"./type.2b608883.js";const Ne={class:"app-container"},Se={class:"dialog-footer"},De=ye({name:"Dict"}),Ie=Object.assign(De,{setup(Ue){const{proxy:p}=be(),{sys_normal_disable:x}=p.useDict("sys_normal_disable"),P=f([]),v=f(!1),N=f(!0),C=f(!0),S=f([]),F=f(!0),z=f(!0),D=f(0),U=f(""),V=f([]),G=ge({form:{},queryParams:{pageNum:1,pageSize:10,dictName:void 0,dictType:void 0,status:void 0},rules:{moduleKey:[{required:!0,message:"\u6A21\u5757\u7F16\u53F7\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],dictName:[{required:!0,message:"\u5B57\u5178\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],dictType:[{required:!0,message:"\u5B57\u5178\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}}),{queryParams:u,form:d,rules:H}=ve(G);function h(){N.value=!0,we(p.addDateRange(u.value,V.value)).then(i=>{P.value=i.data,D.value=i.total,N.value=!1})}function O(){v.value=!1,R()}function R(){d.value={dictId:void 0,dictName:void 0,dictType:void 0,status:"0",remark:void 0},p.resetForm("dictRef")}function T(){u.value.pageNum=1,h()}function J(){V.value=[],p.resetForm("queryRef"),T()}function W(){R(),v.value=!0,U.value="\u6DFB\u52A0\u5B57\u5178\u7C7B\u578B"}function X(i){S.value=i.map(o=>o.dictId),F.value=i.length!=1,z.value=!i.length}function B(i){R();const o=i.dictId||S.value;Ve(o).then(b=>{d.value=b.data,v.value=!0,U.value="\u4FEE\u6539\u5B57\u5178\u7C7B\u578B"})}function Z(){p.$refs.dictRef.validate(i=>{i&&(d.value.dictId!=null?ke(d.value).then(o=>{p.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F"),v.value=!1,h()}):Ce(d.value).then(o=>{p.$modal.msgSuccess("\u65B0\u589E\u6210\u529F"),v.value=!1,h()}))})}function E(i){const o=i.dictId||S.value;p.$modal.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664\u5B57\u5178\u7F16\u53F7\u4E3A"'+o+'"\u7684\u6570\u636E\u9879\uFF1F').then(function(){return Te(o)}).then(()=>{h(),p.$modal.msgSuccess("\u5220\u9664\u6210\u529F")}).catch(()=>{})}function ee(){p.download("system/dict/type/export",{...u.value},`dict_${new Date().getTime()}.xlsx`)}function le(){xe().then(()=>{p.$modal.msgSuccess("\u5237\u65B0\u6210\u529F"),he().cleanDict()})}return h(),(i,o)=>{const b=n("el-input"),m=n("el-form-item"),te=n("el-option"),ae=n("el-select"),oe=n("el-date-picker"),c=n("el-button"),Y=n("el-form"),k=n("el-col"),ne=n("right-toolbar"),de=n("el-row"),g=n("el-table-column"),ue=n("router-link"),ie=n("dict-tag"),se=n("el-table"),re=n("pagination"),pe=n("el-radio"),ce=n("el-radio-group"),me=n("el-dialog"),w=L("hasPermi"),fe=L("loading");return s(),K("div",Ne,[_(e(Y,{model:a(u),ref:"queryRef",inline:!0,"label-width":"68px"},{default:t(()=>[e(m,{label:"\u5B57\u5178\u540D\u79F0",prop:"dictName"},{default:t(()=>[e(b,{modelValue:a(u).dictName,"onUpdate:modelValue":o[0]||(o[0]=l=>a(u).dictName=l),placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u540D\u79F0",clearable:"",style:{width:"240px"},onKeyup:Q(T,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(m,{label:"\u5B57\u5178\u7C7B\u578B",prop:"dictType"},{default:t(()=>[e(b,{modelValue:a(u).dictType,"onUpdate:modelValue":o[1]||(o[1]=l=>a(u).dictType=l),placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u7C7B\u578B",clearable:"",style:{width:"240px"},onKeyup:Q(T,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(m,{label:"\u72B6\u6001",prop:"status"},{default:t(()=>[e(ae,{modelValue:a(u).status,"onUpdate:modelValue":o[2]||(o[2]=l=>a(u).status=l),placeholder:"\u5B57\u5178\u72B6\u6001",clearable:"",style:{width:"240px"}},{default:t(()=>[(s(!0),K(j,null,A(a(x),l=>(s(),y(te,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(m,{label:"\u521B\u5EFA\u65F6\u95F4",style:{width:"308px"}},{default:t(()=>[e(oe,{modelValue:a(V),"onUpdate:modelValue":o[3]||(o[3]=l=>I(V)?V.value=l:null),"value-format":"YYYY-MM-DD",type:"daterange","range-separator":"-","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F"},null,8,["modelValue"])]),_:1}),e(m,null,{default:t(()=>[e(c,{type:"primary",icon:"Search",onClick:T},{default:t(()=>[r("\u641C\u7D22")]),_:1}),e(c,{icon:"Refresh",onClick:J},{default:t(()=>[r("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"]),[[M,a(C)]]),e(de,{gutter:10,class:"mb8"},{default:t(()=>[e(k,{span:1.5},{default:t(()=>[_((s(),y(c,{type:"primary",plain:"",icon:"Plus",onClick:W},{default:t(()=>[r("\u65B0\u589E")]),_:1})),[[w,["system:dict:add"]]])]),_:1},8,["span"]),e(k,{span:1.5},{default:t(()=>[_((s(),y(c,{type:"success",plain:"",icon:"Edit",disabled:a(F),onClick:B},{default:t(()=>[r("\u4FEE\u6539")]),_:1},8,["disabled"])),[[w,["system:dict:edit"]]])]),_:1},8,["span"]),e(k,{span:1.5},{default:t(()=>[_((s(),y(c,{type:"danger",plain:"",icon:"Delete",disabled:a(z),onClick:E},{default:t(()=>[r("\u5220\u9664")]),_:1},8,["disabled"])),[[w,["system:dict:remove"]]])]),_:1},8,["span"]),e(k,{span:1.5},{default:t(()=>[_((s(),y(c,{type:"warning",plain:"",icon:"Download",onClick:ee},{default:t(()=>[r("\u5BFC\u51FA")]),_:1})),[[w,["system:dict:export"]]])]),_:1},8,["span"]),e(k,{span:1.5},{default:t(()=>[_((s(),y(c,{type:"danger",plain:"",icon:"Refresh",onClick:le},{default:t(()=>[r("\u5237\u65B0\u7F13\u5B58")]),_:1})),[[w,["system:dict:remove"]]])]),_:1},8,["span"]),e(ne,{showSearch:a(C),"onUpdate:showSearch":o[4]||(o[4]=l=>I(C)?C.value=l:null),onQueryTable:h},null,8,["showSearch"])]),_:1}),_((s(),y(se,{data:a(P),onSelectionChange:X},{default:t(()=>[e(g,{type:"selection",width:"55",align:"center"}),e(g,{label:"\u6A21\u5757\u7F16\u53F7",align:"center",prop:"moduleKey"}),e(g,{label:"\u5B57\u5178\u7F16\u53F7",align:"center",prop:"dictId"}),e(g,{label:"\u5B57\u5178\u540D\u79F0",align:"center",prop:"dictName","show-overflow-tooltip":!0}),e(g,{label:"\u5B57\u5178\u7C7B\u578B",align:"center","show-overflow-tooltip":!0},{default:t(l=>[e(ue,{to:"/system/dict-data/index/"+l.row.dictId,class:"link-type"},{default:t(()=>[$("span",null,q(l.row.dictType),1)]),_:2},1032,["to"])]),_:1}),e(g,{label:"\u72B6\u6001",align:"center",prop:"status"},{default:t(l=>[e(ie,{options:a(x),value:l.row.status},null,8,["options","value"])]),_:1}),e(g,{label:"\u5907\u6CE8",align:"center",prop:"remark","show-overflow-tooltip":!0}),e(g,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180"},{default:t(l=>[$("span",null,q(i.parseTime(l.row.createTime)),1)]),_:1}),e(g,{label:"\u64CD\u4F5C",align:"center",width:"160","class-name":"small-padding fixed-width"},{default:t(l=>[_((s(),y(c,{link:"",type:"primary",icon:"Edit",onClick:_e=>B(l.row)},{default:t(()=>[r("\u4FEE\u6539")]),_:2},1032,["onClick"])),[[w,["system:dict:edit"]]]),_((s(),y(c,{link:"",type:"primary",icon:"Delete",onClick:_e=>E(l.row)},{default:t(()=>[r("\u5220\u9664")]),_:2},1032,["onClick"])),[[w,["system:dict:remove"]]])]),_:1})]),_:1},8,["data"])),[[fe,a(N)]]),_(e(re,{total:a(D),page:a(u).pageNum,"onUpdate:page":o[5]||(o[5]=l=>a(u).pageNum=l),limit:a(u).pageSize,"onUpdate:limit":o[6]||(o[6]=l=>a(u).pageSize=l),onPagination:h},null,8,["total","page","limit"]),[[M,a(D)>0]]),e(me,{title:a(U),modelValue:a(v),"onUpdate:modelValue":o[12]||(o[12]=l=>I(v)?v.value=l:null),width:"500px","append-to-body":""},{footer:t(()=>[$("div",Se,[e(c,{type:"primary",onClick:Z},{default:t(()=>[r("\u786E \u5B9A")]),_:1}),e(c,{onClick:O},{default:t(()=>[r("\u53D6 \u6D88")]),_:1})])]),default:t(()=>[e(Y,{ref:"dictRef",model:a(d),rules:a(H),"label-width":"80px"},{default:t(()=>[e(m,{label:"\u6A21\u5757\u7F16\u53F7",prop:"moduleKey"},{default:t(()=>[e(b,{modelValue:a(d).moduleKey,"onUpdate:modelValue":o[7]||(o[7]=l=>a(d).moduleKey=l),placeholder:"\u8BF7\u8F93\u5165\u6A21\u5757\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u5B57\u5178\u540D\u79F0",prop:"dictName"},{default:t(()=>[e(b,{modelValue:a(d).dictName,"onUpdate:modelValue":o[8]||(o[8]=l=>a(d).dictName=l),placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u5B57\u5178\u7C7B\u578B",prop:"dictType"},{default:t(()=>[e(b,{modelValue:a(d).dictType,"onUpdate:modelValue":o[9]||(o[9]=l=>a(d).dictType=l),placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u7C7B\u578B"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u72B6\u6001",prop:"status"},{default:t(()=>[e(ce,{modelValue:a(d).status,"onUpdate:modelValue":o[10]||(o[10]=l=>a(d).status=l)},{default:t(()=>[(s(!0),K(j,null,A(a(x),l=>(s(),y(pe,{key:l.value,label:l.value},{default:t(()=>[r(q(l.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(m,{label:"\u5907\u6CE8",prop:"remark"},{default:t(()=>[e(b,{modelValue:a(d).remark,"onUpdate:modelValue":o[11]||(o[11]=l=>a(d).remark=l),type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title","modelValue"])])}}});export{Ie as default};