Commit 5a523db5 authored by 高宇's avatar 高宇

1.修改 检查表 未测试

parent 1f8b112c
...@@ -141,13 +141,13 @@ ...@@ -141,13 +141,13 @@
@input="getCalculateDifference" @input="getCalculateDifference"
/> />
</el-form-item> </el-form-item>
<el-form-item label="PX:" class="inspectionStandardLabel" prop="standonePX"> <el-form-item label="PX:" class="inspectionStandardLabel" prop="standonePx">
<el-input <el-input
v-model="inspectJbAl2o3List.standonePX" v-model="inspectJbAl2o3List.standonePx"
class="inspectionStandardsInput" class="inspectionStandardsInput"
:maxlength="IRMAXLENGTHONE" :maxlength="IRMAXLENGTHONE"
:disabled="firstFromDisabled" :disabled="firstFromDisabled"
@input="getCalculateDifference" @input="handleCompare"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[0].differenceValue" :text="inspectJbAl2o3List.recode1[0].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[1].differenceValue" :text="inspectJbAl2o3List.recode1[1].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[2].differenceValue" :text="inspectJbAl2o3List.recode1[2].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -341,7 +341,7 @@ ...@@ -341,7 +341,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[3].differenceValue" :text="inspectJbAl2o3List.recode1[3].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -391,7 +391,7 @@ ...@@ -391,7 +391,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[4].differenceValue" :text="inspectJbAl2o3List.recode1[4].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -441,7 +441,7 @@ ...@@ -441,7 +441,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[5].differenceValue" :text="inspectJbAl2o3List.recode1[5].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -491,7 +491,7 @@ ...@@ -491,7 +491,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[6].differenceValue" :text="inspectJbAl2o3List.recode1[6].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -541,7 +541,7 @@ ...@@ -541,7 +541,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[7].differenceValue" :text="inspectJbAl2o3List.recode1[7].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -641,7 +641,7 @@ ...@@ -641,7 +641,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[9].differenceValue" :text="inspectJbAl2o3List.recode1[9].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -691,7 +691,7 @@ ...@@ -691,7 +691,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[10].differenceValue" :text="inspectJbAl2o3List.recode1[10].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -741,7 +741,7 @@ ...@@ -741,7 +741,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[11].differenceValue" :text="inspectJbAl2o3List.recode1[11].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -791,7 +791,7 @@ ...@@ -791,7 +791,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[12].differenceValue" :text="inspectJbAl2o3List.recode1[12].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -841,7 +841,7 @@ ...@@ -841,7 +841,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[13].differenceValue" :text="inspectJbAl2o3List.recode1[13].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -891,7 +891,7 @@ ...@@ -891,7 +891,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode1[14].differenceValue" :text="inspectJbAl2o3List.recode1[14].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -958,12 +958,13 @@ ...@@ -958,12 +958,13 @@
@input="getCalculateDifferences" @input="getCalculateDifferences"
/> />
</el-form-item> </el-form-item>
<el-form-item label="PX:" class="inspectionStandardLabel" label-width="80" prop="standtwoPX"> <el-form-item label="PX:" class="inspectionStandardLabel" label-width="80" prop="standtwoPx">
<el-input <el-input
v-model="inspectJbAl2o3List.standtwoPX" v-model="inspectJbAl2o3List.standtwoPx"
:maxlength="IRMAXLENGTHTWO" :maxlength="IRMAXLENGTHTWO"
:disabled="firstFromDisabled" :disabled="firstFromDisabled"
class="inspectionStandardsInput" class="inspectionStandardsInput"
@input="handleCompareTwo"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -1007,7 +1008,7 @@ ...@@ -1007,7 +1008,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[0].differenceValue" :text="inspectJbAl2o3List.recode2[0].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1057,7 +1058,7 @@ ...@@ -1057,7 +1058,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[1].differenceValue" :text="inspectJbAl2o3List.recode2[1].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1107,7 +1108,7 @@ ...@@ -1107,7 +1108,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[2].differenceValue" :text="inspectJbAl2o3List.recode2[2].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1157,7 +1158,7 @@ ...@@ -1157,7 +1158,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[3].differenceValue" :text="inspectJbAl2o3List.recode2[3].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1207,7 +1208,7 @@ ...@@ -1207,7 +1208,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[4].differenceValue" :text="inspectJbAl2o3List.recode2[4].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1257,7 +1258,7 @@ ...@@ -1257,7 +1258,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[5].differenceValue" :text="inspectJbAl2o3List.recode2[5].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1307,7 +1308,7 @@ ...@@ -1307,7 +1308,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[6].differenceValue" :text="inspectJbAl2o3List.recode2[6].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1357,7 +1358,7 @@ ...@@ -1357,7 +1358,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[7].differenceValue" :text="inspectJbAl2o3List.recode2[7].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1407,7 +1408,7 @@ ...@@ -1407,7 +1408,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[8].differenceValue" :text="inspectJbAl2o3List.recode2[8].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1457,7 +1458,7 @@ ...@@ -1457,7 +1458,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[9].differenceValue" :text="inspectJbAl2o3List.recode2[9].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1507,7 +1508,7 @@ ...@@ -1507,7 +1508,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[10].differenceValue" :text="inspectJbAl2o3List.recode2[10].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1557,7 +1558,7 @@ ...@@ -1557,7 +1558,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[11].differenceValue" :text="inspectJbAl2o3List.recode2[11].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1607,7 +1608,7 @@ ...@@ -1607,7 +1608,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[12].differenceValue" :text="inspectJbAl2o3List.recode2[12].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1657,7 +1658,7 @@ ...@@ -1657,7 +1658,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[13].differenceValue" :text="inspectJbAl2o3List.recode2[13].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -1707,7 +1708,7 @@ ...@@ -1707,7 +1708,7 @@
</div> </div>
<div class="Value"> <div class="Value">
<TextToolTip <TextToolTip
:text="inspectJbAl2o3List.recode2[14].differenceValue" :text="inspectJbAl2o3List.recode2[14].differenceValue3"
:max-length="8" :max-length="8"
:disabled-show="false" :disabled-show="false"
/> />
...@@ -2933,6 +2934,14 @@ export default { ...@@ -2933,6 +2934,14 @@ export default {
{ required: true, message: '请输入检验标准', trigger: 'blur' }, { required: true, message: '请输入检验标准', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' } { pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }
], ],
standtwoPx:[
{ required: true, message: '请输入px', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }
],
standonePx:[
{ required: true, message: '请输入PX:', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }
],
standtwoPlus: [ standtwoPlus: [
{ required: true, message: '请输入检验标准', trigger: 'blur' }, { required: true, message: '请输入检验标准', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }, { pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' },
...@@ -3073,8 +3082,8 @@ export default { ...@@ -3073,8 +3082,8 @@ export default {
standtwoPlus: undefined, standtwoPlus: undefined,
standoneCy: 0.02, standoneCy: 0.02,
standtwoCy: 0.02, standtwoCy: 0.02,
standtwoPX: undefined, standtwoPx: undefined,
standonePX: undefined, standonePx: undefined,
ossIdList: [], ossIdList: [],
recode1: [], recode1: [],
recode2: [], recode2: [],
...@@ -3216,6 +3225,17 @@ export default { ...@@ -3216,6 +3225,17 @@ export default {
this.handleCyPn() this.handleCyPn()
}, },
methods: { methods: {
// 当px发生变化
handleCompare() {
for (var i=0;i<15;i++) {
this.handleData1Input(i)
}
},
handleCompareTwo() {
for (var i=0;i<15;i++) {
this.handleData2Input(i)
}
},
// 切换厂家 // 切换厂家
handleJcCjChange(value) { handleJcCjChange(value) {
// 如果切换到第一个厂家时,将 11-15 21-25个输入框禁用并且情空数据 // 如果切换到第一个厂家时,将 11-15 21-25个输入框禁用并且情空数据
...@@ -3471,9 +3491,19 @@ export default { ...@@ -3471,9 +3491,19 @@ export default {
const num2 = parseFloat(this.inspectJbAl2o3List.recode1[index + 1].recordData) const num2 = parseFloat(this.inspectJbAl2o3List.recode1[index + 1].recordData)
this.inspectJbAl2o3List.recode1[index + 1].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode1[index + 1].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS))
this.inspectJbAl2o3List.recode1[index + 1].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode1[index + 1].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS))
if (this.inspectJbAl2o3List.standonePx && this.inspectJbAl2o3List.standonePx != '') {
if (this.inspectJbAl2o3List.recode1[index + 1].differenceValue > this.inspectJbAl2o3List.standonePx) {
this.inspectJbAl2o3List.recode1[index + 1].differenceValue3 = '不合格'
} else {
this.inspectJbAl2o3List.recode1[index + 1].differenceValue3 = '合格'
}
} else {
this.inspectJbAl2o3List.recode1[index + 1].differenceValue3 = ''
}
} else { } else {
this.inspectJbAl2o3List.recode1[index + 1].differenceValue = '' this.inspectJbAl2o3List.recode1[index + 1].differenceValue = ''
this.inspectJbAl2o3List.recode1[index + 1].differenceValue1 = '' this.inspectJbAl2o3List.recode1[index + 1].differenceValue1 = ''
this.inspectJbAl2o3List.recode1[index + 1].differenceValue3 = ''
} }
} else { } else {
/** /**
...@@ -3485,9 +3515,19 @@ export default { ...@@ -3485,9 +3515,19 @@ export default {
const num2 = parseFloat(this.inspectJbAl2o3List.recode1[index - 1].recordData) const num2 = parseFloat(this.inspectJbAl2o3List.recode1[index - 1].recordData)
this.inspectJbAl2o3List.recode1[index].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode1[index].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS))
this.inspectJbAl2o3List.recode1[index].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode1[index].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS))
if (this.inspectJbAl2o3List.standonePx && this.inspectJbAl2o3List.standonePx != '') {
if (this.inspectJbAl2o3List.recode1[index].differenceValue >= this.inspectJbAl2o3List.standonePx) {
this.inspectJbAl2o3List.recode1[index].differenceValue3 = '合格'
} else {
this.inspectJbAl2o3List.recode1[index].differenceValue3 = '不合格'
}
} else {
this.inspectJbAl2o3List.recode1[index].differenceValue3 = ''
}
} else { } else {
this.inspectJbAl2o3List.recode1[index].differenceValue = '' this.inspectJbAl2o3List.recode1[index].differenceValue = ''
this.inspectJbAl2o3List.recode1[index].differenceValue1 = '' this.inspectJbAl2o3List.recode1[index].differenceValue1 = ''
this.inspectJbAl2o3List.recode1[index].differenceValue3 = ''
} }
} }
if (index < this.inspectJbAl2o3List.recode1.length) { if (index < this.inspectJbAl2o3List.recode1.length) {
...@@ -3595,9 +3635,19 @@ export default { ...@@ -3595,9 +3635,19 @@ export default {
const num2 = parseFloat(this.inspectJbAl2o3List.recode2[index + 1].recordData) const num2 = parseFloat(this.inspectJbAl2o3List.recode2[index + 1].recordData)
this.inspectJbAl2o3List.recode2[index + 1].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode2[index + 1].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS))
this.inspectJbAl2o3List.recode2[index + 1].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode2[index + 1].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS))
if (this.inspectJbAl2o3List.standonePx) {
if (this.inspectJbAl2o3List.recode2[index + 1].differenceValue > this.inspectJbAl2o3List.standtwoPx) {
this.inspectJbAl2o3List.recode2[index + 1].differenceValue3 = '不合格'
} else {
this.inspectJbAl2o3List.recode2[index + 1].differenceValue3 = '合格'
}
} else {
this.inspectJbAl2o3List.recode2[index + 1].differenceValue3 = ''
}
} else { } else {
this.inspectJbAl2o3List.recode2[index + 1].differenceValue = '' this.inspectJbAl2o3List.recode2[index + 1].differenceValue = ''
this.inspectJbAl2o3List.recode2[index + 1].differenceValue1 = '' this.inspectJbAl2o3List.recode2[index + 1].differenceValue1 = ''
this.inspectJbAl2o3List.recode2[index + 1].differenceValue3 = ''
} }
} else { } else {
/** /**
...@@ -3609,9 +3659,19 @@ export default { ...@@ -3609,9 +3659,19 @@ export default {
const num2 = parseFloat(this.inspectJbAl2o3List.recode2[index - 1].recordData) const num2 = parseFloat(this.inspectJbAl2o3List.recode2[index - 1].recordData)
this.inspectJbAl2o3List.recode2[index].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode2[index].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS))
this.inspectJbAl2o3List.recode2[index].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode2[index].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS))
if (this.inspectJbAl2o3List.standonePx) {
if (this.inspectJbAl2o3List.recode2[index].differenceValue > this.inspectJbAl2o3List.standtwoPx) {
this.inspectJbAl2o3List.recode2[index].differenceValue3 = '不合格'
} else {
this.inspectJbAl2o3List.recode2[index].differenceValue3 = '合格'
}
} else {
this.inspectJbAl2o3List.recode2[index].differenceValue3 = ''
}
} else { } else {
this.inspectJbAl2o3List.recode2[index].differenceValue = '' this.inspectJbAl2o3List.recode2[index].differenceValue = ''
this.inspectJbAl2o3List.recode2[index].differenceValue1 = '' this.inspectJbAl2o3List.recode2[index].differenceValue1 = ''
this.inspectJbAl2o3List.recode2[index].differenceValue3 = ''
} }
} }
if (index < this.inspectJbAl2o3List.recode2.length) { if (index < this.inspectJbAl2o3List.recode2.length) {
...@@ -3708,28 +3768,40 @@ export default { ...@@ -3708,28 +3768,40 @@ export default {
}, },
// 计算标签一的校验标准1 和 检验标准2 之间的差值 // 计算标签一的校验标准1 和 检验标准2 之间的差值
getCalculateDifference() { getCalculateDifference() {
// if (this.inspectJbAl2o3List.standardOne && this.inspectJbAl2o3List.standardOne !== '' && this.inspectJbAl2o3List.standonePlus && this.inspectJbAl2o3List.standonePlus != '' ) { for (var i = 0; i < 15; i++) {
// const limitOne = parseFloat(this.inspectJbAl2o3List.standardOne )
// const limitTwo = parseFloat(this.inspectJbAl2o3List.standonePlus)
// this.inspectJbAl2o3List.standoneCy = Math.abs(limitOne - limitTwo)
// } else {
// this.inspectJbAl2o3List.standoneCy = ''
// }
for (var i = 0; i < 10; i++) {
this.calculateStandardTagOne(i, this.inspectJbAl2o3List.standardOne, this.inspectJbAl2o3List.standonePlus, this.inspectJbAl2o3List.standoneCy) this.calculateStandardTagOne(i, this.inspectJbAl2o3List.standardOne, this.inspectJbAl2o3List.standonePlus, this.inspectJbAl2o3List.standoneCy)
} }
}, },
// 保留两位小数
reserve(value) {
let s = '0'
if (value.lastIndexOf('.') === -1) {
s = value + '.00';
console.log('s', s);
} else {
// 如果字符串中包含句点,则对字符串进行处理以保留两位小数并进行四舍五入
let decimalIndex = value.lastIndexOf('.');
let integerValue = value.substring(0, decimalIndex); // 获取小数点前的整数部分
let decimalValue = value.substring(decimalIndex); // 获取小数点及其后面的部分
console.log('integerValue',integerValue)
console.log('decimalValue',decimalValue)
if (decimalValue.length <= 3) {
// 如果小数部分长度小于等于3,说明已经有两位小数或没有小数
s = value; // 不需要进行四舍五入,保留原始值
} else {
// 否则,对小数部分进行四舍五入
let roundedDecimal = parseFloat(decimalValue).toFixed(2);
console.log('roundedDecimal',roundedDecimal)
console.log('integerValue', integerValue + parseFloat(roundedDecimal)); // 这里需要将 roundedDecimal 转换成数字
s = Number(integerValue) + parseFloat(roundedDecimal); // 将整数部分和四舍五入后的小数部分拼接起来
}
}
return String(s)
},
// 计算标签一的校验标准1 和 检验标准2 之间的差值 // 计算标签一的校验标准1 和 检验标准2 之间的差值
getCalculateDifferences() { getCalculateDifferences() {
// if (this.inspectJbAl2o3List.standardTwo && this.inspectJbAl2o3List.standardTwo !== '' && this.inspectJbAl2o3List.standtwoPlus && this.inspectJbAl2o3List.standtwoPlus != '' ) { for (var i = 0; i < 15; i++) {
// const limitOne = parseFloat(this.inspectJbAl2o3List.standardTwo )
// const limitTwo = parseFloat(this.inspectJbAl2o3List.standtwoPlus)
// this.inspectJbAl2o3List.standtwoCy = Math.abs(limitOne - limitTwo)
// } else {
// this.inspectJbAl2o3List.standtwoPlus = ''
// }
for (var i = 0; i < 10; i++) {
this.calculateStandardTagTwo(i, this.inspectJbAl2o3List.standardTwo, this.inspectJbAl2o3List.standtwoPlus, this.inspectJbAl2o3List.standtwoCy) this.calculateStandardTagTwo(i, this.inspectJbAl2o3List.standardTwo, this.inspectJbAl2o3List.standtwoPlus, this.inspectJbAl2o3List.standtwoCy)
} }
}, },
...@@ -4037,6 +4109,22 @@ export default { ...@@ -4037,6 +4109,22 @@ export default {
} }
}, },
getInspect() { getInspect() {
if (this.inspectJbAl2o3List.standardOne && this.inspectJbAl2o3List.standardOne !== '') {
this.inspectJbAl2o3List.standardOne = this.reserve(this.inspectJbAl2o3List.standardOne)
this.getCalculateDifference()
}
if (this.inspectJbAl2o3List.standonePlus && this.inspectJbAl2o3List.standonePlus !== '') {
this.inspectJbAl2o3List.standonePlus = this.reserve(this.inspectJbAl2o3List.standonePlus)
this.getCalculateDifference()
}
if (this.inspectJbAl2o3List.standardTwo && this.inspectJbAl2o3List.standardTwo !== '') {
this.inspectJbAl2o3List.standardTwo = this.reserve(this.inspectJbAl2o3List.standardTwo)
this.getCalculateDifferences()
}
if (this.inspectJbAl2o3List.standtwoPlus && this.inspectJbAl2o3List.standtwoPlus !== '') {
this.inspectJbAl2o3List.standtwoPlus = this.reserve(this.inspectJbAl2o3List.standtwoPlus)
this.getCalculateDifferences()
}
const time = parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}') const time = parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
this.inspectJbAl2o3List.oneJcDate = time this.inspectJbAl2o3List.oneJcDate = time
getInfo().then(res => { getInfo().then(res => {
...@@ -4064,105 +4152,120 @@ export default { ...@@ -4064,105 +4152,120 @@ export default {
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
} }
] ]
this.inspectJbAl2o3List.recode2 = [ this.inspectJbAl2o3List.recode2 = [
...@@ -4171,105 +4274,120 @@ export default { ...@@ -4171,105 +4274,120 @@ export default {
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
} }
] ]
this.inspectJbAl2o3List.recode3 = [ this.inspectJbAl2o3List.recode3 = [
...@@ -4278,98 +4396,112 @@ export default { ...@@ -4278,98 +4396,112 @@ export default {
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
// 记录数据 // 记录数据
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
}, },
{ {
...@@ -4377,7 +4509,8 @@ export default { ...@@ -4377,7 +4509,8 @@ export default {
recordData: '', recordData: '',
differenceValue: '', differenceValue: '',
differenceValue1: '', differenceValue1: '',
differenceValue2: '' differenceValue2: '',
differenceValue3: ''
} }
] ]
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment