update
This commit is contained in:
+38
-6
@@ -2,24 +2,55 @@
|
|||||||
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose title="监测阈值" :width="700" @ok="handleSubmit" :maskClosable="false">
|
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose title="监测阈值" :width="700" @ok="handleSubmit" :maskClosable="false">
|
||||||
<BasicForm @register="registerForm">
|
<BasicForm @register="registerForm">
|
||||||
<template #heartRate="{ model, schema }">
|
<template #heartRate="{ model, schema }">
|
||||||
<a-input-number v-model:value="model.heartRateMin" v-bind="bindProps(0, schema)" :disabled="!initRecord.heartRateMin" />
|
<!-- <a-input-number v-model:value="model.heartRateMin" v-bind="bindProps(0, schema)" :disabled="!initRecord.heartRateMin" />-->
|
||||||
|
<a-select
|
||||||
|
v-model:value="model.heartRateMin"
|
||||||
|
v-bind="bindProps(0, schema)"
|
||||||
|
:disabled="!initRecord.heartRateMin"
|
||||||
|
:options="selectOne.one"
|
||||||
|
/>
|
||||||
<span style="margin: 0 10px">~</span>
|
<span style="margin: 0 10px">~</span>
|
||||||
<a-input-number v-model:value="model.heartRateMax" v-bind="bindProps(1, schema)" :disabled="!initRecord.heartRateMax" />
|
<!-- <a-input-number v-model:value="model.heartRateMax" v-bind="bindProps(1, schema)" :disabled="!initRecord.heartRateMax" />-->
|
||||||
|
<a-select
|
||||||
|
v-model:value="model.heartRateMax"
|
||||||
|
v-bind="bindProps(0, schema)"
|
||||||
|
:disabled="!initRecord.heartRateMax"
|
||||||
|
:options="selectOne.two"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #spo2="{ model, schema }">
|
<template #spo2="{ model, schema }">
|
||||||
<a-input-number v-model:value="model.spo2Min" v-bind="bindProps(0, schema)" :disabled="!initRecord.spo2Min" />
|
<!-- <a-input-number v-model:value="model.spo2Min" v-bind="bindProps(0, schema)" :disabled="!initRecord.spo2Min" />-->
|
||||||
|
<a-select v-model:value="model.spo2Min" v-bind="bindProps(0, schema)" :disabled="!initRecord.spo2Min" :options="selectTwo.one" />
|
||||||
<span style="margin: 0 10px">~</span>
|
<span style="margin: 0 10px">~</span>
|
||||||
<a-input-number v-model:value="model.spo2Max" v-bind="bindProps(1, schema)" :disabled="!initRecord.spo2Max" />
|
<a-input-number v-model:value="model.spo2Max" v-bind="bindProps(1, schema)" :disabled="!initRecord.spo2Max" />
|
||||||
</template>
|
</template>
|
||||||
<template #stress="{ model, schema }">
|
<template #stress="{ model, schema }">
|
||||||
<a-input-number v-model:value="model.stressMin" v-bind="bindProps(0, schema)" :disabled="!initRecord.stressMin" />
|
<a-input-number v-model:value="model.stressMin" v-bind="bindProps(0, schema)" :disabled="!initRecord.stressMin" />
|
||||||
<span style="margin: 0 10px">~</span>
|
<span style="margin: 0 10px">~</span>
|
||||||
<a-input-number v-model:value="model.stressMax" v-bind="bindProps(1, schema)" :disabled="!initRecord.stressMax" />
|
<!-- <a-input-number v-model:value="model.stressMax" v-bind="bindProps(1, schema)" :disabled="!initRecord.stressMax" />-->
|
||||||
|
<a-select
|
||||||
|
v-model:value="model.stressMax"
|
||||||
|
v-bind="bindProps(0, schema)"
|
||||||
|
:disabled="!initRecord.stressMax"
|
||||||
|
:options="selectThree.two"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #temperature="{ model, schema }">
|
<template #temperature="{ model, schema }">
|
||||||
<a-input-number v-model:value="model.temperatureMin" v-bind="bindProps(0, schema)" :disabled="!initRecord.temperatureMin" />
|
<!-- <a-input-number v-model:value="model.temperatureMin" v-bind="bindProps(0, schema)" :disabled="!initRecord.temperatureMin" />-->
|
||||||
|
<a-select
|
||||||
|
v-model:value="model.temperatureMin"
|
||||||
|
v-bind="bindProps(0, schema)"
|
||||||
|
:disabled="!initRecord.temperatureMin"
|
||||||
|
:options="selectFour.one"
|
||||||
|
/>
|
||||||
<span style="margin: 0 10px">~</span>
|
<span style="margin: 0 10px">~</span>
|
||||||
<a-input-number v-model:value="model.temperatureMax" v-bind="bindProps(1, schema)" :disabled="!initRecord.temperatureMax" />
|
<!-- <a-input-number v-model:value="model.temperatureMax" v-bind="bindProps(1, schema)" :disabled="!initRecord.temperatureMax" />-->
|
||||||
|
<a-select
|
||||||
|
v-model:value="model.temperatureMax"
|
||||||
|
v-bind="bindProps(0, schema)"
|
||||||
|
:disabled="!initRecord.temperatureMax"
|
||||||
|
:options="selectFour.two"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</BasicForm>
|
</BasicForm>
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
@@ -32,6 +63,7 @@
|
|||||||
import { thresholdSchema } from '/@/views/healthMonitor/healMonitorManage/monitorToll/toolManagement/toolManagement.data';
|
import { thresholdSchema } from '/@/views/healthMonitor/healMonitorManage/monitorToll/toolManagement/toolManagement.data';
|
||||||
import { setPeriod } from '/@/views/healthMonitor/healMonitorManage/monitorToll/toolManagement/toolManagement.api';
|
import { setPeriod } from '/@/views/healthMonitor/healMonitorManage/monitorToll/toolManagement/toolManagement.api';
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
|
import { selectFour, selectOne, selectThree, selectTwo } from '/@/views/healthMonitor/healMonitorManage/monitorToll/toolManagement/toolHooks';
|
||||||
// Emits声明
|
// Emits声明
|
||||||
const emit = defineEmits(['register', 'success']);
|
const emit = defineEmits(['register', 'success']);
|
||||||
|
|
||||||
|
|||||||
@@ -86,3 +86,32 @@ export function downloadExcel(url: string, name: string, type = '.xlsx') {
|
|||||||
a.click();
|
a.click();
|
||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const selectOne = {
|
||||||
|
one: getOption(40, 3, 5, true),
|
||||||
|
two: getOption(100, 3, 10, true),
|
||||||
|
};
|
||||||
|
export const selectTwo = {
|
||||||
|
one: getOption(75, 4, 5, true),
|
||||||
|
};
|
||||||
|
export const selectThree = {
|
||||||
|
two: getOption(80, 10, 1, true),
|
||||||
|
};
|
||||||
|
export const selectFour = {
|
||||||
|
one: getOption(34.0, 20, 0.1, false),
|
||||||
|
two: getOption(37.2, 13, 0.1, false),
|
||||||
|
};
|
||||||
|
|
||||||
|
function getOption(start: number, length: number, step: any, b: boolean) {
|
||||||
|
let result: any[] = [];
|
||||||
|
let c = 0;
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
c = parseFloat(start + i * step).toFixed(b ? 0 : 1);
|
||||||
|
result.push({
|
||||||
|
label: c,
|
||||||
|
value: c,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user