caseViews.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. <template>
  2. <div id="MyDiv" style="margin: 16px;" :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" :type="type_v" :width="380" :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. type_v:'', // v2 表示从(事中)进入
  170. mainHomeData: {},
  171. admissionRecord: {},
  172. longAdvice: {},
  173. happensAdvice: {},
  174. valData: '',
  175. ifFile: false,
  176. treeList: [],
  177. is_active: 0,
  178. parentType: 0,
  179. name_title: '',
  180. text: [],
  181. update: true,
  182. titleName: '住院病案',
  183. pacsDetail: {},
  184. // 病程记录详情
  185. caseRecodeInfo: {
  186. is_format: 1,
  187. },
  188. surgeryData: {
  189. mzfj: [],
  190. ssqk: [],
  191. sscxsj: [],
  192. sslb: [],
  193. is_format: 0,
  194. },
  195. outHospitalRecordData: {
  196. name: {},
  197. ry_time: {},
  198. sex: {},
  199. age: {},
  200. cy_time: {},
  201. zyts: {},
  202. ryqk: {},
  203. cbzd: {},
  204. zljg: {},
  205. cyqk: {},
  206. cyzd: {},
  207. cyyz: {},
  208. },
  209. dataObj: [],
  210. results: {
  211. data: {}
  212. },
  213. };
  214. },
  215. computed: {
  216. bcjlLiIds() {
  217. // 病程记录子项数据
  218. const arr = Object.values(this.treeList).filter(item => item.bllb === 294);
  219. const liIds = [];
  220. if (arr.length) {
  221. if (arr[0].list) {
  222. for (let i = 0; i < arr[0].list.length; i++) {
  223. liIds.push(arr[0].list[i].blbh);
  224. }
  225. }
  226. }
  227. return liIds;
  228. },
  229. shoushuLiIds() {
  230. // 病程记录子项数据
  231. const arr = Object.values(this.treeList).filter(item => item.bllb === 303);
  232. const liIds = [];
  233. if (arr.length) {
  234. if (arr[0].list) {
  235. for (let i = 0; i < arr[0].list.length; i++) {
  236. liIds.push(arr[0].list[i].blbh);
  237. }
  238. }
  239. }
  240. return liIds;
  241. },
  242. blname_title() {
  243. let title;
  244. const type = this.surgeryData.type;
  245. if (type === 1) {
  246. title = '手术风险评估表';
  247. } else if (type === 2) {
  248. title = '手术安全核查表';
  249. } else if (type === 3) {
  250. title = '手术同意书';
  251. } else if (type === 4) {
  252. title = '手术记录';
  253. }
  254. return title;
  255. },
  256. },
  257. watch: {},
  258. created(){
  259. this.type_v = this.$route.query.type_v;
  260. },
  261. mounted() {
  262. let v =
  263. this.valData = this.storageGet('getData');
  264. if (this.valData) {
  265. this.funQuery();
  266. this.getCaseQualityResults();
  267. }
  268. this.getTree();
  269. },
  270. methods: {
  271. // 获取新病案指控结果
  272. getCaseQualityResults() {
  273. const params = {
  274. id: Number(this.valData),
  275. };
  276. if(this.type_v == 'v2'){
  277. // (事中)
  278. this.$axios2.post('/get_case_quality_v2', params).then(res => {
  279. this.results = res.data;
  280. });
  281. }else{
  282. this.$axios2.post('/get_case_quality', params).then(res => {
  283. this.results = res.data;
  284. });
  285. }
  286. },
  287. reload() {
  288. // 移除组件
  289. this.update = false;
  290. // 在组件移除后,重新渲染组件
  291. // this.$nextTick可实现在DOM 状态更新后,执行传入的方法。
  292. this.$nextTick(() => {
  293. this.update = true;
  294. });
  295. },
  296. funEdit() {
  297. this.ifFile = true;
  298. this.$message('errer:功能待开发');
  299. },
  300. getback() {
  301. this.$router.go(-1);
  302. },
  303. /**
  304. * 跳转对应病历首页
  305. */
  306. getBlankIndexss(item) {
  307. this.$refs.main.getBlankIndex(item);
  308. },
  309. funQuery() {
  310. const params = {
  311. id: this.valData,
  312. };
  313. if (this.$route.query.status) {
  314. params.is_tm = 1;
  315. }
  316. this.$axios.post('/medical_record', params).then(res => {
  317. this.mainHomeData = res.data;
  318. });
  319. },
  320. getTree() {
  321. let that = this;
  322. let pramse = {
  323. id: this.valData,
  324. };
  325. this.$axios.post('/getTree', pramse).then(res => {
  326. that.treeList = res.data;
  327. });
  328. },
  329. clickTree(b, n, item) {
  330. this.titleName = n;
  331. this.parentType = b;
  332. let that = this;
  333. // 判断点击的
  334. if (event.target.outerText == '长期医嘱' || event.target.outerText == '临时医嘱') {
  335. that.is_active = event.target.outerText;
  336. } else if (b == 2000002) {
  337. that.is_active = event.target.id;
  338. } else if (b == 294) {
  339. that.is_active = event.target.id;
  340. } else if (b == 303) {
  341. that.is_active = event.target.id;
  342. } else {
  343. that.is_active = b;
  344. }
  345. that.name_title = n;
  346. if (b != 0 && b != 292 && b != 1) {
  347. const params = {
  348. MED_REC_ID: that.valData,
  349. bllb: b,
  350. };
  351. if (this.$route.query.status) {
  352. params.is_tm = 1;
  353. }
  354. that.$axios.post('/getAllCase', params).then(res => {
  355. that.text = res.data;
  356. that.dataObj = res.data;
  357. that.reload();
  358. });
  359. } else if (b == 292) {
  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.$axios2.post('/get_case_platform', params).then(res => {
  369. this.admissionRecord = res.data;
  370. });
  371. } else if (b == 1) {
  372. // 获取详情
  373. const params = {
  374. id: this.valData,
  375. bllb: b,
  376. };
  377. if (this.$route.query.status) {
  378. params.is_tm = 1;
  379. }
  380. that.$axios2.post('/get_case_platform', params).then(res => {
  381. this.outHospitalRecordData = 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('/long', params).then(res => {
  393. this.longAdvice = res.data;
  394. });
  395. }
  396. if (that.is_active == '临时医嘱') {
  397. // 临时医嘱
  398. const params = {
  399. AAA28: that.valData,
  400. };
  401. if (this.$route.query.status) {
  402. params.is_tm = 1;
  403. }
  404. that.$axios.post('/temporary', params).then(res => {
  405. this.happensAdvice = res.data;
  406. });
  407. }
  408. if (that.parentType == '2000002' && that.is_active != '') {
  409. // 报告单 相关
  410. let parm = {
  411. type: Number(that.is_active),
  412. };
  413. if (this.$route.query.status) {
  414. parm.is_tm = 1;
  415. }
  416. let treeListArr = Object.values(that.treeList);
  417. treeListArr.forEach((item, index) => {
  418. if (item.bllb == 2000002) {
  419. parm.zyh = Number(item.list[0].ZYH);
  420. }
  421. });
  422. that.$axios.post('/get_pacs_data', parm).then(res => {
  423. this.pacsDetail = res.data;
  424. });
  425. }
  426. // if (that.is_active === '12') {
  427. // // 报告单 相关
  428. // let parm = { id: this.valData };
  429. // that.$axios.post('/get_jmgs_detail', parm).then(res => {
  430. // this.pacsDetail = res.data;
  431. // });
  432. // }
  433. // 病程记录
  434. if (item.bllb === 294) {
  435. if (that.is_active) {
  436. // 请求前先重置之前的数据
  437. that.caseRecodeInfo = {};
  438. let parm = { blbh: that.is_active };
  439. if (this.$route.query.status) {
  440. parm.is_tm = 1;
  441. }
  442. that.$axios.post('/get_bc_data', parm).then(res => {
  443. that.caseRecodeInfo = res.data[0].bc_data;
  444. that.caseRecodeInfo.is_format = res.data[0].is_format;
  445. });
  446. }
  447. }
  448. // 手术记录
  449. if (item.bllb === 303) {
  450. if (that.is_active) {
  451. // 请求前先重置之前的数据
  452. that.surgeryData = {};
  453. let parm = { blbh: that.is_active };
  454. if (this.$route.query.status) {
  455. parm.is_tm = 1;
  456. }
  457. that.$axios.post('/get_surgery_data', parm).then(res => {
  458. that.surgeryData = res.data[0].surgery_data;
  459. that.surgeryData.is_format = res.data[0].is_format;
  460. });
  461. }
  462. }
  463. },
  464. },
  465. };
  466. </script>
  467. <style lang="scss" scoped>
  468. #MyDiv {
  469. margin: 0;
  470. padding: 0 !important;
  471. }
  472. .header {
  473. margin: 10px 20px;
  474. text-align: right;
  475. display: flex;
  476. justify-content: flex-end;
  477. }
  478. .cont_container {
  479. display: flex;
  480. justify-content: center;
  481. }
  482. .cont-left-tiem {
  483. width: 250px;
  484. min-height: 650px;
  485. height: calc(100vh - 130px);
  486. overflow-y: scroll;
  487. background: #ffffff;
  488. }
  489. .cont-left-file {
  490. flex: 1;
  491. min-height: 650px;
  492. margin: 0 5px;
  493. height: calc(100vh - 130px);
  494. overflow-y: scroll;
  495. background: #ffffff;
  496. border: 1px solid #e2e2e2;
  497. padding: 10px;
  498. }
  499. .li-router {
  500. display: inline-block;
  501. width: 100%;
  502. height: 100%;
  503. }
  504. .li-left-item {
  505. line-height: 56px;
  506. font-size: 14px;
  507. color: #303133;
  508. padding: 0 20px;
  509. cursor: pointer;
  510. -webkit-transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  511. transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  512. -webkit-box-sizing: border-box;
  513. box-sizing: border-box;
  514. }
  515. .li-left-itemyz {
  516. line-height: 56px;
  517. font-size: 14px;
  518. color: #303133;
  519. padding-left: 20px;
  520. -webkit-transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  521. transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  522. -webkit-box-sizing: border-box;
  523. box-sizing: border-box;
  524. .li-left-item-li {
  525. width: 100%;
  526. line-height: 36px;
  527. padding: 0 20px;
  528. cursor: pointer;
  529. white-space: nowrap;
  530. overflow: hidden;
  531. text-overflow: ellipsis;
  532. }
  533. .li-left-item-li:hover {
  534. outline: 0;
  535. background-color: #ecf5ff;
  536. }
  537. }
  538. .li-left-item:focus,
  539. .li-left-item:hover {
  540. outline: 0;
  541. background-color: #ecf5ff;
  542. }
  543. .is-active {
  544. color: #409eff;
  545. }
  546. </style>
  547. <style>
  548. /* ================================== 文本形式样式 ↓ ======================== */
  549. .refachInput span {
  550. height: auto;
  551. line-height: 1;
  552. padding: 10px 0;
  553. }
  554. .refachInput span.refachInput-text {
  555. padding-left: 12px;
  556. }
  557. .el-row--flex.is-justify-space-around {
  558. justify-content: flex-start;
  559. }
  560. .member-infobox {
  561. width: 100%;
  562. }
  563. .member-infobox .info-box-1 {
  564. /* display: flex;
  565. flex-wrap: wrap; */
  566. margin-top: 20px;
  567. }
  568. .infoBox-items {
  569. width: auto;
  570. display: flex;
  571. align-items: center;
  572. padding: 8px 0;
  573. }
  574. .padding-left20 {
  575. padding-left: 20px;
  576. }
  577. .padding-right20 {
  578. padding-right: 20px;
  579. }
  580. .infoBox-title {
  581. color: #333;
  582. font-size: 12px;
  583. font-weight: bold;
  584. }
  585. .infoBox-items-text {
  586. color: #666;
  587. font-size: 12px;
  588. padding-left: 5px;
  589. padding-right: 20px;
  590. }
  591. .title-ff0000 {
  592. color: #ff0000;
  593. }
  594. /* 高亮 */
  595. .choose-twinkle {
  596. font-size: 20px;
  597. color: red;
  598. font-weight: 600;
  599. background: yellow;
  600. }
  601. .table-value-look {
  602. padding-left: 12px;
  603. color: #ff0000;
  604. cursor: pointer;
  605. }
  606. </style>