|
@@ -12,6 +12,7 @@
|
|
|
<rich-text v-if="item.name?.indexOf('style') !== -1" class="job-name" :nodes="item.name"></rich-text>
|
|
|
<view v-else class="job-name">{{ formatName(item.name) }}</view>
|
|
|
</view>
|
|
|
+ <image v-if="item.top && tab === 1" src="/static/svg/topUp.svg" class="TopUpSvg ss-m-r-10" @tap.stop="topUpSvgClick(item)"></image>
|
|
|
</view>
|
|
|
<!-- 职位类型 -->
|
|
|
<view class="font-size-13 ellipsis ss-m-5" style="color: #808080;">
|
|
@@ -36,8 +37,8 @@
|
|
|
<view class="ss-m-t-10">到期时间:{{ item.expireTime ? timesTampChange(item.expireTime, 'Y-M-D') : '长期有效' }}</view>
|
|
|
</view>
|
|
|
<view class="sub-li-bottom ss-m-t-20">
|
|
|
- <view v-if=" tab !== 0" class="sub-li-bottom-item color-primary" @tap.stop="handleToResume(item)">{{ item.count || 0 }} 已投递简历</view>
|
|
|
- <view v-if=" tab === 0 && (item?.status-0) === 99" class="sub-li-bottom-item color-primary" @tap.stop="toPay(item)">发布</view>
|
|
|
+ <view v-if="tab === 0" class="sub-li-bottom-item color-primary" style="width: 100%;" @tap.stop="toPay(item)">发布</view>
|
|
|
+ <view v-if="tab !== 0" class="sub-li-bottom-item color-primary" style="width: 45%;" @tap.stop="handleToResume(item)">{{ item.count || 0 }} 已投递简历</view>
|
|
|
<view v-if="tab === 1" class="sub-li-bottom-item color-warning" @tap.stop="handleAction(item.top ? 4 : 3, '', item)">{{ item.top ? '取消置顶' : '置顶' }}</view>
|
|
|
<view v-if="tab === 1" class="sub-li-bottom-item color-666" @tap.stop="handleAction(0, '', item, item)">关闭</view>
|
|
|
<view v-if="tab === 2" class="sub-li-bottom-item color-warning" @tap.stop="handleAction(1, '', item, item)">激活</view>
|
|
@@ -108,6 +109,7 @@ const toPay = async (val) => {
|
|
|
// setTimeout(() => { toPay(props.list[0]) }, 2000)
|
|
|
|
|
|
const confirm = ref()
|
|
|
+const confirmType = ref('closeJob') // 确认框类型
|
|
|
const dialogContent = ref('')
|
|
|
let handleActionInfo = {}
|
|
|
const apiList = [closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, topJobAdvertisedCancel]
|
|
@@ -124,6 +126,7 @@ const handleAction = async (index, type, { id }, item) => {
|
|
|
if (index === 0) {
|
|
|
const text = userInfo.value?.entitlement?.publishJobCount && userInfo.value?.entitlement?.publishJobCount > 0 ? '将消耗一个发布点数' : '将重新收取费用'
|
|
|
const positionName = item?.name ? '【' + formatName(item?.name) + '】' : '所选'
|
|
|
+ confirmType.value = 'closeJob' // 确认框类型
|
|
|
dialogContent.value = `是否确认关闭${positionName}职位?关闭后再激活,${text}!`
|
|
|
confirm.value.open()
|
|
|
return
|
|
@@ -151,7 +154,23 @@ const handleClose = () => {
|
|
|
confirm.value.close()
|
|
|
}
|
|
|
|
|
|
-const handleConfirm = async () => {
|
|
|
+// 取消置顶
|
|
|
+const topUpSvgClickVal = ref({})
|
|
|
+const topUpSvgClick = (item) => {
|
|
|
+ topUpSvgClickVal.value = item
|
|
|
+ confirmType.value = 'topUpJob' // 确认框类型
|
|
|
+ const positionName = item?.name ? '【' + formatName(item?.name) + '】职位' : '职位'
|
|
|
+ dialogContent.value = `是否取消置顶${positionName}?`
|
|
|
+ confirm.value.open()
|
|
|
+}
|
|
|
+
|
|
|
+const handleConfirm = () => {
|
|
|
+ if (confirmType.value === 'closeJob') closeJob()
|
|
|
+ if (confirmType.value === 'topUpJob') handleAction(4, '', topUpSvgClickVal.value)
|
|
|
+}
|
|
|
+
|
|
|
+// 关闭职位
|
|
|
+const closeJob = async () => {
|
|
|
try {
|
|
|
uni.showLoading({ title: '关闭中...', mask: true })
|
|
|
await apiList[handleActionInfo?.index](handleActionInfo?.ids)
|
|
@@ -323,7 +342,7 @@ const paySuccess = () => {
|
|
|
font-size: 13px;
|
|
|
color: #666;
|
|
|
&-item {
|
|
|
- width: 50%;
|
|
|
+ width: 25%;
|
|
|
height: 35px;
|
|
|
line-height: 35px;
|
|
|
text-align: center;
|
|
@@ -335,4 +354,7 @@ const paySuccess = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.TopUpSvg {
|
|
|
+ width: 25px; height: 25px; color: #FB8C00;
|
|
|
+}
|
|
|
</style>
|