Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡宝山
template_vue
Commits
0884688d
Commit
0884688d
authored
Mar 14, 2024
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除按钮
parent
f5055d6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
301 additions
and
96 deletions
+301
-96
templateFirst.vue
src/views/template/templateFirst.vue
+301
-96
No files found.
src/views/template/templateFirst.vue
View file @
0884688d
...
...
@@ -107,17 +107,30 @@
<!-- 检查内容-->
<div
class=
"recordOneContainer"
>
<div
class=
"inspectionStandards"
>
<el-form
ref=
"inspectJbAl2o3List"
:model=
"inspectJbAl2o3List"
:rules=
"rules"
>
<el-form-item
label=
"检验标准1:"
label-width=
"80"
prop=
"standardOne"
>
<el-form
ref=
"inspectJbAl2o3List"
label-width=
"80"
label-position=
"right"
:model=
"inspectJbAl2o3List"
:rules=
"rules"
>
<el-form-item
label=
"检验标准1:"
prop=
"standardOne"
>
<el-input
v-model=
"inspectJbAl2o3List.standardOne"
class=
"inspectionStandardsInput"
:maxlength=
"IRMAXLENGTHONE"
:disabled=
"firstFromDisabled"
@
blur=
"getInspect"
@
input=
"
calculateStandard(1)
"
@
input=
"
getCalculateDifference
"
/>
</el-form-item>
<el-form-item
label=
"检验标准2:"
prop=
"standonePlus"
>
<el-input
v-model=
"inspectJbAl2o3List.standonePlus"
class=
"inspectionStandardsInput"
:maxlength=
"IRMAXLENGTHONE"
:disabled=
"firstFromDisabled"
@
blur=
"getInspect"
@
input=
"getCalculateDifference"
/>
</el-form-item>
<el-form-item
label=
"差异:"
class=
"inspectionStandardLabel"
prop=
"standoneCy"
>
<span>
{{
inspectJbAl2o3List
.
standoneCy
}}
</span>
</el-form-item>
</el-form>
</div>
<div
class=
"recordOneTitle"
>
...
...
@@ -171,7 +184,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode1[0].differenceValue2 === '合格'? 'compareValue' : 'eorrCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode1[0].differenceValue2"
:max-length=
"8"
...
...
@@ -221,7 +234,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode1[1].differenceValue2 === '合格'? 'compareValue' : 'eorrCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode1[1].differenceValue2"
:max-length=
"8"
...
...
@@ -271,7 +284,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode1[2].differenceValue2 === '合格'? 'compareValue' : 'eorrCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode1[2].differenceValue2"
:max-length=
"8"
...
...
@@ -321,7 +334,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode1[3].differenceValue2 === '合格'? 'compareValue' : 'eorrCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode1[3].differenceValue2"
:max-length=
"8"
...
...
@@ -371,7 +384,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode1[4].differenceValue2 === '合格'? 'compareValue' : 'eorrCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode1[4].differenceValue2"
:max-length=
"8"
...
...
@@ -421,7 +434,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode1[5].differenceValue2 === '合格'? 'compareValue' : 'eorrCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode1[5].differenceValue2"
:max-length=
"8"
...
...
@@ -471,7 +484,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode1[6].differenceValue2 === '合格'? 'compareValue' : 'eorrCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode1[6].differenceValue2"
:max-length=
"8"
...
...
@@ -521,7 +534,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode1[7].differenceValue2 === '合格'? 'compareValue' : 'eorrCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode1[7].differenceValue2"
:max-length=
"8"
...
...
@@ -571,7 +584,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode1[8].differenceValue2 === '合格'? 'compareValue' : 'eorrCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode1[8].differenceValue2"
:max-length=
"8"
...
...
@@ -621,7 +634,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode1[9].differenceValue2 === '合格'? 'compareValue' : 'eorrCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode1[9].differenceValue2"
:max-length=
"8"
...
...
@@ -646,16 +659,29 @@
<div
class=
"recordOneContainer"
>
<div
class=
"inspectionStandards"
>
<el-form
ref=
"inspectJbAl2o3List"
:model=
"inspectJbAl2o3List"
:rules=
"rules"
>
<el-form-item
label=
"检验标准
2
:"
label-width=
"80"
prop=
"standardTwo"
>
<el-form-item
label=
"检验标准
1
:"
label-width=
"80"
prop=
"standardTwo"
>
<el-input
v-model=
"inspectJbAl2o3List.standardTwo"
:maxlength=
"IRMAXLENGTHTWO"
:disabled=
"firstFromDisabled"
class=
"inspectionStandardsInput"
@
blur=
"getInspect"
@
input=
"
calculateStandard(2)
"
@
input=
"
getCalculateDifferences
"
/>
</el-form-item>
<el-form-item
label=
"检验标准2:"
label-width=
"80"
prop=
"standtwoPlus"
>
<el-input
v-model=
"inspectJbAl2o3List.standtwoPlus"
:maxlength=
"IRMAXLENGTHTWO"
:disabled=
"firstFromDisabled"
class=
"inspectionStandardsInput"
@
blur=
"getInspect"
@
input=
"getCalculateDifferences"
/>
</el-form-item>
<el-form-item
label=
"差异:"
class=
"inspectionStandardLabel"
label-width=
"80"
prop=
"standtwoCy"
>
<span>
{{
inspectJbAl2o3List
.
standtwoCy
}}
</span>
</el-form-item>
</el-form>
</div>
<div
class=
"recordOneTitle"
>
...
...
@@ -709,7 +735,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode2[0].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode2[0].differenceValue2"
:max-length=
"8"
...
...
@@ -759,7 +785,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode2[1].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode2[1].differenceValue2"
:max-length=
"8"
...
...
@@ -809,7 +835,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode2[2].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode2[2].differenceValue2"
:max-length=
"8"
...
...
@@ -859,7 +885,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode2[3].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode2[3].differenceValue2"
:max-length=
"8"
...
...
@@ -909,7 +935,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode2[4].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode2[4].differenceValue2"
:max-length=
"8"
...
...
@@ -959,7 +985,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode2[5].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode2[5].differenceValue2"
:max-length=
"8"
...
...
@@ -1009,7 +1035,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode2[6].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode2[6].differenceValue2"
:max-length=
"8"
...
...
@@ -1059,7 +1085,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode2[7].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode2[7].differenceValue2"
:max-length=
"8"
...
...
@@ -1109,7 +1135,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode2[8].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode2[8].differenceValue2"
:max-length=
"8"
...
...
@@ -1159,7 +1185,7 @@
:disabled-show=
"false"
/>
</div>
<div
class=
"compareValue
"
>
<div
:class=
"inspectJbAl2o3List.recode2[9].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'
"
>
<TextToolTip
:text=
"inspectJbAl2o3List.recode2[9].differenceValue2"
:max-length=
"8"
...
...
@@ -2352,10 +2378,21 @@ export default {
{
required
:
true
,
message
:
'请输入检验标准'
,
trigger
:
'blur'
},
{
pattern
:
/^
(
0|
[
1-9
]\d
*
)(\.\d{0,6})?
$/
,
message
:
'请输入有效的数字'
,
trigger
:
'change'
}
],
standonePlus
:
[
{
required
:
true
,
message
:
'请输入检验标准'
,
trigger
:
'blur'
},
{
pattern
:
/^
(
0|
[
1-9
]\d
*
)(\.\d{0,6})?
$/
,
message
:
'请输入有效的数字'
,
trigger
:
'change'
},
{
validator
:
this
.
validateMethod3
,
trigger
:
'blur'
}
],
standardTwo
:
[
{
required
:
true
,
message
:
'请输入检验标准'
,
trigger
:
'blur'
},
{
pattern
:
/^
(
0|
[
1-9
]\d
*
)(\.\d{0,6})?
$/
,
message
:
'请输入有效的数字'
,
trigger
:
'change'
}
],
standtwoPlus
:
[
{
required
:
true
,
message
:
'请输入检验标准'
,
trigger
:
'blur'
},
{
pattern
:
/^
(
0|
[
1-9
]\d
*
)(\.\d{0,6})?
$/
,
message
:
'请输入有效的数字'
,
trigger
:
'change'
},
{
validator
:
this
.
validateMethod4
,
trigger
:
'blur'
}
],
limitOne
:
[
{
required
:
true
,
message
:
'请输入检验标准'
,
trigger
:
'blur'
},
{
pattern
:
/^
(
0|
[
1-9
]\d
*
)(\.\d{0,6})?
$/
,
message
:
'请输入有效的数字'
,
trigger
:
'change'
},
...
...
@@ -2487,6 +2524,10 @@ export default {
wgFf
:
''
,
wgTf
:
''
,
limitData
:
undefined
,
standonePlus
:
undefined
,
standtwoPlus
:
undefined
,
standoneCy
:
undefined
,
standtwoCy
:
undefined
,
ossIdList
:
[],
recode1
:
[],
recode2
:
[],
...
...
@@ -2726,6 +2767,28 @@ export default {
callback
()
}
},
validateMethod3
(
rule
,
value
,
callback
)
{
if
(
value
&&
value
!==
''
&&
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standonePlus
!==
''
)
{
if
(
Number
(
this
.
inspectJbAl2o3List
.
standardOne
)
<
Number
(
this
.
inspectJbAl2o3List
.
standonePlus
))
{
callback
()
}
else
{
callback
(
new
Error
(
'检验标准2要大于检验标准1'
))
}
}
else
{
callback
()
}
},
validateMethod4
(
rule
,
value
,
callback
)
{
if
(
value
&&
value
!==
''
&&
this
.
inspectJbAl2o3List
.
standardTwo
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
!==
''
)
{
if
(
Number
(
this
.
inspectJbAl2o3List
.
standardTwo
)
<
Number
(
this
.
inspectJbAl2o3List
.
standtwoPlus
))
{
callback
()
}
else
{
callback
(
new
Error
(
'检验标准2要大于检验标准1'
))
}
}
else
{
callback
()
}
},
handleCyPn
()
{
const
standard
=
!
isNaN
(
Number
(
this
.
inspectJbAl2o3List
.
wgKx
)
+
...
...
@@ -2799,45 +2862,64 @@ export default {
},
/* 表单1的计算方法*/
handleData1Input
(
index
)
{
console
.
log
(
'进入计算方法'
)
console
.
log
(
'standardOne'
,
this
.
inspectJbAl2o3List
.
standardOne
)
console
.
log
(
'recordData'
,
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
)
if
(
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
undefined
)
{
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue2
=
this
.
digitalFormat
((
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
-
this
.
inspectJbAl2o3List
.
standardOne
).
toFixed
(
this
.
LIMITNGHOURS
))
}
if
(
index
>
0
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
-
1
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
index
-
1
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
)
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
))
}
if
(
index
<
9
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
+
1
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
index
+
1
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
)
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
))
}
if
(
index
<
9
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
===
''
)
{
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue
=
''
this
.
inspectJbAl2o3List
.
recode1
[
index
+
1
].
differenceValue
=
''
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue1
=
''
this
.
inspectJbAl2o3List
.
recode1
[
index
+
1
].
differenceValue1
=
''
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue2
=
''
}
if
(
index
>=
9
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
===
''
)
{
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue2
=
''
}
if
(
index
<
this
.
inspectJbAl2o3List
.
recode1
.
length
)
{
if
(
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
===
''
)
{
this
.
SumList
[
index
]
=
null
// 两种情况 1.单数 2.双数
if
(
index
%
2
===
0
)
{
/**
* 1.单数情况下计算 自身与自身加1 的差值和均值
*
* **/
if
(
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
!==
undefined
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
+
1
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
+
1
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
+
1
].
recordData
!==
undefined
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
index
].
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
].
differenceValue1
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
}
else
{
this
.
SumList
[
index
]
=
Number
(
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
)
this
.
inspectJbAl2o3List
.
recode1
[
index
+
1
].
differenceValue
=
''
this
.
inspectJbAl2o3List
.
recode1
[
index
+
1
].
differenceValue1
=
''
}
}
else
{
/**
* 1.单数情况下计算 自身与自身减一 的差值和均值
*
* **/
if
(
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
-
1
].
recordData
!==
undefined
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
-
1
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
-
1
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
index
-
1
].
recordData
!==
undefined
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
index
].
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
].
differenceValue1
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
}
else
{
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue
=
''
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue1
=
''
}
this
.
calculate
(
this
.
removeEmptyValues
(
this
.
SumList
),
1
)
}
if
(
index
<
this
.
inspectJbAl2o3List
.
recode1
.
length
)
{
if
(
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
===
''
)
{
this
.
SumList
[
index
]
=
null
}
else
{
this
.
SumList
[
index
]
=
Number
(
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
)
}
this
.
calculate
(
this
.
removeEmptyValues
(
this
.
SumList
),
1
)
}
this
.
calculateStandardTagOne
(
index
,
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
)
// console.log('11111', this.SumList)
},
/**
* @description: 判断是否计算 差异与平均
* @author: gaoyu
* @param: index 索引
* @return:
**/
compute
(
index
)
{
var
result
=
false
console
.
log
(
'index'
,
index
%
2
)
if
(
index
%
2
===
1
)
{
result
=
true
}
return
result
},
// 去除数组中的空值
removeEmptyValues
(
arr
,
sys
)
{
return
arr
.
filter
(
value
=>
value
!==
undefined
&&
value
!==
null
&&
value
!==
''
)
...
...
@@ -2905,40 +2987,79 @@ export default {
/* 表单2的计算方法*/
handleData2Input
(
index
)
{
if
(
this
.
inspectJbAl2o3List
.
standardTwo
!==
''
&&
this
.
inspectJbAl2o3List
.
standardTwo
!==
undefined
)
{
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue2
=
this
.
digitalFormat
((
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
-
this
.
inspectJbAl2o3List
.
standardTwo
).
toFixed
(
this
.
LIMITNGHOURS
))
}
if
(
index
>
0
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
-
1
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
index
-
1
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
)
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
))
}
if
(
index
<
9
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
+
1
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
index
+
1
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
)
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
))
}
if
(
index
<
9
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
===
''
)
{
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue
=
''
this
.
inspectJbAl2o3List
.
recode2
[
index
+
1
].
differenceValue
=
''
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue1
=
''
this
.
inspectJbAl2o3List
.
recode2
[
index
+
1
].
differenceValue1
=
''
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue2
=
''
}
if
(
index
>=
9
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
===
''
)
{
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue2
=
''
}
if
(
index
<
this
.
inspectJbAl2o3List
.
recode2
.
length
)
{
if
(
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
===
''
)
{
this
.
SumList1
[
index
]
=
null
// 两种情况 1.单数 2.双数
if
(
index
%
2
===
0
)
{
/**
* 1.单数情况下计算 自身与自身加1 的差值和均值
*
* **/
if
(
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
!==
undefined
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
+
1
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
+
1
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
+
1
].
recordData
!==
undefined
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
index
].
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
].
differenceValue1
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
}
else
{
this
.
SumList1
[
index
]
=
Number
(
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
)
this
.
inspectJbAl2o3List
.
recode2
[
index
+
1
].
differenceValue
=
''
this
.
inspectJbAl2o3List
.
recode2
[
index
+
1
].
differenceValue1
=
''
}
}
else
{
/**
* 1.单数情况下计算 自身与自身减一 的差值和均值
*
* **/
if
(
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
-
1
].
recordData
!==
undefined
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
-
1
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
-
1
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode2
[
index
-
1
].
recordData
!==
undefined
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
index
].
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
].
differenceValue1
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
}
else
{
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue
=
''
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue1
=
''
}
this
.
calculate
(
this
.
removeEmptyValues
(
this
.
SumList1
),
2
)
}
if
(
index
<
this
.
inspectJbAl2o3List
.
recode2
.
length
)
{
if
(
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
===
''
)
{
this
.
SumList1
[
index
]
=
null
}
else
{
this
.
SumList1
[
index
]
=
Number
(
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
)
}
this
.
calculate
(
this
.
removeEmptyValues
(
this
.
SumList1
),
2
)
}
this
.
calculateStandardTagTwo
(
index
,
this
.
inspectJbAl2o3List
.
standardTwo
,
this
.
inspectJbAl2o3List
.
standtwoPlus
)
},
calculateStandardTagOne
(
index
,
standardOne
,
standardTwo
)
{
if
(
standardOne
&&
standardOne
!==
null
&&
standardTwo
&&
standardTwo
!==
null
)
{
const
limitOne
=
parseFloat
(
standardOne
)
const
limitTwo
=
parseFloat
(
standardTwo
)
const
recordData
=
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
if
(
recordData
!==
''
)
{
const
num
=
parseFloat
(
recordData
)
if
(
num
>=
limitOne
&&
num
<=
limitTwo
)
{
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue2
=
'合格'
}
else
{
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue2
=
'不合格'
}
}
}
},
calculateStandardTagTwo
(
index
,
standardOne
,
standardTwo
)
{
if
(
standardOne
&&
standardOne
!==
null
&&
standardTwo
&&
standardTwo
!==
null
)
{
const
limitOne
=
parseFloat
(
standardOne
)
const
limitTwo
=
parseFloat
(
standardTwo
)
const
recordData
=
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
if
(
recordData
!==
''
)
{
const
num
=
parseFloat
(
recordData
)
if
(
num
>=
limitOne
&&
num
<=
limitTwo
)
{
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue2
=
'合格'
}
else
{
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue2
=
'不合格'
}
}
}
},
/* 表单3的计算方法*/
...
...
@@ -2985,6 +3106,33 @@ export default {
this
.
limitDifference
=
''
}
},
// 计算标签一的校验标准1 和 检验标准2 之间的差值
getCalculateDifference
()
{
if
(
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standonePlus
!=
''
)
{
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
)
}
},
// 计算标签一的校验标准1 和 检验标准2 之间的差值
getCalculateDifferences
()
{
if
(
this
.
inspectJbAl2o3List
.
standardTwo
&&
this
.
inspectJbAl2o3List
.
standardTwo
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
!=
''
)
{
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
)
}
},
// 获取单号
getJcCode
()
{
...
...
@@ -3083,6 +3231,10 @@ export default {
this
.
inspectJbAl2o3List
.
standardOneData
=
response
.
data
.
standardOneData
this
.
inspectJbAl2o3List
.
standardTwoData
=
response
.
data
.
standardTwoData
// this.inspectJbAl2o3List.recordData = response.data.recordData
this
.
inspectJbAl2o3List
.
standonePlus
=
response
.
data
.
standonePlus
this
.
inspectJbAl2o3List
.
standtwoPlus
=
response
.
data
.
standtwoPlus
this
.
inspectJbAl2o3List
.
standoneCy
=
response
.
data
.
standoneCy
this
.
inspectJbAl2o3List
.
standtwoCy
=
response
.
data
.
standtwoCy
this
.
inspectJbAl2o3List
.
inspector
=
response
.
data
.
inspector
this
.
inspectJbAl2o3List
.
firstHdN
=
response
.
data
.
firstHdN
this
.
inspectJbAl2o3List
.
firstHdPn
=
response
.
data
.
firstHdPn
...
...
@@ -4144,11 +4296,16 @@ export default {
height
:
auto
;
background
:
rgba
(
0
,
87
,
255
,
0
.05
);
border-radius
:
4px
;
.inspectionStandardLabel
{
::v-deep
.el-form-item__label
{
width
:
86px
;
}
}
.inspectionStandards
{
width
:
88%
;
margin-left
:
6%
;
padding-top
:
20px
;
.inspectDifferent
{
font-size
:
14px
;
font-family
:
Microsoft
YaHei
,
Microsoft
YaHei-400
;
...
...
@@ -4286,7 +4443,18 @@ export default {
font-family
:
Microsoft
YaHei
,
Microsoft
YaHei-400
;
font-weight
:
400
;
padding-left
:
8%
;
color
:
#606266
;
color
:
#0057ff
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.eorrCompareValue
{
width
:
25%
;
font-size
:
14px
;
font-family
:
Microsoft
YaHei
,
Microsoft
YaHei-400
;
font-weight
:
400
;
padding-left
:
8%
;
color
:
red
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
...
...
@@ -4370,12 +4538,23 @@ export default {
font-family
:
Microsoft
YaHei
,
Microsoft
YaHei-400
;
font-weight
:
400
;
padding-left
:
8%
;
color
:
#
606266
;
color
:
#
0057ff
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.eorrCompareValue
{
width
:
25%
;
font-size
:
14px
;
font-family
:
Microsoft
YaHei
,
Microsoft
YaHei-400
;
font-weight
:
400
;
padding-left
:
8%
;
color
:
red
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
}
}
...
...
@@ -4677,6 +4856,11 @@ export default {
height
:
40px
;
margin-left
:
6%
;
padding-top
:
20px
;
.inspectionStandardLabel
{
::v-deep
.el-form-item__label
{
width
:
86px
;
}
}
.inspectionStandardsInput
{
width
:
50%
;
...
...
@@ -4801,7 +4985,18 @@ export default {
font-family
:
Microsoft
YaHei
,
Microsoft
YaHei-400
;
font-weight
:
400
;
padding-left
:
8%
;
color
:
#606266
;
color
:
#0057ff
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.errorCompareValue
{
width
:
25%
;
font-size
:
14px
;
font-family
:
Microsoft
YaHei
,
Microsoft
YaHei-400
;
font-weight
:
400
;
padding-left
:
8%
;
color
:
red
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
...
...
@@ -4887,11 +5082,21 @@ export default {
font-family
:
Microsoft
YaHei
,
Microsoft
YaHei-400
;
font-weight
:
400
;
padding-left
:
8%
;
color
:
#606266
;
color
:
#0057ff
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.errorCompareValue
{
width
:
25%
;
font-size
:
14px
;
font-family
:
Microsoft
YaHei
,
Microsoft
YaHei-400
;
font-weight
:
400
;
padding-left
:
8%
;
color
:
red
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment