2 lines
10 KiB
JavaScript
2 lines
10 KiB
JavaScript
|
import{d as ue,O as me,f as fe,r as u,n as he,v as xe,a1 as S,h as m,c as j,e as a,w as e,a as s,t as c,u as n,N as t,i as f,F as ve,G as ge,I as y,y as M,B as be,a8 as q,a4 as ye,R as ke,E as we,al as Ce,am as Ee,aD as Te,as as Fe,aF as Ve,X as De,W as Ne,Y as Se,$ as Pe,ah as Be,aj as Ae,at as $e,aE as je,a2 as Le,aC as Ie,ap as Ge,aa as ze,a0 as Oe,p as Re,g as Ue,_ as Me}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css */import{s as qe,g as Ke,t as We,q as Xe,r as Ye,u as He}from"./tools-123d2a10.js";import{_ as Je}from"./add-table.vue_vue_type_script_setup_true_lang-ff6a0016.js";const h=C=>(Re("data-v-3baec969"),C=C(),Ue(),C),Qe={class:"main-container"},Ze={class:"flex justify-between items-center mb-[10px]"},et={class:"text-[20px]"},tt=h(()=>s("div",{class:"w-[24px] h-[24px] text-[#fff] bg-[#778aa3] text-center leading-[24px] rounded-full"}," 1",-1)),at={class:"text-[14px] text-[#303133] font-[700]"},lt={class:"text-[#999]"},nt={class:"mt-[20px] mb-[40px] h-[32px]"},ot=h(()=>s("div",{class:"w-[24px] h-[24px] text-[#fff] bg-[#778aa3] text-center leading-[24px] rounded-full"}," 2",-1)),st={class:"text-[14px] text-[#303133] font-[700]"},it={class:"text-[#999]"},dt=h(()=>s("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1)),ct=h(()=>s("div",{class:"w-[24px] h-[24px] text-[#fff] bg-[#778aa3] text-center leading-[24px] rounded-full"}," 3",-1)),rt={class:"text-[14px] text-[#303133] font-[700]"},pt={class:"text-[#999]"},_t=h(()=>s("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1)),ut=h(()=>s("div",{class:"w-[24px] h-[24px] text-[#fff] bg-[#778aa3] text-center leading-[24px] rounded-full"}," 4",-1)),mt={class:"text-[14px] text-[#303133] font-[700]"},ft={class:"text-[#999]"},ht=h(()=>s("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1)),xt=h(()=>s("div",{class:"w-[24px] h-[24px] text-[#fff] bg-[#778aa3] text-center leading-[24px] rounded-full"}," 5",-1)),vt={class:"text-[14px] text-[#303133] font-[700]"},gt={class:"text-[#999]"},bt=h(()=>s("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1)),yt={class:"mt-[16px] flex justify-end"},kt={class:"flex h-[50vh]"},wt={class:"flex items-center"},Ct={class:"pl-[5px]"},Et={class:"ml-[20px]",style:{width:"calc(100% - 285px)"}},Tt=ue({__name:"index",setup(C){const K=me().meta.title,W=fe(),P=u("codeGeneration"),i=he({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{table_name:"",table_content:"",addon_name:""}}),L=u(),X=d=>{d&&(d.resetFields(),v())};xe(()=>{window.codeActiveName&&(P.value=window.codeActiveName+"",window.codeActiveName=null),v()});const v=(d=1)=>{i.loading=!0,i.page=d,qe({page:i.page,limit:i.limit,...i.searchParam}).then(l=>{i.loading=!1,i.data=l.data.data,i.total=l.data.total}).catch(()=>{i.loading=!1})},I=u([]),Y=d=>{Ke({search:d}).then(l=>{I.value=l.data})},B=u(null),H=()=>{B.value.setFormData(),B.value.showDialog=!0},J=d=>{q.confirm(t("codeDeleteTips"),t("warning"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{We(d).then(()=>{v()}).catch(()=>{})})},Q=d=>{W.push("/tools/code/edit?id="+d.id)},Z=d=>{Xe({id:d}).then(l=>{i.loading=!1,q.confirm(l.msg!="2"?t("saveAndSyncText"):t("saveAndSyncText1"),t("warning"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel")}).then(()=>{G(d,3)}).catch(()=>{})}).catch(()=>{i.loading=!1})},G=(d,l)=>{i.loading=!0,Ye({id:d,generate_type:l}).then(r=>{ye({type:"success",message:"操作成功"}),l!=3?(i.loading=!1,window.open(ke(r.data.file),"_blank")):v()}).catc
|