1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <template>
- <view>
- <view class="alarm" v-for="item in deviceAlarmRecords" :key="item.code">
- <text class="title">{{item.alarmName}}</text>
- <view class="content">
- <text>报警时间:{{item.startTime}}</text>
- <text>变量ID:{{item.variableId}}</text>
- <text>报警状态:{{item.status}}</text>
- <text>持续时长:{{item.status}}</text>
- </view>
- </view>
- <view class="anniu">
- <image class="anniu" src="../../static/设备菜单/前往列表@2x.png" @tap="back"></image>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- deviceAlarmRecords: [],
- }
- },
- onLoad() {
- uni.request({
- url: 'http://127.0.0.1:9999/deviceAlarmRecord/list',
- method: 'GET',
- data: {},
- success: res => {
- this.deviceAlarmRecords = res.data.data.deviceAlarmRecords;
- console.log(res.data.data.deviceAlarmRecords);
- },
- })
- },
- methods: {
- back() {
- uni.navigateTo({
- url: '/pages/device/deviceInfo/deviceInfo'
- })
- }
- }
- }
- </script>
- <style>
- .anniu {
- width: 116rpx;
- height: 116rpx;
- float: right;
- margin-top: 10rpx;
- margin-right: 4rpx;
- }
- .alarm {
- width: 702rpx;
- height: 329rpx;
- background-color: white;
- margin-top: 30rpx;
- margin-left: 24rpx;
- border-radius: 10rpx;
- padding-top: 30rpx;
- }
- .content {
- display: flex;
- flex-direction: column;
- margin-top: 30rpx;
- margin-left: 30rpx;
- line-height: 55rpx;
- font-size: 28rpx;
- color: #444546;
- }
- .title {
- font-size: 36rpx;
- margin-left: 30rpx;
- color: #282828;
- font-weight: 600;
- }
- </style>
|