Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
Scott
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Scott Sun
Scott
Commits
34ecf55d
Commit
34ecf55d
authored
Apr 02, 2021
by
Scott Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s
parent
ddfff236
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
33 deletions
+37
-33
template.js
template.js
+37
-33
No files found.
template.js
View file @
34ecf55d
...
@@ -107,10 +107,10 @@ try {
...
@@ -107,10 +107,10 @@ try {
if
(
/yes/ig
.
test
(
par
.
auto_save
))
{
if
(
/yes/ig
.
test
(
par
.
auto_save
))
{
GEN
.
checkInout
({
job
:
job
,
mode
:
"out"
});
GEN
.
checkInout
({
job
:
job
,
mode
:
"out"
});
GEN
.
saveJob
({
job
:
job
});
GEN
.
saveJob
({
job
:
job
});
GEN
.
checkInout
({
job
:
job
,
mode
:
"in"
});
}
}
GEN
.
checkInout
({
job
:
job
,
mode
:
"in"
});
// 结尾返回 固定写法
// 结尾返回
固定写法
var
Return
=
"Done"
var
Return
=
"Done"
if
(
mode
===
"aimdfm"
)
{
if
(
mode
===
"aimdfm"
)
{
IKM
.
crud
(
"updateRow"
,
{
IKM
.
crud
(
"updateRow"
,
{
...
@@ -126,7 +126,7 @@ try {
...
@@ -126,7 +126,7 @@ try {
resultData
.
push
(
tmperr
);
resultData
.
push
(
tmperr
);
Return
=
{
status
:
Status
,
result_data
:
resultData
};
Return
=
{
status
:
Status
,
result_data
:
resultData
};
}
}
return
Return
_Return_Label_
=
Return
}
catch
(
e
)
{
}
catch
(
e
)
{
if
(
GEN
.
STATUS
.
length
>
0
)
{
if
(
GEN
.
STATUS
.
length
>
0
)
{
IKM
.
msg
(
GEN
.
STATUS
.
join
(
"
\n
"
));
IKM
.
msg
(
GEN
.
STATUS
.
join
(
"
\n
"
));
...
@@ -134,40 +134,44 @@ try {
...
@@ -134,40 +134,44 @@ try {
IKM
.
msg
(
e
);
IKM
.
msg
(
e
);
Status
=
'error'
;
Status
=
'error'
;
resultData
.
push
({
type
:
"error"
,
title
:
"脚本执行出错!"
,
detail
:
[{
desc
:
_
.
toString
(
e
)
}]
});
resultData
.
push
({
type
:
"error"
,
title
:
"脚本执行出错!"
,
detail
:
[{
desc
:
_
.
toString
(
e
)
}]
});
return
(
mode
===
"aimdfm"
)
?
{
status
:
Status
,
result_data
:
resultData
}
:
"Error"
;
_Return_Label_
=
(
mode
===
"aimdfm"
)
?
{
status
:
Status
,
result_data
:
resultData
}
:
"Error"
;
}
}
// 获取层别
/**
// func (Object) ([]string)
* 获取层别
function
getLayer
(
props
){
// 获取层
* @param {Object} 过滤选项
if
(
!
props
)
{
* @returns {Array}
return
*/
}
function
getLayer
(
props
)
{
if
(
!
props
.
context
)
{
if
(
!
props
)
{
props
.
context
=
"board"
props
=
{};
}
}
var
matrix
=
GEN
.
getMatrix
({
job
:
job
})
var
matrix
=
GEN
.
getMatrix
({
job
:
job
});
return
Object
.
keys
(
matrix
).
reduce
(
function
(
a
,
b
){
return
Object
.
keys
(
matrix
).
reduce
(
function
(
a
,
b
)
{
var
info
=
matrix
[
b
];
var
info
=
matrix
[
b
];
var
ret
=
true
;
var
ret
=
true
;
for
(
var
key
in
props
)
{
for
(
var
_key
in
props
)
{
if
(
info
[
key
])
{
if
(
info
[
_key
])
{
if
(
/string/ig
.
test
(
typeof
props
[
key
])){
if
(
/object string|object number/ig
.
test
({}.
toString
.
call
(
props
[
_key
])))
{
var
reg
=
new
RegExp
(
props
[
key
],
"ig"
)
if
(
props
[
_key
]
!=
info
[
_key
])
{
if
(
!
reg
.
test
(
info
[
key
])){
ret
=
false
;
ret
=
false
}
}
if
(
/object RegExp/ig
.
test
({}.
toString
.
call
(
props
[
_key
])))
{
if
(
!
props
[
_key
].
test
(
info
[
_key
]))
{
ret
=
false
;
}
}
}
}
if
(
/function/ig
.
test
(
typeof
props
[
key
]))
{
if
(
/object function/ig
.
test
({}.
toString
.
call
(
props
[
_key
])))
{
if
(
!
props
[
key
](
info
[
key
]))
{
if
(
!
props
[
_key
](
info
[
_key
]))
{
ret
=
false
ret
=
false
;
}
}
}
}
}
}
}
}
if
(
ret
)
{
if
(
ret
)
{
a
.
push
(
props
.
res
==
"info"
?
info
:
b
)
a
.
push
(
props
.
res
==
"info"
?
info
:
b
);
}
}
return
a
return
a
;
},[])
},
[]);
}
}
\ 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