File: /var/www/html/public/static/js/hook-b3f9d606.js
import{be as c}from"./message-2472a54a.js";import{delEquSlot as C,getEquSlotList as D}from"./eqpsolts-79133948.js";import{A as u,r as a,c as O,o as _}from"./runtime-core.esm-bundler-6128546f.js";import"./index-74d93170.js";import"./preload-helper-78dc9057.js";import"./vue-i18n.runtime.esm-bundler-6949bcab.js";import"./index-b7f916e1.js";import"./_commonjsHelpers-87174ba5.js";import"./vue-router-a383d220.js";import"./utils-2ab4f76a.js";function N(r){const p=u({slot:""}),l=a([]),h=a([]),s=a(!0);a({});const n=u({total:0,pageSize:10,currentPage:1,background:!0}),m=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号列",type:"index",width:70,hide:({checkList:e})=>!e.includes("序号列")},{label:"ID",prop:"id",minWidth:100,hide:({checkList:e})=>!e.includes("ID")},{label:"槽位号",prop:"slot",minWidth:120,hide:({checkList:e})=>!e.includes("槽位号")},{label:"操作",fixed:"right",width:250,slot:"operation"}],E=["ID","槽位号"],f=O(()=>["!h-[20px]","reset-margin","!text-gray-500","dark:!text-white","dark:hover:!text-primary"]);function I(e){}function b(e){C(e.id).then(o=>{c("删除槽位成功",{type:"success"}),t()}).catch(o=>{c("删除槽位失败",{type:"error"})})}function T(e){t()}function g(e){t()}function R(e){}async function t(){s.value=!0;const{data:e,total:o}=await D(Object.assign({eqpid:r.id},{page:n.currentPage,results:n.pageSize}));l.value=e,n.total=o,setTimeout(()=>{s.value=!1},500)}const w=e=>{e&&(e.resetFields(),t())},{VITE_PUBLIC_PATH:i}={VITE_PORT:"8849",VITE_PUBLIC_PATH:"/public/",VITE_ROUTER_HISTORY:"hash",VITE_CDN:"false",VITE_COMPRESSION:"none",VITE_API:"https://appointment.pcb456.com:8093/",VITE_PRODUCT:"yuyue",BASE_URL:"/public/",MODE:"production",DEV:!1,PROD:!0};function P(e,o,d){e=="pdf"?window.open(i+"maf/PRINTFEEDEREQPSLOTBARCODE?mode=ShowFeederBarCode&slotid="+encodeURIComponent(o)+"&slot="+encodeURIComponent(d),"","height=700,width=900,status=1,scrollbars=1,menubar=1,resizable=1"):window.open(i+"maf/PRINTFEEDEREQPSLOT?slotid="+encodeURIComponent(o)+"&slot="+encodeURIComponent(d),"","height=700,width=900,status=1,scrollbars=1,menubar=1,resizable=1")}function S(e){e=="pdf"?window.open(i+"maf/PRINTFEEDEREQPSLOTBARCODE?mode=PrintBarCodeList&eqpid="+r.id,"","height=700,width=900,status=1,scrollbars=1,menubar=1,resizable=1"):window.open(i+"maf/PRINTFEEDEREQPSLOT?mode=list&eqpid="+r.id,"","height=700,width=900,status=1,scrollbars=1,menubar=1,resizable=1")}return _(()=>{t()}),{printSlotAll:S,printSlotItem:P,workshop_list:h,selectList:E,form:p,loading:s,columns:m,dataList:l,pagination:n,buttonClass:f,onSearch:t,resetForm:w,handleUpdate:I,handleDelete:b,handleSizeChange:T,handleCurrentChange:g,handleSelectionChange:R}}export{N as useEquSlot};