rev:球磨参数修改以及工艺指令卡参数修改

This commit is contained in:
2024-09-10 14:22:18 +08:00
parent 189397697e
commit cbec03671b
2 changed files with 114 additions and 0 deletions

View File

@@ -47,6 +47,7 @@
v-model="tableData[scope.$index].value"
:controls="false"
controls-position="right"
@blur="blurOne(scope.row)"
precision="2"
style="width: 100px"
:min="0"
@@ -120,6 +121,46 @@ export default {
duration: 2500
})
},
blurOne(data) {
if (data.para_code === 'QM001') {
if (data.value !== undefined) {
if (parseFloat(data.value) >= 0 && parseFloat(data.value) <= 100) {
const QM002 = 100 - parseFloat(data.value)
for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].para_code === 'QM002') {
this.tableData[i].value = QM002
}
}
} else {
for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].para_code === 'QM001') {
this.tableData[i].value = undefined
}
}
this.notify('含水量参数必须在0-100之间', 'info')
}
}
}
if (data.para_code === 'QM002') {
if (data.value !== undefined) {
if (parseFloat(data.value) >= 0 && parseFloat(data.value) <= 100) {
const QM001 = 100 - parseFloat(data.value)
for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].para_code === 'QM001') {
this.tableData[i].value = QM001
}
}
} else {
for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].para_code === 'QM002') {
this.tableData[i].value = undefined
}
}
this.notify('含酒精量参数必须在0-100之间', 'info')
}
}
}
},
close() {
this.$emit('update:dialogShow', false)
}