Agriculture-front-end/dist/assets/importTable.78b97bf7.js

2 lines
3.1 KiB
JavaScript
Raw Normal View History

2023-06-12 17:02:41 +08:00
import{_ as D,r as c,A as q,d as i,o as z,c as L,g as j,e,w as l,l as A,m as f,f as o,j as C,C as E,D as F,B as I,L as P,s as Q}from"./index.48137ccf.js";import{l as G,i as H}from"./gen.6f1da18d.js";const J={class:"dialog-footer"},M={__name:"importTable",emits:["ok"],setup(O,{expose:N,emit:h}){const _=c(0),s=c(!1),v=c([]),w=c([]),{proxy:u}=Q(),a=q({pageNum:1,pageSize:10,tableName:void 0,tableComment:void 0});function V(){b(),s.value=!0}function k(n){u.$refs.table.toggleRowSelection(n)}function T(n){v.value=n.map(t=>t.tableName)}function b(){G(a).then(n=>{w.value=n.rows,_.value=n.total})}function p(){a.pageNum=1,b()}function S(){u.resetForm("queryRef"),p()}function x(){const n=v.value.join(",");if(n==""){u.$modal.msgError("\u8BF7\u9009\u62E9\u8981\u5BFC\u5165\u7684\u8868");return}H({tables:n}).then(t=>{u.$modal.msgSuccess(t.msg),t.code===200&&(s.value=!1,h("ok"))})}return N({show:V}),(n,t)=>{const y=i("el-input"),g=i("el-form-item"),d=i("el-button"),R=i("el-form"),m=i("el-table-column"),U=i("el-table"),K=i("pagination"),$=i("el-row"),B=i("el-dialog");return z(),L(P,null,[j(" \u5BFC\u5165\u8868 "),e(B,{title:"\u5BFC\u5165\u8868",modelValue:o(s),"onUpdate:modelValue":t[5]||(t[5]=r=>I(s)?s.value=r:null),width:"800px",top:"5vh","append-to-body":""},{footer:l(()=>[A("div",J,[e(d,{type:"primary",onClick:x},{default:l(()=>[f("\u786E \u5B9A")]),_:1}),e(d,{onClick:t[4]||(t[4]=r=>s.value=!1)},{default:l(()=>[f("\u53D6 \u6D88")]),_:1})])]),default:l(()=>[e(R,{model:o(a),ref:"queryRef",inline:!0},{default:l(()=>[e(g,{label:"\u8868\u540D\u79F0",prop:"tableName"},{default:l(()=>[e(y,{modelValue:o(a).tableName,"onUpdate:modelValue":t[0]||(t[0]=r=>o(a).tableName=r),placeholder:"\u8BF7\u8F93\u5165\u8868\u540D\u79F0",clearable:"",onKeyup:C(p,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(g,{label:"\u8868\u63CF\u8FF0",prop:"tableComment"},{default:l(()=>[e(y,{modelValue:o(a).tableComment,"onUpdate:modelValue":t[1]||(t[1]=r=>o(a).tableComment=r),placeholder:"\u8BF7\u8F93\u5165\u8868\u63CF\u8FF0",clearable:"",onKeyup:C(p,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(g,null,{default:l(()=>[e(d,{type:"primary",icon:"Search",onClick:p},{default:l(()=>[f("\u641C\u7D22")]),_:1}),e(d,{icon:"Refresh",onClick:S},{default:l(()=>[f("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"]),e($,null,{default:l(()=>[e(U,{onRowClick:k,ref:"table",data:o(w),onSelectionChange:T,height:"260px"},{default:l(()=>[e(m,{type:"selection",width:"55"}),e(m,{prop:"tableName",label:"\u8868\u540D\u79F0","show-overflow-tooltip":!0}),e(m,{prop:"tableComment",label:"\u8868\u63CF\u8FF0","show-overflow-tooltip":!0}),e(m,{prop:"createTime",label:"\u521B\u5EFA\u65F6\u95F4"}),e(m,{prop:"updateTime",label:"\u66F4\u65B0\u65F6\u95F4"})]),_:1},8,["data"]),E(e(K,{total:o(_),page:o(a).pageNum,"onUpdate:page":t[2]||(t[2]=r=>o(a).pageNum=r),limit:o(a).pageSize,"onUpdate:limit":t[3]||(t[3]=r=>o(a).pageSize=r),onPagination:b},null,8,["total","page","limit"]),[[F,o(_)>0]])]),_:1})]),_:1},8,["modelValue"])],2112)}}},Y=D(M,[["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/tool/gen/importTable.vue"]]);export{Y as default};