Files
qhmes/deploy-qhmes/frontend/js/useCgformList-23f3R71E-D9IHBxVE.js

2 lines
7.8 KiB
Java
Raw Normal View History

2026-05-15 11:34:12 +08:00
import{k as t,G as u,aq as Ce,f as x,n as Me,l as m}from"./vue-vendor-C7Zq48Yl.js";import{a8 as Se,B as M,bM as De,R as I,i as Le}from"./antd-vue-vendor-BPnV8VqP.js";import"./index-Du0A3ksf.js";import{a as $e}from"./index-CjmLh_1m.js";import{useListPage as Ae}from"./useListPage-BWia52we.js";import{l as Ee,e as Ie,c as Oe,g as Pe,f as Re,a as Be,b as Ye,d as je}from"./CgformModal-xktwfaX1-C8ycdutA.js";import{u as Je,a0 as Ne,al as d}from"./index-BI6CMai0.js";import{h as Ue}from"./cgformState-CUyRXfhW-C82paFrV.js";var y=(l,i,o)=>new Promise((g,f)=>{var v=c=>{try{a(o.next(c))}catch(r){f(r)}},k=c=>{try{a(o.throw(c))}catch(r){f(r)}},a=c=>c.done?g(c.value):Promise.resolve(c.value).then(v,k);a((o=o.apply(l,i)).next())}),P=(l=>(l[l.normal=0]="normal",l[l.copy=1]="copy",l))(P||{});const{createConfirm:_e}=Je();function O(l,i){const{destroy:o}=_e({title:"确认删除表单方式 ?",content:()=>t("div",{style:"padding: '20px 0'"},[t("div",{style:"margin-bottom: 16px; padding: 12px; background: #f6ffed; border: 1px solid #b7eb8f; border-radius: 6px;"},[t("div",{style:"display: flex; align-items: center; margin-bottom: 4px;"},[t("span",{style:"color: #52c41a; margin-right: 6px;"},[u("")]),t("span",{style:"font-weight: 500; color: #52c41a;"},[u("移除表单")])]),t("div",{style:"color: #666; font-size: 13px; margin-left: 18px;"},[u("保留数据库表和数据")])]),t("div",{style:"padding: 12px; background: #fff2f0; border: 1px solid #ffccc7; border-radius: 6px;"},[t("div",{style:"display: flex; align-items: center; margin-bottom: 4px;"},[t("span",{style:"color: #ff4d4f; margin-right: 6px;"},[u("")]),t("span",{style:"font-weight: 500; color: #ff4d4f;"},[u("删除表单")])]),t("div",{style:"color: #666; font-size: 13px; margin-left: 18px;"},[u("删除数据库表和数据(不可恢复)")])])]),iconType:"warning",closable:!0,maskClosable:!0,width:400,footer:()=>t("div",{style:"text-align: right; padding-top: 16px; border-top: 1px solid #f0f0f0;"},[t(Se,null,{default:()=>[t(M,{onClick:()=>o()},{default:()=>[u("取消")]}),t(M,{type:"primary",onClick:g(i)},{default:()=>[u("移除表单")]}),t(M,{type:"primary",danger:!0,onClick:g(l)},{default:()=>[u(" 删除表单 ")]})]})])});function g(f){return()=>y(null,null,function*(){yield f(),o()})}}function We(l){const i=l.pageType===P.normal,o=Ce(),g=Ue(),f=x(),v=Ae({designScope:l.designScope,tableProps:{api:Ee,columns:l.columns,formConfig:{schemas:l.formSchemas},beforeFetch:e=>{let n=i?0:1,s=i?void 0:o.currentRoute.value.params.code;return Ne(e.tableType_MultiString)&&(e.tableType_MultiString=e.tableType_MultiString.join(",")),Object.assign(e,{copyType:n,physicId:s})}}}),{tableContext:k,createMessage:a,createConfirm:c}=v,[,{reload:r,setLoading:w},{selectedRowKeys:S,selectedRows:p}]=k,[R,D]=d(),[B,Y]=d(),[j,J]=d(),[N,U]=d(),[_,q]=d(),[G,z]=d(),[V,F]=d(),[K,H]=d(),[Q,W]=$e(),[X,Z]=d();function ee(){D.openModal(!0,{isUpdate:!1})}function ne(){J.openModal(!0)}function oe(){r()}let b=null;function te(e){b=e,D.openModal(!0,{isUpdate:!0,record:e})}function ae(){b!=null&&b.id&&(g.addChangedTable(b.id),b=null),r()}function le(e){return y(this,null,function*(){yield Ie(e),r()})}function L(e){return y(this,null,function*(){yield Oe(e),r()})}function ie(e){return O(()=>le(e.id),()=>L(e.id))}function re(){let e=S.value;if(e.length<=0){a.warning("请先选择一条记录!");return}O(()=>$(Pe,e,!0),()=>$(Re,e,!0))}function $(e,n,s=!1){return y(this,null,function*(){try{w(!0);const C=yield e(n);return r(),s&&(S.value=[]),C}finally{w(!1)}return Promise.reject()})}function se(){T(([e])=>q.openModal(!0,{row:e}))}function ce(){T(([e])=>z.openModal(!0,{row:e}))}function de(){T(([e])=>F.openModal(!0,{row:e}))}function ue(){T(([e])=>H.openModal(!0,{row:e}))}function pe(){Y.openModal(!0,{})}function T(e,n=1,s=1){p.value.length<n?a.warning(`请先至少选中 ${n} 条记录`):p.value.length>s?a.warning(`最多只能选中 ${n} 条记录`):e(p.value)}function fe(){if(p.value.length===0)a.warning("请先选中一条记录");else if(p.value.length>1)a.warning("代码生成只能选中一条记录");else{let