|
|
@@ -32,12 +32,16 @@
|
|
|
</ContentWrap>
|
|
|
|
|
|
<ContentWrap>
|
|
|
- <div class="mb-10px" style="display:flex;align-items:center;justify-content: space-between;gap: 10px;" v-hasPermi="['elderly:blood-glucose:add']">
|
|
|
+ <div class="mb-10px" style="display:flex;align-items:center;justify-content: space-between;gap: 10px;">
|
|
|
<div style="display:flex;align-items:center;gap: 10px;">
|
|
|
- <el-button type="primary" plain @click="openForm()">
|
|
|
+ <el-button type="primary" plain @click="openForm()" v-hasPermi="['elderly:blood-glucose:add']">
|
|
|
<Icon icon="ep:plus" class="mr-5px" />
|
|
|
新增
|
|
|
</el-button>
|
|
|
+ <el-button type="warning" plain @click="exportExcel" v-hasPermi="['elderly:blood-glucose:export']">
|
|
|
+ <Icon icon="ep:download" class="mr-5px" />
|
|
|
+ 导出
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -71,8 +75,10 @@ import Form from './component/form.vue'
|
|
|
import { DICT_TYPE } from '@/utils/dict'
|
|
|
import {
|
|
|
deleteBloodGlucose,
|
|
|
- getBloodGlucosePage
|
|
|
+ getBloodGlucosePage,
|
|
|
+ exportBloodGlucoseExcel
|
|
|
} from '@/api/elderly/assess/blood-glucose'
|
|
|
+import download from '@/utils/download'
|
|
|
|
|
|
defineOptions({ name: 'BloodGlucose' })
|
|
|
|
|
|
@@ -151,6 +157,15 @@ const handleDelete = async (row: any) => {
|
|
|
} catch {}
|
|
|
}
|
|
|
|
|
|
+const exportExcel = async () => {
|
|
|
+ try {
|
|
|
+ await message.exportConfirm()
|
|
|
+ const data = await exportBloodGlucoseExcel(queryParams)
|
|
|
+ download.excel(data, '血糖记录.xls')
|
|
|
+ } catch {
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
getList()
|
|
|
})
|