File: /var/www/html/public/static/js/hookProcess-cd155c78.js
import{processingMethodListWeb as K,yuyueFDF as R,AddEditProcessingMethodWeb as T,deleteProcessingMethodWeb as q}from"./po-d8d0fdf7.js";import{d as p,u as H}from"./vue-router-a383d220.js";import{o as V}from"./index-81e4a901.js";import{b7 as r}from"./message-2472a54a.js";import{r as n,A as s,o as G}from"./runtime-core.esm-bundler-6128546f.js";import"./index-53dae824.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 se(){p(),H(),p();const g=n(),l=n(!1),h=n(!1),v=n(!1),_=n(!1),m=n(!1),d=n(!1),b=n(""),u=n([]),y=s({}),t=s({tableIndex:0,note:"",id:"",name:"",description:"",video_href:"",video_name:"",video_view:""}),f=s({}),w=s({}),S=s({}),c=s({total:0,pageSize:10,currentPage:1,background:!0,pageSizes:[10,25,50,100]}),o=s({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",type:"",role:"",clinic_id:""}),A=[{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:"video_href",minWidth:100,slot:"videoHref",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("操作")}],P=["序号","炮制名","视频文件","明细","操作"];function k(){a()}function x(e){c.pageSize=e,a()}function D(e){c.currentPage=e,a()}async function a(){o.type=localStorage.getItem("type"),o.type==2&&(o.role="clinic"),o.type==1&&(o.role="therapists"),o.clinic_id=localStorage.getItem("clinicIdOverall"),l.value=!0;const{data:e}=await K(Object.assign(y,{search_key:o.searchKey,pageSize:c.pageSize,page:c.currentPage}));e.code==0&&(u.value=e.data,c.total=e.total),l.value=!1}const E=(e,i)=>{};function L(e){Object.keys(e).map(i=>{f[i]=e[i]})}async function z(e){const{data:i}=await q(Object.assign(S,{illness_id:e.id}));i.code==0?(a(),r({type:"success",message:i.msg})):r({type:"error",message:i.msg})}const M=e=>{V.confirm("你确定要删除吗",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{z(e)}).catch(()=>{r({type:"info",message:"已取消"})})};function W(){o.searchKey="",a()}function C(){t.id="",t.name="",t.description="",t.video_href="",t.video_name="",d.value=!0}function O(e){t.id=e.id,t.name=e.name,t.description=e.description,t.video_href=e.video_href,t.video_name=e.video_name,d.value=!0}function j(e,i,J){t.video_name=i.name,t.video_href=R+e.data.file_path.replace("var/www/html/public/","")}function I(e){}async function B(e){const{data:i}=await T(Object.assign(w,{id:t.id,name:t.name,description:t.description,video_href:t.video_href,video_name:t.video_name}));i.code==0?(d.value=!1,a(),r({type:"success",message:i.msg})):r({type:"error",message:i.msg})}function F(e){t.video_view=e.video_href,m.value=!0}return G(()=>{a()}),{searchDetail:o,btnSearchPart:k,loading:l,small:_,selectList:P,columns:A,pagination:c,handleSizeChange:x,handleCurrentChange:D,PartList:u,order_date:b,deliverDialog:h,selectClick:E,itemArr:t,addLocationDialog:v,locationArr:f,EditLocation:L,singleTableRef:g,btnSearchPartAll:W,btnAdd:C,addDialog:d,uploadSlotFile:j,handleExceed:I,btnAddConfirm:B,videoDialog:m,btnVideo:F,btnDelete:M,btnEdit:O}}export{se as useEqu};