Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
swifteditor
Overview
Overview
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
daixuan
swifteditor
Commits
e432c4c7
Commit
e432c4c7
authored
Oct 18, 2019
by
fukai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复新一波缺陷
parent
259a7303
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
136 additions
and
30 deletions
+136
-30
GPIConfig.js
src/constants/GPIConfig.js
+10
-10
SWFPage2.js
src/swift/SWFPage2.js
+115
-16
TagValidater.js
src/swift/TagValidater.js
+11
-4
No files found.
src/constants/GPIConfig.js
View file @
e432c4c7
const
config
=
{
const
config
=
{
mt103
:{
mt103
:{
t111
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t111
:{
visible
:
true
,
value
:
'
001
'
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
title
:
''
title
:
''
},
},
mt202
:{
mt202
:{
t111
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t111
:{
visible
:
true
,
value
:
'
001
'
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
title
:
''
title
:
''
},
},
mt202cov
:{
mt202cov
:{
t111
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t111
:{
visible
:
true
,
value
:
'
001
'
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
title
:
''
title
:
''
},
},
...
@@ -20,7 +20,7 @@ const config = {
...
@@ -20,7 +20,7 @@ const config = {
// title:''
// title:''
// },
// },
mt199_fk
:{
mt199_fk
:{
t111
:{
visible
:
true
,
value
:
'001'
,
read
:
true
},
t111
:{
visible
:
true
,
value
:
'001'
,
read
:
true
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
title
:
''
title
:
''
},
},
...
@@ -30,7 +30,7 @@ const config = {
...
@@ -30,7 +30,7 @@ const config = {
// title:''
// title:''
// },
// },
mt299_fk
:{
mt299_fk
:{
t111
:{
visible
:
true
,
value
:
'001'
,
read
:
true
},
t111
:{
visible
:
true
,
value
:
'001'
,
read
:
true
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
title
:
''
title
:
''
},
},
...
@@ -40,27 +40,27 @@ const config = {
...
@@ -40,27 +40,27 @@ const config = {
// title:''
// title:''
// },
// },
mt192_zf
:{
mt192_zf
:{
t111
:{
visible
:
true
,
value
:
'002'
,
read
:
true
},
t111
:{
visible
:
true
,
value
:
'002'
,
read
:
true
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
title
:
''
title
:
''
},
},
mt192_fk
:{
mt192_fk
:{
t111
:{
visible
:
true
,
value
:
'002'
,
read
:
true
},
t111
:{
visible
:
true
,
value
:
'002'
,
read
:
true
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
title
:
''
title
:
''
},
},
mt199_zf
:{
mt199_zf
:{
t111
:{
visible
:
true
,
value
:
'002'
,
read
:
true
},
t111
:{
visible
:
true
,
value
:
'002'
,
read
:
true
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
title
:
'MT 199止付'
title
:
'MT 199止付'
},
},
mt199_zffk
:{
mt199_zffk
:{
t111
:{
visible
:
true
,
value
:
'002'
,
read
:
true
},
t111
:{
visible
:
true
,
value
:
'002'
,
read
:
true
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
title
:
'MT 199止付反馈'
title
:
'MT 199止付反馈'
},
},
mt196_zffk
:{
mt196_zffk
:{
t111
:{
visible
:
true
,
value
:
'002'
,
read
:
true
},
t111
:{
visible
:
true
,
value
:
'002'
,
read
:
true
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
t121
:{
visible
:
true
,
value
:
''
,
read
:
false
,
required
:
true
},
title
:
'MT 196止付反馈'
title
:
'MT 196止付反馈'
},
},
...
...
src/swift/SWFPage2.js
View file @
e432c4c7
This diff is collapsed.
Click to expand it.
src/swift/TagValidater.js
View file @
e432c4c7
...
@@ -484,7 +484,12 @@ function gpiValidate(mty,t111,tag,tno,value){
...
@@ -484,7 +484,12 @@ function gpiValidate(mty,t111,tag,tno,value){
)
//校验状态码
)
//校验状态码
{
{
let
first
=
lines
[
0
]
let
first
=
lines
[
0
]
if
(
lines
.
length
<
2
)
{
msg
=
'至少为两行'
errors
.
s1
=
msg
return
msg
}
if
(
!
/^
\/[
A-Z0-9
]{4}\/([
A-Z0-9
]{4})?
$/
.
test
(
first
))
if
(
!
/^
\/[
A-Z0-9
]{4}\/([
A-Z0-9
]{4})?
$/
.
test
(
first
))
{
{
msg
=
'请在第一行填写正确的状态码——"/状态码/子状态码"'
msg
=
'请在第一行填写正确的状态码——"/状态码/子状态码"'
...
@@ -604,7 +609,7 @@ const PDCR = [
...
@@ -604,7 +609,7 @@ const PDCR = [
export
function
SwitchType
(
mty
,
t111
,
tag
,
value
){
export
function
SwitchType
(
mty
,
t111
,
tag
,
value
){
if
(
!
t111
)
if
(
!
t111
||
t111
==
'NONE'
)
return
return
if
(
t111
==
'001'
)
if
(
t111
==
'001'
)
return
'fk'
return
'fk'
...
@@ -614,10 +619,12 @@ export function SwitchType(mty,t111,tag,value){
...
@@ -614,10 +619,12 @@ export function SwitchType(mty,t111,tag,value){
if
(
!
mval
)
if
(
!
mval
)
return
return
let
lines
=
mval
.
split
(
/
[\r\n]{1,2}
/g
)
let
lines
=
mval
.
split
(
/
[\r\n]{1,2}
/g
)
console
.
log
(
value
)
console
.
log
(
mval
)
console
.
log
(
lines
)
let
first
=
lines
[
0
]
//判断第一行的码
let
first
=
lines
[
0
]
//判断第一行的码
if
(
!
/^
\/[
A-Z0-9
]{4}\/([
A-Z0-9
]{4})?
$/
.
test
(
first
))
if
(
first
.
length
<
5
)
//长度不够
{
{
return
return
}
}
...
...
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