File: /var/www/html/public/static/js/hookillness-70045200.js
import{illNessListWeb as q,AddEditillNessWeb as F,deleteillNessWeb as G}from"./po-320602ea.js";import{d as h,u as H}from"./vue-router-a383d220.js";import{o as J}from"./index-81e4a901.js";import{b7 as c}from"./message-2472a54a.js";import{r as a,A as o,w as Q,o as U}from"./runtime-core.esm-bundler-6128546f.js";import"./index-2cac3668.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 ce(f,r){h(),H(),h();const b=a(),p=a(!1),D=a(!1),k=a(!1),w=a(!1),_=a(!1),m=a(!1),A=a(""),d=a([]),C=o({}),t=o({tableIndex:0,note:"",id:"",name:"",description:"",ill_code:"",symptom_str_arr:"",symptom_name_arr:"",is_select:""}),g=o({}),E=o({}),S=o({}),l=o({total:0,pageSize:10,currentPage:1,background:!0,pageSizes:[10,25,50,100]}),y=o({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",type:"",role:"",clinic_id:""}),x=[{type:"selection",width:55,align:"left",slot:"selection1",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:"ICD11名称",prop:"ill_code",minWidth:100,hide:({checkList:e})=>!e.includes("ICD11名称")},{label:"描述",prop:"description",minWidth:100,hide:({checkList:e})=>!e.includes("描述")},{label:"症状",prop:"postal",minWidth:100,slot:"symptom_str",hide:({checkList:e})=>!e.includes("症状")},{label:"操作",fixed:"right",width:120,slot:"operation",hide:({checkList:e})=>!e.includes("操作")}],W=["勾选列","序号","病症名","ICD11名称","描述","症状","操作"];function z(){n()}function I(e){l.pageSize=e,n()}function L(e){l.currentPage=e,n()}async function n(){r.str&&(t.is_select=1),p.value=!0;const{data:e}=await q(Object.assign(C,{search_key:y.searchKey,pageSize:l.pageSize,page:l.currentPage}));e.code==0&&(d.value=e.data,l.total=e.total,r.illData.id&&d.value.forEach((i,s)=>{i.check=!1,r.illData.id==i.id&&(i.check=!0)})),p.value=!1}const P=(e,i)=>{};function N(e){Object.keys(e).map(i=>{g[i]=e[i]})}async function j(e){const{data:i}=await G(Object.assign(S,{illness_id:e.id}));i.code==0?(n(),c({type:"success",message:i.msg})):c({type:"error",message:i.msg})}const O=e=>{J.confirm("你确定删除该条吗",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{j(e)}).catch(()=>{c({type:"info",message:"已取消"})})};function B(){t.id="",t.name="",t.description="",t.ill_code="",t.symptom_str_arr="",t.symptom_name_arr="",m.value=!0}function M(e){const i=[];t.id=e.id,t.name=e.name,t.description=e.description,t.ill_code=e.ill_code,t.symptom_str_arr=e.symptom_str,e.symptom_str_arr.forEach((s,V)=>{i.push(s.name)}),t.symptom_name_arr=i.toString(),m.value=!0}const u=o({name:"",id:"",symptom_str_arr:""});function R(){u.symptom_str_arr=t.symptom_str_arr,_.value=!0}function T(){t.symptom_name_arr=u.name,t.symptom_str_arr=u.id}async function v(e){const{data:i}=await F(Object.assign(E,{id:t.id,name:t.name,description:t.description,ill_code:t.ill_code,symptom_str_arr:t.symptom_str_arr}));i.code==0?(m.value=!1,n(),c({type:"success",message:i.msg})):c({type:"error",message:i.msg})}Q(r.illData,(e,i)=>{n()});function K(e,i){d.value.forEach((s,V)=>{s.check=!1,i.id==s.id&&(s.check=!0,r.illData.id=s.id,r.illData.name=s.name)}),f("update:illnessDialog",!1),f("eventIsNum")}return U(()=>{n()}),{searchDetail:y,btnSearchPart:z,loading:p,small:w,selectList:W,columns:x,pagination:l,handleSizeChange:I,handleCurrentChange:L,PartList:d,order_date:A,deliverDialog:D,selectClick:P,itemArr:t,addLocationDialog:k,locationArr:g,EditLocation:N,singleTableRef:b,btnAdd:B,addDialog:m,itemArr:t,symptomDialog:_,eventIsNum:T,symptomData:u,btnSymptom:R,btnAddConfirm:v,btnEdit:M,btnDelete:O,btnConfirm:K}}export{ce as useEqu};