Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
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
fukai
vue-gjjs
Commits
c03a6fe9
Commit
c03a6fe9
authored
Sep 26, 2021
by
潘际乾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check的提取
parent
fea88307
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
7 deletions
+28
-7
IStreamTable.vue
src/components/IStreamTable.vue
+1
-1
commonDeclare.js
src/mixin/commonDeclare.js
+2
-2
commonProcess.js
src/mixin/commonProcess.js
+10
-3
Check.js
src/model/Cptopn/Check.js
+0
-0
Default.js
src/model/Cptopn/Default.js
+0
-0
index.js
src/utils/index.js
+15
-1
No files found.
src/components/IStreamTable.vue
View file @
c03a6fe9
...
@@ -56,7 +56,7 @@ export default {
...
@@ -56,7 +56,7 @@ export default {
tableColumns
()
{
tableColumns
()
{
const
columnArr
=
[]
const
columnArr
=
[]
const
lines
=
this
.
columns
;
const
lines
=
this
.
columns
;
const
etyReg
=
/
\"(\w
*
\s?
\w
*
)\"
/
const
etyReg
=
/
\"(\w
*
(\s?
|
\/?)
\w
*
)\"
/
const
obj
=
{}
const
obj
=
{}
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
const
line
=
lines
[
i
];
const
line
=
lines
[
i
];
...
...
src/mixin/commonDeclare.js
View file @
c03a6fe9
...
@@ -8,8 +8,8 @@ export default{
...
@@ -8,8 +8,8 @@ export default{
computed
:{
computed
:{
declareParams
(){
declareParams
(){
return
{
return
{
version
:
this
.
version
,
version
:
this
.
version
,
trnName
:
this
.
trnName
,
trnName
:
this
.
root
?
this
.
root
.
trnName
:
this
.
trnName
,
}
}
}
}
}
}
...
...
src/mixin/commonProcess.js
View file @
c03a6fe9
...
@@ -46,10 +46,17 @@ export default {
...
@@ -46,10 +46,17 @@ export default {
}
}
const
triggerType
=
that
.
getTriggerType
(
key
)
const
triggerType
=
that
.
getTriggerType
(
key
)
if
(
that
.
checkRules
[
key
]){
if
(
that
.
checkRules
[
key
]){
for
(
let
j
=
0
;
j
<
that
.
checkRules
[
key
].
length
;
j
++
)
{
if
(
Array
.
isArray
(
that
.
checkRules
[
key
]))
{
const
check
=
that
.
checkRules
[
key
][
j
];
for
(
let
j
=
0
;
j
<
that
.
checkRules
[
key
].
length
;
j
++
)
{
const
check
=
that
.
checkRules
[
key
][
j
];
rule
.
push
({
validator
:
check
.
bind
(
that
),
trigger
:
triggerType
})
}
}
else
{
rule
.
push
({
rule
.
push
({
validator
:
check
.
bind
(
that
),
validator
:
that
.
checkRules
[
key
]
.
bind
(
that
),
trigger
:
triggerType
trigger
:
triggerType
})
})
}
}
...
...
src/model/Cptopn/Check.js
View file @
c03a6fe9
This diff is collapsed.
Click to expand it.
src/model/Cptopn/Default.js
View file @
c03a6fe9
This diff is collapsed.
Click to expand it.
src/utils/index.js
View file @
c03a6fe9
...
@@ -216,7 +216,20 @@ export default class Utils {
...
@@ -216,7 +216,20 @@ export default class Utils {
Utils
.
copyValueFromVO
(
this
.
model
,
data
)
Utils
.
copyValueFromVO
(
this
.
model
,
data
)
callback
()
callback
()
}
}
})
})
}
}
static
reflectCheck
(
key
){
return
async
function
(
rule
,
value
,
callback
){
//调用具体的check
const
res
=
await
this
.
exeuteCheck
(
key
)
if
(
res
.
respCode
==
SUCCESS
){
if
(
Object
.
hasOwnProperty
.
call
(
res
.
fieldErrors
,
key
))
{
callback
(
res
.
fieldErrors
[
key
])
}
else
{
callback
();
}
}
}
}
}
}
\ No newline at end of file
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