multiStoreAdmin/build/store/assets/index.2c7a19eb.js

2 lines
6.4 KiB
JavaScript
Raw Permalink Normal View History

2024-10-12 19:40:17 +08:00
import{D as J,F as O,w as Q,G as W,J as H,M as X,p as Y,q as Z,r as ee,N as te,O as oe}from"./element-plus.ab0703f2.js";import{_ as ae}from"./index.vue_vue_type_script_setup_true_lang.5fc87b57.js";import{j as ne,f as v,b as le}from"./index.5ab034a5.js";import{d as $,$ as A,r as re,ah as ue,ap as se,o as r,c as b,W as e,Q as t,u as a,aa as P,U as s,R as i,P as d,a as C,j as ie,T as me}from"./@vue.340249d8.js";import{b as de,c as ce,d as pe,e as _e,s as fe}from"./code.3685339a.js";import{u as Fe}from"./usePaging.fff444fa.js";import{_ as ge}from"./data-table.vue_vue_type_script_setup_true_lang.e783b960.js";import{_ as be}from"./code-preview.vue_vue_type_script_setup_true_lang.d4f3b8ea.js";import"./lodash-es.edba6135.js";import"./@vueuse.e3650918.js";import"./@element-plus.558a564d.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.9886411c.js";import"./axios.45058a27.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.0f9ce7c3.js";import"./lodash.3d784a58.js";import"./vue-router.9ddb0e92.js";import"./pinia.97fe9b12.js";import"./css-color-function.5c1c877d.js";import"./color.97e03886.js";import"./clone.cfa55f7b.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.8c276ac9.js";import"./vue-clipboard3.44194d32.js";import"./clipboard.47836ecb.js";import"./echarts.8535e5a6.js";import"./zrender.3eba8991.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.309a94da.js";import"./index.5670c3d4.js";const Ce={class:"code-generation"},we={class:"flex"},ye={class:"mt-4"},he={class:"flex items-center"},Ee={class:"flex justify-end mt-4"},ve=$({name:"codeGenerate"}),dt=$({...ve,setup(ke){const c=A({table_name:"",table_comment:""}),p=A({show:!1,loading:!1,code:[]}),{pager:f,getLists:g,resetParams:T,resetPage:w}=Fe({fetchFun:_e,params:c}),F=re([]),S=n=>{F.value=n.map(({id:o})=>o)},K=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()},N=async n=>{const o=await ce({id:n});p.code=o,p.show=!0},U=n=>n.some(o=>o.generate_type==1),D=async n=>{if(U(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 pe({id:n});o.file&&window.open(o.file,"_blank")},G=(n,o)=>{switch(n){case"generate":D([o.id]);break;case"sync":K(o.id);break;case"delete":k(o.id)}};return g(),(n,o)=>{const B=J,y=O,u=Q,I=W,V=H,h=le,_=X,j=ue("router-link"),E=Y,M=Z,R=ee,q=te,z=ae,m=se("perms"),L=oe;return r(),b("div",Ce,[e(V,{class:"!border-none",shadow:"never"},{default:t(()=>[e(I,{class:"mb-[-16px]",model:a(c),inline:""},{default:t(()=>[e(y,{label:"\u8868\u540D\u79F0"},{default:t(()=>[e(B,{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(B,{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(T)},{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(()=>[C("div",we,[i((r(),d(ge,{class:"inline-block mr-[10px]",onSuccess:a(g)},{default:t(()=>[e(u,{type:"primary"},{icon:t(()=>[e(h,{name:"el-icon-Plus"})]),default:t(()=>[s(" \u5BFC\u5165\u6570\u636E\u8868 ")]),_:1})]),_:1},8,["onSuccess"])),[[m,["tools.generator/selectTable"]]]),i((r(),d(u,{disabled:!a(F).length,onClick:o