recommendList.vue
5.4 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<template>
<view style="background-color: #f7f7f7;" :style="vuex_theme">
<view class="">
<view v-if="list.length>0" style="padding: 10rpx 0;">
<view class="list" v-for="(item, i) in list" :key="i">
<view class="items" @click="goDetail(item)">
<view style="display: flex;">
<view class="title">{{item.name}}</view>
<view v-if="item.status=='onboarded'" class="flag1">已入职</view>
<view v-else-if="item.status=='abandon'" class="flag2">不合格</view>
<view v-else class="flag3">已推荐</view>
<view class="text_time">{{timeFormat(item.recommend_time)}}</view>
</view>
<view style="display: flex;padding-top: 36rpx;">
<image src="/static/img/common/phone.png" style="width: 32rpx;height: 32rpx;"></image>
<view style="margin-left: 16rpx;font-size: 28rpx;color: #000;">联系方式: {{item.mobile}}</view>
</view>
<view style="display: flex;padding-top: 22rpx;">
<image src="/static/img/common/zan.png" style="width: 32rpx;height: 32rpx;"></image>
<view style="margin-left: 16rpx;font-size: 28rpx;color: #000;">推荐职位: {{item.position_name}}({{item.customer_name}})</view>
</view>
</view>
</view>
<view style="height: 20px;"></view>
<c-loading :loading="loading"></c-loading>
<view style="height: 20px;"></view>
</view>
<view v-else class="no_data">
<image class="img" lazy-load=true :src="vuex_baseImgUrl && `${vuex_baseImgUrl}noData.png`"></image>
<view style="
font-size: 16px;
color: #333333;
margin-top: 60rpx;
text-align: center;
">暂无数据</view>
</view>
</view>
<u-popup class="popup" v-model="show" :border-radius="22" mode="bottom"
:closeable=true close-icon-size="36">
<view class="title">全部工作地点</view>
<view style="width: 100%;height: 1rpx;background-color: #ebebeb;"></view>
<view v-for="(item, index) in addressList" :key="index">
<view class="list" @click="gotomp(item)">
<text class="text">{{item.province}}{{item.city}}{{item.district}}{{item.address}}</text>
<image src="/static/img/common/arrow_right.png"
style="width: 32rpx;height: 32rpx;margin-left: auto;"></image>
</view>
</view>
<view style="width: 100%;height: 100rpx;background-color: #FFFFFF;"></view>
</u-popup>
</view>
</template>
<script>
import listMixin from "@/common/mixins/list-mixin.js";
import {
degreeOptions,
workOptions,
} from '@/common/util.js'
export default {
mixins: [listMixin],
data() {
return {
list: [],
}
},
onLoad() {
},
onShow() {
this.finished = false;
this.loading = "loadmore";
this.page = 1;
this.list = []
this._getList()
},
methods: {
timeFormat(value, format = 'yyyy/mm/dd') {
return this.$u.timeFormat(value, format)
},
goDetail(e) {
console.log("goDetail--", e)
this.$u.route({
url: '/pages/student/home/job-detail/job-detail',
params: {
id: e.position_id
}
})
},
async getData(requestParams) {
const {
search = {}
} = requestParams;
let params = {};
params.offset = 10 * (this.page - 1)
params.limit = 10;
return await this.$u.api.getRecommendListUrlAPI(params);
},
async _getList() {
if (this.page == 1) {
this.list = [];
}
// 根据实际情况修改自己修改key
let result = await this.getData({
page: this.page-1, // 传入页码
size: this.size, // 传入每页条数
search: this.search, // 传入搜索的对象
});
this.total = result.total_count;
if(result.total_count<10){
this.finished = true
this.loading = "nomore";
}
this.list = this.list.concat(result.items)
},
}
}
</script>
<style>
page {
background-color: #f7f7f7;
}
</style>
<style lang="scss" scoped>
.list {
.items {
width: 686rpx;
padding: 36rpx;
margin: 0 auto;
border-radius: 8rpx;
background-color: #ffffff;
margin-top: 16rpx;
.title {
display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
line-height: 32rpx;
vertical-align: middle;
}
.flag1{
background: rgba(91,178,246,0.06);
margin-left: 10rpx;
min-width: 76rpx;
font-size: 12px;
font-family: PingFangSC-Light, PingFang SC;
font-weight: 300;
color: #5BB2F6;
}
.flag2{
background: rgba(0,0,0,0.05);
margin-left: 10rpx;
min-width: 60rpx;
font-size: 12px;
font-family: PingFangSC-Light, PingFang SC;
font-weight: 300;
color: rgba(0,0,0,0.65);
}
.flag3{
background: var(--primary-color006);
margin-left: 10rpx;
min-width: 60rpx;
font-size: 12px;
font-family: PingFangSC-Light, PingFang SC;
font-weight: 300;
color: var(--primary-color);
}
.text_time{
font-size: 24rpx;
font-family: PingFangSC-Light, PingFang SC;
font-weight: 300;
color: rgba(0,0,0,0.45);
margin: auto;
margin-right: 1rpx;
}
}
}
.no_data {
width: 100%;
.img {
display: block;
margin: 0 auto;
padding-top: 200rpx;
width: 260rpx;
height: 200rpx;
}
.text_black_28 {
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
margin-top: 48rpx;
text-align: center;
}
}
</style>