|
@@ -1,69 +1,37 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
<uni-segmented-control :current="current" :values="controlList" @clickItem="handleChange" styleType="text" activeColor="#00897B"></uni-segmented-control>
|
|
<uni-segmented-control :current="current" :values="controlList" @clickItem="handleChange" styleType="text" activeColor="#00897B"></uni-segmented-control>
|
|
- <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore" style="height: calc(100vh - 36px);">
|
|
|
|
|
|
+ <scroll-view class="scrollBox defaultBgc" scroll-y="true" @scrolltolower="loadingMore" style="height: calc(100vh - 36px);">
|
|
<view v-if="items.length">
|
|
<view v-if="items.length">
|
|
- <uni-card v-for="(item,index) in items" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)" >
|
|
|
|
- <view>
|
|
|
|
- <view class="mar">
|
|
|
|
- <span style="font-size: 16px;font-weight: 700;color: black;">{{ item.job.name }}</span>
|
|
|
|
- <span class="mar" v-if="item.job.hire">
|
|
|
|
- <uni-icons type="fire-filled" size="25" color="#ff770d"></uni-icons>
|
|
|
|
- </span>
|
|
|
|
- <span class="salary-text">{{ item.job.payTo }}-{{ item.job.payFrom }}/{{ item.job.payName }}</span>
|
|
|
|
- </view>
|
|
|
|
- <view style="font-size: 13px;">
|
|
|
|
- <span class="tag-gap">
|
|
|
|
- <span>{{ item.job.areaName }}</span>
|
|
|
|
- <span class="viewider">|</span>
|
|
|
|
- <span>{{ item.job.eduName }}</span>
|
|
|
|
- <span class="viewider">|</span>
|
|
|
|
- <span>{{ item.job.expName }}</span>
|
|
|
|
- </span>
|
|
|
|
- </view>
|
|
|
|
- <view class="mar">
|
|
|
|
- <view style="margin:10px 0px;font-size:13px;" class="f-horizon">
|
|
|
|
- <span style="display: flex;">
|
|
|
|
- <image class="r-avatar" :src="item.enterprise.logoUrl || ''" style="width: 50px; height: 50px;"></image>
|
|
|
|
- <span class="ml" style="width:50vw;">
|
|
|
|
- <view style="width:50vw;font-weight: bold;">{{ item.enterprise.name }} </view>
|
|
|
|
- <view class="dis">
|
|
|
|
- <view class="show-more" :style="{'width': item.enterprise.industryName == '' ? '14vw' : '28vw'}">{{!!item.enterprise.industryName ? item.enterprise.industryName : '行业未知'}}</view>
|
|
|
|
- <span class="divider ss-m-10"> | </span>
|
|
|
|
- <span>{{ !!item.enterprise.scaleName ? item.enterprise.scaleName : '规模未知' }}</span>
|
|
|
|
- </view>
|
|
|
|
- </span>
|
|
|
|
- </span>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view v-if="current === 4">
|
|
|
|
- <view>拒绝原因: {{ item.refuseMsg }}</view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view v-if="item.status == '0'">
|
|
|
|
- <view class="divided-line"></view>
|
|
|
|
- <view style="display: flex;justify-content: flex-end;">
|
|
|
|
- <span style="color: #dd524d;text-decoration: underline;">拒绝</span>
|
|
|
|
- <span style="color: #2991de;margin-left: 65rpx;text-decoration: underline;">同意</span>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </uni-card>
|
|
|
|
|
|
+ <PositionList v-if="current === 0" class="pb-10" :list="items" :noMore="false"></PositionList>
|
|
|
|
+ <Items v-else class="pb-10" :list="items" @action="handleAction"></Items>
|
|
<uni-load-more :status="more" />
|
|
<uni-load-more :status="more" />
|
|
</view>
|
|
</view>
|
|
<view v-else class="nodata-img-parent">
|
|
<view v-else class="nodata-img-parent">
|
|
<image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
|
|
<image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
|
+
|
|
|
|
+ <!-- 同意、拒绝面试 -->
|
|
|
|
+ <uni-popup ref="popup" type="dialog">
|
|
|
|
+ <uni-popup-dialog :type="type === 'agree' ? 'success' : 'warn'" cancelText="取消" confirmText="确认"
|
|
|
|
+ title="系统提示" :content="type === 'agree' ? '确认接受面试吗?' : '确认拒绝面试吗?'" @confirm="handleConfirm" @close="handleClose"
|
|
|
|
+ ></uni-popup-dialog>
|
|
|
|
+ </uni-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
-import { getJobDeliveryList, getUserInterviewInvitePage } from '@/api/user'
|
|
|
|
|
|
+import { getJobDeliveryList, getUserInterviewInvitePage, userInterviewInviteConsent, userInterviewInviteReject } from '@/api/user'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
|
|
+import PositionList from '@/components/PositionList'
|
|
|
|
+import Items from './item.vue'
|
|
|
|
+import { userStore } from '@/store/user'
|
|
|
|
|
|
-const current = ref(0)
|
|
|
|
-const controlList = ['已投递', '待接受', '待面试', '已完成', '已拒绝']
|
|
|
|
|
|
+const useUserStore = userStore()
|
|
|
|
+const current = ref(1)
|
|
|
|
+const controlList = ['已投递', '待同意', '待面试', '已完成', '已拒绝']
|
|
const statusList = [0, 1, 3, 98]
|
|
const statusList = [0, 1, 3, 98]
|
|
|
|
|
|
const more = ref('more')
|
|
const more = ref('more')
|
|
@@ -72,12 +40,19 @@ const queryParams = ref({
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
pageSize: 10
|
|
pageSize: 10
|
|
})
|
|
})
|
|
|
|
+const popup = ref()
|
|
|
|
+const type = ref('')
|
|
|
|
+const id = ref(null)
|
|
|
|
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
const api = current.value === 0 ? getJobDeliveryList : getUserInterviewInvitePage
|
|
const api = current.value === 0 ? getJobDeliveryList : getUserInterviewInvitePage
|
|
if (current.value !== 0) queryParams.value.status = statusList[current.value - 1]
|
|
if (current.value !== 0) queryParams.value.status = statusList[current.value - 1]
|
|
const { data } = await api(queryParams.value)
|
|
const { data } = await api(queryParams.value)
|
|
const list = data?.list || []
|
|
const list = data?.list || []
|
|
|
|
+ if (!list.length && queryParams.value.pageNo === 1) {
|
|
|
|
+ items.value = []
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if (list?.length) {
|
|
if (list?.length) {
|
|
list.forEach(e => {
|
|
list.forEach(e => {
|
|
e.job = { ...e.job, ...dealDictObjData({}, e.job) }
|
|
e.job = { ...e.job, ...dealDictObjData({}, e.job) }
|
|
@@ -90,16 +65,48 @@ const getList = async () => {
|
|
getList()
|
|
getList()
|
|
|
|
|
|
const handleChange = (e) => {
|
|
const handleChange = (e) => {
|
|
|
|
+ items.value = []
|
|
queryParams.value.pageNo = 1
|
|
queryParams.value.pageNo = 1
|
|
current.value = e.currentIndex
|
|
current.value = e.currentIndex
|
|
getList()
|
|
getList()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 加载更多
|
|
const loadingMore = () => {
|
|
const loadingMore = () => {
|
|
more.value = 'loading'
|
|
more.value = 'loading'
|
|
queryParams.value.pageNo++
|
|
queryParams.value.pageNo++
|
|
getList()
|
|
getList()
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 同意、拒绝
|
|
|
|
+const handleAction = (item, typeVal) => {
|
|
|
|
+ id.value = item.id
|
|
|
|
+ type.value = typeVal
|
|
|
|
+ popup.value.open()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const handleClose = () => {
|
|
|
|
+ popup.value.close()
|
|
|
|
+ type.value = ''
|
|
|
|
+ id.value = null
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const handleConfirm = async () => {
|
|
|
|
+ if (!id.value) return
|
|
|
|
+ const api = type.value === 'agree' ? userInterviewInviteConsent : userInterviewInviteReject
|
|
|
|
+ // 同意需提交手机号
|
|
|
|
+ let phone = ''
|
|
|
|
+ if (useUserStore?.userInfo?.phone) phone = useUserStore?.userInfo?.phone
|
|
|
|
+ await api(type.value === 'agree' ? { id: id.value, phone } : id.value)
|
|
|
|
+ handleClose()
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '操作成功',
|
|
|
|
+ icon: 'success'
|
|
|
|
+ })
|
|
|
|
+ queryParams.value.pageNo = 1
|
|
|
|
+ items.value = []
|
|
|
|
+ getList()
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|