|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div v-if="props.items.length" class="d-flex align-center mb-1">
|
|
|
- <v-checkbox v-if="tab !== 3 && tab !== 4" v-model="selectAll" :label="!selectAll ? $t('common.selectAll') : `已选中${selectList.length}条`" hide-details color="primary" @update:model-value="handleChangeSelectAll"></v-checkbox>
|
|
|
+ <v-checkbox v-model="selectAll" :label="!selectAll ? $t('common.selectAll') : `已选中${selectList.length}条`" hide-details color="primary" @update:model-value="handleChangeSelectAll"></v-checkbox>
|
|
|
<div v-if="tab === 1" class="ml-8">
|
|
|
<v-btn :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(2, 'batch', {})">{{ $t('common.refresh') }}</v-btn>
|
|
|
<v-btn class="mx-3" :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(3, 'top', {})">{{ $t('common.topping') }}</v-btn>
|
|
@@ -9,18 +9,17 @@
|
|
|
</div>
|
|
|
<v-btn v-if="tab === 2" class="ml-8" :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(1, 'activation', {})">{{ $t('common.activation') }}</v-btn>
|
|
|
</div>
|
|
|
- <div v-for="val in items" :key="val.id" class="itemBox mb-3" :style="{'height': val?.hire ? '162px' : '134px'}">
|
|
|
+ <div v-for="val in items" :key="val.id" class="itemBox mb-3" style="height: 134px;">
|
|
|
<div class="d-flex justify-space-between" style="padding: 10px 20px;">
|
|
|
<div class="position">
|
|
|
- <div v-if="tab !== 3 && tab !== 4" class="item-select">
|
|
|
+ <div class="item-select">
|
|
|
<v-checkbox v-model="val.select" hide-details color="primary" @update:model-value="handleChangeSelect"></v-checkbox>
|
|
|
</div>
|
|
|
- <div :class="[{'ml-10': tab !== 3 && tab !== 4} ,'d-flex' ,'align-center']">
|
|
|
+ <div :class="['ml-10' ,'d-flex' ,'align-center']">
|
|
|
<span v-if="val.name.indexOf('style')" v-html="val.name" class="position-name"></span>
|
|
|
<span v-else class="position-name">{{ val.name }}</span>
|
|
|
- <svg-icon v-if="tab === 4" class="ml-3" name="pin" size="25"></svg-icon>
|
|
|
</div>
|
|
|
- <div :class="['mt-3', 'other-info', 'ellipsis', {'ml-10': tab !== 3 && tab !== 4}]">
|
|
|
+ <div :class="['mt-3', 'other-info', 'ellipsis', 'ml-10']">
|
|
|
<span>{{ val.areaName }}</span>
|
|
|
<span class="lines" v-if="val.areaName && val.eduName"></span>
|
|
|
<span>{{ val.eduName }}</span>
|
|
@@ -31,57 +30,31 @@
|
|
|
<span class="lines"></span>
|
|
|
<span>{{ val.positionName }}</span>
|
|
|
</div>
|
|
|
- <div v-if="val?.hire" class="mt-2">
|
|
|
- <v-chip v-if="val?.hirePrice && val.hirePrice > 0" class="mr-3" label color="primary" size="small">赏金:{{ commissionCalculation(val.hirePrice, 1) }}元</v-chip>
|
|
|
- <!-- <v-chip v-if="val?.hirePoint && val.hirePoint > 0" label color="primary" size="small">积分:{{ commissionCalculation(val.hirePoint, 1) }}点</v-chip> -->
|
|
|
- </div>
|
|
|
</div>
|
|
|
<div class="d-flex align-center">
|
|
|
<v-btn v-if="tab === 1" class="ml-3" color="primary" @click="handleAction(2, '', val)">{{ $t('common.refresh') + $t('common.position') }}</v-btn>
|
|
|
<v-btn v-if="tab === 2" color="primary" @click="handleAction(1, '', val)">{{ $t('common.activatePosition') }}</v-btn>
|
|
|
- <v-chip v-if="tab === 4 && (val.status-0) === 99" color="warning" label>职位待发布,支付后成功后自动发布</v-chip>
|
|
|
- <v-chip v-if="tab === 4 && val.status === '1'" color="error" class="cursor-pointer" label style="text-decoration: underline;" @click="handleAction(1, '', val)">职位已关闭,点击激活职位</v-chip>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bottom pa-5 d-flex justify-space-between align-center">
|
|
|
- <!-- <div>{{ $t('position.refreshTime') }} :{{ timesTampChange(val.updateTime, 'Y-M-D') }} {{ val.expireDay && Number(val.expireDay) >= 1 ? `(${ val.expireDay }天后到期)` : '' }}</div> -->
|
|
|
<div>{{ $t('position.refreshTime') }} :{{ timesTampChange(val.updateTime, 'Y-M-D') }}</div>
|
|
|
<div class="d-flex">
|
|
|
<div class="ml-10 d-flex">
|
|
|
- <div v-if="tab === 4 && (val.status-0) === 99">
|
|
|
- <span class="cursor-pointer color-primary" @click="toPay(val)">去支付</span>
|
|
|
- <span class="lines"></span>
|
|
|
- </div>
|
|
|
<div v-if="tab === 1">
|
|
|
<span class="cursor-pointer actions" @click="handleAction(3, '', val)">{{ $t('common.topping') }}</span>
|
|
|
<span class="lines"></span>
|
|
|
<span class="cursor-pointer actions" @click="handleAction(0, '', val)">{{ $t('common.close') }}</span>
|
|
|
<span class="lines"></span>
|
|
|
</div>
|
|
|
- <div v-if="tab !== 3" class="cursor-pointer actions" @click="handleEdit(val)">{{ $t('common.edit') }}</div>
|
|
|
- <div v-if="tab === 4 && (val.status - 0) !== 99 && val.status !== '1'">
|
|
|
- <span class="lines"></span>
|
|
|
- <span class="cursor-pointer actions" @click="handleAction(0, '', val)">{{ $t('common.close') }}</span>
|
|
|
- </div>
|
|
|
+ <div class="cursor-pointer actions" @click="handleEdit(val)">{{ $t('common.edit') }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- returnUrl="/recruit/enterprise/position?hire=1" -->
|
|
|
- <confirmPaymentDialog
|
|
|
- v-if="showConfirmPaymentDialog"
|
|
|
- :cost="cost"
|
|
|
- :spuId="spuId"
|
|
|
- :spuName="spuName"
|
|
|
- :orderType="2"
|
|
|
- @paySuccess="paySuccess"
|
|
|
- @close="showConfirmPaymentDialog = false"
|
|
|
- ></confirmPaymentDialog>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { commissionCalculation } from '@/utils/position'
|
|
|
defineOptions({ name: 'enterprise-position-item'})
|
|
|
import { ref, watch } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
@@ -89,7 +62,6 @@ import { timesTampChange } from '@/utils/date'
|
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
|
import { closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised } from '@/api/position'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
-import confirmPaymentDialog from '@/components/pay/confirmPaymentDialog.vue'
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
const emit = defineEmits(['refresh'])
|
|
@@ -101,25 +73,6 @@ const props = defineProps({
|
|
|
items: Array
|
|
|
})
|
|
|
|
|
|
-const showConfirmPaymentDialog = ref(false)
|
|
|
-const cost = ref(0)
|
|
|
-const spuId = ref('')
|
|
|
-const spuName = ref('')
|
|
|
-const toPay = (val) => {
|
|
|
- spuId.value = val.id || ''
|
|
|
- spuName.value = val.name || ''
|
|
|
- cost.value = val.hirePrice
|
|
|
- // 打开支付弹窗
|
|
|
- showConfirmPaymentDialog.value = true
|
|
|
-}
|
|
|
-// 支付成功
|
|
|
-const paySuccess = async () => {
|
|
|
- showConfirmPaymentDialog.value = false
|
|
|
- setTimeout(() => {
|
|
|
- emit('refresh')
|
|
|
- }, 1000)
|
|
|
-}
|
|
|
-
|
|
|
const selectAll = ref(false) // 全选
|
|
|
const selectList = ref([]) // 选中列表
|
|
|
const dealSelect = () => {
|
|
@@ -184,11 +137,6 @@ const router = useRouter()
|
|
|
const handleEdit = (val) => {
|
|
|
router.push(`/recruit/enterprise/position/edit?id=${val.id}`)
|
|
|
}
|
|
|
-
|
|
|
-// 职位详情
|
|
|
-// const handleDetails = (val) => {
|
|
|
-// window.open(`/recruit/enterprise/position/details/${val.id}`)
|
|
|
-// }
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
@@ -199,10 +147,6 @@ const handleEdit = (val) => {
|
|
|
.position-name {
|
|
|
color: var(--color-333);
|
|
|
font-size: 19px;
|
|
|
- cursor: pointer;
|
|
|
- &:hover {
|
|
|
- color: var(--v-primary-base);
|
|
|
- }
|
|
|
}
|
|
|
.position {
|
|
|
max-width: 46%;
|