Commit ab00357b authored by 王飞龙's avatar 王飞龙

Merge remote-tracking branch 'origin/master'

parents 17c4faac fd5b6b3c
...@@ -798,7 +798,7 @@ export default { ...@@ -798,7 +798,7 @@ export default {
this.sortedColumn = '' this.sortedColumn = ''
this.queryParams = { this.queryParams = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
searchText: '', searchText: '',
treatScheduleList: '', treatScheduleList: '',
reportTime: '', reportTime: '',
...@@ -843,15 +843,36 @@ export default { ...@@ -843,15 +843,36 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
if (this.ids.length !== 0) { if (this.ids.length !== 0) {
const exportTable = {} const exportTable = {
exportTable.treatIds = this.ids orderByColumn: this.queryParams.orderByColumn,
this.download('business/treat/export', exportTable, `manage_${new Date().getTime()}.xlsx`).then(res => { isAsc: this.queryParams.isAsc,
pageNum: 1,
pageSize: this.ids.length,
treatIds: this.ids
}
this.download('business/treat/export', exportTable, `治疗管理_${this.exportFormatTime(new Date())}.xlsx`).then(res => {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
}) })
} else { } else {
this.$modal.msgWarning('请选择至少一条数据导出') this.$modal.msgWarning('请选择至少一条数据导出')
return return
} }
},
// 导出格式化
exportFormatTime(date) {
// 获取年月日
var year = date.getFullYear()
var month = date.getMonth() + 1 // 月份从0开始,需要加1
var day = date.getDate()
// 将年月日格式化为字符串
if (month < 10) {
month = '0' + month
}
if (day < 10) {
day = '0' + day
}
const formattedDate = year.toString() + month.toString() + day.toString()
return formattedDate
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment