Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-boss
Project
Overview
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
姜雷
wx-boss
Commits
92d579d2
Commit
92d579d2
authored
Jan 15, 2020
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test'
parents
568791d7
0fde1104
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
1 deletion
+37
-1
ic_bj@2x.png
miniprogram/images/ic_bj@2x.png
+0
-0
equipment.js
miniprogram/pages/equipment/equipment.js
+0
-0
equipment.ts
miniprogram/pages/equipment/equipment.ts
+19
-1
equipment.wxml
miniprogram/pages/equipment/equipment.wxml
+4
-0
equipment.wxss
miniprogram/pages/equipment/equipment.wxss
+14
-0
No files found.
miniprogram/images/ic_bj@2x.png
0 → 100644
View file @
92d579d2
617 Bytes
miniprogram/pages/equipment/equipment.js
View file @
92d579d2
This diff is collapsed.
Click to expand it.
miniprogram/pages/equipment/equipment.ts
View file @
92d579d2
import
{
deviceFetch
}
from
'../../api/fetch'
;
import
{
IMyApp
}
from
'../../app'
;
const
app
=
getApp
<
IMyApp
>
();
// miniprogram/pages/equipment/equipment.js
Page
({
...
...
@@ -11,14 +14,15 @@ Page({
statusAmount
:
[],
totalAmount
:
[],
total
:
0
,
warningCount
:
0
,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
()
{
console
.
log
(
'in onLoad'
);
this
.
fetchList
();
this
.
fetchWarningCount
();
},
fetchList
()
{
...
...
@@ -53,6 +57,20 @@ Page({
});
});
},
fetchWarningCount
()
{
deviceFetch
({
url
:
'/device/warning/count'
,
data
:
{
operatorId
:
app
.
globalData
.
userInfo
.
operateId
,
},
})
.
then
(
res
=>
{
this
.
setData
!
({
warningCount
:
res
.
data
,
});
})
.
catch
(
err
=>
{});
},
goReportPage
(
e
)
{
const
{
index
}
=
e
.
currentTarget
.
dataset
;
const
item
=
this
.
data
.
areaDeviceAmount
[
index
];
...
...
miniprogram/pages/equipment/equipment.wxml
View file @
92d579d2
...
...
@@ -4,6 +4,10 @@
<view class="equipment-title">
<view class="equipment-title-color"></view>
<view class="equipment-title-text">设备总数({{total}}台)</view>
<view class="equipment-title-warn">
<image class="equipment-title-warnIcon" src="../../images/ic_bj@2x.png" />
<view>{{warningCount}}条</view>
</view>
</view>
<view class="equipment-canvas autoheight">
<equipment-chart dataList="{{totalAmount}}" />
...
...
miniprogram/pages/equipment/equipment.wxss
View file @
92d579d2
...
...
@@ -18,6 +18,20 @@
border-radius: 50%;
background-color: #6895fe;
}
.equipment-title-text {
flex: 1;
}
.equipment-title-warn {
display: flex;
align-items: center;
font-size: 24rpx;
color: #333;
}
.equipment-title-warnIcon {
width: 24rpx;
height: 24rpx;
margin-right: 12rpx;
}
.equipment-area {
padding: 40rpx 24rpx;
background-color: #f8f8f8;
...
...
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