import{V as d,Z as w,d as b,r as _,c as f,o as P,w as o,j as s,W as g,l,X as y}from"./index-9PRMimni.js";import{B as h}from"./Table-0PViRYCf.js";import{e as k}from"./jobPlanDetails-5wu16ZE_.js";import"./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";import"./vuedraggable.umd-Co2xEC3p.js";import"./Render.vue_vue_type_script_lang-DKUYY0Zw.js";import"./componentMap-CElCaWis.js";import"./propTypes-CebMRUpe.js";import"./format-DgF6KtHk.js";import"./omit-B2_8Y6O_.js";import"./_flatRest-DBrd2CHT.js";import"./flatten-DeoUZLdb.js";import"./print-CT_2hrjP.js";import"./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";import"./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";import"./useModal-CO65vga3.js";import"./componentSetting-DVhNDBTO.js";import"./useTimeout-BxFilWvD.js";import"./usePageCache-DluHn7Yy.js";import"./tabsView-BXskTdVh.js";import"./Flex-CTSf12gq.js";const{t:e}=d();function T(){return[{title:"No.",key:"num",width:60,render:(t,r)=>r+1},{title:e("jobPlan.viewDetails.sparePartsTab.partNumber"),key:"sparePartNumber",width:100},{title:e("jobPlan.viewDetails.sparePartsTab.itemDescription"),key:"itemDescription",width:200},{title:e("jobPlan.viewDetails.sparePartsTab.plannedQty"),key:"plannedQuantity",width:100},{title:e("jobPlan.viewDetails.sparePartsTab.units"),key:"unitName",width:100},{title:e("jobPlan.viewDetails.sparePartsTab.drawingNumber"),key:"drawingNumber",width:100},{title:e("jobPlan.viewDetails.sparePartsTab.drawing"),key:"drawing",width:100,render:t=>t.drawingUrl?w("a",{href:t.drawingUrl,target:"_blank"},t.drawing?.split("/")?.pop()||""):t.drawing?.split("/")?.pop()||""}]}const G=b({__name:"index",props:{data:{}},setup(t){const r=t,p=_();async function m(n){try{return await k({...r.data,...n})}catch(a){return console.error("加载表格数据失败:",a),{list:[],total:0}}}return(n,a)=>{const u=g,c=y;return P(),f(c,null,{default:o(()=>[s(u,{bordered:!1,class:"proCard mt-2"},{default:o(()=>[s(l(h),{ref_key:"basicTableRef",ref:p,columns:l(T)(),request:i=>m(i),"row-key":i=>i.id,autoScrollX:!0,showTableSetting:!1,"virtual-scroll":""},null,8,["columns","request","row-key"])]),_:1})]),_:1})}}});export{G as default};
