Compare commits
15 Commits
89204ca621
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4078f2e543 | ||
|
|
94439fddaa | ||
|
|
06a92f2e97 | ||
| c7af2194cc | |||
| bc16633f75 | |||
|
|
b8558dfb41 | ||
|
|
cac0a3470a | ||
|
|
ce63c8ef8e | ||
| 4eab4ff408 | |||
| 5374b12797 | |||
| cefa9b7614 | |||
| a676deedc1 | |||
|
|
acfee86a50 | ||
| d78779741a | |||
| b605b43acb |
424
components/new-filter-page/new-filter-page.vue
Normal file
424
components/new-filter-page/new-filter-page.vue
Normal file
@@ -0,0 +1,424 @@
|
|||||||
|
<template>
|
||||||
|
<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
|
||||||
|
v-for="(tab, index) in tabs"
|
||||||
|
:key="index"
|
||||||
|
class="tab-item"
|
||||||
|
:class="{ active: activeTab === tab.key }"
|
||||||
|
@click="activeTab = tab.key"
|
||||||
|
>
|
||||||
|
{{ tab.label }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 内容区域 -->
|
||||||
|
<view class="filter-content">
|
||||||
|
<!-- 学历要求 -->
|
||||||
|
<view v-if="activeTab === 'education'" class="content-section">
|
||||||
|
<radio-group @change="(e) => handleSelect('education', e)">
|
||||||
|
<label
|
||||||
|
v-for="option in educationOptions"
|
||||||
|
:key="option.value"
|
||||||
|
class="radio-item"
|
||||||
|
:class="{ checked: selectedValues['education'] === String(option.value) }"
|
||||||
|
>
|
||||||
|
<radio
|
||||||
|
:value="String(option.value)"
|
||||||
|
:checked="selectedValues['education'] === String(option.value)"
|
||||||
|
/>
|
||||||
|
<text class="option-label">{{ option.label }}</text>
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 工作经验 -->
|
||||||
|
<view v-if="activeTab === 'experience'" class="content-section">
|
||||||
|
<radio-group @change="(e) => handleSelect('experience', e)">
|
||||||
|
<label
|
||||||
|
v-for="option in experienceOptions"
|
||||||
|
:key="option.value"
|
||||||
|
class="radio-item"
|
||||||
|
:class="{ checked: selectedValues['experience'] === String(option.value) }"
|
||||||
|
>
|
||||||
|
<radio
|
||||||
|
:value="String(option.value)"
|
||||||
|
:checked="selectedValues['experience'] === String(option.value)"
|
||||||
|
/>
|
||||||
|
<text class="option-label">{{ option.label }}</text>
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 公司规模 -->
|
||||||
|
<view v-if="activeTab === 'scale'" class="content-section">
|
||||||
|
<radio-group @change="(e) => handleSelect('scale', e)">
|
||||||
|
<label
|
||||||
|
v-for="option in scaleOptions"
|
||||||
|
:key="option.value"
|
||||||
|
class="radio-item"
|
||||||
|
:class="{ checked: selectedValues['scale'] === String(option.value) }"
|
||||||
|
>
|
||||||
|
<radio
|
||||||
|
:value="String(option.value)"
|
||||||
|
:checked="selectedValues['scale'] === String(option.value)"
|
||||||
|
/>
|
||||||
|
<text class="option-label">{{ option.label }}</text>
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
|
</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">
|
||||||
|
<radio-group @change="(e) => handleSelect('jobType', e)">
|
||||||
|
<label
|
||||||
|
v-for="option in jobTypeOptions"
|
||||||
|
:key="option.value"
|
||||||
|
class="radio-item"
|
||||||
|
:class="{ checked: selectedValues['jobType'] === String(option.value) }"
|
||||||
|
>
|
||||||
|
<radio
|
||||||
|
:value="String(option.value)"
|
||||||
|
:checked="selectedValues['jobType'] === String(option.value)"
|
||||||
|
/>
|
||||||
|
<text class="option-label">{{ option.label }}</text>
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 底部按钮 -->
|
||||||
|
<view class="filter-footer">
|
||||||
|
<button class="footer-btn clear-btn" @click="handleClear">清除</button>
|
||||||
|
<button class="footer-btn confirm-btn" @click="handleConfirm">确认</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, onBeforeMount } from 'vue';
|
||||||
|
import useDictStore from '@/stores/useDictStore';
|
||||||
|
const dictStore = useDictStore();
|
||||||
|
const { getTransformChildren } = dictStore;
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
show: Boolean,
|
||||||
|
});
|
||||||
|
|
||||||
|
const emit = defineEmits(['confirm', 'close', 'update:show']);
|
||||||
|
|
||||||
|
// 岗位类型数据
|
||||||
|
const getJobTypeData = () => {
|
||||||
|
return [
|
||||||
|
{ label: '常规岗位', value: 0, text: '常规岗位' },
|
||||||
|
{ label: '就业见习岗位', value: 1, text: '就业见习岗位' },
|
||||||
|
{ label: '实习实训岗位', value: 2, text: '实习实训岗位' },
|
||||||
|
{ label: '社区实践岗位', value: 3, text: '社区实践岗位' }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
// 标签页数据
|
||||||
|
const tabs = [
|
||||||
|
{ key: 'education', label: '学历要求' },
|
||||||
|
{ key: 'experience', label: '工作经验' },
|
||||||
|
{ key: 'scale', label: '公司规模' },
|
||||||
|
{ key: 'jobType', label: '岗位类型' },
|
||||||
|
{ key: 'area', label: '地区' }
|
||||||
|
];
|
||||||
|
|
||||||
|
// 当前激活的标签
|
||||||
|
const activeTab = ref('education');
|
||||||
|
|
||||||
|
// 存储已选中的值
|
||||||
|
const selectedValues = reactive({
|
||||||
|
education: '',
|
||||||
|
experience: '',
|
||||||
|
scale: '',
|
||||||
|
area: '',
|
||||||
|
jobType: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
// 从字典获取的选项数据
|
||||||
|
const educationOptions = ref([]);
|
||||||
|
const experienceOptions = ref([]);
|
||||||
|
const scaleOptions = ref([]);
|
||||||
|
const areaOptions = ref([]);
|
||||||
|
const jobTypeOptions = ref([]);
|
||||||
|
|
||||||
|
// 加载状态
|
||||||
|
const loading = ref(true);
|
||||||
|
|
||||||
|
// 初始化获取数据
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
try {
|
||||||
|
// 先获取字典数据
|
||||||
|
await dictStore.getDictData();
|
||||||
|
// 再初始化选项数据
|
||||||
|
educationOptions.value = getTransformChildren('education', '学历要求').options || [];
|
||||||
|
experienceOptions.value = getTransformChildren('experience', '工作经验').options || [];
|
||||||
|
scaleOptions.value = getTransformChildren('scale', '公司规模').options || [];
|
||||||
|
areaOptions.value = getTransformChildren('area', '地区').options || [];
|
||||||
|
jobTypeOptions.value = getJobTypeData();
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取字典数据失败:', error);
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 处理选项选择
|
||||||
|
const handleSelect = (key, e) => {
|
||||||
|
selectedValues[key] = e.detail.value;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 清除所有选择
|
||||||
|
const handleClear = () => {
|
||||||
|
Object.keys(selectedValues).forEach((key) => {
|
||||||
|
selectedValues[key] = '';
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 确认筛选
|
||||||
|
const handleConfirm = () => {
|
||||||
|
console.log('selectedValues:', selectedValues);
|
||||||
|
emit('confirm', selectedValues);
|
||||||
|
handleClose();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 关闭弹窗
|
||||||
|
const handleClose = () => {
|
||||||
|
emit('update:show', false);
|
||||||
|
emit('close');
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.filter-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: #fff;
|
||||||
|
z-index: 9999;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-header {
|
||||||
|
height: 96rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 32rpx;
|
||||||
|
border-bottom: 1rpx solid #eee;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
|
.back-btn {
|
||||||
|
font-size: 36rpx;
|
||||||
|
width: 48rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 10rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: rgba(37, 107, 250, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-title {
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-tabs {
|
||||||
|
display: flex;
|
||||||
|
border-bottom: 1rpx solid #eee;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
|
.tab-item {
|
||||||
|
flex: 1;
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #666;
|
||||||
|
position: relative;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
color: #256BFA;
|
||||||
|
font-weight: 600;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 25%;
|
||||||
|
width: 50%;
|
||||||
|
height: 4rpx;
|
||||||
|
background-color: #256BFA;
|
||||||
|
border-radius: 2rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: rgba(37, 107, 250, 0.05);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-content {
|
||||||
|
flex: 1;
|
||||||
|
padding: 40rpx 32rpx;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-section {
|
||||||
|
.radio-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: rgba(37, 107, 250, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
radio {
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
margin-right: 24rpx;
|
||||||
|
transform: scale(1);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
radio .wx-radio-input {
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 2rpx solid #ccc;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
radio .wx-radio-input.wx-radio-input-checked {
|
||||||
|
border-color: #256BFA !important;
|
||||||
|
background: #256BFA !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
radio .wx-radio-input::before {
|
||||||
|
width: 16rpx;
|
||||||
|
height: 16rpx;
|
||||||
|
line-height: 16rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12rpx;
|
||||||
|
color: #fff;
|
||||||
|
background: transparent;
|
||||||
|
transform: translate(-50%, -50%) scale(0);
|
||||||
|
-webkit-transform: translate(-50%, -50%) scale(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
radio .wx-radio-input.wx-radio-input-checked::before {
|
||||||
|
transform: translate(-50%, -50%) scale(1);
|
||||||
|
-webkit-transform: translate(-50%, -50%) scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-label {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333;
|
||||||
|
flex: 1;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-footer {
|
||||||
|
height: 160rpx;
|
||||||
|
display: flex;
|
||||||
|
border-top: 1rpx solid #eee;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||||
|
padding: 20rpx 32rpx 100rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
position: relative;
|
||||||
|
z-index: 10;
|
||||||
|
|
||||||
|
.footer-btn {
|
||||||
|
flex: 1;
|
||||||
|
margin: 0;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
font-weight: 500;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-right: 20rpx;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
color: #666;
|
||||||
|
border: 1rpx solid #e0e0e0;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
transform: scale(0.98);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
background-color: #256BFA;
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: #1a56d9;
|
||||||
|
transform: scale(0.98);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -13,6 +13,8 @@ export default {
|
|||||||
// LCBaseUrlInner:'http://10.110.145.145:10100',//招聘、培训、帮扶
|
// LCBaseUrlInner:'http://10.110.145.145:10100',//招聘、培训、帮扶
|
||||||
// imgBaseUrl:'http://10.110.145.145/images', //图片基础url
|
// imgBaseUrl:'http://10.110.145.145/images', //图片基础url
|
||||||
// trainVideoImgUrl:'http://10.110.145.145:9100/file/file/minio',
|
// trainVideoImgUrl:'http://10.110.145.145:9100/file/file/minio',
|
||||||
|
jobRecommendUrl:'http://222.80.110.161:11111/api', //岗位推荐的三方url
|
||||||
|
policyRecommendUrl:'http://222.80.110.161:11111/sdrc-api', //政策推荐的三方url
|
||||||
LCBaseUrl:'https://www.xjksly.cn/prod-api',//内网端口
|
LCBaseUrl:'https://www.xjksly.cn/prod-api',//内网端口
|
||||||
LCBaseUrlInner:'https://www.xjksly.cn/prod-psout-api',//招聘、培训、帮扶
|
LCBaseUrlInner:'https://www.xjksly.cn/prod-psout-api',//招聘、培训、帮扶
|
||||||
imgBaseUrl:'https://www.xjksly.cn/images', //图片基础url
|
imgBaseUrl:'https://www.xjksly.cn/images', //图片基础url
|
||||||
|
|||||||
@@ -32,25 +32,21 @@ export function useColumnCount(onChange = () => {}) {
|
|||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
let count = 2
|
let count = 2
|
||||||
|
// #ifdef H5
|
||||||
|
// H5端固定显示2列
|
||||||
|
count = 2
|
||||||
|
// #endif
|
||||||
|
// #ifndef H5
|
||||||
if (width >= 1000) {
|
if (width >= 1000) {
|
||||||
// #ifdef H5
|
|
||||||
count = 3 // H5端最多显示3列
|
|
||||||
// #endif
|
|
||||||
// #ifndef H5
|
|
||||||
count = 5
|
count = 5
|
||||||
// #endif
|
|
||||||
} else if (width >= 750) {
|
} else if (width >= 750) {
|
||||||
// #ifdef H5
|
|
||||||
count = 3 // H5端最多显示3列
|
|
||||||
// #endif
|
|
||||||
// #ifndef H5
|
|
||||||
count = 4
|
count = 4
|
||||||
// #endif
|
|
||||||
} else if (width >= 500) {
|
} else if (width >= 500) {
|
||||||
count = 3
|
count = 3
|
||||||
} else {
|
} else {
|
||||||
count = 2
|
count = 2
|
||||||
}
|
}
|
||||||
|
// #endif
|
||||||
|
|
||||||
if (count !== columnCount.value) {
|
if (count !== columnCount.value) {
|
||||||
columnCount.value = count
|
columnCount.value = count
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ const rangeOptions = ref([
|
|||||||
{ value: 0, text: '推荐' },
|
{ value: 0, text: '推荐' },
|
||||||
{ value: 1, text: '最热' },
|
{ value: 1, text: '最热' },
|
||||||
{ value: 2, text: '最新发布' },
|
{ value: 2, text: '最新发布' },
|
||||||
{ value: 3, text: '疆外' },
|
// { value: 3, text: '疆外' },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function choosePosition(index) {
|
function choosePosition(index) {
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ const rangeOptions = ref([
|
|||||||
{ value: 0, text: '推荐' },
|
{ value: 0, text: '推荐' },
|
||||||
{ value: 1, text: '最热' },
|
{ value: 1, text: '最热' },
|
||||||
{ value: 2, text: '最新发布' },
|
{ value: 2, text: '最新发布' },
|
||||||
{ value: 3, text: '疆外' },
|
// { value: 3, text: '疆外' },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function changeRangeShow() {
|
function changeRangeShow() {
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ const rangeOptions = ref([
|
|||||||
{ value: 0, text: '推荐' },
|
{ value: 0, text: '推荐' },
|
||||||
{ value: 1, text: '最热' },
|
{ value: 1, text: '最热' },
|
||||||
{ value: 2, text: '最新发布' },
|
{ value: 2, text: '最新发布' },
|
||||||
{ value: 3, text: '疆外' },
|
// { value: 3, text: '疆外' },
|
||||||
]);
|
]);
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getSubway();
|
getSubway();
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ const rangeOptions = ref([
|
|||||||
{ value: 0, text: '推荐' },
|
{ value: 0, text: '推荐' },
|
||||||
{ value: 1, text: '最热' },
|
{ value: 1, text: '最热' },
|
||||||
{ value: 2, text: '最新发布' },
|
{ value: 2, text: '最新发布' },
|
||||||
{ value: 3, text: '疆外' },
|
// { value: 3, text: '疆外' },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function choosePosition(index) {
|
function choosePosition(index) {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 公司信息 -->
|
<!-- 公司信息 -->
|
||||||
<view class="content-card">
|
<view class="content-card" v-if="jobInfo.companyId">
|
||||||
<view class="card-title">
|
<view class="card-title">
|
||||||
<text class="title">公司信息</text>
|
<text class="title">公司信息</text>
|
||||||
<text
|
<text
|
||||||
|
|||||||
@@ -78,7 +78,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<text class="label">所属区域:</text>
|
<text class="label">所属区域:</text>
|
||||||
<uni-data-select v-model="formData.filterSelectDeptIds" :localdata="executeDeptOptions" placeholder="请选择所属区域" @change="onExecuteDeptChange"></uni-data-select>
|
<uni-data-picker ref="picker" class="picker" placeholder="请选择所属区域" popup-title="请选择所属区域" :localdata="regions" v-model="formData.deptTags"
|
||||||
|
@change="onchange" >
|
||||||
|
</uni-data-picker>
|
||||||
|
<!-- <uni-data-select v-model="formData.filterSelectDeptIds" :localdata="executeDeptOptions" placeholder="请选择所属区域" @change="onExecuteDeptChange"></uni-data-select> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<text class="label">帮扶时间:</text>
|
<text class="label">帮扶时间:</text>
|
||||||
@@ -255,6 +258,9 @@ const getBackgroundStyle = (imageName) => ({
|
|||||||
backgroundPosition: 'center', // 居中
|
backgroundPosition: 'center', // 居中
|
||||||
backgroundRepeat: 'no-repeat'
|
backgroundRepeat: 'no-repeat'
|
||||||
});
|
});
|
||||||
|
// 所属区域选项(可根据实际替换为动态数据)
|
||||||
|
const regions = ref([])
|
||||||
|
const picker = ref(null)
|
||||||
function listNotParam(){
|
function listNotParam(){
|
||||||
let header={
|
let header={
|
||||||
'Authorization':uni.getStorageSync('Padmin-Token'),
|
'Authorization':uni.getStorageSync('Padmin-Token'),
|
||||||
@@ -263,14 +269,15 @@ function listNotParam(){
|
|||||||
let params={}
|
let params={}
|
||||||
$api.myRequest('/dispatch/dept/listNotParam',params,'get',9100,header).then((resData) => {
|
$api.myRequest('/dispatch/dept/listNotParam',params,'get',9100,header).then((resData) => {
|
||||||
if(resData && resData.code == 200){
|
if(resData && resData.code == 200){
|
||||||
resData.data.forEach(item=>{
|
loadLevelData(resData.data[0].parentId);
|
||||||
const obj = {
|
// resData.data.forEach(item=>{
|
||||||
value: item.deptId,
|
// const obj = {
|
||||||
text: item.deptName,
|
// value: item.deptId,
|
||||||
ancestors:item.ancestors
|
// text: item.deptName,
|
||||||
}
|
// ancestors:item.ancestors
|
||||||
executeDeptOptions.value.push(obj)
|
// }
|
||||||
})
|
// executeDeptOptions.value.push(obj)
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -348,7 +355,8 @@ function onExecuteDeptChange(e){
|
|||||||
formData.executeDeptId=e
|
formData.executeDeptId=e
|
||||||
}
|
}
|
||||||
function handleSearch(){
|
function handleSearch(){
|
||||||
formData.pageSize=1
|
formData.pageNum=1
|
||||||
|
console.log("formData",formData)
|
||||||
dataList.value=[]
|
dataList.value=[]
|
||||||
getDataList()
|
getDataList()
|
||||||
}
|
}
|
||||||
@@ -358,6 +366,7 @@ function getDataList(){
|
|||||||
'Content-Type': "application/x-www-form-urlencoded"
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
}
|
}
|
||||||
$api.myRequest('/dispatch/assist/records/pageRecords',formData,'get',9100,header).then((resData) => {
|
$api.myRequest('/dispatch/assist/records/pageRecords',formData,'get',9100,header).then((resData) => {
|
||||||
|
console.log("resData",resData)
|
||||||
resData.rows.forEach(item=>{
|
resData.rows.forEach(item=>{
|
||||||
item.task_type=getabelByValue(item.task_type,taskTypeOptions)
|
item.task_type=getabelByValue(item.task_type,taskTypeOptions)
|
||||||
})
|
})
|
||||||
@@ -387,7 +396,7 @@ function goFollow(item){
|
|||||||
navTo('/packageB/priority/recordFollow?name='+item.name+'&taskType='+item.task_type+'&taskId='+item.task_id+'&personId='+item.person_id+'&goalPersonId='+item.goal_person_id);
|
navTo('/packageB/priority/recordFollow?name='+item.name+'&taskType='+item.task_type+'&taskId='+item.task_id+'&personId='+item.person_id+'&goalPersonId='+item.goal_person_id);
|
||||||
}
|
}
|
||||||
function goRecommend(item){
|
function goRecommend(item){
|
||||||
navTo('/packageB/priority/smartRecommend');
|
navTo('/packageB/priority/smartRecommend?goalPersonId='+item.goal_person_id);
|
||||||
}
|
}
|
||||||
function goJobWill(item){
|
function goJobWill(item){
|
||||||
navTo('/packageB/priority/jobWill?id='+item.person_id+'&goalPersonId='+item.goal_person_id);
|
navTo('/packageB/priority/jobWill?id='+item.person_id+'&goalPersonId='+item.goal_person_id);
|
||||||
@@ -422,6 +431,86 @@ function scrollBottom(){
|
|||||||
formData.pageNum++
|
formData.pageNum++
|
||||||
getDataList()
|
getDataList()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// 加载某一级的数据(parentId 为空表示根)
|
||||||
|
async function loadLevelData(parentId,node) {
|
||||||
|
let header = {
|
||||||
|
'Authorization': uni.getStorageSync('Padmin-Token'),
|
||||||
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
|
};
|
||||||
|
let params = { parentId };
|
||||||
|
|
||||||
|
try {
|
||||||
|
const resData = await $api.myRequest('/dispatch/dept/list', params, 'get', 9100, header);
|
||||||
|
if(resData.data.length==0){
|
||||||
|
picker.value.hide()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const formatted = (resData.data || []).map(item => ({
|
||||||
|
text: item.deptName,
|
||||||
|
value: item.tags,
|
||||||
|
deptId: item.deptId,
|
||||||
|
children: []
|
||||||
|
}));
|
||||||
|
if(node){
|
||||||
|
injectChildren(parentId, formatted);
|
||||||
|
}else{
|
||||||
|
regions.value=formatted
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("加载部门数据失败:", error);
|
||||||
|
// uni.showToast({ title: '加载失败', icon: 'none' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 将子级数据注入到对应的父节点
|
||||||
|
function injectChildren(parentValue, childrenData) {
|
||||||
|
const findAndInject = (nodes) => {
|
||||||
|
for (let node of nodes) {
|
||||||
|
if (node.deptId === parentValue) {
|
||||||
|
// 如果 children 已存在且非空,避免重复加载
|
||||||
|
if (!node.children || node.children.length === 0) {
|
||||||
|
node.children = childrenData;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
if (findAndInject(node.children)) return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
findAndInject(regions.value);
|
||||||
|
// 强制更新
|
||||||
|
}
|
||||||
|
// 当用户选择时触发(注意:change 在每级选择后都会触发)
|
||||||
|
function onchange(e) {
|
||||||
|
const selectedValues = e.detail.value;
|
||||||
|
// formData.deptId=selectedValues.map(item => item.value).join(',');
|
||||||
|
if (selectedValues.length === 0) return;
|
||||||
|
// 获取最后一级选中的 value
|
||||||
|
const lastSelectedValue = selectedValues[selectedValues.length - 1];
|
||||||
|
// 查找该节点是否有 children,如果没有则尝试加载
|
||||||
|
const node = findNodeByValue(regions.value, lastSelectedValue);
|
||||||
|
if (node && (!node.children || node.children.length === 0)) {
|
||||||
|
// 检查接口是否还有下一级(可通过接口返回判断,或先尝试加载)
|
||||||
|
// 这里我们直接尝试加载下一级
|
||||||
|
loadLevelData(node.deptId , node);
|
||||||
|
picker.value.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 工具函数:根据 value 查找节点
|
||||||
|
function findNodeByValue(nodes, value) {
|
||||||
|
for (let node of nodes) {
|
||||||
|
if (node.value === value.value) {
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
const found = findNodeByValue(node.children, value);
|
||||||
|
if (found) return found;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
onShow(()=>{
|
onShow(()=>{
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,131 +1,225 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppLayout :title="title" :show-bg-image="false" >
|
<AppLayout :title="title" :show-bg-image="false" >
|
||||||
<view class="tab-list" >
|
<view class="tab-list" >
|
||||||
<view class="tab" :class="{active: activeType == 1}" >求职<br>需求
|
<view class="tab" :class="{active: activeType == 1}" @click="tabChange(1)">岗位推荐
|
||||||
</view>
|
</view>
|
||||||
<view class="tab" :class="{active: activeType == 2}" >创业<br>需求
|
<view class="tab" :class="{active: activeType == 2}" @click="tabChange(2)">政策推荐
|
||||||
</view>
|
</view>
|
||||||
<view class="tab" :class="{active: activeType == 3}" >培训<br>需求
|
<view class="tab" :class="{active: activeType == 3}" @click="tabChange(3)">培训推荐
|
||||||
</view>
|
|
||||||
<view class="tab" :class="{active: activeType == 4}" >其他<br>需求
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="main-list" :style="getBackgroundStyle('k.png')">
|
<view class="page-container" >
|
||||||
|
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom" lower-threshold="50">
|
||||||
|
<view class="main-list" :style="getBackgroundStyle('k.png')" v-if="activeType==1">
|
||||||
<view class="list-top">
|
<view class="list-top">
|
||||||
<view class="list-title">
|
<view class="list-title">
|
||||||
<text>帮扶记录详情</text>
|
<text>推荐岗位列表</text>
|
||||||
<view class="title-line"></view>
|
<view class="title-line" style="left: 70rpx;"></view>
|
||||||
|
</view>
|
||||||
|
<view class="title-total">
|
||||||
|
共<text class="total-num">{{totalNum}}</text>个
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-container">
|
<view class="list-box" v-if="dataList.length>0">
|
||||||
<view class="form-item">
|
<view class="con-box" v-for="(item,index) in dataList" :key="index">
|
||||||
|
<view class="form-item" >
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/person.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
人员姓名:
|
岗位名称:
|
||||||
</view>
|
</view>
|
||||||
<view class="item-value">
|
</view>
|
||||||
{{formData.name}}
|
<view class="item-right">
|
||||||
|
{{item.jobTitle}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/help.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
身份证号:
|
公司名称:
|
||||||
</view>
|
</view>
|
||||||
<view class="item-value">
|
</view>
|
||||||
{{formData.id_card}}
|
<view class="item-right">
|
||||||
|
{{item.companyName}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="form-item" >
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/base.png'" mode=""></image>
|
||||||
|
<view class="item-label">
|
||||||
|
薪资待遇:
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item-right">
|
||||||
|
{{item.minSalary}}-{{item.maxSalary}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="form-item" >
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/num.png'" mode=""></image>
|
||||||
|
<view class="item-label">
|
||||||
|
工作地点:
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item-right">
|
||||||
|
{{item.jobLocation}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<empty v-else pdTop="200"></empty>
|
||||||
|
</view>
|
||||||
|
<view class="main-list" :style="getBackgroundStyle('k.png')" v-if="activeType==2">
|
||||||
|
<view class="list-top">
|
||||||
|
<view class="list-title">
|
||||||
|
<text>推荐政策列表</text>
|
||||||
|
<view class="title-line" style="left: 70rpx;"></view>
|
||||||
|
</view>
|
||||||
|
<view class="title-total">
|
||||||
|
共<text class="total-num">{{totalNum}}</text>项
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="list-box" v-if="dataList.length>0">
|
||||||
|
<view class="con-box" v-for="(item,index) in dataList" :key="index">
|
||||||
|
<view class="form-item" >
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/person.png'" mode=""></image>
|
||||||
|
<view class="item-label">
|
||||||
|
政策名称:
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item-right">
|
||||||
|
{{item.zcmc}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/help.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
联系电话:
|
政策类型:
|
||||||
</view>
|
</view>
|
||||||
<view class="item-value">
|
</view>
|
||||||
{{formData.phone}}
|
<view class="item-right">
|
||||||
|
{{ item.type === '3' ? '个人就业政策' : '单位就业政策' }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="form-item" >
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/base.png'" mode=""></image>
|
||||||
|
<view class="item-label">
|
||||||
|
政策级别:
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item-right">
|
||||||
|
{{ item.zcLevel }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="form-item" >
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/num.png'" mode=""></image>
|
||||||
|
<view class="item-label">
|
||||||
|
发文单位:
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item-right">
|
||||||
|
{{item.sourceUnit}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/date.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
帮扶类型:
|
发布时间:
|
||||||
</view>
|
</view>
|
||||||
<view class="item-value">
|
</view>
|
||||||
{{formData.task_type}}
|
<view class="item-right">
|
||||||
|
{{item.publishTime}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<empty v-else pdTop="200"></empty>
|
||||||
|
</view>
|
||||||
|
<view class="main-list" :style="getBackgroundStyle('k.png')" v-if="activeType==3">
|
||||||
|
<view class="list-top">
|
||||||
|
<view class="list-title">
|
||||||
|
<text>推荐培训列表</text>
|
||||||
|
<view class="title-line" style="left: 70rpx;"></view>
|
||||||
|
</view>
|
||||||
|
<view class="title-total">
|
||||||
|
共<text class="total-num">{{totalNum}}</text>门
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="list-box" v-if="dataList.length>0">
|
||||||
|
<view class="con-box" v-for="(item,index) in dataList" :key="index">
|
||||||
|
<view class="form-item" >
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/person.png'" mode=""></image>
|
||||||
|
<view class="item-label">
|
||||||
|
课程标题:
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item-right">
|
||||||
|
{{item.videoTitle}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/help.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
帮扶人员:
|
课程分类:
|
||||||
</view>
|
|
||||||
<view class="item-value" >
|
|
||||||
{{formData.create_by_name}}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="item-right">
|
||||||
|
{{getabelByValue(item.category,classificationOptions)}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="form-item" >
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/base.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
帮扶日期:
|
讲师:
|
||||||
</view>
|
|
||||||
<view class="item-value">
|
|
||||||
{{formData.follow_date}}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="item-right">
|
||||||
|
{{item.teacherName}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="form-item" >
|
||||||
|
<view class="item-left">
|
||||||
|
<image class="item-img" :src="baseUrl+'/dispatch/num.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
下次联系:
|
时长:
|
||||||
</view>
|
|
||||||
<view class="item-value">
|
|
||||||
{{formData.next_contact_date}}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="item-right">
|
||||||
<view class="item-label">
|
{{formatDuration(item.hour)}}
|
||||||
人员标签:
|
|
||||||
</view>
|
|
||||||
<view class="item-value">
|
|
||||||
{{formData.tag_name}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="form-item">
|
|
||||||
<view class="item-label">
|
|
||||||
帮扶内容:
|
|
||||||
</view>
|
|
||||||
<view class="item-value">
|
|
||||||
{{formData.detailRecords}}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<empty v-else pdTop="200"></empty>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { inject, ref, reactive,onMounted } from 'vue';
|
import { inject, ref, reactive, onMounted } from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad,onShow } from '@dcloudio/uni-app';
|
||||||
const { $api, navTo, navBack } = inject('globalFunction');
|
const { $api, navTo, navBack } = inject('globalFunction');
|
||||||
import config from "@/config.js"
|
import config from "@/config.js"
|
||||||
|
|
||||||
const title = ref('');
|
const title = ref('');
|
||||||
const activeType = ref(1)
|
const activeType = ref(1)
|
||||||
const formData = reactive({
|
const pageNum = ref(1)
|
||||||
taskName: '',
|
const pageSize = ref(10)
|
||||||
taskType: '',
|
const totalNum=ref(0)
|
||||||
priority: '',
|
const dataList=ref([])
|
||||||
createTime:'',
|
const classificationOptions=ref([])
|
||||||
allocationStatus:'',
|
const goalPersonId=ref([])
|
||||||
taskAllocation: {
|
|
||||||
goalPersonCount: null,
|
|
||||||
executeDeptId: '',
|
|
||||||
executeDeptName: '',
|
|
||||||
executeDeptAncestors: '',
|
|
||||||
allocationStatus: '1',
|
|
||||||
allocationNote: '',
|
|
||||||
deadline: null,
|
|
||||||
goalPersonList: []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const taskTypeOptions=ref([])
|
|
||||||
const priorityOptions=ref([])
|
|
||||||
const allocationStatusOptions=ref([])
|
|
||||||
const executeDeptOptions=ref([])
|
|
||||||
// 表单引用
|
|
||||||
const formRef = ref(null)
|
|
||||||
const baseUrl = config.imgBaseUrl
|
const baseUrl = config.imgBaseUrl
|
||||||
const getBackgroundStyle = (imageName) => ({
|
const getBackgroundStyle = (imageName) => ({
|
||||||
backgroundImage: `url(${baseUrl}/dispatch/${imageName})`,
|
backgroundImage: `url(${baseUrl}/dispatch/${imageName})`,
|
||||||
@@ -133,34 +227,41 @@ const getBackgroundStyle = (imageName) => ({
|
|||||||
backgroundPosition: 'center', // 居中
|
backgroundPosition: 'center', // 居中
|
||||||
backgroundRepeat: 'no-repeat'
|
backgroundRepeat: 'no-repeat'
|
||||||
});
|
});
|
||||||
|
function tabChange(val){
|
||||||
|
activeType.value=val
|
||||||
|
getDataList()
|
||||||
|
}
|
||||||
|
function formatDuration(duration) {
|
||||||
|
// 如果已经是字符串格式,直接返回
|
||||||
|
if (typeof duration === 'string') {
|
||||||
|
return duration
|
||||||
|
}
|
||||||
|
// 如果是数字(秒数),格式化为时间字符串
|
||||||
|
if (typeof duration === 'number') {
|
||||||
|
const hours = Math.floor(duration / 3600)
|
||||||
|
const minutes = Math.floor((duration % 3600) / 60)
|
||||||
|
const secs = duration % 60
|
||||||
|
if (hours > 0) {
|
||||||
|
return `${hours}:${minutes.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`
|
||||||
|
} else {
|
||||||
|
return `${minutes}:${secs.toString().padStart(2, '0')}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return duration
|
||||||
|
}
|
||||||
function getDictionary(){
|
function getDictionary(){
|
||||||
$api.myRequest('/system/public/dict/data/type/assist_task_type').then((resData) => {
|
$api.myRequest('/system/public/dict/data/type/question_classification').then((resData) => {
|
||||||
if(resData && resData.code == 200){
|
if(resData && resData.code == 200){
|
||||||
resData.data.forEach(item=>{
|
resData.data.forEach(item=>{
|
||||||
const obj = {
|
const obj = {
|
||||||
value: item.dictValue,
|
value: item.dictValue,
|
||||||
text: item.dictLabel
|
text: item.dictLabel
|
||||||
}
|
}
|
||||||
taskTypeOptions.value.push(obj)
|
classificationOptions.value.push(obj)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function getDetail(id){
|
|
||||||
let header={
|
|
||||||
'Authorization':uni.getStorageSync('Padmin-Token'),
|
|
||||||
'Content-Type': "application/x-www-form-urlencoded"
|
|
||||||
}
|
|
||||||
let params={
|
|
||||||
goalPersonId:id
|
|
||||||
}
|
|
||||||
$api.myRequest('/dispatch/assist/records/getDetail',params,'get',9100,header).then((resData) => {
|
|
||||||
console.log("resData",resData)
|
|
||||||
resData.data.task_type=getabelByValue(resData.data.task_type,taskTypeOptions.value)
|
|
||||||
Object.assign(formData, resData.data)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function getabelByValue(value,arr) {
|
function getabelByValue(value,arr) {
|
||||||
if (!Array.isArray(arr)) {
|
if (!Array.isArray(arr)) {
|
||||||
return ''
|
return ''
|
||||||
@@ -168,34 +269,143 @@ function getabelByValue(value,arr) {
|
|||||||
const item = arr.find(item => item.value === String(value))
|
const item = arr.find(item => item.value === String(value))
|
||||||
return item ? item.text : '暂无'
|
return item ? item.text : '暂无'
|
||||||
}
|
}
|
||||||
onLoad((options) => {
|
function getDataList(){
|
||||||
runAsyncTasks(options)
|
dataList.value=[]
|
||||||
});
|
let header={
|
||||||
const runAsyncTasks = async (options) => {
|
'Authorization':uni.getStorageSync('Padmin-Token'),
|
||||||
await getDictionary()
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
await getDetail(options.id)
|
}
|
||||||
}
|
if(activeType.value==1){
|
||||||
|
let params={
|
||||||
|
goalPersonId: goalPersonId.value,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 1
|
||||||
|
}
|
||||||
|
$api.myRequest('/dispatch/job/willingness/list',params,'get',9100,header).then((resData) => {
|
||||||
|
if(resData.rows&&resData.rows.length>0){
|
||||||
|
const education = resData.rows[0].education?resData.rows[0].education:''
|
||||||
|
const jobType = resData.rows[0].jobType?resData.rows[0].jobType:''
|
||||||
|
const type = resData.rows[0].type?resData.rows[0].type:''
|
||||||
|
const jobParams = {
|
||||||
|
education,
|
||||||
|
jobType,
|
||||||
|
type
|
||||||
|
};
|
||||||
|
$api.myRequest('/ks/cms/job/recommend?education',jobParams,'get',9100,header,false,'jobRecommend').then((resData) => {
|
||||||
|
dataList.value=resData.data
|
||||||
|
if(dataList.value.length>10){
|
||||||
|
dataList.value=dataList.value.slice(0,10)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
$api.myRequest('/ks/cms/job/recommend?education',{},'get',9100,header,false,'jobRecommend').then((resData) => {
|
||||||
|
dataList.value=resData.data
|
||||||
|
if(dataList.value.length>10){
|
||||||
|
dataList.value=dataList.value.slice(0,10)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}else if(activeType.value==2){
|
||||||
|
let policyParams={
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 5
|
||||||
|
}
|
||||||
|
$api.myRequest('/portal/policyInfo/portalList',policyParams,'get',9100,header,false,'policyRecommend').then((resData) => {
|
||||||
|
dataList.value=resData.rows
|
||||||
|
})
|
||||||
|
}else if(activeType.value==3){
|
||||||
|
let willingParams = {
|
||||||
|
goalPersonId: goalPersonId.value,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 1
|
||||||
|
}
|
||||||
|
$api.myRequest('/dispatch/train/willingness/list',willingParams,'get',9100,header).then((resData) => {
|
||||||
|
if(resData.code==200){
|
||||||
|
let train = {};
|
||||||
|
if (resData.rows && resData.rows.length > 0) {
|
||||||
|
train = resData.rows[0];
|
||||||
|
}
|
||||||
|
let trainParams = {
|
||||||
|
category: train.courseType || '',
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 5
|
||||||
|
};
|
||||||
|
$api.myRequest('/dispatch/train/trainVideo/table',trainParams,'get',9100,header).then((resData) => {
|
||||||
|
dataList.value=resData.rows
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
function scrollBottom(){
|
||||||
|
// if(pageNum.value<totalNum.value/pageSize.value){
|
||||||
|
// pageNum.value++
|
||||||
|
// getDataList()
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
onLoad((options) => {
|
||||||
|
goalPersonId.value=options.goalPersonId
|
||||||
|
});
|
||||||
|
const runAsyncTasks = async () => {
|
||||||
|
await getDictionary()
|
||||||
|
await getDataList()
|
||||||
|
}
|
||||||
|
onShow(()=>{
|
||||||
|
dataList.value=[]
|
||||||
|
pageNum.value=1
|
||||||
|
runAsyncTasks()
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.tab-list
|
.tab-list
|
||||||
display: flex
|
display: flex
|
||||||
margin: 16rpx 30rpx 30rpx
|
margin: 16rpx 30rpx 0rpx
|
||||||
text-align: center
|
text-align: center
|
||||||
border-radius: 16rpx
|
border-radius: 16rpx
|
||||||
background: #fff
|
background: #fff
|
||||||
align-items: center
|
align-items: center
|
||||||
justify-content: space-between
|
justify-content: space-between
|
||||||
|
padding:20rpx 40rpx 0rpx
|
||||||
|
.tab
|
||||||
|
padding-bottom: 10rpx
|
||||||
|
font-size: 30rpx
|
||||||
.active
|
.active
|
||||||
background: #1A62CE
|
color: #1A62CE
|
||||||
color: #fff
|
border-bottom: 4rpx solid #1A62CE
|
||||||
position: relative
|
position: relative
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
image
|
image
|
||||||
height: 100%
|
height: 100%
|
||||||
width: 100%
|
width: 100%
|
||||||
|
.page-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: calc(100vh - var(--window-top)); /* 如果 AppLayout 有 header,需减去 */
|
||||||
|
/* 或者简单用:height: 100vh; */
|
||||||
|
padding-bottom: 140rpx
|
||||||
|
}
|
||||||
|
.nearby-scroll
|
||||||
|
// 使用flex布局让scroll-view自适应高度,占据剩余空间
|
||||||
|
flex: 1
|
||||||
|
// overflow: hidden;
|
||||||
|
.task-box
|
||||||
|
display: flex
|
||||||
|
align-items: center
|
||||||
|
.task-label
|
||||||
|
font-size: 30rpx
|
||||||
|
color: #6E7E9B
|
||||||
|
.task-name
|
||||||
|
font-weight: bold
|
||||||
|
font-size: 30rpx
|
||||||
|
color: #3D61AC
|
||||||
.main-list
|
.main-list
|
||||||
background-color: #ffffff
|
background-color: #ffffff
|
||||||
padding: 20rpx 20rpx 28rpx 20rpx
|
padding: 20rpx 20rpx 28rpx 20rpx
|
||||||
@@ -229,15 +439,50 @@ image
|
|||||||
margin-right: 4rpx
|
margin-right: 4rpx
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
font-size: 26rpx
|
font-size: 26rpx
|
||||||
|
|
||||||
|
.list-box
|
||||||
|
margin-top: 40rpx
|
||||||
|
|
||||||
|
:deep(.uni-forms-item__label)
|
||||||
|
width: 194rpx !important
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #404040;
|
||||||
|
|
||||||
|
.search-container
|
||||||
|
padding: 20rpx 0rpx 0rpx 0rpx
|
||||||
|
.title-total
|
||||||
|
font-size: 24rpx
|
||||||
|
color: #999999
|
||||||
|
.total-num
|
||||||
|
color: #3088FF
|
||||||
|
margin-left: 4rpx
|
||||||
|
margin-right: 4rpx
|
||||||
|
font-weight: bold
|
||||||
|
font-size: 26rpx
|
||||||
|
.search-item
|
||||||
|
display: flex
|
||||||
|
align-items: center
|
||||||
|
margin-bottom: 30rpx
|
||||||
|
|
||||||
|
.label
|
||||||
|
width: 160rpx
|
||||||
|
font-size: 28rpx
|
||||||
|
color: #404040
|
||||||
|
flex-shrink: 0
|
||||||
|
|
||||||
.input,
|
.input,
|
||||||
.picker
|
.picker
|
||||||
|
background: #FFFFFF
|
||||||
flex: 1
|
flex: 1
|
||||||
|
min-width: 0
|
||||||
.picker-value
|
.search-box-btn
|
||||||
color: #666
|
border-radius: 32rpx !important
|
||||||
|
background: #3088FF !important
|
||||||
.form-container
|
margin-right: 16rpx
|
||||||
margin-top: 30rpx
|
.reset-box-btn
|
||||||
|
border-radius: 32rpx !important
|
||||||
|
background: #02B44D
|
||||||
|
color: #fff
|
||||||
.con-box
|
.con-box
|
||||||
background: #fff
|
background: #fff
|
||||||
padding: 20rpx
|
padding: 20rpx
|
||||||
@@ -245,12 +490,26 @@ image
|
|||||||
border-radius: 24rpx
|
border-radius: 24rpx
|
||||||
border: 1rpx solid #EDF5FF
|
border: 1rpx solid #EDF5FF
|
||||||
margin-top: 30rpx
|
margin-top: 30rpx
|
||||||
|
.form-title
|
||||||
|
display: flex
|
||||||
|
align-items: center
|
||||||
|
|
||||||
|
.form-name
|
||||||
|
font-weight: bold
|
||||||
|
font-size: 30rpx
|
||||||
|
color: #595959
|
||||||
|
margin-right:16rpx
|
||||||
|
.form-type
|
||||||
|
border-radius: 8rpx;
|
||||||
|
border: 2rpx solid #FF7D26;
|
||||||
|
font-size: 24rpx
|
||||||
|
color: #F1690E
|
||||||
|
padding: 4rpx 10rpx
|
||||||
.form-item
|
.form-item
|
||||||
display: flex
|
display: flex
|
||||||
align-items: center
|
align-items: center
|
||||||
margin-bottom: 20rpx
|
justify-content: space-between
|
||||||
.mb-30
|
margin-top: 30rpx
|
||||||
margin-bottom: 30rpx
|
|
||||||
.item-left
|
.item-left
|
||||||
display: flex
|
display: flex
|
||||||
align-items: center
|
align-items: center
|
||||||
@@ -258,38 +517,54 @@ image
|
|||||||
width: 26rpx
|
width: 26rpx
|
||||||
height: 26rpx
|
height: 26rpx
|
||||||
margin-right: 10rpx
|
margin-right: 10rpx
|
||||||
.item-label1
|
.item-label
|
||||||
font-size: 26rpx
|
font-size: 26rpx
|
||||||
color: #B3B3B3
|
color: #B3B3B3
|
||||||
width: 130rpx
|
width: 190rpx
|
||||||
.item-label
|
.item-right
|
||||||
width:200rpx
|
font-size: 26rpx
|
||||||
text-align: left
|
color: #737373
|
||||||
font-size: 30rpx
|
// overflow: hidden
|
||||||
color: #606266
|
// text-overflow: ellipsis
|
||||||
height: 72rpx
|
// white-space: nowrap
|
||||||
padding: 0 24rpx 0 0
|
word-wrap: break-word
|
||||||
vertical-align: middle
|
overflow-wrap: break-word
|
||||||
flex-shrink: 0
|
white-space: normal
|
||||||
box-sizing: border-box
|
.form-btns
|
||||||
.item-value
|
margin-top:30rpx
|
||||||
color: #333
|
.form-box-btn
|
||||||
font-size: 30rpx
|
border-radius: 50rpx !important
|
||||||
height: 72rpx
|
margin-right: 24rpx
|
||||||
padding: 0 24rpx 0 0
|
padding: 0rpx 40rpx
|
||||||
vertical-align: middle
|
.detail-btn
|
||||||
flex-shrink: 0
|
background: #EDF5FF
|
||||||
box-sizing: border-box
|
border: 1px solid #3088FF
|
||||||
:deep(.uni-forms-item__label)
|
font-size: 28rpx
|
||||||
width: 194rpx !important
|
color: #3088FF
|
||||||
font-size: 28rpx;
|
.follow-btn
|
||||||
color: #404040;
|
background: #EEF9F3
|
||||||
|
border: 1px solid #00933E
|
||||||
.button-group {
|
font-size: 28rpx
|
||||||
display: flex;
|
color: #00933E
|
||||||
justify-content: space-between;
|
.recommend-btn
|
||||||
padding: 40rpx 20rpx 20rpx;
|
background: linear-gradient(92deg, #0DCCFF 0%, #4760FF 100%)
|
||||||
}
|
font-size: 28rpx
|
||||||
|
color: #FFFFFF
|
||||||
|
.button-group
|
||||||
|
position: fixed
|
||||||
|
bottom: 0
|
||||||
|
left: 0
|
||||||
|
width: 100%
|
||||||
|
height: 120rpx
|
||||||
|
background: #fff
|
||||||
|
.btns
|
||||||
|
height: 120rpx
|
||||||
|
width: 100%
|
||||||
|
line-height: 120px
|
||||||
|
display: flex
|
||||||
|
align-items: center
|
||||||
|
justify-content: space-between
|
||||||
|
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1)
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
width: 45%;
|
width: 45%;
|
||||||
@@ -307,15 +582,16 @@ image
|
|||||||
background-color: #368BFF;
|
background-color: #368BFF;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.choice-btn{
|
.float-btn{
|
||||||
width: 100%;
|
position: fixed;
|
||||||
height: 70rpx;
|
bottom: 100rpx;
|
||||||
font-size: 28rpx;
|
right: 50rpx;
|
||||||
border-radius: 8rpx;
|
background: #368BFF;
|
||||||
background-color: #368BFF;
|
width: 100rpx;
|
||||||
color: white;
|
height: 100rpx;
|
||||||
margin-left: 0;
|
border-radius: 50%;
|
||||||
|
line-height: 100rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
:deep(.uni-easyinput__content)
|
|
||||||
background: rgba(0,0,0,0) !important
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -28,7 +28,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<text class="label">所属区域:</text>
|
<text class="label">所属区域:</text>
|
||||||
<uni-data-select v-model="formData.deptTags" :localdata="taskTypeOptions" placeholder="请选择所属区域" @change="onTaskTypeChange"></uni-data-select>
|
<uni-data-picker ref="picker" class="picker" placeholder="请选择所属区域" popup-title="请选择所属区域" :localdata="regions" v-model="formData.deptTags"
|
||||||
|
@change="onchange" >
|
||||||
|
</uni-data-picker>
|
||||||
|
<!-- <uni-data-select v-model="formData.deptTags" :localdata="taskTypeOptions" placeholder="请选择所属区域" @change="onTaskTypeChange"></uni-data-select> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -221,6 +224,109 @@ const getBackgroundStyle = (imageName) => ({
|
|||||||
backgroundRepeat: 'no-repeat'
|
backgroundRepeat: 'no-repeat'
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['update:showVue'])
|
const emit = defineEmits(['update:showVue'])
|
||||||
|
// 所属区域选项(可根据实际替换为动态数据)
|
||||||
|
const regions = ref([])
|
||||||
|
const picker = ref(null)
|
||||||
|
function listNotParam(){
|
||||||
|
let header={
|
||||||
|
'Authorization':uni.getStorageSync('Padmin-Token'),
|
||||||
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
|
}
|
||||||
|
let params={}
|
||||||
|
$api.myRequest('/dispatch/dept/listNotParam',params,'get',9100,header).then((resData) => {
|
||||||
|
if(resData && resData.code == 200){
|
||||||
|
loadLevelData(resData.data[0].parentId);
|
||||||
|
// resData.data.forEach(item=>{
|
||||||
|
// const obj = {
|
||||||
|
// value: item.deptId,
|
||||||
|
// text: item.deptName,
|
||||||
|
// ancestors:item.ancestors
|
||||||
|
// }
|
||||||
|
// executeDeptOptions.value.push(obj)
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 加载某一级的数据(parentId 为空表示根)
|
||||||
|
async function loadLevelData(parentId,node) {
|
||||||
|
let header = {
|
||||||
|
'Authorization': uni.getStorageSync('Padmin-Token'),
|
||||||
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
|
};
|
||||||
|
let params = { parentId };
|
||||||
|
|
||||||
|
try {
|
||||||
|
const resData = await $api.myRequest('/dispatch/dept/list', params, 'get', 9100, header);
|
||||||
|
if(resData.data.length==0){
|
||||||
|
picker.value.hide()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const formatted = (resData.data || []).map(item => ({
|
||||||
|
text: item.deptName,
|
||||||
|
value: item.tags,
|
||||||
|
deptId: item.deptId,
|
||||||
|
children: []
|
||||||
|
}));
|
||||||
|
if(node){
|
||||||
|
injectChildren(parentId, formatted);
|
||||||
|
}else{
|
||||||
|
regions.value=formatted
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("加载部门数据失败:", error);
|
||||||
|
// uni.showToast({ title: '加载失败', icon: 'none' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 将子级数据注入到对应的父节点
|
||||||
|
function injectChildren(parentValue, childrenData) {
|
||||||
|
const findAndInject = (nodes) => {
|
||||||
|
for (let node of nodes) {
|
||||||
|
if (node.deptId === parentValue) {
|
||||||
|
// 如果 children 已存在且非空,避免重复加载
|
||||||
|
if (!node.children || node.children.length === 0) {
|
||||||
|
node.children = childrenData;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
if (findAndInject(node.children)) return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
findAndInject(regions.value);
|
||||||
|
// 强制更新
|
||||||
|
}
|
||||||
|
// 当用户选择时触发(注意:change 在每级选择后都会触发)
|
||||||
|
function onchange(e) {
|
||||||
|
const selectedValues = e.detail.value;
|
||||||
|
// formData.deptId=selectedValues.map(item => item.value).join(',');
|
||||||
|
if (selectedValues.length === 0) return;
|
||||||
|
// 获取最后一级选中的 value
|
||||||
|
const lastSelectedValue = selectedValues[selectedValues.length - 1];
|
||||||
|
// 查找该节点是否有 children,如果没有则尝试加载
|
||||||
|
const node = findNodeByValue(regions.value, lastSelectedValue);
|
||||||
|
if (node && (!node.children || node.children.length === 0)) {
|
||||||
|
// 检查接口是否还有下一级(可通过接口返回判断,或先尝试加载)
|
||||||
|
// 这里我们直接尝试加载下一级
|
||||||
|
loadLevelData(node.deptId , node);
|
||||||
|
picker.value.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 工具函数:根据 value 查找节点
|
||||||
|
function findNodeByValue(nodes, value) {
|
||||||
|
for (let node of nodes) {
|
||||||
|
if (node.value === value.value) {
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
const found = findNodeByValue(node.children, value);
|
||||||
|
if (found) return found;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
function getDictionary(){
|
function getDictionary(){
|
||||||
$api.myRequest('/system/public/dict/data/type/person_database_status').then((resData) => {
|
$api.myRequest('/system/public/dict/data/type/person_database_status').then((resData) => {
|
||||||
if(resData && resData.code == 200){
|
if(resData && resData.code == 200){
|
||||||
@@ -348,6 +454,7 @@ function scrollBottom(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
|
listNotParam()
|
||||||
if(options.allocationId){
|
if(options.allocationId){
|
||||||
formData.allocationId=options.allocationId
|
formData.allocationId=options.allocationId
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view :class="{'h5-pc-page': isH5}">
|
||||||
<view class="popupAll">
|
<view class="popupAll">
|
||||||
<view class="tabList dispalyF" v-if="!allCheckShow">
|
<view class="tabList dispalyF" v-if="!allCheckShow">
|
||||||
<scroll-view scroll-x style="white-space: nowrap;width: calc(100% - 144rpx);margin-left: 32rpx">
|
<scroll-view scroll-x style="white-space: nowrap;width: calc(100% - 144rpx);margin-left: 32rpx">
|
||||||
@@ -32,12 +32,13 @@
|
|||||||
class="popupList"
|
class="popupList"
|
||||||
v-for="(item, index) in newCkeckData"
|
v-for="(item, index) in newCkeckData"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
v-show="!item.hidden"
|
||||||
>
|
>
|
||||||
<view class="tabTitle">
|
<view class="tabTitle">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="dispalyF"
|
class="dispalyF filter-options-container"
|
||||||
:style="[
|
:style="[
|
||||||
{
|
{
|
||||||
position: 'sticky',
|
position: 'sticky',
|
||||||
@@ -47,7 +48,6 @@
|
|||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<template>
|
|
||||||
<template v-for="(itm, idx) in item.data">
|
<template v-for="(itm, idx) in item.data">
|
||||||
<view :key="idx" v-if="!itm.mode"
|
<view :key="idx" v-if="!itm.mode"
|
||||||
@click="getActive(itm, index, idx)"
|
@click="getActive(itm, index, idx)"
|
||||||
@@ -56,20 +56,12 @@
|
|||||||
? 'popupItem-active'
|
? 'popupItem-active'
|
||||||
: 'popupItem'
|
: 'popupItem'
|
||||||
"
|
"
|
||||||
style="margin-right: 20rpx"
|
|
||||||
>
|
>
|
||||||
{{ itm.dictLabel }}
|
{{ itm.dictLabel }}
|
||||||
</view>
|
</view>
|
||||||
<!-- <view v-if="itm.mode == 'timerange'">
|
|
||||||
{{itm.start||'开始时间'}} - {{ item.end||'结束时间' }}
|
|
||||||
</view> -->
|
|
||||||
</template>
|
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="search_btn" @click="search">
|
|
||||||
查询
|
|
||||||
</view> -->
|
|
||||||
<view class="bottom-search">
|
<view class="bottom-search">
|
||||||
<view class="search-left" @click="clearAll">
|
<view class="search-left" @click="clearAll">
|
||||||
清空
|
清空
|
||||||
@@ -77,7 +69,7 @@
|
|||||||
<view class="search-right" @click="search">查询</view>
|
<view class="search-right" @click="search">查询</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="popupPic" @click="close">
|
<view class="popupPic" @click="close">
|
||||||
<u-icon name="arrow-up"></u-icon>
|
<uni-icons type="arrow-up" color="#c0c4cc" :size="isH5 ? 20 : 16"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -102,7 +94,8 @@ export default {
|
|||||||
params: "",
|
params: "",
|
||||||
fijItem: "",
|
fijItem: "",
|
||||||
outData: [],
|
outData: [],
|
||||||
nickName: ''
|
nickName: '',
|
||||||
|
isH5: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -114,9 +107,17 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (uni.getStorageSync("userInfo")) {
|
// #ifdef H5
|
||||||
let userInfo = JSON.parse(uni.getStorageSync("userInfo"));
|
this.isH5 = true;
|
||||||
this.nickName = userInfo.userName ? userInfo.userName : "";
|
// #endif
|
||||||
|
const rawUserInfo = uni.getStorageSync("userInfo");
|
||||||
|
if (rawUserInfo) {
|
||||||
|
try {
|
||||||
|
let userInfo = typeof rawUserInfo === 'string' ? JSON.parse(rawUserInfo) : rawUserInfo;
|
||||||
|
this.nickName = userInfo.userName || userInfo.name || "";
|
||||||
|
} catch (e) {
|
||||||
|
console.error("解析用户信息失败", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -256,7 +257,7 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 9;
|
z-index: 105; /* 增加层级,确保在筛选条上方而不被遮挡 */
|
||||||
|
|
||||||
.tabItem {
|
.tabItem {
|
||||||
line-height: 56rpx;
|
line-height: 56rpx;
|
||||||
@@ -279,7 +280,7 @@ export default {
|
|||||||
right: 0;
|
right: 0;
|
||||||
width: 87rpx;
|
width: 87rpx;
|
||||||
height: 56rpx;
|
height: 56rpx;
|
||||||
// background: linear-gradient(270deg, #2A51DF 0%, rgba(66, 110, 230, 0) 100%);
|
z-index: 100; /* 确保图标可点击 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabrightBtn {
|
.tabrightBtn {
|
||||||
@@ -308,7 +309,6 @@ export default {
|
|||||||
border: 1rpx solid #CAD4E2;
|
border: 1rpx solid #CAD4E2;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popupItem-active {
|
.popupItem-active {
|
||||||
padding: 0 32rpx;
|
padding: 0 32rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -328,15 +328,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dispalyF {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rightView :last-child {
|
|
||||||
margin-right: 100rpx !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom-search {
|
.bottom-search {
|
||||||
margin-top:56rpx;
|
margin-top:56rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -371,4 +362,73 @@ export default {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* #ifdef H5 */
|
||||||
|
.h5-pc-page {
|
||||||
|
.tabList {
|
||||||
|
padding: 12px 0 !important;
|
||||||
|
background: #f5f7fa !important;
|
||||||
|
border-radius: 12px !important;
|
||||||
|
white-space: nowrap !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
display: flex !important;
|
||||||
|
}
|
||||||
|
.tabList .tabItem {
|
||||||
|
display: inline-block !important;
|
||||||
|
font-size: 20px !important;
|
||||||
|
line-height: 48px !important;
|
||||||
|
height: 48px !important;
|
||||||
|
padding: 0 24px !important;
|
||||||
|
border-radius: 24px !important;
|
||||||
|
width: auto !important;
|
||||||
|
min-width: 100px !important; /* 减小最小宽度,防止溢出 */
|
||||||
|
margin-right: 12px !important;
|
||||||
|
vertical-align: middle;
|
||||||
|
background-color: #ffffff !important;
|
||||||
|
flex-shrink: 0 !important;
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
}
|
||||||
|
.tabItem.popupItem-active {
|
||||||
|
background-color: #1a62ce !important;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
.tabTitle {
|
||||||
|
font-size: 20px !important;
|
||||||
|
margin: 16px 0 12px !important;
|
||||||
|
font-weight: 600;
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
.filter-options-container {
|
||||||
|
display: flex !important;
|
||||||
|
flex-wrap: wrap !important;
|
||||||
|
margin-top: 8px !important;
|
||||||
|
min-height: 40px !important;
|
||||||
|
}
|
||||||
|
/* 仅针对展开后的筛选列表应用网格项样式,避免影响顶部 Tab */
|
||||||
|
.popupList .popupItem,
|
||||||
|
.popupList .popupItem-active {
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
font-size: 20px !important;
|
||||||
|
line-height: 1.2 !important;
|
||||||
|
padding: 10px 24px !important;
|
||||||
|
margin: 0 16px 16px 0 !important;
|
||||||
|
border-radius: 8px !important;
|
||||||
|
border: 1px solid #CAD4E2 !important;
|
||||||
|
min-width: 140px !important;
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
.popupItem-active {
|
||||||
|
background-color: #1a62ce !important;
|
||||||
|
color: #fff !important;
|
||||||
|
border-color: #1a62ce !important;
|
||||||
|
}
|
||||||
|
.bottom-search .search-left, .bottom-search .search-right {
|
||||||
|
font-size: 20px !important;
|
||||||
|
height: 54px !important;
|
||||||
|
line-height: 54px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<!-- @scroll="handleScroll" @scrolltolower="scrollBottom" -->
|
<!-- @scroll="handleScroll" @scrolltolower="scrollBottom" -->
|
||||||
<scroll-view :scroll-y="true" class="container" style="background-image: url(../../../packageRc/static/pageBgIndex.png);">
|
<scroll-view :scroll-y="true" class="container" :class="{'h5-pc-container': isH5}" :show-scrollbar="false" style="background-image: url(../../../packageRc/static/pageBgIndex.png);">
|
||||||
<view style="padding: 40rpx 28rpx;">
|
<view style="padding: 40rpx 28rpx;">
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<view class="kinggang">
|
<view class="kinggang">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<view v-for="(item, index) in jobList" :key="index" @click="nextDetail(item)" class="job-list">
|
<view v-for="(item, index) in jobList" :key="index" @click="nextDetail(item)" class="job-list">
|
||||||
<view class="top-line">
|
<view class="top-line">
|
||||||
<view class="salary">{{item.minSalary}}-{{item.maxSalary}}/月</view>
|
<view class="salary">{{item.minSalary}}-{{item.maxSalary}}/月</view>
|
||||||
<view class="time"><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons>发布日期:{{ item.postingDate }}</view>
|
<view class="time"><uni-icons color="#A2A2A2" type="info" :size="uniIconSize"></uni-icons>发布日期:{{ item.postingDate }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="title">{{ item.jobTitle }}</view>
|
<view class="title">{{ item.jobTitle }}</view>
|
||||||
<view class="infos">
|
<view class="infos">
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
<view>{{ item.jobLocation }}</view>
|
<view>{{ item.jobLocation }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom-line">
|
<view class="bottom-line">
|
||||||
<view><uni-icons color="#A2A2A2" type="person" size="12"></uni-icons>{{item.vacancies}}人</view>
|
<view><uni-icons color="#A2A2A2" type="person" :size="uniIconSize"></uni-icons>{{item.vacancies}}人</view>
|
||||||
<view>{{ item.companyName }}</view>
|
<view>{{ item.companyName }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
<template v-else>
|
<template v-else>
|
||||||
<view class="titles" style="justify-content: space-between;">
|
<view class="titles" style="justify-content: space-between;">
|
||||||
<view class="title-item active"><view>政策专区</view></view>
|
<view class="title-item active"><view>政策专区</view></view>
|
||||||
<view @click="toPolicyList">{{'查看更多 >'}}</view>
|
<view class="more-link" @click="toPolicyList">{{'查看更多 >'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-for="(item, index) in policyList" :key="index" class="job-list" @click="toPolicyDetail(item)">
|
<view v-for="(item, index) in policyList" :key="index" class="job-list" @click="toPolicyDetail(item)">
|
||||||
<view class="sign">推荐</view>
|
<view class="sign">推荐</view>
|
||||||
@@ -90,8 +90,8 @@
|
|||||||
<view v-if="item.sourceUnit">{{item.sourceUnit}}</view>
|
<view v-if="item.sourceUnit">{{item.sourceUnit}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom-line">
|
<view class="bottom-line">
|
||||||
<view><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons>发布日期:{{item.createTime}}</view>
|
<view class="time"><uni-icons color="#A2A2A2" type="info" :size="uniIconSize"></uni-icons>发布日期:{{item.createTime}}</view>
|
||||||
<view><uni-icons color="#A2A2A2" type="eye" size="12"></uni-icons>浏览量:{{item.viewNum || 0}}</view>
|
<view><uni-icons color="#A2A2A2" type="eye" :size="uniIconSize"></uni-icons>浏览量:{{item.viewNum || 0}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -103,6 +103,13 @@
|
|||||||
import { reactive, inject, watch, ref, onMounted, watchEffect, nextTick } from 'vue';
|
import { reactive, inject, watch, ref, onMounted, watchEffect, nextTick } from 'vue';
|
||||||
const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction');
|
const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction');
|
||||||
|
|
||||||
|
const isH5 = ref(false);
|
||||||
|
const uniIconSize = ref(18);
|
||||||
|
// #ifdef H5
|
||||||
|
isH5.value = true;
|
||||||
|
uniIconSize.value = 20;
|
||||||
|
// #endif
|
||||||
|
|
||||||
import { getPolicyList } from '@/packageRc/apiRc/policy';
|
import { getPolicyList } from '@/packageRc/apiRc/policy';
|
||||||
let policyList = ref([])
|
let policyList = ref([])
|
||||||
function getPolicy() {
|
function getPolicy() {
|
||||||
@@ -133,6 +140,8 @@ onMounted(()=>{
|
|||||||
getPolicy();
|
getPolicy();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function goCa(){
|
function goCa(){
|
||||||
if (checkLogin()) {
|
if (checkLogin()) {
|
||||||
const userInfo = uni.getStorageSync('userInfo')
|
const userInfo = uni.getStorageSync('userInfo')
|
||||||
@@ -240,6 +249,14 @@ function nextDetail(job) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
/* 隐藏滚动条 */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
width: 0 !important;
|
||||||
|
height: 0 !important;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
view{box-sizing: border-box;display: block;}
|
view{box-sizing: border-box;display: block;}
|
||||||
.container{
|
.container{
|
||||||
background-color: #F4F4F4;background-position: top center;background-size: 100% auto;
|
background-color: #F4F4F4;background-position: top center;background-size: 100% auto;
|
||||||
@@ -331,10 +348,10 @@ view{box-sizing: border-box;display: block;}
|
|||||||
position: relative;
|
position: relative;
|
||||||
.sign{
|
.sign{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
font-size: 24rpx;
|
font-size: 28rpx;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
padding: 4rpx 14rpx;
|
padding: 8rpx 20rpx;
|
||||||
border: 1rpx solid #EC4827;
|
border: 1rpx solid #EC4827;
|
||||||
background: rgba(227, 79, 49, 0.09);
|
background: rgba(227, 79, 49, 0.09);
|
||||||
border-top-right-radius: 24rpx;
|
border-top-right-radius: 24rpx;
|
||||||
@@ -414,4 +431,114 @@ view{box-sizing: border-box;display: block;}
|
|||||||
transform: translateX(50%);
|
transform: translateX(50%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* #ifdef H5 */
|
||||||
|
.h5-pc-container {
|
||||||
|
& > view {
|
||||||
|
width: 100% !important;
|
||||||
|
margin: 0 auto !important;
|
||||||
|
padding-left: 32px !important;
|
||||||
|
padding-right: 32px !important;
|
||||||
|
padding-top: 0 !important; /* 彻底移除顶部补白 */
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.showtab {
|
||||||
|
margin-top: 0 !important; /* 移除卡片顶部间距 */
|
||||||
|
margin-bottom: 120rpx;
|
||||||
|
height: 340rpx;
|
||||||
|
.tabItem {
|
||||||
|
height: 340rpx !important;
|
||||||
|
image:first-child {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.activeImg {
|
||||||
|
width: 160rpx !important;
|
||||||
|
height: 20rpx !important;
|
||||||
|
bottom: -40rpx !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs {
|
||||||
|
margin-bottom: 80rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
border-radius: 20rpx !important;
|
||||||
|
background: #f8faff !important;
|
||||||
|
box-shadow: 0px 4rpx 15rpx rgba(0, 0, 0, 0.04);
|
||||||
|
.tab {
|
||||||
|
width: 33.3% !important;
|
||||||
|
line-height: 120rpx !important;
|
||||||
|
font-size: 20px !important;
|
||||||
|
border-radius: 16rpx !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.titles {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
.title-item {
|
||||||
|
font-size: 24px !important;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-right: 100rpx !important;
|
||||||
|
>view {
|
||||||
|
padding: 0 16rpx !important;
|
||||||
|
}
|
||||||
|
&::after {
|
||||||
|
height: 24rpx !important;
|
||||||
|
bottom: -12rpx !important;
|
||||||
|
width: 110% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.more-link {
|
||||||
|
font-size: 20px !important;
|
||||||
|
color: #A2A2A2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.job-list {
|
||||||
|
padding: 48rpx 40rpx !important;
|
||||||
|
margin-bottom: 32rpx !important;
|
||||||
|
border-radius: 24rpx !important;
|
||||||
|
border: 1px solid #f0f0f0;
|
||||||
|
box-shadow: 0px 2rpx 10rpx rgba(0, 0, 0, 0.02);
|
||||||
|
.sign {
|
||||||
|
font-size: 20px !important;
|
||||||
|
padding: 8rpx 20rpx !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 24px !important;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 24rpx !important;
|
||||||
|
}
|
||||||
|
.infos view {
|
||||||
|
font-size: 20px !important;
|
||||||
|
line-height: 1.5 !important;
|
||||||
|
padding: 10rpx 24rpx !important;
|
||||||
|
margin-bottom: 12rpx;
|
||||||
|
background: #f5f5f5 !important;
|
||||||
|
border-radius: 12rpx !important;
|
||||||
|
}
|
||||||
|
.salary {
|
||||||
|
font-size: 24px !important;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.time {
|
||||||
|
font-size: 20px !important; /* 发布日期字号放大 */
|
||||||
|
}
|
||||||
|
.bottom-line {
|
||||||
|
font-size: 20px !important;
|
||||||
|
margin-top: 20rpx !important;
|
||||||
|
}
|
||||||
|
.view-more-btn {
|
||||||
|
font-size: 24px !important; /* 查看更多字号放大 */
|
||||||
|
padding: 20rpx 80rpx !important;
|
||||||
|
border-radius: 60rpx !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
</style>
|
</style>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page" style="background-image: url(../../../packageRc/static/pageBg.png);">
|
<view class="page" :class="{'h5-pc-page': isH5}" style="background-image: url(../../../packageRc/static/pageBg.png);">
|
||||||
<scroll-view :scroll-y="true" style="height: 100vh;position: relative;z-index: 1;">
|
<scroll-view :scroll-y="true" style="height: 100vh;position: relative;z-index: 1;" :show-scrollbar="false">
|
||||||
<view class="input-outer-part"
|
<view class="input-outer-part"
|
||||||
style="padding: 24rpx 32rpx 0;max-height: unset;">
|
style="padding: 24rpx 32rpx 0;max-height: unset;">
|
||||||
<view class="basic-info-content-main" v-if="!loading">
|
<view class="basic-info-content-main" v-if="!loading">
|
||||||
@@ -31,8 +31,8 @@
|
|||||||
class="main-ceontent-list-item"
|
class="main-ceontent-list-item"
|
||||||
v-if="policyDetail.applicableObjects"
|
v-if="policyDetail.applicableObjects"
|
||||||
>
|
>
|
||||||
<view class="main-ceontent-list-item-title">政策对象</view>
|
<view :class="['main-ceontent-list-item-title', isPc ? 'pc-main-ceontent-list-item-title' : '']">政策对象</view>
|
||||||
<view class="main-ceontent-list-item-content">
|
<view :class="['main-ceontent-list-item-content', isPc ? 'pc-main-ceontent-list-item-content' : '']">
|
||||||
<span
|
<span
|
||||||
v-if="policyDetail.applicableObjects"
|
v-if="policyDetail.applicableObjects"
|
||||||
v-html="policyDetail.applicableObjects"
|
v-html="policyDetail.applicableObjects"
|
||||||
@@ -102,9 +102,15 @@ import { getPolicyDetail } from "@/packageRc/apiRc/policy";
|
|||||||
return {
|
return {
|
||||||
policyDetail: {},
|
policyDetail: {},
|
||||||
loading: false,
|
loading: false,
|
||||||
|
isH5: false,
|
||||||
|
isPc: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
// #ifdef H5
|
||||||
|
this.isH5 = true;
|
||||||
|
this.isPc = true;
|
||||||
|
// #endif
|
||||||
this.getPolicy(options.id);
|
this.getPolicy(options.id);
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -113,6 +119,23 @@ import { getPolicyDetail } from "@/packageRc/apiRc/policy";
|
|||||||
getPolicy(id) {
|
getPolicy(id) {
|
||||||
getPolicyDetail({id}).then(res => {
|
getPolicyDetail({id}).then(res => {
|
||||||
this.policyDetail = res.data
|
this.policyDetail = res.data
|
||||||
|
}).catch(err => {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
|
// 仅在测试环境下,注入大段文本验证排版
|
||||||
|
this.policyDetail = {
|
||||||
|
zcmc: '【条件编译测试】支持高校毕业生在本地创业就业的若干激励措施(接口失败模拟)',
|
||||||
|
zcLevel: '省级重点',
|
||||||
|
sourceUnit: '人社测试局',
|
||||||
|
publishTime: '2026-03-10',
|
||||||
|
viewNum: 9999,
|
||||||
|
applicableObjects: '1. 本市户籍的高校毕业生;<br/>2. 创业青年群体。',
|
||||||
|
policyExplanation: '本政策旨在吸引更多高素质人才留在本市发展。',
|
||||||
|
applyCondition: '具有全日制本科及以上学历且毕业在5年内。',
|
||||||
|
zczc: '最高50万元奖励,办公场地免租3年。',
|
||||||
|
btbz: '本科5000元/月,硕士10000元/月,连续发放3年。',
|
||||||
|
jbqd: '政务中心2楼窗口、线上小程序入口。'
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getDictLabel(value, list) {
|
getDictLabel(value, list) {
|
||||||
@@ -130,6 +153,14 @@ import { getPolicyDetail } from "@/packageRc/apiRc/policy";
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
/* 隐藏滚动条 */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
width: 0 !important;
|
||||||
|
height: 0 !important;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
.page {
|
.page {
|
||||||
background-color: #f4f4f4 !important;
|
background-color: #f4f4f4 !important;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
@@ -323,4 +354,64 @@ import { getPolicyDetail } from "@/packageRc/apiRc/policy";
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* #ifdef H5 */
|
||||||
|
.h5-pc-page {
|
||||||
|
width: 100% !important;
|
||||||
|
|
||||||
|
.input-outer-part {
|
||||||
|
width: 80% !important;
|
||||||
|
margin: 0 auto !important;
|
||||||
|
padding-left: 0 !important;
|
||||||
|
padding-right: 0 !important;
|
||||||
|
}
|
||||||
|
.title-line {
|
||||||
|
font-size: 24px !important;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1.4 !important;
|
||||||
|
}
|
||||||
|
.infos {
|
||||||
|
font-size: 20px !important;
|
||||||
|
line-height: 1.8 !important;
|
||||||
|
.info {
|
||||||
|
margin-top: 10rpx !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.main-ceontent-list-item-title {
|
||||||
|
font-size: 24px !important;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1.6 !important;
|
||||||
|
margin-bottom: 24rpx !important;
|
||||||
|
}
|
||||||
|
.main-ceontent-list-item-content {
|
||||||
|
font-size: 20px !important;
|
||||||
|
line-height: 1.6 !important;
|
||||||
|
padding: 24rpx !important;
|
||||||
|
}
|
||||||
|
.tag {
|
||||||
|
font-size: 20px !important;
|
||||||
|
}
|
||||||
|
.main-ceontent-list-title {
|
||||||
|
font-size: 24px !important;
|
||||||
|
font-weight: 600 !important;
|
||||||
|
}
|
||||||
|
.part-title {
|
||||||
|
font-size: 24px !important;
|
||||||
|
font-weight: 600 !important;
|
||||||
|
}
|
||||||
|
.part-info {
|
||||||
|
font-size: 20px !important;
|
||||||
|
}
|
||||||
|
.notice-list .title {
|
||||||
|
font-size: 24px !important;
|
||||||
|
font-weight: 600 !important;
|
||||||
|
}
|
||||||
|
.notice-content {
|
||||||
|
font-size: 20px !important;
|
||||||
|
}
|
||||||
|
.enclosure-item {
|
||||||
|
font-size: 20px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view
|
<view
|
||||||
class="page"
|
class="page" :class="{'h5-pc-page': isH5}"
|
||||||
style="
|
style="
|
||||||
background-image: url(../../../packageRc/static/pageBg.png);
|
background-image: url(../../../packageRc/static/pageBg.png);
|
||||||
"
|
"
|
||||||
@@ -22,18 +22,36 @@
|
|||||||
@click="search()"
|
@click="search()"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<view
|
||||||
|
class="inner"
|
||||||
|
:style="{
|
||||||
|
width: 'calc(100% + 64rpx)',
|
||||||
|
marginLeft: '-32rpx',
|
||||||
|
height: zctopShow ? 'auto' : '122rpx',
|
||||||
|
position: 'relative',
|
||||||
|
zIndex: zctopShow ? 100 : 2,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<PopupList
|
||||||
|
:checkData="checkData"
|
||||||
|
@searchCheck="search"
|
||||||
|
ref="PopupList"
|
||||||
|
@popupSearch="popupSearch"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="total"
|
v-if="total"
|
||||||
style="position: relative; padding: 32rpx 0; color: #000"
|
style="position: relative; padding: 32rpx 0; color: #000"
|
||||||
>
|
>
|
||||||
<!-- <view v-if="total" style="position: relative;padding-bottom: 16px;color: #000;"> -->
|
<!-- <view v-if="total" style="position: relative;padding-bottom: 16px;color: #000;"> -->
|
||||||
<text>共 {{ total }} 条</text>
|
<text class="total-count">共 {{ total }} 条</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- <scroll-view :scroll-y="true" style="height: calc(100vh - 342rpx);position: relative;z-index: 1;" -->
|
<!-- <scroll-view :scroll-y="true" style="height: calc(100vh - 342rpx);position: relative;z-index: 1;" -->
|
||||||
<scroll-view
|
<scroll-view
|
||||||
:scroll-y="true"
|
:scroll-y="true"
|
||||||
style="height: calc(100vh - 232rpx); position: relative; z-index: 1"
|
style="height: calc(100vh - 354rpx); position: relative; z-index: 1"
|
||||||
@scrolltolower="getBottomList"
|
@scrolltolower="getBottomList"
|
||||||
|
:show-scrollbar="false"
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
style="margin-bottom: 24rpx; border-radius: 16rpx"
|
style="margin-bottom: 24rpx; border-radius: 16rpx"
|
||||||
@@ -51,14 +69,14 @@
|
|||||||
<view v-if="item.sourceUnit">{{ item.sourceUnit }}</view>
|
<view v-if="item.sourceUnit">{{ item.sourceUnit }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom-line">
|
<view class="bottom-line">
|
||||||
<view
|
<view>
|
||||||
><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons
|
<uni-icons color="#A2A2A2" type="info" :size="uniIconSize"></uni-icons>
|
||||||
>发文日期:{{ item.publishTime }}</view
|
发文日期:{{ item.publishTime }}
|
||||||
>
|
</view>
|
||||||
<view
|
<view>
|
||||||
><uni-icons color="#A2A2A2" type="eye" size="12"></uni-icons
|
<uni-icons color="#A2A2A2" type="eye" :size="uniIconSize"></uni-icons>
|
||||||
>浏览量:{{ item.viewNum || 0 }}</view
|
浏览量:{{ item.viewNum || 0 }}
|
||||||
>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding-bottom: 24rpx">
|
<view style="padding-bottom: 24rpx">
|
||||||
@@ -67,11 +85,8 @@
|
|||||||
src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/empty.png"
|
src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/empty.png"
|
||||||
style="width: 100%; display: block; margin: 0 auto"
|
style="width: 100%; display: block; margin: 0 auto"
|
||||||
/>
|
/>
|
||||||
<view v-if="loading"
|
<view v-if="loading">
|
||||||
><u-loading-icon></u-loading-icon>
|
<uni-load-more status="loading" :content-text="{contentrefresh: '加载中~'}"></uni-load-more>
|
||||||
<view style="text-align: center; color: #8e8e8e; font-size: 24rpx"
|
|
||||||
>加载中~</view
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-else-if="showMorePage"
|
v-else-if="showMorePage"
|
||||||
@@ -91,12 +106,15 @@
|
|||||||
<script>
|
<script>
|
||||||
import PopupList from "/packageRc/components/PopupLists.vue";
|
import PopupList from "/packageRc/components/PopupLists.vue";
|
||||||
import { getPolicyList } from "@/packageRc/apiRc/policy";
|
import { getPolicyList } from "@/packageRc/apiRc/policy";
|
||||||
|
import { getDicts } from "@/packageRc/apiRc/system/dict";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
PopupList,
|
PopupList,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
uniIconSize: 18,
|
||||||
|
isH5: false,
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -105,15 +123,126 @@ export default {
|
|||||||
showMorePage: true,
|
showMorePage: true,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
checkData: [],
|
||||||
|
zctopShow: false,
|
||||||
|
policyTypeMList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
// #ifdef H5
|
||||||
|
this.uniIconSize = 20;
|
||||||
|
this.isH5 = true;
|
||||||
|
// #endif
|
||||||
this.queryParams.zclx = options.zclx;
|
this.queryParams.zclx = options.zclx;
|
||||||
|
this.getCheckData();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.search();
|
this.search();
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
"checkData": {
|
||||||
|
handler(newVal) {
|
||||||
|
if (!newVal || newVal.length < 3 || !this.policyTypeMList.length) return;
|
||||||
|
const typeL = newVal[0].data[newVal[0].activeIndex].dictValue;
|
||||||
|
|
||||||
|
// 政策类型不选时,不显示二级分类
|
||||||
|
const isHidden = !typeL;
|
||||||
|
if (newVal[1].hidden !== isHidden) {
|
||||||
|
this.$set(newVal[1], "hidden", isHidden);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 政策类型不选时,确保二级分类已选索引重置为0(全部)
|
||||||
|
if (isHidden && newVal[1].activeIndex !== 0) {
|
||||||
|
this.$set(newVal[1], "activeIndex", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
let filtered = [];
|
||||||
|
if (typeL) {
|
||||||
|
filtered = this.policyTypeMList.filter((item) =>
|
||||||
|
item.dictValue.startsWith(typeL)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
filtered = this.policyTypeMList;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only update if data changed to avoid infinite loop
|
||||||
|
const newData = [{ dictLabel: "全部", dictValue: "" }].concat(filtered);
|
||||||
|
if (JSON.stringify(newVal[1].data) !== JSON.stringify(newData)) {
|
||||||
|
this.$set(newVal[1], "data", newData);
|
||||||
|
this.$set(newVal[1], "activeIndex", 0);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async getCheckData() {
|
||||||
|
const resLevel = await getDicts("zc_level");
|
||||||
|
const resType1 = await getDicts("policy_type1");
|
||||||
|
const resType2 = await getDicts("policy_type2");
|
||||||
|
this.policyTypeMList = resType2.data;
|
||||||
|
|
||||||
|
const type1Data = [{ dictLabel: "全部", dictValue: "" }].concat(
|
||||||
|
resType1.data || []
|
||||||
|
);
|
||||||
|
// policyTypeL 与 zclx 不相关,不再使用 zclx 初始化
|
||||||
|
const initialTypeLIndex = type1Data.findIndex(
|
||||||
|
(item) => item.dictValue == this.queryParams.policyTypeL
|
||||||
|
);
|
||||||
|
|
||||||
|
this.checkData = [
|
||||||
|
{
|
||||||
|
name: "政策类型",
|
||||||
|
type: "policyTypeL",
|
||||||
|
data: type1Data,
|
||||||
|
activeIndex: initialTypeLIndex > -1 ? initialTypeLIndex : 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "二级分类",
|
||||||
|
type: "policyTypeM",
|
||||||
|
data: [{ dictLabel: "全部", dictValue: "" }].concat(resType2.data || []),
|
||||||
|
activeIndex: 0,
|
||||||
|
hidden: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "政策级别",
|
||||||
|
type: "zcLevel",
|
||||||
|
data: [{ dictLabel: "全部", dictValue: "" }].concat(resLevel.data || []),
|
||||||
|
activeIndex: 0,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
|
popupSearch(data) {
|
||||||
|
// 获取此次提交前,旧的政策类型值
|
||||||
|
const oldTypeL = this.queryParams.policyTypeL || "";
|
||||||
|
|
||||||
|
// 获取弹窗提交的实时选值
|
||||||
|
const selections = {};
|
||||||
|
data.forEach((item) => {
|
||||||
|
const active = item.data[item.activeIndex];
|
||||||
|
selections[item.type] = active.dictLabel === "全部" ? "" : active.dictValue;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 核心判定逻辑:
|
||||||
|
// 如果发现“政策类型(policyTypeL)”发生了变化
|
||||||
|
if (selections.policyTypeL !== oldTypeL) {
|
||||||
|
// 如果改变成了具体的分类,且二级分类传过来的不是该分类下的子类(说明是残留选项没来得及重置)
|
||||||
|
// 或者是变回了“全部”
|
||||||
|
// 那么必须强制清空二级分类
|
||||||
|
if (!selections.policyTypeL || (selections.policyTypeM && !selections.policyTypeM.startsWith(selections.policyTypeL))) {
|
||||||
|
selections.policyTypeM = "";
|
||||||
|
const typeMItem = data.find((it) => it.type === "policyTypeM");
|
||||||
|
if (typeMItem) typeMItem.activeIndex = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将最终确定的值同步到查询参数中
|
||||||
|
Object.keys(selections).forEach((key) => {
|
||||||
|
this.$set(this.queryParams, key, selections[key]);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.search();
|
||||||
|
},
|
||||||
goPolicyDetail(item) {
|
goPolicyDetail(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/packageRc/pages/policy/policyDetail?id=${item.id}`,
|
url: `/packageRc/pages/policy/policyDetail?id=${item.id}`,
|
||||||
@@ -162,8 +291,16 @@ export default {
|
|||||||
this.total = res.total;
|
this.total = res.total;
|
||||||
} else {
|
} else {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
|
// 接口返回非 200 或失败时展示测试数据 (条件编译)
|
||||||
|
this.tableData = [
|
||||||
|
{ id: '1', zcmc: '测试政策001:关于进一步支持人才发展的若干措施(条件编译测试数据)', publishTime: '2026-03-10', viewNum: 888, zcLevel: '省级', sourceUnit: '模拟测试部' },
|
||||||
|
{ id: '2', zcmc: '测试政策002:高校毕业生创业补贴申请指南(条件编译测试数据)', publishTime: '2026-03-10', viewNum: 666, zcLevel: '市级', sourceUnit: '人力资源局' }
|
||||||
|
];
|
||||||
|
this.total = 2;
|
||||||
|
// #endif
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg || '获取列表失败',
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -173,6 +310,14 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
/* 隐藏滚动条 */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
width: 0 !important;
|
||||||
|
height: 0 !important;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
.page {
|
.page {
|
||||||
background-color: #f4f4f4 !important;
|
background-color: #f4f4f4 !important;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
@@ -191,7 +336,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 110;
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
|
|
||||||
.search-icon {
|
.search-icon {
|
||||||
@@ -520,4 +665,69 @@ export default {
|
|||||||
margin-top: 12rpx;
|
margin-top: 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* #ifdef H5 */
|
||||||
|
.h5-pc-page {
|
||||||
|
width: 100% !important;
|
||||||
|
|
||||||
|
.input-outer-part {
|
||||||
|
width: 100% !important;
|
||||||
|
margin: 0 auto !important;
|
||||||
|
padding-left: 32px !important;
|
||||||
|
padding-right: 32px !important;
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.total-count {
|
||||||
|
font-size: 20px !important;
|
||||||
|
margin: 20px 0 !important;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.policy-list {
|
||||||
|
margin-bottom: 24px !important;
|
||||||
|
padding: 32px !important;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
font-size: 24px !important;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 16px !important;
|
||||||
|
}
|
||||||
|
.infos {
|
||||||
|
margin-bottom: 16px !important;
|
||||||
|
view {
|
||||||
|
font-size: 18px !important;
|
||||||
|
line-height: 1.6 !important;
|
||||||
|
padding: 4px 12px !important;
|
||||||
|
margin-right: 12px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bottom-line {
|
||||||
|
font-size: 18px !important;
|
||||||
|
margin-top: 16px !important;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-top: 1px solid #f0f0f0;
|
||||||
|
padding-top: 16px;
|
||||||
|
}
|
||||||
|
.bottom-line uni-icons {
|
||||||
|
font-size: 20px !important;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
font-size: 20px !important;
|
||||||
|
height: 48px !important;
|
||||||
|
}
|
||||||
|
.search-line {
|
||||||
|
height: 80rpx !important;
|
||||||
|
}
|
||||||
|
.policy-list .title image {
|
||||||
|
width: 56rpx !important;
|
||||||
|
height: 56rpx !important;
|
||||||
|
margin-right: 16rpx !important;
|
||||||
|
}
|
||||||
|
.loading-text {
|
||||||
|
font-size: 20px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -478,6 +478,13 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 筛选 -->
|
<!-- 筛选 -->
|
||||||
<select-filter ref="selectFilterModel" />
|
<select-filter ref="selectFilterModel" />
|
||||||
|
<!-- 新筛选页面 -->
|
||||||
|
<new-filter-page
|
||||||
|
:show="showNewFilter"
|
||||||
|
@confirm="handleNewFilterConfirm"
|
||||||
|
@close="handleNewFilterClose"
|
||||||
|
@update:show="(value) => showNewFilter = value"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 微信授权登录弹窗 -->
|
<!-- 微信授权登录弹窗 -->
|
||||||
<WxAuthLogin ref="wxAuthLoginRef" @success="handleLoginSuccess" />
|
<WxAuthLogin ref="wxAuthLoginRef" @success="handleLoginSuccess" />
|
||||||
@@ -601,6 +608,7 @@ import useDictStore from '@/stores/useDictStore';
|
|||||||
const { getTransformChildren, oneDictData, dictLabel: getDictLabel, industryLabel } = useDictStore();
|
const { getTransformChildren, oneDictData, dictLabel: getDictLabel, industryLabel } = useDictStore();
|
||||||
import useLocationStore from '@/stores/useLocationStore';
|
import useLocationStore from '@/stores/useLocationStore';
|
||||||
import selectFilter from '@/components/selectFilter/selectFilter.vue';
|
import selectFilter from '@/components/selectFilter/selectFilter.vue';
|
||||||
|
import newFilterPage from '@/components/new-filter-page/new-filter-page.vue';
|
||||||
import { useRecommedIndexedDBStore, jobRecommender } from '@/stores/useRecommedIndexedDBStore.js';
|
import { useRecommedIndexedDBStore, jobRecommender } from '@/stores/useRecommedIndexedDBStore.js';
|
||||||
import { useScrollDirection } from '@/hook/useScrollDirection';
|
import { useScrollDirection } from '@/hook/useScrollDirection';
|
||||||
import { useColumnCount } from '@/hook/useColumnCount';
|
import { useColumnCount } from '@/hook/useColumnCount';
|
||||||
@@ -724,6 +732,7 @@ const inputText = ref('');
|
|||||||
const showFilter = ref(false);
|
const showFilter = ref(false);
|
||||||
const selectFilterModel = ref(null);
|
const selectFilterModel = ref(null);
|
||||||
const showModel = ref(false);
|
const showModel = ref(false);
|
||||||
|
const showNewFilter = ref(false);
|
||||||
// 选中的城市
|
// 选中的城市
|
||||||
const selectedCity = ref({ code: '', name: '' });
|
const selectedCity = ref({ code: '', name: '' });
|
||||||
const rangeOptions = ref([
|
const rangeOptions = ref([
|
||||||
@@ -882,14 +891,7 @@ const handleLoginSuccess = () => {
|
|||||||
getIsFourLevelLinkagePurview()
|
getIsFourLevelLinkagePurview()
|
||||||
};
|
};
|
||||||
// H5环境下从URL获取token并自动登录
|
// H5环境下从URL获取token并自动登录
|
||||||
onLoad(() => {
|
// onLoad 函数已移至下方,包含筛选参数处理
|
||||||
// #ifdef H5
|
|
||||||
const token = uni.getStorageSync('zkr-token');
|
|
||||||
if (token) {
|
|
||||||
useUserStore().loginSetToken(token);
|
|
||||||
}
|
|
||||||
// #endif
|
|
||||||
});
|
|
||||||
|
|
||||||
// 处理附近工作点击
|
// 处理附近工作点击
|
||||||
const handleNearbyClick = (options ) => {
|
const handleNearbyClick = (options ) => {
|
||||||
@@ -1088,34 +1090,65 @@ function navToService(serviceType) {
|
|||||||
|
|
||||||
function openFilter() {
|
function openFilter() {
|
||||||
isInteractingWithFilter.value = true;
|
isInteractingWithFilter.value = true;
|
||||||
showFilter.value = true;
|
showNewFilter.value = true;
|
||||||
emits('onShowTabbar', false);
|
emits('onShowTabbar', false);
|
||||||
selectFilterModel.value?.open({
|
}
|
||||||
title: '筛选',
|
|
||||||
maskClick: true,
|
function handleNewFilterConfirm(values) {
|
||||||
success: (values) => {
|
|
||||||
pageState.search = {
|
pageState.search = {
|
||||||
...pageState.search,
|
...pageState.search,
|
||||||
};
|
};
|
||||||
for (const [key, value] of Object.entries(values)) {
|
for (const [key, value] of Object.entries(values)) {
|
||||||
// 特殊处理岗位类型,直接传递数字值
|
// 特殊处理岗位类型,直接传递数字值
|
||||||
if (key === 'jobType') {
|
if (key === 'jobType') {
|
||||||
pageState.search.type = value.join(',');
|
pageState.search.type = value;
|
||||||
|
} else if (value) {
|
||||||
|
pageState.search[key] = value;
|
||||||
} else {
|
} else {
|
||||||
pageState.search[key] = value.join(',');
|
// 如果值为空,删除该搜索条件
|
||||||
|
delete pageState.search[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
showFilter.value = false;
|
showNewFilter.value = false;
|
||||||
getJobList('refresh');
|
getJobList('refresh');
|
||||||
// 短暂延迟后解除交互锁,避免数据刷新导致顶部区域回弹
|
// 短暂延迟后解除交互锁,避免数据刷新导致顶部区域回弹
|
||||||
setTimeout(() => { isInteractingWithFilter.value = false; }, 400);
|
setTimeout(() => { isInteractingWithFilter.value = false; }, 400);
|
||||||
},
|
emits('onShowTabbar', true);
|
||||||
cancel: () => {
|
}
|
||||||
showFilter.value = false;
|
|
||||||
|
// 监听页面加载,接收筛选参数
|
||||||
|
onLoad((options) => {
|
||||||
|
// #ifdef H5
|
||||||
|
const token = uni.getStorageSync('zkr-token');
|
||||||
|
if (token) {
|
||||||
|
useUserStore().loginSetToken(token);
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// 接收从筛选页面传递过来的参数
|
||||||
|
if (options.filterParams) {
|
||||||
|
try {
|
||||||
|
const filterParams = JSON.parse(options.filterParams);
|
||||||
|
console.log('filterParams:', filterParams);
|
||||||
|
for (const [key, value] of Object.entries(filterParams)) {
|
||||||
|
if (key === 'jobType') {
|
||||||
|
pageState.search.type = value;
|
||||||
|
} else if (value) {
|
||||||
|
pageState.search[key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('pageState.search:', pageState.search);
|
||||||
|
getJobList('refresh');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('解析筛选参数失败:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function handleNewFilterClose() {
|
||||||
|
showNewFilter.value = false;
|
||||||
emits('onShowTabbar', true);
|
emits('onShowTabbar', true);
|
||||||
setTimeout(() => { isInteractingWithFilter.value = false; }, 200);
|
setTimeout(() => { isInteractingWithFilter.value = false; }, 200);
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleFilterConfirm(e) {
|
function handleFilterConfirm(e) {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -176,11 +176,16 @@ export function uploadFile(tempFilePaths, loading = false) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function myRequest(url, data = {}, method = 'GET', port = 9100, headers = {}, loading = false) {
|
export function myRequest(url, data = {}, method = 'GET', port = 9100, headers = {}, loading = false,urlType='') {
|
||||||
let LCBaseUrl = config.LCBaseUrl
|
let LCBaseUrl = config.LCBaseUrl
|
||||||
if (port != 9100) {
|
if (port != 9100) {
|
||||||
LCBaseUrl = config.LCBaseUrlInner
|
LCBaseUrl = config.LCBaseUrlInner
|
||||||
}
|
}
|
||||||
|
if(urlType=='jobRecommend'){
|
||||||
|
LCBaseUrl=config.jobRecommendUrl
|
||||||
|
}else if(urlType=='policyRecommend'){
|
||||||
|
LCBaseUrl=config.policyRecommendUrl
|
||||||
|
}
|
||||||
const header = headers || {};
|
const header = headers || {};
|
||||||
// 上下文
|
// 上下文
|
||||||
// /jobfair-api/jobfair/public 招聘会
|
// /jobfair-api/jobfair/public 招聘会
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ let exports = {
|
|||||||
// ========== baseUrl 配置方式选择 ==========
|
// ========== baseUrl 配置方式选择 ==========
|
||||||
// 方式1:硬编码baseUrl(main分支使用,合并到main时不会影响现有功能)
|
// 方式1:硬编码baseUrl(main分支使用,合并到main时不会影响现有功能)
|
||||||
baseUrl: 'https://www.xjksly.cn/sdrc-api', // 正式环境在济南人才上部署(不要轻易连接)
|
baseUrl: 'https://www.xjksly.cn/sdrc-api', // 正式环境在济南人才上部署(不要轻易连接)
|
||||||
|
// baseUrl: 'http://cffe7966.natappfree.cc', // 正式环境在济南人才上部署(不要轻易连接)
|
||||||
// baseUrl: 'http://10.160.0.5:8907', // 开发环境
|
// baseUrl: 'http://10.160.0.5:8907', // 开发环境
|
||||||
// baseUrl: 'http://172.20.1.48:8903', // 开发环境
|
// baseUrl: 'http://172.20.1.48:8903', // 开发环境
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user