WokerTask/public/admin/assets/index.958b124f.js

2 lines
6.6 KiB
JavaScript
Raw Normal View History

2024-01-16 16:29:09 +08:00
import{C as Q,D as J,w as W,F as H,J as O,P as X,p as Y,q as Z,r as ee,Q as te,R as oe}from"./element-plus.ff90c99c.js";import{_ as ae}from"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import{k as ne,f as v,b as le}from"./index.87cea444.js";import{d as $,$ as A,r as re,ag as ue,aq as se,o as r,c as C,W as e,Q as t,u as a,aa as P,U as s,R as i,P as d,a as b,j as ie,T as me}from"./@vue.f8dfc830.js";import{b as de,c as pe,d as ce,e as _e,s as fe}from"./code.7f59d715.js";import{u as Fe}from"./usePaging.bd7a7dec.js";import{_ as ge}from"./data-table.vue_vue_type_script_setup_true_lang.d8bcec4b.js";import{_ as Ce}from"./code-preview.vue_vue_type_script_setup_true_lang.c23de4c5.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./lodash.3e731b89.js";import"./axios.c2babb35.js";import"./vue-router.6d4cf914.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.3a7f085f.js";import"./color.5ae3e2dd.js";import"./clone.7bcb5228.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.37836f15.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.79024f1a.js";import"./index.000b2a9c.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.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"},ve=$({name:"codeGenerate"}),Ft=$({...ve,setup(ke){const p=A({table_name:"",table_comment:""}),c=A({show:!1,loading:!1,code:[]}),{pager:f,getLists:g,resetParams:T,resetPage:w}=Fe({fetchFun:_e,params:p}),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()},U=async n=>{const o=await pe({id:n});c.code=o,c.show=!0},I=n=>n.some(o=>o.generate_type==1),D=async n=>{if(I(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 ce({id:n});o.file&&window.open(o.file,"_blank")},N=(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=Q,y=J,u=W,R=H,V=O,E=le,_=X,q=ue("router-link"),h=Y,G=Z,j=ee,z=te,L=ae,m=se("perms"),M=oe;return r(),C("div",be,[e(V,{class:"!border-none",shadow:"never"},{default:t(()=>[e(R,{class:"mb-[-16px]",model:a(p),inline:""},{default:t(()=>[e(y,{label:"\u8868\u540D\u79F0"},{default:t(()=>[e(B,{class:"w-[280px]",modelValue:a(p).table_name,"onUpdate:modelValue":o[0]||(o[0]=l=>a(p).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(p).table_comment,"onUpdate:modelValue":o[1]||(o[1]=l=>a(p).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(()=>[b("div",we,[i((r(),d(ge,{class:"inline-block mr-[10px]",onSuccess:a(g)},{default:t(()=>[e(u,{type:"primary"},{icon:t(()=>[