reviewList.vue
2.38 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
<template>
<view>
<view class="wBox">
<view class="tt">
审核信息
</view>
<view>
<view v-for="(n,index) in recordList" :key="index" class="stepItem">
<view class="time">{{ n.auditTime || '待审批' }}</view>
<view class="content">
<view class="status">
<text v-if="n.auditResult==1" class="text-success">审核通过</text>
<text v-if="n.auditResult==0" class="text-danger"> 审核拒绝</text>
</view>
<!-- <view class="name">第 {{index+1}} 步</view> -->
<view class="deptName">{{ n.auditDeptName }}</view>
<view v-if="n.auditResult==0">
备注:{{ n.auditMsg || '/' }}
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'underscore'
import to from 'await-to-js'
import {
onMounted,
ref
} from 'vue'
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
const app = getApp();
const userType = ref('')
const recordList = ref([])
onLoad(async (option) => {
console.log(option)
if (!option.type || option.type == 1) await getMyRecentFN()
if (option.type == 2) await getMyRecentExamFn()
})
async function getMyRecentFN() {
const [err, res] = await to(api.getMyRecent())
if (!err && res.data && res.data.auditLogs) {
try {
recordList.value = JSON.parse(res.data.auditLogs) || []
} catch (e) {
recordList.value = []
}
}
}
async function getMyRecentExamFn() {
const [err, res] = await to(api.getMyRecentExam())
if (!err && res.data && res.data.auditLogs) {
try {
recordList.value = JSON.parse(res.data.auditLogs) || []
} catch (e) {
recordList.value = []
}
}
}
</script>
<style lang="scss" scoped>
.wBox {
width: 700rpx;
padding: 30rpx;
margin: 20rpx auto;
background: #FFFFFF;
box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196, 203, 214, 0.1);
border-radius: 15rpx;
.tt {
color: #0A1629;
margin: 0 0 30rpx;
font-size: 30rpx;
}
.ddd {
font-size: 28rpx;
color: #333;
margin: 0 0 10rpx;
.lab {
color: #999;
display: inline-block;
text-align: justify;
}
}
}
</style>