moreShopAdmin/build/admin/assets/index.c80433f4.js

2 lines
6.7 KiB
JavaScript
Raw Normal View History

2024-11-21 17:27:37 +08:00
import{C as O,D as Q,w as Z,F as H,L as J,M as W,p as X,q as Y,r as ee,N as te,O as oe}from"./element-plus.91c68cc0.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{e as ae,f as k,b as le}from"./index.d12b3af4.js";import{d as h,Z as P,r as re,af as ue,ap as se,o as r,c as C,U as t,L as o,u as n,aa as $,R as s,M as i,K as d,a as b,j as ie,Q as me}from"./@vue.76ce7aa3.js";import{b as de,c as pe,d as _e,e as ce,s as fe}from"./code.c509338d.js";import{u as Fe}from"./usePaging.f8c888e4.js";import{_ as ge}from"./data-table.vue_vue_type_script_setup_true_lang.d5ebe188.js";import{_ as Ce}from"./code-preview.vue_vue_type_script_setup_true_lang.d77b0ca7.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.4e6d2a38.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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"./nprogress.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./index.e03c2e5b.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const be={class:"code-generation"},we={class:"flex"},ye={class:"mt-4"},Ee={class:"flex items-center"},ve={class:"flex justify-end mt-4"},ke=h({name:"codeGenerate"}),_t=h({...ke,setup(De){const p=P({table_name:"",table_comment:""}),_=P({show:!1,loading:!1,code:[]}),{pager:f,getLists:g,resetParams:K,resetPage:w}=Fe({fetchFun:ce,params:p}),F=re([]),S=a=>{F.value=a.map(({id:e})=>e)},T=async a=>{await k.confirm("\u786E\u5B9A\u8981\u540C\u6B65\u8868\u7ED3\u6784\uFF1F"),await fe({id:a})},D=async a=>{await k.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await de({id:a}),g()},N=async a=>{const e=await pe({id:a});_.code=e,_.show=!0},U=a=>a.some(e=>e.generate_type==1),B=async a=>{if(U(a))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 e=await _e({id:a});e.file&&window.open(e.file,"_blank")},I=(a,e)=>{switch(a){case"generate":B([e.id]);break;case"sync":T(e.id);break;case"delete":D(e.id)}};return g(),(a,e)=>{const V=O,y=Q,u=Z,L=H,x=J,E=le,c=W,M=ue("router-link"),v=X,G=Y,R=ee,j=te,q=ne,m=se("perms"),z=oe;return r(),C("div",be,[t(x,{class:"!border-none",shadow:"never"},{default:o(()=>[t(L,{class:"mb-[-16px]",model:n(p),inline:""},{default:o(()=>[t(y,{label:"\u8868\u540D\u79F0"},{default:o(()=>[t(V,{class:"w-[280px]",modelValue:n(p).table_name,"onUpdate:modelValue":e[0]||(e[0]=l=>n(p).table_name=l),clearable:"",onKeyup:$(n(w),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),t(y,{label:"\u8868\u63CF\u8FF0"},{default:o(()=>[t(V,{class:"w-[280px]",modelValue:n(p).table_comment,"onUpdate:modelValue":e[1]||(e[1]=l=>n(p).table_comment=l),clearable:"",onKeyup:$(n(w),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),t(y,null,{default:o(()=>[t(u,{type:"primary",onClick:n(w)},{default:o(()=>e[6]||(e[6]=[s("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(u,{onClick:n(K)},{default:o(()=>e[7]||(e[7]=[s("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),i((r(),d(x,{class:"!border-none mt-4",shadow:"never"},{default:o(()=>[b("div",we,[i((r(),d(ge,{class:"inline-block mr-[10px]",onSuccess:n(g)},{default:o(()=>[t(u,{type:"primary"},{icon:o(()=>[t(E,{name:"el-icon-Plus"})]),default:o(()=>[e[8]||(e[8]=s(" \u5BFC\u5165\u6570