岗位类型改为岗位标签,字段改为传文字。

This commit is contained in:
francis_fh
2026-01-05 16:38:20 +08:00
parent 2b9663db53
commit 934f082de4
2 changed files with 8 additions and 7 deletions

View File

@@ -195,9 +195,8 @@ defineExpose({
<style lang="scss" scoped> <style lang="scss" scoped>
.popup-content { .popup-content {
color: #000000; color: #000000;
height: 100vh; height: 84vh;
position: relative; position: relative;
bottom:80rpx;
} }
.popup-bottom { .popup-bottom {
padding: 40rpx 28rpx 20rpx 28rpx; padding: 40rpx 28rpx 20rpx 28rpx;

View File

@@ -135,13 +135,13 @@
<!-- 新增岗位类型 --> <!-- 新增岗位类型 -->
<view class="form-group"> <view class="form-group">
<view class="label">岗位类型</view> <view class="label">岗位标签</view>
<view <view
class="picker" class="picker"
@click="openJobTypeSelector" @click="openJobTypeSelector"
> >
<view class="picker-text" :class="{ 'placeholder': !selectedJobTypeLabel }"> <view class="picker-text" :class="{ 'placeholder': !selectedJobTypeLabel }">
{{ selectedJobTypeLabel || '请选择岗位类型' }} {{ selectedJobTypeLabel || '请选择岗位标签' }}
</view> </view>
</view> </view>
</view> </view>
@@ -522,8 +522,8 @@ const openJobTypeSelector = () => {
// 保存选中的岗位类型 // 保存选中的岗位类型
selectedJobTypeIds.value = ids; selectedJobTypeIds.value = ids;
selectedJobTypeLabel.value = labels; selectedJobTypeLabel.value = labels;
// 将岗位类型ID保存到formData.jobCategory字段 // 将岗位类型文字保存到formData.jobCategory字段
formData.jobCategory = ids; formData.jobCategory = labels;
console.log('选择的岗位类型ID:', ids, '标签:', labels); console.log('选择的岗位类型ID:', ids, '标签:', labels);
}, },
cancel: () => { cancel: () => {
@@ -770,7 +770,9 @@ const validateForm = () => {
]; ];
for (const { field, message } of requiredFields) { for (const { field, message } of requiredFields) {
if (!formData[field] || formData[field].toString().trim() === '') { const value = formData[field];
// 特殊处理0 应该被视为有效值
if (value === undefined || value === null || value === '' || value.toString().trim() === '') {
uni.showToast({ uni.showToast({
title: message, title: message,
icon: 'none' icon: 'none'