Procházet zdrojové kódy

门诊应有病历

yuwandanmian před 1 rokem
rodič
revize
4db1de0220

+ 10 - 0
src/api/excel.js

@@ -40,6 +40,16 @@ export function outHospitalExport(data) {
   })
 }
 
+// 门诊病历导出
+export function outHospitalShouldExport(data) {
+  return request_blob({
+    url: `/api/omr_zk/get_should_be_bl_export`,
+    method: 'post',
+    responseType: 'blob',
+    data
+  })
+}
+
 // 病按首页导出
 export function medicalRecordExport(data) {
   return request_blob({

+ 7 - 0
src/router/index.js

@@ -227,6 +227,13 @@ export const constantRoutes = [
         meta: { title: '门诊病历', keepAlive: true },
         hidden: true,
       },
+      {
+        path: '/outpatientMedicalShouldDefectNumber',
+        name: 'OutpatientMedicalShouldDefectNumber',
+        component: () => import('@/views/outpatient/control/shouldDefectNumber'),
+        meta: { title: '门诊应有病历', keepAlive: true },
+        hidden: true,
+      },
       {
         path: '/outpatientMedicalRecordDetail',
         name: 'OutpatientMedicalRecordDetail',

+ 50 - 102
src/views/outpatient/control/index.vue

@@ -40,19 +40,27 @@
     </div>
     <div class="cardBox">
       <Title :title="'质量分析'" />
-      <div class="contentBox">
-        <div class="left">
-          <div class="l">
-            <div class="i" @click="toPage(0)">
-              <div class="ba">病历数量</div>
-              <div class="num cpoin">{{ countsData.omr_total }}</div>
+      <div>
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <div class="item-card one" @click="toPage2">
+              <span class="name">门(急)诊应有病历数量</span>
+              <span class="num">{{ countsData.should_be_total || 0 }}</span>
             </div>
-            <div class="i" @click="toPage(1)" style="background: #38a1f1">
-              <div class="ba">缺陷病历</div>
-              <div class="num">{{ countsData.omr_defect_total }}</div>
+          </el-col>
+          <el-col :span="8">
+            <div class="item-card two" @click="toPage(0)">
+              <span class="name">门(急)诊病历数量</span>
+              <span class="num">{{ countsData.omr_total || 0 }}</span>
             </div>
-          </div>
-        </div>
+          </el-col>
+          <el-col :span="8">
+            <div class="item-card three" @click="toPage(1)">
+              <span class="name">缺陷门(急)诊病历数量</span>
+              <span class="num">{{ countsData.omr_defect_total || 0 }}</span>
+            </div>
+          </el-col>
+        </el-row>
       </div>
     </div>
     <!-- 科室排名 -->
@@ -132,6 +140,9 @@ export default {
       // type = 0 查询所有门诊数据
       this.$router.push({ path: '/outpatientMedicalRecordDefectNumber', query: { is_error: type }})
     },
+    toPage2() {
+      this.$router.push({ path: '/outpatientMedicalShouldDefectNumber' })
+    },
     getCaseList() {
       let pramse = {
         start_time: this.formData.startTime,
@@ -318,6 +329,34 @@ export default {
 </script>
   
   <style lang="scss" scoped>
+  .cardBox {
+    .item-card {
+      height: 90px;
+      line-height: 50px;
+      border-radius: 6px;
+      padding: 20px;
+      display: flex;
+      justify-content: space-between;
+      font-weight: 600;
+      color: #fff;
+      cursor: pointer;
+      .name {
+        font-size: 16px;
+      }
+      .num {
+        font-size: 20px;
+      }
+      &.one {
+        background: #38A1F1;
+      }
+      &.two {
+        background: #30b48e;
+      }
+      &.three {
+        background: #E6A23C;
+      }
+    }
+  }
 .pages {
   padding: 0 18px;
   background: #f4f4f4;
@@ -375,97 +414,6 @@ export default {
     background: #fff;
     padding: 25px 15px;
     border-radius: 5px;
-    .contentBox {
-      display: flex;
-      .left {
-        display: flex;
-        flex: 1;
-        .l {
-          display: flex;
-          flex: 1;
-          flex-wrap: wrap;
-          .i {
-            width: calc(50% - 20px);
-            margin-right: 20px;
-            height: 86px;
-            background: #30b48e;
-            border-radius: 5px;
-            position: relative;
-            overflow: hidden;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            text-align: center;
-            .ba {
-              flex: 1;
-              font-size: 16px;
-              font-weight: 400;
-              color: #fff;
-            }
-            .num {
-              font-size: 24px;
-              font-weight: bold;
-              color: #fff;
-              flex: 1;
-              margin-left: 20px;
-            }
-            .icon {
-              width: 50px;
-              position: absolute;
-              top: 18px;
-              right: 25px;
-            }
-          }
-        }
-        .r {
-          margin: 0 9% 0 0;
-          .i {
-            width: 195px;
-            height: 56px;
-            background: #eaf4ff;
-            border-radius: 4px;
-            margin: 0 0 9px 0;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-
-            .icon {
-              width: 22px;
-              margin: 6px 0 0 27px;
-            }
-            .t {
-              font-size: 18px;
-              font-weight: 400;
-              color: #333333;
-              text-align: left;
-              margin-left: 10px;
-            }
-            .rt {
-              margin-left: 10px;
-              font-weight: bold;
-              color: #38a1f2;
-              font-size: 18px;
-              text-align: left;
-            }
-          }
-
-          .i:nth-child(1) {
-            background: #93d2f3;
-          }
-
-          .i:nth-child(2) {
-            background: #f4ce98;
-          }
-
-          .i:nth-child(3) {
-            background: #de868f;
-          }
-        }
-      }
-      .right {
-        width: 521px;
-      }
-    }
   }
   .cpoin {
     cursor: pointer;

+ 384 - 0
src/views/outpatient/control/shouldDefectNumber.vue

@@ -0,0 +1,384 @@
+<template>
+  <div class="dashboard-container">
+    <div class="tableBox">
+      <div style="overflow: hidden; margin-bottom: 16px;">
+        <el-button @click="toBack" style="float: right;">返回</el-button>
+      </div>
+      <el-form :inline="true" :model="formData" class="demo-form-inline">
+        <el-form-item label="">
+          <el-date-picker v-model="formData.startTime" class="selects" type="date" format="yyyy年MM月dd日" value-format="yyyyMMdd" placeholder="就诊时间-开始" style="width: 180px;"></el-date-picker>
+        </el-form-item>
+        <el-form-item label="">
+          <el-date-picker
+            v-model="formData.endTime"
+            type="date"
+            class="selects"
+            format="yyyy年MM月dd日"
+            value-format="yyyyMMdd"
+            placeholder="就诊时间-结束"
+            style="width: 180px;"
+          ></el-date-picker>
+        </el-form-item>
+        <el-form-item label="">
+          <el-select v-model="formData.dep_id" class="selects" filterable clearable placeholder="科室" style="width: 180px;">
+            <el-option v-for="(item, index) in departmentList" :label="item.name" :value="item.id" :key="index"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="">
+          <el-input v-model="formData.sfzh" placeholder="身份证号" style="width: 180px;"></el-input>
+        </el-form-item>
+        <el-form-item label="">
+          <el-input v-model="formData.mzh" placeholder="门诊号" style="width: 180px;"></el-input>
+        </el-form-item>
+        <el-form-item label="">
+          <el-select v-model="formData.doctor_id" class="selects" filterable clearable placeholder="医生签名" style="width: 180px;">
+            <el-option v-for="(item, index) in doctors" :label="item.name" :value="item.id" :key="index"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button class="sc" @click="funQuery">查询</el-button>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" plain @click="onReset">重置条件</el-button>
+        </el-form-item>
+      </el-form>
+      <div>
+        <el-button @click="onExport" type="primary" plain style="float: right; margin-bottom: 16px;">导出Excel</el-button>
+        <el-table :data="tableData" style="width: 100%">
+          <el-table-column type="index" label="序号"></el-table-column>
+          <el-table-column prop="jzsj" label="就诊时间"></el-table-column>
+          <el-table-column prop="" label="门诊号">
+            <template slot-scope="scope">
+              <span v-if="scope.row.BLBH && scope.row.BLBH > 1000000000">{{ scope.row.mzh }}</span>
+              <span v-else class="blue" @click="funGoto(scope.row.BLBH)">
+                {{ scope.row.mzh }}
+              </span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="xm" label="患者姓名"></el-table-column>
+          <el-table-column prop="dep_name" label="科室"></el-table-column>
+          <el-table-column prop="xb" label="性别"></el-table-column>
+          <el-table-column prop="nl" label="年龄"></el-table-column>
+          <el-table-column prop="cbzd" label="初步诊断"></el-table-column>
+          <el-table-column prop="SFZH" label="身份证号"></el-table-column>
+          <el-table-column prop="SXYS_NAME" label="医生签名"></el-table-column>
+        </el-table>
+      </div>
+      <!-- 分页控制 -->
+      <mPagination v-if="tableData && tableData.length !== 0" layout="sizes, prev, pager, next, slot" :data="paginationData" @pageChangeEvent="pageHasChanged" @sizeChange="handleSizeChange"></mPagination>
+    </div>
+  </div>
+</template>
+  
+  <script>
+import Title from '@/components/Title';
+import { mapGetters } from 'vuex';
+import mPagination from '@/components/m-pagination';
+import { outHospitalShouldExport } from '@/api/excel'
+
+export default {
+  name: 'Dashboard',
+  components: {
+    Title,
+    mPagination,
+  },
+  computed: {
+    ...mapGetters(['name']),
+  },
+  data() {
+    return {
+      formData: {
+        dep_id: '',
+        startTime:'',
+        endTime:'',
+        sfzh: '',
+        doctor_id: '',
+        mzh: ''
+      },
+      rule_id: '',
+      tableData: [],
+      // 分页数据
+      paginationData: {
+        total: 0,
+        currentPage: 1,
+        pageSize: 10,
+      },
+      departmentList: [],
+      doctors: []
+    };
+  },
+  mounted() {
+    this.rule_id = this.$route.query.rule_id
+    this.formData.startTime = this.storageGet('start_time');
+    this.formData.endTime = this.storageGet('end_time');
+    this.selectInfo();
+    this.funQuery();
+  },
+  watch: {
+    $route(to, from) {
+      if (to.path === '/outpatientMedicalRecordDefectNumber' && from.path === '/outpatientControl') {
+        this.formData = {
+          dep_id: '',
+          startTime:'',
+          endTime:'',
+          sfzh: '',
+          doctor_id: '',
+          mzh: ''
+        }
+        this.rule_id = this.$route.query.rule_id
+        this.formData.startTime = this.storageGet('start_time');
+        this.formData.endTime = this.storageGet('end_time');
+        this.paginationData.currentPage = 1
+        this.paginationData.pageSize = 10
+        this.funQuery();
+      }
+    }
+  },
+  methods: {
+    // 导出
+    onExport() {
+      const { dep_id, startTime, endTime, sfzh, doctor_id, mzh } = this.formData
+        const params = {
+          dep_id,
+          start_time: startTime,
+          end_time: endTime,
+          sfzh,
+          doctor_id,
+          rule_id: this.rule_id,
+          mzh
+        }
+        outHospitalShouldExport(params).then(res => {
+          const content = res.data // 后台返回二进制数据
+          const blob = new Blob([content])
+          const fileName = `门诊应有病例.csv`
+          if ('download' in document.createElement('a')) { // 非IE下载
+            const elink = document.createElement('a')
+            elink.download = fileName
+            elink.style.display = 'none'
+            elink.href = URL.createObjectURL(blob)
+            document.body.appendChild(elink)
+            elink.click()
+            URL.revokeObjectURL(elink.href) // 释放URL 对象
+            document.body.removeChild(elink)
+          } else { // IE10+下载
+            navigator.msSaveBlob(blob, fileName)
+          }
+        })
+    },
+    // 重置
+    onReset() {
+      this.formData = {
+        dep_id: '',
+        startTime:'',
+        endTime:'',
+        sfzh: '',
+        doctor_id: '',
+        mzh: ''
+      }
+      this.funQuery();
+    },
+    // 返回
+    toBack() {
+      this.$router.history.go(-1)
+    },
+    // 跳转详情
+    funGoto(blbh) {
+      this.$router.push({ path: '/outpatientMedicalRecordDetail', query: { blbh } })
+    },
+    // 获取部门和医生select
+    selectInfo() {
+      this.$axios.post('/omr_zk/department_list').then(res => {
+        this.departmentList = res.data;
+      });
+      this.$axios.post('/omr_zk/docker_list').then(res => {
+        this.doctors = res.data;
+      });
+    },
+    pageHasChanged() {
+      this.funQuery();
+    },
+    handleSizeChange(size) {
+      this.paginationData.currentPage = 1
+      this.paginationData.pageSize = size
+      this.funQuery();
+    },
+    funQuery() {
+      //查询
+      let pramse = {
+        start_time: this.formData.startTime || '',
+        end_time: this.formData.endTime || '',
+        page: this.paginationData.currentPage,
+        page_size: this.paginationData.pageSize,
+        is_error: this.$route.query.is_error
+      };
+      if (this.rule_id) {
+        pramse.rule_id = this.rule_id;
+      }
+      if (this.formData.dep_id) {
+        pramse.dep_id = this.formData.dep_id
+      }
+      if (this.formData.sfzh) {
+        pramse.sfzh = this.formData.sfzh
+      }
+      if (this.formData.doctor_id) {
+        pramse.doctor_id = this.formData.doctor_id
+      }
+      if (this.formData.mzh) {
+        pramse.mzh = this.formData.mzh
+      }
+
+      this.$axios.post('/omr_zk/get_should_be_bl_list', pramse).then(res => {
+        this.paginationData.total = res.data.count;
+        this.tableData = res.data.list;
+      });
+    }
+  },
+};
+</script>
+  <style scoped>
+::v-deep.el-pagination.is-background .btn-next,
+::v-deep.el-pagination.is-background .btn-prev,
+::v-deep.el-pagination.is-background .el-pager li {
+  margin: 0 5px;
+  background-color: #fff;
+  color: #606266;
+  min-width: 30px;
+  border-radius: 2px;
+  border: 1px solid #dfe3f3;
+  line-height: 27px;
+}
+::v-deep.el-pagination.is-background .el-pager li:not(.disabled).active {
+  background: #7e8bab;
+}
+::v-deep.el-table .el-table__row td {
+  color: #7e8bab;
+  border-bottom: 1px solid #f4f4f4;
+}
+::v-deep.el-table .el-table__header tr th:first-child {
+  border-radius: 10px 0px 0px 10px;
+}
+::v-deep.el-table .el-table__header tr th:last-child {
+  border-radius: 0px 10px 10px 0px;
+}
+::v-deep.el-table .el-table__header tr th {
+  background: #f1f6ff;
+  color: #13171e;
+  border-bottom: 0px;
+}
+</style>
+  <style lang="scss" scoped>
+.tableBox {
+  background: #fff;
+  padding: 19px;
+  border-radius: 5px;
+  font-size: 12px;
+}
+.block {
+  background: #fff;
+  border-radius: 5px;
+  margin-bottom: 16px;
+  padding: 0;
+  margin-bottom: 20px;
+  .fBtn {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    .btn1 {
+      background: #185da6;
+      color: #fff;
+    }
+    .btn2 {
+      color: #185da6;
+      background: #d5e4ff;
+    }
+  }
+  .bnh {
+    margin-bottom: 20px;
+  }
+  .barBtn {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+  .selects {
+    width: 100%;
+  }
+  .rowsa {
+    margin-bottom: 20px;
+  }
+}
+.tableBox {
+  background: #fff;
+  padding: 19px;
+  border-radius: 5px;
+}
+.dashboard {
+  &-container {
+    margin: 30px;
+  }
+  &-text {
+    font-size: 30px;
+    line-height: 46px;
+  }
+}
+.pind {
+  padding: 0 20px;
+}
+.pind10 {
+  padding: 0 5px;
+}
+.width300 {
+  width: 295px;
+}
+.width500 {
+  width: 645px;
+}
+.width90 {
+  width: 90px;
+}
+.blue {
+  color: #185da6;
+  cursor: pointer;
+}
+.block {
+  background: #fff;
+  align-items: center;
+  border-radius: 5px;
+  height: 75px;
+  margin-bottom: 16px;
+  margin-bottom: 20px;
+  margin-bottom: 20px;
+  display: flex;
+  box-sizing: border-box;
+  .blockCon {
+    display: flex;
+    align-items: center;
+    .selectDns {
+      span {
+        margin-right: 5px;
+      }
+    }
+    .demonstration {
+      margin-left: 10px;
+    }
+    .pickers {
+      margin-left: 5px;
+    }
+    .lsxd {
+      margin-left: 20px;
+    }
+    .ins {
+      width: 150px;
+      margin: 0 10px;
+    }
+  }
+  .sc {
+    background: #185da6;
+    color: #fff;
+  }
+}
+.kong {
+  padding: 0 10px;
+}
+</style>
+