approvalRecord.vue
3.3 KB
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
151
152
153
154
155
156
157
158
159
<template>
<view class="report_detail">
<view class="list_box" v-if="list.length > 0">
<view class="item" v-for="(item, i) in list" :key="i" @click="handelDetail(item)">
<view class="bg_image" v-if="item.status == 'stay_examine'">
<u-image src="/static/img/home/labelBgGreen.png" width="142rpx" height="48rpx"></u-image>
<text>待审核</text>
</view>
<view class="bg_image" v-else-if="item.status == 'adopt'">
<u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image>
<text>已通过</text>
</view>
<view class="bg_image" v-else>
<u-image src="/static/img/home/labelBgGrey.png" width="142rpx" height="48rpx"></u-image>
<text>已退回</text>
</view>
<view class="info">
<u-image src="/static/img/home/approvalRecordBg.png" width="94rpx" height="94rpx" />
<view class="title_name">
<view class="title">
{{item.title}}
</view>
<view class="time">
<text>创建时间</text>
<text>
{{timeFormat(item.createdTime, 'yyyy-mm-dd hh:MM')}}
</text>
</view>
</view>
</view>
</view>
<c-loading :loading="loading"></c-loading>
</view>
<view v-else class="no_data">
<c-no-data></c-no-data>
</view>
<view class="report_info">
</view>
</view>
</template>
<script>
import {
mapGetters,
mapState,
mapActions
} from 'vuex'
import listMixin from "@/common/mixins/list-mixin.js";
import {
getReportApprovalListApi,
} from '@/config/api.js';
export default {
data() {
return {
formId: '',
list: [],
}
},
onLoad(option) {
this.formId = option.formId;
getReportApprovalListApi(option.formId).then(data => {
if (data) {
this.list = data
}
})
},
methods: {
timeFormat(timestamp, format = 'yyyy-mm-dd') {
return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--'
},
handelDetail(record) {
this.$u.route({
url: `pages/main/home/reportDetail/reportDetail?id=${record.id}&formId=${record.formId}`
})
},
}
}
</script>
<style lang="scss" scoped>
.report_detail {
width: 100%;
min-height: 100%;
height: auto;
background-color: #F7F7F7;
padding: 20rpx 0 0 0;
.list_box {
padding: 0 0 50rpx 0;
.item {
position: relative;
width: 630rpx;
margin: 30rpx auto;
padding: 30rpx;
border-radius: 12rpx;
background-color: #FFFFFF;
.bg_image {
position: absolute;
top: 0;
right: 0;
text {
position: absolute;
top: 12rpx;
right: 30rpx;
font-size: 24rpx;
line-height: 24rpx;
color: #FFFFFF;
}
}
.info {
display: flex;
flex-flow: row nowrap;
align-items: center;
margin: 0 0 30rpx 0;
.title_name {
.title {
font-size: 32rpx;
line-height: 44rpx;
color: #202131;
font-weight: 500;
margin: 0 20rpx;
}
.time {
padding: 8rpx 0 0 20rpx;
font-size: 28rpx;
line-height: 32rpx;
color: #909097;
text:last-child {
padding: 0 0 0 30rpx;
}
}
}
}
}
}
}
</style>