Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
witiumCloud2
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
WitCloud
witiumCloud2
Commits
c6e1979b
Commit
c6e1979b
authored
Apr 19, 2019
by
van.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置jks以及日常提交
parent
6271f8cc
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
52 deletions
+44
-52
Dockerfile
docker/Dockerfile
+13
-0
package.json
package.json
+1
-1
sensor-detail.component.html
src/app/main/sensor-detail/sensor-detail.component.html
+11
-19
sensor-detail.component.ts
src/app/main/sensor-detail/sensor-detail.component.ts
+13
-30
zh.json
src/assets/i18n/zh.json
+4
-1
environment.prod.ts
src/environments/environment.prod.ts
+2
-1
No files found.
docker/Dockerfile
0 → 100644
View file @
c6e1979b
# Http Server
# Version: 2.4.33
FROM
registry.cn-hangzhou.aliyuncs.com/witcloud/docker-httpd:latest
# Maintainers
MAINTAINER
Carit Zhu "carit.zhu@witium.com"
RUN
rm
-rf
/usr/local/apache2/htdocs/
*
# Add dist package
ADD
dist.tar.gz /usr/local/apache2/htdocs/
package.json
View file @
c6e1979b
...
...
@@ -4,7 +4,7 @@
"scripts"
:
{
"ng"
:
"ng"
,
"start"
:
"ng serve"
,
"build"
:
"ng build"
,
"build"
:
"ng build
--prod
"
,
"test"
:
"ng test"
,
"lint"
:
"ng lint"
,
"e2e"
:
"ng e2e"
...
...
src/app/main/sensor-detail/sensor-detail.component.html
View file @
c6e1979b
...
...
@@ -108,13 +108,10 @@
<th
nz-th
><span>
{{'wayAlias' | translate}}
</span></th>
<th
nz-th
><span>
{{'per' | translate}}
</span></th>
<th
nz-th
><span>
{{'wayType' | translate}}
</span></th>
<th
nz-th
><span>
{{'updateTime' | translate}}
</span></th>
<th
nz-th
><span>
{{'updateData' | translate}}
</span></th>
<th
nz-th
><span>
{{'max' | translate}}
</span></th>
<th
nz-th
><span>
{{'min' | translate}}
</span></th>
<th
nz-th
><span>
{{'alarmMax' | translate}}
</span></th>
<th
nz-th
><span>
{{'alarmMaxMax' | translate}}
</span></th>
<th
nz-th
><span>
{{'alarmMin' | translate}}
</span></th>
<th
nz-th
><span>
{{'alarmMinMin' | translate}}
</span></th>
<th
nz-th
><span>
{{'isAlarm' | translate}}
</span></th>
<th
nz-th
><span>
{{'oper' | translate}}
</span></th>
</tr>
</thead>
...
...
@@ -124,17 +121,12 @@
<td
nz-td
>
{{one.alias}}
</td>
<td
nz-td
>
{{one.unit}}
</td>
<td
nz-td
>
{{one.type}}
</td>
<td
nz-td
>
{{one.time | date: 'yyyy-MM-dd HH:mm:ss'}}
</td>
<td
nz-td
>
{{one.value}}
</td>
<td
nz-td
>
{{one.rangeMax}}
</td>
<td
nz-td
>
{{one.rangeMin}}
</td>
<td
nz-td
>
{{one.alarmUp}}
</td>
<td
nz-td
>
{{one.upperAlarmLimit}}
</td>
<td
nz-td
>
{{one.alarmDown}}
</td>
<td
nz-td
>
{{one.lowerAlarmLimit}}
</td>
<td
nz-td
>
{{one.isAlarm === 1 ? '是': '否'}}
</td>
<td
nz-td
>
<span
class=
"editSpan"
(
click
)="
update2
(
one
)"
>
{{'update' | translate}}
</span>
<nz-divider
nzType=
"vertical"
></nz-divider>
<span
class=
"deleteFontColor"
(
click
)="
deleteConfirm2
(
one
)"
>
{{'delete' | translate}}
</span>
<span
class=
"editSpan"
(
click
)="
toSee
(
one
)"
>
{{'see' | translate}}
</span>
</td>
</tr>
</tbody>
...
...
@@ -142,15 +134,15 @@
</nz-tab>
<nz-tab
nzTitle=
"图表"
>
<div
class=
"cards"
>
<div
class=
"card"
*
ngFor=
"let one of
items
"
>
<div
class=
"card"
*
ngFor=
"let one of
actualData
"
>
<div
class=
"title"
>
{{one.name}}
<div
class=
"rightSpan canClick"
>
查看数据
</div>
<div
class=
"rightSpan canClick"
(
click
)="
isClose =
true"
>
查看数据
</div>
</div>
<div
class=
"middle"
>
<div
class=
"left"
>
{{one.
data}}{{one.per
}}
</div>
<div
class=
"left"
>
{{one.
value}}{{one.unit === '-' ? '' : one.unit
}}
</div>
<div
class=
"right"
>
{{one.
min}}{{one.per}} - {{one.max}}{{one.per
}}
{{one.
rangeMin}}{{one.unit === '-' ? '' : one.unit}} - {{one.rangeMax}}{{one.unit === '-' ? '' : one.unit
}}
</div>
</div>
<div
class=
"bottom"
>
...
...
@@ -158,7 +150,7 @@
</div>
</div>
</div>
<div
class=
"charts"
>
<div
class=
"charts"
*
ngIf=
"isClose"
>
<div
style=
"width: calc(100% - 80px);display: inline-block;vertical-align: top;padding-left: 15px;"
>
<app-search-select
inModal=
"true"
[
label
]="'
selectTime
'
|
translate
"
[(
value
)]="
selectTime3
"
optL=
"a"
optV=
"b"
[
data
]="[{
a:
'
1
小时',
b:
1
},
{
a:
'
24
小时',
b:
24
},
{
a:
'
7
天',
b:
144
},
{
a:
'自定义',
b:
0
}]"
></app-search-select>
...
...
@@ -174,7 +166,7 @@
<nz-tab
nzTitle=
"图表"
>
222
</nz-tab>
</nz-tabset>
<div
class=
"btnLine"
>
<button
nz-button
[
nzType
]="'
default
'"
[
nzLoading
]="
isLoading
"
(
click
)="
close
()
"
>
<button
nz-button
[
nzType
]="'
default
'"
[
nzLoading
]="
isLoading
"
(
click
)="
isClose =
false;
"
>
<span>
{{'close' | translate}}
</span></button>
</div>
</div>
...
...
src/app/main/sensor-detail/sensor-detail.component.ts
View file @
c6e1979b
...
...
@@ -25,34 +25,12 @@ export class SensorDetailComponent implements OnInit {
isUC2
=
false
;
isMC
=
false
;
isUpdate
=
false
;
isUpdate2
=
false
;
probsModels
=
[];
topicModels
=
[];
actualData
=
[];
wayData
=
[];
selectTime3
=
24
;
items
=
[{
name
:
'液位'
,
data
:
'1'
,
per
:
'℃'
,
max
:
'2'
,
min
:
'0'
,
time
:
new
Date
().
getTime
()
},
{
name
:
'液位'
,
data
:
'1'
,
per
:
'℃'
,
max
:
'2'
,
min
:
'0'
,
time
:
new
Date
().
getTime
()
},
{
name
:
'液位'
,
data
:
'1'
,
per
:
'℃'
,
max
:
'2'
,
min
:
'0'
,
time
:
new
Date
().
getTime
()
}];
isClose
=
false
;
constructor
(
private
api
:
ApiService
,
private
message
:
NzMessageService
,
private
router
:
Router
,
private
ac
:
ActivatedRoute
,
private
modalService
:
NzModalService
,
private
translate
:
TranslateService
)
{
}
...
...
@@ -75,12 +53,15 @@ export class SensorDetailComponent implements OnInit {
}
next
=
(
data
)
=>
{
if
(
data
&&
data
.
constructor
===
Array
)
{
}
else
if
(
data
.
code
===
1
)
{
if
(
data
&&
data
.
code
===
1
)
{
this
.
message
.
success
(
data
&&
data
.
message
?
data
.
message
:
'操作成功'
);
this
.
cancel
();
this
.
getTopicData
();
}
else
if
(
data
.
code
===
0
)
{
this
.
getProbsModels
();
this
.
getTopicModels
();
this
.
getProbs
();
this
.
getCurrent
();
}
else
if
(
data
&&
data
.
code
===
0
)
{
this
.
message
.
error
(
data
&&
data
.
message
?
data
.
message
:
'操作失败'
);
}
else
{
this
.
message
.
error
(
data
&&
data
.
message
?
data
.
message
:
'获取数据失败'
);
...
...
@@ -215,7 +196,7 @@ export class SensorDetailComponent implements OnInit {
add2
()
{
this
.
isUpdate
2
=
false
;
this
.
isUpdate
=
false
;
this
.
req2
=
{};
this
.
req2
.
deviceNo
=
this
.
deviceNo
;
this
.
isUC2
=
true
;
...
...
@@ -223,8 +204,8 @@ export class SensorDetailComponent implements OnInit {
update2
(
one
)
{
this
.
req2
=
{...
one
};
this
.
isUpdate
2
=
true
;
this
.
req2
.
old
TopicName
=
one
.
topicN
ame
;
this
.
isUpdate
=
true
;
this
.
req2
.
old
Name
=
one
.
n
ame
;
this
.
isUC2
=
true
;
}
...
...
@@ -238,6 +219,8 @@ export class SensorDetailComponent implements OnInit {
delete2
(
one
)
{
this
.
isLoading
=
true
;
this
.
api
.
topic
.
delTopic
([{
deviceNo
:
one
.
deviceNo
,
topicName
:
one
.
topicN
ame
},
this
.
next
]);
this
.
api
.
probes
.
delAProbes
([{
deviceNo
:
one
.
deviceNo
,
topicName
:
one
.
topicName
,
name
:
one
.
n
ame
},
this
.
next
]);
}
toSee
()
{}
}
src/assets/i18n/zh.json
View file @
c6e1979b
...
...
@@ -150,5 +150,8 @@
"changeModel"
:
"更换模板"
,
"sensorTopicWay"
:
"传感器主题通道"
,
"topic"
:
"主题"
,
"updateWay"
:
"编辑通道"
"updateWay"
:
"编辑通道"
,
"updateTime"
:
"更新时间"
,
"updateData"
:
"最新数据"
,
"see"
:
"查看"
}
src/environments/environment.prod.ts
View file @
c6e1979b
export
const
environment
=
{
production
:
true
production
:
true
,
baseUrl
:
'http://47.111.110.50:8094'
,
// 对外访问测试网地址
};
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