suyuan/public/admin/assets/index.1b92c7b1.js

2 lines
6.5 KiB
JavaScript
Raw Normal View History

2023-11-25 18:17:31 +08:00
import{B as H,C as J,w as O,D as Q,H as W,I as X,p as Y,q as Z,r as ee,J as te,K as oe}from"./element-plus.c4a2af8a.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_lang.2a46e71f.js";import{k as ae,f as E,b as le}from"./index.2b468485.js";import{d as K,$ as A,r as se,a4 as ue,af as re,o as l,c as h,U as e,L as t,M as r,u as i,K as m,R as ie,a9 as $,a as C,k as de,S as u}from"./@vue.e8706010.js";import{b as me,c as ce,d as _e,e as pe,s as fe}from"./code.4a8500a4.js";import{u as Fe}from"./usePaging.160b82b8.js";import{_ as ge}from"./data-table.vue_vue_type_script_setup_true_lang.0b91e955.js";import{_ as he}from"./code-preview.vue_vue_type_script_setup_true_lang.687a09eb.js";import"./@vueuse.1e5a6e21.js";import"./@element-plus.196c7323.js";import"./lodash-es.29c53eac.js";import"./dayjs.ff93117e.js";import"./axios.eb055ccc.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.ec5da75f.js";import"./vue-router.12d45bc3.js";import"./pinia.dfca86b4.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.31dc130b.js";import"./color.b6d632a4.js";import"./clone.7a47b02c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.3a33898e.js";import"./ms.a9ae1d6d.js";import"./nprogress.fa64f2fc.js";import"./vue-clipboard3.be0dfeee.js";import"./clipboard.824ba320.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.2cdc8407.js";import"./index.2c826b32.js";const Ce={class:"code-generation"},be=u("\u67E5\u8BE2"),we=u("\u91CD\u7F6E"),ye={class:"flex"},ve=u(" \u5BFC\u5165\u6570\u636E\u8868 "),Ee=u(" \u5220\u9664 "),ke=u(" \u751F\u6210\u4EE3\u7801 "),Be={class:"mt-4"},De={class:"flex items-center"},Ve=u(" \u9884\u89C8 "),xe=u(" \u7F16\u8F91 "),Ae=u(" \u66F4\u591A "),$e=u(" \u751F\u6210\u4EE3\u7801 "),Ke=u(" \u540C\u6B65 "),Pe=u(" \u5220\u9664 "),Se={class:"flex justify-end mt-4"},Te=K({name:"codeGenerate"}),vt=K({...Te,setup(Ie){const c=A({table_name:"",table_comment:""}),_=A({show:!1,loading:!1,code:[]}),{pager:f,getLists:g,resetParams:P,resetPage:b}=Fe({fetchFun:me,params:c}),F=se([]),S=n=>{F.value=n.map(({id:o})=>o)},T=async n=>{await E.confirm("\u786E\u5B9A\u8981\u540C\u6B65\u8868\u7ED3\u6784\uFF1F"),await fe({id:n})},k=async n=>{await E.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ce({id:n}),g()},I=async n=>{const o=await _e({id:n});_.code=o,_.show=!0},U=n=>n.some(o=>o.generate_type==1),B=async n=>{if(U(n))return E.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":k(o.id)}};return g(),(n,o)=>{const D=H,w=J,s=O,G=Q,V=W,y=le,p=X,L=ue("router-link"),v=Y,M=Z,R=ee,q=te,z=ne,d=re("perms"),j=oe;return l(),h("div",Ce,[e(V,{class:"!border-none",shadow:"never"},{default:t(()=>[e(G,{class:"mb-[-16px]",model:c,inline:""},{default:t(()=>[e(w,{label:"\u8868\u540D\u79F0"},{default:t(()=>[e(D,{class:"w-[280px]",modelValue:c.table_name,"onUpdate:modelValue":o[0]||(o[0]=a=>c.table_name=a),clearable:"",onKeyup:$(i(b),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(w,{label:"\u8868\u63CF\u8FF0"},{default:t(()=>[e(D,{class:"w-[280px]",modelValue:c.table_comment,"onUpdate:modelValue":o[1]||(o[1]=a=>c.table_comment=a),clearable:"",onKeyup:$(i(b),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(w,null,{default:t(()=>[e(s,{type:"primary",onClick:i(b)},{default:t(()=>[be]),_:1},8,["onClick"]),e(s,{onClick:i(P)},{default:t(()=>[we]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),r((l(),m(V,{class:"!border-none mt-4",shadow:"never"},{default:t(()=>[C("div",ye,[r((l(),m(ge,{class:"inline-block mr-[