修改bug

This commit is contained in:
‘937886381’
2024-01-23 16:22:25 +08:00
parent 05ce0dbd84
commit d5b1d418a8
8 changed files with 79 additions and 56 deletions

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-08 13:46:17
* @LastEditTime: 2024-01-16 14:59:33
* @LastEditTime: 2024-01-22 15:29:53
* @LastEditors: zhp
* @Description:
-->
@@ -92,13 +92,13 @@
</el-col>
<el-col :span="4">
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最小值"
:rules="[{ required: true, message: '最小值', trigger: 'blur' }]">
>
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.minValue"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最大值"
:rules="[{ required: true, message: '最大值', trigger: 'blur' }]">
>
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.maxValue"></el-input>
</el-form-item>
</el-col>
@@ -257,6 +257,7 @@ export default {
methods: {
judgeValue(val, minValue, maxValue, index) {
if (val >= minValue && val <= maxValue) {
console.log(val)
this.dataForm.checkValueList[index].showIcon = true
this.dataForm.checkValueList[index].isStandard = true
} else {
@@ -483,6 +484,7 @@ export default {
minValue: ele.minValue
}
})
console.log(valueList);
getQualityHotMaterialDetList({
mainId: response.data.id
}).then((result) => {
@@ -490,7 +492,7 @@ export default {
return {
name: ele.checkName,
id: ele.id,
checkDetId: ele.id,
checkDetId: ele.checkDetId,
checkValue: ele.checkValue,
maxValue:null,
minValue: null
@@ -501,28 +503,31 @@ export default {
return {
mainId: ele.mainId,
id: ele.id,
checkDetId: ele.id,
checkDetId: ele.checkDetId,
checkValue: ele.checkValue,
isStandard: true,
showIcon: false,
}
})
valueList.forEach((ele, index) => {
if (this.ingredientList[index].checkDetId >= ele.checkDetId) {
this.ingredientList[index].minValue = ele.minValue
this.ingredientList[index].maxValue = ele.maxValue
}
})
valueList.forEach((ele,index) => {
console.log(ele);
if (this.dataForm.checkValueList[index].checkDetId >= ele.checkDetId && this.dataForm.checkValueList[index].checkValue >= ele.minValue && this.dataForm.checkValueList[index].checkValue <= ele.maxValue) {
this.dataForm.checkValueList[index].showIcon = true
this.dataForm.checkValueList[index].isStandard = true
} else {
this.dataForm.checkValueList[index].showIcon = true
this.dataForm.checkValueList[index].isStandard = false
this.ingredientList.forEach((ele, i) => {
valueList.forEach((item, index) => {
if (ele.checkDetId == item.checkDetId) {
this.ingredientList[i].minValue = item.minValue
this.ingredientList[i].maxValue = item.maxValue
}
// })
})
})
valueList.forEach((ele, index) => {
this.dataForm.checkValueList.forEach((item, i) => {
if (ele.checkDetId == item.checkDetId && item.checkValue >= ele.minValue && item.checkValue <= ele.maxValue) {
console.log(1111)
item.showIcon = true
item.isStandard = true
} else {
item.showIcon = true
item.isStandard = false
}
})
})
})
});