2024-05-30 16:04:01 +08:00
|
|
|
import{C as Q,D as O,w as Z,F as H,T as J,O as W,p as X,q as Y,r as ee,Q as te,R as oe}from"./element-plus.681b9893.js";import{_ as ae}from"./index.vue_vue_type_script_setup_true_lang.58d80c54.js";import{n as ne,f as v,b as le}from"./index.0c8416f0.js";import{d as T,Z as A,r as re,af as ie,ap as ue,o as r,c as C,U as e,L as t,u as a,aa as P,R as u,M as s,K as d,a as b,j as se,Q as me}from"./@vue.18505fe0.js";import{b as de,c as pe,d as ce,e as _e,s as fe}from"./code.c1d11483.js";import{u as Fe}from"./usePaging.6a6670f9.js";import{_ as ge}from"./data-table.vue_vue_type_script_setup_true_lang.27f01afa.js";import{_ as Ce}from"./code-preview.vue_vue_type_script_setup_true_lang.9a497faa.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.a6528143.js";import"./@babel.16688d44.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.466e9fe4.js";import"./axios.4905d81f.js";import"./jspdf.54afd842.js";import"./fflate.fca59393.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.29b71fa4.js";import"./color.87d313dc.js";import"./clone.a63396d9.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./vue-plugin-hiprint.a2d84e76.js";import"./jquery.c3f97e49.js";import"./jsbarcode.39151b53.js";import"./socket.io-client.0b5a7289.js";import"./engine.io-client.81030771.js";import"./engine.io-parser.c748e159.js";import"./@socket.io.77accf6a.js";import"./debug.b392f131.js";import"./socket.io-parser.b7256298.js";import"./html2canvas.0f5947bc.js";import"./canvg.a673c4b2.js";import"./core-js.97b94d69.js";import"./raf.407ad6ad.js";import"./performance-now.a710f6e4.js";import"./rgbcolor.20c71161.js";import"./svg-pathdata.eba17832.js";import"./stackblur-canvas.0fb5df18.js";import"./nprogress.3461658b.js";import"./vue-clipboard3.c63182fd.js";import"./clipboard.dd2c63d0.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.a7179cc9.js";const be={class:"code-generation"},we={class:"flex"},ye={class:"mt-4"},Ee={class:"flex items-center"},he={class:"flex justify-end mt-4"},ve=T({name:"codeGenerate"}),xt=T({...ve,setup(ke){const p=A({table_name:"",table_comment:""}),c=A({show:!1,loading:!1,code:[]}),{pager:f,getLists:g,resetParams:$,resetPage:w}=Fe({fetchFun:_e,params:p}),F=re([]),K=n=>{F.value=n.map(({id:o})=>o)},S=async n=>{await v.confirm("\u786E\u5B9A\u8981\u540C\u6B65\u8868\u7ED3\u6784\uFF1F"),await fe({id:n})},k=async n=>{await v.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await de({id:n}),g()},U=async n=>{const o=await pe({id:n});c.code=o,c.show=!0},I=n=>n.some(o=>o.generate_type==1),D=async n=>{if(I(n))return v.msgError("\u751F\u6210\u65B9\u5F0F\u4E3A\u751F\u6210\u5230\u6A21\u5757\uFF0C\u8BF7\u5728\u524D\u7AEF\u5F00\u53D1\u6A21\u5F0F\u4E0B\u4F7F\u7528\uFF0C\u8BE6\u7EC6\u53C2\u8003\u6587\u6863");const o=await ce({id:n});o.file&&window.open(o.file,"_blank")},N=(n,o)=>{switch(n){case"generate":D([o.id]);break;case"sync":S(o.id);break;case"delete":k(o.id)}};return g(),(n,o)=>{const B=Q,y=O,i=Z,R=H,V=J,E=le,_=W,G=ie("router-link"),h=X,L=Y,M=ee,j=te,q=ae,m=ue("perms"),z=oe;return r(),C("div",be,[e(V,{class:"!border-none",shadow:"never"},{default:t(()=>[e(R,{class:"mb-[-16px]",model:a(p),inline:""},{default:t(()=>[e(y,{label:"\u8868\u540D\u79F0"},{default:t(()=>[e(B,{class:"w-[280px]",modelValue:a(p).table_name,"onUpdate:modelValue":o[0]||(o[0]=l=>a(p).table_name=l),clearable:"",onKeyup:P(a(w),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(y,{label:"\u8868\u63CF\u8FF0"},{default:t(()=>[e(B,{class:"w-[280px]",modelValue:a(p).table_comment,"onUpdate:modelValue":o[1]||(o[1]=l=>a(p).table_comment=l),clearable:"",onKeyup:P(a(w),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(y,null,{default:
|