Browse Source

fix: 大小对比

master
guoapeng 1 month ago
parent
commit
0d5c8d8d10
  1. 8
      src/components/craft/AddCraft/index.vue
  2. 2
      src/components/home/ExtractLiquid/index.vue
  3. 6
      src/components/home/SetTemperature/index.vue

8
src/components/craft/AddCraft/index.vue

@ -75,18 +75,18 @@ const okHandle = async () => {
else {
step.params.time = undefined
}
if (step.params.temperature > heatMax.value && step.method === 'anneal') {
if (+step.params.temperature > +annealMax.value && step.method === 'anneal') {
errorMsg.push(`步骤${index + 1}: 退火温度不能超过${annealMax.value}`)
}
if (step.params.temperature > 200 && step.method === 'heat') {
if (+step.params.temperature > +heatMax.value && step.method === 'heat') {
errorMsg.push(`步骤${index + 1}: 加热温度不能超过${heatMax.value}`)
}
if (step.params.temperature > 200 && step.method === 'dry') {
if (+step.params.temperature > +dryMax.value && step.method === 'dry') {
errorMsg.push(`步骤${index + 1}: 烘干温度不能超过${dryMax.value}`)
}
}
if (['clean', 'reduceLiquid'].includes(step.method)) {
if (step.params.height > heightMax.value) {
if (+step.params.height > +heightMax.value) {
errorMsg.push(`步骤${index + 1}: 针头高度不能超过${heightMax.value}mm`)
}
}

2
src/components/home/ExtractLiquid/index.vue

@ -54,7 +54,7 @@ const validateHandle1 = (rule: any, value: any, callback: any) => {
callback(new Error('请输入高度'))
}
else
if (value && (value < 0 || value > heightMax.value)) {
if (value && (value < 0 || +value > +heightMax.value)) {
callback(new Error(`针头高度范围0-${heightMax.value}mm`))
}
else {

6
src/components/home/SetTemperature/index.vue

@ -35,7 +35,7 @@ const form = ref({
const formRef = ref()
const validateHandle1 = (rule: any, value: any, callback: any) => {
if (value && (value < 0 || value > heatMax.value)) {
if (value && (value < 0 || +value > +heatMax.value)) {
callback(new Error(`加热温度设置范围0℃-${heatMax.value}`))
}
else {
@ -43,7 +43,7 @@ const validateHandle1 = (rule: any, value: any, callback: any) => {
}
}
const validateHandle2 = (rule: any, value: any, callback: any) => {
if (value && (value < 0 || value > dryMax.value)) {
if (value && (value < 0 || +value > +dryMax.value)) {
callback(new Error(`烘干温度设置范围0℃-${dryMax.value}`))
}
else {
@ -51,7 +51,7 @@ const validateHandle2 = (rule: any, value: any, callback: any) => {
}
}
const validateHandle3 = (rule: any, value: any, callback: any) => {
if (value && (value < 0 || value > annealMax.value)) {
if (value && (value < 0 || +value > +annealMax.value)) {
callback(new Error(`退火温度设置范围0℃-${annealMax.value}`))
}
else {

Loading…
Cancel
Save