caseViews.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126
  1. <template>
  2. <div id="MyDiv" style="margin: 16px" :class="{ nocopy: $route.query.status }">
  3. <div class="header zbjg-box" style="background: #fff;margin: 10px 0;padding: 6px 20px;">
  4. <span>
  5. <el-button type="primary" v-if="!($route.query.from == 'majorIndexDetail')" style="background-color: #328240;" @click="onControll">重新质控</el-button>
  6. </span>
  7. <div>
  8. <el-button @click="clickzbjg" v-if="$route.query.from == 'majorIndexDetail'">指标结果</el-button>
  9. <el-button type="primary" v-if="!($route.query.from == 'majorIndexDetail')" @click="isControl = !isControl">智审结果</el-button>
  10. <el-button type="text" v-if="!($route.query.from == 'majorIndexDetail')" style="color: #606266;" @click="openAIModel">
  11. <img src="../../assets//images//AIHelper.png" style="width:30px;display: inline-block;vertical-align: middle;"/>
  12. AI模型
  13. </el-button>
  14. </div>
  15. </div>
  16. <div class="cont_container">
  17. <!-- 左侧点击列表部分 -->
  18. <div class="cont-left-tiem">
  19. <!-- <div style="margin: 20px">
  20. <el-button type="primary" @click="onControll">执行质控</el-button>
  21. </div> -->
  22. <ul class="el-menu-vertical-demo el-menu">
  23. <!-- 预警信息不展示病案首页 -->
  24. <li v-if="$route.query.from !== 'forewarning'" class="li-left-item" :class="is_active == 0 ? 'is-active' : ''">
  25. <span class="treeTitle" @click="clickTree(0, '病案首页')">病案首页</span>
  26. </li>
  27. <li
  28. v-for="(item, index) in treeList"
  29. :class="[
  30. is_active == item.bllb ? 'is-active' : '',
  31. item.bllb == 49 || [2000002, 294, 303, 288, 87].includes(item.bllb) ? 'li-left-itemyz' : 'li-left-item',
  32. ]"
  33. :key="index"
  34. >
  35. <el-row type="flex" justify="space-between" align="middle">
  36. <span class="treeTitle" @click="clickTree(item.bllb, item.name, item)">
  37. {{ item.name }}
  38. <span v-if="item.bllb == 49">(2)</span>
  39. <span v-if="(Array.isArray(item.list) && !!item.list.length)">({{item.list.length}})</span>
  40. </span>
  41. <el-button
  42. type="text"
  43. v-if="item.bllb == 49 || (Array.isArray(item.list) && !!item.list.length)"
  44. :class="`el-icon-arrow-${item.collapse ? 'down' : 'up'}`"
  45. @click.stop="setTreeCollapse(index)"
  46. />
  47. </el-row>
  48. <!-- 医嘱 -->
  49. <div v-if="item.bllb == 49 && !item.collapse">
  50. <div :class="['li-left-item-li', is_active == '长期医嘱' ? 'is-active' : '']" data-li="49-1" :id="item.bllb" @click.stop="clickTree(item.bllb, '长期医嘱', {}, true)" >长期医嘱</div>
  51. <div :class="['li-left-item-li', is_active == '临时医嘱' ? 'is-active' : '']" data-li="49-2" :id="item.bllb" @click.stop="clickTree(item.bllb, '临时医嘱', {}, true)">临时医嘱</div>
  52. </div>
  53. <!-- 报告单 -->
  54. <div v-if="item.bllb == 2000002 && !item.collapse">
  55. <div
  56. v-for="(jitem, jindex) in item.list"
  57. :key="jindex"
  58. :id="jitem.type"
  59. :class="['li-left-item-li', is_active == jitem.type ? 'is-active' : '']"
  60. @click.stop="clickTree(item.bllb, jitem.name, jitem, true)"
  61. >
  62. {{ jitem.name }}
  63. </div>
  64. </div>
  65. <!-- 病程记录、手术记录 -->
  66. <div v-if="[294, 303, 288, 87].includes(item.bllb) && !item.collapse">
  67. <div
  68. v-for="(jitem, jindex) in item.list"
  69. :class="['li-left-item-li', parentType == item.bllb && is_active == jitem.blbh ? 'is-active' : '']"
  70. :key="jindex"
  71. :id="`${jitem.blbh}`"
  72. :title="jitem.name.trim()"
  73. @click.stop="clickTree(item.bllb, jitem.name, jitem, true)"
  74. >
  75. {{ jitem.name.trim() }}
  76. </div>
  77. </div>
  78. </li>
  79. </ul>
  80. </div>
  81. <div class="cont-left-file">
  82. <div v-if="is_active == 0">
  83. <mainHomePage :data="mainHomeData" ref="main" :ifFile="ifFile"></mainHomePage>
  84. </div>
  85. <div v-else-if="parentType == 292">
  86. <!-- 入院记录 -->
  87. <admissionRecord :data="admissionRecord" :ifFile="ifFile"></admissionRecord>
  88. </div>
  89. <div v-else-if="parentType == '1' && is_active == 1">
  90. <!-- 出院记录 -->
  91. <OutHospitalRecord :data="outHospitalRecordData" />
  92. </div>
  93. <div v-else-if="parentType == 294 && is_active != 294">
  94. <!-- 病程记录 -->
  95. <CaseRecord :data="caseRecodeInfo" v-if="caseRecodeInfo.is_format === 1" :ZYH="valData"/>
  96. <NoFormatText :text="caseRecodeInfo.content" :data="caseRecodeInfo" name="" v-else />
  97. </div>
  98. <div v-else-if="parentType == 303 && is_active != 303">
  99. <!-- 手术记录 -->
  100. <template v-if="surgeryData.is_format">
  101. <ShouShuRecord1 v-if="surgeryData.type === 1" :data="surgeryData" />
  102. <ShouShuRecord2 v-if="surgeryData.type === 2" :data="surgeryData" />
  103. <ShouShuRecord4 v-if="surgeryData.type === 4" :data="surgeryData" />
  104. </template>
  105. <NoFormatText v-else :text="surgeryData.content" :data="surgeryData" :name="blname_title" />
  106. </div>
  107. <div v-else-if="is_active == '长期医嘱'">
  108. <!-- 长期医嘱 -->
  109. <medicalAdvice :dataObj="longAdvice"></medicalAdvice>
  110. </div>
  111. <div v-else-if="is_active == '临时医嘱'">
  112. <!-- 临时医嘱 -->
  113. <medicalTemporary :dataObj="happensAdvice"></medicalTemporary>
  114. </div>
  115. <div v-else-if="parentType == '2000002' && is_active == '1'">
  116. <!-- 病历图文报告 -->
  117. <caseImageText :dataObjArr="pacsDetail"></caseImageText>
  118. </div>
  119. <div v-else-if="parentType == '2000002' && is_active == '2'">
  120. <!-- 超声诊断 -->
  121. <ultrasound :dataObjArr="pacsDetail"></ultrasound>
  122. </div>
  123. <div v-else-if="parentType == '2000002' && is_active == '3'">
  124. <!-- 影像诊断 -->
  125. <imaging :dataObjArr="pacsDetail"></imaging>
  126. </div>
  127. <div v-else-if="parentType == '2000002' && is_active == '4'">
  128. <!-- 为心电 -->
  129. <electrocar :dataObjArr="pacsDetail"></electrocar>
  130. </div>
  131. <div v-else-if="parentType == '2000002' && is_active == '5'">
  132. <!-- 检验报告单 病理 -->
  133. <checkout :dataObjArr="pacsDetail"></checkout>
  134. </div>
  135. <div v-else-if="parentType == '2000002' && is_active == '6'">
  136. <!-- 內窥镜检查报告 病理 -->
  137. <sightGlass :dataObjArr="pacsDetail"></sightGlass>
  138. </div>
  139. <div v-else-if="is_active == 288 || is_active == 18">
  140. <!-- 死亡记录 或 24小时内入院记录 -->
  141. <DeathText :dataObjArr="dataObj"></DeathText>
  142. </div>
  143. <div v-else>
  144. <div v-if="update">
  145. <newContFile v-for="(item, index) of text" :key="index" :data="item" :name="name_title"></newContFile>
  146. </div>
  147. </div>
  148. </div>
  149. <!-- status 不存在 意味着不脱敏、医院自助查询 -->
  150. <template v-if="!$route.query.status && isControl">
  151. <!-- 病案首页质控 -->
  152. <CaseQualityBox ref="CaseQualityBoxRef" :mainHomeData="mainHomeData" :MED_REC_ID="valData" type="type_v" :width="340" :height="820" @hightRight="hightRight" />
  153. </template>
  154. </div>
  155. <div class="VueDragResize-box" v-if="is_VueDragResize">
  156. <!-- 弹窗 -->
  157. <VueDragResize :style="`z-index:${zInfex_0};`"
  158. dragHandle=".VueDragResize-title-box"
  159. :isActive="true" :isDraggable="true"
  160. :parentW="parentW" :parentH="parentH" :parentLimitation="true" :preventActiveBehavior="true"
  161. :w="width" :h="height"
  162. :minw="minw" :minh="minh"
  163. :x='left' :y='top' @dragstop="onDragstop"
  164. @resizing="resize" @dragging="resize" @deactivated="onDeactivated"
  165. >
  166. <div class="VueDragResize-centent-box">
  167. <div class="VueDragResize-title-box">
  168. <div class="title"><span>指标结果</span></div>
  169. <div class="icon-box">
  170. <span @click="clickcloseBtn">X</span>
  171. </div>
  172. </div>
  173. <div class="navbaerMag-content-box">
  174. <div class="list-box">
  175. <div class="list-item-box">
  176. <div class="listItem-title-box">
  177. <span>指标名称:</span>
  178. <span style="color: #ff0000;">{{ show_name }}</span>
  179. <span class="span-btn" @click="clickJsTitleBtn">指标计算</span>
  180. <img src="../../assets/images/arrow-down.png" alt="" @click.stop="clickListItem" class="arrow-down" :class="show_box?'show':''"/>
  181. </div>
  182. <div class="items-show-box" :class=" show_box ? 'show': '' ">
  183. <div class="xqItemError-box" v-for="(item,index) in xqItemError" :key="index">
  184. <div class="items-titleBox">
  185. <span class="idx-span">{{ index+1 }}</span>
  186. <el-tag :type="item.status == 1?'success':'danger'">{{ item.status == 1?'正确':'错误' }}</el-tag>
  187. <img src="../../assets/images/arrow-down.png" alt="" @click.stop="clickxqItemErrorItems(index)" class="arrow-down" :class="item.show ?'show':''"/>
  188. </div>
  189. <div class="itemsDiv-box" :class=" item.show ? 'show': '' ">
  190. <div class="items-box" v-for="(items,idx) in item.content" :key="idx">
  191. <div class="items-content" v-html="items.content" :style="`color: ${items.status == 1?'#000':'#ff0000'};`"></div>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. </VueDragResize>
  201. </div>
  202. </div>
  203. </template>
  204. <script>
  205. import Mmenu from '@/components/m-menu';
  206. import mainHomePage from '@/views/allcase/contFile/mainHomePage';
  207. import newContFile from '@/views/allcase/contFile/newContFile';
  208. import admissionRecord from '@/views/allcase/contFile/admissionRecord2';
  209. import medicalAdvice from '@/views/allcase/contFile/medicalAdvice';
  210. import medicalTemporary from '@/views/allcase/contFile/medicalTemporary';
  211. import caseImageText from '@/views/allcase/report/caseImageText';
  212. import ultrasound from '@/views/allcase/report/ultrasound';
  213. import imaging from '@/views/allcase/report/imaging';
  214. import electrocar from '@/views/allcase/report/electrocar';
  215. import checkout from '@/views/allcase/report/checkout';
  216. import sightGlass from '@/views/allcase/report/sightGlass';
  217. import CaseRecord from './components/CaseRecord2.vue';
  218. import ShouShuRecord1 from './components/ShouShuRecord1.vue';
  219. import ShouShuRecord2 from './components/ShouShuRecord2.vue';
  220. import ShouShuRecord4 from './components/ShouShuRecord4.vue';
  221. import NoFormatText from './components/NoFormatText.vue';
  222. import OutHospitalRecord from './components/OutHospitalRecord.vue';
  223. import CaseQualityBox from './components/CaseQualityBox2.vue';
  224. import DeathText from './components/DeathText.vue';
  225. import VueDragResize from 'vue-drag-resize';
  226. import Axios from 'axios'
  227. import { Loading } from 'element-ui';
  228. import { getHomeData } from '@/api/qc'
  229. export default {
  230. components: {
  231. Mmenu,
  232. mainHomePage,
  233. newContFile,
  234. admissionRecord,
  235. medicalAdvice,
  236. medicalTemporary,
  237. caseImageText,
  238. ultrasound,
  239. imaging,
  240. electrocar,
  241. sightGlass,
  242. checkout,
  243. CaseRecord,
  244. ShouShuRecord1,
  245. ShouShuRecord2,
  246. ShouShuRecord4,
  247. NoFormatText,
  248. OutHospitalRecord,
  249. CaseQualityBox,
  250. DeathText,
  251. VueDragResize,
  252. },
  253. directives: {},
  254. filters: {},
  255. extends: {},
  256. mixins: {},
  257. props: {},
  258. data() {
  259. return {
  260. type_v: '', // v2 表示从(事中)进入
  261. mainHomeData: {},
  262. admissionRecord: {},
  263. longAdvice: {},
  264. happensAdvice: {},
  265. valData: '',
  266. ruleId: '',
  267. ifFile: false,
  268. treeList: [],
  269. is_active: 0,
  270. parentType: 0,
  271. name_title: '',
  272. text: [],
  273. update: true,
  274. titleName: '病案首页',
  275. pacsDetail: {},
  276. // 病程记录详情
  277. caseRecodeInfo: {
  278. is_format: 1,
  279. },
  280. surgeryData: {
  281. mzfj: [],
  282. ssqk: [],
  283. sscxsj: [],
  284. sslb: [],
  285. is_format: 0,
  286. },
  287. outHospitalRecordData: {
  288. name: {},
  289. ry_time: {},
  290. sex: {},
  291. age: {},
  292. cy_time: {},
  293. zyts: {},
  294. ryqk: {},
  295. cbzd: {},
  296. zljg: {},
  297. cyqk: {},
  298. cyzd: {},
  299. cyyz: {},
  300. },
  301. dataObj: [],
  302. results: null,
  303. is_tm_path: ['/hospital-caseViews', '/embedIndex-caseViews', '/reviewIndex-caseViews', '/whitelist-caseViews', '/whitelist-search'],
  304. isControl: false,
  305. // 弹窗信息
  306. width: 0,
  307. height: 0,
  308. minw: 620,
  309. minh: 340,
  310. parentH: 0,
  311. parentW: 0,
  312. top: 1,
  313. left: 500,
  314. zInfex_0: 9999,
  315. is_VueDragResize: false,
  316. tabStatus: 1,
  317. show_box: false,
  318. xqItemError: [],
  319. show_name: ''
  320. };
  321. },
  322. computed: {
  323. bcjlLiIds() {
  324. // 病程记录子项数据
  325. const arr = Object.values(this.treeList).filter(item => item.bllb === 294);
  326. const liIds = [];
  327. if (arr.length) {
  328. if (arr[0].list) {
  329. for (let i = 0; i < arr[0].list.length; i++) {
  330. liIds.push(arr[0].list[i].blbh);
  331. }
  332. }
  333. }
  334. return liIds;
  335. },
  336. shoushuLiIds() {
  337. // 病程记录子项数据
  338. const arr = Object.values(this.treeList).filter(item => item.bllb === 303);
  339. const liIds = [];
  340. if (arr.length) {
  341. if (arr[0].list) {
  342. for (let i = 0; i < arr[0].list.length; i++) {
  343. liIds.push(arr[0].list[i].blbh);
  344. }
  345. }
  346. }
  347. return liIds;
  348. },
  349. blname_title() {
  350. let title;
  351. const type = this.surgeryData.type;
  352. if (type === 1) {
  353. title = '手术风险评估表';
  354. } else if (type === 2) {
  355. title = '手术安全核查表';
  356. } else if (type === 3) {
  357. title = '手术同意书';
  358. } else if (type === 4) {
  359. title = '手术记录';
  360. }
  361. return title;
  362. },
  363. },
  364. watch: {},
  365. created() {
  366. // 弹窗
  367. let getViewportSize = this.$getViewportSize();
  368. this.parentH = getViewportSize.height; // 组件范围
  369. this.parentW = getViewportSize.width; // 组件范围
  370. this.width = 400; // 可拖动div 宽
  371. this.height = Number(getViewportSize.height - 100); // 可拖动div 高度
  372. this.left = Number(getViewportSize.width) - Number(this.width) - 40;
  373. this.top = 60;
  374. this.type_v = this.$route.query.type_v;
  375. this.show_name = this.$route.query.show_name?this.$route.query.show_name:'';
  376. if(this.$route.query.from == 'majorIndexDetail') {
  377. this.is_VueDragResize = true
  378. }
  379. this.isControl = localStorage.getItem('isControl') == 'true' ? true : false;
  380. console.log(!this.$route.query.status && this.isControl, !this.$route.query.status, this.isControl);
  381. this.valData = this.$route.query.from == 'expertQualityControl'? this.$route.query.ZYH : this.storageGet('getData');
  382. this.ruleId = this.storageGet('getDataRule');
  383. let xqItemError = this.storageGet('xqItemError');
  384. if(xqItemError){
  385. this.xqItemError = JSON.parse(xqItemError);
  386. // this.is_VueDragResize= true;
  387. }
  388. },
  389. mounted() {
  390. this.getInitData();
  391. },
  392. activated() {},
  393. methods: {
  394. setTreeCollapse(index) {
  395. this.$set(this.treeList[index], 'collapse', !(this.treeList[index].collapse))
  396. },
  397. openAIModel() {
  398. if(!this.valData) {
  399. this.$message.error('住院号不存在!');
  400. return;
  401. }
  402. const { protocol, hostname, port} = window.location
  403. Axios.post(`http://localhost:3003/iframe`, {
  404. path: `${protocol}//${hostname}:${port}/#/whitelist-caseControl?id=${this.valData}`
  405. }).then(function (response) {
  406. // 处理成功的情况
  407. console.log(response.data);
  408. }).catch(function (error) {
  409. // 处理错误的情况
  410. console.log(error);
  411. })
  412. },
  413. getInitData() {
  414. if (this.valData) {
  415. if (this.$route.query.from !== 'forewarning') {
  416. if(this.$route.query.from != 'expertQualityControl') {
  417. this.is_active = 0
  418. this.funQuery();
  419. }
  420. }
  421. }
  422. this.getTree();
  423. },
  424. clickzbjg(){
  425. this.is_VueDragResize = true;
  426. },
  427. clickListItem(){
  428. this.show_box = !this.show_box;
  429. this.resize();
  430. },
  431. clickJsTitleBtn(){
  432. const params = {
  433. category: this.$route.query.category,
  434. zyh: this.$route.query.zyh
  435. }
  436. this.$axios2.post('/quality_index_recalculate', params).then(res => {
  437. if(res.code == 200) {
  438. this.$router.back()
  439. }
  440. });
  441. },
  442. clickxqItemErrorItems(i){
  443. let xqItemError = this.xqItemError;
  444. xqItemError[i].show = !xqItemError[i].show;
  445. this.xqItemError = xqItemError;
  446. this.resize();
  447. },
  448. clickStatus(n){
  449. this.tabStatus = Number(n);
  450. },
  451. clickcloseBtn(){
  452. this.is_VueDragResize = false;
  453. },
  454. // 拖拽时可以确定元素位置
  455. resize(newRect) {
  456. if(newRect){
  457. this.width = newRect.width;
  458. this.height = newRect.height;
  459. this.top = newRect.top;
  460. this.right = newRect.right;
  461. }
  462. },
  463. onDeactivated(e){
  464. },
  465. onDragstop(newRect) {
  466. },
  467. onControll() {
  468. this.$axios2.get(`/quality_handle?zyh=${this.valData}`, {
  469. timeout: 180000
  470. }).then(res => {
  471. if (res.code == 200) {
  472. // this.valData = this.storageGet('getData');
  473. // if (this.valData) {
  474. // if (this.$route.query.from !== 'forewarning') {
  475. // this.funQuery();
  476. // }
  477. // this.getCaseQualityResults();
  478. // }
  479. // this.getTree();
  480. this.getInitData()
  481. this.$refs.CaseQualityBoxRef.getInitData();
  482. }
  483. });
  484. },
  485. // 获取新病案指控结果
  486. getCaseQualityResults() {
  487. // const params = {
  488. // id: Number(this.valData),
  489. // ruleId: Number(this.ruleId)
  490. // };
  491. // if (this.type_v == 'v2') {
  492. // // (事中)
  493. // this.$axios2.post('/get_case_quality_v2', params).then(res => {
  494. // this.results = null;
  495. // this.$nextTick(() => {
  496. // this.results = res.data;
  497. // });
  498. // });
  499. // } else {
  500. // this.$axios2.post('/get_case_quality', params).then(res => {
  501. // this.results = null;
  502. // this.$nextTick(() => {
  503. // this.results = res.data;
  504. // });
  505. // });
  506. // }
  507. },
  508. reload() {
  509. // 移除组件
  510. this.update = false;
  511. // 在组件移除后,重新渲染组件
  512. // this.$nextTick可实现在DOM 状态更新后,执行传入的方法。
  513. this.$nextTick(() => {
  514. this.update = true;
  515. });
  516. },
  517. funEdit() {
  518. this.ifFile = true;
  519. this.$message('errer:功能待开发');
  520. },
  521. getback() {
  522. this.$router.go(-1);
  523. },
  524. /**
  525. * 跳转对应病历首页
  526. */
  527. getBlankIndexss(item) {
  528. this.$refs.main.getBlankIndex(item);
  529. },
  530. funQuery() {
  531. const params = {
  532. id: this.valData,
  533. };
  534. // if (this.is_tm_path.includes(this.$route.path)) {
  535. // params.is_tm = 1;
  536. // }
  537. // this.$axios.post('/medical_record', params).then(res => {
  538. // this.mainHomeData = res.data;
  539. // });
  540. getHomeData(params).then(res => {
  541. this.mainHomeData = res.data
  542. })
  543. },
  544. getTree() {
  545. let that = this;
  546. let pramse = {
  547. id: this.valData,
  548. };
  549. this.$axios.post('/getTree', pramse).then(res => {
  550. that.treeList = res.data;
  551. // 当页面上级为预警信息时,设置默认
  552. const keys = Object.keys(this.treeList);
  553. if (this.$route.query.from === 'forewarning') {
  554. const item = this.treeList[keys[0]];
  555. this.clickTree(item.bllb, item.name, item);
  556. }
  557. if(this.$route.query.from == 'expertQualityControl') {
  558. this.setCurrentTreeNode()
  559. }
  560. });
  561. },
  562. setCurrentTreeNode() {
  563. const currentTreeRow = this.treeList[this.$route.query.currentKey]
  564. if(this.$route.query.bllb && this.$route.query.bllb == '-1') {
  565. this.is_active = 0
  566. this.funQuery();
  567. }
  568. if (this.$route.query.bllb && this.$route.query.bllb != '-1' && !this.$route.query.blbh) {
  569. // this.$message.success('请求多组')
  570. if(this.$route.query.specialName) { // 如果是医嘱
  571. this.clickTree(this.$route.query.bllb, this.$route.query.specialName, {}, true)
  572. // this.setTreeCollapse(this.$route.query.currentKey)
  573. } else {
  574. this.clickTree(this.$route.query.bllb, currentTreeRow.name, currentTreeRow)
  575. }
  576. }
  577. if(this.$route.query.blbh && this.$route.query.bllb) {
  578. if( Array.isArray(currentTreeRow.list) ) {
  579. let currentChildRow = currentTreeRow.list.find(element => element.blbh == this.$route.query.blbh)
  580. currentChildRow && this.clickTree(this.$route.query.bllb, currentChildRow.name, currentChildRow, true);
  581. // currentChildRow && this.setTreeCollapse(this.$route.query.currentKey)
  582. }
  583. }
  584. },
  585. clickTree(b, n, item, isLeaf = false) {
  586. if (item) {
  587. if (isLeaf) {
  588. if(n == '长期医嘱' || n == '临时医嘱') {
  589. this.is_active = n
  590. } else if (b == '2000002') { // 报告单
  591. this.is_active = item.type
  592. } else {
  593. this.is_active = item.blbh
  594. }
  595. } else { // 如果不是叶子节点
  596. this.is_active = b;
  597. }
  598. } else { // 病案首页
  599. this.is_active = 0;
  600. this.funQuery();
  601. }
  602. this.titleName = n;
  603. this.parentType = b;
  604. let that = this;
  605. that.name_title = n;
  606. if (b != 0 && b != 292 && b != 1 && !isLeaf) {
  607. const params = {
  608. MED_REC_ID: that.valData,
  609. bllb: b,
  610. };
  611. if (this.is_tm_path.includes(this.$route.path)) {
  612. params.is_tm = 1;
  613. }
  614. that.$axios.post('/getAllCase', params).then(res => {
  615. that.text = res.data;
  616. that.dataObj = res.data;
  617. that.reload();
  618. });
  619. } else if (b == 292) {
  620. // 获取详情-入院记录
  621. const params = {
  622. id: this.valData,
  623. bllb: b,
  624. };
  625. if (this.is_tm_path.includes(this.$route.path)) {
  626. params.is_tm = '1';
  627. }
  628. console.log('这里1');
  629. that.$axios2.post('/get_case_platform', params).then(res => {
  630. this.admissionRecord = res.data;
  631. });
  632. } else if (b == 1) {
  633. // 获取详情-出院记录
  634. const params = {
  635. id: this.valData,
  636. bllb: b,
  637. };
  638. if (this.is_tm_path.includes(this.$route.path)) {
  639. params.is_tm = 1;
  640. }
  641. console.log('这里2');
  642. that.$axios2.post('/get_case_platform', params).then(res => {
  643. this.outHospitalRecordData = res.data;
  644. });
  645. }
  646. if (that.is_active == '长期医嘱') {
  647. // 长期医嘱
  648. const params = {
  649. AAA28: that.valData,
  650. };
  651. if (this.is_tm_path.includes(this.$route.path)) {
  652. params.is_tm = 1;
  653. }
  654. that.$axios.post('/long', params).then(res => {
  655. this.longAdvice = res.data;
  656. });
  657. }
  658. if (that.is_active == '临时医嘱') {
  659. // 临时医嘱
  660. const params = {
  661. AAA28: that.valData,
  662. };
  663. if (this.is_tm_path.includes(this.$route.path)) {
  664. params.is_tm = 1;
  665. }
  666. that.$axios.post('/temporary', params).then(res => {
  667. this.happensAdvice = res.data;
  668. });
  669. }
  670. if (that.parentType == '2000002' && isLeaf) {
  671. // 报告单 相关
  672. let parm = {
  673. type: Number(that.is_active),
  674. };
  675. if (this.is_tm_path.includes(this.$route.path)) {
  676. parm.is_tm = 1;
  677. }
  678. parm.zyh = item.ZYH
  679. that.$axios.post('/get_pacs_data', parm).then(res => {
  680. this.pacsDetail = res.data;
  681. });
  682. }
  683. // 病程记录
  684. if (b == 294 && isLeaf) {
  685. // if (that.is_active) {
  686. // 请求前先重置之前的数据
  687. that.caseRecodeInfo = {};
  688. let parm = { blbh: item.blbh };
  689. if (this.is_tm_path.includes(this.$route.path)) {
  690. parm.is_tm = 1;
  691. }
  692. that.$axios.post('/get_bc_data', parm).then(res => {
  693. that.caseRecodeInfo = res.data[0].bc_data;
  694. that.caseRecodeInfo.is_format = res.data[0].is_format;
  695. });
  696. // }
  697. }
  698. // 手术记录
  699. if (b == 303 && isLeaf) {
  700. // if (that.is_active) {
  701. // 请求前先重置之前的数据
  702. that.surgeryData = {};
  703. let parm = { blbh: item.blbh };
  704. if (this.is_tm_path.includes(this.$route.path)) {
  705. parm.is_tm = 1;
  706. }
  707. that.$axios.post('/get_surgery_data', parm).then(res => {
  708. that.surgeryData = res.data[0].surgery_data;
  709. that.surgeryData.is_format = res.data[0].is_format;
  710. });
  711. // }
  712. }
  713. },
  714. //质控依据高亮方法
  715. hightRight(hightKeyWord, bllb, zyh) {
  716. const that = this;
  717. let betweenPart = [];
  718. betweenPart = that.getKeyWord(hightKeyWord);
  719. //自动选中某个菜单
  720. that.is_active = bllb;
  721. that.titleName = '入院记录';
  722. that.parentType = bllb;
  723. console.log('这里3');
  724. const params = { id: zyh, bllb: bllb, isHight: 1, keyWord: betweenPart };
  725. that.$axios2.post('/get_case_platform', params).then(res => {
  726. this.admissionRecord = res.data;
  727. });
  728. },
  729. //获取需要高亮的关键词
  730. getKeyWord(str) {
  731. const result = [];
  732. let startIndex = 0;
  733. let endIndex;
  734. // 查找第一个【的索引
  735. while ((startIndex = str.indexOf('【', startIndex)) !== -1) {
  736. // 查找当前【之后的第一个】的索引
  737. endIndex = str.indexOf('】', startIndex);
  738. // 确保找到了闭合的】
  739. if (endIndex !== -1) {
  740. // 截取【和】之间的内容(不包括【和】)
  741. const content = str.substring(startIndex + 1, endIndex);
  742. result.push(content);
  743. // 更新开始索引为当前】之后的位置,以便查找下一个【
  744. startIndex = endIndex + 1;
  745. } else {
  746. // 如果没有找到闭合的】,则退出循环
  747. break;
  748. }
  749. }
  750. return result;
  751. },
  752. },
  753. };
  754. </script>
  755. <style lang="scss" scoped>
  756. #MyDiv {
  757. margin: 0;
  758. padding: 0 !important;
  759. }
  760. .treeTitle {
  761. cursor: pointer;
  762. }
  763. .header {
  764. margin: 10px 20px;
  765. text-align: right;
  766. display: flex;
  767. justify-content: space-between;
  768. align-items: center;
  769. }
  770. .cont_container {
  771. height: calc(100% - 68px - 20px);
  772. display: flex;
  773. justify-content: center;
  774. }
  775. .cont-left-tiem {
  776. width: 250px;
  777. // min-height: 650px;
  778. height: 100%;
  779. overflow-y: scroll;
  780. background: #ffffff;
  781. }
  782. .cont-left-file {
  783. flex: 1;
  784. // min-height: 650px;
  785. margin: 0 5px;
  786. height: 100%;
  787. overflow-y: scroll;
  788. background: #ffffff;
  789. border: 1px solid #e2e2e2;
  790. padding: 10px;
  791. }
  792. .li-router {
  793. display: inline-block;
  794. width: 100%;
  795. height: 100%;
  796. }
  797. .li-left-item {
  798. line-height: 56px;
  799. font-size: 14px;
  800. color: #303133;
  801. padding: 0 20px;
  802. // cursor: pointer;
  803. -webkit-transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  804. transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  805. -webkit-box-sizing: border-box;
  806. box-sizing: border-box;
  807. }
  808. .li-left-itemyz {
  809. line-height: 56px;
  810. font-size: 14px;
  811. color: #303133;
  812. padding: 0 20px;
  813. -webkit-transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  814. transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  815. -webkit-box-sizing: border-box;
  816. box-sizing: border-box;
  817. .li-left-item-li {
  818. width: 100%;
  819. line-height: 36px;
  820. padding: 0 20px;
  821. cursor: pointer;
  822. white-space: nowrap;
  823. overflow: hidden;
  824. text-overflow: ellipsis;
  825. }
  826. .li-left-item-li:hover {
  827. outline: 0;
  828. background-color: #ecf5ff;
  829. }
  830. }
  831. .li-left-item:focus,
  832. .li-left-item:hover {
  833. outline: 0;
  834. background-color: #ecf5ff;
  835. }
  836. .is-active {
  837. color: #409eff;
  838. }
  839. // 拖拽弹窗样式
  840. .VueDragResize-box{
  841. position: fixed;
  842. width: 100%;
  843. height: 100%;
  844. z-index: 9999;
  845. top: 0;
  846. left: 0;
  847. pointer-events: none; /* 鼠标事件穿透 */
  848. & ::v-deep .vdr-stick{
  849. display: none;
  850. }
  851. & ::v-deep .vdr.active:before{
  852. display: none;
  853. }
  854. .VueDragResize-centent-box{
  855. width: 100%;
  856. height: 100%;
  857. background: #fff;
  858. box-shadow: 0 1px 8px 0 rgb(206 206 206);
  859. border-radius: 6px;
  860. overflow: hidden;
  861. display: flex;
  862. flex-direction: column;
  863. pointer-events: all; /* 鼠标事件穿透 */
  864. .vdr-icon{
  865. width: 28px;
  866. height: 28px;
  867. position: absolute;
  868. bottom: -4px;
  869. right: -4px;
  870. background: #ff0000;
  871. z-index: auto;
  872. display: block;
  873. }
  874. .VueDragResize-title-box{
  875. background: rgb(32 138 183);
  876. color: #fff;
  877. display: flex;
  878. align-items: center;
  879. justify-content: space-between;
  880. font-size: 14px;
  881. height: auto;
  882. height: 40px;
  883. padding: 0 12px;
  884. cursor: move;
  885. .icon-box{
  886. display: flex;
  887. align-items: center;
  888. justify-content: flex-end;
  889. &>span{
  890. font-size: 12px;
  891. display: flex;
  892. align-items: center;
  893. justify-content: center;
  894. width: 20px;
  895. height: 20px;
  896. line-height: 20px;
  897. border: 1px solid #fff;
  898. border-radius: 50%;
  899. cursor: pointer;
  900. }
  901. }
  902. }
  903. .navbaerMag-content-box{
  904. flex: 1;
  905. height: calc(100% - 40px);
  906. overflow: auto;
  907. padding: 10px;
  908. .navbaerMag-tab-box{
  909. width: auto;
  910. display: flex;
  911. align-items: center;
  912. &>div{
  913. cursor: pointer;
  914. width: 82px;
  915. font-size: 14px;
  916. display: flex;
  917. align-items: center;
  918. justify-content: center;
  919. padding: 6px 0;
  920. border: 1px solid rgb(23 80 154);
  921. &.hover-items{
  922. background: rgb(23 80 154);
  923. color: #fff;
  924. }
  925. }
  926. }
  927. .list-box{
  928. width: 100%;
  929. .list-item-box{
  930. width: 100%;
  931. border-radius: 4px;
  932. padding: 10px;
  933. margin-top: 14px;
  934. background: rgb(241 246 255);
  935. font-size: 14px;
  936. .listItem-title-box{
  937. display: flex;
  938. align-items: center;
  939. & span{
  940. font-size: 14px;
  941. }
  942. .span-btn{
  943. display: inline-block;
  944. background: #2b8f53;
  945. margin-left: 6px;
  946. font-size: 12px;
  947. color: #fff;
  948. padding: 6px 12px;
  949. border-radius: 4px;
  950. text-align: center;
  951. cursor: pointer;
  952. }
  953. .arrow-down{
  954. width: 12px;
  955. height: 12px;
  956. margin-left: 12px;
  957. cursor: pointer;
  958. }
  959. .arrow-down.show{
  960. transform: rotate(180deg);
  961. }
  962. }
  963. .items-show-box{
  964. height: auto;
  965. }
  966. .items-show-box.show{
  967. height: 0;
  968. overflow: hidden;
  969. }
  970. .xqItemError-box{
  971. padding: 10px 0;
  972. border-bottom: 1px solid rgb(211, 225, 243);
  973. .items-titleBox{
  974. display: flex;
  975. align-items: center;
  976. margin-top: 10px;
  977. .idx-span{
  978. display: inline-block;
  979. width: 20px;
  980. height: 20px;
  981. border-radius: 50%;
  982. line-height: 20px;
  983. text-align: center;
  984. background: rgb(23 80 154);
  985. color: #fff;
  986. margin-right: 4px;
  987. }
  988. & ::v-deep .el-tag{
  989. height: 26px;
  990. line-height: 26px;
  991. }
  992. .arrow-down{
  993. width: 12px;
  994. height: 12px;
  995. margin-left: 12px;
  996. cursor: pointer;
  997. }
  998. .arrow-down.show{
  999. transform: rotate(180deg);
  1000. }
  1001. }
  1002. .itemsDiv-box{
  1003. height: auto;
  1004. }
  1005. .itemsDiv-box.show{
  1006. height: 0;
  1007. overflow: hidden;
  1008. }
  1009. .items-box{
  1010. margin-top: 10px;
  1011. padding-left: 10px;
  1012. box-sizing: border-box;
  1013. .items-content{
  1014. font-size: 14px;
  1015. margin-top: 6px;
  1016. line-height: 20px;
  1017. }
  1018. }
  1019. }
  1020. }
  1021. }
  1022. }
  1023. }
  1024. }
  1025. </style>
  1026. <style>
  1027. /* ================================== 文本形式样式 ↓ ======================== */
  1028. .refachInput span {
  1029. height: auto;
  1030. line-height: 1;
  1031. padding: 10px 0;
  1032. }
  1033. .refachInput span.refachInput-text {
  1034. padding-left: 12px;
  1035. }
  1036. .el-row--flex.is-justify-space-around {
  1037. justify-content: flex-start;
  1038. }
  1039. .member-infobox {
  1040. width: 100%;
  1041. }
  1042. .member-infobox .info-box-1 {
  1043. /* display: flex;
  1044. flex-wrap: wrap; */
  1045. margin-top: 20px;
  1046. }
  1047. .infoBox-items {
  1048. width: auto;
  1049. display: flex;
  1050. align-items: center;
  1051. padding: 8px 0;
  1052. }
  1053. .padding-left20 {
  1054. padding-left: 20px;
  1055. }
  1056. .padding-right20 {
  1057. padding-right: 20px;
  1058. }
  1059. .infoBox-title {
  1060. color: #333;
  1061. font-size: 12px;
  1062. font-weight: bold;
  1063. }
  1064. .infoBox-items-text {
  1065. color: #666;
  1066. font-size: 12px;
  1067. padding-left: 5px;
  1068. padding-right: 20px;
  1069. }
  1070. .title-ff0000 {
  1071. color: #ff0000;
  1072. }
  1073. /* 高亮 */
  1074. .choose-twinkle {
  1075. font-size: 20px;
  1076. color: red;
  1077. font-weight: 600;
  1078. background: yellow;
  1079. }
  1080. .table-value-look {
  1081. padding-left: 12px;
  1082. color: #ff0000;
  1083. cursor: pointer;
  1084. }
  1085. .keyHight {
  1086. background-color: red !important;
  1087. font-weight: bold !important;
  1088. }
  1089. .zbjg-box::v-deep .el-button--primary{
  1090. background: #208ab7;
  1091. }
  1092. </style>