仓库初始化+岗位相关页面
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
:show-close="true"
|
||||
width="4.8rem"
|
||||
class="dislike-dialog"
|
||||
:close-on-click-modal="true"
|
||||
>
|
||||
<!-- 弹窗标题 -->
|
||||
<div class="dislike-dialog__title">为了给您推荐更适合岗位,请告诉我们不匹配的原因:</div>
|
||||
|
||||
<!-- 原因选项列表 — 单选 -->
|
||||
<div class="dislike-dialog__options">
|
||||
<label
|
||||
v-for="option in dislikeOptions"
|
||||
:key="option.value"
|
||||
class="dislike-dialog__option"
|
||||
:class="{ 'dislike-dialog__option--active': dislikeReason === option.value }"
|
||||
>
|
||||
<el-radio v-model="dislikeReason" :value="option.value">{{ option.label }}</el-radio>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- 补充描述输入框 -->
|
||||
<el-input
|
||||
v-model="dislikeDetail"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="请描述您的原因"
|
||||
class="dislike-dialog__textarea"
|
||||
/>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<div class="dislike-dialog__footer">
|
||||
<button class="dislike-dialog__btn dislike-dialog__btn--cancel" @click="visible = false">取消</button>
|
||||
<button class="dislike-dialog__btn dislike-dialog__btn--submit" @click="handleDislikeSubmit">提交</button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
jobId: string | null
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: boolean): void
|
||||
}>()
|
||||
|
||||
const visible = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val: boolean) => emit('update:modelValue', val),
|
||||
})
|
||||
|
||||
/** 不感兴趣的原因(单选) */
|
||||
const dislikeReason = ref('')
|
||||
|
||||
/** 不感兴趣的补充描述 */
|
||||
const dislikeDetail = ref('')
|
||||
|
||||
/** 不感兴趣原因选项列表 */
|
||||
const dislikeOptions = [
|
||||
{ value: 'company', label: '对这家公司不感兴趣' },
|
||||
{ value: 'position', label: '对这个岗位不感兴趣' },
|
||||
{ value: 'location', label: '工作地点不合适' },
|
||||
{ value: 'other', label: '其他原因' },
|
||||
]
|
||||
|
||||
/** 提交不感兴趣反馈 */
|
||||
function handleDislikeSubmit() {
|
||||
if (!dislikeReason.value) {
|
||||
ElMessage.warning('请选择一个原因')
|
||||
return
|
||||
}
|
||||
// TODO: 调用接口提交反馈,参数:props.jobId, dislikeReason.value, dislikeDetail.value
|
||||
console.log('提交不感兴趣反馈', {
|
||||
jobId: props.jobId,
|
||||
reason: dislikeReason.value,
|
||||
detail: dislikeDetail.value,
|
||||
})
|
||||
ElMessage.success('反馈已提交,感谢您的反馈')
|
||||
visible.value = false
|
||||
}
|
||||
|
||||
/** 弹窗打开时重置表单 */
|
||||
function resetForm() {
|
||||
dislikeReason.value = ''
|
||||
dislikeDetail.value = ''
|
||||
}
|
||||
|
||||
defineExpose({ resetForm })
|
||||
</script>
|
||||
Reference in New Issue
Block a user