2 lines
3.1 KiB
JavaScript
2 lines
3.1 KiB
JavaScript
|
import{_ as z,r as c,H as B,d as i,o as D,c as F,g as I,e,w as l,l as j,m as f,f as o,j as C,J as E,K as L,I as P,F as Q,s as A}from"./index.b3c890dc.js";import{l as H,i as J}from"./gen.4da8ac97.js";const G={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}=A(),a=B({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(){H(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}J({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"),K=i("el-table"),U=i("pagination"),$=i("el-row"),q=i("el-dialog");return D(),F(Q,null,[I(" \u5BFC\u5165\u8868 "),e(q,{title:"\u5BFC\u5165\u8868",modelValue:o(s),"onUpdate:modelValue":t[5]||(t[5]=r=>P(s)?s.value=r:null),width:"800px",top:"5vh","append-to-body":""},{footer:l(()=>[j("div",G,[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(K,{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(U,{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"]),[[L,o(_)>0]])]),_:1})]),_:1},8,["modelValue"])],2112)}}},Y=z(M,[["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/tool/gen/importTable.vue"]]);export{Y as default};
|