zengh
2022-05-09 52c39f5e2711e5535b689b66dfa5e100c7882b7f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<template>
    <view class="alarmOver">
        <view class="once">
            <view class="titles">事件描述:</view>
            <view class="mains">{{data.alarmType}}</view>
        </view>
        <view class="once">
            <view class="titles">事件地点:</view>
            <view class="mains">{{data.place}}</view>
        </view>
        <view class="once">
            <view class="titles">处理流程:</view>
            <!-- <view class="mains">加载中···</view> -->
            <view class="mains">
 
                <u-time-line>
                    <u-time-line-item nodeTop="19" v-for="(item,index) in oderData" :key="index">
                        <!-- 此处自定义了左边内容,用一个图标替代 -->
 
                        <template v-slot:node>
                            <view class="u-node" style="background: #19be6b;">
                                <!-- 此处为uView的icon组件 -->
                                <u-icon name="clock-fill" color="#fff" :size="30"></u-icon>
                            </view>
                        </template>
                        <template v-slot:content>
                            <view class="u-order">
                                <span class="u-o-time"> {{item.time}}</span>
                                <span class="u-o-main"> {{item.content}}</span>
                                <span class="zw" v-if="item == '暂无'">暂无</span>
                            </view>
                        </template>
                    </u-time-line-item>
                </u-time-line>
 
            </view>
        </view>
        <view class="once">
            <view class="titles">处理结果:</view>
            <view class="mains">妥善处理</view>
        </view>
        <view class="once">
            <view class="titles">问题反馈:</view>
            <view class="mains">无</view>
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                data: '',
                oderData: ['暂无'
                    //     {
                    //     time: '2019-05-08 12:12',
                    //     content: '任务下发'
                    // }, {
                    //     time: '2019-05-08 12:12',
                    //     content: '任务接收'
                    // }, {
                    //     time: '2019-05-08 12:12',
                    //     content: '处置完成'
                    // },
                ]
            }
        },
        methods: {
            userData(d) {
                console.log(d);
                var a = [{
                        time: '2019-05-08 12:12',
                        content: '任务下发'
                    },
                    {
                        time: '2019-05-08 12:12',
                        content: '任务接收'
                    }, {
                        time: '2019-05-08 12:12',
                        content: '处置完成'
                    }
                ]
                this.oderData = a;
            }
        },
        mounted() {
 
        },
        onLoad: function(options) {
            this.data = JSON.parse(options.data);
            if (this.data == '') {
                console.log('未传数据');
                return;
            }
            this.userData(this.data);
        }
    }
</script>
 
<style lang="scss" scoped>
    .u-node {
        width: 44rpx;
        height: 44rpx;
        border-radius: 100rpx;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #d0d0d0;
    }
 
    .u-o-time {
        color: rgb(200, 200, 200);
        font-size: 26rpx;
    }
 
    .u-o-main {
        margin-left: 2rem;
    }
 
    .alarmOver {
        background-color: #F7F7F7;
        width: 100%;
        height: 100%;
        overflow: auto;
 
        .once {
            width: 100%;
            min-height: 4rem;
            background-color: #fff;
            margin: 1rem 0;
 
            .titles {
                width: 100%;
                // border: 1px solid #0078A8;
                font-weight: 600;
                padding-left: 2rem;
                height: 1.5rem;
                line-height: 1.5rem;
            }
 
            .mains {
                width: 100%;
                // border: 1px solid #0078A8;
                padding-left: 2rem;
                min-height: 2.5rem;
                line-height: 2.5rem;
            }
        }
    }
</style>