Agriculture-front-end/dist/assets/data.c7c670cd.js

2 lines
10 KiB
JavaScript
Raw Normal View History

2023-04-23 09:41:12 +08:00
import{_ as Ce,G as we,r as c,u as ke,H as he,R as Te,d as u,Q as H,o as i,c as w,J as v,K as J,f as t,e as l,w as a,F as S,A as D,k as m,j as Se,m as r,I as W,x,l as X,g as De,s as xe,S as Ue,T as Le,U as Ne,V as B,W as Re,X as $e}from"./index.b3c890dc.js";import{g as qe,o as Pe}from"./type.abcb2dc9.js";const Fe={class:"app-container"},Be={key:0},Ee={class:"dialog-footer"},Ie=we({name:"Data"}),Ke=Object.assign(Ie,{setup(Oe){const{proxy:_}=xe(),{sys_normal_disable:U}=_.useDict("sys_normal_disable"),E=c([]),g=c(!1),L=c(!0),T=c(!0),N=c([]),I=c(!0),K=c(!0),R=c(0),$=c(""),O=c(""),Q=c([]),j=ke(),M=c([{value:"default",label:"\u9ED8\u8BA4"},{value:"primary",label:"\u4E3B\u8981"},{value:"success",label:"\u6210\u529F"},{value:"info",label:"\u4FE1\u606F"},{value:"warning",label:"\u8B66\u544A"},{value:"danger",label:"\u5371\u9669"}]),Y=he({form:{},queryParams:{pageNum:1,pageSize:10,dictName:void 0,dictType:void 0,status:void 0},rules:{dictLabel:[{required:!0,message:"\u6570\u636E\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],dictValue:[{required:!0,message:"\u6570\u636E\u952E\u503C\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],dictSort:[{required:!0,message:"\u6570\u636E\u987A\u5E8F\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}}),{queryParams:d,form:n,rules:Z}=Te(Y);function ee(s){qe(s).then(o=>{d.value.dictType=o.data.dictType,O.value=o.data.dictType,y()})}function le(){Pe().then(s=>{Q.value=s.data})}function y(){L.value=!0,Ue(d.value).then(s=>{E.value=s.rows,R.value=s.total,L.value=!1})}function te(){g.value=!1,q()}function q(){n.value={dictCode:void 0,dictLabel:void 0,dictValue:void 0,cssClass:void 0,listClass:"default",dictSort:0,status:"0",remark:void 0},_.resetForm("dataRef")}function P(){d.value.pageNum=1,y()}function ae(){const s={path:"/system/dict"};_.$tab.closeOpenPage(s)}function oe(){_.resetForm("queryRef"),d.value.dictType=O,P()}function ne(){q(),g.value=!0,$.value="\u6DFB\u52A0\u5B57\u5178\u6570\u636E",n.value.dictType=d.value.dictType}function de(s){N.value=s.map(o=>o.dictCode),I.value=s.length!=1,K.value=!s.length}function z(s){q();const o=s.dictCode||N.value;Le(o).then(k=>{n.value=k.data,g.value=!0,$.value="\u4FEE\u6539\u5B57\u5178\u6570\u636E"})}function se(){_.$refs.dataRef.validate(s=>{s&&(n.value.dictCode!=null?Ne(n.value).then(o=>{B().removeDict(d.value.dictType),_.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F"),g.value=!1,y()}):Re(n.value).then(o=>{B().removeDict(d.value.dictType),_.$modal.msgSuccess("\u65B0\u589E\u6210\u529F"),g.value=!1,y()}))})}function A(s){const o=s.dictCode||N.value;_.$modal.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664\u5B57\u5178\u7F16\u7801\u4E3A"'+o+'"\u7684\u6570\u636E\u9879\uFF1F').then(function(){return $e(o)}).then(()=>{y(),_.$modal.msgSuccess("\u5220\u9664\u6210\u529F"),B().removeDict(d.value.dictType)}).catch(()=>{})}function ue(){_.download("system/dict/data/export",{...d.value},`dict_data_${new Date().getTime()}.xlsx`)}return ee(j.params&&j.params.dictId),le(),(s,o)=>{const k=u("el-option"),F=u("el-select"),p=u("el-form-item"),V=u("el-input"),f=u("el-button"),G=u("el-form"),h=u("el-col"),ie=u("right-toolbar"),re=u("el-row"),b=u("el-table-column"),pe=u("el-tag"),ce=u("dict-tag"),me=u("el-table"),fe=u("pagination"),_e=u("el-input-number"),be=u("el-radio"),ve=u("el-radio-group"),ge=u("el-dialog"),C=H("hasPermi"),ye=H("loading");return i(),w("div",Fe,[v(l(G,{model:t(d),ref:"queryRef",inline:!0},{default:a(()=>[l(p,{label:"\u5B57\u5178\u540D\u79F0",prop:"dictType"},{default:a(()=>[l(F,{modelValue:t(d).dictType,"onUpdate:modelValue":o[0]||(o[0]=e=>t(d).dictType=e),style:{width:"200px"}},{default:a(()=>[(i(!0),w(S,null,D(t(Q),e=>(i(),m(k,{key:e.dictId,label:e.dictName,value:e.dictType},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(p,{label:"\u5B57\u5178\u6807\u7B7E",prop:"dictLabel"},{default:a(()=>[l(V,{modelValue:t(d).dictLabel,"onUpdate:modelValue":o[1]||(o[1]=e=>t(d).dictLabel=e),placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u6807\u7B7E",clearable:"",style:{width:"200px"},onKeyup:Se(P,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),l(p,{label:"\u72B6\