Browse Source

其他统计信息

yuwandanmian 1 year ago
parent
commit
7add0ab1c4
2 changed files with 565 additions and 2 deletions
  1. 13 2
      src/router/index.js
  2. 552 0
      src/views/otherStatisticsData/index.vue

+ 13 - 2
src/router/index.js

@@ -274,13 +274,24 @@ export const constantRoutes = [
           canMultipleOpen: true 
         }
       },
+      {
+        path: '/otherStatisticsData',
+        name: 'OtherStatisticsData',
+        component: () => import('@/views/otherStatisticsData/index'),
+        hidden: true,
+        meta: { 
+          title: '其他统计数据',
+          keepAlive: 1,
+          canMultipleOpen: true 
+        },
+      },,
       {
         path: '/caseIndex',
         name: 'caseIndex',
         component: () => import('@/views/allcase/caseIndex'),
         hidden: true,
         meta: { 
-          title: '病案管理质量控制指标',
+          title: '重点专业质量控制指标',
           keepAlive: 1,
           canMultipleOpen: true 
         },
@@ -291,7 +302,7 @@ export const constantRoutes = [
         component: () => import('@/views/allcase/caseIndexList'),
         hidden: true,
         meta: { 
-          title: '病案管理质量控制指标列表',
+          title: '重点专业质量控制指标列表',
           keepAlive: 1,
           canMultipleOpen: true 
         },

+ 552 - 0
src/views/otherStatisticsData/index.vue

@@ -0,0 +1,552 @@
+<template>
+  <div class="box">
+    <el-row :gutter="16">
+      <!-- 左侧菜单 -->
+      <el-col :span="8">
+        <div class="box_wrapper">
+          <el-input placeholder="输入关键字进行过滤" v-model="filterText"></el-input>
+          <el-tree
+            class="filter-tree"
+            node-key="id"
+            highlight-current
+            :data="menus"
+            :props="defaultProps"
+            :filter-node-method="filterNode"
+            ref="tree"
+            @node-click="handleNodeClick"
+            :current-node-key="ruleId"
+            :default-expanded-keys="[ruleId]"
+          >
+            <span class="custom-tree-node" slot-scope="{ node, data }">
+              <span :class="{ green: greenColorMenus.includes(data.id) }">{{ node.label }}</span>
+            </span>
+          </el-tree>
+        </div>
+      </el-col>
+      <!-- 右侧列表 -->
+      <el-col :span="16">
+        <div class="box_wrapper">
+          <el-form :inline="true" :model="formInline" class="demo-form-inline">
+            <el-form-item label="查询时间">
+              <el-date-picker
+                v-model="formInline.year"
+                :clearable="false"
+                type="year"
+                :picker-options="pickerOptions"
+                format="yyyy年"
+                value-format="yyyy"
+                placeholder="选择年份"
+              ></el-date-picker>
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" @click="onSearch">查询</el-button>
+            </el-form-item>
+          </el-form>
+          <el-table :data="tableData" style="width: 100%">
+            <el-table-column prop="name" label="名称" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="time" label="日期" width="200"></el-table-column>
+            <el-table-column prop="count" label="数据" width="200">
+              <template slot-scope="scope">
+                <span v-if="isMolecule" class="link" @click="toListPage(scope.row)">{{ scope.row.count }}</span>
+                <span v-else>{{ (scope.row.count * 100).toFixed(2) + '%' }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="source" label="来源" width="200"></el-table-column>
+          </el-table>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      menus: [
+        {
+          id: 2301,
+          name: '2.3.1手术患者手术后肺栓塞发生例数和发生率',
+          children: [
+            {
+              id: 'SSHFSS',
+              name: '手术患者后肺栓塞发生例数',
+            },
+            {
+              id: 23012,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2302,
+          name: '2.3.2手术患者手术后深静脉血栓发生例数和发生率',
+          children: [
+            {
+              id: 'SSHSJMXS',
+              name: '手术患者手术后深静脉血栓发生例数',
+            },
+            {
+              id: 23022,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2303,
+          name: '2.3.3手术患者手术后败血症发生例数和发生率',
+          children: [
+            {
+              id: 'SSHBXZ',
+              name: '手术患者手术后败血症发生例数',
+            },
+            {
+              id: 23032,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2304,
+          name: '2.3.4手术患者手术后出血或血肿发生例数和发生',
+          children: [
+            {
+              id: 'SSHCXHXZ',
+              name: '手术患者手术后出血或血肿发生例数',
+            },
+            {
+              id: 23042,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2305,
+          name: '2.3.5手术患者手术伤口裂开发生例数和发生率',
+          children: [
+            {
+              id: 'SSHSKLK',
+              name: '手术患者手术伤口裂开发生例数',
+            },
+            {
+              id: 23052,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2306,
+          name: '2.3.6手术患者手术后猝死发生例数和发生率',
+          children: [
+            {
+              id: 'SSHCS',
+              name: '手术患者手术后猝死发生例数',
+            },
+            {
+              id: 23062,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2307,
+          name: '2.3.7手术患者手术后呼吸衰竭发生例数和发生率',
+          children: [
+            {
+              id: 'SSHHXSJ',
+              name: '手术患者手术后呼吸衰竭发生例数',
+            },
+            {
+              id: 23072,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2308,
+          name: '2.3.8手术患者手术后生理/代谢紊乱发生例数和发生',
+          children: [
+            {
+              id: 'SSHSLDXSLF',
+              name: '手术患者手术后生理/代谢紊乱发生例数',
+            },
+            {
+              id: 23082,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2309,
+          name: '2.3.9与手术/操作相关感染发生例数和发生率',
+          children: [
+            {
+              id: 'SSCZGR',
+              name: '与手术/操作相关感染发生例数',
+            },
+            {
+              id: 23092,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2310,
+          name: '2.3.10手术过程中异物遗留发生例数和发生率',
+          children: [
+            {
+              id: 'MZBFZ',
+              name: '发生手术过程中异物遗留的出院发生例数',
+            },
+            {
+              id: 23102,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2311,
+          name: '2.3.11手术患者麻醉并发症发生例数和发生率',
+          children: [
+            {
+              id: 'MZBFZ',
+              name: '手术患者麻醉并发症发生例数',
+            },
+            {
+              id: 23112,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2312,
+          name: '2.3.12手术患者肺部感染与肺机能不全发生例数和发生率',
+          children: [
+            {
+              id: 'FBGRYFJNBQ',
+              name: '手术患者肺部感染与肺机能不全发生例数',
+            },
+            {
+              id: 23122,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2313,
+          name: '2.3.13手术意外穿刺伤或撕裂伤发生例数和发生率',
+          children: [
+            {
+              id: 'YWCCSHSLS',
+              name: '手术患者肺部感染与肺机能不全发生例数',
+            },
+            {
+              id: 23132,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2314,
+          name: '2.3.14手术后急性肾衰竭发生例数和发生率',
+          children: [
+            {
+              id: 'SSHJXSSJ',
+              name: '手术后急性肾衰竭发生例数',
+            },
+            {
+              id: 23142,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2315,
+          name: '2.3.15各系统/器官术后并发症发生例数和发生率',
+          children: [
+            {
+              id: 'XTQGXH',
+              name: '消化系统术后并发症发生例数',
+            },
+            {
+              id: 'XTQGXUNHUAN',
+              name: '循环系统术后并发症发生例数',
+            },
+            {
+              id: 'XTQGSJ',
+              name: '神经系统术后并发症发生例数',
+            },
+            {
+              id: 'XTQGYHFQ',
+              name: '眼和附器术后并发症发生例数',
+            },
+            {
+              id: 'XTQGEHRC',
+              name: '耳和乳突术后并发症发生例数',
+            },
+            {
+              id: 'XTQGJRGG',
+              name: '肌肉骨骼术后并发症发生例数',
+            },
+            {
+              id: 'XTQGMNSZ',
+              name: '泌尿生殖系统术后并发症发生例数',
+            },
+            {
+              id: 'XTQGKQ',
+              name: '口腔术后并发症发生例数',
+            },
+            {
+              id: 23152,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2316,
+          name: '2.3.16植入物的并发症(不包括脓毒症)发生例数和发生率',
+          children: [
+            {
+              id: 'ZRWXZHXG',
+              name: '(心脏和血管)植入物的并发症(不包括脓毒症)发生例数',
+            },
+            {
+              id: 'ZRWMNSZD',
+              name: '(泌尿生殖道)植入物的并发症(不包括脓毒症)发生例数',
+            },
+            {
+              id: 'ZRWGK',
+              name: '(骨科)植入物的并发症(不包括脓毒症)发生例数',
+            },
+            {
+              id: 'ZRWQT',
+              name: '(其他)植入物的并发症(不包括脓毒症)发生例数',
+            },
+            {
+              id: 23162,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2317,
+          name: '2.3.17移植的并发症发生例数和发生率',
+          children: [
+            {
+              id: 'YZBFZ',
+              name: '移植的并发症发生例数',
+            },
+            {
+              id: 23172,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2318,
+          name: '2.3.18再植和截肢的并发症发生例数和发生率',
+          children: [
+            {
+              id: 'ZZHJZ',
+              name: '再植和截肢的并发症发生例数',
+            },
+            {
+              id: 23182,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+        {
+          id: 2319,
+          name: '2.3.19介入操作与手术后患者其他并发症发生例数和发生率',
+          children: [
+            {
+              id: 'JRCZHQT',
+              name: '介入操作与手术后患者其他并发症发生例数',
+            },
+            {
+              id: 23192,
+              name: '同期出院患者手术人次数',
+            },
+          ],
+        },
+      ],
+      formInline: {
+        year: '',
+      },
+      tableData: [],
+      filterText: '',
+      defaultProps: {
+        children: 'children',
+        label: 'name',
+      },
+      ruleId: '',
+      ruleName: '',
+      time: new Date(),
+      pickerOptions: {
+        disabledDate(time) {
+          const date = new Date();
+          const year = date.getFullYear();
+          const timeYear = time.getFullYear();
+          return year < timeYear;
+        },
+      },
+      greenColorMenus: [],
+    };
+  },
+  created() {
+    this.formInline.year = new Date().getFullYear().toString();
+    // this.getList()
+  },
+  computed: {
+    judgeEdit() {
+      return this.greenColorMenus.includes(this.ruleId) && !!this.tableData.length;
+    },
+    isMolecule() {
+      // 判断是否为分子
+      const isNumber = typeof(this.ruleId) === 'number'
+      return !isNumber
+    }
+  },
+  watch: {
+    filterText(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+  methods: {
+    // 列表跳转
+    toCaseIndexPage(row) {
+      console.log(row);
+    },
+    // 菜单筛选
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.name.indexOf(value) !== -1;
+    },
+    handleNodeClick(data) {
+      const { id, name } = data;
+      this.ruleId = id;
+      this.ruleName = name;
+      if (id && this.formInline.year) {
+        this.getList();
+      }
+    },
+    // 获取右侧列表数据
+    getList() {
+      if (this.isMolecule) {
+        // 分子
+        const { year } = this.formInline;
+        const params = {
+          start_time: `${year}0101`,
+          end_time: `${year}1231`,
+          field: this.ruleId
+        };
+        this.$axios.post('/ssbfz/getBfzData', params).then(res => {
+          if (Array.isArray(res.data)) {
+            res.data.map(item => {
+              item.name = this.ruleName;
+              item.ruleId = this.ruleId
+            });
+            this.tableData = res.data;
+          } else {
+            this.tableData = [];
+          }
+        });
+      } else {
+        const obj = {
+          count: '',
+          time: '',
+          source: '系统提取',
+        }
+        let arr = []
+        for(let i=0; i< 12; i++) {
+          const month = i < 10 ? `0${i+1}` : i+1
+          arr.push({
+            count: '',
+            time: `${this.formInline.year}-${month}`,
+            source: '系统提取',
+          })
+        }
+        arr.push({
+          count: '',
+          time: `全年`,
+          source: '系统提取',
+        })
+        if (this.ruleId.toString().length === 4) {
+          // 比例
+          arr.map(item => item.count = 0)
+        } else {
+          // 分母
+          arr.map(item => item.count = 0)
+        }
+        arr.map(item => {
+          item.name = this.ruleName;
+        });
+        this.tableData = arr
+      }
+    },
+    // 查询
+    onSearch() {
+      const { year } = this.formInline;
+      console.log(year);
+      if (!year) {
+        this.$message.error('请选择查询时间');
+        return;
+      }
+      if (!this.ruleId) {
+        this.$message.error('请选择查询指标');
+        return;
+      }
+      this.getList();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.link {
+  font-weight: 600;
+  color: #409eff;
+}
+
+.pointer {
+  cursor: pointer;
+}
+.box {
+  padding: 16px;
+  .box_wrapper {
+    padding: 16px;
+    background: #fff;
+    border-radius: 5px;
+    overflow-x: hidden;
+    overflow-y: auto;
+    height: calc(100vh - 140px);
+  }
+}
+.filter-tree {
+  margin-top: 16px;
+  ::v-deep .el-tree-node__content {
+    height: 36px;
+    line-height: 36px;
+  }
+}
+
+::v-deep.el-table .el-table__header tr th {
+  background: #f1f6ff;
+  color: #13171e;
+  border-bottom: 0px;
+}
+::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: 5px 0px 0px 5px;
+}
+::v-deep.el-table .el-table__header tr th:nth-child(3) {
+  border-radius: 0px 5px 5px 0px;
+}
+.green {
+  color: #67c23a;
+}
+</style>