2 lines
9.8 KiB
Java
2 lines
9.8 KiB
Java
var I=(t,i,c)=>new Promise((w,h)=>{var C=a=>{try{p(c.next(a))}catch(d){h(d)}},f=a=>{try{p(c.throw(a))}catch(d){h(d)}},p=a=>a.done?w(a.value):Promise.resolve(a.value).then(C,f);p((c=c.apply(t,i)).next())});import{B as se}from"./index-BDvqZ5j4.js";import pe from"./BasicTable-C6eG0bgK.js";import me from"./TableAction-BiXnWkvt.js";import"./TableImg.vue_vue_type_style_index_0_lang-65ZOQtFn.js";import{aD as de,s as ue,d as O,au as ce,bY as fe}from"./index-X7Y8jykP.js";import{u as ge}from"./useListPage-CK9oQ-1O.js";import{u as ye}from"./useTableColumns-DkARxJ3d.js";import be from"./OnlinePopModal-PPYKdfpV.js";import{a as he}from"./useAutoModal-C9ZiBxOc.js";import{a as Te,u as we}from"./useModal-DaJ3Bflg.js";import{e as Ce,h as $,r as T,c as Se,t as ve,C as S,z as y,f as u,A as l,K as b,F as ke,Q as v,G as N,y as Q,E as k,H as Me}from"./vue-vendor-DNhG1Cve.js";import"./BasicModal-xH56XuRZ.js";import"./ModalHeader-Sr8KwhJJ.js";import"./useTimeout-D5AmIBZw.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";import"./index-BzChaRPg.js";import"./useWindowSizeFn-C-0M9_Ul.js";import"./index-ByCwbQDV.js";import"./index-Upeu4GGa.js";import"./index-C4wWpZeQ.js";import"./index-M9QP6cvf.js";import"./Skeleton-CimgOdM7.js";import"./useScrollTo-0FPEw5-K.js";import"./useIntersectionObserver-BGOgyKyu.js";import"./useAppInject-DPZGPcR3.js";import"./index-CuWaQdlK.js";import"./index-DO7ZhK45.js";import"./BasicTable.vue_vue_type_style_index_0_lang-B9DxrWas.js";import"./BasicForm-ClUSoD_-.js";import"./helper-DcLcf4v6.js";import"./BasicForm.vue_vue_type_style_index_0_lang-B29PWQy0.js";import"./index-saD4h7VJ.js";import"./useBreakpoint-DXhPW7nV.js";import"./useEventListener-BRXjwk7A.js";import"./breakpointEnum-BhAg6bcX.js";import"./uniqBy--vsL0WVB.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"./useTable-DbHE4FHE.js";import"./useMethods-D3efiSSd.js";import"./useApprovalSelection-D4wlWO_T.js";import"./JDictSelectUtil-DwVTEDM5.js";import"./index-Cq6YxX27.js";import"./Area-CONPDlNK.js";import"./pcaUtils-DD1r5iUJ.js";import"./LinkTableListPiece-DoOFTrC_.js";import"./DictColors-Cn4yPqfS.js";import"./OnlinePopForm-DsBK5td-.js";import"./useExtendComponent-DsD-dPUC.js";import"./constant-DfcHKztj.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"./LinkTableSelect-Bxfjs2Wv.js";import"./useLinkTable-DuzCQq29.js";import"./placeholderImage-CRpUMlaT.js";import"./EditOutlined-drlR34lz.js";import"./LinkTableCard-BUdn9nTb.js";import"./MinusCircleFilled-BLRBKPEV.js";import"./OnlineSelectCascade-BuXb37Ka.js";import"./useAutoForm-Dtkm06h9.js";import"./user.api-M95RuX7p.js";import"./customExpression-DKKqya45.js";import"./useEnhance-DSMGDhnx.js";import"./OnlineSubForm-Dzb1OYao.js";/* empty css */import"./PrinterOutlined-C4QwxYYW.js";/* empty css */import"./JModalTip-BKHwxwTZ.js";/* empty css */const Pe=Ce({name:"OnlinePopListModal",props:{id:{type:String,default:""},multi:{type:Boolean,default:!1},addAuth:{type:Boolean,default:!0}},components:{BasicModal:se,BasicTable:pe,TableAction:me,PlusOutlined:de,OnlinePopModal:be},emits:["success","register"],setup(t,{emit:i}){const{createMessage:c}=ue(),{popModalFixedWidth:w,resetBodyStyle:h,popBodyStyle:C}=he(),f=T(""),p=T(800),[a,{closeModal:d}]=Te(e=>{f.value="",F.value=e.selectedRowKeys,D.value=e.selectedRows,ee({current:1}),B(),h()}),[M,{openModal:P}]=we();function R(){d()}const o=Se(()=>{const e=F.value;return!(e&&e.length>0)}),m=T(!1);function V(){m.value=!0;let e=ve(D.value);e&&e.length>0&&(i("success",e),d()),setTimeout(()=>{m.value=!1},200)}function q(e){const n="/online/cgform/api/getData/"+t.id;return O.get({url:n,params:e})}function z(e){return e.column="id",new Promise((n,g)=>I(null,null,function*(){const s=yield q(e);n(s)}))}const H={isPopList:!0,reloadTable(){},isTree(){return!1}},x=T({}),{columns:L,downloadRowFile:K,getImgView:U,getPcaText:W,getFormatDate:j,handleColumnResult:E,hrefComponent:J,viewOnlineCellImage:G}=ye(H,x);function Y(){const e="/online/cgform/api/getColumns/"+t.id;return new Promise((n,g)=>{O.get({url:e},{isTransformResponse:!1}).then(s=>{s.success?n(s.result):(c.warning(s.message),g())})})}const A=T("");$(()=>t.id,()=>I(null,null,function*(){let e=yield Y();E(e),A.value=e.description}),{immediate:!0});const{tableContext:X}=ge({designScope:"process-design",pagination:!0,tableProps:{title:"",api:z,clickToRowSelect:!0,columns:L,showTableSetting:!1,immediate:!1,canResize:!1,showActionColumn:!1,actionColumn:{dataIndex:"action",slots:{customRender:"action"}},useSearchForm:!1,beforeFetch:e=>re(e)}}),[Z,{reload:B,setPagination:ee},{rowSelection:_,selectedRowKeys:F,selectedRows:D}]=X;$(()=>t.multi,e=>{e==!0?_.type="checkbox":_.type="radio"},{immediate:!0});function te(e){return[{label:"编辑",onClick:oe.bind(null,e)}]}function oe(e){}function ie(){B()}const ne=["int","double","Date","Datetime","BigDecimal"];function re(e){let n=f.value;if(!n)return e.superQueryMatchType="or",e.superQueryParams="",e;let g=L.value,s=[];if(g&&g.length>0)for(let r of g)r.dbType&&(r.dbType=="string"?s.push({field:r.dataIndex,type:r.dbType.toLowerCase(),rule:"like",val:n}):r.dbType=="Date"?n.length==10&&s.push({field:r.dataIndex,type:r.dbType.toLowerCase(),rule:"eq",val:n}):r.dbType=="Datetime"?n.length==19&&s.push({field:r.dataIndex,type:r.dbType.toLowerCase(),rule:"eq",val:n}):ne.indexOf(r.dbType)&&s.push({field:r.dataIndex,type:r.dbType.toLowerCase(),rule:"eq",val:n}));return e.superQueryMatchType="or",e.superQueryParams=encodeURI(JSON.stringify(s)),e}function le(){P(!0,{})}function ae(e){let n=[e,...D.value];i("success",n),d()}return{registerModal:a,modalWidth:p,handleCancel:R,submitDisabled:o,submitLoading:m,handleSubmit:V,registerTable:Z,getTableAction:te,searchText:f,onSearch:ie,downloadRowFile:K,getImgView:U,getPcaText:W,getFormatDate:j,hrefComponent:J,viewOnlineCellImage:G,rowSelection:_,modalTitle:A,registerPopModal:M,handleAdd:le,reload:B,popModalFixedWidth:w,popBodyStyle:C,handleDataSave:ae}}}),Re={style:{display:"inline-block",width:"calc(100% - 140px)","text-align":"left"}},Be={key:0,style:{"font-size":"12px","font-style":"italic"}},_e={key:0,style:{"font-size":"12px","font-style":"italic"}},De=["src","onClick"],Ie=["innerHTML"],Le=["title"];function Ae(t,i,c,w,h,C){const f=b("PlusOutlined"),p=b("a-button"),a=fe,d=b("TableAction"),M=b("BasicTable"),P=b("BasicModal"),R=b("online-pop-modal");return y(),S(ke,null,[u(P,{onRegister:t.registerModal,width:t.popModalFixedWidth,dialogStyle:{top:"70px"},bodyStyle:t.popBodyStyle,title:t.modalTitle,wrapClassName:"jeecg-online-pop-list-modal"},{footer:l(()=>[v("div",Re,[t.addAuth?(y(),Q(p,{key:0,style:{"border-radius":"50px"},type:"primary",onClick:t.handleAdd},{default:l(()=>[u(f),i[1]||(i[1]=k("新增记录",-1))]),_:1},8,["onClick"])):Me("",!0)]),u(p,{key:"back",onClick:t.handleCancel},{default:l(()=>[...i[2]||(i[2]=[k("关闭",-1)])]),_:1},8,["onClick"]),u(p,{disabled:t.submitDisabled,key:"submit",type:"primary",onClick:t.handleSubmit,loading:t.submitLoading},{default:l(()=>[...i[3]||(i[3]=[k("确定",-1)])]),_:1},8,["disabled","onClick","loading"])]),default:l(()=>[u(M,{onRegister:t.registerTable,rowSelection:t.rowSelection},{tableTitle:l(()=>[u(a,{value:t.searchText,"onUpdate:value":i[0]||(i[0]=o=>t.searchText=o),onSearch:t.onSearch,placeholder:"请输入关键词,按回车搜索",style:{width:"240px"}},null,8,["value","onSearch"])]),action:l(({record:o})=>[u(d,{actions:t.getTableAction(o)},null,8,["actions"])]),fileSlot:l(({text:o})=>[o?(y(),Q(p,{key:1,ghost:!0,type:"primary",preIcon:"ant-design:download",size:"small",onClick:m=>t.downloadRowFile(o)},{default:l(()=>[...i[4]||(i[4]=[k(" 下载 ",-1)])]),_:1},8,["onClick"])):(y(),S("span",Be,"无文件"))]),imgSlot:l(({text:o})=>[o?(y(),S("img",{key:1,src:t.getImgView(o),alt:"图片不存在",class:"online-cell-image",onClick:m=>t.viewOnlineCellImage(o)},null,8,De)):(y(),S("span",_e,"无图片"))]),htmlSlot:l(({text:o})=>[v("div",{innerHTML:o},null,8,Ie)]),pcaSlot:l(({text:o,column:m})=>[v("div",{title:t.getPcaText(o,m)},N(t.getPcaText(o,m)),9,Le)]),dateSlot:l(({text:o,column:m})=>[v("span",null,N(t.getFormatDate(o,m)),1)]),_:1},8,["onRegister","rowSelection"])]),_:1},8,["onRegister","width","bodyStyle","title"]),u(R,{id:t.id,onRegister:t.registerPopModal,onSuccess:t.handleDataSave,topTip:""},null,8,["id","onRegister","onSuccess"])],64)}const Qo=ce(Pe,[["render",Ae],["__scopeId","data-v-d3e4fa40"]]);export{Qo as default};
|