2 lines
6.5 KiB
JavaScript
2 lines
6.5 KiB
JavaScript
|
import{B as j,C as O,w as H,D as J,I as W,O as X,p as Y,q as Z,r as ee,P as te,Q as oe}from"./element-plus.10e48c93.js";import{_ as ae}from"./index.vue_vue_type_script_setup_true_lang.579ca8f7.js";import{k as ne,f as k,b as le}from"./index.8f8edf86.js";import{d as $,$ as A,r as re,a4 as ue,af as se,o as r,c as C,U as e,L as t,u as a,a8 as P,R as s,M as i,K as d,a as b,k as ie,Q as me}from"./@vue.51d7f2d8.js";import{b as de,c as ce,d as pe,e as _e,s as fe}from"./code.0e48cbff.js";import{u as Fe}from"./usePaging.60d02673.js";import{_ as ge}from"./data-table.vue_vue_type_script_setup_true_lang.86b6a24e.js";import{_ as Ce}from"./code-preview.vue_vue_type_script_setup_true_lang.de82175b.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./vue-router.9f65afb1.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";import"./index.6302064d.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.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"},ke=$({name:"codeGenerate"}),pt=$({...ke,setup(ve){const c=A({table_name:"",table_comment:""}),p=A({show:!1,loading:!1,code:[]}),{pager:f,getLists:g,resetParams:K,resetPage:w}=Fe({fetchFun:_e,params:c}),F=re([]),S=n=>{F.value=n.map(({id:o})=>o)},T=async n=>{await k.confirm("\u786E\u5B9A\u8981\u540C\u6B65\u8868\u7ED3\u6784\uFF1F"),await fe({id:n})},v=async n=>{await k.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await de({id:n}),g()},I=async n=>{const o=await ce({id:n});p.code=o,p.show=!0},U=n=>n.some(o=>o.generate_type==1),B=async n=>{if(U(n))return k.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 pe({id:n});o.file&&window.open(o.file,"_blank")},N=(n,o)=>{switch(n){case"generate":B([o.id]);break;case"sync":T(o.id);break;case"delete":v(o.id)}};return g(),(n,o)=>{const D=j,y=O,u=H,G=J,V=W,E=le,_=X,L=ue("router-link"),h=Y,M=Z,R=ee,q=te,z=ae,m=se("perms"),Q=oe;return r(),C("div",be,[e(V,{class:"!border-none",shadow:"never"},{default:t(()=>[e(G,{class:"mb-[-16px]",model:a(c),inline:""},{default:t(()=>[e(y,{label:"\u8868\u540D\u79F0"},{default:t(()=>[e(D,{class:"w-[280px]",modelValue:a(c).table_name,"onUpdate:modelValue":o[0]||(o[0]=l=>a(c).table_name=l),clearable:"",onKeyup:P(a(w),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(y,{label:"\u8868\u63CF\u8FF0"},{default:t(()=>[e(D,{class:"w-[280px]",modelValue:a(c).table_comment,"onUpdate:modelValue":o[1]||(o[1]=l=>a(c).table_comment=l),clearable:"",onKeyup:P(a(w),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(y,null,{default:t(()=>[e(u,{type:"primary",onClick:a(w)},{default:t(()=>[s("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(u,{onClick:a(K)},{default:t(()=>[s("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),i((r(),d(V,{class:"!border-none mt-4",shadow:"never"},{default:t(()=>[b("div",we,[i((r(),d(ge,{class:"inline-block mr-[10px]",onSuccess:a(g)},{default:t(()=>[e(u,{type:"primary"},{icon:t(()=>[e(E,{name:"el-icon-Plus"})]),default:t(()=>[s(" \u5BFC\u5165\u6570\u636E\u8868 ")]),_:1})]),_:1},8,["
|