|
|
|
@ -96,13 +96,13 @@ |
|
|
|
|
|
|
|
<!-- 患者统计 --> |
|
|
|
<div class="stat-card"> |
|
|
|
<h3><i class="fas fa-users"></i> 患者统计</h3> |
|
|
|
<h3>患者统计</h3> |
|
|
|
<div class="stat-item"> |
|
|
|
<span class="stat-label">患者总数</span> |
|
|
|
<span |
|
|
|
class="stat-value clickable" |
|
|
|
@click="handleClick('patient', 'total', patientStats.total)" |
|
|
|
>{{ patientStats.total || 0 }}</span |
|
|
|
@click="handleClick('patient', patientStats.asstotal)" |
|
|
|
>{{ patientStats.asstotal || 0 }}</span |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div class="stat-item"> |
|
|
|
@ -110,13 +110,13 @@ |
|
|
|
<div> |
|
|
|
<span |
|
|
|
class="stat-value clickable" |
|
|
|
@click="handleClick('patient', 'male', patientStats.male)" |
|
|
|
@click="handleClick('patient', patientStats.male)" |
|
|
|
>男性 {{ patientStats.male || 0 }}</span |
|
|
|
> |
|
|
|
<span class="divider">|</span> |
|
|
|
<span |
|
|
|
class="stat-value clickable" |
|
|
|
@click="handleClick('patient', 'female', patientStats.female)" |
|
|
|
@click="handleClick('patient', patientStats.female)" |
|
|
|
>女性 {{ patientStats.female || 0 }}</span |
|
|
|
> |
|
|
|
</div> |
|
|
|
@ -133,7 +133,7 @@ |
|
|
|
<span class="distribution-label">{{ edu.qualification }}</span> |
|
|
|
<span |
|
|
|
class="distribution-value clickable" |
|
|
|
@click="handleClick('patient', edu.key, edu.num)" |
|
|
|
@click="handleClick('patient', edu.num)" |
|
|
|
>{{ edu.num }} |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
@ -149,7 +149,7 @@ |
|
|
|
<span class="distribution-label">{{ age.name }}</span> |
|
|
|
<span |
|
|
|
class="distribution-value clickable" |
|
|
|
@click="handleClick('patient', age.key, age.value)" |
|
|
|
@click="handleClick('patient', age.value)" |
|
|
|
>{{ age.value }}</span |
|
|
|
> |
|
|
|
</div> |
|
|
|
@ -159,7 +159,7 @@ |
|
|
|
|
|
|
|
<!-- 评估版本统计 --> |
|
|
|
<div class="stat-card"> |
|
|
|
<h3><i class="fas fa-code-branch"></i> 评估版本统计</h3> |
|
|
|
<h3>评估版本统计</h3> |
|
|
|
<div |
|
|
|
class="stat-item" |
|
|
|
v-for="version in versionStats" |
|
|
|
@ -168,7 +168,7 @@ |
|
|
|
<span class="stat-label">{{ version.version }}</span> |
|
|
|
<span |
|
|
|
class="stat-value clickable" |
|
|
|
@click="handleClick('version', version.key, version.num)" |
|
|
|
@click="handleClick('version', version.num)" |
|
|
|
>{{ version.num || 0 }}</span |
|
|
|
> |
|
|
|
</div> |
|
|
|
@ -176,7 +176,7 @@ |
|
|
|
|
|
|
|
<!-- 评估量表统计 --> |
|
|
|
<div class="stat-card"> |
|
|
|
<h3><i class="fas fa-clipboard-list"></i> 评估量表统计</h3> |
|
|
|
<h3>评估量表统计</h3> |
|
|
|
<div |
|
|
|
class="stat-item" |
|
|
|
v-for="(scale, index) in scaleStats" |
|
|
|
@ -185,7 +185,7 @@ |
|
|
|
<span class="stat-label">{{ scale.name }}</span> |
|
|
|
<span |
|
|
|
class="stat-value clickable" |
|
|
|
@click="handleClick('scale', index, scale.num)" |
|
|
|
@click="handleClick('scale', scale.num)" |
|
|
|
> |
|
|
|
{{ scale.num || 0 }} |
|
|
|
</span> |
|
|
|
@ -203,10 +203,7 @@ |
|
|
|
<span |
|
|
|
class="stat-value" |
|
|
|
:class="{ clickable: selectedScale }" |
|
|
|
@click=" |
|
|
|
selectedScale && |
|
|
|
handleClick('scale', selectedScale, selectedScaleValue) |
|
|
|
" |
|
|
|
@click="handleClick('scale', selectedScaleValue)" |
|
|
|
> |
|
|
|
{{ selectedScaleValue }} |
|
|
|
</span> |
|
|
|
@ -215,7 +212,7 @@ |
|
|
|
|
|
|
|
<!-- 诊断统计 --> |
|
|
|
<div class="stat-card"> |
|
|
|
<h3><i class="fas fa-stethoscope"></i> 诊断(病种)统计</h3> |
|
|
|
<h3>诊断(病种)统计</h3> |
|
|
|
<div |
|
|
|
class="stat-item" |
|
|
|
v-for="(diagnosis, index) in diagnosisStats" |
|
|
|
@ -224,7 +221,7 @@ |
|
|
|
<span class="stat-label">{{ diagnosis.name }}</span> |
|
|
|
<span |
|
|
|
class="stat-value clickable" |
|
|
|
@click="handleClick('诊断', diagnosis.value)" |
|
|
|
@click="handleClick('diagnosis', diagnosis.value)" |
|
|
|
> |
|
|
|
{{ diagnosis.value || 0 }} |
|
|
|
</span> |
|
|
|
@ -255,27 +252,19 @@ |
|
|
|
|
|
|
|
<!-- 评估结果统计 --> |
|
|
|
<div class="stat-card"> |
|
|
|
<h3><i class="fas fa-poll"></i> 评估结果统计</h3> |
|
|
|
<h3>评估结果统计</h3> |
|
|
|
<div class="result-row" v-for="result in resultStats" :key="result.key"> |
|
|
|
<div class="result-item"> |
|
|
|
<span class="stat-label">{{ result.name }}:</span> |
|
|
|
<div> |
|
|
|
<span |
|
|
|
class="stat-value normal clickable" |
|
|
|
@click=" |
|
|
|
handleClick('result', result.key + '_normal', result.normal) |
|
|
|
" |
|
|
|
@click="handleClick('result', result.normal)" |
|
|
|
>正常 {{ result.normal }}</span |
|
|
|
> |
|
|
|
<span |
|
|
|
class="stat-value highlight clickable" |
|
|
|
@click=" |
|
|
|
handleClick( |
|
|
|
'result', |
|
|
|
result.key + '_abnormal', |
|
|
|
result.abnormal |
|
|
|
) |
|
|
|
" |
|
|
|
@click="handleClick('result', result.abnormal)" |
|
|
|
>异常 {{ result.abnormal }}</span |
|
|
|
> |
|
|
|
</div> |
|
|
|
@ -299,14 +288,14 @@ |
|
|
|
<span |
|
|
|
class="stat-value normal" |
|
|
|
:class="{ clickable: selectedResultScale }" |
|
|
|
@click="handleClick()" |
|
|
|
@click="handleClick('result', selectedResultValue.normal)" |
|
|
|
> |
|
|
|
{{ selectedResultValue.normal }} |
|
|
|
</span> |
|
|
|
<span |
|
|
|
class="stat-value highlight" |
|
|
|
:class="{ clickable: selectedResultScale }" |
|
|
|
@click="handleClick()" |
|
|
|
@click="handleClick('result', selectedResultValue.abnormal)" |
|
|
|
> |
|
|
|
{{ selectedResultValue.abnormal }} |
|
|
|
</span> |
|
|
|
@ -316,7 +305,7 @@ |
|
|
|
|
|
|
|
<!-- 工作量统计 --> |
|
|
|
<div class="stat-card"> |
|
|
|
<h3><i class="fas fa-stethoscope"></i> 工作量统计</h3> |
|
|
|
<h3>工作量统计</h3> |
|
|
|
<div |
|
|
|
class="stat-item" |
|
|
|
v-for="(workload, index) in workloadStats" |
|
|
|
@ -398,7 +387,6 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
patientStats: { |
|
|
|
total: 0, |
|
|
|
male: 0, |
|
|
|
female: 0, |
|
|
|
education: [], |
|
|
|
@ -474,6 +462,34 @@ export default { |
|
|
|
this.getDeptTree(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
/** 点击事件 */ |
|
|
|
handleClick(type, value) { |
|
|
|
if (type == "patient") { |
|
|
|
this.$route.push({ |
|
|
|
path: "/patient/index", |
|
|
|
}); |
|
|
|
} else if (type == "version") { |
|
|
|
this.$route.push({ |
|
|
|
path: "/hospital/packageVersion", |
|
|
|
}); |
|
|
|
} else if (type == "scale") { |
|
|
|
this.$route.push({ |
|
|
|
path: "/evaluation/index", |
|
|
|
}); |
|
|
|
} else if (type == "diagnosis") { |
|
|
|
this.$route.push({ |
|
|
|
path: "/evaluation/index", |
|
|
|
}); |
|
|
|
} else if (type == "result") { |
|
|
|
this.$route.push({ |
|
|
|
path: "/evaluation/index", |
|
|
|
}); |
|
|
|
} else if (type == "workload") { |
|
|
|
this.$route.push({ |
|
|
|
path: "/evaluation/index", |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 科室选择 |
|
|
|
handleDeptChange() { |
|
|
|
this.getList(); |
|
|
|
@ -531,49 +547,57 @@ export default { |
|
|
|
}); |
|
|
|
// 患者数量 |
|
|
|
nntotal(this.param).then((res) => { |
|
|
|
this.patientStats = res.data || {}; |
|
|
|
}); |
|
|
|
// 性别数据 |
|
|
|
sexStatistics(this.param).then((res) => { |
|
|
|
this.patientStats.male = res.data.boy || 0; |
|
|
|
this.patientStats.female = res.data.girl || 0; |
|
|
|
}); |
|
|
|
// 学历统计 |
|
|
|
qualificationStatistics(this.param).then((res) => { |
|
|
|
res.data = res.data || []; |
|
|
|
// 排序 小到大 |
|
|
|
let data = res.data.sort((a, b) => a.qualification - b.qualification); |
|
|
|
let qualification = { |
|
|
|
1: "文盲", |
|
|
|
2: "小学", |
|
|
|
3: "初中", |
|
|
|
4: "高中/技校/中专", |
|
|
|
5: "大专/大学", |
|
|
|
6: "研究生及以上", |
|
|
|
}; |
|
|
|
this.patientStats.education = |
|
|
|
data?.map((item) => ({ |
|
|
|
key: `education_${item.qualification}`, |
|
|
|
qualification: qualification[item.qualification], |
|
|
|
num: item.num || 0, |
|
|
|
})) || []; |
|
|
|
}); |
|
|
|
// 年龄分布 |
|
|
|
nnage(this.param).then((res) => { |
|
|
|
this.patientStats.age = [ |
|
|
|
{ name: "小于60岁", value: res.data?.lt60 || 0 }, |
|
|
|
{ |
|
|
|
name: "60-69岁", |
|
|
|
value: res.data.f60t69 || 0, |
|
|
|
}, |
|
|
|
{ name: "70-79岁", value: res.data?.f70t79 || 0 }, |
|
|
|
{ |
|
|
|
name: "80-89岁", |
|
|
|
value: res.data.f80t89 || 0, |
|
|
|
}, |
|
|
|
{ name: "大于90岁", value: res.data?.f90t || 0 }, |
|
|
|
]; |
|
|
|
this.patientStats = res.data |
|
|
|
? { |
|
|
|
...this.patientStats, |
|
|
|
...res.data, |
|
|
|
} |
|
|
|
: {}; |
|
|
|
|
|
|
|
// 性别数据 |
|
|
|
sexStatistics(this.param).then((res) => { |
|
|
|
this.patientStats.male = res.data.boy || 0; |
|
|
|
this.patientStats.female = res.data.girl || 0; |
|
|
|
}); |
|
|
|
// 学历统计 |
|
|
|
qualificationStatistics(this.param).then((res) => { |
|
|
|
res.data = res.data || []; |
|
|
|
// 排序 小到大 |
|
|
|
let data = res.data.sort((a, b) => a.qualification - b.qualification); |
|
|
|
let qualification = { |
|
|
|
1: "文盲", |
|
|
|
2: "小学", |
|
|
|
3: "初中", |
|
|
|
4: "高中/技校/中专", |
|
|
|
5: "大专/大学", |
|
|
|
6: "研究生及以上", |
|
|
|
}; |
|
|
|
this.patientStats.education = |
|
|
|
data?.map((item) => ({ |
|
|
|
key: `education_${item.qualification}`, |
|
|
|
qualification: qualification[item.qualification], |
|
|
|
num: item.num || 0, |
|
|
|
})) || []; |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
// 年龄分布 |
|
|
|
nnage(this.param).then((res) => { |
|
|
|
this.patientStats.age = [ |
|
|
|
{ name: "小于60岁", value: res.data?.lt60 || 0 }, |
|
|
|
{ |
|
|
|
name: "60-69岁", |
|
|
|
value: res.data.f60t69 || 0, |
|
|
|
}, |
|
|
|
{ name: "70-79岁", value: res.data?.f70t79 || 0 }, |
|
|
|
{ |
|
|
|
name: "80-89岁", |
|
|
|
value: res.data.f80t89 || 0, |
|
|
|
}, |
|
|
|
{ name: "大于90岁", value: res.data?.f90t || 0 }, |
|
|
|
]; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
// 版本数据 |
|
|
|
versionStatistics(this.param).then((res) => { |
|
|
|
this.versionStats = res.data || []; |
|
|
|
@ -607,7 +631,6 @@ export default { |
|
|
|
// 其他工作量 |
|
|
|
this.otherWorkloads = res.data || []; |
|
|
|
}); |
|
|
|
this.loading = false; |
|
|
|
}, |
|
|
|
|
|
|
|
initDates() { |
|
|
|
@ -641,11 +664,6 @@ export default { |
|
|
|
this.lastUpdateTime = new Date().toLocaleString(); |
|
|
|
}, 800); |
|
|
|
}, |
|
|
|
handleClick(type, value, displayValue) { |
|
|
|
alert( |
|
|
|
`点击了 ${type} 类型的 ${value},数值为 ${displayValue}\n\n在实际应用中,这里会跳转到对应的列表页面。` |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
@ -675,6 +693,7 @@ export default { |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
flex-wrap: wrap; |
|
|
|
.header-left { |
|
|
|
font-weight: 800; |
|
|
|
font-size: 36px; |
|
|
|
|