jw项目windows环境软件安装
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
5.2 KiB

1 year ago
  1. import{a7 as G,a1 as M,a3 as X,a8 as Y,a2 as ee,a as te,C as H,r as c,a9 as I,aa as ae,Z as se,O as ne,ab as le,ac as re,ad as oe,t as ce,ae as ie}from"./index-9b4667b6.js";import{d as ue,g as de}from"./trading_partner-798a55a7.js";const fe=G("avueTable",{state:()=>({selectionList:[]}),actions:{getSelectionList(){return this.selectionList},setSelectionList(m){this.selectionList=m},cleanSelectionList(){this.selectionList=[]}}}),d=M(),h=X(),w=Y(),ge=fe(),he=ee();function ye(){const m=te(),{proxy:i}=ce(),N=H(()=>he.sideTheme==="theme-dark"),p=c(!1),r=c({index:!0,selectionWidth:30,indexWidth:50,addBtn:!1,delBtn:!1,editBtn:!1,menuWidth:180,menu:!0,header:!0,refreshBtn:!1,columnBtn:!1,height:"auto",calcHeight:26,tip:!1,reserveSelection:!0,column:[]}),f=c({background:!1,currentPage:1,pageSize:50,total:0,layout:"total, prev, pager, next, sizes"}),F=c(),v=c([]),C=c([]),q=c({}),T=H(()=>d.filterTags);I(()=>{ge.setSelectionList(C.value)});const x=c(!1),D=c(!1),L=async()=>{var n;if(m.path==="/searchCenter/data-query-center"&&!((n=h.dataQueryCenterForm)!=null&&n.searchValue)||["/analysisCenter/analysis_result_details"].includes(m.path)||!r.value.databaseTable||r.value.column.length===0)return;const e=r.value.column.filter(a=>a.fieldsCount).map(a=>a.prop);if(e.length===0)return;let t={fields:e,module:r.value.databaseTable,...E()};r.value.fieldsValueCountFn&&(t.fn=r.value.fieldsValueCountFn);const s=await V(t);r.value.column.forEach(a=>{a.fieldsCount&&(a.type||(a.type="select"),a.filterOptions=s[a.prop]||[])})};I(()=>{r.value.column.forEach(e=>{e.overHidden!==!1&&(e.overHidden=!0),e.unWidth||(e.width=e.width||120),!r.value.unSlotName&&!e.unSlotName&&(e.slotName=e.prop+"-header")})});const R=()=>{d.cleanFilter(),w.resetSnapshot()};ae(()=>{R()});const k=(e={})=>{const{isCount:t=!0,cb:s}=e;f.value.pageSize=50,f.value.currentPage=1,s()},S=c({}),z=(e,t)=>{const{key:s,value:n}=ie(e);S.value={orderByColumn:s,isAsc:n},n||(S.value={}),t()},E=(e={})=>({...e,...d.filterForm}),O=(e={})=>{var a;const{pageSize:t,currentPage:s}=f.value;return{pageSize:t,pageNum:s,caseId:(a=h.currentCase)==null?void 0:a.id,...e,...S.value}},W=async(e={},t)=>{const s=O(e);p.value=!0;const n=await t(s).catch(()=>p.value=!1);v.value=n.rows,f.value.total=n.total,L(),ne(()=>{var a;p.value=!1,(a=document.querySelector("tbody .el-table__row"))==null||a.scrollIntoViewIfNeeded(),r.value.dynamicCalculationHeight&&(r.value.header=T.value.length!==0)})};se(()=>r.value.header,e=>{var t;r.value.dynamicCalculationHeight&&((t=F.value)==null||t.getTableHeight())});const K=(e,t)=>{f.value.currentPage=e,t&&t()},_=(e,t="bgc")=>{if(e[t])return{background:e[t]}},A=(e,t,s="bgc")=>{if(e[s])return{color:le(e[s]),background:t.label==="\u64CD\u4F5C"?"white":""}},P=e=>{w.record(e)},J=async({batch:e,unBatch:t,revokeList:s,ids:n=!0,cb:a})=>{const l=w.undo();if(!l)return;let o;l.revoke?o=await e(s?{revokeList:l.list}:l.list):(l.ids=[l.id],!n&&delete l.ids,o=await t(l)),i==null||i.$modal.msgSuccess(o.msg),a()},V=async e=>{var o,u;const{fn:t=de,fields:s,module:n,...a}=e;return(await t({caseId:(o=h.currentCase)==null?void 0:o.id,searchValue:(u=h.dataQueryCenterForm)==null?void 0:u.searchValue,fields:s,module:n,...a})).data},$=c(!1),Q=({key:e="id",fn:t,delAllfn:s=ue,cb:n,delAllParams:a=null})=>{const l=C.value.length===0;if(v.value.length===0)return i.$modal.msgWarning("\u6CA1\u6709\u9700\u8981\u5220\u9664\u7684\u6570\u636E\uFF01");i.$modal.confirm(l?"\u786E\u8BA4\u5220\u9664\u5168\u90E8\u6570\u636E\u5417\uFF1F":"\u786E\u8BA4\u5220\u9664\u5DF2\u9009\u6570\u636E\u5417\uFF1F").then(async()=>{var u,g,b;let o;$.value=re.service({text:"\u6570\u636E\u5220\u9664\u4E2D\uFF0C\u8BF7\u7A0D\u5019...",background:"rgba(0, 0, 0, 0.7)",customClass:"loading-class"}),l?a?o=await s({caseId:(u=h.currentCase)==null?void 0:u.id,...a}):o=await s((g=h.currentCase)==null?void 0:g.id):o=await t(C.value.map(j=>j[e])),(b=$.value)==null||b.close(),i.$modal.msgSuccess(o.msg),F.value.clearSelection(),L(),n()}).catch(()=>{})},U=({row:e,key:t="id",fn:s,cb:n})=>{i.$modal.confirm("\u786E\u8BA4\u5220\u9664\u5F53\u524D\u6570\u636E\u5417\u