diff --git a/src/views/healthMonitor/anY/cottage/cottage.api.ts b/src/views/healthMonitor/anY/cottage/cottage.api.ts index e69de29..e90fa1d 100644 --- a/src/views/healthMonitor/anY/cottage/cottage.api.ts +++ b/src/views/healthMonitor/anY/cottage/cottage.api.ts @@ -0,0 +1,7 @@ +import { defHttp } from '/@/utils/http/axios'; +enum Api { + list = '/health-emergency/emergency/LargeScreenNew/healthPlaceHomeDetailList', + map = '/health-emergency/emergency/LargeScreenNew/map', +} +export const listApi = (params: any) => defHttp.post({ url: Api.list, params }); +export const mapApi = () => defHttp.get({ url: Api.map, params: { type: '3' } }); diff --git a/src/views/healthMonitor/anY/cottage/cottage.data.ts b/src/views/healthMonitor/anY/cottage/cottage.data.ts index 7be8ffb..ad47e38 100644 --- a/src/views/healthMonitor/anY/cottage/cottage.data.ts +++ b/src/views/healthMonitor/anY/cottage/cottage.data.ts @@ -1,5 +1,81 @@ import { BasicColumn, FormSchema } from '/@/components/Table'; +import { mapApi } from '/@/views/healthMonitor/anY/cottage/cottage.api'; -export const columns: BasicColumn[] = []; +export const columns: BasicColumn[] = [ + { + title: '所属单位', + dataIndex: 'departName', + }, + { + title: '小屋名称', + dataIndex: 'roomName', + }, + { + title: '小屋地址', + dataIndex: 'address', + }, + { + title: '员工姓名', + dataIndex: 'name', + }, + { + title: '员工编号', + dataIndex: 'employeeNum', + width: 100, + }, + { + title: '检测类型', + dataIndex: 'checkTypeName', + width: 100, + }, + { + title: '测量值', + dataIndex: 'currentVal', + width: 100, + }, + { + title: '目标值', + dataIndex: 'goalVal', + width: 100, + }, + { + title: '检测日期', + dataIndex: 'checkInDate', + width: 100, + }, +]; -export const searchScheme: FormSchema[] = []; +export const searchScheme: FormSchema[] = [ + { + field: 'name', + label: '员工姓名', + component: 'Input', + }, + { + field: 'healthRoomId', + label: '健康小屋', + component: 'ApiSelect', + componentProps: () => ({ + api: mapApi, + resultField: 'result', + labelField: 'name', + valueField: 'ayId', + immediate: true, + showSearch: true, + showDefaultValue: false, + filterOption: (input: string, option: any): boolean => { + const str: string = input.toLowerCase(); + return option.label.toLowerCase().indexOf(str) >= 0; + }, + }), + }, + { + field: 'date', + label: '检测日期', + component: 'RangeDate', + componentProps: () => ({ + valueFormat: 'YYYY-MM-DD', + format: 'YYYY-MM-DD', + }), + }, +]; diff --git a/src/views/healthMonitor/anY/cottage/cottage.vue b/src/views/healthMonitor/anY/cottage/cottage.vue index 43e6e61..5b69b3c 100644 --- a/src/views/healthMonitor/anY/cottage/cottage.vue +++ b/src/views/healthMonitor/anY/cottage/cottage.vue @@ -4,11 +4,11 @@