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
3a7933d7
Commit
3a7933d7
authored
May 01, 2024
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.优化代码
parent
18a40791
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
160 additions
and
771 deletions
+160
-771
templateFirst.vue
src/views/template/templateFirst.vue
+160
-771
No files found.
src/views/template/templateFirst.vue
View file @
3a7933d7
...
...
@@ -2486,6 +2486,52 @@ export default {
components
:
{
TextToolTip
},
data
()
{
return
{
// 十个的下坐标分组
tenGroup
:[
{
number
:
1
,
indexList
:[
0
,
1
]
},
{
number
:
2
,
indexList
:[
2
,
3
]
},
{
number
:
3
,
indexList
:[
4
,
5
]
},
{
number
:
4
,
indexList
:[
6
,
7
]
},
{
number
:
5
,
indexList
:[
8
,
9
]
}
],
// 十五个的下坐标分组
fifteenGroup
:
[
{
number
:
1
,
indexList
:[
0
,
1
,
2
]
},
{
number
:
2
,
indexList
:[
3
,
4
,
5
]
},
{
number
:
3
,
indexList
:[
6
,
7
,
8
]
},
{
number
:
4
,
indexList
:[
9
,
10
,
11
]
},
{
number
:
5
,
indexList
:[
12
,
13
,
14
]
}
],
// 标签一的检查二的差异
discrepancyRecordTwoList
:
[
{
...
...
@@ -3536,284 +3582,60 @@ export default {
obj
.
num
=
this
.
digitalFormat
((
a
).
toFixed
(
this
.
LIMITNGHOURS
))
return
obj
},
/**表单2的计算方法**/
handleRecordTwoInput
(
number
)
{
// 第一组计算
if
(
number
===
1
)
{
// 计算差异值
if
(
this
.
inspectJbAl2o3List
.
recode2
[
0
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
0
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode2
[
1
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
1
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
0
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
1
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
// 差异值
this
.
discrepancyRecordTwoList
[
0
].
value
=
discrepancy
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
console
.
log
(
'平均值'
,
avge
)
this
.
averageRecordTwo
[
0
].
value
=
avge
// 计算第一个判定结果
if
(
this
.
inspectJbAl2o3List
.
standardTwo
&&
this
.
inspectJbAl2o3List
.
standardTwo
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoCy
&&
this
.
inspectJbAl2o3List
.
standtwoCy
!==
''
)
{
// 获取两个最值
if
(
this
.
tenGroup
.
find
(
item
=>
item
.
number
===
number
))
{
// 获取下坐标数组
const
indexList
=
this
.
tenGroup
.
find
(
item
=>
item
.
number
===
number
).
indexList
const
firstIndex
=
indexList
[
0
]
const
secondIndex
=
indexList
[
1
]
// 进行计算
if
(
this
.
inspectJbAl2o3List
.
recode2
[
firstIndex
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
firstIndex
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode2
[
secondIndex
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
secondIndex
].
recordData
!==
''
){
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
firstIndex
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
secondIndex
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
this
.
discrepancyRecordTwoList
[
number
-
1
].
value
=
discrepancy
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
this
.
averageRecordTwo
[
number
-
1
].
value
=
avge
// 计算第一个判定结果
if
(
this
.
inspectJbAl2o3List
.
standardTwo
&&
this
.
inspectJbAl2o3List
.
standardTwo
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoCy
&&
this
.
inspectJbAl2o3List
.
standtwoCy
!==
''
)
{
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardTwo
,
this
.
inspectJbAl2o3List
.
standtwoPlus
,
this
.
inspectJbAl2o3List
.
standtwoCy
)
if
(
min
!==
null
&&
max
!==
null
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
twoRecordOneFirstResult
[
0
].
value
=
'合格'
}
else
{
this
.
twoRecordOneFirstResult
[
0
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordOneFirstResult
[
0
].
value
=
''
}
}
else
{
this
.
twoRecordOneFirstResult
[
0
].
value
=
''
}
// 计算第二哥判断结果
if
(
this
.
inspectJbAl2o3List
.
standtwoPx
&&
this
.
inspectJbAl2o3List
.
standtwoPx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standtwoPx
)
console
.
log
(
'num'
,
num
)
if
(
num
!=
null
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
twoRecordsecondResult
[
0
].
value
=
'合格'
}
else
{
this
.
twoRecordsecondResult
[
0
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordsecondResult
[
0
].
value
=
''
}
}
else
{
this
.
twoRecordsecondResult
[
0
].
value
=
''
}
}
else
{
this
.
discrepancyRecordTwoList
[
0
].
value
=
''
this
.
averageRecordTwo
[
0
].
value
=
''
this
.
twoRecordOneFirstResult
[
0
].
value
=
''
this
.
twoRecordsecondResult
[
0
].
value
=
''
}
}
// 第二组计算
if
(
number
===
2
)
{
if
(
this
.
inspectJbAl2o3List
.
recode2
[
2
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
2
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode2
[
3
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
3
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
2
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
3
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
// 差异值
console
.
log
(
'差异值'
,
discrepancy
)
this
.
discrepancyRecordTwoList
[
1
].
value
=
discrepancy
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
console
.
log
(
'平均值'
,
avge
)
this
.
averageRecordTwo
[
1
].
value
=
avge
// 计算第一个判定结果
if
(
this
.
inspectJbAl2o3List
.
standardTwo
&&
this
.
inspectJbAl2o3List
.
standardTwo
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoCy
&&
this
.
inspectJbAl2o3List
.
standtwoCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardTwo
,
this
.
inspectJbAl2o3List
.
standtwoPlus
,
this
.
inspectJbAl2o3List
.
standtwoCy
)
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
twoRecordOneFirstResult
[
1
].
value
=
'合格'
}
else
{
this
.
twoRecordOneFirstResult
[
1
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordOneFirstResult
[
1
].
value
=
''
}
}
else
{
this
.
twoRecordOneFirstResult
[
1
].
value
=
''
}
// 计算第二哥判断结果
if
(
this
.
inspectJbAl2o3List
.
standtwoPx
&&
this
.
inspectJbAl2o3List
.
standtwoPx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standtwoPx
)
console
.
log
(
'num'
,
num
)
if
(
num
!=
null
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
twoRecordsecondResult
[
1
].
value
=
'合格'
}
else
{
this
.
twoRecordsecondResult
[
1
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordsecondResult
[
1
].
value
=
''
}
}
else
{
this
.
twoRecordsecondResult
[
1
].
value
=
''
}
}
else
{
this
.
discrepancyRecordTwoList
[
1
].
value
=
''
this
.
averageRecordTwo
[
1
].
value
=
''
this
.
twoRecordOneFirstResult
[
1
].
value
=
''
this
.
twoRecordsecondResult
[
1
].
value
=
''
}
}
// 第三组计算
if
(
number
===
3
)
{
if
(
this
.
inspectJbAl2o3List
.
recode2
[
4
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
4
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode2
[
5
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
5
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
4
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
5
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
// 差异值
console
.
log
(
'差异值'
,
discrepancy
)
this
.
discrepancyRecordTwoList
[
2
].
value
=
discrepancy
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
console
.
log
(
'平均值'
,
avge
)
this
.
averageRecordTwo
[
2
].
value
=
avge
// 计算第一个判定结果
if
(
this
.
inspectJbAl2o3List
.
standardTwo
&&
this
.
inspectJbAl2o3List
.
standardTwo
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoCy
&&
this
.
inspectJbAl2o3List
.
standtwoCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardTwo
,
this
.
inspectJbAl2o3List
.
standtwoPlus
,
this
.
inspectJbAl2o3List
.
standtwoCy
)
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
twoRecordOneFirstResult
[
2
].
value
=
'合格'
}
else
{
this
.
twoRecordOneFirstResult
[
2
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordOneFirstResult
[
2
].
value
=
''
}
}
else
{
this
.
twoRecordOneFirstResult
[
2
].
value
=
''
}
// 计算第二哥判断结果
if
(
this
.
inspectJbAl2o3List
.
standtwoPx
&&
this
.
inspectJbAl2o3List
.
standtwoPx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standtwoPx
)
console
.
log
(
'num'
,
num
)
if
(
num
!=
null
&&
avge
&&
avge
!==
''
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
twoRecordsecondResult
[
2
].
value
=
'合格'
}
else
{
this
.
twoRecordsecondResult
[
2
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordsecondResult
[
2
].
value
=
''
}
}
else
{
this
.
twoRecordsecondResult
[
2
].
value
=
''
}
}
else
{
this
.
discrepancyRecordTwoList
[
2
].
value
=
''
this
.
averageRecordTwo
[
2
].
value
=
''
this
.
twoRecordOneFirstResult
[
2
].
value
=
''
this
.
twoRecordsecondResult
[
2
].
value
=
''
}
}
// 第四组计算
if
(
number
===
4
)
{
if
(
this
.
inspectJbAl2o3List
.
recode2
[
6
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
6
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode2
[
7
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
7
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
6
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
7
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
// 差异值
console
.
log
(
'差异值'
,
discrepancy
)
this
.
discrepancyRecordTwoList
[
3
].
value
=
discrepancy
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
console
.
log
(
'平均值'
,
avge
)
this
.
averageRecordTwo
[
3
].
value
=
avge
// 计算第一个判定结果
if
(
this
.
inspectJbAl2o3List
.
standardTwo
&&
this
.
inspectJbAl2o3List
.
standardTwo
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoCy
&&
this
.
inspectJbAl2o3List
.
standtwoCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardTwo
,
this
.
inspectJbAl2o3List
.
standtwoPlus
,
this
.
inspectJbAl2o3List
.
standtwoCy
)
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
twoRecordOneFirstResult
[
3
].
value
=
'合格'
}
else
{
this
.
twoRecordOneFirstResult
[
3
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordOneFirstResult
[
3
].
value
=
''
}
}
else
{
this
.
twoRecordOneFirstResult
[
3
].
value
=
''
}
// 计算第二哥判断结果
if
(
this
.
inspectJbAl2o3List
.
standtwoPx
&&
this
.
inspectJbAl2o3List
.
standtwoPx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standtwoPx
)
console
.
log
(
'num'
,
num
)
if
(
num
!=
null
&&
avge
&&
avge
!==
''
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
twoRecordsecondResult
[
3
].
value
=
'合格'
}
else
{
this
.
twoRecordsecondResult
[
3
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordsecondResult
[
3
].
value
=
''
}
}
else
{
this
.
twoRecordsecondResult
[
3
].
value
=
''
}
}
else
{
this
.
discrepancyRecordTwoList
[
3
].
value
=
''
this
.
averageRecordTwo
[
3
].
value
=
''
this
.
twoRecordOneFirstResult
[
3
].
value
=
''
this
.
twoRecordsecondResult
[
3
].
value
=
''
}
}
// 第五组计算
if
(
number
===
5
)
{
if
(
this
.
inspectJbAl2o3List
.
recode2
[
8
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
8
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode2
[
9
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode2
[
9
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
8
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode2
[
9
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
// 差异值
console
.
log
(
'差异值'
,
discrepancy
)
this
.
discrepancyRecordTwoList
[
4
].
value
=
discrepancy
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
console
.
log
(
'平均值'
,
avge
)
this
.
averageRecordTwo
[
4
].
value
=
avge
// 计算第一个判定结果
if
(
this
.
inspectJbAl2o3List
.
standardTwo
&&
this
.
inspectJbAl2o3List
.
standardTwo
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoCy
&&
this
.
inspectJbAl2o3List
.
standtwoCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardTwo
,
this
.
inspectJbAl2o3List
.
standtwoPlus
,
this
.
inspectJbAl2o3List
.
standtwoCy
)
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
twoRecordOneFirstResult
[
4
].
value
=
'合格'
}
else
{
this
.
twoRecordOneFirstResult
[
4
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordOneFirstResult
[
4
].
value
=
''
}
}
else
{
this
.
twoRecordOneFirstResult
[
4
].
value
=
''
}
// 计算第二哥判断结果
if
(
this
.
inspectJbAl2o3List
.
standtwoPx
&&
this
.
inspectJbAl2o3List
.
standtwoPx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standtwoPx
)
console
.
log
(
'num'
,
num
)
if
(
num
!=
null
&&
avge
&&
avge
!==
''
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
twoRecordsecondResult
[
4
].
value
=
'合格'
}
else
{
this
.
twoRecordsecondResult
[
4
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordsecondResult
[
4
].
value
=
''
}
}
else
{
this
.
twoRecordsecondResult
[
4
].
value
=
''
}
}
else
{
this
.
discrepancyRecordTwoList
[
4
].
value
=
''
this
.
averageRecordTwo
[
4
].
value
=
''
this
.
twoRecordOneFirstResult
[
4
].
value
=
''
this
.
twoRecordsecondResult
[
4
].
value
=
''
}
}
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
twoRecordOneFirstResult
[
number
-
1
].
value
=
'合格'
}
else
{
this
.
twoRecordOneFirstResult
[
number
-
1
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordOneFirstResult
[
number
-
1
].
value
=
''
}
}
else
{
this
.
twoRecordOneFirstResult
[
number
-
1
].
value
=
''
}
// 第二哥判断结果
if
(
this
.
inspectJbAl2o3List
.
standtwoPx
&&
this
.
inspectJbAl2o3List
.
standtwoPx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standtwoPx
)
if
(
num
!=
null
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
twoRecordsecondResult
[
number
-
1
].
value
=
'合格'
}
else
{
this
.
twoRecordsecondResult
[
number
-
1
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordsecondResult
[
number
-
1
].
value
=
''
}
}
else
{
this
.
twoRecordsecondResult
[
number
-
1
].
value
=
''
}
}
else
{
this
.
discrepancyRecordTwoList
[
number
-
1
].
value
=
''
this
.
averageRecordTwo
[
number
-
1
].
value
=
''
this
.
twoRecordOneFirstResult
[
number
-
1
].
value
=
''
this
.
twoRecordsecondResult
[
number
-
1
].
value
=
''
}
}
},
/**
* 表单二的计算方方法
...
...
@@ -3827,122 +3649,16 @@ export default {
},
// 十五个输入框的计算方式
fifteenInputComputeWay
(
number
)
{
// 第一组计算
if
(
number
===
1
)
{
// 计算差异和对应的判定结果
if
(
this
.
inspectJbAl2o3List
.
recode1
[
2
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
2
].
recordData
!==
''
)
{
const
num
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
2
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
((
num
).
toFixed
(
this
.
LIMITNGHOURS
))
this
.
discrepancyRecordOneList
[
0
].
value
=
discrepancy
if
(
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standoneCy
&&
this
.
inspectJbAl2o3List
.
standoneCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
,
this
.
inspectJbAl2o3List
.
standoneCy
)
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
oneRecordOneFirstResult
[
0
].
value
=
'合格'
}
else
{
this
.
oneRecordOneFirstResult
[
0
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordOneFirstResult
[
0
].
value
=
''
}
}
}
else
{
this
.
discrepancyRecordOneList
[
0
].
value
=
''
this
.
oneRecordOneFirstResult
[
0
].
value
=
''
}
// 计算平均值和对应的判定结果
if
(
this
.
inspectJbAl2o3List
.
recode1
[
0
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
0
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
1
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
1
].
recordData
!==
''
){
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
0
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
1
].
recordData
)
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
this
.
averageRecordOne
[
0
].
value
=
avge
if
(
this
.
inspectJbAl2o3List
.
standonePx
&&
this
.
inspectJbAl2o3List
.
standonePx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standonePx
)
if
(
num
!=
null
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
oneRecordsecondResult
[
0
].
value
=
'合格'
}
else
{
this
.
oneRecordsecondResult
[
0
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordsecondResult
[
0
].
value
=
''
}
}
else
{
this
.
oneRecordsecondResult
[
0
].
value
=
''
}
}
else
{
this
.
averageRecordOne
[
0
].
value
=
''
this
.
oneRecordsecondResult
[
0
].
value
=
''
}
}
// 第二组计算
if
(
number
===
2
)
{
// 计算差异和对应的判定结果
if
(
this
.
inspectJbAl2o3List
.
recode1
[
5
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
5
].
recordData
!==
''
)
{
const
num
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
5
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
((
num
).
toFixed
(
this
.
LIMITNGHOURS
))
this
.
discrepancyRecordOneList
[
1
].
value
=
discrepancy
if
(
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standoneCy
&&
this
.
inspectJbAl2o3List
.
standoneCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
,
this
.
inspectJbAl2o3List
.
standoneCy
)
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
oneRecordOneFirstResult
[
1
].
value
=
'合格'
}
else
{
this
.
oneRecordOneFirstResult
[
1
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordOneFirstResult
[
1
].
value
=
''
}
}
}
else
{
this
.
discrepancyRecordOneList
[
1
].
value
=
''
this
.
oneRecordOneFirstResult
[
1
].
value
=
''
}
// 计算平均值和对应的判定结果
if
(
this
.
inspectJbAl2o3List
.
recode1
[
3
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
3
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
4
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
4
].
recordData
!==
''
){
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
3
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
4
].
recordData
)
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
this
.
averageRecordOne
[
1
].
value
=
avge
if
(
this
.
inspectJbAl2o3List
.
standonePx
&&
this
.
inspectJbAl2o3List
.
standonePx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standonePx
)
if
(
num
!=
null
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
oneRecordsecondResult
[
1
].
value
=
'合格'
}
else
{
this
.
oneRecordsecondResult
[
1
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordsecondResult
[
1
].
value
=
''
}
}
else
{
this
.
oneRecordsecondResult
[
1
].
value
=
''
}
}
else
{
this
.
averageRecordOne
[
1
].
value
=
''
this
.
oneRecordsecondResult
[
1
].
value
=
''
}
}
// 第三组计算
if
(
number
===
3
)
{
if
(
this
.
fifteenGroup
.
find
(
item
=>
item
.
number
===
number
))
{
const
indexList
=
this
.
fifteenGroup
.
find
(
item
=>
item
.
number
===
number
).
indexList
const
firstIndex
=
indexList
[
0
]
const
secondIndex
=
indexList
[
1
]
const
thirdIndex
=
indexList
[
2
]
// 计算差异和对应的判定结果
if
(
this
.
inspectJbAl2o3List
.
recode1
[
8
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
8
].
recordData
!==
''
)
{
const
num
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
8
].
recordData
)
if
(
this
.
inspectJbAl2o3List
.
recode1
[
thirdIndex
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
thirdIndex
].
recordData
!==
''
)
{
const
num
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
thirdIndex
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
((
num
).
toFixed
(
this
.
LIMITNGHOURS
))
this
.
discrepancyRecordOneList
[
2
].
value
=
discrepancy
this
.
discrepancyRecordOneList
[
number
-
1
].
value
=
discrepancy
if
(
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standoneCy
&&
this
.
inspectJbAl2o3List
.
standoneCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
,
this
.
inspectJbAl2o3List
.
standoneCy
)
...
...
@@ -3950,430 +3666,101 @@ export default {
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
oneRecordOneFirstResult
[
2
].
value
=
'合格'
}
else
{
this
.
oneRecordOneFirstResult
[
2
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordOneFirstResult
[
2
].
value
=
''
}
}
}
else
{
this
.
discrepancyRecordOneList
[
2
].
value
=
''
this
.
oneRecordOneFirstResult
[
2
].
value
=
''
}
// 计算平均值和对应的判定结果
if
(
this
.
inspectJbAl2o3List
.
recode1
[
6
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
6
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
7
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
7
].
recordData
!==
''
){
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
6
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
7
].
recordData
)
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
this
.
averageRecordOne
[
2
].
value
=
avge
if
(
this
.
inspectJbAl2o3List
.
standonePx
&&
this
.
inspectJbAl2o3List
.
standonePx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standonePx
)
if
(
num
!=
null
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
oneRecordsecondResult
[
2
].
value
=
'合格'
this
.
oneRecordOneFirstResult
[
number
-
1
].
value
=
'合格'
}
else
{
this
.
oneRecord
secondResult
[
2
].
value
=
'不合格'
this
.
oneRecord
OneFirstResult
[
number
-
1
].
value
=
'不合格'
}
}
else
{
this
.
oneRecord
secondResult
[
2
].
value
=
''
this
.
oneRecord
OneFirstResult
[
number
-
1
].
value
=
''
}
}
else
{
this
.
oneRecordsecondResult
[
2
].
value
=
''
}
}
else
{
this
.
averageRecordOne
[
2
].
value
=
''
this
.
oneRecordsecondResult
[
2
].
value
=
''
}
}
// 第四组计算
if
(
number
===
4
)
{
// 计算差异和对应的判定结果
if
(
this
.
inspectJbAl2o3List
.
recode1
[
11
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
11
].
recordData
!==
''
)
{
const
num
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
11
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
((
num
).
toFixed
(
this
.
LIMITNGHOURS
))
this
.
discrepancyRecordOneList
[
3
].
value
=
discrepancy
if
(
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standoneCy
&&
this
.
inspectJbAl2o3List
.
standoneCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
,
this
.
inspectJbAl2o3List
.
standoneCy
)
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
oneRecordOneFirstResult
[
3
].
value
=
'合格'
}
else
{
this
.
oneRecordOneFirstResult
[
3
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordOneFirstResult
[
3
].
value
=
''
}
this
.
oneRecordOneFirstResult
[
number
-
1
].
value
=
''
}
}
else
{
this
.
discrepancyRecordOneList
[
3
].
value
=
''
this
.
oneRecordOneFirstResult
[
3
].
value
=
''
}
else
{
this
.
discrepancyRecordOneList
[
number
-
1
].
value
=
''
this
.
oneRecordOneFirstResult
[
number
-
1
].
value
=
''
}
// 计算平均值和对应的判定结果
if
(
this
.
inspectJbAl2o3List
.
recode1
[
9
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
9
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
10
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
10
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
9
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
10
].
recordData
)
if
(
this
.
inspectJbAl2o3List
.
recode1
[
firstIndex
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
firstIndex
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
secondIndex
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
secondIndex
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
firstIndex
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
secondIndex
].
recordData
)
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
this
.
averageRecordOne
[
3
].
value
=
avge
this
.
averageRecordOne
[
number
-
1
].
value
=
avge
if
(
this
.
inspectJbAl2o3List
.
standonePx
&&
this
.
inspectJbAl2o3List
.
standonePx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standonePx
)
if
(
num
!=
null
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
oneRecordsecondResult
[
3
].
value
=
'合格'
this
.
oneRecordsecondResult
[
number
-
1
].
value
=
'合格'
}
else
{
this
.
oneRecordsecondResult
[
3
].
value
=
'不合格'
this
.
oneRecordsecondResult
[
number
-
1
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordsecondResult
[
3
].
value
=
''
this
.
oneRecordsecondResult
[
number
-
1
].
value
=
''
}
}
else
{
this
.
oneRecordsecondResult
[
3
].
value
=
''
this
.
oneRecordsecondResult
[
number
-
1
].
value
=
''
}
}
else
{
this
.
averageRecordOne
[
3
].
value
=
''
this
.
oneRecordsecondResult
[
3
].
value
=
''
}
}
// 第五组计算
if
(
number
===
5
)
{
// 计算差异和对应的判定结果
if
(
this
.
inspectJbAl2o3List
.
recode1
[
14
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
14
].
recordData
!==
''
)
{
const
num
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
14
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
((
num
).
toFixed
(
this
.
LIMITNGHOURS
))
this
.
discrepancyRecordOneList
[
4
].
value
=
discrepancy
if
(
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standoneCy
&&
this
.
inspectJbAl2o3List
.
standoneCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
,
this
.
inspectJbAl2o3List
.
standoneCy
)
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
oneRecordOneFirstResult
[
4
].
value
=
'合格'
}
else
{
this
.
oneRecordOneFirstResult
[
4
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordOneFirstResult
[
4
].
value
=
''
}
}
}
else
{
this
.
discrepancyRecordOneList
[
4
].
value
=
''
this
.
oneRecordOneFirstResult
[
4
].
value
=
''
}
// 计算平均值和对应的判定结果
if
(
this
.
inspectJbAl2o3List
.
recode1
[
12
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
12
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
13
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
13
].
recordData
!==
''
){
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
12
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
13
].
recordData
)
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
this
.
averageRecordOne
[
4
].
value
=
avge
if
(
this
.
inspectJbAl2o3List
.
standonePx
&&
this
.
inspectJbAl2o3List
.
standonePx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standonePx
)
if
(
num
!=
null
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
oneRecordsecondResult
[
4
].
value
=
'合格'
}
else
{
this
.
oneRecordsecondResult
[
4
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordsecondResult
[
4
].
value
=
''
}
}
else
{
this
.
oneRecordsecondResult
[
4
].
value
=
''
}
}
else
{
this
.
averageRecordOne
[
4
].
value
=
''
this
.
oneRecordsecondResult
[
4
].
value
=
''
this
.
averageRecordOne
[
number
-
1
].
value
=
''
this
.
oneRecordsecondResult
[
number
-
1
].
value
=
''
}
}
},
// 十个表单的计算方式
tenInputComputeWay
(
number
)
{
// 第一组计算
if
(
number
===
1
)
{
// 计算差异值
if
(
this
.
inspectJbAl2o3List
.
recode1
[
0
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
0
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
1
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
1
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
0
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
1
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
// 差异值
this
.
discrepancyRecordOneList
[
0
].
value
=
discrepancy
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
console
.
log
(
'平均值'
,
avge
)
this
.
averageRecordOne
[
0
].
value
=
avge
// 计算第一个判定结果
if
(
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standonePlus
!==
''
&&
this
.
inspectJbAl2o3List
.
standoneCy
&&
this
.
inspectJbAl2o3List
.
standoneCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
,
this
.
inspectJbAl2o3List
.
standoneCy
)
if
(
min
!==
null
&&
max
!==
null
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
oneRecordOneFirstResult
[
0
].
value
=
'合格'
}
else
{
this
.
oneRecordOneFirstResult
[
0
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordOneFirstResult
[
0
].
value
=
''
}
}
else
{
this
.
oneRecordOneFirstResult
[
0
].
value
=
''
}
// 计算第二哥判断结果
if
(
this
.
inspectJbAl2o3List
.
standonePx
&&
this
.
inspectJbAl2o3List
.
standonePx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standonePx
)
console
.
log
(
'num'
,
num
)
if
(
num
!=
null
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
oneRecordsecondResult
[
0
].
value
=
'合格'
}
else
{
this
.
oneRecordsecondResult
[
0
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordsecondResult
[
0
].
value
=
''
}
}
else
{
this
.
oneRecordsecondResult
[
0
].
value
=
''
}
}
else
{
this
.
discrepancyRecordOneList
[
0
].
value
=
''
this
.
averageRecordOne
[
0
].
value
=
''
this
.
oneRecordOneFirstResult
[
0
].
value
=
''
this
.
oneRecordsecondResult
[
0
].
value
=
''
}
}
// 第二组计算
if
(
number
===
2
)
{
if
(
this
.
inspectJbAl2o3List
.
recode1
[
2
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
2
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
3
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
3
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
2
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
3
].
recordData
)
if
(
this
.
tenGroup
.
find
(
item
=>
item
.
number
===
number
))
{
// 获取下坐标数组
const
indexList
=
this
.
tenGroup
.
find
(
item
=>
item
.
number
===
number
).
indexList
const
firstIndex
=
indexList
[
0
]
const
secondIndex
=
indexList
[
1
]
// 进行计算
if
(
this
.
inspectJbAl2o3List
.
recode1
[
firstIndex
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
firstIndex
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
secondIndex
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
secondIndex
].
recordData
!==
''
){
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
firstIndex
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
secondIndex
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
// 差异值
console
.
log
(
'差异值'
,
discrepancy
)
this
.
discrepancyRecordOneList
[
1
].
value
=
discrepancy
// 平均值
this
.
discrepancyRecordOneList
[
number
-
1
].
value
=
discrepancy
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
console
.
log
(
'平均值'
,
avge
)
this
.
averageRecordOne
[
1
].
value
=
avge
this
.
averageRecordOne
[
number
-
1
].
value
=
avge
// 计算第一个判定结果
if
(
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standonePlus
!==
''
&&
this
.
inspectJbAl2o3List
.
standoneCy
&&
this
.
inspectJbAl2o3List
.
standoneCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
,
this
.
inspectJbAl2o3List
.
standoneCy
)
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
oneRecordOneFirstResult
[
1
].
value
=
'合格'
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
oneRecordOneFirstResult
[
number
-
1
].
value
=
'合格'
}
else
{
this
.
oneRecordOneFirstResult
[
1
].
value
=
'不合格'
this
.
oneRecordOneFirstResult
[
number
-
1
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordOneFirstResult
[
1
].
value
=
''
this
.
oneRecordOneFirstResult
[
number
-
1
].
value
=
''
}
}
else
{
this
.
oneRecordOneFirstResult
[
1
].
value
=
''
this
.
oneRecordOneFirstResult
[
number
-
1
].
value
=
''
}
//
计算
第二哥判断结果
// 第二哥判断结果
if
(
this
.
inspectJbAl2o3List
.
standonePx
&&
this
.
inspectJbAl2o3List
.
standonePx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standonePx
)
console
.
log
(
'num'
,
num
)
if
(
num
!=
null
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
oneRecordsecondResult
[
1
].
value
=
'合格'
}
else
{
this
.
oneRecordsecondResult
[
1
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordsecondResult
[
1
].
value
=
''
}
}
else
{
this
.
oneRecordsecondResult
[
1
].
value
=
''
}
}
else
{
this
.
discrepancyRecordOneList
[
1
].
value
=
''
this
.
averageRecordOne
[
1
].
value
=
''
this
.
oneRecordOneFirstResult
[
1
].
value
=
''
this
.
oneRecordsecondResult
[
1
].
value
=
''
}
}
// 第三组计算
if
(
number
===
3
)
{
if
(
this
.
inspectJbAl2o3List
.
recode1
[
4
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
4
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
5
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
5
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
4
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
5
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
// 差异值
console
.
log
(
'差异值'
,
discrepancy
)
this
.
discrepancyRecordOneList
[
2
].
value
=
discrepancy
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
console
.
log
(
'平均值'
,
avge
)
this
.
averageRecordOne
[
2
].
value
=
avge
// 计算第一个判定结果
if
(
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standonePlus
!==
''
&&
this
.
inspectJbAl2o3List
.
standoneCy
&&
this
.
inspectJbAl2o3List
.
standoneCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
,
this
.
inspectJbAl2o3List
.
standoneCy
)
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
oneRecordOneFirstResult
[
2
].
value
=
'合格'
this
.
oneRecordsecondResult
[
number
-
1
].
value
=
'合格'
}
else
{
this
.
oneRecord
OneFirstResult
[
2
].
value
=
'不合格'
this
.
oneRecord
secondResult
[
number
-
1
].
value
=
'不合格'
}
}
else
{
this
.
oneRecord
OneFirstResult
[
2
].
value
=
''
this
.
oneRecord
secondResult
[
number
-
1
].
value
=
''
}
}
else
{
this
.
oneRecordOneFirstResult
[
2
].
value
=
''
}
// 计算第二哥判断结果
if
(
this
.
inspectJbAl2o3List
.
standonePx
&&
this
.
inspectJbAl2o3List
.
standonePx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standonePx
)
console
.
log
(
'num'
,
num
)
if
(
num
!=
null
&&
avge
&&
avge
!==
''
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
oneRecordsecondResult
[
2
].
value
=
'合格'
}
else
{
this
.
oneRecordsecondResult
[
2
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordsecondResult
[
2
].
value
=
''
}
}
else
{
this
.
oneRecordsecondResult
[
2
].
value
=
''
this
.
oneRecordsecondResult
[
number
-
1
].
value
=
''
}
}
else
{
this
.
discrepancyRecordOneList
[
2
].
value
=
''
this
.
averageRecordOne
[
2
].
value
=
''
this
.
oneRecordOneFirstResult
[
2
].
value
=
''
this
.
oneRecordsecondResult
[
2
].
value
=
''
}
}
// 第四组计算
if
(
number
===
4
)
{
if
(
this
.
inspectJbAl2o3List
.
recode1
[
6
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
6
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
7
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
7
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
6
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
7
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
// 差异值
console
.
log
(
'差异值'
,
discrepancy
)
this
.
discrepancyRecordOneList
[
3
].
value
=
discrepancy
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
console
.
log
(
'平均值'
,
avge
)
this
.
averageRecordOne
[
3
].
value
=
avge
// 计算第一个判定结果
if
(
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standonePlus
!==
''
&&
this
.
inspectJbAl2o3List
.
standoneCy
&&
this
.
inspectJbAl2o3List
.
standoneCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
,
this
.
inspectJbAl2o3List
.
standoneCy
)
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
oneRecordOneFirstResult
[
3
].
value
=
'合格'
}
else
{
this
.
oneRecordOneFirstResult
[
3
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordOneFirstResult
[
3
].
value
=
''
}
}
else
{
this
.
oneRecordOneFirstResult
[
3
].
value
=
''
}
// 计算第二哥判断结果
if
(
this
.
inspectJbAl2o3List
.
standonePx
&&
this
.
inspectJbAl2o3List
.
standonePx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standonePx
)
console
.
log
(
'num'
,
num
)
if
(
num
!=
null
&&
avge
&&
avge
!==
''
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
oneRecordsecondResult
[
3
].
value
=
'合格'
}
else
{
this
.
oneRecordsecondResult
[
3
].
value
=
'不合格'
}
}
else
{
this
.
twoRecordsecondResult
[
3
].
value
=
''
}
}
else
{
this
.
oneRecordsecondResult
[
3
].
value
=
''
}
}
else
{
this
.
discrepancyRecordOneList
[
3
].
value
=
''
this
.
averageRecordOne
[
3
].
value
=
''
this
.
oneRecordOneFirstResult
[
3
].
value
=
''
this
.
oneRecordsecondResult
[
3
].
value
=
''
}
}
// 第五组计算
if
(
number
===
5
)
{
if
(
this
.
inspectJbAl2o3List
.
recode1
[
8
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
8
].
recordData
!==
''
&&
this
.
inspectJbAl2o3List
.
recode1
[
9
].
recordData
&&
this
.
inspectJbAl2o3List
.
recode1
[
9
].
recordData
!==
''
)
{
const
num1
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
8
].
recordData
)
const
num2
=
parseFloat
(
this
.
inspectJbAl2o3List
.
recode1
[
9
].
recordData
)
const
discrepancy
=
this
.
digitalFormat
(((
num1
+
num2
)
/
2
).
toFixed
(
this
.
LIMITNGHOURS
))
// 差异值
console
.
log
(
'差异值'
,
discrepancy
)
this
.
discrepancyRecordOneList
[
4
].
value
=
discrepancy
// 平均值
const
avge
=
this
.
digitalFormat
(
Math
.
abs
(
num1
-
num2
).
toFixed
(
this
.
LIMITNGHOURS
))
console
.
log
(
'平均值'
,
avge
)
this
.
averageRecordOne
[
4
].
value
=
avge
// 计算第一个判定结果
if
(
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standonePlus
!==
''
&&
this
.
inspectJbAl2o3List
.
standoneCy
&&
this
.
inspectJbAl2o3List
.
standoneCy
!==
''
)
{
// 获取两个最值
const
{
min
,
max
}
=
this
.
standardRadius
(
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
,
this
.
inspectJbAl2o3List
.
standoneCy
)
if
(
min
!==
null
&&
max
!==
null
&&
discrepancy
&&
discrepancy
!==
''
)
{
const
floatMin
=
parseFloat
(
min
);
const
floatMax
=
parseFloat
(
max
);
if
(
discrepancy
>=
floatMin
&&
discrepancy
<=
floatMax
)
{
this
.
oneRecordOneFirstResult
[
4
].
value
=
'合格'
}
else
{
this
.
oneRecordOneFirstResult
[
4
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordOneFirstResult
[
4
].
value
=
''
}
}
else
{
this
.
oneRecordOneFirstResult
[
4
].
value
=
''
}
// 计算第二哥判断结果
if
(
this
.
inspectJbAl2o3List
.
standonePx
&&
this
.
inspectJbAl2o3List
.
standonePx
!==
''
)
{
const
{
num
}
=
this
.
standardRecordRadius
(
this
.
inspectJbAl2o3List
.
standonePx
)
console
.
log
(
'num'
,
num
)
if
(
num
!=
null
&&
avge
&&
avge
!==
''
)
{
const
floatNum
=
parseFloat
(
num
);
if
(
avge
<=
floatNum
)
{
this
.
oneRecordsecondResult
[
4
].
value
=
'合格'
}
else
{
this
.
oneRecordsecondResult
[
4
].
value
=
'不合格'
}
}
else
{
this
.
oneRecordsecondResult
[
4
].
value
=
''
}
}
else
{
this
.
oneRecordsecondResult
[
4
].
value
=
''
}
}
else
{
this
.
discrepancyRecordOneList
[
4
].
value
=
''
this
.
averageRecordOne
[
4
].
value
=
''
this
.
oneRecordOneFirstResult
[
4
].
value
=
''
this
.
oneRecordsecondResult
[
4
].
value
=
''
this
.
discrepancyRecordOneList
[
number
-
1
].
value
=
''
this
.
averageRecordOne
[
number
-
1
].
value
=
''
this
.
oneRecordOneFirstResult
[
number
-
1
].
value
=
''
this
.
oneRecordsecondResult
[
number
-
1
].
value
=
''
}
}
},
...
...
@@ -4711,9 +4098,15 @@ export default {
this
.
inspectJbAl2o3List
.
wgTf
=
response
.
data
.
wgTf
this
.
inspectJbAl2o3List
.
limitData
=
response
.
data
.
limitData
this
.
inspectJbAl2o3List
.
ossId
=
response
.
data
.
ossId
if
(
this
.
inspectJbAl2o3List
.
standardOneData
&&
this
.
inspectJbAl2o3List
.
standardOneData
.
length
>
0
)
{
this
.
getRecordList
(
this
.
inspectJbAl2o3List
.
standardOneData
.
split
(
','
))
}
console
.
log
(
'最初standardOneData'
,
response
.
data
.
standardOneData
)
this
.
$nextTick
().
then
(()
=>
{
if
(
response
.
data
.
standardOneData
&&
response
.
data
.
standardOneData
.
length
>
0
)
{
this
.
getRecordList
(
response
.
data
.
standardOneData
.
split
(
','
))
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
this
.
handleRecordOneInput
(
i
)
}
}
})
if
(
this
.
inspectJbAl2o3List
.
standardTwoData
&&
this
.
inspectJbAl2o3List
.
standardTwoData
.
length
>
0
)
{
this
.
getRecordTwoList
(
this
.
inspectJbAl2o3List
.
standardTwoData
.
split
(
','
))
}
...
...
@@ -4721,15 +4114,13 @@ export default {
this
.
getRecordThreeList
(
this
.
inspectJbAl2o3List
.
limitData
.
split
(
','
))
}
// this.handleJcCjChange(this.inspectInfoList.jcCj)
console
.
log
(
'this.inspectInfoList.jcCj'
,
this
.
inspectInfoList
.
jcCj
)
if
(
this
.
inspectInfoList
.
jcCj
===
this
.
manufacturer
[
2
].
value
)
{
this
.
disableInput
=
true
}
else
{
this
.
disableInput
=
false
}
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
this
.
handleRecordOneInput
(
i
)
}
console
.
log
(
'standardOneData'
,
this
.
inspectJbAl2o3List
.
standardOneData
)
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
this
.
handleRecordTwoInput
(
i
)
}
...
...
@@ -4754,9 +4145,6 @@ export default {
console
.
log
(
'list1'
,
list1
)
for
(
let
i
=
0
;
i
<
list1
.
length
;
i
++
)
{
this
.
inspectJbAl2o3List
.
recode2
[
i
].
recordData
=
list1
[
i
]
// if (i
<
list1
.
length
-
1
)
{
// // this.handleData2Input(i)
// }
}
},
// 数组3
...
...
@@ -5286,6 +4674,7 @@ export default {
this
.
inspectJbAl2o3List
.
standardOneData
=
this
.
getStringByArray
(
this
.
inspectJbAl2o3List
.
recode1
)
this
.
inspectJbAl2o3List
.
standardTwoData
=
this
.
getStringByArray
(
this
.
inspectJbAl2o3List
.
recode2
)
this
.
inspectJbAl2o3List
.
limitData
=
this
.
getStringByArray
(
this
.
inspectJbAl2o3List
.
recode3
)
console
.
log
(
'提交standardOneData'
,
this
.
inspectJbAl2o3List
.
standardOneData
)
this
.
inspectInfoList
.
approveStatus
=
'1'
const
ossIdList
=
this
.
getOssIdList
()
var
obj
=
{
...
...
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