|
@@ -9,6 +9,7 @@
|
|
|
</el-select>
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
<el-button icon="Search" type="primary" @click="searchComplaints">检索</el-button>
|
|
|
+ <el-button icon="Download" type="primary" @click="exportExcel">导出Excel</el-button>
|
|
|
</header>
|
|
|
<div class="layout_main layout_el-table">
|
|
|
<el-table
|
|
@@ -68,6 +69,7 @@ import {selectAllComplaints, sendResponse} from "@/api/outpatient/complaints";
|
|
|
import {ref} from "@vue/reactivity";
|
|
|
import {getDateRangeFormatDate, getOneMonthOffset} from "@/utils/date";
|
|
|
import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
+import {Export} from "@/utils/ExportExcel";
|
|
|
|
|
|
const dateRange = ref([])
|
|
|
const requestParams = reactive({
|
|
@@ -124,6 +126,21 @@ const beforeSendResponse = () => {
|
|
|
}).catch(() => {})
|
|
|
}
|
|
|
|
|
|
+function exportExcel() {
|
|
|
+ const field = {
|
|
|
+ department: '投诉科室',
|
|
|
+ object: '投诉对象',
|
|
|
+ content: '投诉内容',
|
|
|
+ createDatetime: '投诉时间',
|
|
|
+ name: '患者姓名',
|
|
|
+ contact: '患者电话',
|
|
|
+ response: '回复内容',
|
|
|
+ handleStaff: '回复人员',
|
|
|
+ handleDatetime: '回复时间',
|
|
|
+ }
|
|
|
+ Export(complaints.value, field, "服务号投诉")
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
const offset = getOneMonthOffset()
|
|
|
dateRange.value[0] = offset.start
|