1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <template>
- <view>
- <view class="alarm" v-for="item in deviceAlarmRecords" :key="item.code">
- <text class="title">{{item.alarmName}}</text>
- <view class="content">
- <text>地 区:</text>
- <text>客户名称:</text>
- <text>报警类型:{{item.alarmType}}</text>
- <text>报警时间:{{item.createTime}}</text>
- </view>
- </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: {
- }
- }
- </script>
- <style>
- .alarm {
- width: 702rpx;
- height: 329rpx;
- background-color: white;
- margin-top: 30rpx;
- margin-left: 24rpx;
- border-radius: 10rpx;
- padding-top: 30rpx;
- }
- .content {
- font-size: 28rpx;
- display: flex;
- flex-direction: column;
- margin-top: 30rpx;
- margin-left: 30rpx;
- line-height: 55rpx;
- color: #444546;
- }
- .title {
- font-size: 36rpx;
- margin-left: 30rpx;
- color: #282828;
- font-weight: 600;
- }
- </style>
|