You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virtual-patient/docker/nginx/html/dist/static/js/AssistTable-801528ac.js

2 lines
6.3 KiB
JavaScript

import{g as n,c,e as a,d as se,r as m,N as ae,u as oe,l as z,o as le,b as g,j as _,t as w,z as B,B as h,H as S,af as $,f as p,w as d,F as re,k as ne,h as ie,m as E,x as ce,y as pe,_ as de}from"./index-93dfb385.js";import{s as ue}from"./support_icon-08c26691.js";import{d as H}from"./down-54252221.js";import{D as me}from"./del-4c409db9.js";import{q as _e,a as he}from"./inquiry-8a7adca2.js";import{e as ye}from"./consultation-6fd72a36.js";import{u as C}from"./consultation-10bd4098.js";import fe from"./index-690e8112.js";import"./empty-7fcb43df.js";const ve=""+new URL("../png/empty_table-b9fc3457.png",import.meta.url).href,ge={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none"},be=a("rect",{width:"19",height:"19",x:".5",y:".5",fill:"#fff",stroke:"#D9D9D9",rx:"3.5"},null,-1),we=a("path",{fill:"#D9D9D9",stroke:"#D9D9D9","stroke-width":".2",d:"M13.993 9.4h-3.399V6.002a.6.6 0 0 0-1.199 0V9.4H5.997a.6.6 0 1 0 0 1.2h3.398v3.397a.6.6 0 1 0 1.2 0V10.6h3.398a.6.6 0 0 0 0-1.2Z"},null,-1),ke=[be,we];function Ie(y,V){return n(),c("svg",ge,ke)}const xe={render:Ie},A=y=>(ce("data-v-cd8c8a46"),y=y(),pe(),y),De={class:"AssistTable"},Ne={class:"header_title"},Ce={class:"title"},Ae=["src"],Ve={key:1},Le={key:0,class:"slect"},Te=A(()=>a("span",null,"请选择",-1)),qe=["src"],Oe={key:1,class:"slect"},Pe={style:{color:"#666"}},ze=["src"],Be=A(()=>a("span",{style:{"font-size":"14px"}},"添加初步诊断",-1)),Se=["onClick"],$e={class:"empty_list"},Ee=["src"],He=A(()=>a("span",null,"未选择任何检查项,请选择",-1)),Re={key:2},je=se({name:"AssistTable",__name:"AssistTable",emits:["selectOne","inspectOk"],setup(y,{expose:V,emit:R}){const i=m([]),k=m([]),I=m([]),f=ae(()=>I.value.length>0),j={value:"id",label:"itemName",children:"itemList",disabled:"flag",multiple:!0,expandTrigger:"hover"},L=m(),b=oe(),U=async()=>{const e=await _e({processId:b.query.processId});k.value=e.data},T=(e,t)=>{let s;for(const o of r.value)o.id===t&&(s=o[e]);return s},q=e=>{const t=[];for(const s of e)for(const o of k.value)o.id===s[0]&&o.itemList.forEach(u=>{u.id===s[1]&&t.push({...u,primaryId:T("primaryId",u.id),primaryNames:T("primaryNames",u.id)})});r.value=t},F=e=>{q(e)},r=m([]),M=[{label:"类目",prop:"type",width:150},{label:"辅助诊断",prop:"itemName",width:200},{label:"身体部位",prop:"locationName",formatter:({locationName:e})=>e||"无",width:150},{label:"初步诊断",prop:"primaryNames",slot:"select"},{label:"操作",fixed:"right",slot:"operation",width:100}],Z=[{label:"类目",prop:"type",width:150},{label:"辅助诊断",prop:"itemName"},{label:"身体部位",prop:"locationName",formatter:({locationName:e})=>e||"无",width:150},{label:"初步诊断",slot:"inspect",width:150}],x=m([]);z(()=>C().firstInspectList,e=>{x.value=e}),z(()=>C().supportActionId,e=>{if(e.length===0)return;let t=!0;for(const o of i.value)if(o[1]===e[1]){t=!1;return}if(!t)return;const s=[...i.value];s.push(e),i.value=s,q(i.value)});const G=e=>{r.value.splice(e,1);const t=[...i.value];t.splice(e,1),i.value=t},D=async()=>{const e=await he({processId:b.query.processId});e.data.length>0&&N("inspectOk"),I.value=e.data},J=e=>{const t=[];return e.forEach(s=>{t.push(s.primaryDiseaseName)}),t.join(",")},K=e=>{const t=[];for(const s of e)x.value.forEach(o=>{s===o.id&&t.push(o.primaryDiseaseName)});return t.join(",")},Q=e=>{const t=K(r.value[e].primaryId);r.value[e].primaryNames=t},W=async()=>{const e=[];for(const s of r.value){if(!s.primaryId||s.primaryId.length===0){E("存在未配置的初步诊断",{type:"warning"});return}e.push({ancillaryItemId:s.id,primaryId:s.primaryId,processId:b.query.processId})}(await ye(e)).code===200&&(E("提交成功",{type:"success"}),D(),N("inspectOk"))},N=R,X=e=>{N("selectOne",e)},Y=()=>{L.value.open()};return V({refresh(){D()}}),le(()=>{U(),D(),C().getAskPrimaryList(b.query.processId)}),(e,t)=>{const s=g("el-cascader"),o=g("el-checkbox"),u=g("el-checkbox-group"),ee=g("el-dropdown"),O=g("pure-table");return n(),c("div",De,[a("div",Ne,[a("div",Ce,[a("img",{src:_(ue),alt:""},null,8,Ae),a("span",null,w(f.value?"已开具辅助检查":"