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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
4 deletions
+57
-4
ic_bj@2x.png
miniprogram/images/ic_bj@2x.png
+0
-0
equipment.js
miniprogram/pages/equipment/equipment.js
+20
-3
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
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
fetch_1
=
require
(
"../../api/fetch"
);
var
app
=
getApp
();
Page
({
data
:
{
colors
:
[
'#6895fe'
,
'#fe6868'
,
'#6ee18f'
,
'#feae68'
],
...
...
@@ -8,10 +9,11 @@ Page({
statusAmount
:
[],
totalAmount
:
[],
total
:
0
,
warningCount
:
0
,
},
onLoad
:
function
()
{
console
.
log
(
'in onLoad'
);
this
.
fetchList
();
this
.
fetchWarningCount
();
},
fetchList
:
function
()
{
var
_this
=
this
;
...
...
@@ -43,6 +45,21 @@ Page({
});
});
},
fetchWarningCount
:
function
()
{
var
_this
=
this
;
fetch_1
.
deviceFetch
({
url
:
'/device/warning/count'
,
data
:
{
operatorId
:
app
.
globalData
.
userInfo
.
operateId
,
},
})
.
then
(
function
(
res
)
{
_this
.
setData
({
warningCount
:
res
.
data
,
});
})
.
catch
(
function
(
err
)
{
});
},
goReportPage
:
function
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
item
=
this
.
data
.
areaDeviceAmount
[
index
];
...
...
@@ -54,4 +71,4 @@ Page({
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXF1aXBtZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZXF1aXBtZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEseUNBQThDO0FBRzlDLElBQUksQ0FBQztJQUlILElBQUksRUFBRTtRQUNKLE1BQU0sRUFBRSxDQUFDLFNBQVMsRUFBRSxTQUFTLEVBQUUsU0FBUyxFQUFFLFNBQVMsQ0FBQztRQUNwRCxnQkFBZ0IsRUFBRSxFQUFFO1FBQ3BCLFlBQVksRUFBRSxFQUFFO1FBQ2hCLFdBQVcsRUFBRSxFQUFFO1FBQ2YsS0FBSyxFQUFFLENBQUM7S0FDVDtJQUtELE1BQU07UUFDSixPQUFPLENBQUMsR0FBRyxDQUFDLFdBQVcsQ0FBQyxDQUFDO1FBQ3pCLElBQUksQ0FBQyxTQUFTLEVBQUUsQ0FBQztJQUNuQixDQUFDO0lBRUQsU0FBUztRQUFULGlCQStCQztRQTlCQyxFQUFFLENBQUMsV0FBVyxDQUFDO1lBQ2IsS0FBSyxFQUFFLEtBQUs7U0FDYixDQUFDLENBQUM7UUFDSCxtQkFBVyxDQUFDO1lBQ1YsR0FBRyxFQUFFLHlCQUF5QjtTQUMvQixDQUFDO2FBQ0MsSUFBSSxDQUFDLFVBQUEsR0FBRztZQUNQLEVBQUUsQ0FBQyxXQUFXLEVBQUUsQ0FBQztZQUNqQixPQUFP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0+IHtcbiAgICAgICAgd3guaGlkZUxvYWRpbmcoKTtcbiAgICAgICAgY29uc29sZS5sb2cocmVzKTtcbiAgICAgICAgY29uc3QgeyBhcmVhRGV2aWNlQW1vdW50LCBzdGF0dXNBbW91bnQsIHRvdGFsQW1vdW50IH0gPSByZXMuZGF0YTtcbiAgICAgICAgbGV0IHRvdGFsID0gdG90YWxBbW91bnQucmVkdWNlKFxuICAgICAgICAgIChjb3VudDogTnVtYmVyLCBpdGVtKSA9PiBjb3VudCArIGl0ZW0udmFsdWUsXG4gICAgICAgICAgMCxcbiAgICAgICAgKTtcbiAgICAgICAgdGhpcy5zZXREYXRhISh7XG4gICAgICAgICAgYXJlYURldmljZUFtb3VudCxcbiAgICAgICAgICBzdGF0dXNBbW91bnQsXG4gICAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgICAgdG90YWwsXG4gICAgICAgIH0pO1xuICAgICAgfSlcbiAgICAgIC5jYXRjaChlcnIgPT4ge1xuICAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICB3eC5zaG93VG9hc3Qoe1xuICAgICAgICAgIHRpdGxlOiBlcnIubXNnIHx8IGVyci5lcnJNc2cgfHwgJ+e9kee7nOmUmeivrycsXG4gICAgICAgICAgaWNvbjogJ25vbmUnLFxuICAgICAgICAgIGR1cmF0aW9uOiA0MDAwLFxuICAgICAgICB9KTtcbiAgICAgIH0pO1xuICB9LFxuICBnb1JlcG9ydFBhZ2UoZSkge1xuICAgIGNvbnN0IHsgaW5kZXggfSA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0O1xuICAgIGNvbnN0IGl0ZW0gPSB0aGlzLmRhdGEuYXJlYURldmljZUFtb3VudFtpbmRleF07XG4gICAgd3gubmF2aWdhdGVUbyh7XG4gICAgICB1cmw6IGAvcGFnZXMvZXF1aXBtZW50UmVwb3J0L2VxdWlwbWVudFJlcG9ydD9hcmVhSWQ9JHtpdGVtLm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0ke2l0ZW0uYXJlYUlkfSZhcmVhTmFtZT0ke2l0ZW0uYXJlYU5hbWV9YCxcbiAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uKHJlcykge1xuICAgICAgICAvLyDpgJrov4dldmVudENoYW5uZWzlkJHooqvmiZPlvIDpobXpnaLkvKDpgIHmlbDmja5cbiAgICAgICAgcmVzLmV2ZW50Q2hhbm5lbC5lbWl0KCdhY2NlcHREYXRhRnJvbU9wZW5lclBhZ2UnLCB7IGRhdGE6IGl0ZW0gfSk7XG4gICAgICB9LFxuICAgIH0pO1xuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
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