Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service
This commit is contained in:
@@ -102,7 +102,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 公司信息 -->
|
||||
<view class="content-card">
|
||||
<view class="content-card" v-if="jobInfo.companyId">
|
||||
<view class="card-title">
|
||||
<text class="title">公司信息</text>
|
||||
<text
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
class="popupList"
|
||||
v-for="(item, index) in newCkeckData"
|
||||
:key="index"
|
||||
v-show="!item.hidden"
|
||||
>
|
||||
<view class="tabTitle">
|
||||
{{ item.name }}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
-->
|
||||
<template>
|
||||
<!-- @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 h5-pc-container" :show-scrollbar="false" style="background-image: url(../../../packageRc/static/pageBgIndex.png);">
|
||||
<view style="padding: 40rpx 28rpx;">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="kinggang">
|
||||
@@ -133,6 +133,8 @@ onMounted(()=>{
|
||||
getPolicy();
|
||||
})
|
||||
|
||||
|
||||
|
||||
function goCa(){
|
||||
if (checkLogin()) {
|
||||
const userInfo = uni.getStorageSync('userInfo')
|
||||
@@ -240,6 +242,14 @@ function nextDetail(job) {
|
||||
</script>
|
||||
|
||||
<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;}
|
||||
.container{
|
||||
background-color: #F4F4F4;background-position: top center;background-size: 100% auto;
|
||||
@@ -414,4 +424,70 @@ view{box-sizing: border-box;display: block;}
|
||||
transform: translateX(50%);
|
||||
}
|
||||
}
|
||||
|
||||
/* #ifdef H5 */
|
||||
.h5-pc-container {
|
||||
& > view {
|
||||
width: 80% !important;
|
||||
margin: 0 auto !important;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.showtab {
|
||||
margin-bottom: 80rpx;
|
||||
height: 300rpx;
|
||||
.tabItem {
|
||||
height: 300rpx !important;
|
||||
image:first-child {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabs {
|
||||
margin-bottom: 80rpx;
|
||||
height: 120rpx;
|
||||
.tab {
|
||||
line-height: 112rpx !important;
|
||||
font-size: 38rpx !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.titles {
|
||||
margin-bottom: 80rpx;
|
||||
.title-item {
|
||||
font-size: 42rpx !important;
|
||||
margin-right: 80rpx !important;
|
||||
>view {
|
||||
padding: 0 24rpx !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.job-list {
|
||||
padding: 48rpx !important;
|
||||
margin-bottom: 40rpx !important;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 42rpx !important;
|
||||
}
|
||||
.infos view {
|
||||
font-size: 34rpx !important;
|
||||
line-height: 56rpx !important;
|
||||
padding: 8rpx 24rpx !important;
|
||||
}
|
||||
.salary {
|
||||
font-size: 40rpx !important;
|
||||
}
|
||||
.bottom-line {
|
||||
font-size: 32rpx !important;
|
||||
margin-top: 24rpx !important;
|
||||
}
|
||||
}
|
||||
/* #endif */
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="page" style="background-image: url(../../../packageRc/static/pageBg.png);">
|
||||
<scroll-view :scroll-y="true" style="height: 100vh;position: relative;z-index: 1;">
|
||||
<view class="page h5-pc-page" style="background-image: url(../../../packageRc/static/pageBg.png);">
|
||||
<scroll-view :scroll-y="true" style="height: 100vh;position: relative;z-index: 1;" :show-scrollbar="false">
|
||||
<view class="input-outer-part"
|
||||
style="padding: 24rpx 32rpx 0;max-height: unset;">
|
||||
<view class="basic-info-content-main" v-if="!loading">
|
||||
@@ -31,8 +31,8 @@
|
||||
class="main-ceontent-list-item"
|
||||
v-if="policyDetail.applicableObjects"
|
||||
>
|
||||
<view class="main-ceontent-list-item-title">政策对象</view>
|
||||
<view class="main-ceontent-list-item-content">
|
||||
<view :class="['main-ceontent-list-item-title', isPc ? 'pc-main-ceontent-list-item-title' : '']">政策对象</view>
|
||||
<view :class="['main-ceontent-list-item-content', isPc ? 'pc-main-ceontent-list-item-content' : '']">
|
||||
<span
|
||||
v-if="policyDetail.applicableObjects"
|
||||
v-html="policyDetail.applicableObjects"
|
||||
@@ -113,6 +113,23 @@ import { getPolicyDetail } from "@/packageRc/apiRc/policy";
|
||||
getPolicy(id) {
|
||||
getPolicyDetail({id}).then(res => {
|
||||
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) {
|
||||
@@ -130,6 +147,14 @@ import { getPolicyDetail } from "@/packageRc/apiRc/policy";
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 隐藏滚动条 */
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
-webkit-appearance: none;
|
||||
background: transparent;
|
||||
}
|
||||
.page {
|
||||
background-color: #f4f4f4 !important;
|
||||
height: 100vh;
|
||||
@@ -323,4 +348,41 @@ 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: 52rpx !important;
|
||||
line-height: 1.4 !important;
|
||||
}
|
||||
.infos {
|
||||
font-size: 38rpx !important;
|
||||
line-height: 1.8 !important;
|
||||
.info {
|
||||
margin-top: 10rpx !important;
|
||||
}
|
||||
}
|
||||
.main-ceontent-list-item-title {
|
||||
font-size: 42rpx !important;
|
||||
line-height: 60rpx !important;
|
||||
margin-bottom: 24rpx !important;
|
||||
}
|
||||
.main-ceontent-list-item-content {
|
||||
font-size: 38rpx !important;
|
||||
line-height: 56rpx !important;
|
||||
padding: 24rpx !important;
|
||||
}
|
||||
.tag {
|
||||
font-size: 34rpx !important;
|
||||
}
|
||||
}
|
||||
/* #endif */
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view
|
||||
class="page"
|
||||
class="page h5-pc-page"
|
||||
style="
|
||||
background-image: url(../../../packageRc/static/pageBg.png);
|
||||
"
|
||||
@@ -22,6 +22,23 @@
|
||||
@click="search()"
|
||||
/>
|
||||
</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
|
||||
v-if="total"
|
||||
style="position: relative; padding: 32rpx 0; color: #000"
|
||||
@@ -32,8 +49,9 @@
|
||||
<!-- <scroll-view :scroll-y="true" style="height: calc(100vh - 342rpx);position: relative;z-index: 1;" -->
|
||||
<scroll-view
|
||||
: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"
|
||||
:show-scrollbar="false"
|
||||
>
|
||||
<view
|
||||
style="margin-bottom: 24rpx; border-radius: 16rpx"
|
||||
@@ -91,6 +109,7 @@
|
||||
<script>
|
||||
import PopupList from "/packageRc/components/PopupLists.vue";
|
||||
import { getPolicyList } from "@/packageRc/apiRc/policy";
|
||||
import { getDicts } from "@/packageRc/apiRc/system/dict";
|
||||
export default {
|
||||
components: {
|
||||
PopupList,
|
||||
@@ -105,15 +124,122 @@ export default {
|
||||
showMorePage: true,
|
||||
tableData: [],
|
||||
loading: false,
|
||||
checkData: [],
|
||||
zctopShow: false,
|
||||
policyTypeMList: [],
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.queryParams.zclx = options.zclx;
|
||||
this.getCheckData();
|
||||
},
|
||||
onShow() {
|
||||
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: {
|
||||
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) {
|
||||
uni.navigateTo({
|
||||
url: `/packageRc/pages/policy/policyDetail?id=${item.id}`,
|
||||
@@ -162,8 +288,16 @@ export default {
|
||||
this.total = res.total;
|
||||
} else {
|
||||
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({
|
||||
title: res.msg,
|
||||
title: res.msg || '获取列表失败',
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
@@ -173,6 +307,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 隐藏滚动条 */
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
-webkit-appearance: none;
|
||||
background: transparent;
|
||||
}
|
||||
.page {
|
||||
background-color: #f4f4f4 !important;
|
||||
height: 100vh;
|
||||
@@ -191,7 +333,7 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
z-index: 110;
|
||||
margin-top: 24rpx;
|
||||
|
||||
.search-icon {
|
||||
@@ -520,4 +662,32 @@ export default {
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* #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 {
|
||||
font-size: 48rpx !important;
|
||||
margin-bottom: 24rpx !important;
|
||||
}
|
||||
.infos view {
|
||||
font-size: 36rpx !important;
|
||||
line-height: 56rpx !important;
|
||||
}
|
||||
.bottom-line {
|
||||
font-size: 34rpx !important;
|
||||
margin-top: 24rpx !important;
|
||||
}
|
||||
input {
|
||||
font-size: 36rpx !important;
|
||||
}
|
||||
}
|
||||
/* #endif */
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user