Ver Fonte

病例自动生成功能、终末质控院区排名传参修改

liyanyan há 3 semanas atrás
pai
commit
21d94e052e

+ 1 - 0
.gitignore

@@ -14,3 +14,4 @@ tests/**/coverage/
 *.njsproj
 *.sln
 .DS_Store
+dist.zip

BIN
src/assets/images/AIHelper.png


+ 30 - 4
src/layout/components/AppMain.vue

@@ -1,9 +1,11 @@
 <template>
   <section class="app-main">
-    <div v-if="!$route.meta.nocrumb">
+    <div v-if="!$route.meta.nocrumb" style="height: 42.5px;">
       <breadcrumb :keep-alive-component-instance="keepAliveComponentInstance" :t_name="t_name" class="breadcrumb-container" />
     </div>
-    <div ref="keepAliveContainer">
+    <div ref="keepAliveContainer" class="keepAliveContainer" :style="{
+      height: !$route.meta.nocrumb ? `calc(100% - 42.5px)` : '100%'
+      }">
       <keep-alive>
         <router-view v-if="$route.meta.keepAlive && isRouterAlive" :key="$route.fullPath"/>
       </keep-alive>
@@ -91,14 +93,38 @@ export default {
 <style scoped>
 .app-main {
   /*50 = navbar  */
-  min-height: calc(100vh - 60px);
+  /* min-height: calc(100vh - 60px); */
+  flex: 1;
+  display: flex;
+  flex-direction: column;
   width: 100%;
+  /* width: 100%; */
   position: relative;
   /* overflow: hidden; */
   background: #f4f4f4;
+  height: 100%;
 }
 .fixed-header + .app-main {
-  padding-top: 50px;
+  margin-top: 50px;
+  height: calc(100% - 50px);
+}
+.keepAliveContainer {
+    flex: 1;
+    display: flex;
+    width: 100%;
+    height: 100%;
+}
+
+.keepAliveContainer > div {
+  /* display: flex; */
+  /* flex: 1; */
+  /* flex-direction: column; */
+  /* overflow: auto; */
+  width: calc(100% - 32px);
+  height: calc(100% - 32px);
+  padding: 0px !important;
+  overflow: auto;
+  margin: 16px !important
 }
 </style>
 

+ 13 - 2
src/layout/index.vue

@@ -1,8 +1,9 @@
 <template>
   <div :class="classObj" class="app-wrapper">
     <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
-    <sidebar class="sidebar-container" />
-    <div class="main-container">
+    <sidebar class="sidebar-container" id="sidebarContainer"/>
+    <!-- <sidebar class="sidebar-container" ref="sidebarContainer"/> -->
+    <div class="main-container" id="mainContainer">
       <div :class="{ 'fixed-header': fixedHeader }">
         <navbar />
       </div>
@@ -42,11 +43,20 @@ export default {
       };
     },
   },
+  data() {
+    return {
+      resizeObserver: null
+    }
+  },
   methods: {
     handleClickOutside() {
       this.$store.dispatch('app/closeSideBar', { withoutAnimation: false });
     },
   },
+  mounted() {
+    // document.getElementById('mainContainer').style.width = `calc(100% - (${document.getElementById('sidebarContainer')}px))`
+    document.getElementById('mainContainer').style.width = `${document.getElementsByClassName('app-wrapper')[0].offsetWidth - document.getElementsByClassName('sidebar-container')[0].offsetWidth}px`
+  }
 };
 </script>
 
@@ -60,6 +70,7 @@ export default {
   height: 100%;
   width: 100%;
   overflow: scroll;
+  display: flex;
   &.mobile.openSidebar {
     position: fixed;
     top: 0;

+ 17 - 0
src/styles/index.scss

@@ -107,3 +107,20 @@ div:focus {
     width: 100%;
   }
 }
+
+// #MyDiv, .dashboard-container, .box, .bg-box, .conter-dev, .app-container {
+//   display: flex;
+//   flex: 1;
+//   // width: calc(100% - 32px);
+//   // height: calc(100% - 32px);
+//   flex-direction: column;
+//   overflow: auto;
+// }
+
+
+
+// .pages {
+//   flex: 1;
+//   width: 100%;
+//   box-sizing: border-box;
+// }

+ 5 - 1
src/styles/sidebar.scss

@@ -1,10 +1,14 @@
 #app {
   .main-container {
     background: #f4f4f4;
-    min-height: 100%;
+    // min-height: 100%;
     transition: margin-left .28s;
     margin-left: $sideBarWidth;
     position: relative;
+    // overflow: scroll;
+    flex: 1;
+    display: flex;
+    width: 100%;
   }
 
   .sidebar-container {

+ 5 - 1
src/views/allcase/caseControl.vue

@@ -40,6 +40,10 @@ import CaseQualityBox from './components/CaseQualityBox2.vue';
 
 <style lang="scss" scoped>
   .app-main{
-    height: 100% !important;
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    width: 100%;
+    // height: 100% !important;
   }
 </style>

+ 2 - 2
src/views/allcase/caseNumber.vue

@@ -148,9 +148,9 @@ export default {
     return {
       formData: { // 终末病历质控-问题数量
         is_qx: query.is_qx,
-        YQ_CODE: query.YQ_CODE? query.YQ_CODE.split(',') : [],
+        YQ_CODE: query.YQ_CODE? Array.isArray(query.YQ_CODE) ? (query.YQ_CODE)[1].split(',') : query.YQ_CODE.split(',') : [],
         KS_CODE: query.KS_CODE? Array.isArray(query.KS_CODE) ? (query.KS_CODE)[1].split(',') : query.KS_CODE.split(',') : [],
-        BQ_CODE: query.BQ_CODE? query.BQ_CODE.split(',') : [],
+        BQ_CODE: query.BQ_CODE? Array.isArray(query.BQ_CODE) ? (query.BQ_CODE)[1].split(',') : query.BQ_CODE.split(',') : [],
         AAA28: query.AAA28 || '',
         start_time: query.startTime? query.startTime : this.storageGet('start_time'),
         end_time: query.endTime ? query.endTime : this.storageGet('end_time'),

+ 37 - 10
src/views/allcase/caseViews.vue

@@ -1,15 +1,24 @@
 <template>
   <div id="MyDiv" style="margin: 16px" :class="{ nocopy: $route.query.status }">
     <div class="header zbjg-box" style="background: #fff;margin: 10px 0;padding: 6px 20px;">
-      <el-button type="primary" >AI模型</el-button>
-      <el-button type="primary" @click="clickzbjg">指标结果</el-button>
+      <div>
+        <el-button type="primary" style="background-color: #328240;" @click="onControll">重新质控</el-button>
+      </div>
+      <div>
+        <el-button @click="clickzbjg">指标结果</el-button>
+        <el-button type="primary" @click="isControl = !isControl">智审结果</el-button>
+        <el-button type="text" style="color: #606266;" @click="openAIModel">
+          <img src="../../assets//images//AIHelper.png" style="width:30px;display: inline-block;vertical-align: middle;"/>
+          AI模型
+        </el-button>
+      </div>
     </div>
     <div class="cont_container">
       <!-- 左侧点击列表部分 -->
       <div class="cont-left-tiem">
-        <div style="margin: 20px">
+        <!-- <div style="margin: 20px">
           <el-button type="primary" @click="onControll">执行质控</el-button>
-        </div>
+        </div> -->
         <ul class="el-menu-vertical-demo el-menu">
           <!-- 预警信息不展示病案首页 -->
           <li v-if="$route.query.from !== 'forewarning'" class="li-left-item" :class="is_active == 0 ? 'is-active' : ''" @click="clickTree(0, '病案首页')">
@@ -120,7 +129,7 @@
       <!-- status 不存在 意味着不脱敏、医院自助查询 -->
       <template v-if="!$route.query.status && isControl">
         <!-- 病案首页质控 -->
-        <CaseQualityBox :MED_REC_ID="valData" v-if="results" :data="results" :type="type_v" :width="340" :height="820" @hightRight="hightRight" />
+        <CaseQualityBox :mainHomeData="mainHomeData" :MED_REC_ID="valData" v-if="results" :data="results" :type="type_v" :width="340" :height="820" @hightRight="hightRight" />
       </template>
     </div>
 
@@ -204,6 +213,7 @@ import OutHospitalRecord from './components/OutHospitalRecord.vue';
 import CaseQualityBox from './components/CaseQualityBox2.vue';
 import DeathText from './components/DeathText.vue';
 import VueDragResize from 'vue-drag-resize';
+import Axios from 'axios'
 
 export default {
   components: {
@@ -364,6 +374,22 @@ export default {
   },
   activated() {},
   methods: {
+    openAIModel() {
+      if(!this.valData) {
+        this.$message.error('住院号不存在!');
+        return;
+      }
+      const { protocol, hostname, port} = window.location
+      Axios.post(`http://localhost:3003/iframe`, {
+        path: `${protocol}//${hostname}:${port}/#/whitelist-caseControl?id=${this.valData}`
+      }).then(function (response) {
+        // 处理成功的情况
+        console.log(response.data);
+      }).catch(function (error) {
+        // 处理错误的情况
+        console.log(error);
+      })
+    },
     getInitData() {
       this.valData = this.storageGet('getData');
       this.ruleId = this.storageGet('getDataRule');
@@ -702,24 +728,25 @@ export default {
   margin: 10px 20px;
   text-align: right;
   display: flex;
-  justify-content: flex-end;
+  justify-content: space-between;
 }
 .cont_container {
+  height: calc(100% - 68px - 20px);
   display: flex;
   justify-content: center;
 }
 .cont-left-tiem {
   width: 250px;
-  min-height: 650px;
-  height: calc(100vh - 130px);
+  // min-height: 650px;
+  height: 100%;
   overflow-y: scroll;
   background: #ffffff;
 }
 .cont-left-file {
   flex: 1;
-  min-height: 650px;
+  // min-height: 650px;
   margin: 0 5px;
-  height: calc(100vh - 130px);
+  height: 100%;
   overflow-y: scroll;
   background: #ffffff;
   border: 1px solid #e2e2e2;

+ 69 - 18
src/views/allcase/components/CaseQualityBox2.vue

@@ -1,14 +1,25 @@
 <template>
 
-<div>
-  <el-tabs v-model="tabsActive">
+<div class="CaseQualityBox2">
+  <el-row style="padding: 10px;line-height: 20px;" type="flex" justify="space-between">
+    <span>病案号:{{mainHomeData.AAA28}}</span>
+    <span>床号:暂无</span>
+    <span>住院次数:{{mainHomeData.AAA29}}</span>
+  </el-row>
+  <el-tabs v-model="tabsActive" style="padding: 0 10px;background-color: #fff;">
     <el-tab-pane v-for="(item, index) in tabsArray" :key="index" :label="item.label" :name="item.name" >
     </el-tab-pane>
   </el-tabs>
 
-  <div v-if="tabsActive == 1" style="height: 100%">
-    <div class="taskNameListAndMessage">
-          <el-menu
+  <div v-if="tabsActive == 1" class="tabContent">
+    <div 
+      class="taskNameListAndMessage"
+      :style="{
+        width: currentTaskName ? '840px' : '340px'
+      }"
+      >
+        <el-menu
+            v-if="showTaskNameMenu"
             :default-active="currentTaskName"
             class="el-menu-vertical-demo"
             :style="{
@@ -65,9 +76,12 @@
             </div> -->
             <div style="width: calc(100%)">
               <textarea class="inputText" v-model="inputMessage" placeholder="请输入您的问题,帮您深度解答"></textarea>
-              <el-row type="flex" justify="end">
+              <el-row type="flex" justify="space-between" align="middle">
                 <!-- <el-icon class="iconfont zj-damuzhi" style="margin-left: 20px;line-height: 35px;"></el-icon>
                 <el-icon class="iconfont zj-zanxia" style="margin-left: 20px;line-height: 35px;"></el-icon> -->
+                <!-- <el-button type="primary" @click="sendMessage()" icon="el-icon-top" circle> -->
+                  <div  @click="showTaskNameMenu = !showTaskNameMenu"><Hamburger/></div>
+                <!-- </el-button> -->
                 <el-button type="primary" @click="sendMessage()" icon="el-icon-top" circle></el-button>
               </el-row>
             </div>
@@ -77,7 +91,7 @@
   </div>
 
   <!--病案首页-->
-  <div v-else-if="tabsActive == 3">
+  <div v-else-if="tabsActive == 3" class="tabContent">
     <div ref="box" class="box22" :style="{width: width ? width + 'px' : '100%'}" :class="{'nocopy': $route.meta.nocopy}">
 
       <div class="score-box" :class="scoreLevel == '甲'? 'scoreLevel_1' : ( scoreLevel == '乙'?'scoreLevel_2': (scoreLevel == '丙'?'scoreLevel_3':'' ) ) ">
@@ -96,7 +110,7 @@
       </div>
 
 
-      <el-scrollbar ref="scrollRef" class="scrollBox" :style="`height: ${scrollHeight};padding-bottom:60px;`">
+      <el-scrollbar ref="scrollRef" class="scrollBox" :style="`height: ${scrollHeight}`">
         <template v-for="(item, index) in tableData">
           <!-- is_appeal: 是否申述 -->
           <div class="list-box box-card" :key="index" v-if="is_show && (!item.is_appeal || (item.is_appeal == 1 && item.appeal_status == 2))">
@@ -162,7 +176,11 @@
 </template>
 
 <script>
+import Hamburger from '@/components/Hamburger';
   export default {
+    components: {
+      Hamburger
+    },
     props: {
       data: {
         type: Object,
@@ -172,6 +190,14 @@
           }
         }
       },
+      mainHomeData: {
+        type: Object,
+        default() {
+          return {
+            data: {}
+          }
+        }
+      },
       type:{
         type: String,
         default() {
@@ -203,16 +229,18 @@
         chatMessages:[],//内容显示
         tabsActive:'3',//tabs选择
         tabsArray:[
+          {'name':'3','label':'质控结果'},
           {'name':'1','label':'病历生成'},
-          {'name':'2','label':'病案首页'},
-          {'name':'3','label':'住院病历'},
-          {'name':'4','label':'编目首页'},
+          // {'name':'2','label':'病案首页'},
+          
+          // {'name':'4','label':'编目首页'},
         ],
         tableData: [],
         is_show: true,
         quality_type: 2,  // 1、首页质控 2、病例质控
         taskNameList: [],
-        currentTaskName: ''
+        currentTaskName: '',
+        showTaskNameMenu: true
       }
     },
     computed: {
@@ -264,7 +292,7 @@
             this.sendMessage(res.data)          
           }
         })
-        
+        window.electronAPI.middle()
       },
       //发送消息
       async sendMessage(params){
@@ -278,6 +306,17 @@
 
           // 清空输入框
           this.inputMessage = '';
+          // this.$axios.post('/predict', {
+          //   query: messages
+          // }).then(res => {
+          //   if(res.code == 200){  
+          //    // 添加模型响应消息到聊天记录
+          //     this.chatMessages.push({
+          //       role: 'assistant',
+          //       content: res.data
+          //     });   
+          //   }
+          // })
 
           //大模型请求
           const modelResponse = await this.simulateModelResponse(messages);
@@ -382,6 +421,12 @@
 </script>
 
 <style lang="scss" scoped>
+.CaseQualityBox2 {
+  height: 100%;
+  .tabContent {
+    height: calc(100% - 94px);
+  }
+}
 ::v-deep.el-submenu {
   &>.el-submenu__title {
     padding-left: 0 !important;
@@ -400,14 +445,15 @@
   .el-menu-vertical-demo {
     // width:340px;
     height: 100%;
-    overflow-y: scroll
+    overflow-y: scroll;
+    width: 230px;
   }
 }
 .messageBox {
-  width: 450px;
+  flex: 1;
   display: flex;
   flex-direction: column;
-  height: calc(100vh - 250px);
+  height: 100%;
   
   .message {
     flex: 1;
@@ -427,6 +473,7 @@
         margin-right: 10px;
         border-radius: 5px;
         padding: 0 10px 0 10px;
+        flex: 1
       }
     }
     .record-message {
@@ -439,6 +486,7 @@
         padding: 0 10px 0 10px;
         border-radius: 5px;
         line-height: 40px;
+        flex: 1
       }
     }
   }
@@ -471,10 +519,13 @@
 
 
 .box22 {
-  padding: 16px;
+  padding: 0 10px;
   background: #FFFFFF;
   border-radius: 5px;
-  height: 100vh;
+  height: 100%;
+  overflow-y: scroll;
+  display: flex;
+  flex-direction: column;
   .score-box{
     width: 100%;
     margin-bottom: 16px;

+ 5 - 2
src/views/allcase/index.vue

@@ -209,10 +209,10 @@
               <el-table-column v-for="(item, index) in rankTableFiled" :index="index" :prop="item.prop"
                 :label="item.label" align="center" show-overflow-tooltip>
                 <template slot-scope="scope">
-                  <span class="link" @click="urlGoto('/caseNumber?', `KS_CODE=${scope.row.code}`)" style="color: #004983;"
+                  <span class="link" @click="urlGoto('/caseNumber?', `${getCurrentRankType()}=${scope.row.code}`)" style="color: #004983;"
                     v-if="item.prop == 'bl_num'">
                     {{ scope.row.bl_num }}</span>
-                  <span v-else-if="item.prop == 'qx_num'" class="link" @click="urlGoto('/caseNumber?', `KS_CODE=${scope.row.code}&is_qx=1`)"
+                  <span v-else-if="item.prop == 'qx_num'" class="link" @click="urlGoto('/caseNumber?', `${getCurrentRankType()}=${scope.row.code}&is_qx=1`)"
                     style="color: red;">{{ scope.row[item.prop] }}</span>
                   <span v-else>{{ scope.row[item.prop] }}</span>
                 </template>
@@ -562,6 +562,9 @@ export default {
     next()
   },
   methods: {
+    getCurrentRankType() {
+      return this.departmentSearch.rank_type == 1 ? 'YQ_CODE' : this.departmentSearch.rank_type == 2 ? 'KS_CODE' : this.departmentSearch.rank_type == 3 ? 'BQ_CODE' : ''
+    },
     //下砖页面跳转
     urlGoto(url,value){
       let urlString = url;