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
<template>
<div class="dataCenter">
<div class="header">
<div
v-for="(item, index) in headList"
:key="index"
:class="['btn', selectedIndex == index ? 'active' : '']"
@click="setSelectedIndex(index)"
>
{{ item }}
</div>
</div>
<customs-table
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
</template>
<script>
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
import { getPatientPage } from "@/api/dataoverview.js"
export default {
// 数据概览
name: "",
components: {
CustomsTable,
},
mixins: [paginationMixin],
data() {
return {
listLoading: false,
selectedIndex: sessionStorage.getItem("homeSelectedIndex") - 0 || 0,
headList: ["筛查概览", "社区筛查", "医院筛查", "体检筛查"],
columns: [
{
label: "医联体",
minWidth: 120,
value: "unionName",
},
{
label: "累计上报量",
minWidth: 120,
value: "report",
},
{
label: "最近一季度上报量",
minWidth: 120,
value: "lastQuarter",
},
{
label: "累计审核合格量",
minWidth: 120,
value: "pass",
},
{
label: "高风险",
minWidth: 120,
value: "high",
},
{
label: "中风险",
minWidth: 120,
value: "middle",
},
{
label: "低风险",
minWidth: 120,
value: "low",
},
{
label: "胃癌",
minWidth: 120,
value: "gas",
},
{
label: "早期胃癌",
minWidth: 120,
value: "earlyGas",
},
{
label: "食道癌",
minWidth: 120,
value: "esophagus",
},
],
tableData: [],
}
},
watch: {},
mounted() {
this.getPatientPage()
},
methods: {
setSelectedIndex(i) {
console.log(this.selectedIndex)
this.selectedIndex = i
this.getPatientPage()
sessionStorage.setItem("homeSelectedIndex", this.selectedIndex)
},
getPatientPage() {
this.listLoading = true
let data = {
patientFrom: this.selectedIndex == "0" ? null : this.selectedIndex,
}
getPatientPage(data).then((res) => {
this.listLoading = false
if (res.code === 1) {
const d = res.data
this.tableData = d.records || []
this.total = Number(d.total)
}
this.listLoading = false
})
},
},
}
</script>
<style lang="scss" scoped>
.dataCenter {
padding: 24px;
height: 100%;
display: flex;
flex-direction: column;
.header {
display: flex;
margin-bottom: 20px;
.btn {
cursor: pointer;
width: 112px;
height: 48px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #dddddd;
font-size: 16px;
font-family: AlibabaPuHuiTiM;
color: #000;
text-align: center;
line-height: 48px;
margin-right: 24px;
}
.active {
background: #4e68ff;
border: none;
color: #ffffff;
}
}
}
</style>