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
f5f49121
Commit
f5f49121
authored
Jan 13, 2020
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加设备告警中设备状态
parent
bd56efbc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
EquipmentWarning.js
...ram/pages/components/EquipmentWarning/EquipmentWarning.js
+0
-0
EquipmentWarning.ts
...ram/pages/components/EquipmentWarning/EquipmentWarning.ts
+17
-0
EquipmentWarning.wxml
...m/pages/components/EquipmentWarning/EquipmentWarning.wxml
+4
-1
EquipmentWarning.wxss
...m/pages/components/EquipmentWarning/EquipmentWarning.wxss
+7
-1
No files found.
miniprogram/pages/components/EquipmentWarning/EquipmentWarning.js
View file @
f5f49121
This diff is collapsed.
Click to expand it.
miniprogram/pages/components/EquipmentWarning/EquipmentWarning.ts
View file @
f5f49121
...
@@ -134,6 +134,23 @@ Component({
...
@@ -134,6 +134,23 @@ Component({
console
.
log
(
err
);
console
.
log
(
err
);
});
});
},
},
openEquipment
(
e
)
{
const
{
code
,
type
}
=
e
.
currentTarget
.
dataset
;
console
.
log
(
code
);
deviceFetch
({
url
:
`/device/
${
code
}
/
${
type
}
/enable`
,
method
:
'POST'
,
})
.
then
(
res
=>
{
wx
.
showToast
({
title
:
res
.
msg
||
'操作成功'
,
});
this
.
refreshList
();
})
.
catch
(
err
=>
{
console
.
log
(
err
);
});
},
closeEquipment
(
e
)
{
closeEquipment
(
e
)
{
const
{
code
,
type
}
=
e
.
currentTarget
.
dataset
;
const
{
code
,
type
}
=
e
.
currentTarget
.
dataset
;
console
.
log
(
code
);
console
.
log
(
code
);
...
...
miniprogram/pages/components/EquipmentWarning/EquipmentWarning.wxml
View file @
f5f49121
...
@@ -14,9 +14,12 @@
...
@@ -14,9 +14,12 @@
<view class="EquipmentWarning-listItem-title">
<view class="EquipmentWarning-listItem-title">
<view class="EquipmentWarning-listItem-titleCode">{{item.deviceCode}}</view>
<view class="EquipmentWarning-listItem-titleCode">{{item.deviceCode}}</view>
<view class="EquipmentWarning-listItem-titleLocation">{{item.deviceLocation}}</view>
<view class="EquipmentWarning-listItem-titleLocation">{{item.deviceLocation}}</view>
<view
class="EquipmentWarning-listItem-titleStat
e" data-code="{{item.deviceCode}}" data-type="{{item.deviceType}}" bind:tap="closeEquipment">
<view
wx:if="{{item.status === 1}}" class="EquipmentWarning-listItem-titleState Clos
e" data-code="{{item.deviceCode}}" data-type="{{item.deviceType}}" bind:tap="closeEquipment">
禁用
禁用
</view>
</view>
<view wx:if="{{item.status === 0}}" class="EquipmentWarning-listItem-titleState Open" data-code="{{item.deviceCode}}" data-type="{{item.deviceType}}" bind:tap="openEquipment">
启用
</view>
</view>
</view>
<view class="EquipmentWarning-listItem-info">
<view class="EquipmentWarning-listItem-info">
<view class="EquipmentWarning-listItem-infoErr">{{item.operationName}}</view>
<view class="EquipmentWarning-listItem-infoErr">{{item.operationName}}</view>
...
...
miniprogram/pages/components/EquipmentWarning/EquipmentWarning.wxss
View file @
f5f49121
...
@@ -67,9 +67,15 @@
...
@@ -67,9 +67,15 @@
width: 80rpx;
width: 80rpx;
height: 60rpx;
height: 60rpx;
line-height: 60rpx;
line-height: 60rpx;
margin-left: 120rpx;
}
.EquipmentWarning-listItem-titleState.Open {
background-color: #e6f9ec;
color: #6edb8f;
}
.EquipmentWarning-listItem-titleState.Close {
background-color: #ffe5e5;
background-color: #ffe5e5;
color: #fe6868;
color: #fe6868;
margin-left: 120rpx;
}
}
.EquipmentWarning-listItem-info {
.EquipmentWarning-listItem-info {
display: flex;
display: flex;
...
...
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