Browse Source

点击跳转

yuwandanmian 1 year ago
parent
commit
953fc7e472
1 changed files with 28 additions and 34 deletions
  1. 28 34
      src/views/allcase/caseControl.vue

+ 28 - 34
src/views/allcase/caseControl.vue

@@ -2,42 +2,24 @@
   <div ref="box" class="box">
     <div class="card-box">
       <el-row :gutter="20" style="margin-bottom: 10px;">
-        <el-col :span="12">
-          <div class="title">病历等级:<span class="error">{{ scoreLevel }}</span></div>
-        </el-col>
-        <el-col :span="12">
-          <div class="title">病历问题:<span class="error">{{ data.total }}</span></div>
-        </el-col>
-      </el-row>
-      <el-row :gutter="20">
-        <el-col :span="12">
-          <div class="title2">运行病历:<span>70分</span></div>
-        </el-col>
-        <el-col :span="12">
-          <div class="title2">{{ data.summary[0].category }}:<span>({{ data.summary[0].nums }})</span></div>
-        </el-col>
-      </el-row>
-      <el-row :gutter="20">
-        <el-col :span="12">
-          <div class="title2">终末病历:<span>{{ data.score }}分</span></div>
+        <el-col :span="12" :offset="12">
+          <div class="title2">运行病历:<span>{{ data.run_score }}分</span></div>
         </el-col>
         <el-col :span="12">
-          <div class="title2">{{ data.summary[1].category }}:<span>({{ data.summary[1].nums }})</span></div>
+          <div class="title">病历等级:<span class="error">{{ scoreLevel }}</span></div>
         </el-col>
-      </el-row>
-      <el-row :gutter="20">
         <el-col :span="12" :offset="12">
-          <div class="title2">{{ data.summary[2].category }}:<span>({{ data.summary[2].nums }})</span></div>
+          <div class="title2">终末病历:<span>{{ data.score }}分</span></div>
         </el-col>
       </el-row>
-      <el-row :gutter="20">
-        <el-col :span="12" :offset="12">
-          <div class="title2">{{ data.summary[3].category }}:<span>({{ data.summary[3].nums }})</span></div>
+      <el-row :gutter="20" style="margin-bottom: 16px;">
+        <el-col :span="12">
+          <div class="title">病历问题:<span class="error">{{ data.total }}</span></div>
         </el-col>
       </el-row>
       <el-row :gutter="20">
-        <el-col :span="12" :offset="12">
-          <div class="title2">{{ data.summary[4].category }}:<span>({{ data.summary[4].nums }})</span></div>
+        <el-col :span="12" v-for="(item, index) of data.summary" :key="index">
+          <div class="title2" @click="onScroll(index)">{{ item.category }}:<span>({{ item.nums }})</span></div>
         </el-col>
       </el-row>
     </div>   
@@ -52,10 +34,12 @@
             <el-card v-for="(item, index) of props.row.children" :key="index" class="box-card" shadow="hover">
               <el-image
                 class="typeImg"
-                :src="require('../../assets/images/jiqiren.png')"
+                v-if="item.is_ai"
+                :src="require('../../assets/images/kefu.png')"
                 fit="contain">
               </el-image>
               <el-image
+                v-else
                 class="typeImg"
                 :src="require('../../assets/images/jiqiren.png')"
                 fit="contain">
@@ -84,7 +68,10 @@
         </el-table-column>
         <el-table-column
           label=""
-          prop="category">
+          prop="">
+          <template slot-scope="scope">
+            <div :class="`category${scope.$index}`">{{ scope.row.category }}</div>
+          </template>
         </el-table-column>
       </el-table>
     </el-scrollbar>
@@ -97,6 +84,7 @@
       return {
         "data": {
           "score": 31.5,
+          run_score: 80,
           "data": {
             "病程类": [{
               "id": 15,
@@ -469,7 +457,7 @@
             "nums": 3
           }]
         },
-        scrollHeight: 'calc(100vh - 217px)'
+        scrollHeight: 'calc(100vh - 286px)'
       }
     },
     computed: {
@@ -506,9 +494,15 @@
     mounted() {
       this.$nextTick(() => {
         const height = this.$refs.box.offsetHeight
-        this.scrollHeight =  (height - 217) + 'px'
-        console.log(this.scrollHeight, '123123123')
+        this.scrollHeight =  (height - 286) + 'px'
       })
+    },
+    methods: {
+      onScroll(index) {
+        const el = this.$el.querySelector(`.category${index}`);
+        const node = el.parentNode.parentNode.parentNode
+        this.$refs["scrollRef"].wrap.scrollTop = node.offsetTop;
+      }
     }
   }
 </script>
@@ -527,7 +521,7 @@
     // height: 175px;
     background: #FFFFFF;
     border: 1px solid #E2E2E2;
-    padding: 30px 36px;
+    padding: 20px 36px;
     box-sizing: border-box;
     margin-bottom: 14px;
     .title {
@@ -536,7 +530,6 @@
       font-weight: bold;
       color: #333333;
       line-height: 22px;
-      text-indent: 6px;
       span {
         margin-left: 7px;
       }
@@ -547,6 +540,7 @@
       font-weight: bold;
       color: #333333;
       line-height: 26px;
+      cursor: pointer;
       span {
         margin-left: 7px;
       }