Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
Details
Activity
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
TFMOM
TF-MOM-WEB
Commits
7e901303
Commit
7e901303
authored
Mar 28, 2024
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
漆料调配记录根据理论粘度字符串截取
parent
7817e807
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
index.vue
...s/src/privateComponents/components/ViscosityBox/index.vue
+15
-0
No files found.
applications/dee-mes/src/privateComponents/components/ViscosityBox/index.vue
View file @
7e901303
...
...
@@ -56,6 +56,21 @@ export default {
this
.
cup
=
this
.
form
.
viscosity
&&
this
.
form
.
viscosity
.
split
(
' '
).
length
>
1
?
this
.
form
.
viscosity
.
split
(
' '
)[
0
]
:
this
.
form
.
viscosity
this
.
second
=
this
.
form
.
viscosity
&&
this
.
form
.
viscosity
.
split
(
' '
).
length
>
1
?
this
.
form
.
viscosity
.
split
(
' '
)[
1
]
:
this
.
form
.
viscosity
}
},
'form.theoreticalViscosity'
:
{
immediate
:
true
,
deep
:
true
,
handler
:
function
(
val
)
{
// 粘度里的杯根据理论粘度截取(从第一个“,“截取到第一个”杯“,有杯没有逗号的截取杯前的所有字符串)
const
splitFromBei
=
val
&&
val
.
includes
(
'杯'
)
?
val
.
split
(
'杯'
)[
0
]
+
'杯'
:
''
if
(
splitFromBei
)
{
const
str
=
splitFromBei
.
includes
(
','
)
||
splitFromBei
.
includes
(
','
)
?
splitFromBei
:
(
','
+
splitFromBei
)
const
formatVal
=
str
.
replace
(
/,/g
,
','
)
const
regex
=
new
RegExp
(
`,(.*?)杯`
)
const
result
=
regex
.
exec
(
formatVal
)
this
.
cup
=
result
?
result
[
1
]
:
''
// 如果有匹配到结果则取第一个分组的内容
}
}
}
},
...
...
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