张晓波
2023-09-19 164694c47c35d6654df69b533e8dbf8b5423efc5
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
<template>
    <view class="safety_index">
        <view class="safety_index_info"></view>
        <view 
            v-for="item in checkDataList"
            :key="item.examId"
            class="check_item">
            <view class="check_item_li">
                <u-image 
                    width="35px" 
                    height="35px"
                    src="https://pipe.thhy-tj.com/group1/M00/00/01/bx5d1GSiWhCAEXQ6AAAHEMPF2H4526.png">
                </u-image>
            </view>
            <view class="check_item_li">
                <text>{{item.examName}}</text>
                <text class="time_value">考核日期:{{item.examDate}}</text>
            </view>
            <view class="check_item_li">
                <view class="check_item_button" @click="navigetTo(item)">
                    考核记录
                </view>
            </view>
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                pageNum: 1,
                pageSize: 10,
                checkDataList: []
            }
        },
        onShow() {
            this.searchData();
        },
        methods: {
            // 获取考核信息
            async getSafetyCheckList() {
                const { data } = await this.$api.reboSystem.getSafetyCheckList({
                    pageNum: this.pageNum,
                    pageSize: this.pageSize
                })
                return data;
            },
             // 查询
            searchData() {
                this.getSafetyCheckList().then((data) => {
                    this.checkDataList = data.list;
                })
            },
            // 去考核
            navigetTo(item) {
                console.log(item);
                uni.navigateTo({
                    url: './checkRecord?data=' + JSON.stringify(item)
                })
            }
        }
    }
</script>
 
<style scoped lang="scss">
.safety_index {
    padding: 10px 10px 0;
    background: #DBDDDF;
    height: calc(100vh - 10px);
    overflow-y: auto;
    
    .safety_index_info {
        margin-bottom: 10px;
        width: 100%;
        height: 18%;
        background: url('https://pipe.thhy-tj.com/group1/M00/00/04/bx5d1GR29yOAI0n4AAMYLFxtvVs706.png') no-repeat;
        background-size: 100% 100%;
    }
    
    .check_item {
        display: flex;
        padding: 20px 15px;
        margin: 10px 0;
        background: #FFFFFF;
        border-radius: 5px;
        
        .check_item_li {
            display: flex;
            align-items: center;
            
            &:nth-child(2) {
                flex: 2;
                flex-direction: column;
                align-items: flex-start;
                margin: 0 10px;
                font-size: 18px;
            }
            
            .time_value {
                margin-top: 5px;
                color: #9F9F9F;
                font-size: 14px;
            }
            
            .check_item_button {
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 6px 12px;
                color: #FFFFFF;
                font-size: 12px;
                background: url('https://pipe.thhy-tj.com/group1/M00/00/04/bx5d1GR38HuAX1LDAAACuUYd2z4415.png') no-repeat;
                background-size: 100% 100%;
                
                &:active {
                    opacity: .8;
                }
            }
        }
    }
}
</style>