Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
Project
Project
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
wangqinghua
smart
Commits
bd4560ea
Commit
bd4560ea
authored
Nov 29, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
login
parent
b7bcd648
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
15 deletions
+25
-15
ne-topology.component.html
...pp/app/netTopology/ne-topology/ne-topology.component.html
+1
-1
ne-topology.component.ts
...bapp/app/netTopology/ne-topology/ne-topology.component.ts
+18
-6
basic-detail.component.html
...pp/overAll/basic/basic-detail/basic-detail.component.html
+6
-6
jtopo-editor.js
src/main/webapp/content/javascript/jtopo/js/jtopo-editor.js
+0
-2
No files found.
src/main/webapp/app/netTopology/ne-topology/ne-topology.component.html
View file @
bd4560ea
...
...
@@ -559,7 +559,7 @@
style=
"height: 580px;width: 100%;"
>
您的浏览器不支持HTML5!
</canvas>
<span>
{{topoType}}
</span>
<span
class=
"tips"
>
{{topoType}}
</span>
</div>
</div>
</div>
...
...
src/main/webapp/app/netTopology/ne-topology/ne-topology.component.ts
View file @
bd4560ea
...
...
@@ -24,6 +24,13 @@ declare let layui: any;
margin-right: 15px;
cursor: pointer;
}
.tips{
position: absolute;
top: 10px;
left: 20px;
color: #ca0814;
font-size: 20px;
}
`
]
})
...
...
@@ -35,7 +42,7 @@ export class NeTopologyComponent implements OnInit {
image
;
topoId
;
name
;
topoType
=
'
查看
'
;
topoType
=
'
只读模式
'
;
constructor
(
private
topologySer
:
TopologyService
,
private
message
:
NzMessageService
,
private
sanitizer
:
DomSanitizer
,
private
modalSer
:
NzModalService
)
{
...
...
@@ -51,17 +58,19 @@ export class NeTopologyComponent implements OnInit {
//新增拓扑图
addTopo
()
{
this
.
topoType
=
'新增'
;
this
.
topoType
=
'添加模式'
;
this
.
message
.
info
(
'添加模式'
);
editor
.
utils
.
clearTopology
();
}
//编辑拓扑图
editTopo
()
{
if
(
!
this
.
topoId
){
this
.
message
.
info
(
"请选择需要编辑的拓扑图"
)
this
.
message
.
info
(
"请选择需要编辑的拓扑图"
)
;
return
false
;
}
this
.
topoType
=
'编辑'
;
this
.
topoType
=
'编辑模式'
;
this
.
message
.
info
(
'编辑模式'
);
editor
.
utils
.
editTopology
();
}
...
...
@@ -79,7 +88,7 @@ export class NeTopologyComponent implements OnInit {
}
save
()
{
if
(
this
.
topoType
==
'
新增
'
)
{
if
(
this
.
topoType
==
'
添加模式
'
)
{
this
.
create
();
}
else
{
this
.
update
();
...
...
@@ -101,6 +110,7 @@ export class NeTopologyComponent implements OnInit {
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
info
(
'创建成功'
);
editor
.
utils
.
normalTopology
();
this
.
getList
();
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
...
...
@@ -124,6 +134,7 @@ export class NeTopologyComponent implements OnInit {
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
info
(
'编辑成功'
);
editor
.
utils
.
normalTopology
();
this
.
getList
();
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
...
...
@@ -134,13 +145,14 @@ export class NeTopologyComponent implements OnInit {
//查询单个
getDetail
(
id
)
{
editor
.
utils
.
clearTopology
();
this
.
topologySer
.
findItem
(
id
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
let
json
=
JSON
.
parse
(
res
.
data
.
json
);
this
.
name
=
res
.
data
.
name
;
this
.
topoId
=
res
.
data
.
id
;
editor
.
utils
.
normalTopology
();
this
.
topoType
=
'只读模式'
;
editor
.
loadTopologyByJson
(
json
,
'img/backimg.png'
);
}
}
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.html
View file @
bd4560ea
...
...
@@ -149,12 +149,12 @@
<nz-table
#
checkTable
[
nzData
]="
checkList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageIndex
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
change
($
event
)"
[
nzLoading
]="
loading
"
>
<thead>
<tr>
<th
nzWidth=
"
3
50px"
>
监测点名称
</th>
<th
nzWidth=
"150px"
>
最新数据
</th>
<th>
最新数据时间
</th>
<th
nzWidth=
"
2
50px"
>
监测点名称
</th>
<th
>
最新数据
</th>
<th
nzWidth=
"250px"
>
最新数据时间
</th>
<th>
监测点分类
</th>
<th>
更新时间间隔
</th>
<
th>
来源
</th
>
<
!--<th>来源</th>--
>
<th>
图表
</th>
<th>
操作
</th>
</tr>
...
...
@@ -162,11 +162,11 @@
<tbody>
<tr
*
ngFor=
"let data of checkTable.data"
>
<td>
{{data.name}}
</td>
<td>
{{data.lastclock}}
</td>
<td>
{{data.lastvalue}}
</td>
<td>
{{data.lastclock}}
</td>
<td>
{{data.itemType}}
</td>
<td>
{{data.delay}}
</td>
<
td>
{{data.source}}
</td
>
<
!--<td>{{data.source}}</td>--
>
<td
class=
"cursor"
>
<span
(
click
)="
showImageModal
(
data
)"
>
图表
</span>
</td>
...
...
src/main/webapp/content/javascript/jtopo/js/jtopo-editor.js
View file @
bd4560ea
...
...
@@ -1043,12 +1043,10 @@ var editor = new TopologyEditor('mainControl')
editor
.
utils
=
{
// 编辑模式
editTopology
:
function
()
{
alert
(
"编辑模式"
)
editor
.
utils
.
setEditMode
();
},
// 取消编辑模式
normalTopology
:
function
()
{
alert
(
"只读模式"
)
editor
.
utils
.
setNormalMode
();
},
// 添加节点, 编辑模式下才能添加
...
...
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