caseViews.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  1. <template>
  2. <div id="MyDiv" :class="{ nocopy: $route.query.status }">
  3. <div class="header">
  4. <el-button @click="getback">返回</el-button>
  5. </div>
  6. <div class="cont_container">
  7. <!-- 左侧点击列表部分 -->
  8. <div class="cont-left-tiem">
  9. <ul class="el-menu-vertical-demo el-menu">
  10. <li class="li-left-item" :class="is_active == 0 ? 'is-active' : ''" @click="clickTree(0, '住院病案')">
  11. <span>住院病案</span>
  12. </li>
  13. <li
  14. :class="[is_active == item.bllb && item.bllb != 49 ? 'is-active' : '', item.bllb == 49 || [2000002, 294, 303].includes(item.bllb) ? 'li-left-itemyz' : 'li-left-item']"
  15. v-for="(item, index) in treeList"
  16. :key="index"
  17. @click="clickTree(item.bllb, item.name, item)"
  18. >
  19. <span>{{ item.name }}</span>
  20. <div v-if="item.bllb == 49">
  21. <div :class="['li-left-item-li', is_active == '长期医嘱' ? 'is-active' : '']" data-li="49-1">长期医嘱</div>
  22. <div :class="['li-left-item-li', is_active == '临时医嘱' ? 'is-active' : '']" data-li="49-2">临时医嘱</div>
  23. </div>
  24. <div v-if="item.bllb == 2000002">
  25. <div :class="['li-left-item-li', is_active == jitem.ExamType ? 'is-active' : '']" v-for="(jitem, jindex) in item.list" :key="jindex" :id="jitem.type">
  26. {{ jitem.name }}
  27. </div>
  28. </div>
  29. <!-- 病程记录、手术记录 -->
  30. <div v-if="[294, 303].includes(item.bllb)">
  31. <div
  32. :class="['li-left-item-li', is_active == jitem.blbh ? 'is-active' : '']"
  33. v-for="(jitem, jindex) in item.list"
  34. :key="jindex"
  35. :id="`${jitem.blbh}`"
  36. :title="jitem.name.trim()"
  37. >
  38. {{ jitem.name.trim() }}
  39. </div>
  40. </div>
  41. </li>
  42. </ul>
  43. </div>
  44. <div class="cont-left-file">
  45. <div v-if="is_active == 0">
  46. <mainHomePage :data="mainHomeData" ref="main" :ifFile="ifFile"></mainHomePage>
  47. </div>
  48. <div v-else-if="is_active == 292">
  49. <!-- 入院记录 -->
  50. <admissionRecord :data="admissionRecord" :ifFile="ifFile"></admissionRecord>
  51. </div>
  52. <div v-else-if="parentType == '1' && is_active == 1">
  53. <!-- 出院记录 -->
  54. <OutHospitalRecord :data="outHospitalRecordData" />
  55. </div>
  56. <div v-else-if="bcjlLiIds.includes(Number(is_active))">
  57. <!-- 病程记录 -->
  58. <CaseRecord :data="caseRecodeInfo" v-if="caseRecodeInfo.is_format === 1" />
  59. <NoFormatText :text="caseRecodeInfo.content" :data="caseRecodeInfo" name="" v-else />
  60. </div>
  61. <div v-else-if="shoushuLiIds.includes(Number(is_active))">
  62. <!-- 手术记录 -->
  63. <template v-if="surgeryData.is_format">
  64. <ShouShuRecord1 v-if="surgeryData.type === 1" :data="surgeryData" />
  65. <ShouShuRecord2 v-if="surgeryData.type === 2" :data="surgeryData" />
  66. <ShouShuRecord4 v-if="surgeryData.type === 4" :data="surgeryData" />
  67. </template>
  68. <NoFormatText v-else :text="surgeryData.content" :data="surgeryData" :name="blname_title" />
  69. </div>
  70. <div v-else-if="is_active == '长期医嘱'">
  71. <!-- 长期医嘱 -->
  72. <medicalAdvice :dataObj="longAdvice"></medicalAdvice>
  73. </div>
  74. <div v-else-if="is_active == '临时医嘱'">
  75. <!-- 临时医嘱 -->
  76. <medicalTemporary :dataObj="happensAdvice"></medicalTemporary>
  77. </div>
  78. <div v-else-if="parentType == '2000002' && is_active == '1'">
  79. <!-- 病历图文报告 -->
  80. <caseImageText :dataObjArr="pacsDetail"></caseImageText>
  81. </div>
  82. <div v-else-if="parentType == '2000002' && is_active == '2'">
  83. <!-- 超声诊断 -->
  84. <ultrasound :dataObjArr="pacsDetail"></ultrasound>
  85. </div>
  86. <div v-else-if="parentType == '2000002' && is_active == '3'">
  87. <!-- 影像诊断 -->
  88. <imaging :dataObjArr="pacsDetail"></imaging>
  89. </div>
  90. <div v-else-if="parentType == '2000002' && is_active == '4'">
  91. <!-- 为心电 -->
  92. <electrocar :dataObjArr="pacsDetail"></electrocar>
  93. </div>
  94. <div v-else-if="parentType == '2000002' && is_active == '5'">
  95. <!-- 检验报告单 病理 -->
  96. <checkout :dataObjArr="pacsDetail"></checkout>
  97. </div>
  98. <div v-else-if="parentType == '2000002' && is_active == '6'">
  99. <!-- 內窥镜检查报告 病理 -->
  100. <sightGlass :dataObjArr="pacsDetail"></sightGlass>
  101. </div>
  102. <div v-else-if="is_active == 288 || is_active == 18">
  103. <!-- 死亡记录 或者 24小时内入院记录 -->
  104. <DeathText :dataObjArr="dataObj"></DeathText>
  105. </div>
  106. <div v-else>
  107. <newContFile v-for="(item, index) of text" :key="index" :text="item.HJNR" :name="name_title"></newContFile>
  108. </div>
  109. </div>
  110. <!-- status 不存在 意味着不脱敏、医院自助查询 -->
  111. <template v-if="!$route.query.status">
  112. <!-- 住院病案质控 -->
  113. <CaseQualityBox :data="results" :height="820" />
  114. </template>
  115. </div>
  116. </div>
  117. </template>
  118. <script>
  119. import Mmenu from '@/components/m-menu';
  120. import mainHomePage from '@/views/allcase/contFile/mainHomePage';
  121. import newContFile from '@/views/allcase/contFile/newContFile';
  122. import admissionRecord from '@/views/allcase/contFile/admissionRecord';
  123. import medicalAdvice from '@/views/allcase/contFile/medicalAdvice';
  124. import medicalTemporary from '@/views/allcase/contFile/medicalTemporary';
  125. import caseImageText from '@/views/allcase/report/caseImageText';
  126. import ultrasound from '@/views/allcase/report/ultrasound';
  127. import imaging from '@/views/allcase/report/imaging';
  128. import electrocar from '@/views/allcase/report/electrocar';
  129. import checkout from '@/views/allcase/report/checkout';
  130. import sightGlass from '@/views/allcase/report/sightGlass';
  131. import CaseRecord from './components/CaseRecord2.vue';
  132. import ShouShuRecord1 from './components/ShouShuRecord1.vue';
  133. import ShouShuRecord2 from './components/ShouShuRecord2.vue';
  134. import ShouShuRecord4 from './components/ShouShuRecord4.vue';
  135. import NoFormatText from './components/NoFormatText.vue';
  136. import OutHospitalRecord from './components/OutHospitalRecord.vue';
  137. import CaseQualityBox from './components/CaseQualityBox2.vue';
  138. import DeathText from './components/DeathText.vue';
  139. export default {
  140. components: {
  141. Mmenu,
  142. mainHomePage,
  143. newContFile,
  144. admissionRecord,
  145. medicalAdvice,
  146. medicalTemporary,
  147. caseImageText,
  148. ultrasound,
  149. imaging,
  150. electrocar,
  151. sightGlass,
  152. checkout,
  153. CaseRecord,
  154. ShouShuRecord1,
  155. ShouShuRecord2,
  156. ShouShuRecord4,
  157. NoFormatText,
  158. OutHospitalRecord,
  159. CaseQualityBox,
  160. DeathText,
  161. },
  162. directives: {},
  163. filters: {},
  164. extends: {},
  165. mixins: {},
  166. props: {},
  167. data() {
  168. return {
  169. mainHomeData: {},
  170. admissionRecord: {},
  171. longAdvice: {},
  172. happensAdvice: {},
  173. valData: '',
  174. ifFile: false,
  175. treeList: [],
  176. is_active: 0,
  177. parentType: 0,
  178. name_title: '',
  179. text: [],
  180. update: true,
  181. titleName: '住院病案',
  182. pacsDetail: {},
  183. // 病程记录详情
  184. caseRecodeInfo: {
  185. is_format: 1,
  186. },
  187. surgeryData: {
  188. mzfj: [],
  189. ssqk: [],
  190. sscxsj: [],
  191. sslb: [],
  192. is_format: 0,
  193. },
  194. outHospitalRecordData: {
  195. name: {},
  196. ry_time: {},
  197. sex: {},
  198. age: {},
  199. cy_time: {},
  200. zyts: {},
  201. ryqk: {},
  202. cbzd: {},
  203. zljg: {},
  204. cyqk: {},
  205. cyzd: {},
  206. cyyz: {},
  207. },
  208. dataObj: [],
  209. results: {
  210. data: {}
  211. },
  212. };
  213. },
  214. computed: {
  215. bcjlLiIds() {
  216. // 病程记录子项数据
  217. const arr = Object.values(this.treeList).filter(item => item.bllb === 294);
  218. const liIds = [];
  219. if (arr.length) {
  220. if (arr[0].list) {
  221. for (let i = 0; i < arr[0].list.length; i++) {
  222. liIds.push(arr[0].list[i].blbh);
  223. }
  224. }
  225. }
  226. return liIds;
  227. },
  228. shoushuLiIds() {
  229. // 病程记录子项数据
  230. const arr = Object.values(this.treeList).filter(item => item.bllb === 303);
  231. const liIds = [];
  232. if (arr.length) {
  233. if (arr[0].list) {
  234. for (let i = 0; i < arr[0].list.length; i++) {
  235. liIds.push(arr[0].list[i].blbh);
  236. }
  237. }
  238. }
  239. return liIds;
  240. },
  241. blname_title() {
  242. let title;
  243. const type = this.surgeryData.type;
  244. if (type === 1) {
  245. title = '手术风险评估表';
  246. } else if (type === 2) {
  247. title = '手术安全核查表';
  248. } else if (type === 3) {
  249. title = '手术同意书';
  250. } else if (type === 4) {
  251. title = '手术记录';
  252. }
  253. return title;
  254. },
  255. },
  256. watch: {},
  257. mounted() {
  258. this.valData = this.storageGet('getData');
  259. if (this.valData) {
  260. this.funQuery();
  261. this.getCaseQualityResults();
  262. }
  263. this.getTree();
  264. },
  265. methods: {
  266. // 获取新病案指控结果
  267. getCaseQualityResults() {
  268. const params = {
  269. id: Number(this.valData),
  270. };
  271. this.$axios2.post('/get_case_quality', params).then(res => {
  272. this.results = res.data;
  273. });
  274. },
  275. reload() {
  276. // 移除组件
  277. this.update = false;
  278. // 在组件移除后,重新渲染组件
  279. // this.$nextTick可实现在DOM 状态更新后,执行传入的方法。
  280. this.$nextTick(() => {
  281. this.update = true;
  282. });
  283. },
  284. funEdit() {
  285. this.ifFile = true;
  286. this.$message('errer:功能待开发');
  287. },
  288. getback() {
  289. this.$router.go(-1);
  290. },
  291. /**
  292. * 跳转对应病历首页
  293. */
  294. getBlankIndexss(item) {
  295. this.$refs.main.getBlankIndex(item);
  296. },
  297. funQuery() {
  298. const params = {
  299. id: this.valData,
  300. };
  301. if (this.$route.query.status) {
  302. params.is_tm = 1;
  303. }
  304. this.$axios.post('/medical_record', params).then(res => {
  305. this.mainHomeData = res.data;
  306. });
  307. },
  308. getTree() {
  309. let that = this;
  310. let pramse = {
  311. id: this.valData,
  312. };
  313. this.$axios.post('/getTree', pramse).then(res => {
  314. that.treeList = res.data;
  315. });
  316. },
  317. clickTree(b, n, item) {
  318. this.titleName = n;
  319. this.parentType = b;
  320. let that = this;
  321. // 判断点击的
  322. if (event.target.outerText == '长期医嘱' || event.target.outerText == '临时医嘱') {
  323. that.is_active = event.target.outerText;
  324. } else if (b == 2000002) {
  325. that.is_active = event.target.id;
  326. } else if (b == 294) {
  327. that.is_active = event.target.id;
  328. } else if (b == 303) {
  329. that.is_active = event.target.id;
  330. } else {
  331. that.is_active = b;
  332. }
  333. that.name_title = n;
  334. if (b != 0 && b != 292 && b != 1) {
  335. const params = {
  336. MED_REC_ID: that.valData,
  337. bllb: b,
  338. };
  339. if (this.$route.query.status) {
  340. params.is_tm = 1;
  341. }
  342. that.$axios.post('/getAllCase', params).then(res => {
  343. that.text = res.data;
  344. that.dataObj = res.data;
  345. that.reload();
  346. });
  347. } else if (b == 292) {
  348. // 获取详情
  349. const params = {
  350. id: this.valData,
  351. bllb: b,
  352. };
  353. if (this.$route.query.status) {
  354. params.is_tm = '1';
  355. }
  356. that.$axios.post('/get_case_platform', params).then(res => {
  357. this.admissionRecord = res.data;
  358. });
  359. } else if (b == 1) {
  360. // 获取详情
  361. const params = {
  362. id: this.valData,
  363. bllb: b,
  364. };
  365. if (this.$route.query.status) {
  366. params.is_tm = 1;
  367. }
  368. that.$axios.post('/get_case_platform', params).then(res => {
  369. this.outHospitalRecordData = res.data;
  370. });
  371. }
  372. if (that.is_active == '长期医嘱') {
  373. // 长期医嘱
  374. const params = {
  375. AAA28: that.valData,
  376. };
  377. if (this.$route.query.status) {
  378. params.is_tm = 1;
  379. }
  380. that.$axios.post('/long', params).then(res => {
  381. this.longAdvice = res.data;
  382. });
  383. }
  384. if (that.is_active == '临时医嘱') {
  385. // 临时医嘱
  386. const params = {
  387. AAA28: that.valData,
  388. };
  389. if (this.$route.query.status) {
  390. params.is_tm = 1;
  391. }
  392. that.$axios.post('/temporary', params).then(res => {
  393. this.happensAdvice = res.data;
  394. });
  395. }
  396. if (that.parentType == '2000002' && that.is_active != '') {
  397. // 报告单 相关
  398. let parm = {
  399. type: Number(that.is_active),
  400. };
  401. if (this.$route.query.status) {
  402. parm.is_tm = 1;
  403. }
  404. let treeListArr = Object.values(that.treeList);
  405. treeListArr.forEach((item, index) => {
  406. if (item.bllb == 2000002) {
  407. parm.zyh = Number(item.list[0].ZYH);
  408. }
  409. });
  410. that.$axios.post('/get_pacs_data', parm).then(res => {
  411. this.pacsDetail = res.data;
  412. });
  413. }
  414. // if (that.is_active === '12') {
  415. // // 报告单 相关
  416. // let parm = { id: this.valData };
  417. // that.$axios.post('/get_jmgs_detail', parm).then(res => {
  418. // this.pacsDetail = res.data;
  419. // });
  420. // }
  421. // 病程记录
  422. if (item.bllb === 294) {
  423. if (that.is_active) {
  424. // 请求前先重置之前的数据
  425. that.caseRecodeInfo = {};
  426. let parm = { blbh: that.is_active };
  427. if (this.$route.query.status) {
  428. parm.is_tm = 1;
  429. }
  430. that.$axios.post('/get_bc_data', parm).then(res => {
  431. that.caseRecodeInfo = res.data[0].bc_data;
  432. that.caseRecodeInfo.is_format = res.data[0].is_format;
  433. });
  434. }
  435. }
  436. // 手术记录
  437. if (item.bllb === 303) {
  438. if (that.is_active) {
  439. // 请求前先重置之前的数据
  440. that.surgeryData = {};
  441. let parm = { blbh: that.is_active };
  442. if (this.$route.query.status) {
  443. parm.is_tm = 1;
  444. }
  445. that.$axios.post('/get_surgery_data', parm).then(res => {
  446. that.surgeryData = res.data[0].surgery_data;
  447. that.surgeryData.is_format = res.data[0].is_format;
  448. });
  449. }
  450. }
  451. },
  452. },
  453. };
  454. </script>
  455. <style lang="scss" scoped>
  456. #MyDiv {
  457. margin: 0;
  458. padding: 0 !important;
  459. }
  460. .nocopy {
  461. user-select: none;
  462. }
  463. .header {
  464. margin: 10px 20px;
  465. text-align: right;
  466. display: flex;
  467. justify-content: flex-end;
  468. }
  469. .cont_container {
  470. display: flex;
  471. justify-content: center;
  472. }
  473. .cont-left-tiem {
  474. width: 250px;
  475. margin: 0 0 0 15px;
  476. min-height: 650px;
  477. height: calc(100vh - 130px);
  478. overflow-y: scroll;
  479. background: #ffffff;
  480. }
  481. .cont-left-file {
  482. flex: 1;
  483. min-height: 650px;
  484. margin: 0 5px;
  485. height: calc(100vh - 130px);
  486. overflow-y: scroll;
  487. background: #ffffff;
  488. border: 1px solid #e2e2e2;
  489. padding: 10px;
  490. }
  491. .li-router {
  492. display: inline-block;
  493. width: 100%;
  494. height: 100%;
  495. }
  496. .li-left-item {
  497. line-height: 56px;
  498. font-size: 14px;
  499. color: #303133;
  500. padding: 0 20px;
  501. cursor: pointer;
  502. -webkit-transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  503. transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  504. -webkit-box-sizing: border-box;
  505. box-sizing: border-box;
  506. }
  507. .li-left-itemyz {
  508. line-height: 56px;
  509. font-size: 14px;
  510. color: #303133;
  511. padding-left: 20px;
  512. -webkit-transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  513. transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  514. -webkit-box-sizing: border-box;
  515. box-sizing: border-box;
  516. .li-left-item-li {
  517. width: 100%;
  518. line-height: 36px;
  519. padding: 0 20px;
  520. cursor: pointer;
  521. white-space: nowrap;
  522. overflow: hidden;
  523. text-overflow: ellipsis;
  524. }
  525. .li-left-item-li:hover {
  526. outline: 0;
  527. background-color: #ecf5ff;
  528. }
  529. }
  530. .li-left-item:focus,
  531. .li-left-item:hover {
  532. outline: 0;
  533. background-color: #ecf5ff;
  534. }
  535. .is-active {
  536. color: #409eff;
  537. }
  538. </style>
  539. <style>
  540. /* ================================== 文本形式样式 ↓ ======================== */
  541. .refachInput span {
  542. height: auto;
  543. line-height: 1;
  544. padding: 10px 0;
  545. }
  546. .refachInput span.refachInput-text {
  547. padding-left: 12px;
  548. }
  549. .el-row--flex.is-justify-space-around {
  550. justify-content: flex-start;
  551. }
  552. .member-infobox {
  553. width: 100%;
  554. }
  555. .member-infobox .info-box-1 {
  556. /* display: flex;
  557. flex-wrap: wrap; */
  558. margin-top: 20px;
  559. }
  560. .infoBox-items {
  561. width: auto;
  562. display: flex;
  563. align-items: center;
  564. padding: 8px 0;
  565. }
  566. .padding-left20 {
  567. padding-left: 20px;
  568. }
  569. .padding-right20 {
  570. padding-right: 20px;
  571. }
  572. .infoBox-title {
  573. color: #333;
  574. font-size: 12px;
  575. font-weight: bold;
  576. }
  577. .infoBox-items-text {
  578. color: #666;
  579. font-size: 12px;
  580. padding-left: 5px;
  581. padding-right: 20px;
  582. }
  583. .title-ff0000 {
  584. color: #ff0000;
  585. }
  586. /* 高亮 */
  587. .choose-twinkle {
  588. font-size: 20px;
  589. color: red;
  590. font-weight: 600;
  591. background: yellow;
  592. }
  593. .table-value-look {
  594. padding-left: 12px;
  595. color: #ff0000;
  596. cursor: pointer;
  597. }
  598. </style>