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
968a71cb
Commit
968a71cb
authored
Mar 15, 2024
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除按钮
parent
216c3e2f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
27 deletions
+46
-27
templateFirst.vue
src/views/template/templateFirst.vue
+46
-27
No files found.
src/views/template/templateFirst.vue
View file @
968a71cb
...
@@ -129,7 +129,13 @@
...
@@ -129,7 +129,13 @@
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"差异:"
class=
"inspectionStandardLabel"
prop=
"standoneCy"
>
<el-form-item
label=
"差异:"
class=
"inspectionStandardLabel"
prop=
"standoneCy"
>
<span>
{{
inspectJbAl2o3List
.
standoneCy
}}
</span>
<el-input
v-model=
"inspectJbAl2o3List.standoneCy"
class=
"inspectionStandardsInput"
:maxlength=
"IRMAXLENGTHONE"
:disabled=
"firstFromDisabled"
@
input=
"getCalculateDifference"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -680,7 +686,14 @@
...
@@ -680,7 +686,14 @@
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"差异:"
class=
"inspectionStandardLabel"
label-width=
"80"
prop=
"standtwoCy"
>
<el-form-item
label=
"差异:"
class=
"inspectionStandardLabel"
label-width=
"80"
prop=
"standtwoCy"
>
<span>
{{
inspectJbAl2o3List
.
standtwoCy
}}
</span>
<el-input
v-model=
"inspectJbAl2o3List.standtwoCy"
:maxlength=
"IRMAXLENGTHTWO"
:disabled=
"firstFromDisabled"
class=
"inspectionStandardsInput"
@
blur=
"getInspect"
@
input=
"getCalculateDifferences"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -2385,7 +2398,10 @@ export default {
...
@@ -2385,7 +2398,10 @@ export default {
{
pattern
:
/^
(
0|
[
1-9
]\d
*
)(\.\d{0,6})?
$/
,
message
:
'请输入有效的数字'
,
trigger
:
'change'
},
{
pattern
:
/^
(
0|
[
1-9
]\d
*
)(\.\d{0,6})?
$/
,
message
:
'请输入有效的数字'
,
trigger
:
'change'
},
{
validator
:
this
.
validateMethod3
,
trigger
:
'blur'
}
{
validator
:
this
.
validateMethod3
,
trigger
:
'blur'
}
],
],
standoneCy
:
[
{
required
:
true
,
message
:
'请输入差异'
,
trigger
:
'blur'
},
{
pattern
:
/^
(
0|
[
1-9
]\d
*
)(\.\d{0,6})?
$/
,
message
:
'请输入有效的数字'
,
trigger
:
'change'
}],
standtwoCy
:
[{
required
:
true
,
message
:
'请输入差异'
,
trigger
:
'blur'
},
{
pattern
:
/^
(
0|
[
1-9
]\d
*
)(\.\d{0,6})?
$/
,
message
:
'请输入有效的数字'
,
trigger
:
'change'
}]
standardTwo
:
[
standardTwo
:
[
{
required
:
true
,
message
:
'请输入检验标准'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入检验标准'
,
trigger
:
'blur'
},
{
pattern
:
/^
(
0|
[
1-9
]\d
*
)(\.\d{0,6})?
$/
,
message
:
'请输入有效的数字'
,
trigger
:
'change'
}
{
pattern
:
/^
(
0|
[
1-9
]\d
*
)(\.\d{0,6})?
$/
,
message
:
'请输入有效的数字'
,
trigger
:
'change'
}
...
@@ -2904,7 +2920,7 @@ export default {
...
@@ -2904,7 +2920,7 @@ export default {
this
.
calculate
(
this
.
removeEmptyValues
(
this
.
SumList
),
1
)
this
.
calculate
(
this
.
removeEmptyValues
(
this
.
SumList
),
1
)
}
}
this
.
calculateStandardTagOne
(
index
,
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
)
this
.
calculateStandardTagOne
(
index
,
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
,
this
.
inspectJbAl2o3List
.
standoneCy
)
// console.log('11111', this.SumList)
// console.log('11111', this.SumList)
},
},
/**
/**
...
@@ -3029,18 +3045,20 @@ export default {
...
@@ -3029,18 +3045,20 @@ export default {
this
.
calculate
(
this
.
removeEmptyValues
(
this
.
SumList1
),
2
)
this
.
calculate
(
this
.
removeEmptyValues
(
this
.
SumList1
),
2
)
}
}
this
.
calculateStandardTagTwo
(
index
,
this
.
inspectJbAl2o3List
.
standardTwo
,
this
.
inspectJbAl2o3List
.
standtwoPlus
)
this
.
calculateStandardTagTwo
(
index
,
this
.
inspectJbAl2o3List
.
standardTwo
,
this
.
inspectJbAl2o3List
.
standtwoPlus
,
this
.
inspectJbAl2o3List
.
standtwoCy
)
},
},
calculateStandardTagOne
(
index
,
standardOne
,
standardTwo
)
{
calculateStandardTagOne
(
index
,
standardOne
,
standardTwo
,
difference
)
{
if
(
standardOne
&&
standardOne
!==
null
&&
standardTwo
&&
standardTwo
!==
null
)
{
if
(
standardOne
&&
standardOne
!==
null
&&
standardTwo
&&
standardTwo
!==
null
&&
difference
&&
difference
!==
null
)
{
const
limitOne
=
parseFloat
(
standardOne
)
const
limitOne
=
parseFloat
(
standardOne
)
const
limitTwo
=
parseFloat
(
standardTwo
)
const
limitTwo
=
parseFloat
(
standardTwo
)
const
difference1
=
parseFloat
(
difference
)
const
recordData
=
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
const
recordData
=
this
.
inspectJbAl2o3List
.
recode1
[
index
].
recordData
if
(
recordData
!==
''
)
{
if
(
recordData
!==
''
)
{
const
num
=
parseFloat
(
recordData
)
const
num
=
parseFloat
(
recordData
)
if
(
num
>=
limitOne
&&
num
<=
limitTwo
)
{
if
(
num
>=
(
limitOne
-
difference1
)
&&
num
<=
(
limitTwo
+
difference1
)
)
{
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue2
=
'合格'
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue2
=
'合格'
}
else
{
}
else
{
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue2
=
'不合格'
this
.
inspectJbAl2o3List
.
recode1
[
index
].
differenceValue2
=
'不合格'
...
@@ -3048,14 +3066,15 @@ export default {
...
@@ -3048,14 +3066,15 @@ export default {
}
}
}
}
},
},
calculateStandardTagTwo
(
index
,
standardOne
,
standardTwo
)
{
calculateStandardTagTwo
(
index
,
standardOne
,
standardTwo
,
difference
)
{
if
(
standardOne
&&
standardOne
!==
null
&&
standardTwo
&&
standardTwo
!==
null
)
{
if
(
standardOne
&&
standardOne
!==
null
&&
standardTwo
&&
standardTwo
!==
null
&&
difference
&&
difference
!==
null
)
{
const
limitOne
=
parseFloat
(
standardOne
)
const
limitOne
=
parseFloat
(
standardOne
)
const
limitTwo
=
parseFloat
(
standardTwo
)
const
limitTwo
=
parseFloat
(
standardTwo
)
const
difference1
=
parseFloat
(
difference
)
const
recordData
=
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
const
recordData
=
this
.
inspectJbAl2o3List
.
recode2
[
index
].
recordData
if
(
recordData
!==
''
)
{
if
(
recordData
!==
''
)
{
const
num
=
parseFloat
(
recordData
)
const
num
=
parseFloat
(
recordData
)
if
(
num
>=
limitOne
&&
num
<=
limitTwo
)
{
if
(
num
>=
(
limitOne
-
difference1
)
&&
num
<=
(
limitTwo
+
difference1
)
)
{
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue2
=
'合格'
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue2
=
'合格'
}
else
{
}
else
{
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue2
=
'不合格'
this
.
inspectJbAl2o3List
.
recode2
[
index
].
differenceValue2
=
'不合格'
...
@@ -3110,29 +3129,29 @@ export default {
...
@@ -3110,29 +3129,29 @@ export default {
},
},
// 计算标签一的校验标准1 和 检验标准2 之间的差值
// 计算标签一的校验标准1 和 检验标准2 之间的差值
getCalculateDifference
()
{
getCalculateDifference
()
{
if
(
this
.
inspectJbAl2o3List
.
standardOne
&&
this
.
inspectJbAl2o3List
.
standardOne
!==
''
&&
this
.
inspectJbAl2o3List
.
standonePlus
&&
this
.
inspectJbAl2o3List
.
standonePlus
!=
''
)
{
//
if (this.inspectJbAl2o3List.standardOne && this.inspectJbAl2o3List.standardOne !== '' && this.inspectJbAl2o3List.standonePlus && this.inspectJbAl2o3List.standonePlus != '' ) {
const
limitOne
=
parseFloat
(
this
.
inspectJbAl2o3List
.
standardOne
)
//
const limitOne = parseFloat(this.inspectJbAl2o3List.standardOne )
const
limitTwo
=
parseFloat
(
this
.
inspectJbAl2o3List
.
standonePlus
)
//
const limitTwo = parseFloat(this.inspectJbAl2o3List.standonePlus)
this
.
inspectJbAl2o3List
.
standoneCy
=
Math
.
abs
(
limitOne
-
limitTwo
)
//
this.inspectJbAl2o3List.standoneCy = Math.abs(limitOne - limitTwo)
}
else
{
//
} else {
this
.
inspectJbAl2o3List
.
standoneCy
=
''
//
this.inspectJbAl2o3List.standoneCy = ''
}
//
}
for
(
var
i
=
0
;
i
<
10
;
i
++
)
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
{
this
.
calculateStandardTagOne
(
i
,
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
)
this
.
calculateStandardTagOne
(
i
,
this
.
inspectJbAl2o3List
.
standardOne
,
this
.
inspectJbAl2o3List
.
standonePlus
,
this
.
inspectJbAl2o3List
.
standoneCy
)
}
}
},
},
// 计算标签一的校验标准1 和 检验标准2 之间的差值
// 计算标签一的校验标准1 和 检验标准2 之间的差值
getCalculateDifferences
()
{
getCalculateDifferences
()
{
if
(
this
.
inspectJbAl2o3List
.
standardTwo
&&
this
.
inspectJbAl2o3List
.
standardTwo
!==
''
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
&&
this
.
inspectJbAl2o3List
.
standtwoPlus
!=
''
)
{
//
if (this.inspectJbAl2o3List.standardTwo && this.inspectJbAl2o3List.standardTwo !== '' && this.inspectJbAl2o3List.standtwoPlus && this.inspectJbAl2o3List.standtwoPlus != '' ) {
const
limitOne
=
parseFloat
(
this
.
inspectJbAl2o3List
.
standardTwo
)
//
const limitOne = parseFloat(this.inspectJbAl2o3List.standardTwo )
const
limitTwo
=
parseFloat
(
this
.
inspectJbAl2o3List
.
standtwoPlus
)
//
const limitTwo = parseFloat(this.inspectJbAl2o3List.standtwoPlus)
this
.
inspectJbAl2o3List
.
standtwoCy
=
Math
.
abs
(
limitOne
-
limitTwo
)
//
this.inspectJbAl2o3List.standtwoCy = Math.abs(limitOne - limitTwo)
}
else
{
//
} else {
this
.
inspectJbAl2o3List
.
standtwoPlus
=
''
//
this.inspectJbAl2o3List.standtwoPlus = ''
}
//
}
for
(
var
i
=
0
;
i
<
10
;
i
++
)
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
{
this
.
calculateStandardTagTwo
(
i
,
this
.
inspectJbAl2o3List
.
standardTwo
,
this
.
inspectJbAl2o3List
.
standtwoPlus
)
this
.
calculateStandardTagTwo
(
i
,
this
.
inspectJbAl2o3List
.
standardTwo
,
this
.
inspectJbAl2o3List
.
standtwoPlus
,
this
.
inspectJbAl2o3List
.
standtwoCy
)
}
}
},
},
...
...
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