zdl il y a 2 ans
Parent
commit
7b1c8e9ffa
3 fichiers modifiés avec 175 ajouts et 2 suppressions
  1. 1 1
      src/permission.js
  2. 7 1
      src/router/index.js
  3. 167 0
      src/views/allcase/caseControl.vue

+ 1 - 1
src/permission.js

@@ -8,7 +8,7 @@ import getPageTitle from '@/utils/get-page-title';
 
 
 NProgress.configure({ showSpinner: false }); // NProgress Configuration
 NProgress.configure({ showSpinner: false }); // NProgress Configuration
 
 
-const whiteList = ['/login', '/whitelist-search', '/whitelist-caseViews', '/whitelist-chargeDetails', '/whitelist-details']; // no redirect whitelist
+const whiteList = ['/login', '/whitelist-search', '/whitelist-caseViews', '/whitelist-chargeDetails', '/whitelist-details', '/whitelist-caseControl']; // no redirect whitelist
 
 
 router.beforeEach(async (to, from, next) => {
 router.beforeEach(async (to, from, next) => {
   // start progress bar
   // start progress bar

+ 7 - 1
src/router/index.js

@@ -382,6 +382,12 @@ export const constantRoutes = [
         component: () => import('@/views/data/query/details'),
         component: () => import('@/views/data/query/details'),
         hidden: true
         hidden: true
       },
       },
+      {
+        path: '/whitelist-caseControl',
+        name: 'WhitelistCaseControl',
+        component: () => import('@/views/allcase/caseControl'),
+        hidden: true
+      },
     ]
     ]
   }
   }
 ];
 ];
@@ -395,7 +401,7 @@ const createRouter = () =>
 
 
 const router = createRouter();
 const router = createRouter();
 
 
-const whiteList = ['/login','/404', '/whitelist-search', '/whitelist-caseViews', '/whitelist-chargeDetails', '/whitelist-details']; // 添加路由白名单
+const whiteList = ['/login','/404', '/whitelist-search', '/whitelist-caseViews', '/whitelist-chargeDetails', '/whitelist-details', '/whitelist-caseControl']; // 添加路由白名单
 //路由判断
 //路由判断
 router.beforeEach(async (to, from, next) => {
 router.beforeEach(async (to, from, next) => {
   const hasToken = getToken();
   const hasToken = getToken();

+ 167 - 0
src/views/allcase/caseControl.vue

@@ -0,0 +1,167 @@
+<template>
+  <div class="caseQualityBox">
+    <div class="score-box">
+      {{ data.score }}分
+      <span class="level">{{ scoreLevel }}</span>
+    </div>
+    <el-table
+      :data="tableData"
+      default-expand-all
+      style="width: 100%">
+      <el-table-column type="expand">
+        <template slot-scope="props">
+          <el-card v-for="(item, index) of props.row.children" :key="index" class="box-card" shadow="hover">
+            <el-row>
+              <el-col :span="24">
+                <el-descriptions title="" :column="1" direction="vertical">
+                  <el-descriptions-item label="质控项目">
+                    <el-tag>{{ item.error_field }}</el-tag>
+                    <span class="koufen">-{{ item.score }}分</span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="错误描述">{{ item.notice }}</el-descriptions-item>
+                  <el-descriptions-item label="质控依据">
+                    <div v-for="(yItem, yIndex) of item.basis" :key="yIndex" style="margin-bottom: 10px;">
+                      <div v-if="item.rule_id !== 6">
+                        <div v-for="(cItem, cIndex) of yItem" :key="cIndex">{{ cItem }}</div>
+                      </div>
+                      <a v-else href="javascript:;" class="link" @click="toPage(yItem[1])">{{ yItem[0] }}</a>
+                    </div>
+                  </el-descriptions-item>
+              </el-descriptions>
+              </el-col>
+            </el-row>
+          </el-card>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label=""
+        prop="category">
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: {
+      data: {
+        type: Object,
+        default() {
+          return {
+            score: 0,
+            data: {}
+          }
+        }
+      }
+    },
+    computed: {
+      tableData() {
+        let arr = []
+        const keys = Object.keys(this.data.data)
+        for(let i=0; i<keys.length; i++) {
+          let obj = {
+            category: keys[i],
+            children: this.data.data[keys[i]]
+          }
+          arr.push(obj)
+        }
+        return arr
+      },
+      scoreLevel() {
+        /**
+         * 甲>90分
+         * 乙75-90分
+         * 丙<75分
+         * */ 
+        let str
+        const { score } = this.data
+        if (score > 90) {
+          str = '甲'
+        } else if (score < 75) {
+          str = '丙'
+        } else {
+          str = '乙'
+        }
+        return str
+      }
+    },
+    methods: {
+      toPage(blbh) {
+        const { path } = this.$route
+        let routeData = this.$router.resolve({ path, query: { blbh } })
+        window.open(routeData.href, '_blank');
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+.caseQualityBox {
+  width: 340px;
+  height: 820px;
+  overflow-x: hidden;
+  overflow-y: scroll;
+  background: #ffffff;
+  border: 1px solid #e2e2e2;
+  box-sizing: border-box;
+  padding: 20px;
+  ::v-deep .el-descriptions-item__container .el-descriptions-item__content {
+    display: block;
+  }
+  ::v-deep .el-descriptions-item__label:not(.is-bordered-label) {
+    font-weight: 600;
+    display: inline-table;
+  }
+  ::v-deep .el-descriptions-item__content {
+    padding-top: 12px;
+  }
+  .box-card {
+    margin-bottom: 10px;
+  }
+  .score-box {
+    width: 100%;
+    height: 120px;
+    line-height: 120px;
+    font-size: 32px;
+    font-weight: bold;
+    text-align: center;
+    border-radius: 5px;
+    border: 1px solid #dddddd;
+    position: relative;
+    overflow: hidden;
+    &::before {
+      content: "";
+      position: absolute;
+      width: 200px;
+      height: 200px;
+      top: -120px;
+      right: -160px;
+      z-index: 1;
+      background-color: red;
+      transform: rotate(45deg);
+    }
+    .level {
+      position: absolute;
+      top: 5px;
+      right: 10px;
+      z-index: 2;
+      line-height: 30px;
+      color: #ffffff;
+      font-size: 16px;
+    }
+  }
+}
+.koufen {
+  color: red;
+  float: right;
+  line-height: 32px;
+  font-size: 16px;
+  font-weight: bold;
+}
+.link {
+  text-decoration: underline;
+  &:hover {
+    color: #409EFF;
+  }
+}
+</style>