|
@@ -1,158 +1,251 @@
|
|
<template>
|
|
<template>
|
|
- <view v-if="list.length > 0" class="ss-m-x-20">
|
|
|
|
- <view v-for="(item, index) in list" :key="index">
|
|
|
|
- <view class="sub-li-bottom" @click.stop="jumpToEnterpriseDetail(item.enterprise?.id)">
|
|
|
|
- <view class="avatarBox">
|
|
|
|
- <image class="enterAvatar" :src="item.enterprise?.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- <span class="ss-m-x-20 color-66" style="font-weight: bold;">{{ item.contact?.name || ' -- ' }}</span>
|
|
|
|
- <span>{{ item.contact?.postNameCn }}</span>
|
|
|
|
- <span class="divider tag-gap1 ss-m-x-10" v-if="item.contact?.postNameCn && item.invitePhone"> | </span>
|
|
|
|
- <span class="mr">{{ item.invitePhone }}</span>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <!-- 职位信息 -->
|
|
|
|
- <view class="list-shape">
|
|
|
|
- <view class="titleBox my-5" @click="toDetail(item)">
|
|
|
|
- <span style="font-size: 16px;font-weight: 700; color: #0E100F;">{{ formatName(item.job?.name) }}</span>
|
|
|
|
- <span v-if="!item.job?.payFrom && !item.job?.payTo" class="salary-text">面议</span>
|
|
|
|
- <span v-else class="salary-text">{{ item.job?.payFrom }}-{{ item.job?.payTo }}{{ item.job?.payName ? '/' + item.job?.payName : '' }}</span>
|
|
|
|
- </view>
|
|
|
|
- <!-- 面试时间、地点 -->
|
|
|
|
- <view class="color-666 font-size-14 ss-m-t-20" @click="toDetail(item)">
|
|
|
|
- <view>面试时间:{{ timesTampChange(item.time, 'Y-M-D h:m') }}</view>
|
|
|
|
- <view class="ss-m-t-20">面试地点:{{ item.address }}</view>
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- <view v-if="item.status === '0'">
|
|
|
|
- <view class="divided-line"></view>
|
|
|
|
- <view class="d-flex justify-end">
|
|
|
|
- <span style="color: #dd524d;text-decoration: underline;" @click="handleAction(item, 'refuse')">拒绝</span>
|
|
|
|
- <span style="color: #00B760;margin-left: 65rpx;text-decoration: underline;" @click="handleAction(item, 'agree')">同意</span>
|
|
|
|
|
|
+ <view>
|
|
|
|
+ <uni-card v-for="(val, index) in items" :key="index" :is-shadow="true" @tap.stop="handleDetail(val)" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
|
|
|
|
+ <!-- 基本信息 -->
|
|
|
|
+ <view class="d-flex align-center">
|
|
|
|
+ <view class="user-avatar">
|
|
|
|
+ <image class="user-avatar-img" :src="getUserAvatar(val.person?.avatar, val.person?.sex)" mode="scaleToFill"></image>
|
|
|
|
+ <image class="user-avatar-sex" :src="val?.person?.sex ? val?.person?.sex === '1' ? '/static/img/man.png' : '/static/img/female.png' : ''" alt="" mode="scaleToFill" />
|
|
|
|
+ </view>
|
|
|
|
+ <view style="flex: 1; margin-left: 10px;">
|
|
|
|
+ <view class="d-flex justify-space-between align-center">
|
|
|
|
+ <view class="font-size-18">{{ val.person?.name }}</view>
|
|
|
|
+ <view :style="{'color': colorData[val.status]}">
|
|
|
|
+ {{ val.status ? statusList.find(i => i.value === val.status)?.label : '' }}
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <view class="ss-m-t-15 color-999">
|
|
|
|
+ <view>
|
|
|
|
+ 投递职位:
|
|
|
|
+ <image v-if="val.jobFairId" src="/static/svg/jobFair.svg" style="width: 15px; height: 15px;"></image>
|
|
|
|
+ {{ formatName(val.job?.name) }}
|
|
|
|
+ </view>
|
|
|
|
+ <view>联系电话:{{ val.person?.phone ?? '未填写' }}</view>
|
|
|
|
+ <view>面试时间:{{ timesTampChange(val.time, 'Y-M-D h:m') }}</view>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <view class="sub-li-bottom ss-m-t-20">
|
|
|
|
+ <template v-if="val.job?.status !== '1'" >
|
|
|
|
+ <view v-if="editStatus.indexOf(val.status) !== -1" class="sub-li-bottom-item color-primary" @tap.stop="handleActionClick('edit', val)">修改面试</view>
|
|
|
|
+ <view v-if="againStatus.indexOf(val.status) !== -1" class="sub-li-bottom-item color-primary" @tap.stop="handleActionClick('edit', val)">重新邀约</view>
|
|
|
|
+ </template>
|
|
|
|
+ <view v-if="val.status === '1'" class="sub-li-bottom-item color-primary" @click="handleActionClick('completed', val)">完成面试</view>
|
|
|
|
+ <view v-if="val.status === '3'" class="sub-li-bottom-item color-primary" @click="handleActionClick('feedback', val)">填写反馈</view>
|
|
|
|
+ <view
|
|
|
|
+ class="sub-li-bottom-item d-flex align-center justify-center"
|
|
|
|
+ @tap.stop="handleLoadMore(val)"
|
|
|
|
+ :style="{'color': !actionItems(val)?.length ? '#ccc' : '#00B760'}"
|
|
|
|
+ >
|
|
|
|
+ <view>更多操作</view>
|
|
|
|
+ <uni-icons type="list" class="ss-m-l-10" size="20" :color="!actionItems(val)?.length ? '#ccc' : '#00B760'"></uni-icons>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </uni-card>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 更多操作 -->
|
|
|
|
+ <uni-popup ref="popup" type="bottom" :mask-click="true">
|
|
|
|
+ <view class="actions" v-if="itemData && Object.keys(itemData).length">
|
|
|
|
+ <view
|
|
|
|
+ class="action-item"
|
|
|
|
+ v-for="(val, index) in actionItems(itemData)"
|
|
|
|
+ :key="index"
|
|
|
|
+ @tap.stop="handleActionClick(val.type, itemData)"
|
|
|
|
+ >{{ val.title }}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <button class="big-cancel-button" @tap.stop="handleClosePopup">取消</button>
|
|
|
|
+ </uni-popup>
|
|
|
|
+
|
|
|
|
+ <!-- 完成面试 -->
|
|
|
|
+ <uni-popup ref="finishPopup" type="dialog">
|
|
|
|
+ <uni-popup-dialog
|
|
|
|
+ type="warn"
|
|
|
|
+ cancelText="取消"
|
|
|
|
+ confirmText="确定"
|
|
|
|
+ title="系统提示"
|
|
|
|
+ content="是否确认已完成面试?"
|
|
|
|
+ @confirm="handleFinishConfirm"
|
|
|
|
+ @close="handleFinishClose"
|
|
|
|
+ ></uni-popup-dialog>
|
|
|
|
+ </uni-popup>
|
|
|
|
+ </view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
|
+import { ref } from 'vue'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { timesTampChange } from '@/utils/date'
|
|
|
|
+import { getUserAvatar } from '@/utils/avatar'
|
|
import { formatName } from '@/utils/getText'
|
|
import { formatName } from '@/utils/getText'
|
|
-import { jumpToEnterpriseDetail } from '@/utils/position'
|
|
|
|
|
|
+import { completedInterviewInvite } from '@/api/interview'
|
|
|
|
|
|
-const emits = defineEmits(['action'])
|
|
|
|
-const props = defineProps({
|
|
|
|
- list: { type: Array, default: () => [] }
|
|
|
|
-})
|
|
|
|
|
|
+const emit = defineEmits(['refresh'])
|
|
|
|
+const props = defineProps({ items: Array, current: [Number, String], statusList: Array })
|
|
|
|
|
|
-//岗位详情
|
|
|
|
-const toDetail = (item) =>{
|
|
|
|
- uni.navigateTo({ url: `/pagesB/positionDetail/index?id=${item.job?.id}&area=${item.job.area?.str ?? '全国'}` })
|
|
|
|
|
|
+const editStatus = ['0'] // 修改面试状态
|
|
|
|
+const againStatus = ['98', '99'] // 重新邀约状态
|
|
|
|
+const colorData = {
|
|
|
|
+ '0': 'orange',
|
|
|
|
+ '1': 'green',
|
|
|
|
+ '2': 'green',
|
|
|
|
+ '3': '#00B760',
|
|
|
|
+ '4': '#999',
|
|
|
|
+ '5': '#FE574A',
|
|
|
|
+ '98': '#FE574A',
|
|
|
|
+ '99': '#999'
|
|
}
|
|
}
|
|
|
|
|
|
-const handleAction = (item, type) => {
|
|
|
|
- emits('action', item, type)
|
|
|
|
-}
|
|
|
|
|
|
+const popup = ref()
|
|
|
|
+const finishPopup = ref()
|
|
|
|
+const itemData = ref({})
|
|
|
|
|
|
-</script>
|
|
|
|
-
|
|
|
|
-<style scoped lang="scss">
|
|
|
|
-.noMore{
|
|
|
|
- margin: 20px 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-.date-time{
|
|
|
|
- color:#d9d0d2;
|
|
|
|
- float: right;
|
|
|
|
|
|
+// 更多操作
|
|
|
|
+const handleLoadMore = (val) => {
|
|
|
|
+ if (!actionItems(val).length) {
|
|
|
|
+ itemData.value = {}
|
|
|
|
+ uni.showToast({ title: '暂无更多操作', icon: 'none' })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ itemData.value = val
|
|
|
|
+ popup.value.open()
|
|
}
|
|
}
|
|
|
|
|
|
-.divided-line {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 1px;
|
|
|
|
- background-color: #f0f2f7;
|
|
|
|
- margin: 20px 0;
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
-.enterAvatar{
|
|
|
|
- width: 40px;
|
|
|
|
- height: 40px;
|
|
|
|
- border-radius: 50%;
|
|
|
|
- margin: auto;
|
|
|
|
|
|
+// 关闭操作弹窗
|
|
|
|
+const handleClosePopup = () => {
|
|
|
|
+ popup.value.close()
|
|
|
|
+ itemData.value = {}
|
|
}
|
|
}
|
|
|
|
|
|
-.sub-li-bottom {
|
|
|
|
- margin-top: 10px;
|
|
|
|
- display: flex;
|
|
|
|
- // justify-content:space-between;
|
|
|
|
- align-items: center;
|
|
|
|
- background: linear-gradient(90deg, #f5fcfc 0, #fcfbfa 100%);
|
|
|
|
- font-size: 13px;
|
|
|
|
- padding: 5px 30rpx;
|
|
|
|
- border-radius: 12px 12px 0 0;
|
|
|
|
- .avatarBox {
|
|
|
|
- max-width: 40px;
|
|
|
|
- max-height: 40px;
|
|
|
|
|
|
+// 完成面试
|
|
|
|
+const handleFinishClose = () => {
|
|
|
|
+ if (actionItems(itemData.value).length && actionItems(itemData.value).find(e => e.value === 'completed')) handleClosePopup()
|
|
|
|
+ else itemData.value = {}
|
|
|
|
+ finishPopup.value.close()
|
|
|
|
+}
|
|
|
|
+const handleFinishConfirm = async () => {
|
|
|
|
+ if (!itemData.value || !itemData.value.id) return
|
|
|
|
+ try {
|
|
|
|
+ await completedInterviewInvite(itemData.value.id)
|
|
|
|
+ uni.showToast({ title: '操作成功', icon: 'none' })
|
|
|
|
+ emit('refresh')
|
|
|
|
+ handleFinishClose()
|
|
|
|
+ } catch {
|
|
|
|
+ handleFinishClose()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-.salary-text {
|
|
|
|
- float: right;
|
|
|
|
- color: #00B760;
|
|
|
|
- font-weight: 700;
|
|
|
|
-}
|
|
|
|
-.list-shape {
|
|
|
|
- padding: 10px 30rpx 10px;
|
|
|
|
- background-color: #fff;
|
|
|
|
- border-radius: 0 0 12px 12px;
|
|
|
|
- .titleBox {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
|
+// 邀请面试
|
|
|
|
+// const handleInterviewInvite = (item) => {
|
|
|
|
+// if (item?.job?.status === '1') {
|
|
|
|
+// uni.showToast({ title: '职位已关闭', icon: 'none' })
|
|
|
|
+// return
|
|
|
|
+// }
|
|
|
|
+// uni.navigateTo({
|
|
|
|
+// url: `/pagesB/InviteInterview/index?id=${item.userId}&jobId=${item.job.id}`
|
|
|
|
+// })
|
|
|
|
+// handleClosePopup()
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+const handleActionClick = (type, val) => {
|
|
|
|
+ if (val.job?.status === '1' && (type !== 'completed')) {
|
|
|
|
+ uni.showToast({ title: '职位已关闭', icon: 'none' })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ itemData.value = val
|
|
|
|
+ // 完成面试
|
|
|
|
+ if (type === 'completed') {
|
|
|
|
+ finishPopup.value.open()
|
|
}
|
|
}
|
|
-}
|
|
|
|
-.tag-gap{
|
|
|
|
- margin: 10rpx 10rpx 10rpx 0;
|
|
|
|
-}
|
|
|
|
-.tag-gap1{
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
-}
|
|
|
|
-.divider-mx{
|
|
|
|
- margin: 0 10rpx;
|
|
|
|
-}
|
|
|
|
-.divider {
|
|
|
|
- color:#e4d4d2;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-//公司名称
|
|
|
|
-.cer-end{
|
|
|
|
- position: absolute;
|
|
|
|
- top: 85%;
|
|
|
|
- right: 16%;
|
|
|
|
|
|
+const obj = {
|
|
|
|
+ '0': [1],
|
|
|
|
+ '1': [4, 1, 3],
|
|
|
|
+ '2': [3]
|
|
|
|
+}
|
|
|
|
+const actions = ref([
|
|
|
|
+ { title: '完成面试', value: 'completed' },
|
|
|
|
+ { title: '取消面试', value: 'cancel' },
|
|
|
|
+ { title: '填写反馈', value: 'feedback' },
|
|
|
|
+ { title: '爽约', value: 'attended' },
|
|
|
|
+ { title: '修改面试', value: 'edit' }
|
|
|
|
+])
|
|
|
|
+const actionItems = (item) => {
|
|
|
|
+ const status = item?.status
|
|
|
|
+ const jobClosed = item.job?.status === '1'
|
|
|
|
+ const type = jobClosed && obj[status] ? [0] : obj[status] // 职位已关闭只能操作完成面试
|
|
|
|
+ if (!type || !type.length) return []
|
|
|
|
+ let data = type.map(e => actions.value[e])
|
|
|
|
+ return data
|
|
}
|
|
}
|
|
-.cer-text{
|
|
|
|
- text-decoration: underline;
|
|
|
|
- margin: 0 5rpx;
|
|
|
|
-}
|
|
|
|
-//一行展示不全...
|
|
|
|
-.dis{
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
+.user-avatar {
|
|
|
|
+ position: relative;
|
|
|
|
+ &-img {
|
|
|
|
+ width: 45px;
|
|
|
|
+ height: 45px;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ }
|
|
|
|
+ &-sex {
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: 0;
|
|
|
|
+ bottom: 2px;
|
|
|
|
+ width: 20px;
|
|
|
|
+ height: 20px;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+.action {
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ &-item {
|
|
|
|
+ text-align: center;
|
|
|
|
+ width: 90vw;
|
|
|
|
+ border-bottom: 1px solid #eee;
|
|
|
|
+ height:44px;
|
|
|
|
+ line-height: 44px;
|
|
|
|
+ margin: 0 auto;
|
|
|
|
+ color: #00B760;
|
|
|
|
+ background-color: #fff !important;
|
|
|
|
+ &:first-child {
|
|
|
|
+ border-radius: 5px 5px 0 0;
|
|
|
|
+ }
|
|
|
|
+ &:last-child {
|
|
|
|
+ border-radius: 0 0 5px 5px;
|
|
|
|
+ border-bottom: none;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+.big-cancel-button {
|
|
|
|
+ width: 90vw;
|
|
|
|
+ height:44px;
|
|
|
|
+ line-height: 44px;
|
|
|
|
+ margin: 10px auto;
|
|
|
|
+ color: #fe574a;
|
|
|
|
+ background-color: #fff !important;
|
|
|
|
+ font-size: 28rpx;
|
|
}
|
|
}
|
|
-.show-more{
|
|
|
|
- width: 26vw;
|
|
|
|
- white-space: nowrap;
|
|
|
|
- overflow: hidden;
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
|
|
+.sub-li-bottom {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ // align-items: flex-end;
|
|
|
|
+ margin-top: 10px;
|
|
|
|
+ font-size: 13px;
|
|
|
|
+ &-item {
|
|
|
|
+ width: 50%;
|
|
|
|
+ height: 35px;
|
|
|
|
+ line-height: 35px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ margin-right: 15px;
|
|
|
|
+ background-color: #f7f8fa;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ &:nth-child(2) {
|
|
|
|
+ margin-right: 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-/* 列表触底暂无更多 */
|
|
|
|
-.noMore{ text-align:center; color:grey; }
|
|
|
|
-.mt { margin-top: 10rpx; }
|
|
|
|
-.mb { margin-bottom: 10rpx; }
|
|
|
|
-.ml { margin-left: 20rpx; }
|
|
|
|
-.mr { margin-right: 20rpx; }
|
|
|
|
-.mr-10{ margin-right: 10rpx; }
|
|
|
|
-.my-5{ margin: 5px 0; }
|
|
|
|
</style>
|
|
</style>
|