|
@@ -1,6 +1,9 @@
|
|
|
<template>
|
|
|
<page-layer>
|
|
|
<template #header>
|
|
|
+ <el-date-picker type="daterange" v-model="dateRange" style="width: 200px" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
+ <el-button icon="Search" type="primary" @click="fetchAssessments" style="margin-left: 4px">检索</el-button>
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
<el-checkbox v-model="inquiry.onlyShowUnsatisfied" @change="handleSatisfiedChange">只看含有“不满意”的问卷</el-checkbox>
|
|
|
<el-button icon="DataAnalysis" type="success" @click="executeAssessmentAnalyse" style="margin-left: 12px">问卷分析</el-button>
|
|
|
<el-button type="primary" icon="Upload" @click="exportExcel">导出Excel</el-button>
|
|
@@ -142,11 +145,24 @@ import {
|
|
|
import store from "@/store";
|
|
|
import {ElMessage} from "element-plus";
|
|
|
import {Export} from "@/utils/ExportExcel";
|
|
|
+import {getDateRangeFormatDate} from "@/utils/date";
|
|
|
|
|
|
const windowSize = store.state.app.windowSize
|
|
|
const tableHeight = windowSize.h - 55
|
|
|
|
|
|
+const dateRange = ref([])
|
|
|
+
|
|
|
+const formatDateRange = () => {
|
|
|
+ if (dateRange.value.length === 2) {
|
|
|
+ const format = getDateRangeFormatDate(dateRange.value)
|
|
|
+ inquiry.start = format.startTime
|
|
|
+ inquiry.end = format.endTime
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
const inquiry = reactive({
|
|
|
+ start: null,
|
|
|
+ end: null,
|
|
|
pageNum: 1,
|
|
|
pageSize: 30,
|
|
|
onlyShowUnsatisfied: false
|
|
@@ -161,6 +177,7 @@ const showAnalyzeResult = ref(false)
|
|
|
const analyzeResult = ref({})
|
|
|
|
|
|
const fetchAssessments = () => {
|
|
|
+ formatDateRange()
|
|
|
getClinicSatisfiedBodies(inquiry).then(res => {
|
|
|
assessments.totalSize = res.totalSize
|
|
|
assessments.list = res.list
|
|
@@ -171,8 +188,8 @@ const fetchAssessments = () => {
|
|
|
}
|
|
|
|
|
|
const executeAssessmentAnalyse = () => {
|
|
|
- assessmentsAnalyse().then(res => {
|
|
|
- console.log(res)
|
|
|
+ formatDateRange()
|
|
|
+ assessmentsAnalyse(inquiry).then(res => {
|
|
|
analyzeResult.value = res
|
|
|
showAnalyzeResult.value = true
|
|
|
})
|
|
@@ -214,14 +231,15 @@ const exportExcel = () => {
|
|
|
item11: '对门诊医护人员',
|
|
|
item13: '对急诊医护人员',
|
|
|
}
|
|
|
- getAllClinicSatisfiedBodies(inquiry.onlyShowUnsatisfied).then(res => {
|
|
|
+ formatDateRange()
|
|
|
+ getAllClinicSatisfiedBodies(inquiry).then(res => {
|
|
|
Export(res, fields, '门诊满意度问卷')
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- fetchAssessments()
|
|
|
-})
|
|
|
+// onMounted(() => {
|
|
|
+// fetchAssessments()
|
|
|
+// })
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|