|
@@ -0,0 +1,474 @@
|
|
|
|
|
+import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
|
|
|
+import { sysUserQueryPage } from '/@/api/sys/sysUserApi';
|
|
|
|
|
+import { waterList, waterDetail } from '/@/api/biz/engineer/waterApi';
|
|
|
|
|
+import dayjs from 'dayjs';
|
|
|
|
|
+export const columns: BasicColumn[] = [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '设备编号',
|
|
|
|
|
+ dataIndex: 'deviceUniqueCode',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '设备信息',
|
|
|
|
|
+ dataIndex: 'deviceInfo',
|
|
|
|
|
+ width: 160,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '检测时间',
|
|
|
|
|
+ dataIndex: 'detectionTime',
|
|
|
|
|
+ width: 160,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '透析用水中的有毒化学物质',
|
|
|
|
|
+ dataIndex: 'toxicChemicals',
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '铝(mg/L) 正常值≤0.01',
|
|
|
|
|
+ dataIndex: 'aluminum',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '总氯(mg/L) 正常值≤0.1',
|
|
|
|
|
+ dataIndex: 'totalChlorine',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '铜(mg/L) 正常值≤0.01',
|
|
|
|
|
+ dataIndex: 'copper',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '氟化物 (mg/L) 正常值≤0.2',
|
|
|
|
|
+ dataIndex: 'fluoride',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '铅(mg/L) 正常值≤ 0.005',
|
|
|
|
|
+ dataIndex: 'lead',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '硝酸盐(氮)(mg/L)正常值≤2',
|
|
|
|
|
+ dataIndex: 'nitrate',
|
|
|
|
|
+ width: 130,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '硫酸盐 (mg/L) 正常值≤100',
|
|
|
|
|
+ dataIndex: 'sulfate',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '锌(mg/L) 正常值≤0.1',
|
|
|
|
|
+ dataIndex: 'zinc',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '透析溶液中的电解质',
|
|
|
|
|
+ dataIndex: 'electrolyte',
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '钙(mmol/L) 正常值≤2 (0.05mmol/L)',
|
|
|
|
|
+ dataIndex: 'calcium',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '镁(mmol/L) 正常值≤4 (0.15mmol/L)',
|
|
|
|
|
+ dataIndex: 'magnesium',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '钾(mmol/L) 正常值≤8 (0.2mmol/L)',
|
|
|
|
|
+ dataIndex: 'potassium',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '钠(mmol/L) 正常值≤70 (3.0mmol/L)',
|
|
|
|
|
+ dataIndex: 'sodium',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '透析用水中的微量元素',
|
|
|
|
|
+ dataIndex: 'traceElement',
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '锑(mg/L) 正常值≤0.006',
|
|
|
|
|
+ dataIndex: 'antimony',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '砷(mg/L) 正常值≤0.005',
|
|
|
|
|
+ dataIndex: 'arsenic',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '钡(mg/L) 正常值≤0.1',
|
|
|
|
|
+ dataIndex: 'barium',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '铍(mg/L) 正常值≤0.0004',
|
|
|
|
|
+ dataIndex: 'beryllium',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '镉(mg/L) 正常值≤0.001',
|
|
|
|
|
+ dataIndex: 'cadmium',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '铬(mg/L) 正常值≤0.014',
|
|
|
|
|
+ dataIndex: 'chromium',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '汞(mg/L) 正常值≤0.0002',
|
|
|
|
|
+ dataIndex: 'mercury',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '硒(mg/L) 正常值≤0.09',
|
|
|
|
|
+ dataIndex: 'selenium',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '银(mg/L) 正常值≤0.005',
|
|
|
|
|
+ dataIndex: 'silver',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '铊(mg/L) 正常值≤0.02',
|
|
|
|
|
+ dataIndex: 'thallium',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+];
|
|
|
|
|
+// 表单新增编辑
|
|
|
|
|
+export const dataFormSchema: FormSchema[] = [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '设备编号搜索',
|
|
|
|
|
+ field: 'uniqueCodes',
|
|
|
|
|
+ component: 'Input',
|
|
|
|
|
+ ifShow: false,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ field: 'selDervice',
|
|
|
|
|
+ component: 'PlainTitle',
|
|
|
|
|
+ defaultValue: '选择设备',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '设备编号',
|
|
|
|
|
+ field: 'deviceId',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ component: 'ApiSelect',
|
|
|
|
|
+ componentProps: ({ formModel }) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ api: waterList,
|
|
|
|
|
+ params: {
|
|
|
|
|
+ uniqueCode: formModel.uniqueCodes,
|
|
|
|
|
+ },
|
|
|
|
|
+ labelField: 'uniqueCode',
|
|
|
|
|
+ valueField: 'id',
|
|
|
|
|
+ resultField: 'data',
|
|
|
|
|
+ placeholder: '请选择设备编号',
|
|
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
|
|
+ showSearch: true,
|
|
|
|
|
+ filterOption: false,
|
|
|
|
|
+ onSearch: e => {
|
|
|
|
|
+ formModel.uniqueCodes = e;
|
|
|
|
|
+ },
|
|
|
|
|
+ onChange: async e => {
|
|
|
|
|
+ const resData = await waterDetail(e);
|
|
|
|
|
+ formModel['deviceManufacturer'] = resData?.manufacturer;
|
|
|
|
|
+ formModel['deviceModel'] = resData?.model;
|
|
|
|
|
+ },
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '设备厂家',
|
|
|
|
|
+ field: 'deviceManufacturer',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ component: 'Input',
|
|
|
|
|
+ slot: 'deviceManufacturer',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ disabled: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '设备型号',
|
|
|
|
|
+ field: 'deviceModel',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ component: 'Input',
|
|
|
|
|
+ slot: 'deviceModel',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ disabled: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ field: 'deteRecords',
|
|
|
|
|
+ component: 'PlainTitle',
|
|
|
|
|
+ defaultValue: '检测记录',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '检测时间',
|
|
|
|
|
+ field: 'detectionTime',
|
|
|
|
|
+ component: 'DatePicker',
|
|
|
|
|
+ componentProps: () => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ placeholder: '请选择检测时间',
|
|
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
|
|
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
|
+ showTime: true,
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ defaultValue: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '检测人',
|
|
|
|
|
+ field: 'inspectorId',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ component: 'ApiSelect',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ api: sysUserQueryPage,
|
|
|
|
|
+ params: {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 999,
|
|
|
|
|
+ disable: '0',
|
|
|
|
|
+ },
|
|
|
|
|
+ mode: 'single',
|
|
|
|
|
+ labelField: 'nickname',
|
|
|
|
|
+ valueField: 'id',
|
|
|
|
|
+ resultField: 'data',
|
|
|
|
|
+ placeholder: '请选择检测人',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '铝(mg/L)',
|
|
|
|
|
+ field: 'to_aluminum',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入氟化物(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '总氯(mg/L)',
|
|
|
|
|
+ field: 'to_totalChlorine',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入总氯(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '铜(mg/L)',
|
|
|
|
|
+ field: 'to_copper',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入铜(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '氟化物(mg/L)',
|
|
|
|
|
+ field: 'to_fluoride',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入氟化物(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '铅(mg/L)',
|
|
|
|
|
+ field: 'to_lead',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入铅(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '硝酸盐(氮)(mg/L)',
|
|
|
|
|
+ field: 'to_nitrate',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入硝酸盐(氮)(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '锌(mg/L)',
|
|
|
|
|
+ field: 'to_zinc',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入锌(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '硫酸盐(mg/L)',
|
|
|
|
|
+ field: 'to_sulfate',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入硫酸盐(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '钙(mmol/L)',
|
|
|
|
|
+ field: 'el_calcium',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入钙(mmol/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '镁(mmol/L)',
|
|
|
|
|
+ field: 'el_magnesium',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入镁(mmol/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '钠(mmol/L)',
|
|
|
|
|
+ field: 'el_sodium',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入钠(mmol/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '钾(mmol/L)',
|
|
|
|
|
+ field: 'el_potassium',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入钾(mmol/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '砷(mg/L)',
|
|
|
|
|
+ field: 'tr_arsenic',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入砷(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '锑(mg/L)',
|
|
|
|
|
+ field: 'tr_antimony',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入锑(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '铍(mg/L)',
|
|
|
|
|
+ field: 'tr_beryllium',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入铍(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '钡(mg/L)',
|
|
|
|
|
+ field: 'tr_barium',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入钡(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '铬(mg/L)',
|
|
|
|
|
+ field: 'tr_chromium',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入铬(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '镉(mg/L)',
|
|
|
|
|
+ field: 'tr_cadmium',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入镉(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '硒(mg/L)',
|
|
|
|
|
+ field: 'tr_selenium',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入硒(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '汞(mg/L)',
|
|
|
|
|
+ field: 'tr_mercury',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入汞(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '银(mg/L)',
|
|
|
|
|
+ field: 'tr_silver',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入银(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '铊(mg/L)',
|
|
|
|
|
+ field: 'tr_thallium',
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请输入铊(mg/L)',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
|
|
+export const headerLabel = [
|
|
|
|
|
+ {
|
|
|
|
|
+ keys: 'deviceUniqueCode',
|
|
|
|
|
+ values: '设备编号',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ keys: 'deviceInfo',
|
|
|
|
|
+ values: '设备信息',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ keys: 'detectionTime',
|
|
|
|
|
+ values: '检测时间',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ keys: 'deviceUniqueCode',
|
|
|
|
|
+ values: '透析用水中的有毒化学物质',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ keys: 'deviceUniqueCode',
|
|
|
|
|
+ values: '铝(mg/L) 正常值≤0.01',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ keys: 'deviceUniqueCode',
|
|
|
|
|
+ values: '铝(mg/L) 正常值≤0.01',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ keys: 'deviceUniqueCode',
|
|
|
|
|
+ values: '铝(mg/L) 正常值≤0.01',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ keys: 'deviceUniqueCode',
|
|
|
|
|
+ values: '铝(mg/L) 正常值≤0.01',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ keys: 'deviceUniqueCode',
|
|
|
|
|
+ values: '铝(mg/L) 正常值≤0.01',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ keys: 'deviceUniqueCode',
|
|
|
|
|
+ values: '铝(mg/L) 正常值≤0.01',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ keys: 'deviceUniqueCode',
|
|
|
|
|
+ values: '铝(mg/L) 正常值≤0.01',
|
|
|
|
|
+ },
|
|
|
|
|
+];
|