Files
qhmes/web-dist/js/OnlineAutoList-DwLMR1rD.js
2026-06-16 18:19:57 +08:00

2 lines
15 KiB
Java

var L=(o,s,g)=>new Promise((I,u)=>{var w=i=>{try{f(g.next(i))}catch(h){u(h)}},C=i=>{try{f(g.throw(i))}catch(h){u(h)}},f=i=>i.done?I(i.value):Promise.resolve(i.value).then(w,C);f((g=g.apply(o,s)).next())});import Ko from"./BasicTable-C6eG0bgK.js";import jo from"./TableAction-BiXnWkvt.js";import"./TableImg.vue_vue_type_style_index_0_lang-65ZOQtFn.js";import{b6 as Go,s as Uo,au as Wo,M as Yo,T as Xo}from"./index-X7Y8jykP.js";import Zo from"./OnlineAutoModal-BwhrC-v8.js";import _o from"./OnlineCustomModal-Cp94l-9P.js";import xo from"./OnlineDetailModal-6rwRF-Lu.js";import{J as oe}from"./JImportModal-2M3TeQac.js";import{u as ee,a as te}from"./useListButton-CD_7XW68.js";import{u as ne}from"./useTableColumns-DkARxJ3d.js";import{u as re}from"./useEnhance-DSMGDhnx.js";import{g as ie}from"./useAutoForm-Dtkm06h9.js";import ae from"./OnlineQueryForm-DW8xYcU_.js";import le from"./SuperQuery-494k0Leh.js";import{u as pe}from"./useOnlinePopEvent-CGxmXrya.js";import me from"./OnlinePopModal-PPYKdfpV.js";import{N as se}from"./constant-DfcHKztj.js";import{h as ue,r as Q,C as b,z as n,y as l,H as d,O as z,f as p,P as V,K as m,A as a,J as K,B as de,a1 as ce,Q as y,G as c,E as D,F as j,D as ge,Y as fe,M as Be,N as be}from"./vue-vendor-DNhG1Cve.js";import"./index-M9QP6cvf.js";import{S as Ce}from"./Skeleton-CimgOdM7.js";import"./BasicTable.vue_vue_type_style_index_0_lang-B9DxrWas.js";import"./BasicForm-ClUSoD_-.js";import"./helper-DcLcf4v6.js";import"./index-BzChaRPg.js";import"./useAppInject-DPZGPcR3.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";import"./BasicForm.vue_vue_type_style_index_0_lang-B29PWQy0.js";import"./index-DO7ZhK45.js";import"./index-ByCwbQDV.js";import"./index-Upeu4GGa.js";import"./index-C4wWpZeQ.js";import"./useTimeout-D5AmIBZw.js";import"./useScrollTo-0FPEw5-K.js";import"./useIntersectionObserver-BGOgyKyu.js";import"./index-saD4h7VJ.js";import"./useBreakpoint-DXhPW7nV.js";import"./useEventListener-BRXjwk7A.js";import"./breakpointEnum-BhAg6bcX.js";import"./uniqBy--vsL0WVB.js";import"./index-BDvqZ5j4.js";import"./BasicModal-xH56XuRZ.js";import"./ModalHeader-Sr8KwhJJ.js";import"./useWindowSizeFn-C-0M9_Ul.js";import"./index-CuWaQdlK.js";import"./useForm-D61zovon.js";import"./injectionKey-DPVn4AgL.js";import"./index-DSsDi_fL.js";import"./Group-UHkub2tu.js";import"./Checkbox-Dbxs4we4.js";import"./index-BuONesFs.js";import"./FormOutlined-Y84itqS0.js";import"./useTableContext-CncNVXgp.js";import"./index-DTjkSGYl.js";import"./eagerComputed-BTlOruLW.js";import"./fromPairs-Dx9PT-t0.js";import"./useMaxLevel-DE205ncc.js";import"./index-CfNJyBRj.js";import"./dropdown-jkliuVyN.js";import"./index-DfHu-LAS.js";import"./Group-DBzJABA_.js";import"./RadioButton-DRBix2Fq.js";import"./index-C7ckZv9Z.js";import"./DirectoryTree-nk_YTTIy.js";import"./FolderOpenOutlined-SzIPA7z0.js";import"./index-Cl-8Hzo4.js";import"./scrollTo-D49dA-9c.js";import"./operationUnit-vCu2co3e.js";import"./index-C69VKHba.js";import"./index-DklMb9Qc.js";import"./UpOutlined-B1UMbtrP.js";import"./index-DsixALRt.js";import"./dayjs-jnKD3YGS.js";import"./index-aCD42OrZ.js";import"./quarterOfYear-BU2sPnff.js";import"./index-J2mOtM3w.js";import"./dayjs-ALi1pEeb.js";import"./clickOutside-DHfwTU6R.js";import"./onMountedOrActivated-DhSdLlqP.js";import"./throttle-De_jAmBh.js";import"./uuid-CODpppBC.js";import"./sortable.esm-DJNoJSdJ.js";import"./RedoOutlined-Cq2g4Slp.js";import"./index-CeNCCWzL.js";import"./TableAction.vue_vue_type_style_index_0_lang-BIWZ0bGo.js";import"./index-fAAIzD3j.js";import"./index-DfX9t4DO.js";import"./isNumeric-DjvBa-1E.js";import"./OnlineForm-EKDpzQwF.js";import"./useExtendComponent-DsD-dPUC.js";import"./JUpload.vue_vue_type_style_index_0_lang-B_SS088g.js";import"./JUploadModal.vue_vue_type_script_setup_true_lang-CSwYeVkH.js";import"./useModal-DaJ3Bflg.js";import"./LinkTableSelect-Bxfjs2Wv.js";import"./useLinkTable-DuzCQq29.js";import"./JDictSelectUtil-DwVTEDM5.js";import"./index-Cq6YxX27.js";import"./placeholderImage-CRpUMlaT.js";import"./EditOutlined-drlR34lz.js";import"./LinkTableCard-BUdn9nTb.js";import"./MinusCircleFilled-BLRBKPEV.js";import"./OnlineSelectCascade-BuXb37Ka.js";import"./OnlineSubForm-Dzb1OYao.js";/* empty css */import"./user.api-M95RuX7p.js";import"./customExpression-DKKqya45.js";import"./useCustomHook-DGM29EbD.js";/* empty css */import"./PrinterOutlined-C4QwxYYW.js";import"./OnlinePopForm-DsBK5td-.js";/* empty css */import"./useAutoModal-C9ZiBxOc.js";import"./JModalTip-BKHwxwTZ.js";/* empty css */import"./CommentPanel-Dk7IUKj3.js";import"./UserSelectModal-BFDUCW9t.js";import"./SelectedUserItem-RRb_QZKg.js";import"./index-B4gPlWQt.js";import"./index-Wl3jtD-0.js";import"./UploadOutlined-D3m-zwOG.js";/* empty css */import"./MessageOutlined-BnylU_gE.js";import"./OnlineFormDetail-CxCNVebu.js";import"./DetailForm-DL2xTtRt.js";import"./Area-CONPDlNK.js";import"./pcaUtils-DD1r5iUJ.js";import"./index-C9_hfRup.js";import"./OnlineSubFormDetail-BxYe0rjf.js";import"./cgformState-DUaj-JfG.js";import"./useMethods-D3efiSSd.js";import"./LinkTableListPiece-DoOFTrC_.js";import"./DictColors-Cn4yPqfS.js";import"./JRangeNumber-CX14lnpq.js";import"./SuperQueryValComponent.vue_vue_type_script_lang-B1EwkMyA.js";import"./FileTextOutlined-jLa_kaoN.js";import"./MinusCircleOutlined-mDqJKkqP.js";import"./index-BwqG9R3y.js";import"./index-COZPPMBf.js";const he={name:"OnlineAutoList",components:{BasicTable:Ko,TableAction:jo,OnlineAutoModal:Zo,JImportModal:oe,OnlineQueryForm:ae,OnlineSuperQuery:le,OnlineCustomModal:_o,OnlineDetailModal:xo,OnlinePopModal:me,Loading:Go},setup(){const{createMessage:o}=Uo(),s=Q(""),g=Q(""),{ID:I,onlineTableContext:u,onlineQueryFormOuter:w,loading:C,reload:f,dataSource:i,pagination:h,handleSpecialConfig:v,getColumnList:O,handleChangeInTable:A,loadData:R,superQueryButtonRef:M,superQueryStatus:F,handleSuperQuery:E,onlineExtConfigJson:S,handleFormConfig:H,registerCustomModal:N,tableReloading:P,isConfigCurRoute:t,pageLoading:e}=ee();if(!I.value)throw o.warning("地址错误, 配置ID不存在!"),new Error("地址错误, 配置ID不存在!");let{initCgEnhanceJs:B}=re(u);const{buttonSwitch:k,cgLinkButtonList:G,cgBIBtnMap:U,getQueryButtonCfg:W,getResetButtonCfg:Y,getFormConfirmButtonCfg:X,cgTopButtonList:Z,importUrl:_,registerModal:x,handleAdd:oo,handleEdit:eo,handleBatchDelete:to,handleAddTestData:no,testDataLoading:ro,testDataBtnShow:io,registerImportModal:ao,onImportExcel:lo,onExportExcel:J,cgButtonJsHandler:po,cgButtonActionHandler:mo,cgButtonLinkHandler:so,handleSubmitFlow:uo,getDropDownActions:co,getActions:go,initButtonList:fo,initButtonSwitch:Bo,registerDetailModal:bo,registerBpmModal:Co}=te(u,S),q=Q(!1);function ho(){return L(this,null,function*(){try{q.value=!0,yield J()}finally{setTimeout(()=>q.value=!1,1500)}})}const{columns:yo,actionColumn:Io,selectedKeys:Mo,rowSelection:So,enableScrollBar:ko,tableScroll:To,downloadRowFile:wo,getImgView:Ro,getPcaText:Lo,getFormatDate:Do,handleColumnResult:vo,hrefComponent:Oo,viewOnlineCellImage:Ao,hrefMainTableId:Fo,registerOnlineHrefModal:Eo,registerPopModal:Ho,openPopModal:No,onlinePopModalRef:Po,popTableId:$,handleClickFieldHref:qo}=ne(u,S);ue(I,()=>{Qo()},{immediate:!0});function Qo(){return L(this,null,function*(){C.value=!0;let r=yield O(se);Jo(r),s.value=r.currentTableName,g.value=r.tableType,yield R(),C.value=!1,u.execButtonEnhance("setup")})}function Jo(r){let T=B(r.enhanceJs);u.EnhanceJS=T,fo(r.cgButtonList),Bo(r.hideColumns),vo(r),v(r)}function $o(r){u.queryParam=r,f({mode:"search"})}function zo(r){return L(this,null,function*(){yield ie(M),M.value.init(r)})}function Vo(r){$.value=r.id;let T={title:r.describe};r.record&&r.record.id&&(T.record=r.record,T.isUpdate=!0),No(!0,T)}return pe(Vo),{ID:I,onlineQueryFormOuter:w,queryWithCondition:$o,onQueryFormLoaded:zo,reload:f,superQueryButtonRef:M,superQueryStatus:F,handleSuperQuery:E,loading:C,columns:yo,dataSource:i,pagination:h,actionColumn:Io,rowSelection:So,selectedKeys:Mo,tableScroll:To,enableScrollBar:ko,handleChangeInTable:A,buttonSwitch:k,handleAdd:oo,handleEdit:eo,onImportExcel:lo,onExportExcel:J,exportLoading:q,onExportExcelOverride:ho,cgBIBtnMap:U,getQueryButtonCfg:W,getResetButtonCfg:Y,getFormConfirmButtonCfg:X,cgTopButtonList:Z,cgLinkButtonList:G,cgButtonJsHandler:po,cgButtonActionHandler:mo,cgButtonLinkHandler:so,handleBatchDelete:to,handleAddTestData:no,testDataLoading:ro,testDataBtnShow:io,currentTableName:s,loadData:R,tableType:g,isConfigCurRoute:t,downloadRowFile:wo,getImgView:Ro,getPcaText:Lo,getFormatDate:Do,getActions:go,getDropDownActions:co,registerModal:x,registerCustomModal:N,registerImportModal:ao,registerDetailModal:bo,importUrl:_,handleFormConfig:H,onlinePopModalRef:Po,tableReloading:P,handleSubmitFlow:uo,hrefComponent:Oo,viewOnlineCellImage:Ao,hrefMainTableId:Fo,onlineExtConfigJson:S,registerOnlineHrefModal:Eo,registerPopModal:Ho,popTableId:$,registerBpmModal:Co,handleClickFieldHref:qo,pageLoading:e}}},ye={key:0,style:{"font-size":"12px","font-style":"italic"}},Ie={key:0,style:{"font-size":"12px","font-style":"italic"}},Me=["src","onClick"],Se=["innerHTML","onClick"],ke=["innerHTML"],Te=["title"];function we(o,s,g,I,u,w){const C=Ce,f=m("online-query-form"),i=m("a-button"),h=Xo,v=m("online-super-query"),O=m("TableAction"),A=m("BasicTable"),R=m("OnlineAutoModal"),M=m("online-detail-modal"),F=m("JImportModal"),E=Yo,S=m("online-custom-modal"),H=m("online-pop-modal"),N=m("BpmGraphicModal"),P=m("Loading");return n(),b("div",{class:K(["p-2",`online-list-${o.ID}`])},[o.tableReloading?(n(),l(C,{key:0,active:""})):d("",!0),z(p(f,{ref:"onlineQueryFormOuter",id:o.ID,queryBtnCfg:o.getQueryButtonCfg,resetBtnCfg:o.getResetButtonCfg,onSearch:o.queryWithCondition,onLoaded:o.onQueryFormLoaded},null,8,["id","queryBtnCfg","resetBtnCfg","onSearch","onLoaded"]),[[V,!o.tableReloading]]),o.tableReloading?d("",!0):(n(),l(A,{key:1,ref:"onlineTable",rowKey:"jeecg_row_key",canResize:!0,bordered:!0,showIndexColumn:!1,loading:o.loading,columns:o.columns,dataSource:o.dataSource,pagination:o.pagination,rowSelection:o.rowSelection,actionColumn:o.actionColumn,showTableSetting:!0,clickToRowSelect:!1,scroll:o.tableScroll,onTableRedo:o.reload,class:K({"j-table-force-nowrap":o.enableScrollBar}),onChange:o.handleChangeInTable},{tableTitle:a(()=>{var t;return[o.buttonSwitch.add&&o.cgBIBtnMap.add.enabled?(n(),l(i,{key:0,type:"primary",preIcon:o.cgBIBtnMap.add.buttonIcon,onClick:o.handleAdd},{default:a(()=>[y("span",null,c(o.cgBIBtnMap.add.buttonName),1)]),_:1},8,["preIcon","onClick"])):d("",!0),o.buttonSwitch.import&&o.cgBIBtnMap.import.enabled?(n(),l(i,{key:1,type:"primary",preIcon:o.cgBIBtnMap.import.buttonIcon,onClick:o.onImportExcel},{default:a(()=>[y("span",null,c(o.cgBIBtnMap.import.buttonName),1)]),_:1},8,["preIcon","onClick"])):d("",!0),o.buttonSwitch.export&&o.cgBIBtnMap.export.enabled?(n(),l(i,{key:2,type:"primary",preIcon:o.cgBIBtnMap.export.buttonIcon,loading:o.exportLoading,onClick:o.onExportExcelOverride},{default:a(()=>[y("span",null,c(o.cgBIBtnMap.export.buttonName),1)]),_:1},8,["preIcon","loading","onClick"])):d("",!0),!o.isConfigCurRoute&&(o.tableType==1||o.tableType==2)&&o.buttonSwitch.aigc_mock_data&&((t=o.cgBIBtnMap.aigc_mock_data)!=null&&t.enabled)&&o.dataSource.length==0&&!o.loading?(n(),l(h,{key:3,open:!1,placement:"bottom"},{title:a(()=>[...s[1]||(s[1]=[y("span",null,"当有数据时或生成测试数据后该按钮会隐藏",-1)])]),default:a(()=>[p(i,{preIcon:"mdi:robot-love-outline",loading:o.testDataLoading,onClick:s[0]||(s[0]=e=>o.handleAddTestData(o.currentTableName,o.reload))},{default:a(()=>[D(c(o.cgBIBtnMap.aigc_mock_data.buttonName),1)]),_:1},8,["loading"])]),_:1})):d("",!0),o.cgTopButtonList&&o.cgTopButtonList.length>0?(n(!0),b(j,{key:4},ge(o.cgTopButtonList,(e,B)=>(n(),b(j,null,[e.optType=="js"?(n(),l(i,{key:"cgbtn"+B,onClick:k=>o.cgButtonJsHandler(e.buttonCode),type:"primary",preIcon:e.buttonIcon?"ant-design:"+e.buttonIcon:""},{default:a(()=>[D(c(e.buttonName),1)]),_:2},1032,["onClick","preIcon"])):e.optType=="action"?(n(),l(i,{key:"cgbtn"+B,onClick:k=>o.cgButtonActionHandler(e.buttonCode),type:"primary",preIcon:e.buttonIcon?"ant-design:"+e.buttonIcon:""},{default:a(()=>[D(c(e.buttonName),1)]),_:2},1032,["onClick","preIcon"])):d("",!0)],64))),256)):d("",!0),o.buttonSwitch.batch_delete&&o.cgBIBtnMap.batch_delete.enabled?z((n(),l(i,{key:5,preIcon:o.cgBIBtnMap.batch_delete.buttonIcon,onClick:o.handleBatchDelete},{default:a(()=>[y("span",null,c(o.cgBIBtnMap.batch_delete.buttonName),1)]),_:1},8,["preIcon","onClick"])),[[V,o.selectedKeys.length>0]]):d("",!0),o.buttonSwitch.super_query&&o.cgBIBtnMap.super_query.enabled?(n(),l(v,{key:6,ref:"superQueryButtonRef",online:"",status:o.superQueryStatus,queryBtnCfg:o.cgBIBtnMap.super_query,onSearch:o.handleSuperQuery},null,8,["status","queryBtnCfg","onSearch"])):d("",!0)]}),fileSlot:a(({text:t,record:e,column:B})=>[t?(n(),l(i,{key:1,ghost:!0,type:"primary",preIcon:"ant-design:download",size:"small",onClick:k=>o.downloadRowFile(t,e,B,o.ID)},{default:a(()=>[...s[2]||(s[2]=[D(" 下载 ",-1)])]),_:1},8,["onClick"])):(n(),b("span",ye,"无文件"))]),imgSlot:a(({text:t})=>[t?(n(),b("img",{key:1,src:o.getImgView(t),alt:"图片不存在",class:"online-cell-image",onClick:e=>o.viewOnlineCellImage(t)},null,8,Me)):(n(),b("span",Ie,"无图片"))]),htmlSlot:a(({text:t,column:e,record:B})=>[e.fieldHref?(n(),b("a",{key:0,innerHTML:t,onClick:k=>o.handleClickFieldHref(e.fieldHref,B)},null,8,Se)):(n(),b("div",{key:1,innerHTML:t},null,8,ke))]),pcaSlot:a(({text:t,column:e})=>[y("div",{title:o.getPcaText(t,e)},c(o.getPcaText(t,e)),9,Te)]),dateSlot:a(({text:t,column:e})=>[y("span",null,c(o.getFormatDate(t,e)),1)]),action:a(({record:t})=>[p(O,{actions:o.getActions(t),dropDownActions:o.getDropDownActions(t)},null,8,["actions","dropDownActions"])]),_:1},8,["loading","columns","dataSource","pagination","rowSelection","actionColumn","scroll","onTableRedo","class","onChange"])),p(R,{onRegister:o.registerModal,id:o.ID,cgBIBtnMap:o.cgBIBtnMap,buttonSwitch:o.buttonSwitch,confirmBtnCfg:o.getFormConfirmButtonCfg,onSuccess:o.reload,onFormConfig:o.handleFormConfig},null,8,["onRegister","id","cgBIBtnMap","buttonSwitch","confirmBtnCfg","onSuccess","onFormConfig"]),p(M,{id:o.ID,onRegister:o.registerDetailModal},null,8,["id","onRegister"]),p(F,{onRegister:o.registerImportModal,url:o.importUrl(),onOk:o.reload,online:""},null,8,["onRegister","url","onOk"]),p(E,de(o.hrefComponent.model,ce(o.hrefComponent.on)),{default:a(()=>[(n(),l(fe(o.hrefComponent.is),Be(be(o.hrefComponent.params)),null,16))]),_:1},16),p(S,{onRegister:o.registerCustomModal,onSuccess:o.reload},null,8,["onRegister","onSuccess"]),p(M,{id:o.hrefMainTableId,onRegister:o.registerOnlineHrefModal,defaultFullscreen:!1},null,8,["id","onRegister"]),p(H,{ref:"onlinePopModalRef",id:o.popTableId,onRegister:o.registerPopModal,onSuccess:o.reload,request:"",topTip:""},null,8,["id","onRegister","onSuccess"]),p(N,{onRegister:o.registerBpmModal},null,8,["onRegister"]),p(P,{loading:o.pageLoading,absolute:!0},null,8,["loading"])],2)}const ir=Wo(he,[["render",we]]);export{ir as default};