Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
IoTSharp
IoTSharp
提交
c944aeb5
IoTSharp
项目概览
IoTSharp
/
IoTSharp
9 个月 前同步成功
通知
15
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
IoTSharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c944aeb5
编写于
12月 17, 2021
作者:
麦壳饼
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/IoTSharp/IoTSharp
上级
2eb3da9c
07a4d3c6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
62 addition
and
10 deletion
+62
-10
IoTSharp/ClientApp/src/app/routes/flow/diagram/diagram.component.html
...entApp/src/app/routes/flow/diagram/diagram.component.html
+20
-3
IoTSharp/ClientApp/src/app/routes/flow/diagram/diagram.component.less
...entApp/src/app/routes/flow/diagram/diagram.component.less
+20
-1
IoTSharp/ClientApp/src/app/routes/flow/diagram/diagram.component.ts
...lientApp/src/app/routes/flow/diagram/diagram.component.ts
+18
-4
IoTSharp/ClientApp/src/app/shared/shared-zorro.module.ts
IoTSharp/ClientApp/src/app/shared/shared-zorro.module.ts
+3
-1
IoTSharp/ClientApp/src/styles/index.less
IoTSharp/ClientApp/src/styles/index.less
+1
-1
未找到文件。
IoTSharp/ClientApp/src/app/routes/flow/diagram/diagram.component.html
浏览文件 @
c944aeb5
<div
#diagramcontainer
style=
"height: 800px"
nz-row
>
<div
nz-col
#ref
class=
"diagram-container"
nzLg=
"18"
nzMd=
"18"
nzSm=
"18"
style=
"padding: 0.1rem"
></div>
<div
nz-col
#ref
class=
"diagram-container"
nzLg=
"18"
nzMd=
"18"
nzSm=
"18"
style=
"padding: 0.1rem"
>
</div>
<div
nz-col
nzSm=
"6"
style=
"padding: 0.1rem"
>
<nz-card
nzTitle=
"对象属性"
>
<form
nz-form
se-container=
"1"
labelWidth=
"100"
gutter=
"32"
>
...
...
@@ -101,28 +103,43 @@
<se
label=
"执行器参数(JSON)"
error=
"请选择执行器"
*ngIf=
"form.nodeProcessClassVisable"
>
<nz-code-editor
[nzToolkit]=
"toolkit"
[class.full-screen]=
"fullScreen"
(ngModelChange)=
"ngModelChange($event)"
style=
"width: 100%; height: 500px; padding-top: 1rem"
class=
"editor"
[(ngModel)]=
"form.nodeProcessParams"
[ngModelOptions]=
"{ standalone: true }"
[nzEditorOption]=
"{ theme: 'vs
-dark
',language: 'json' }"
[nzEditorOption]=
"{ theme: 'vs',language: 'json' }"
></nz-code-editor>
</se>
<se
label=
"脚本"
error=
"类型"
*ngIf=
"form.flowscriptVisable"
>
<nz-code-editor
[nzToolkit]=
"toolkit"
[class.full-screen]=
"fullScreen"
(ngModelChange)=
"ngModelChange($event)"
style=
"width: 100%; height: 500px; padding-top: 1rem"
class=
"editor"
[(ngModel)]=
"form.flowscript"
[ngModelOptions]=
"{ standalone: true }"
[nzEditorOption]=
"{ theme: 'vs
-dark
',language: 'json' }"
[nzEditorOption]=
"{ theme: 'vs',language: 'json' }"
></nz-code-editor>
</se>
</form>
</nz-card>
<ng-template
#toolkit
>
<i
nz-icon
[class.active]=
"fullScreen"
nz-tooltip
nzTooltipTitle=
"Toggle Fullscreen"
[nzType]=
"fullScreen ? 'fullscreen-exit' : 'fullscreen'"
(click)=
"toggleFullScreen()"
></i>
</ng-template>
<ng-template
#extraTemplate
>
<a>
More
</a>
</ng-template>
...
...
IoTSharp/ClientApp/src/app/routes/flow/diagram/diagram.component.less
浏览文件 @
c944aeb5
@import "node_modules/ng-zorro-antd/resizable/style/entry.less";
.diagram-container {
background-color: rgb(181, 245, 185);
}
...
...
@@ -11,4 +13,21 @@
}
.bpmn-icon-screw-wrench{
display: none;
}
\ No newline at end of file
}
.editor {
height: 200px;
}
.full-screen {
position: fixed;
z-index: 999;
height: 100%;
left: 0;
top: 0;
bottom: 0;
right: 0;
}
IoTSharp/ClientApp/src/app/routes/flow/diagram/diagram.component.ts
浏览文件 @
c944aeb5
...
...
@@ -11,6 +11,7 @@ import {
EventEmitter
,
ChangeDetectorRef
,
Renderer2
,
Inject
,
}
from
'
@angular/core
'
;
import
{
_HttpClient
}
from
'
@delon/theme
'
;
//test
import
{
delay
,
mergeMap
}
from
'
rxjs/operators
'
;
...
...
@@ -22,6 +23,8 @@ import { appmessage } from '../../common/AppMessage';
import
{
NzConfigService
}
from
'
ng-zorro-antd/core/config
'
;
import
{
NzCodeEditorComponent
}
from
'
ng-zorro-antd/code-editor
'
;
import
{
ObjectExt
}
from
'
@antv/x6
'
;
import
{
DOCUMENT
}
from
'
@angular/common
'
;
import
{
NzTooltipDirective
}
from
'
ng-zorro-antd/tooltip
'
;
@
Component
({
selector
:
'
app-diagram
'
,
...
...
@@ -38,11 +41,11 @@ import { ObjectExt } from '@antv/x6';
// 'element.mouseup'
// 来自 https://github.com/bpmn-io/bpmn-js-examples/tree/master/interaction
export
class
DiagramComponent
implements
AfterContentInit
,
OnChanges
,
OnDestroy
{
nzEditorOption
:
{
theme
:
'
vs
-dark
'
;
language
:
'
json
'
};
paramnzEditorOption
:
{
theme
:
'
vs
-dark
'
;
language
:
'
json
'
};
nzEditorOption
:
{
theme
:
'
vs
'
;
language
:
'
json
'
};
paramnzEditorOption
:
{
theme
:
'
vs
'
;
language
:
'
json
'
};
@
ViewChild
(
NzCodeEditorComponent
,
{
static
:
false
})
editorComponent
?:
NzCodeEditorComponent
;
isCollapsed
=
false
;
@
ViewChild
(
NzTooltipDirective
,
{
static
:
false
})
tooltip
?:
NzTooltipDirective
;
executors
=
[];
EMPTY_BPMN_DIAGRAM
=
`
...
...
@@ -69,7 +72,9 @@ export class DiagramComponent implements AfterContentInit, OnChanges, OnDestroy
@
Input
()
url
:
string
;
@
Input
()
ruleId
:
number
;
loading
=
true
;
fullScreen
=
false
;
private
document
:
Document
;
form
:
FormBpmnObject
=
{
id
:
''
,
flowid
:
''
,
...
...
@@ -89,6 +94,13 @@ export class DiagramComponent implements AfterContentInit, OnChanges, OnDestroy
activity
:
Activity
;
selectedValue
:
any
;
toggleFullScreen
():
void
{
this
.
fullScreen
=
!
this
.
fullScreen
;
this
.
renderer
.
setStyle
(
this
.
document
.
body
,
'
overflow-y
'
,
this
.
fullScreen
?
'
hidden
'
:
null
);
this
.
editorComponent
?.
layout
();
this
.
tooltip
?.
hide
();
}
flowscripttypeChange
(
$event
)
{
if
(
this
.
form
.
flowscripttype
===
'
executor
'
)
{
this
.
form
.
nodeProcessClassVisable
=
true
;
...
...
@@ -160,7 +172,9 @@ export class DiagramComponent implements AfterContentInit, OnChanges, OnDestroy
private
render
:
Renderer2
,
private
nzConfigService
:
NzConfigService
,
private
element
:
ElementRef
,
@
Inject
(
DOCUMENT
)
document
:
any
,
private
renderer
:
Renderer2
)
{
this
.
document
=
document
;
this
.
activity
=
new
Activity
();
this
.
activity
.
tasks
=
[];
this
.
activity
.
gateWays
=
[];
...
...
IoTSharp/ClientApp/src/app/shared/shared-zorro.module.ts
浏览文件 @
c944aeb5
...
...
@@ -35,6 +35,7 @@ import { NzLayoutModule } from 'ng-zorro-antd/layout';
import
{
NzStepsModule
}
from
'
ng-zorro-antd/steps
'
;
import
{
NzCodeEditorModule
}
from
'
ng-zorro-antd/code-editor
'
;
import
{
NzTreeViewModule
}
from
'
ng-zorro-antd/tree-view
'
;
import
{
NzResizableModule
}
from
'
ng-zorro-antd/resizable
'
;
export
const
SHARED_ZORRO_MODULES
=
[
NzButtonModule
,
NzMessageModule
,
...
...
@@ -72,5 +73,6 @@ export const SHARED_ZORRO_MODULES = [
NzLayoutModule
,
NzStepsModule
,
NzCodeEditorModule
,
NzTreeViewModule
NzTreeViewModule
,
NzResizableModule
];
IoTSharp/ClientApp/src/styles/index.less
浏览文件 @
c944aeb5
/* You can add global styles to this file, and also import other style files */
@import 'node_modules/ng-zorro-antd/code-editor/style/entry.less';
@import "node_modules/ng-zorro-antd/resizable/style/entry.less";
/* 测试,测完该放哪里放哪里 */
.flowviewhighlight .djs-visual > :nth-child(1) {
border-color: rgb(223, 126, 16) !important;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录