Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-libs
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
劳工
zeroing-libs
Commits
03d02ac8
Commit
03d02ac8
authored
Nov 28, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
传个版本
parent
7175d6a5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
308 additions
and
0 deletions
+308
-0
data-center-event-filter.json
dist/processes/base/data-center-event-filter.json
+17
-0
card-list-init.json
dist/processes/custom/card-list-init.json
+21
-0
api-polling.json
dist/processes/projextX/api-polling.json
+251
-0
index.ts
src/process/custom/card-list-init/index.ts
+19
-0
No files found.
dist/processes/base/data-center-event-filter.json
0 → 100644
View file @
03d02ac8
{
"script"
:
"if(args.name === props.dataName){
\n
next('success', args);
\n
}else{
\n
next('cancel')
\n
}"
,
"props"
:
{
"dataName"
:
{
"type"
:
"string"
,
"alias"
:
"数据名"
}
},
"name"
:
"数据中心事件筛选"
,
"output"
:
[
"success"
,
"cancel"
],
"id"
:
"data-center-event-filter"
,
"group"
:
"base"
,
"type"
:
"builtin"
}
dist/processes/custom/card-list-init.json
0 → 100644
View file @
03d02ac8
{
"props"
:
{
"cardListNode"
:
{
"type"
:
"node"
,
"alias"
:
"卡片列表"
},
"cardCount"
:
{
"type"
:
"number"
,
"default"
:
6
,
"alias"
:
"卡片数量"
}
},
"name"
:
"初始化卡片列表"
,
"output"
:
[
"success"
],
"id"
:
"card-list-init"
,
"script"
:
"var cardListNode = props.cardListNode, cardCount = props.cardCount, badgeName = props.badgeName, badgeLabName = props.badgeLabName, dataName = props.dataName;
\n
var listNode = cardListNode || target;
\n
for (var i = 0; i < cardCount; i++) {
\n
var cardNode = listNode.getChildAt(i);
\n
var card0 = cardNode.getChildByName('0');
\n
card0.visible = true;
\n
var card1 = cardNode.getChildByName('1');
\n
card1.visible = false;
\n
var badge = cardNode.getChildByName(badgeName);
\n
var badgeLab = badge.getChildByName(badgeLabName);
\n
badgeLab.text = '${' + dataName + '|' + i + '}';
\n
}
\n
"
,
"group"
:
"custom"
,
"type"
:
"builtin"
}
dist/processes/projextX/api-polling.json
0 → 100644
View file @
03d02ac8
{
"props"
:
{
"uri"
:
{
"type"
:
"string"
,
"alias"
:
"链接"
},
"method"
:
{
"type"
:
"enum"
,
"enum"
:
[
"get"
,
"post"
],
"alias"
:
"方法"
,
"default"
:
"get"
},
"count"
:
{
"type"
:
"number"
,
"alias"
:
"次数"
,
"default"
:
10
},
"delay"
:
{
"type"
:
"number"
,
"default"
:
500
,
"alias"
:
"单次延时"
},
"dataName"
:
{
"type"
:
"string"
,
"alias"
:
"数据名"
},
"field"
:
{
"type"
:
"string"
,
"alias"
:
"字段名"
},
"successValues"
:
{
"type"
:
"string"
,
"alias"
:
"成功值"
},
"params"
:
{
"type"
:
"map"
,
"alias"
:
"参数"
}
},
"name"
:
"API轮询"
,
"output"
:
[
"success"
,
"failed"
,
"timeout"
,
"exception"
],
"sub"
:
{
"442452af-e4d2-47be-b931-86fef866056f"
:
{
"uuid"
:
"442452af-e4d2-47be-b931-86fef866056f"
,
"meta"
:
"entry"
,
"design"
:
{
"x"
:
26
,
"y"
:
15
,
"input"
:
{},
"output"
:
{
"success"
:
[
{
"x"
:
124.5
,
"y"
:
31
}
]
}
},
"props"
:
{},
"output"
:
{
"success"
:
[
"37b87a14-679b-49b8-9293-321b82d6019d"
]
}
},
"9def8371-1326-4daa-8220-78cf888297e3"
:
{
"uuid"
:
"9def8371-1326-4daa-8220-78cf888297e3"
,
"meta"
:
"wait"
,
"design"
:
{
"x"
:
265
,
"y"
:
313
,
"input"
:
{
"default"
:
[
{
"x"
:
5.5
,
"y"
:
39
}
]
},
"output"
:
{
"complete"
:
[
{
"x"
:
124.5
,
"y"
:
39
}
]
}
},
"props"
:
{
"duration"
:
{
"type"
:
"link"
,
"alias"
:
"delay"
}
},
"output"
:
{
"complete"
:
[
"37b87a14-679b-49b8-9293-321b82d6019d"
]
}
},
"b88c8995-28eb-470f-a8a2-7484c9f98e05"
:
{
"uuid"
:
"b88c8995-28eb-470f-a8a2-7484c9f98e05"
,
"meta"
:
"http-polling-judge"
,
"design"
:
{
"x"
:
441
,
"y"
:
57
,
"input"
:
{
"default"
:
[
{
"x"
:
5.5
,
"y"
:
56
}
]
},
"output"
:
{
"success"
:
[
{
"x"
:
124.5
,
"y"
:
42
}
],
"continue"
:
[
{
"x"
:
124.5
,
"y"
:
56
}
],
"timeout"
:
[
{
"x"
:
124.5
,
"y"
:
70
}
]
}
},
"props"
:
{
"count"
:
{
"type"
:
"link"
},
"field"
:
{
"type"
:
"link"
},
"successValues"
:
{
"type"
:
"link"
}
},
"output"
:
{
"continue"
:
[
"9def8371-1326-4daa-8220-78cf888297e3"
]
}
},
"37b87a14-679b-49b8-9293-321b82d6019d"
:
{
"uuid"
:
"37b87a14-679b-49b8-9293-321b82d6019d"
,
"meta"
:
"api-request"
,
"design"
:
{
"x"
:
250
,
"y"
:
43
,
"input"
:
{
"default"
:
[
{
"x"
:
5.5
,
"y"
:
64.5
}
]
},
"output"
:
{
"success"
:
[
{
"x"
:
124.5
,
"y"
:
50.5
}
],
"failed"
:
[
{
"x"
:
124.5
,
"y"
:
64.5
}
],
"exception"
:
[
{
"x"
:
124.5
,
"y"
:
78.5
}
]
}
},
"props"
:
{
"uri"
:
{
"type"
:
"link"
},
"method"
:
{
"type"
:
"link"
},
"dataName"
:
{
"type"
:
"link"
},
"params"
:
{
"type"
:
"link"
}
},
"output"
:
{
"success"
:
[
"b88c8995-28eb-470f-a8a2-7484c9f98e05"
]
}
}
},
"subEntry"
:
"442452af-e4d2-47be-b931-86fef866056f"
,
"metas"
:
[
{
"script"
:
"var count = props.count, field = props.field, successValues = props.successValues;
\n
var key = 'counting-' + vm.id;
\n
var counting = global[key] || 0;
\n
counting++;
\n
var successArr = successValues.split(',');
\n
if (successArr.indexOf(args[field] + '') >= 0) {
\n
delete global[key];
\n
next('success', args);
\n
}
\n
else if (counting < count) {
\n
global[key] = counting;
\n
next('continue');
\n
}
\n
else {
\n
delete global[key];
\n
next('timeout');
\n
}
\n
"
,
"props"
:
{
"count"
:
{
"type"
:
"number"
,
"default"
:
5
,
"alias"
:
"次数"
},
"field"
:
{
"type"
:
"string"
,
"alias"
:
"字段名"
,
"default"
:
"status"
},
"successValues"
:
{
"type"
:
"string"
,
"alias"
:
"成功值"
}
},
"name"
:
"轮询判断"
,
"output"
:
[
"success"
,
"continue"
,
"timeout"
],
"id"
:
"http-polling-judge"
,
"group"
:
"projextX"
,
"type"
:
"builtin"
}
],
"id"
:
"api-polling"
,
"group"
:
"projextX"
,
"type"
:
"builtin"
}
src/process/custom/card-list-init/index.ts
0 → 100644
View file @
03d02ac8
/**
* Created by rockyl on 2019-11-27.
*/
const
{
cardListNode
,
cardCount
,
badgeName
,
badgeLabName
,
dataName
}
=
props
;
const
listNode
=
cardListNode
||
target
;
for
(
let
i
=
0
;
i
<
cardCount
;
i
++
)
{
const
cardNode
=
<
engine
.
Container
>
listNode
.
getChildAt
(
i
);
const
card0
=
cardNode
.
getChildByName
(
'0'
);
card0
.
visible
=
true
;
const
card1
=
cardNode
.
getChildByName
(
'1'
);
card1
.
visible
=
false
;
const
badge
=
cardNode
.
getChildByName
(
badgeName
);
const
badgeLab
=
badge
.
getChildByName
(
badgeLabName
);
badgeLab
.
text
=
'${'
+
dataName
+
'|'
+
i
+
'}'
;
}
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