6 Commits

Author SHA1 Message Date
冯辉
23a286cb64 Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service 2026-03-16 14:14:52 +08:00
冯辉
c43c0592c6 键盘遮挡输入框问题 2026-03-16 14:14:51 +08:00
cb83a3269e Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service 2026-03-16 10:53:27 +08:00
f2f802b73a 招聘会样式修改 2026-03-16 10:52:52 +08:00
冯辉
4078f2e543 增加地区选项添加 2026-03-13 11:45:01 +08:00
冯辉
94439fddaa 11 2026-03-12 23:23:18 +08:00
4 changed files with 197 additions and 147 deletions

View File

@@ -1,15 +1,6 @@
<template> <template>
<view v-if="show" class="filter-container"> <view v-if="show" class="filter-container">
<!-- 头部 --> <!-- 左侧标签页 -->
<!-- <view class="filter-header">
<text class="back-btn" @click="handleClose">
<uni-icons type="left" size="24"></uni-icons>
</text>
<text class="filter-title">喀什智慧就业平台</text>
<view class="back-btn"></view>
</view> -->
<!-- 标签页 -->
<view class="filter-tabs"> <view class="filter-tabs">
<view <view
v-for="(tab, index) in tabs" v-for="(tab, index) in tabs"
@@ -22,6 +13,8 @@
</view> </view>
</view> </view>
<!-- 右侧内容区域 -->
<view class="filter-right">
<!-- 内容区域 --> <!-- 内容区域 -->
<view class="filter-content"> <view class="filter-content">
<!-- 学历要求 --> <!-- 学历要求 -->
@@ -78,6 +71,24 @@
</radio-group> </radio-group>
</view> </view>
<!-- 地区 -->
<view v-if="activeTab === 'area'" class="content-section">
<radio-group @change="(e) => handleSelect('area', e)">
<label
v-for="option in areaOptions"
:key="option.value"
class="radio-item"
:class="{ checked: selectedValues['area'] === String(option.value) }"
>
<radio
:value="String(option.value)"
:checked="selectedValues['area'] === String(option.value)"
/>
<text class="option-label">{{ option.label }}</text>
</label>
</radio-group>
</view>
<!-- 岗位类型 --> <!-- 岗位类型 -->
<view v-if="activeTab === 'jobType'" class="content-section"> <view v-if="activeTab === 'jobType'" class="content-section">
<radio-group @change="(e) => handleSelect('jobType', e)"> <radio-group @change="(e) => handleSelect('jobType', e)">
@@ -103,12 +114,14 @@
<button class="footer-btn confirm-btn" @click="handleConfirm">确认</button> <button class="footer-btn confirm-btn" @click="handleConfirm">确认</button>
</view> </view>
</view> </view>
</view>
</template> </template>
<script setup> <script setup>
import { ref, reactive, onBeforeMount } from 'vue'; import { ref, reactive, onBeforeMount } from 'vue';
import useDictStore from '@/stores/useDictStore'; import useDictStore from '@/stores/useDictStore';
const { getTransformChildren } = useDictStore(); const dictStore = useDictStore();
const { getTransformChildren } = dictStore;
const props = defineProps({ const props = defineProps({
show: Boolean, show: Boolean,
@@ -131,7 +144,8 @@ const tabs = [
{ key: 'education', label: '学历要求' }, { key: 'education', label: '学历要求' },
{ key: 'experience', label: '工作经验' }, { key: 'experience', label: '工作经验' },
{ key: 'scale', label: '公司规模' }, { key: 'scale', label: '公司规模' },
{ key: 'jobType', label: '岗位类型' } { key: 'jobType', label: '岗位类型' },
{ key: 'area', label: '地区' }
]; ];
// 当前激活的标签 // 当前激活的标签
@@ -142,6 +156,7 @@ const selectedValues = reactive({
education: '', education: '',
experience: '', experience: '',
scale: '', scale: '',
area: '',
jobType: '' jobType: ''
}); });
@@ -149,14 +164,28 @@ const selectedValues = reactive({
const educationOptions = ref([]); const educationOptions = ref([]);
const experienceOptions = ref([]); const experienceOptions = ref([]);
const scaleOptions = ref([]); const scaleOptions = ref([]);
const areaOptions = ref([]);
const jobTypeOptions = ref([]); const jobTypeOptions = ref([]);
// 加载状态
const loading = ref(true);
// 初始化获取数据 // 初始化获取数据
onBeforeMount(() => { onBeforeMount(async () => {
try {
// 先获取字典数据
await dictStore.getDictData();
// 再初始化选项数据
educationOptions.value = getTransformChildren('education', '学历要求').options || []; educationOptions.value = getTransformChildren('education', '学历要求').options || [];
experienceOptions.value = getTransformChildren('experience', '工作经验').options || []; experienceOptions.value = getTransformChildren('experience', '工作经验').options || [];
scaleOptions.value = getTransformChildren('scale', '公司规模').options || []; scaleOptions.value = getTransformChildren('scale', '公司规模').options || [];
areaOptions.value = getTransformChildren('area', '地区').options || [];
jobTypeOptions.value = getJobTypeData(); jobTypeOptions.value = getJobTypeData();
} catch (error) {
console.error('获取字典数据失败:', error);
} finally {
loading.value = false;
}
}); });
// 处理选项选择 // 处理选项选择
@@ -195,7 +224,7 @@ const handleClose = () => {
background-color: #fff; background-color: #fff;
z-index: 9999; z-index: 9999;
display: flex; display: flex;
flex-direction: column; flex-direction: row;
} }
.filter-header { .filter-header {
@@ -231,17 +260,17 @@ const handleClose = () => {
} }
.filter-tabs { .filter-tabs {
width: 200rpx;
border-right: 1rpx solid #eee;
background-color: #f8f8f8;
display: flex; display: flex;
border-bottom: 1rpx solid #eee; flex-direction: column;
background-color: #fff;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
.tab-item { .tab-item {
flex: 1; height: 100rpx;
height: 90rpx; line-height: 100rpx;
line-height: 90rpx;
text-align: center; text-align: center;
font-size: 30rpx; font-size: 28rpx;
color: #666; color: #666;
position: relative; position: relative;
transition: all 0.3s ease; transition: all 0.3s ease;
@@ -249,14 +278,15 @@ const handleClose = () => {
&.active { &.active {
color: #256BFA; color: #256BFA;
font-weight: 600; font-weight: 600;
background-color: #fff;
&::after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
bottom: 0; left: 0;
left: 25%; top: 25%;
width: 50%; width: 4rpx;
height: 4rpx; height: 50%;
background-color: #256BFA; background-color: #256BFA;
border-radius: 2rpx; border-radius: 2rpx;
} }
@@ -268,6 +298,13 @@ const handleClose = () => {
} }
} }
.filter-right {
flex: 1;
display: flex;
flex-direction: column;
position: relative;
}
.filter-content { .filter-content {
flex: 1; flex: 1;
padding: 40rpx 32rpx; padding: 40rpx 32rpx;

View File

@@ -198,7 +198,7 @@
class="input" class="input"
@confirm="sendMessage" @confirm="sendMessage"
:disabled="isTyping" :disabled="isTyping"
:adjust-position="false" :adjust-position="true"
placeholder="请输入您的职位名称、薪资要求、岗位地址" placeholder="请输入您的职位名称、薪资要求、岗位地址"
v-show="!isVoice" v-show="!isVoice"
/> />

View File

@@ -87,12 +87,13 @@
<view class="cards" v-if="fairList.length"> <view class="cards" v-if="fairList.length">
<view class="card press-button" v-for="(item, index) in fairList" :key="index" <view class="card press-button" v-for="(item, index) in fairList" :key="index"
@click="goDetail(item.jobFairId)"> @click="goDetail(item.jobFairId)">
<view class="card-title">
{{ item.jobFairTitle }}
<view class="center-date" <view class="center-date"
:style="{ color: getTimeStatus(item.jobFairStartTime, item.jobFairEndTime).color,borderColor: getTimeStatus(item.jobFairStartTime, item.jobFairEndTime).color }"> :style="{ color: getTimeStatus(item.jobFairStartTime, item.jobFairEndTime).color,borderColor: getTimeStatus(item.jobFairStartTime, item.jobFairEndTime).color }">
{{ getTimeStatus(item.jobFairStartTime, item.jobFairEndTime).statusText }} {{ getTimeStatus(item.jobFairStartTime, item.jobFairEndTime).statusText }}
</view> </view>
<view class="card-title">
{{ item.jobFairTitle }}
</view> </view>
<view class="card-row"> <view class="card-row">
<text class="">{{ item.jobFairAddress }}</text> <text class="">{{ item.jobFairAddress }}</text>
@@ -514,7 +515,6 @@
} else { } else {
$api.msg('请先登录'); $api.msg('请先登录');
} }
} }
function getFair(type = "add") { function getFair(type = "add") {
@@ -1012,10 +1012,21 @@
.cards .card { .cards .card {
margin-top: 28rpx; margin-top: 28rpx;
padding: 32rpx; padding: 45rpx 32rpx 32rpx 32rpx;
background: linear-gradient(to bottom, #e3efff 0%, #fbfdff 100%); background: linear-gradient(to bottom, #e3efff 0%, #fbfdff 100%);
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.04); box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.04);
border-radius: 20rpx; border-radius: 20rpx;
position: relative;
.center-date {
font-weight: 400;
font-size: 24rpx;
position: absolute;
right: 0;
top: 0;
border: 1rpx solid;
padding: 5rpx 10rpx;
margin-left: 10rpx;
}
} }
.cards .card-title { .cards .card-title {
@@ -1041,16 +1052,7 @@
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.center-date {
font-weight: 400;
font-size: 24rpx;
// position: absolute;
// right: 0;
// top: 0;
border: 1rpx solid;
padding: 5rpx 10rpx;
margin-left: 10rpx;
}
} }
.cards .card-row { .cards .card-row {

View File

@@ -74,6 +74,17 @@ const useDictStore = defineStore("dict", () => {
getIndustryDict() // 获取行业 getIndustryDict() // 获取行业
} catch (error) { } catch (error) {
console.error('Error fetching dictionary data:', error); console.error('Error fetching dictionary data:', error);
// 确保即使出错也能返回空数组
if (!dictType && !dictName) {
state.education = [];
state.experience = [];
state.area = [];
state.scale = [];
state.sex = [];
state.affiliation = [];
state.nature = [];
state.noticeType = [];
}
} }
}; };
@@ -129,7 +140,7 @@ const useDictStore = defineStore("dict", () => {
return { return {
label: title, label: title,
key: key || dictType, key: key || dictType,
options: state[dictType], options: state[dictType] || [],
} }
} }
return null return null