jw项目windows环境软件安装
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
9.0 KiB

1 year ago
  1. import{G as ge,r as _,H as ve,Q as be,e as n,P as A,o as d,c as C,I as y,J as H,h as a,g as l,w as t,l as S,R as x,S as N,z as s,m as p,i as J,f as W,D as M,t as he,W as Ve}from"./index-9b4667b6.js";import{l as we,g as ke,u as Ce,a as Te,d as Se,r as xe}from"./type-a9b74a70.js";const Ne={class:"app-container"},Re={class:"dialog-footer"},De=ge({name:"Dict"}),$e=Object.assign(De,{setup(Ue){const{proxy:c}=he(),{sys_normal_disable:R,sys_dict_group:D}=c.useDict("sys_normal_disable","sys_dict_group"),z=_([]),v=_(!1),U=_(!0),T=_(!0),I=_([]),B=_(!0),E=_(!0),K=_(0),$=_(""),F=_([]),X=ve({form:{},queryParams:{pageNum:1,pageSize:10,dictName:void 0,dictType:void 0,status:void 0},rules:{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:i,rules:Y}=be(X);function b(){U.value=!0,we(c.addDateRange(u.value,F.value)).then(r=>{z.value=r.rows,K.value=r.total,U.value=!1})}function Z(){v.value=!1,G()}function G(){i.value={dictId:void 0,dictName:void 0,dictType:void 0,status:"0",remark:void 0},c.resetForm("dictRef")}function w(){u.value.pageNum=1,b()}function ee(){F.value=[],c.resetForm("queryRef"),w()}function le(){G(),v.value=!0,$.value="\u6DFB\u52A0\u5B57\u5178\u7C7B\u578B"}function te(r){I.value=r.map(o=>o.dictId),B.value=r.length!=1,E.value=!r.length}function Q(r){G();const o=r.dictId||I.value;ke(o).then(h=>{i.value=h.data,v.value=!0,$.value="\u4FEE\u6539\u5B57\u5178\u7C7B\u578B"})}function ae(){c.$refs.dictRef.validate(r=>{r&&(i.value.dictId!=null?Ce(i.value).then(o=>{c.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F"),v.value=!1,b()}):Te(i.value).then(o=>{c.$modal.msgSuccess("\u65B0\u589E\u6210\u529F"),v.value=!1,b()}))})}function L(r){const o=r.dictId||I.value;c.$modal.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664\u5B57\u5178\u7F16\u53F7\u4E3A"'+o+'"\u7684\u6570\u636E\u9879\uFF1F').then(function(){return Se(o)}).then(()=>{b(),c.$modal.msgSuccess("\u5220\u9664\u6210\u529F")}).catch(()=>{})}function oe(){c.download("system/dict/type/export",{...u.value},`dict_${new Date().getTime()}.xlsx`)}function ne(){xe().then(()=>{c.$modal.msgSuccess("\u5237\u65B0\u6210\u529F"),Ve().cleanDict()})}return b(),(r,o)=>{const h=n("el-input"),f=n("el-form-item"),P=n("el-option"),q=n("el-select"),m=n("el-button"),O=n("el-form"),k=n("el-col"),de=n("right-toolbar"),ue=n("el-row"),g=n("el-table-column"),ie=n("router-link"),j=n("dict-tag"),re=n("OperateRecord"),se=n("el-table"),pe=n("pagination"),ce=n("el-radio"),me=n("el-radio-group"),fe=n("el-dialog"),V=A("hasPermi"),_e=A("loading");return d(),C("div",Ne,[y(l(O,{model:a(u),ref:"queryRef",inline:!0,"label-width":"68px"},{default:t(()=>[l(f,{label:"\u5B57\u5178\u540D\u79F0",prop:"dictName"},{default:t(()=>[l(h,{modelValue:a(u).dictName,"onUpdate:modelValue":o[0]||(o[0]=e=>a(u).dictName=e),placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u540D\u79F0",clearable:"",onKeyup:S(w,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),l(f,{label:"\u5B57\u5178\u7C7B\u578B",prop:"dictType"},{default:t(()=>[l(h,{modelValue:a(u).dictType,"onUpdate:modelValue":o[1]||(o[1]=e=>a(u).dictType=e),placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u7C7B\u578B",clearable:"",onKeyup:S(w,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),l(f,{label:"\u5B57\u5178\u7EC4\u540D",prop:"dictGroupValue"},{default:t(()=>[l(q,{modelValue:a(u).dictGroupValue,"onUpdate:modelValue":o[2]||(o[2]=e=>a(u).dictGroupValue=e),placeholder:"\u8BF7\u9009\u62E9\u5B57\u5178\u7EC4\u540D",clearable:"",onKeyup:S(w,["enter"])},{default:t(()=>[(d(!0),C(x,null,N(a(D),e=>(d(),s(P,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onKeyup"])]),_:1}),l(f,{label:"\u72B6\u6001",prop:"status"},{default:t(()=>[l(q,{modelValue:a(u).status,"onUpdate:modelValue":o[3]||(o[3]=e=>a(u).status=e),placeholder:"\u5B57\u5178\u72B6\u6001",clearable:""},{default:t(()=>[(d(!0),C(x,null,N(a(R),e=>(d(),s(P,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_