yuwandanmian 1 год назад
Родитель
Сommit
9f1042d939
1 измененных файлов с 43 добавлено и 22 удалено
  1. 43 22
      src/views/recordsRoom/qc/caseViews.vue

+ 43 - 22
src/views/recordsRoom/qc/caseViews.vue

@@ -10,7 +10,7 @@
           <li
           <li
             v-for="(item, index) in treeList"
             v-for="(item, index) in treeList"
             :key="index"
             :key="index"
-            :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']"
+            :class="[is_active == item.bllb && item.bllb != 49 ? 'is-active' : '', item.bllb == 49 || [2000002, 294, 303, 329, 288, 34, 87].includes(item.bllb) ? 'li-left-itemyz' : 'li-left-item']"
             @click="clickTree(item.bllb, item.name, item)"
             @click="clickTree(item.bllb, item.name, item)"
           >
           >
             <span>{{ item.name }}</span>
             <span>{{ item.name }}</span>
@@ -24,7 +24,7 @@
               </div>
               </div>
             </div>
             </div>
             <!-- 病程记录、手术记录 -->
             <!-- 病程记录、手术记录 -->
-            <div v-if="[294, 303].includes(item.bllb)">
+            <div v-if="[294, 303, 329, 288, 34, 87].includes(item.bllb)">
               <div
               <div
                 v-for="(jitem, jindex) in item.list"
                 v-for="(jitem, jindex) in item.list"
                 :id="`${jitem.blbh}`"
                 :id="`${jitem.blbh}`"
@@ -98,10 +98,12 @@
         </div>
         </div>
         <div v-else-if="is_active == 288 || is_active == 18">
         <div v-else-if="is_active == 288 || is_active == 18">
           <!-- 死亡记录 或者 24小时内入院记录 -->
           <!-- 死亡记录 或者 24小时内入院记录 -->
-          <DeathText :data-obj-arr="dataObj" />
+          <DeathText :data-obj-arr="dataObj" v-if="update" />
         </div>
         </div>
         <div v-else>
         <div v-else>
-          <newContFile v-for="(item, index) of text" :key="index" :text="item.HJNR" :name="name_title" />
+          <div v-if="update">
+            <newContFile v-for="(item, index) of text" :key="index" :text="item.HJNR" :name="name_title" />
+          </div>
         </div>
         </div>
       </div>
       </div>
       <!-- status 不存在 意味着不脱敏、医院自助查询 -->
       <!-- status 不存在 意味着不脱敏、医院自助查询 -->
@@ -136,7 +138,7 @@ import OutHospitalRecord from './components/OutHospitalRecord.vue'
 import CaseQualityBox from './components/CaseQualityBox2.vue'
 import CaseQualityBox from './components/CaseQualityBox2.vue'
 import DeathText from './components/DeathText.vue'
 import DeathText from './components/DeathText.vue'
 import CreateControlResultDialogVue from './components/CreateControlResultDialog.vue'
 import CreateControlResultDialogVue from './components/CreateControlResultDialog.vue'
-import { getBlMenuList, getCaseQuality, getCasePlatform, getAllCase, getLong, getTemporary, getPacsData, getBcData, getHomeData, getSurgeryData } from '@/api/qc'
+import { getBlMenuList, getCaseQuality, getCasePlatform, getAllCase, getLong, getTemporary, getPacsData, getBcData, getHomeData, getSurgeryData, getBlInfo } from '@/api/qc'
 
 
 export default {
 export default {
   components: {
   components: {
@@ -176,6 +178,7 @@ export default {
       valData: '',
       valData: '',
       ifFile: false,
       ifFile: false,
       treeList: [],
       treeList: [],
+      is_active_blbh: 0,
       is_active: 0,
       is_active: 0,
       parentType: 0,
       parentType: 0,
       name_title: '',
       name_title: '',
@@ -278,7 +281,7 @@ export default {
     },
     },
     // 鼠标右击事件
     // 鼠标右击事件
     handleMouseupHandle() {
     handleMouseupHandle() {
-      this.dialogData.blbh = this.is_active
+      this.dialogData.blbh = this.is_active_blbh
       this.dialogData.text = window.getSelection().toString()
       this.dialogData.text = window.getSelection().toString()
       this.dialogData.bSwitch = true
       this.dialogData.bSwitch = true
     },
     },
@@ -323,6 +326,7 @@ export default {
       }
       }
       getHomeData(params).then(res => {
       getHomeData(params).then(res => {
         this.mainHomeData = res.p
         this.mainHomeData = res.p
+        this.is_active_blbh = this.mainHomeData.MED_REC_ID
       })
       })
     },
     },
 
 
@@ -334,38 +338,55 @@ export default {
       getBlMenuList(pramse).then(res => {
       getBlMenuList(pramse).then(res => {
         const { p } = res
         const { p } = res
         that.treeList = p
         that.treeList = p
+        // 初始化blbh
+        that.is_active_blbh = p[0].blbh
       })
       })
     },
     },
     clickTree(b, n, item) {
     clickTree(b, n, item) {
+      if (item) {
+        if (item.blbh) {
+          this.is_active_blbh = item.blbh
+        } else {
+          this.is_active_blbh = event.target.id
+        }
+      } else {
+        this.is_active_blbh = this.mainHomeData.MED_REC_ID
+      }
+      console.log(this.is_active_blbh, 'this.is_active_blbh')
       this.titleName = n
       this.titleName = n
       this.parentType = b
       this.parentType = b
       const that = this
       const that = this
       // 判断点击的
       // 判断点击的
       if (event.target.outerText == '长期医嘱' || event.target.outerText == '临时医嘱') {
       if (event.target.outerText == '长期医嘱' || event.target.outerText == '临时医嘱') {
         that.is_active = event.target.outerText
         that.is_active = event.target.outerText
-      } else if (b == 2000002) {
-        that.is_active = event.target.id
-      } else if (b == 294) {
-        that.is_active = event.target.id
-      } else if (b == 303) {
+      } else if ([329, 288, 34, 87, 303, 294, 2000002].includes(b)) {
         that.is_active = event.target.id
         that.is_active = event.target.id
       } else {
       } else {
         that.is_active = b
         that.is_active = b
       }
       }
       that.name_title = n
       that.name_title = n
       if (b != 0 && b != 292 && b != 1) {
       if (b != 0 && b != 292 && b != 1) {
-        const params = {
-          MED_REC_ID: that.valData,
-          bllb: b
-        }
-        if (this.$route.query.status) {
-          params.is_tm = 1
+        if ([329, 288, 34, 87].includes(b)) {
+          // 授权同意类, 医患沟通类, 死亡记录类, 医疗常用表格
+          getBlInfo({blbh: this.is_active_blbh}).then(res => {
+            that.text = [res.p]
+            that.dataObj = [res.p]
+            that.reload()
+          })
+        } else {
+          const params = {
+            MED_REC_ID: that.valData,
+            bllb: b
+          }
+          if (this.$route.query.status) {
+            params.is_tm = 1
+          }
+          getAllCase(params).then(res => {
+            that.text = res.p
+            that.dataObj = res.p
+            that.reload()
+          })
         }
         }
-        getAllCase(params).then(res => {
-          that.text = res.p
-          that.dataObj = res.p
-          that.reload()
-        })
       } else if (b == 292) {
       } else if (b == 292) {
         // 获取详情
         // 获取详情
         const params = {
         const params = {