|
@@ -5,17 +5,21 @@
|
|
|
<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>
|
|
|
+ <v-btn class="mr-3" :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(4, 'top', {})">取消置顶</v-btn>
|
|
|
<v-btn :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(0, 'close', {})">{{ $t('common.close') }}</v-btn>
|
|
|
</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: 134px;">
|
|
|
+ <div v-if="val.top && tab === 1" style="position: absolute;">
|
|
|
+ <svg-icon name="top" size="50"></svg-icon>
|
|
|
+ </div>
|
|
|
<div class="d-flex justify-space-between" style="padding: 10px 20px;">
|
|
|
<div class="position">
|
|
|
- <div class="item-select" v-if="tab !== 3">
|
|
|
+ <div class="item-select ml-5" v-if="tab !== 3">
|
|
|
<v-checkbox v-model="val.select" hide-details color="primary" @update:model-value="handleChangeSelect"></v-checkbox>
|
|
|
</div>
|
|
|
- <div class="d-flex align-center" :class="{'cursor-pointer': tab === 1, 'ml-10': tab !== 3}" @click="handleEdit(val)">
|
|
|
+ <div class="d-flex align-center" :class="{'cursor-pointer': tab === 1, 'ml-15': tab !== 3}" @click="handleEdit(val)">
|
|
|
<span v-if="val.name.indexOf('style')" v-html="val.name" class="position-name"></span>
|
|
|
<span v-else class="position-name">{{ val.name }}</span>
|
|
|
</div>
|
|
@@ -52,7 +56,7 @@
|
|
|
<div class="d-flex">
|
|
|
<div class="ml-10 d-flex">
|
|
|
<div v-if="tab === 1">
|
|
|
- <span class="cursor-pointer actions" @click="handleAction(3, '', val)">{{ $t('common.topping') }}</span>
|
|
|
+ <span class="cursor-pointer actions" @click="handleAction(val.top ? 4 : 3, '', val)">{{ val.top ? '取消置顶' : $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>
|
|
@@ -78,7 +82,7 @@ import { ref, watch } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import { timesTampChange } from '@/utils/date'
|
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
|
-import { closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, updatePositionExpireTime } from '@/api/position'
|
|
|
+import { closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, updatePositionExpireTime, topJobAdvertisedCancel } from '@/api/position'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
|
|
|
const { t } = useI18n()
|
|
@@ -152,7 +156,7 @@ watch(
|
|
|
{ deep: true }
|
|
|
)
|
|
|
|
|
|
-const apiList = [ closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised ]
|
|
|
+const apiList = [closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, topJobAdvertisedCancel]
|
|
|
|
|
|
// 职位关闭、激活、刷新、置顶
|
|
|
const handleAction = async (index, type, { id }) => {
|
|
@@ -178,8 +182,6 @@ const handleUpdateExpireTime = (item) => {
|
|
|
showExpire.value = true
|
|
|
}
|
|
|
const handleSubmit = async () => {
|
|
|
- // const { valid } = await CtFormRef.value.formRef.validate()
|
|
|
- // if (!valid) return
|
|
|
const time = formItem.value.options.find(e => e.key === 'time').value
|
|
|
if (!time) return Snackbar.warning('请选择职位到期时间')
|
|
|
await updatePositionExpireTime({ id: expireTimeId.value, time })
|