Files
qhmes/web-dist/js/useListPage-CK9oQ-1O.js

2 lines
7.9 KiB
Java
Raw Normal View History

2026-06-16 18:19:57 +08:00
var ie=Object.defineProperty,oe=Object.defineProperties;var ue=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var se=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable;var Q=(e,c,a)=>c in e?ie(e,c,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[c]=a,b=(e,c)=>{for(var a in c||(c={}))se.call(c,a)&&Q(e,a,c[a]);if($)for(var a of $(c))de.call(c,a)&&Q(e,a,c[a]);return e},O=(e,c)=>oe(e,ue(c));var E=(e,c,a)=>new Promise((v,m)=>{var n=w=>{try{I(a.next(w))}catch(C){m(C)}},g=w=>{try{I(a.throw(w))}catch(C){m(C)}},I=w=>w.done?v(w.value):Promise.resolve(w.value).then(n,g);I((a=a.apply(e,c)).next())});import{d as _,h as V,b as fe,r as j,W as me,n as D,u as ge}from"./vue-vendor-DNhG1Cve.js";import"./BasicTable.vue_vue_type_style_index_0_lang-B9DxrWas.js";import"./TableAction.vue_vue_type_style_index_0_lang-BIWZ0bGo.js";import"./TableImg.vue_vue_type_style_index_0_lang-65ZOQtFn.js";import{u as we}from"./useTable-DbHE4FHE.js";import{bo as he,dx as Y,dy as G,s as ye,dz as Ce,c as xe,d4 as Re,dA as J,dB as Se,dC as ve,dD as Ie,dE as Te}from"./index-X7Y8jykP.js";import{useMethods as Pe}from"./useMethods-D3efiSSd.js";import{u as be}from"./useApprovalSelection-D4wlWO_T.js";let A=null;function Ee(e){return A=e,()=>{A===e&&(A=null)}}function Ue(){if(!A)return null;try{return A()}catch(e){return null}}const Ae={traceProofreadBy:[{title:"校对人",dataIndex:"traceProofreadBy",width:100,align:"center",defaultHidden:!0},{title:"校对时间",dataIndex:"traceProofreadTime",width:165,align:"center",defaultHidden:!0}],traceAuditBy:[{title:"审核人",dataIndex:"traceAuditBy",width:100,align:"center",defaultHidden:!0},{title:"审核时间",dataIndex:"traceAuditTime",width:165,align:"center",defaultHidden:!0}],traceApproveBy:[{title:"批准人",dataIndex:"traceApproveBy",width:100,align:"center",defaultHidden:!0},{title:"批准时间",dataIndex:"traceApproveTime",width:165,align:"center",defaultHidden:!0}]},Le=Object.values(Ae).flat(),{handleExportXls:Oe,handleImportXls:_e}=Pe();function Fe(e){const c=ye();let a={};e.designScope&&(a=he(e.designScope));const v=Z(e.tableProps),m=me(),[,n,{selectedRowKeys:g,selectedRows:I}]=v,{getForm:w,reload:C,setLoading:F,getColumns:L}=n,T=j("");let d=null,P="";_(()=>{d&&(clearTimeout(d),d=null)});const i=be();V(I,r=>i.setSelection(r||[],m.path),{deep:!0}),_(()=>i.clear()),_(Ee(()=>{var t,l,u,o,f;const r=((t=n.getColumns)==null?void 0:t.call(n))||((l=e.tableProps)==null?void 0:l.columns)||[];return ve({title:((u=e.tableProps)==null?void 0:u.title)||"",pagePath:m.fullPath,rowKey:((o=e.tableProps)==null?void 0:o.rowKey)||"id",sourceColumns:r,records:((f=n.getDataSource)==null?void 0:f.call(n))||[]})}));function y(){var r;try{return(r=n.getDataSource)==null||r.call(n),!0}catch(t){return!1}}function R(){var t,l;if(!y())return;const r=((t=e.tableProps)==null?void 0:t.rowKey)||"id";(l=n.setProps)==null||l.call(n,{rowClassName:u=>T.value&&String(u[r])===T.value?"im-record-locate-row":""})}function p(r=3500){return E(this,null,function*(){var l;const t=Date.now();for(;Date.now()-t<r;){if(!y()){yield new Promise(o=>setTimeout(o,50));continue}if((((l=n.getDataSource)==null?void 0:l.call(n))||[]).length>0)return!0;yield new Promise(o=>setTimeout(o,100))}return y()})}function M(r){var u,o;const t=((u=e.tableProps)==null?void 0:u.rowKey)||"id";return(((o=n.getDataSource)==null?void 0:o.call(n))||[]).some(f=>String(f[t])===r)}function K(){T.value="",R()}function ee(r=3500){d&&clearTimeout(d),d=setTimeout(()=>{K(),d=null},r)}function te(r){return E(this,null,function*(){T.value=r,R(),yield D(),yield new Promise(t=>requestAnimationFrame(()=>t(void 0))),R(),yield Se(r)})}function B(r){return E(this,null,function*(){if(P!==r){P=r;try{if(!(yield p()))return;if(!M(r)){c.createMessage.warning("当前列表中未找到对应数据"),J();return}yield te(r),ee(),J()}finally{P=""}}})}V(()=>[m.path,m.query[Te]],([r,t])=>{const l=Ie(r,t);l&&D(()=>B(l))},{immediate:!0});function W(r){const t=r.detail;!(t!=null&&t.path)||t.path!==m.path||!t.recordId||D(()=>B(t.recordId))}function k(){d&&(clearTimeo