qx
qx
2025-02-07 385b7d9973a0f79b4c17e1859326c69c8b445190
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="tableList"
      :inline="true"
      label-width="76px"
      style="margin: 10px 10px"
    >
      <el-form-item label="体检时间" prop="date">
        <el-date-picker
          v-model="value1"
          type="datetimerange"
          align="right"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          :default-time="['00:00:00', '23:00:00']"
          format="yyyy-MM-dd HH:mm"
          value-format="yyyy-MM-dd HH:mm"
          :picker-options="pickerOptions"
          @change="dateChangebirthday1"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" @click="submitForm">搜索</el-button>
        <el-button type="primary"  >
          <download-excel class="blueBtn" 
            :data="resultList" 
            :fields="json_fields" 
            worksheet="My Worksheet"
            name="体检结果异常数据统计分析"
            >
            导出excel
          </download-excel>
        </el-button>
          
        
      </el-form-item>
    </el-form>
 
    <div class="tj">
        <span class="tj_txt">体检结果异常数据统计分析</span>
    </div>
 
    <div >
      <el-table :data="resultList" style="width: 96%;margin: 10px 15px;" height="530px">
    <el-table-column  prop="nweID"  label="序号"  align="center" ></el-table-column>
    <el-table-column prop="abProName" label="异常项目"  align="center"></el-table-column>
    <el-table-column prop="tjPersonNum" label="体检人数"  align="center"></el-table-column>
    <el-table-column prop="abPersonNum" label="结果异常人数"  align="center"></el-table-column>
    <el-table-column label="性别分类(异常人数)" align="center" >
        <el-table-column prop="abManNum" label="男"  align="center"></el-table-column>
        <el-table-column prop="abWomanNum" label="女"  align="center"></el-table-column>
    </el-table-column>
    <el-table-column label="年龄分类(异常人数)" align="center" >
            <el-table-column prop="abThNum" label="<30岁"  align="center"></el-table-column>
            <el-table-column prop="abThSeNum" label="30-70岁"  align="center"></el-table-column>
            <el-table-column prop="abSeNum" label=">70岁"  align="center"></el-table-column>
        </el-table-column>
  </el-table>
    </div>
   
    
  </div>
</template>
 
<script>
import { getResult } from "@/api/count/examination";
 
export default {
  name: "examination",
  data() {
    return {
        // 遮罩层
      loading: true,
        resultList:[],
        value1: "",
        startTime: "",
        queryParams: {
            date: null,
            startDate: null,
            endDate: null,
        },
        pickerOptions: {
          shortcuts: [{
            text: '最近一周',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近一个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近三个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit('pick', [start, end]);
            }
          }]
        },
        json_fields:{
          '序号':'nweID',
          '异常项目':'abProName',
          '体检人数':'tjPersonNum',
          '结果异常人数':'abPersonNum',
          '男性异常人数':'abManNum',
          '女性异常人数':'abWomanNum',
          '30岁以下异常人数':'abThNum',
          '30-70岁以下异常人数':'abThSeNum',
          '70岁以上异常人数':'abSeNum',
        },
        // 查询参数
        queryParams:{
            abProName:null,
            tjPersonNum:null,
            abPersonNum:null,
            abManNum:null,
            abWomanNum:null,
            abThNum:null,
            abThSeNum:null,
            abSeNum:null,
        },
        // 表单参数
      form: {},
 
    };
  },
   created() {
    this.getList();
  },
  methods: {
    // 查询体检结果异常数据列表
     getList() {
         this.loading = true;
      this.queryParams.startDate = this.startTime[0];
      this.queryParams.endDate = this.startTime[1];
      getResult(this.queryParams).then(response => {
        this.resultList = response;
         for (let i = 0; i < response.length; i++) {
          response[i].nweID = i + 1;
        }
        this.loading = false
      });
    },
    // 时间
    dateChangebirthday1(val) {
      this.startTime = val;
    },
    // 搜索
    submitForm() {
      // this.queryParams.pageNum = 1;
      this.getList();
    },
  },
};
</script>
 
<style lang="scss" scoped>
.tj_txt{
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}
</style>