Agriculture-front-end/dist/assets/index.b1bdee2c.js

2 lines
7.7 KiB
JavaScript
Raw Normal View History

2023-07-09 20:38:38 +08:00
import{_ as pe,z as ce,u as me,r as c,A as fe,M as _e,Z as ge,d as i,K as $,o as _,c as j,C as s,D as F,f as n,e,w as l,j as L,B as Y,m as b,k as v,l as A,x as G,g as be,L as ve,N as he,a9 as ye,s as we}from"./index.955aa49e.js";import{a as Ce,b as Ne,s as ke,p as xe,d as Ve}from"./gen.2509645a.js";import Se from"./importTable.391111fb.js";const De={class:"app-container"},Te=ce({name:"Gen"}),$e=Object.assign(Te,{setup(Ie){const I=me(),{proxy:u}=we(),R=c([]),V=c(!0),N=c(!0),S=c([]),U=c(!0),q=c(!0),D=c(0),z=c([]),h=c([]),P=c(""),M=fe({queryParams:{pageNum:1,pageSize:10,tableName:void 0,tableComment:void 0},preview:{open:!1,title:"\u4EE3\u7801\u9884\u89C8",data:{},activeName:"domain.java"}}),{queryParams:r,preview:m}=_e(M);ge(()=>{const o=I.query.t;o!=null&&o!=P.value&&(P.value=o,r.value.pageNum=Number(I.query.pageNum),h.value=[],u.resetForm("queryForm"),y())});function y(){V.value=!0,Ce(u.addDateRange(r.value,h.value)).then(o=>{R.value=o.rows,D.value=o.total,V.value=!1})}function w(){r.value.pageNum=1,y()}function K(o){const t=o.tableName||z.value;if(t==""){u.$modal.msgError("\u8BF7\u9009\u62E9\u8981\u751F\u6210\u7684\u6570\u636E");return}o.genType==="1"?Ne(o.tableName).then(T=>{u.$modal.msgSuccess("\u6210\u529F\u751F\u6210\u5230\u81EA\u5B9A\u4E49\u8DEF\u5F84\uFF1A"+o.genPath)}):u.$download.zip("/tool/gen/batchGenCode?tables="+t,"ruoyi.zip")}function Q(o){const t=o.tableName;u.$modal.confirm('\u786E\u8BA4\u8981\u5F3A\u5236\u540C\u6B65"'+t+'"\u8868\u7ED3\u6784\u5417\uFF1F').then(function(){return ke(t)}).then(()=>{u.$modal.msgSuccess("\u540C\u6B65\u6210\u529F")}).catch(()=>{})}function Z(){u.$refs.importRef.show()}function H(){h.value=[],u.resetForm("queryRef"),w()}function J(o){xe(o.tableId).then(t=>{m.value.data=t.data,m.value.open=!0,m.value.activeName="domain.java"})}function W(){u.$modal.msgSuccess("\u590D\u5236\u6210\u529F")}function X(o){S.value=o.map(t=>t.tableId),z.value=o.map(t=>t.tableName),U.value=o.length!=1,q.value=!o.length}function O(o){const t=o.tableId||S.value[0];ye.push({path:"/tool/gen-edit/index/"+t,query:{pageNum:r.value.pageNum}})}function B(o){const t=o.tableId||S.value;u.$modal.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664\u8868\u7F16\u53F7\u4E3A"'+t+'"\u7684\u6570\u636E\u9879\uFF1F').then(function(){return Ve(t)}).then(()=>{y(),u.$modal.msgSuccess("\u5220\u9664\u6210\u529F")}).catch(()=>{})}return y(),(o,t)=>{const T=i("el-input"),k=i("el-form-item"),ee=i("el-date-picker"),d=i("el-button"),te=i("el-form"),x=i("el-col"),le=i("right-toolbar"),ae=i("el-row"),g=i("el-table-column"),C=i("el-tooltip"),ne=i("el-table"),oe=i("pagination"),ie=i("el-link"),re=i("el-tab-pane"),se=i("el-tabs"),ue=i("el-dialog"),f=$("hasPermi"),de=$("loading"),E=$("copyText");return _(),j("div",De,[s(e(te,{model:n(r),ref:"queryRef",inline:!0},{default:l(()=>[e(k,{label:"\u8868\u540D\u79F0",prop:"tableName"},{default:l(()=>[e(T,{modelValue:n(r).tableName,"onUpdate:modelValue":t[0]||(t[0]=a=>n(r).tableName=a),placeholder:"\u8BF7\u8F93\u5165\u8868\u540D\u79F0",clearable:"",style:{width:"200px"},onKeyup:L(w,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(k,{label:"\u8868\u63CF\u8FF0",prop:"tableComment"},{default:l(()=>[e(T,{modelValue:n(r).tableComment,"onUpdate:modelValue":t[1]||(t[1]=a=>n(r).tableComment=a),placeholder:"\u8BF7\u8F93\u5165\u8868\u63CF\u8FF0",clearable:"",style:{width:"200px"},onKeyup:L(w,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(k,{label:"\u521B\u5EFA\u65F6\u95F4",style:{width:"308px"}},{default:l(()=>[e(ee,{modelValue:n(h),"onUpdate:modelValue":t[2]||(t[2]=a=>Y(h)?h.value=a: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(k,null,{default:l(()=>[e(d,{type:"primary",icon:"Search",onClick:w},{default:l(()=>[b("\u641C\u7D22")]),_:1}),e(d,{icon:"Refresh",onClick:H},{default:l(()=>[b("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"]),[[F,n(N)]]),e(ae,{gutter:10,class:"mb8"},{default:l(()=>[e(x,{span:1.5},{default:l(()=>[s((_(),v(d,{type:"primary",p