File: /var/www/html/public/static/js/hookSymptom-4af66715.js
import{symptomListWeb as B,AddEditSymptomWeb as K,deleteSymptomWeb as M}from"./po-7a0a44a1.js";import{d as u,u as R}from"./vue-router-a383d220.js";import{b7 as c}from"./message-2472a54a.js";import{o as T}from"./index-81e4a901.js";import{r as i,A as a,o as q}from"./runtime-core.esm-bundler-6128546f.js";import"./index-3e40fd7d.js";import"./preload-helper-78dc9057.js";import"./vue-i18n.runtime.esm-bundler-6949bcab.js";import"./index-b7f916e1.js";import"./_commonjsHelpers-87174ba5.js";import"./utils-2ab4f76a.js";import"./focus-trap-53f1c6ab.js";import"./error-78e43d3e.js";function ee(){u(),R(),u();const f=i(),d=i(!1),g=i(!1),h=i(!1),y=i(!1),r=i(!1),b=i(""),m=i([]),A=a({}),t=a({tableIndex:0,note:"",description:"",name:"",id:""}),p=a({}),S=a({}),w=a({}),s=a({total:0,pageSize:10,currentPage:1,background:!0,pageSizes:[10,25,50,100]}),l=a({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",type:"",role:"",clinic_id:""}),k=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号",type:"index",width:70,hide:({checkList:e})=>!e.includes("序号")},{label:"症状",prop:"name",minWidth:100,hide:({checkList:e})=>!e.includes("症状")},{label:"明细",prop:"description",minWidth:100,hide:({checkList:e})=>!e.includes("明细")},{label:"操作",fixed:"right",width:160,slot:"operation",hide:({checkList:e})=>!e.includes("操作")}],_=["序号","症状","明细","操作"];function x(){n()}function P(e){s.pageSize=e,n()}function z(e){s.currentPage=e,n()}async function n(){d.value=!0;const{data:e}=await B(Object.assign(A,{search_key:l.searchKey,pageSize:s.pageSize,page:s.currentPage}));e.code==0&&(m.value=e.data,s.total=e.total),d.value=!1}const D=(e,o)=>{};function E(e){Object.keys(e).map(o=>{p[o]=e[o]})}function L(){t.id="",t.name="",t.description="",r.value=!0}async function v(){const{data:e}=await K(Object.assign(S,{id:t.id,name:t.name,description:t.description}));e.code==0?(r.value=!1,n(),c({type:"success",message:e.msg})):c({type:"error",message:e.msg})}function C(){l.searchKey="",n()}function W(e){t.id=e.id,t.name=e.name,t.description=e.description,r.value=!0}async function j(e){const{data:o}=await M(Object.assign(w,{symptom_id:e.id}));o.code==0?(n(),c({type:"success",message:o.msg})):c({type:"error",message:o.msg})}const O=e=>{T.confirm("你确定删除该条吗",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{j(e)}).catch(()=>{c({type:"info",message:"已取消"})})};return q(()=>{n()}),{searchDetail:l,btnSearchPart:x,loading:d,small:y,selectList:_,columns:k,pagination:s,handleSizeChange:P,handleCurrentChange:z,PartList:m,order_date:b,deliverDialog:g,selectClick:D,itemArr:t,addLocationDialog:h,locationArr:p,EditLocation:E,singleTableRef:f,btnAdd:L,btnAddConfirm:v,addDialog:r,itemArr:t,btnSearchPartAll:C,btnEdit:W,btnDelete:O}}export{ee as useEqu};