Compare commits
17 Commits
yxl
...
ebd0f439b8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebd0f439b8 | ||
|
|
634e097c3f | ||
|
|
b84fa36e20 | ||
|
|
4261ecafbc | ||
|
|
60435d0e2b | ||
| f85f4873a8 | |||
|
|
7f0a11be84 | ||
|
|
c1f7d510d7 | ||
|
|
ece3897927 | ||
|
|
70ef370b1d | ||
|
|
2a5d15b770 | ||
|
|
5f85f6cd2a | ||
|
|
58a113b34d | ||
|
|
bfdc358c24 | ||
|
|
78a61ef42a | ||
|
|
ed7ef9acfe | ||
|
|
030183ceb6 |
@@ -4,14 +4,17 @@
|
||||
class="tabbar-item"
|
||||
v-for="(item, index) in tabbarList"
|
||||
:key="index"
|
||||
:class="{ 'center-item': item.centerItem }"
|
||||
@click.stop="switchTab(item, index)"
|
||||
@tap.stop="switchTab(item, index)"
|
||||
>
|
||||
<view class="tabbar-icon">
|
||||
<image
|
||||
:src="currentItem === item.id ? item.selectedIconPath : item.iconPath"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<view class="icon-container">
|
||||
<image
|
||||
:src="currentItem === item.id ? item.selectedIconPath : item.iconPath"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="badge" v-if="item.badge && item.badge > 0">{{ item.badge }}</view>
|
||||
<view class="tabbar-text" :class="{ 'active': currentItem === item.id }">
|
||||
@@ -59,22 +62,13 @@ const generateTabbarList = () => {
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
text: '智能客服',
|
||||
path: '/pages/chat/chat',
|
||||
iconPath: '/static/tabbar/logo3.png',
|
||||
selectedIconPath: '/static/tabbar/logo3.png',
|
||||
text: '',
|
||||
path: '/packageA/pages/chat/chat',
|
||||
iconPath: '/static/tabbar/robot2.png',
|
||||
selectedIconPath: '/static/tabbar/robot2.png',
|
||||
centerItem: true,
|
||||
badge: readMsg.badges[2]?.count || 0,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: '消息',
|
||||
path: '/pages/msglog/msglog',
|
||||
iconPath: '/static/tabbar/chat4.png',
|
||||
selectedIconPath: '/static/tabbar/chat4ed.png',
|
||||
centerItem: false,
|
||||
badge: readMsg.badges[3]?.count || 0,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
text: '我的',
|
||||
@@ -126,7 +120,8 @@ const generateTabbarList = () => {
|
||||
// #endif
|
||||
}
|
||||
if (userType === 0) {
|
||||
baseItems.splice(2, 0, {
|
||||
// 企业用户:将招聘会添加到第1个位置,AI图标保持在中间
|
||||
baseItems.splice(1, 0, {
|
||||
id: 5,
|
||||
text: '招聘会',
|
||||
path: '/pages/careerfair/careerfair',
|
||||
@@ -135,6 +130,14 @@ const generateTabbarList = () => {
|
||||
centerItem: false,
|
||||
badge: 0,
|
||||
});
|
||||
// 调整AI图标的位置到中间(索引2)
|
||||
const aiItem = baseItems.find(item => item.id === 2);
|
||||
if (aiItem) {
|
||||
// 移除AI图标
|
||||
baseItems.splice(baseItems.indexOf(aiItem), 1);
|
||||
// 将AI图标插入到中间位置
|
||||
baseItems.splice(2, 0, aiItem);
|
||||
}
|
||||
}
|
||||
return baseItems;
|
||||
};
|
||||
@@ -200,12 +203,12 @@ const switchTab = (item, index) => {
|
||||
// 判断企业信息字段company是否为null或undefined
|
||||
if (!currentUserInfo.company || currentUserInfo.company === null) {
|
||||
// 企业信息为空,跳转到企业信息补全页面
|
||||
uni.navigateTo({
|
||||
uni.redirectTo({
|
||||
url: '/packageA/pages/complete-info/company-info',
|
||||
});
|
||||
} else {
|
||||
// 企业信息完整,跳转到发布岗位页面
|
||||
uni.navigateTo({
|
||||
uni.redirectTo({
|
||||
url: '/packageA/pages/job/publishJob',
|
||||
});
|
||||
}
|
||||
@@ -234,7 +237,7 @@ const switchTab = (item, index) => {
|
||||
}
|
||||
|
||||
// 跳转到对应的页面
|
||||
uni.navigateTo({
|
||||
uni.redirectTo({
|
||||
url: targetPath,
|
||||
});
|
||||
|
||||
@@ -243,26 +246,10 @@ const switchTab = (item, index) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 判断是否为 tabBar 页面
|
||||
const tabBarPages = [
|
||||
'/pages/index/index',
|
||||
'/pages/careerfair/careerfair',
|
||||
'/pages/chat/chat',
|
||||
'/pages/msglog/msglog',
|
||||
'/pages/mine/mine'
|
||||
];
|
||||
|
||||
if (tabBarPages.includes(item.path)) {
|
||||
// TabBar 页面使用 redirectTo 避免页面栈溢出
|
||||
uni.redirectTo({
|
||||
url: item.path,
|
||||
});
|
||||
} else {
|
||||
// 非 TabBar 页面使用 navigateTo
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
});
|
||||
}
|
||||
// 所有页面都使用 redirectTo 避免页面栈溢出
|
||||
uni.redirectTo({
|
||||
url: item.path,
|
||||
});
|
||||
|
||||
currentItem.value = item.id;
|
||||
};
|
||||
@@ -275,6 +262,34 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 动画定义 */
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
transform: scale(1.6);
|
||||
box-shadow: 0 0 10rpx #256BFA;
|
||||
border-color: #256BFA;
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.7);
|
||||
box-shadow: 0 0 20rpx #256BFA, 0 0 30rpx rgba(37, 107, 250, 0.5);
|
||||
border-color: #4A89FF;
|
||||
}
|
||||
100% {
|
||||
transform: scale(1.6);
|
||||
box-shadow: 0 0 10rpx #256BFA;
|
||||
border-color: #256BFA;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes bounce {
|
||||
0%, 100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-tabbar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
@@ -282,7 +297,7 @@ onMounted(() => {
|
||||
right: 0;
|
||||
height: 100rpx;
|
||||
background-color: #ffffff;
|
||||
border-top: 1rpx solid #e5e5e5;
|
||||
// border-top: 1rpx solid #e5e5e5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
@@ -304,6 +319,10 @@ onMounted(() => {
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
.icon-container{
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.tabbar-icon {
|
||||
@@ -346,11 +365,29 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
/* 中间按钮特殊样式 */
|
||||
.tabbar-item:has(.center-item) {
|
||||
.tabbar-item.center-item {
|
||||
|
||||
.tabbar-icon {
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.tabbar-icon image {
|
||||
// margin-top: -25rpx;
|
||||
width: 80%;
|
||||
animation: bounce 2s ease-in-out infinite;
|
||||
}
|
||||
.icon-container{
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #256BFA;
|
||||
box-shadow: 0 0 10rpx #256BFA;
|
||||
transform: scale(1.6);
|
||||
position: relative;
|
||||
top: 5rpx;
|
||||
animation: pulse 2s ease-in-out infinite;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -76,7 +76,7 @@ const generateTabbarList = () => {
|
||||
{
|
||||
id: 2,
|
||||
text: 'AI+',
|
||||
path: '/pages/chat/chat',
|
||||
path: '/packageA/pages/chat/chat',
|
||||
iconPath: '../../static/tabbar/logo3.png',
|
||||
selectedIconPath: '../../static/tabbar/logo3.png',
|
||||
centerItem: true,
|
||||
@@ -148,7 +148,7 @@ const changeItem = (item) => {
|
||||
const tabBarPages = [
|
||||
'/pages/index/index',
|
||||
'/pages/careerfair/careerfair',
|
||||
'/pages/chat/chat',
|
||||
'/packageA/pages/chat/chat',
|
||||
'/pages/msglog/msglog',
|
||||
'/pages/mine/mine'
|
||||
];
|
||||
|
||||
@@ -103,12 +103,19 @@
|
||||
</view>
|
||||
|
||||
<!-- 用户协议 -->
|
||||
<!-- <view class="auth-agreement">
|
||||
<text>登录即表示同意</text>
|
||||
<text class="link" @click="openAgreement('user')">《用户协议》</text>
|
||||
<text>和</text>
|
||||
<text class="link" @click="openAgreement('privacy')">《隐私政策》</text>
|
||||
</view> -->
|
||||
<view class="auth-agreement">
|
||||
<view class="agreement-checkbox" @click="toggleAgreement">
|
||||
<uni-icons
|
||||
:type="agreedToAgreement ? 'checkbox-filled' : 'circle'"
|
||||
size="20"
|
||||
:color="agreedToAgreement ? '#256BFA' : '#999'"
|
||||
></uni-icons>
|
||||
<text class="agreement-text">我已阅读并同意</text>
|
||||
</view>
|
||||
<text class="link" @click="openAgreement('user')">《隐私协议》</text>
|
||||
<!-- <text>和</text>
|
||||
<text class="link" @click="openAgreement('privacy')">《隐私政策》</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
@@ -128,6 +135,7 @@ const popup = ref(null);
|
||||
const userType = ref(null); // 用户角色:1-求职者,0-企业
|
||||
const orgType = ref(null); // 机构类型
|
||||
const orgTypeOptions = ref([]); // 机构类型选项
|
||||
const agreedToAgreement = ref(false); // 是否同意用户协议
|
||||
const emit = defineEmits(['success', 'cancel']);
|
||||
|
||||
// 获取机构类型字典
|
||||
@@ -159,6 +167,10 @@ const open = () => {
|
||||
popup.value?.open();
|
||||
userType.value = null; // 重置角色选择
|
||||
orgType.value = null; // 重置机构类型选择
|
||||
|
||||
// 检查是否已同意协议
|
||||
const agreed = uni.getStorageSync('agreedToUserAgreement');
|
||||
agreedToAgreement.value = !!agreed;
|
||||
};
|
||||
|
||||
// 关闭弹窗
|
||||
@@ -191,26 +203,25 @@ const validateRole = () => {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 验证是否同意用户协议
|
||||
if (!agreedToAgreement.value) {
|
||||
$api.msg('请先阅读并同意隐私协议');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
const getPhoneNumber = (e) => {
|
||||
console.log('获取手机号:', e);
|
||||
console.log('userType.value', userType.value)
|
||||
// 验证角色是否已选择
|
||||
|
||||
// 验证角色、机构类型和隐私协议
|
||||
if (!validateRole()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
||||
if (userType.value === null) {
|
||||
$api.msg('请先选择您的角色');
|
||||
return true;
|
||||
}
|
||||
|
||||
// 验证机构类型是否已选择(仅单位角色)
|
||||
if (userType.value === 0 && orgType.value === null) {
|
||||
$api.msg('请选择机构类型');
|
||||
return true;
|
||||
}
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (loginRes) => {
|
||||
@@ -363,6 +374,11 @@ const wxLogin = () => {
|
||||
|
||||
// 测试账号登录(仅开发环境)
|
||||
const testLogin = () => {
|
||||
// 验证角色、机构类型和隐私协议
|
||||
if (!validateRole()) {
|
||||
return;
|
||||
}
|
||||
|
||||
uni.showLoading({ title: '登录中...' });
|
||||
|
||||
const params = {
|
||||
@@ -409,18 +425,21 @@ const testLogin = () => {
|
||||
});
|
||||
};
|
||||
|
||||
// 切换协议同意状态
|
||||
const toggleAgreement = () => {
|
||||
agreedToAgreement.value = !agreedToAgreement.value;
|
||||
};
|
||||
|
||||
// 打开用户协议
|
||||
const openAgreement = (type) => {
|
||||
const urls = {
|
||||
user: '/pages/agreement/user',
|
||||
privacy: '/pages/agreement/privacy'
|
||||
user: '/packageA/pages/agreement/user',
|
||||
privacy: '/packageA/pages/agreement/privacy'
|
||||
};
|
||||
|
||||
if (urls[type]) {
|
||||
uni.navigateTo({
|
||||
url: urls[type]
|
||||
});
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: urls[type]
|
||||
});
|
||||
};
|
||||
|
||||
// 暴露方法供父组件调用
|
||||
@@ -596,10 +615,23 @@ defineExpose({
|
||||
margin-left: 12rpx
|
||||
|
||||
.auth-agreement
|
||||
text-align: center
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
font-size: 24rpx
|
||||
color: #999999
|
||||
line-height: 1.6
|
||||
flex-wrap: wrap
|
||||
gap: 8rpx
|
||||
|
||||
.agreement-checkbox
|
||||
display: flex
|
||||
align-items: center
|
||||
cursor: pointer
|
||||
|
||||
.agreement-text
|
||||
margin-left: 8rpx
|
||||
color: #666666
|
||||
|
||||
.link
|
||||
color: #256BFA
|
||||
|
||||
@@ -3,5 +3,8 @@
|
||||
"@dcloudio/uni-ui": "^1.5.11",
|
||||
"dayjs": "^1.11.19",
|
||||
"sm-crypto": "^0.3.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"crypto-js": "^4.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
<template>
|
||||
<AppLayout title="" :use-scroll-view="false">
|
||||
<AppLayout title="单位详情" :use-scroll-view="false">
|
||||
<template #headerleft>
|
||||
<view class="btnback">
|
||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
||||
</view>
|
||||
</template>
|
||||
<template #headerright>
|
||||
<view class="btn mar_ri10">
|
||||
<image src="@/static/icon/collect3.png" v-if="!companyInfo?.isCollection"></image>
|
||||
<image src="@/static/icon/collect2.png" v-else></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="content">
|
||||
<view class="content-top">
|
||||
<view class="companyinfo-left">
|
||||
@@ -22,6 +17,10 @@
|
||||
{{ getScaleLabel(companyInfo?.scale) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="companyinfo-collect" @click="toggleCollection">
|
||||
<image src="@/static/icon/collect3.png" v-if="!companyInfo?.isCollection"></image>
|
||||
<image src="@/static/icon/collect2.png" v-else></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="conetent-info" :class="{ expanded: isExpanded }">
|
||||
<view class="info-title">公司介绍</view>
|
||||
@@ -372,6 +371,37 @@
|
||||
navTo(`/packageA/pages/post/post?jobId=${encodeURIComponent(jobId)}`);
|
||||
}
|
||||
}
|
||||
|
||||
// 收藏和取消收藏企业
|
||||
function toggleCollection() {
|
||||
const companyId = companyInfo.value.id || companyInfo.value.companyId;
|
||||
if (!companyId) {
|
||||
$api.msg('获取公司信息失败,无法操作');
|
||||
return;
|
||||
}
|
||||
|
||||
const isCollection = companyInfo.value.isCollection;
|
||||
const method = isCollection ? 'DELETE' : 'POST';
|
||||
const apiUrl = `/app/company/collection/${companyId}`;
|
||||
|
||||
uni.showLoading({
|
||||
title: '操作中'
|
||||
});
|
||||
|
||||
$api.createRequest(apiUrl, {}, method).then((resData) => {
|
||||
uni.hideLoading();
|
||||
if (resData && resData.code === 200) {
|
||||
companyInfo.value.isCollection = !isCollection;
|
||||
$api.msg(isCollection ? '取消收藏成功' : '收藏成功');
|
||||
} else {
|
||||
$api.msg((resData && resData.msg) || (isCollection ? '取消收藏失败' : '收藏失败'));
|
||||
}
|
||||
}).catch((error) => {
|
||||
uni.hideLoading();
|
||||
console.error('API error when toggling collection:', error);
|
||||
$api.msg('网络请求失败,请检查网络连接');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@@ -399,33 +429,47 @@
|
||||
flex-direction: column;
|
||||
|
||||
.content-top {
|
||||
padding: 28rpx;
|
||||
padding-top: 50rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
padding: 28rpx;
|
||||
padding-top: 50rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
|
||||
.companyinfo-left {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.companyinfo-right {
|
||||
.row1 {
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
.companyinfo-left {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.row2 {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6C7282;
|
||||
line-height: 45rpx;
|
||||
.companyinfo-right {
|
||||
flex: 1;
|
||||
|
||||
.row1 {
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.row2 {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6C7282;
|
||||
line-height: 45rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.companyinfo-collect {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
margin-left: 20rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.conetent-info {
|
||||
padding: 0 28rpx;
|
||||
|
||||
248
packageA/pages/agreement/privacy.vue
Normal file
248
packageA/pages/agreement/privacy.vue
Normal file
@@ -0,0 +1,248 @@
|
||||
<template>
|
||||
<view class="agreement-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<view class="nav-bar">
|
||||
<view class="nav-left" @click="goBack">
|
||||
<uni-icons type="back" size="28" color="#333"></uni-icons>
|
||||
</view>
|
||||
<view class="nav-title">隐私政策</view>
|
||||
<view class="nav-right"></view>
|
||||
</view>
|
||||
|
||||
<!-- 内容区域 -->
|
||||
<scroll-view class="content" scroll-y>
|
||||
<view class="agreement-content">
|
||||
<!-- 协议标题 -->
|
||||
<view class="agreement-title">隐私政策</view>
|
||||
|
||||
<!-- 重要提示 -->
|
||||
<view class="important-tip">
|
||||
在您注册、登录、使用本小程序服务之前,请您务必审慎阅读、充分理解本协议各条款内容,特别是以加粗形式提示您注意的、关于免除或限制责任、争议解决及法律适用的条款。一旦您以任何方式访问、使用本小程序,即表示您已同意接受本协议及我们另行发布的《隐私政策》的全部内容约束。如您不同意本协议的任何内容,请立即停止使用本小程序。
|
||||
</view>
|
||||
|
||||
<view class="important-tip">
|
||||
如果您未满18周岁,请在法定监护人的陪同下阅读和判断是否同意本协议,并特别注意未成年人使用条款。
|
||||
</view>
|
||||
|
||||
<!-- 第二部分:隐私政策 -->
|
||||
<view class="section">
|
||||
<view class="section-title">第二部分:隐私政策</view>
|
||||
|
||||
<view class="section-content">
|
||||
<view class="paragraph-text">
|
||||
我们深知个人信息对您的重要性,并致力于保护您的隐私安全。本政策将说明我们如何收集、使用、存储和共享您的个人信息。
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 一、我们如何收集和使用您的信息 -->
|
||||
<view class="section-subtitle">一、 我们如何收集和使用您的信息</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">1.1 微信授权信息:</view>
|
||||
<view class="paragraph-text">当您使用微信登录时,我们会收集您的微信头像、昵称、地区及OpenID,用于为您创建账号、识别用户身份并提供核心服务。拒绝提供该信息将使您无法使用本小程序的核心功能。</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">1.2 您主动提供的信息:</view>
|
||||
<view class="paragraph-text">根据您使用的服务类型,您可能会主动向我们提供 【例如:手机号码、收货地址、实名认证信息、发布的内容、上传的图片等】 ,我们将严格按本政策约定使用这些信息。</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">1.3 设备与日志信息:</view>
|
||||
<view class="paragraph-text">为保障运营安全与质量,我们会自动收集您的设备型号、操作系统版本、唯一设备标识符、IP地址、访问时间、在小程序内的操作行为等日志信息。</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">1.4 位置信息(如需):</view>
|
||||
<view class="paragraph-text">对于 【例如:本地服务、地图导航】 类小程序,在获得您的授权后,我们可能会收集您的精确或粗略位置信息,以提供相关服务。</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 二、我们如何使用Cookie和同类技术 -->
|
||||
<view class="section-subtitle">二、 我们如何使用Cookie和同类技术</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph-text">
|
||||
我们可能使用Cookie和本地存储来记录您的偏好、登录状态,以优化您的使用体验。您可以在微信或设备设置中清除这些数据,但这可能会导致部分服务功能无法正常使用。
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 三、我们如何共享、转让、公开披露您的信息 -->
|
||||
<view class="section-subtitle">三、 我们如何共享、转让、公开披露您的信息</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">3.1 共享:</view>
|
||||
<view class="paragraph-text">我们不会与任何公司、组织和个人共享您的个人信息,但以下情况除外:</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph-text">
|
||||
* 事先获得您的明确授权;<br>
|
||||
* 根据法律法规、司法程序或政府机关的要求;<br>
|
||||
* 为保护我们、我们的关联方或公众的财产和安全免遭损害而有必要提供。
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">3.2 转让与公开披露:</view>
|
||||
<view class="paragraph-text">我们不会将您的个人信息转让给任何公司、组织和个人,也不会公开披露您的个人信息,除非获得您的单独同意或法律法规的强制性要求。</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 四、我们如何存储和保护您的信息 -->
|
||||
<view class="section-subtitle">四、 我们如何存储和保护您的信息</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">4.1 </view>
|
||||
<view class="paragraph-text">我们在中华人民共和国境内运营,您的个人信息将存储于中国境内。我们会采取符合行业标准的安全技术和管理措施(如数据加密、访问控制)来保护您的信息,防止其被未经授权的访问、使用或泄露。</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">4.2 </view>
|
||||
<view class="paragraph-text">我们仅会在达成本政策所述目的所需的期限内保留您的个人信息,除非法律有强制的留存要求。</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 五、您的权利 -->
|
||||
<view class="section-subtitle">五、 您的权利</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph-text">
|
||||
您有权:
|
||||
</view>
|
||||
|
||||
<view class="paragraph-text">
|
||||
访问、更正、删除您的个人信息;<br>
|
||||
改变您授权同意的范围;<br>
|
||||
注销您的账号。
|
||||
</view>
|
||||
|
||||
<view class="paragraph-text">
|
||||
您可以通过小程序内的"联系客服"或发送邮件至 【您的客服邮箱】 来行使上述权利。我们将在15个工作日内响应您的请求。
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 六、未成年人保护 -->
|
||||
<view class="section-subtitle">六、 未成年人保护</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph-text">
|
||||
我们非常重视对未成年人个人信息的保护。若您是18周岁以下的未成年人,请在您的监护人指导下使用我们的服务。如果我们发现在未获得监护人同意的情况下收集了未成年人的个人信息,我们会设法尽快删除相关数据。
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 七、政策更新 -->
|
||||
<view class="section-subtitle">七、 政策更新</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph-text">
|
||||
我们可能会适时更新本政策。更新后,我们会在本小程序发布最新版本,并通过显著方式提醒您。请您定期查阅。
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
|
||||
const goBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.agreement-page
|
||||
min-height: 100vh
|
||||
background: #f5f5f5
|
||||
|
||||
.nav-bar
|
||||
height: 88rpx
|
||||
background: #fff
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
padding: 0 32rpx
|
||||
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05)
|
||||
position: sticky
|
||||
top: 0
|
||||
z-index: 10
|
||||
|
||||
.nav-left
|
||||
.nav-right
|
||||
width: 80rpx
|
||||
height: 88rpx
|
||||
display: flex
|
||||
align-items: center
|
||||
|
||||
.nav-left
|
||||
justify-content: flex-start
|
||||
|
||||
.nav-right
|
||||
justify-content: flex-end
|
||||
|
||||
.nav-title
|
||||
font-size: 32rpx
|
||||
font-weight: 600
|
||||
color: #333
|
||||
|
||||
.content
|
||||
flex: 1
|
||||
|
||||
.agreement-content
|
||||
padding: 32rpx
|
||||
background: #fff
|
||||
margin: 20rpx
|
||||
border-radius: 16rpx
|
||||
|
||||
.agreement-title
|
||||
font-size: 36rpx
|
||||
font-weight: 700
|
||||
color: #333
|
||||
text-align: center
|
||||
margin-bottom: 40rpx
|
||||
|
||||
.important-tip
|
||||
background: #f0f5ff
|
||||
border-left: 8rpx solid #256bfa
|
||||
padding: 24rpx
|
||||
margin-bottom: 40rpx
|
||||
font-size: 28rpx
|
||||
line-height: 1.6
|
||||
color: #333
|
||||
|
||||
.section
|
||||
margin-bottom: 48rpx
|
||||
|
||||
.section-title
|
||||
font-size: 32rpx
|
||||
font-weight: 600
|
||||
color: #333
|
||||
margin-bottom: 32rpx
|
||||
padding-bottom: 16rpx
|
||||
border-bottom: 2rpx solid #f0f0f0
|
||||
|
||||
.section-subtitle
|
||||
font-size: 28rpx
|
||||
font-weight: 600
|
||||
color: #333
|
||||
margin-bottom: 24rpx
|
||||
|
||||
.section-content
|
||||
margin-bottom: 32rpx
|
||||
|
||||
.paragraph
|
||||
display: flex
|
||||
margin-bottom: 24rpx
|
||||
|
||||
.paragraph-title
|
||||
font-weight: 500
|
||||
color: #333
|
||||
min-width: 120rpx
|
||||
flex-shrink: 0
|
||||
|
||||
.paragraph-text
|
||||
font-size: 26rpx
|
||||
line-height: 1.6
|
||||
color: #666
|
||||
flex: 1
|
||||
|
||||
.paragraph:last-child
|
||||
margin-bottom: 0
|
||||
</style>
|
||||
322
packageA/pages/agreement/user.vue
Normal file
322
packageA/pages/agreement/user.vue
Normal file
@@ -0,0 +1,322 @@
|
||||
<template>
|
||||
<view class="agreement-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<!-- <view class="nav-bar">
|
||||
<view class="nav-left" @click="goBack">
|
||||
<uni-icons type="back" size="28" color="#333"></uni-icons>
|
||||
</view>
|
||||
<view class="nav-title">用户协议</view>
|
||||
<view class="nav-right"></view>
|
||||
</view> -->
|
||||
|
||||
<!-- 内容区域 -->
|
||||
<scroll-view class="content" scroll-y>
|
||||
<view class="agreement-content">
|
||||
<!-- 协议标题 -->
|
||||
<!-- <view class="agreement-title">用户协议与隐私政策</view> -->
|
||||
|
||||
<!-- 重要提示 -->
|
||||
<view class="important-tip">
|
||||
在您注册、登录、使用本小程序服务之前,请您务必审慎阅读、充分理解本协议各条款内容,特别是以加粗形式提示您注意的、关于免除或限制责任、争议解决及法律适用的条款。一旦您以任何方式访问、使用本小程序,即表示您已同意接受本协议及我们另行发布的《隐私政策》的全部内容约束。如您不同意本协议的任何内容,请立即停止使用本小程序。
|
||||
</view>
|
||||
|
||||
<view class="important-tip">
|
||||
如果您未满18周岁,请在法定监护人的陪同下阅读和判断是否同意本协议,并特别注意未成年人使用条款。
|
||||
</view>
|
||||
|
||||
<!-- 第一部分:用户服务协议 -->
|
||||
<view class="section">
|
||||
<view class="section-title">第一部分:用户服务协议</view>
|
||||
|
||||
<!-- 一、服务定义与变更 -->
|
||||
<view class="section-subtitle">一、 服务定义与变更</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">1.1 服务内容:</view>
|
||||
<view class="paragraph-text">本小程序是喀什地区人社局为您提供的的平台服务。具体服务内容可能因版本更新而调整。</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">1.2 服务变更与中断:</view>
|
||||
<view class="paragraph-text">为保障服务质量,我们有权随时对服务内容、功能、操作界面等进行调整、变更或中断,恕不另行单独通知。对于因服务调整、中断或终止对用户或任何第三方造成的损失,除法律明确规定外,不承担任何责任。</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 二、账号管理与安全 -->
|
||||
<view class="section-subtitle">二、 账号管理与安全</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">2.1 账号注册:</view>
|
||||
<view class="paragraph-text">您需要通过微信授权登录来使用本小程序的核心功能。该授权将帮助我们获取您的微信头像、昵称、地区等基本信息。您知悉并同意,该授权行为即视为您已完成账号注册。</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">2.2 账号安全:</view>
|
||||
<view class="paragraph-text">您的微信账号由您自行保管并承担安全责任。您应妥善保管与微信账号相关的一切信息,并对您账号下发生的一切活动(包括但不限于言论发表、信息发布、服务购买等)承担全部法律责任。如发现任何未经授权的账号使用行为,应立即通知我们。我们将对前述情况采取合理的行动,但除因我们的过错外,我们不承担由此导致的任何损失。</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 三、用户行为规范 -->
|
||||
<view class="section-subtitle">三、 用户行为规范</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph-text">您承诺并保证在使用本小程序服务时遵守中华人民共和国法律法规、社会公德,并不得从事以下行为:</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">3.1 </view>
|
||||
<view class="paragraph-text">上传、发布、传播或分享任何反对宪法所确定的基本原则、危害国家安全、泄露国家秘密、颠覆国家政权、破坏国家统一、损害国家荣誉和利益、煽动民族仇恨、民族歧视、破坏民族团结、破坏国家宗教政策、宣扬邪教和封建迷信、淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪等法律、行政法规禁止的内容;</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">3.2 </view>
|
||||
<view class="paragraph-text">侵犯他人知识产权、商业秘密、肖像权、隐私权等合法权益;</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">3.3 </view>
|
||||
<view class="paragraph-text">发布任何虚假、骚扰性、侮辱性、诽谤性、恐吓性、庸俗淫秽或任何其他非法信息;</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">3.4 </view>
|
||||
<view class="paragraph-text">利用技术手段恶意爬取、干扰、破坏本小程序的正常运营,或增加服务器负载;</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">3.5 </view>
|
||||
<view class="paragraph-text">未经许可,从事任何形式的商业广告行为,或利用本小程序进行传销、金字塔骗局等非法营销活动;</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">3.6 </view>
|
||||
<view class="paragraph-text">其他任何违反法律规定或干扰本小程序正常运营的行为。</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph-text">若用户违反上述规定,我们有权单方面判断采取中断服务、限制功能、封禁账号等措施,并保留追究法律责任的权利。</view>
|
||||
</view>
|
||||
|
||||
<!-- 四、知识产权声明 -->
|
||||
<view class="section-subtitle">四、 知识产权声明</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">4.1 </view>
|
||||
<view class="paragraph-text">本公司独立拥有或与相关内容提供者共同拥有本小程序及相关软件、技术、代码、文档、页面设计、Logo、商标、信息内容等的知识产权。</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">4.2 </view>
|
||||
<view class="paragraph-text">未经本公司或相关权利人书面许可,任何单位和个人不得以任何方式(包括但不限于非法复制、传播、展示、修改、创建衍生作品等)使用上述知识产权,否则我们将依法追究其法律责任。</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 五、免责与责任限制 -->
|
||||
<view class="section-subtitle">五、 免责与责任限制</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">5.1 "现状"提供:</view>
|
||||
<view class="paragraph-text">本小程序的服务按"现状"和"可得到"的状态提供。在法律允许的最大范围内,我们明确表示不提供任何明示或默示的担保,包括但不限于对服务的适用性、没有错误或疏漏、持续性、准确性、可靠性、适用于某一特定用途。</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">5.2 不可抗力:</view>
|
||||
<view class="paragraph-text">对于因战争、动乱、自然灾害、政府行为、电信线路中断、黑客攻击、计算机病毒侵入或发作、第三方服务瑕疵等不可抗力因素导致的任何服务中断、数据丢失或信息泄露等问题,我们不承担责任。</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">5.3 第三方链接与内容:</view>
|
||||
<view class="paragraph-text">本小程序内可能包含由第三方提供的服务或链接。该等第三方服务或链接由第三方独立运营和控制,我们不对其内容、隐私政策或行为承担任何责任。您使用任何第三方服务时,需受其自身的条款和政策的约束。</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 六、协议修改与终止 -->
|
||||
<view class="section-subtitle">六、 协议修改与终止</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">6.1 </view>
|
||||
<view class="paragraph-text">我们有权根据国家法律法规变化及运营需要,随时修改本协议的任何条款。更新后的协议将在本小程序上公布,并取代旧版本。如您继续使用服务,即视为接受更新后的协议。</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">6.2 </view>
|
||||
<view class="paragraph-text">您有权随时停止使用本小程序服务。若我们判断您严重违反本协议,我们有权单方面终止向您提供服务,并保留追偿损失的权利。</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 七、法律适用与争议解决 -->
|
||||
<view class="section-subtitle">七、 法律适用与争议解决</view>
|
||||
<view class="section-content">
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">7.1 </view>
|
||||
<view class="paragraph-text">本协议的订立、效力、解释、履行及争议的解决,均适用中华人民共和国大陆地区法律。</view>
|
||||
</view>
|
||||
|
||||
<view class="paragraph">
|
||||
<view class="paragraph-title">7.2 </view>
|
||||
<view class="paragraph-text">因本协议引起的或与本协议有关的任何争议,双方应首先友好协商解决;协商不成的,您同意将争议提交至 【填写您公司所在地】 有管辖权的人民法院通过诉讼解决。</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 同意按钮 -->
|
||||
<!-- <view class="agreement-actions">
|
||||
<button class="agree-btn primary" @click="agreeAgreement">同意并继续</button>
|
||||
<button class="agree-btn secondary" @click="disagreeAgreement">不同意</button>
|
||||
</view> -->
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
|
||||
const goBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
// 同意协议
|
||||
const agreeAgreement = () => {
|
||||
// 存储用户同意状态
|
||||
uni.setStorageSync('agreedToUserAgreement', true);
|
||||
// 返回上一页
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
// 不同意协议
|
||||
const disagreeAgreement = () => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您需要同意用户协议才能使用本服务',
|
||||
showCancel: false,
|
||||
confirmText: '我知道了'
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.agreement-page
|
||||
height: 100vh
|
||||
background: #f5f5f5
|
||||
display: flex
|
||||
flex-direction: column
|
||||
.nav-bar
|
||||
height: 88rpx
|
||||
background: #fff
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
padding: 0 32rpx
|
||||
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05)
|
||||
position: sticky
|
||||
top: 0
|
||||
z-index: 10
|
||||
|
||||
.nav-left
|
||||
.nav-right
|
||||
width: 80rpx
|
||||
height: 88rpx
|
||||
display: flex
|
||||
align-items: center
|
||||
|
||||
.nav-left
|
||||
justify-content: flex-start
|
||||
|
||||
.nav-right
|
||||
justify-content: flex-end
|
||||
|
||||
.nav-title
|
||||
font-size: 32rpx
|
||||
font-weight: 600
|
||||
color: #333
|
||||
|
||||
.content
|
||||
flex: 1
|
||||
height: 0 /* 让flex:1生效 */
|
||||
|
||||
.agreement-content
|
||||
padding: 32rpx
|
||||
background: #fff
|
||||
margin: 20rpx
|
||||
border-radius: 16rpx
|
||||
|
||||
.agreement-title
|
||||
font-size: 36rpx
|
||||
font-weight: 700
|
||||
color: #333
|
||||
text-align: center
|
||||
margin-bottom: 40rpx
|
||||
|
||||
.important-tip
|
||||
background: #f0f5ff
|
||||
border-left: 8rpx solid #256bfa
|
||||
padding: 24rpx
|
||||
margin-bottom: 40rpx
|
||||
font-size: 28rpx
|
||||
line-height: 1.6
|
||||
color: #333
|
||||
|
||||
.section
|
||||
margin-bottom: 48rpx
|
||||
|
||||
.section-title
|
||||
font-size: 32rpx
|
||||
font-weight: 600
|
||||
color: #333
|
||||
margin-bottom: 32rpx
|
||||
padding-bottom: 16rpx
|
||||
border-bottom: 2rpx solid #f0f0f0
|
||||
|
||||
.section-subtitle
|
||||
font-size: 28rpx
|
||||
font-weight: 600
|
||||
color: #333
|
||||
margin-bottom: 24rpx
|
||||
|
||||
.section-content
|
||||
margin-bottom: 32rpx
|
||||
|
||||
.paragraph
|
||||
display: flex
|
||||
margin-bottom: 24rpx
|
||||
|
||||
.paragraph-title
|
||||
font-weight: 500
|
||||
color: #333
|
||||
min-width: 120rpx
|
||||
flex-shrink: 0
|
||||
|
||||
.paragraph-text
|
||||
font-size: 26rpx
|
||||
line-height: 1.6
|
||||
color: #666
|
||||
flex: 1
|
||||
|
||||
.paragraph:last-child
|
||||
margin-bottom: 0
|
||||
|
||||
.agreement-actions
|
||||
margin-top: 60rpx
|
||||
padding: 0 32rpx
|
||||
display: flex
|
||||
flex-direction: column
|
||||
gap: 24rpx
|
||||
|
||||
.agree-btn
|
||||
width: 100%
|
||||
height: 88rpx
|
||||
border-radius: 44rpx
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
font-size: 32rpx
|
||||
font-weight: 500
|
||||
border: none
|
||||
|
||||
&.primary
|
||||
background: linear-gradient(135deg, #256BFA 0%, #1E5BFF 100%)
|
||||
color: #FFFFFF
|
||||
box-shadow: 0 8rpx 20rpx rgba(37, 107, 250, 0.3)
|
||||
|
||||
&.secondary
|
||||
background: #F7F8FA
|
||||
color: #666666
|
||||
</style>
|
||||
@@ -60,8 +60,8 @@
|
||||
<header class="head">
|
||||
<view class="main-header">
|
||||
<image src="/static/icon/Hamburger-button.png" @click="toggleDrawer"></image>
|
||||
<view class="title">{{ config.appInfo.areaName }}岗位推荐</view>
|
||||
<!-- <view class="title">智能客服</view> -->
|
||||
<!-- <view class="title">{{ config.appInfo.areaName }}岗位推荐</view> -->
|
||||
<!-- <view class="title">{{ config.appInfo.areaName }}岗位推荐</view> -->
|
||||
<image src="/static/icon/Comment-one.png" @click="addNewDialogue"></image>
|
||||
</view>
|
||||
</header>
|
||||
@@ -1,5 +1,23 @@
|
||||
<template>
|
||||
<view class="chat-container">
|
||||
<!-- Tab切换 -->
|
||||
<view class="tab-container">
|
||||
<view
|
||||
class="tab-item"
|
||||
:class="{ active: activeTab === 'policy' }"
|
||||
@click="switchTab('policy')"
|
||||
>
|
||||
政策查询
|
||||
</view>
|
||||
<view
|
||||
class="tab-item"
|
||||
:class="{ active: activeTab === 'job' }"
|
||||
@click="switchTab('job')"
|
||||
>
|
||||
岗位推荐
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="chat-background" v-if="!messages.length">
|
||||
<image class="backlogo" src="/static/icon/backAI.png"></image>
|
||||
@@ -51,6 +69,7 @@
|
||||
<!-- #endif -->
|
||||
<view
|
||||
v-for="(msg, index) in messages"
|
||||
v-show="shouldShowMessage(msg)"
|
||||
:key="index"
|
||||
:id="'msg-' + index"
|
||||
class="chat-item"
|
||||
@@ -352,6 +371,7 @@ const { speak, pause, resume, isSpeaking, isPaused, cancelAudio } = useTTSPlayer
|
||||
const instance = getCurrentInstance();
|
||||
|
||||
// state
|
||||
const activeTab = ref('policy'); // 'policy' or 'job'
|
||||
const queries = ref([]);
|
||||
const guessList = ref([]);
|
||||
const scrollTop = ref(0);
|
||||
@@ -571,11 +591,12 @@ const delfile = (file) => {
|
||||
const scrollToBottom = throttle(function () {
|
||||
nextTick(() => {
|
||||
try {
|
||||
let query;
|
||||
// #ifdef MP-WEIXIN
|
||||
const query = uni.createSelectorQuery().in(instance);
|
||||
query = uni.createSelectorQuery().in(instance);
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
const query = uni.createSelectorQuery();
|
||||
query = uni.createSelectorQuery();
|
||||
// #endif
|
||||
|
||||
query.select('.scrollView').boundingClientRect();
|
||||
@@ -886,7 +907,42 @@ function getRandomJobQueries(queries, count = 2) {
|
||||
return shuffled.slice(0, count); // 取前 count 条
|
||||
}
|
||||
|
||||
defineExpose({ scrollToBottom, closeGuess, closeFile, changeQueries, handleTouchCancel });
|
||||
// 切换tab
|
||||
function switchTab(tab) {
|
||||
activeTab.value = tab;
|
||||
}
|
||||
|
||||
// 检查消息是否应该显示在当前tab
|
||||
function shouldShowMessage(msg) {
|
||||
if (msg.self) {
|
||||
return true; // 用户自己的消息总是显示
|
||||
}
|
||||
|
||||
if (activeTab.value === 'policy') {
|
||||
// 政策查询tab:显示除了岗位卡片以外的所有内容
|
||||
// 岗位卡片通常包含特定的标记,如```job-json或岗位推荐等关键词
|
||||
const isJobCard = msg.displayText && (
|
||||
msg.displayText.includes('```job-json') ||
|
||||
msg.displayText.includes('岗位推荐') ||
|
||||
msg.displayText.includes('推荐岗位') ||
|
||||
msg.displayText.includes('岗位信息') ||
|
||||
(msg.displayText.includes('```') && msg.displayText.includes('公司') && msg.displayText.includes('薪资'))
|
||||
);
|
||||
return !isJobCard;
|
||||
} else {
|
||||
// 岗位推荐tab:只显示岗位卡片内容
|
||||
const isJobCard = msg.displayText && (
|
||||
msg.displayText.includes('```job-json') ||
|
||||
msg.displayText.includes('岗位推荐') ||
|
||||
msg.displayText.includes('推荐岗位') ||
|
||||
msg.displayText.includes('岗位信息') ||
|
||||
(msg.displayText.includes('```') && msg.displayText.includes('公司') && msg.displayText.includes('薪资'))
|
||||
);
|
||||
return isJobCard;
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ scrollToBottom, closeGuess, closeFile, changeQueries, handleTouchCancel, switchTab });
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@@ -1373,4 +1429,48 @@ image-margin-top = 40rpx
|
||||
.ai-loading view:nth-child(3) {
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
/* Tab切换样式 */
|
||||
.tab-container {
|
||||
display: flex;
|
||||
background: #FFFFFF;
|
||||
border-bottom: 2rpx solid #F4F4F4;
|
||||
padding: 0 44rpx;
|
||||
height: 88rpx;
|
||||
align-items: center;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #666666;
|
||||
line-height: 88rpx;
|
||||
height: 88rpx;
|
||||
position: relative;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
color: #256BFA;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tab-item.active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 60rpx;
|
||||
height: 4rpx;
|
||||
background: #256BFA;
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
|
||||
.tab-item:active {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
</style>
|
||||
@@ -23,13 +23,16 @@
|
||||
<!-- 统一社会信用代码 -->
|
||||
<view class="form-item">
|
||||
<view class="label">统一社会信用代码</view>
|
||||
<input
|
||||
class="input-field"
|
||||
v-model="formData.socialCreditCode"
|
||||
placeholder="请输入统一社会信用代码"
|
||||
maxlength="18"
|
||||
@input="updateCompletion"
|
||||
/>
|
||||
<view class="input-with-button">
|
||||
<input
|
||||
class="input-field"
|
||||
v-model="formData.socialCreditCode"
|
||||
placeholder="请输入统一社会信用代码"
|
||||
maxlength="18"
|
||||
@input="updateCompletion"
|
||||
/>
|
||||
<button class="query-button" @click="queryCompanyByCreditCode">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 企业注册地点 -->
|
||||
@@ -600,6 +603,42 @@ const cancel = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
// 根据社会信用代码查询企业信息
|
||||
const queryCompanyByCreditCode = async () => {
|
||||
const creditCode = formData.socialCreditCode.trim()
|
||||
if (!creditCode) {
|
||||
$api.msg('请输入统一社会信用代码')
|
||||
return
|
||||
}
|
||||
|
||||
uni.showLoading({ title: '查询中...' })
|
||||
|
||||
try {
|
||||
const response = await $api.createRequest('/app/company/queryCodeCompany', { code: creditCode }, 'get')
|
||||
uni.hideLoading()
|
||||
|
||||
if (response.code === 200 && response.data) {
|
||||
const companyData = response.data
|
||||
// 回显企业信息到表单
|
||||
if (companyData.name) formData.companyName = companyData.name
|
||||
if (companyData.location) formData.registeredAddress = companyData.location
|
||||
if (companyData.description) formData.companyIntro = companyData.description
|
||||
if (companyData.nature) formData.nature = companyData.nature
|
||||
if (companyData.registeredAddress) formData.registeredAddress = companyData.registeredAddress
|
||||
if (companyData.legalPerson) formData.legalPersonName = companyData.legalPerson
|
||||
// 其他字段根据接口返回的数据结构进行映射
|
||||
updateCompletion()
|
||||
$api.msg('企业信息查询成功')
|
||||
} else {
|
||||
$api.msg('未查询到企业信息')
|
||||
}
|
||||
} catch (error) {
|
||||
uni.hideLoading()
|
||||
$api.msg('查询失败,请重试')
|
||||
console.error('查询企业信息失败:', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 确认提交
|
||||
const confirm = () => {
|
||||
// 验证必填字段
|
||||
@@ -837,6 +876,25 @@ defineExpose({
|
||||
font-size: 28rpx
|
||||
line-height: 1.4
|
||||
|
||||
.input-with-button
|
||||
flex: 1
|
||||
display: flex
|
||||
align-items: center
|
||||
gap: 16rpx
|
||||
|
||||
.query-button
|
||||
padding: 8rpx 16rpx
|
||||
background: #256BFA
|
||||
color: #fff
|
||||
font-size: 20rpx
|
||||
border-radius: 6rpx
|
||||
border: none
|
||||
min-width: 100rpx
|
||||
text-align: center
|
||||
|
||||
&:active
|
||||
background: #1a5cd9
|
||||
|
||||
.input-con
|
||||
flex: 1
|
||||
font-size: 28rpx
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -50,9 +50,11 @@
|
||||
<view class="label">最小薪资 (元/月)</view>
|
||||
<input
|
||||
class="input"
|
||||
placeholder="请输入最小薪资"
|
||||
placeholder="请输入最小薪资(最低2000元)"
|
||||
type="number"
|
||||
v-model="formData.minSalary"
|
||||
@input="handleMinSalaryInput"
|
||||
@blur="handleMinSalaryBlur"
|
||||
/>
|
||||
</view>
|
||||
<view class="form-group">
|
||||
@@ -285,7 +287,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, onUnmounted } from 'vue';
|
||||
import { ref, reactive, onMounted, onUnmounted, watch } from 'vue';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { createRequest } from '@/utils/request';
|
||||
@@ -393,6 +395,15 @@ onShow(() => {
|
||||
getCompanyInfo();
|
||||
});
|
||||
|
||||
// 监听最小薪资变化
|
||||
watch(() => formData.minSalary, (newValue) => {
|
||||
console.log('minSalary changed to:', newValue);
|
||||
if (newValue && parseFloat(newValue) < 2000) {
|
||||
console.log('setting minSalary to 2000 via watch');
|
||||
formData.minSalary = '2000';
|
||||
}
|
||||
});
|
||||
|
||||
// 获取企业信息(参考首页方法)
|
||||
const getCompanyInfo = () => {
|
||||
try {
|
||||
@@ -704,6 +715,32 @@ const handleCompanySelected = (company) => {
|
||||
formData.companyId = company.id;
|
||||
};
|
||||
|
||||
// 处理最小薪资输入
|
||||
const handleMinSalaryInput = (e) => {
|
||||
let value = e.detail.value;
|
||||
if (value && parseFloat(value) < 2000) {
|
||||
formData.minSalary = '2000';
|
||||
uni.showToast({
|
||||
title: '最小薪资最低为2000元',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 处理最小薪资失去焦点
|
||||
const handleMinSalaryBlur = () => {
|
||||
console.log('blur event triggered');
|
||||
console.log('current minSalary:', formData.minSalary);
|
||||
let value = formData.minSalary;
|
||||
if (value && parseFloat(value) < 2000) {
|
||||
console.log('setting minSalary to 2000');
|
||||
formData.minSalary = '2000';
|
||||
uni.showToast({
|
||||
title: '最小薪资最低为2000元',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 发布岗位
|
||||
const publishJob = async () => {
|
||||
@@ -824,6 +861,14 @@ const validateForm = () => {
|
||||
const minSalary = parseFloat(formData.minSalary);
|
||||
const maxSalary = parseFloat(formData.maxSalary);
|
||||
|
||||
if (minSalary < 2000) {
|
||||
uni.showToast({
|
||||
title: '最小薪资最低为2000元',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (minSalary >= maxSalary) {
|
||||
uni.showToast({
|
||||
title: '最大薪资必须大于最小薪资',
|
||||
|
||||
@@ -110,6 +110,10 @@
|
||||
</scroll-view>
|
||||
<!-- 筛选 -->
|
||||
<select-filter ref="selectFilterModel"></select-filter>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<selectPopup ref="selectPopupRef"></selectPopup>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -117,7 +121,28 @@
|
||||
import { reactive, inject, watch, ref, onMounted, onBeforeUnmount } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
const { $api, navTo, debounce, customSystem } = inject('globalFunction');
|
||||
const openSelectPopup = inject('openSelectPopup');
|
||||
// #ifdef H5
|
||||
const injectedOpenSelectPopup = inject('openSelectPopup', null);
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
const selectPopupRef = ref();
|
||||
// #endif
|
||||
|
||||
// 创建本地的 openSelectPopup 函数,兼容 H5 和微信小程序
|
||||
const openSelectPopup = (config) => {
|
||||
// #ifdef MP-WEIXIN
|
||||
if (selectPopupRef.value) {
|
||||
selectPopupRef.value.open(config);
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
if (injectedOpenSelectPopup) {
|
||||
injectedOpenSelectPopup(config);
|
||||
}
|
||||
// #endif
|
||||
};
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
@@ -128,6 +153,9 @@ const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
import point2 from '@/static/icon/point2.png';
|
||||
import LocationPng from '@/static/icon/Location.png';
|
||||
import selectFilter from '@/components/selectFilter/selectFilter.vue';
|
||||
// #ifdef MP-WEIXIN
|
||||
import selectPopup from '@/components/selectPopup/selectPopup.vue';
|
||||
// #endif
|
||||
const emit = defineEmits(['onFilter']);
|
||||
// status
|
||||
const showFiltersubway = ref(false);
|
||||
@@ -205,18 +233,21 @@ function openFilter() {
|
||||
}
|
||||
|
||||
function openFilterSubway() {
|
||||
showFiltersubway.value = true;
|
||||
const diti = state.subwayList.map((item) => ({ ...item, label: item.lineName, value: item.lineId }));
|
||||
openSelectPopup({
|
||||
title: '地铁',
|
||||
maskClick: true,
|
||||
data: [diti],
|
||||
success: (_, [value]) => {
|
||||
showFiltersubway.value = false;
|
||||
if (!value) return;
|
||||
subwayCurrent.value = value;
|
||||
state.subwayId = value.value;
|
||||
state.value = value.value;
|
||||
const points = value.subwayStationList;
|
||||
state.downup = true;
|
||||
if (points.length) {
|
||||
if (points && points.length) {
|
||||
state.dont = 0;
|
||||
state.dontObj = points[0];
|
||||
state.subwayStart = points[0];
|
||||
@@ -224,6 +255,9 @@ function openFilterSubway() {
|
||||
getJobList('refresh');
|
||||
}
|
||||
},
|
||||
cancel: () => {
|
||||
showFiltersubway.value = false;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -251,8 +285,8 @@ function selectSubwayStation(point, index) {
|
||||
|
||||
function inputText(id) {
|
||||
if (id) {
|
||||
const text = range.value.filter((item) => item.value === id)[0].text;
|
||||
return text;
|
||||
const foundItem = range.value.filter((item) => item.value === id)[0];
|
||||
return foundItem ? foundItem.text : '';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
@@ -260,13 +294,15 @@ function inputText(id) {
|
||||
|
||||
function bindPickerChange(e) {
|
||||
const lineId = range.value[e.detail.value];
|
||||
if (!lineId) return;
|
||||
const value = state.subwayList.filter((iv) => iv.lineId === lineId.value)[0];
|
||||
if (!value) return;
|
||||
subwayCurrent.value = value;
|
||||
state.value = e.detail.value;
|
||||
state.subwayId = value.lineId;
|
||||
const points = value.subwayStationList;
|
||||
state.downup = true;
|
||||
if (points.length) {
|
||||
if (points && points.length) {
|
||||
state.dont = 0;
|
||||
state.dontObj = points[0];
|
||||
state.subwayStart = points[0];
|
||||
|
||||
@@ -698,7 +698,7 @@ const changePoliticalAffiliation = () => {
|
||||
};
|
||||
|
||||
|
||||
function generateDatePickerArrays(startYear = 1975, endYear = new Date().getFullYear()) {
|
||||
function generateDatePickerArrays(startYear = 1950, endYear = new Date().getFullYear()) {
|
||||
const years = [];
|
||||
const months = [];
|
||||
const days = [];
|
||||
|
||||
@@ -206,6 +206,14 @@
|
||||
{{detailObj.politicalAffiliation}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="flexBox detail-item1" v-if="detailObj.resumePicPath">
|
||||
<view class="label">简历图片:</view>
|
||||
<view class="value">
|
||||
<view class="previewResume" @click="previewResume(detailObj.resumePicPath)">
|
||||
查看简历图片
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<button type="default" @click="closeResumeDetailPopup">关闭</button>
|
||||
@@ -302,6 +310,7 @@
|
||||
$api
|
||||
} = inject("globalFunction");
|
||||
const imgBaseUrl = config.imgBaseUrl;
|
||||
const trainVideoImgUrl = config.trainVideoImgUrl;
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const interviewPopup = ref(null);
|
||||
@@ -311,7 +320,15 @@
|
||||
const jobFairId = ref("");
|
||||
const userInfo = ref({});
|
||||
const isExpanded = ref(false);
|
||||
|
||||
//预览简历照片
|
||||
const previewResume = (url) => {
|
||||
if(url){
|
||||
uni.previewImage({
|
||||
urls: [trainVideoImgUrl+url],
|
||||
current: 0
|
||||
});
|
||||
}
|
||||
};
|
||||
const publicUrl = config.LCBaseUrl;
|
||||
onLoad((option) => {
|
||||
jobFairId.value = option.jobFairId;
|
||||
@@ -940,6 +957,9 @@
|
||||
height: 80%;
|
||||
.flexBox{
|
||||
display: flex;
|
||||
.previewResume{
|
||||
color:#0088ff
|
||||
}
|
||||
}
|
||||
.detail-item1 {
|
||||
// display: flex;
|
||||
|
||||
181
packageB/priority/index.vue
Normal file
181
packageB/priority/index.vue
Normal file
@@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<!-- <AppLayout title=""> -->
|
||||
<view class="tab-container">
|
||||
<image src="/packageB/static/images/train/bj.jpg" mode=""></image>
|
||||
<view>
|
||||
<view class="btns" @click="jumps('/packageB/priority/taskAssignment')">
|
||||
<image src="/packageB/static/images/train/zxxl-k.png" mode=""></image>
|
||||
<view>
|
||||
<text>帮扶任务分配</text>
|
||||
<view class="btn">
|
||||
<text>立即查看</text>
|
||||
<image src="/packageB/static/images/train/arrow.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="btns" @click="jumps('/packageB/priority/taskIssue')">
|
||||
<image src="/packageB/static/images/train/mnks-k.png" mode=""></image>
|
||||
<view>
|
||||
<text>帮扶任务下发</text>
|
||||
<view class="btn">
|
||||
<text>立即查看</text>
|
||||
<image src="/packageB/static/images/train/arrow.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="btns" @click="jumps('/packageB/priority/recordsManagement')">
|
||||
<image src="/packageB/static/images/train/ctb-k.png" mode=""></image>
|
||||
<view>
|
||||
<text>帮扶记录管理 </text>
|
||||
<view class="btn" style="margin-left: 13%;">
|
||||
<text>立即查看</text>
|
||||
<image src="/packageB/static/images/train/arrow.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- </AppLayout> -->
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction');
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
import CryptoJS from 'crypto-js'
|
||||
|
||||
onLoad(() => {
|
||||
// thirdLogin()
|
||||
});
|
||||
|
||||
async function jumps(url){
|
||||
navTo(url);
|
||||
}
|
||||
|
||||
|
||||
async function thirdLogin(){
|
||||
let form={}
|
||||
if (uni.getStorageSync('userInfo').isCompanyUser=='1' || uni.getStorageSync('userInfo').isCompanyUser=='2') {
|
||||
form={
|
||||
usertype: '1',
|
||||
idno: uni.getStorageSync('userInfo').idCard,
|
||||
name: uni.getStorageSync('userInfo').name,
|
||||
enterprisecode:"",
|
||||
enterprisename: "",
|
||||
contactperson: "",
|
||||
contactphone: "",
|
||||
}
|
||||
let key = '9zS+DFKrzxvosO82mTcPJQ=='
|
||||
let secretKey = CryptoJS.enc.Utf8.parse(key);//key 为你的秘钥
|
||||
let srcs = CryptoJS.enc.Utf8.parse(form.idno);
|
||||
let encrypted = CryptoJS.AES.encrypt(srcs, secretKey, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7}).toString()
|
||||
form.idno=encrypted
|
||||
}else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
||||
form={
|
||||
usertype: "2",
|
||||
enterprisecode: uni.getStorageSync('userInfo').idCard,
|
||||
enterprisename: uni.getStorageSync('userInfo').name,
|
||||
contactperson: "",
|
||||
contactphone: "",
|
||||
idno: "",
|
||||
name: ""
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先登录'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
|
||||
if (resLogin.code=='200') {
|
||||
uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
|
||||
return true;
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '单点异常'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.tab-container{
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
// background: url('@/static/images/train/bj.jpg') center center no-repeat;
|
||||
// background-size: 100% 100%;
|
||||
image{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
view{
|
||||
padding: 100rpx 28rpx 0;
|
||||
.btns{
|
||||
width: 100%
|
||||
height: 170rpx;
|
||||
border-radius: 5rpx
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box
|
||||
color: #000
|
||||
text-align: center
|
||||
margin-bottom: 50rpx
|
||||
position: relative
|
||||
image{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
view{
|
||||
padding: 0 0 0 10%;
|
||||
box-sizing: border-box;
|
||||
position: absolute
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
align-items: center
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #595959;
|
||||
.btn{
|
||||
margin-left: 8%;
|
||||
background-color: #3A92FF;
|
||||
position: static;
|
||||
color: #fff;
|
||||
font-size: 22rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center
|
||||
width: 140rpx;
|
||||
height: 50rpx;
|
||||
border-radius: 5rpx
|
||||
font-weight: 500;
|
||||
padding: 0;
|
||||
image{
|
||||
position: static;
|
||||
width: 14rpx;
|
||||
height: 22rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
526
packageB/priority/recordsManagement.vue
Normal file
526
packageB/priority/recordsManagement.vue
Normal file
@@ -0,0 +1,526 @@
|
||||
<template>
|
||||
<AppLayout :title="title" :show-bg-image="false" @onScrollBottom="getDataList('add')">
|
||||
<view class="main-list" :style="getBackgroundStyle('k.png')">
|
||||
<view class="list-top">
|
||||
<view class="list-title">
|
||||
<text>筛选条件</text>
|
||||
<view class="title-line"></view>
|
||||
</view>
|
||||
<view class="title-right button-sp-area">
|
||||
<button class="mini-btn search-box-btn" type="primary" size="mini" @click="handleSearch">查询</button>
|
||||
<button class="mini-btn reset-box-btn" type="default" size="mini" @click="handleReset">重置</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="search-container">
|
||||
<!-- 人员姓名 -->
|
||||
<view class="search-item">
|
||||
<text class="label">人员姓名:</text>
|
||||
<uni-easyinput v-model="formData.name" placeholder="请输入人员姓名"></uni-easyinput>
|
||||
</view>
|
||||
|
||||
<!-- 身份证号 -->
|
||||
<view class="search-item">
|
||||
<text class="label">身份证号:</text>
|
||||
<uni-easyinput v-model="formData.idCard" placeholder="请输入身份证号"></uni-easyinput>
|
||||
</view>
|
||||
|
||||
<!-- 帮扶类型(下拉选择) -->
|
||||
<view class="search-item">
|
||||
<text class="label">帮扶类型:</text>
|
||||
<uni-data-select v-model="formData.taskType" :localdata="taskTypeOptions" placeholder="请选择帮扶类型" @change="onTaskTypeChange"></uni-data-select>
|
||||
</view>
|
||||
|
||||
<!-- 帮扶人员 -->
|
||||
<view class="search-item">
|
||||
<text class="label">帮扶人员:</text>
|
||||
<uni-easyinput v-model="formData.createByName" placeholder="请输入帮扶人员姓名"></uni-easyinput>
|
||||
</view>
|
||||
|
||||
<!-- 所属区域(下拉选择) -->
|
||||
<view class="search-item">
|
||||
<text class="label">所属区域:</text>
|
||||
<uni-data-picker ref="picker" class="picker" placeholder="请选择所属区域" popup-title="请选择所属区域" :localdata="regions" v-model="formData.deptTags"
|
||||
@change="onchange" >
|
||||
</uni-data-picker>
|
||||
</view>
|
||||
|
||||
<!-- 开始时间 -->
|
||||
<view class="search-item" v-if="false">
|
||||
<text class="label">开始时间:</text>
|
||||
<uni-datetime-picker type="date" placeholder="请选择开始时间" v-model="formData.startTime" @maskClick="onStartTimeChange" />
|
||||
</view>
|
||||
|
||||
<!-- 结束时间 -->
|
||||
<view class="search-item" v-if="false">
|
||||
<text class="label">结束时间:</text>
|
||||
<uni-datetime-picker type="date" placeholder="请选择结束时间" v-model="formData.endTime" @maskClick="onEndTimeChange" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-list" :style="getBackgroundStyle('k.png')">
|
||||
<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-title">
|
||||
<view class="form-name">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="form-type">
|
||||
{{getTaskTypeLabelByValue(item.task_type)}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.phone">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/tele.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
联系电话:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.phone}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.id_card">
|
||||
<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.id_card}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.dept_name">
|
||||
<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.dept_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.create_by_name">
|
||||
<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.create_by_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.create_by_dept_name">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/help.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
帮扶单位:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.create_by_dept_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.follow_date">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/date.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
帮扶日期:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.follow_date}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.next_contact_date">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/next.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
下次联系:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.next_contact_date}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-btns">
|
||||
<button class="mini-btn form-box-btn detail-btn" size="mini" v-if="false">详情</button>
|
||||
<button class="mini-btn form-box-btn follow-btn" size="mini" @click="goFollow(item)">跟进</button>
|
||||
<button class="mini-btn form-box-btn recommend-btn" size="mini" @click="goRecommend(item)">智能推荐</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { inject, ref, reactive,onMounted } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
const { $api, navTo, navBack } = inject('globalFunction');
|
||||
import config from "@/config.js"
|
||||
|
||||
// state
|
||||
const title = ref('');
|
||||
const initialForm = {
|
||||
name: '',
|
||||
idCard: '',
|
||||
taskType: '',
|
||||
createByName: '',
|
||||
// helpArea: [],
|
||||
// startTime: '',
|
||||
// endTime: '',
|
||||
// deptId:'',
|
||||
deptTags:''
|
||||
}
|
||||
const formData = reactive({ ...initialForm });
|
||||
const taskTypeOptions=ref([])
|
||||
const dataList=ref([])
|
||||
const pageSize=ref(10)
|
||||
const pageNum=ref(1)
|
||||
const totalNum=ref(0)
|
||||
const baseUrl = config.imgBaseUrl
|
||||
const getBackgroundStyle = (imageName) => ({
|
||||
backgroundImage: `url(${baseUrl}/dispatch/${imageName})`,
|
||||
backgroundSize: 'cover', // 覆盖整个容器
|
||||
backgroundPosition: 'center', // 居中
|
||||
backgroundRepeat: 'no-repeat'
|
||||
});
|
||||
const trainVideoImgUrl=config.trainVideoImgUrl
|
||||
const picker = ref(null)
|
||||
|
||||
|
||||
// 所属区域选项(可根据实际替换为动态数据)
|
||||
const regions = ref([])
|
||||
|
||||
// 事件处理
|
||||
const onTaskTypeChange = (e) => {
|
||||
formData.taskType=e
|
||||
}
|
||||
const onStartTimeChange = (e) => {
|
||||
formData.startTime = e.detail.value
|
||||
}
|
||||
|
||||
const onEndTimeChange = (e) => {
|
||||
formData.endTime = e.detail.value
|
||||
}
|
||||
|
||||
const handleSearch = () => {
|
||||
// 在这里调用接口进行搜索
|
||||
getDataList('refresh')
|
||||
}
|
||||
const handleReset = () =>{
|
||||
Object.assign(formData, initialForm);
|
||||
getDataList('refresh')
|
||||
}
|
||||
onMounted(async () => {
|
||||
// await loadLevelData('201');
|
||||
});
|
||||
onLoad(() => {
|
||||
// let token=uni.getStorageSync('fourLevelLinkage-token')
|
||||
// if(token){
|
||||
// $api.myRequest("/system/user/login/user/info", {}, "GET", 9100, {
|
||||
// Authorization: `Bearer ${uni.getStorageSync("fourLevelLinkage-token")}`
|
||||
// }).then(async (resData) => {
|
||||
|
||||
// await loadLevelData(resData.sysUser.dept.deptId);
|
||||
// getDictionary()
|
||||
// getDataList('refresh');
|
||||
// });
|
||||
// }else{
|
||||
// navTo('/packageB/login2');
|
||||
// }
|
||||
});
|
||||
function getDictionary(){
|
||||
$api.myRequest('/system/public/dict/data/type/assist_task_type').then((resData) => {
|
||||
if(resData && resData.code == 200){
|
||||
resData.data.forEach(item=>{
|
||||
const obj = {
|
||||
value: item.dictValue,
|
||||
text: item.dictLabel
|
||||
}
|
||||
taskTypeOptions.value.push(obj)
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
function getTaskTypeLabelByValue(value) {
|
||||
if (!Array.isArray(taskTypeOptions.value)) {
|
||||
return ''
|
||||
}
|
||||
const item = taskTypeOptions.value.find(item => item.value === String(value))
|
||||
return item ? item.text : '暂无帮扶类型'
|
||||
}
|
||||
// 加载某一级的数据(parentId 为空表示根)
|
||||
async function loadLevelData(parentId,node) {
|
||||
let header = {
|
||||
'Authorization': uni.getStorageSync('fourLevelLinkage-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 getDeptOptions(){
|
||||
let header={
|
||||
'Authorization':uni.getStorageSync('fourLevelLinkage-token'),
|
||||
'Content-Type': "application/x-www-form-urlencoded"
|
||||
}
|
||||
let params={
|
||||
parentId:''
|
||||
}
|
||||
$api.myRequest('/dispatch/dept/list', params,'get',9100,header).then((resData) => {
|
||||
});
|
||||
}
|
||||
function getDataList(type = 'add') {
|
||||
let maxPage=Math.ceil(totalNum.value/pageSize.value)
|
||||
let params=({...formData})
|
||||
let header={
|
||||
'Authorization':uni.getStorageSync('fourLevelLinkage-token'),
|
||||
'Content-Type': "application/x-www-form-urlencoded"
|
||||
}
|
||||
if (type === 'refresh') {
|
||||
pageNum.value = 1;
|
||||
params.pageSize=pageSize.value
|
||||
params.pageNum=pageNum.value
|
||||
$api.myRequest('/dispatch/assist/records/pageRecords', params,'get',9100,header).then((resData) => {
|
||||
if(resData&&resData.code == 200){
|
||||
dataList.value=resData.rows
|
||||
totalNum.value=resData.total
|
||||
}
|
||||
});
|
||||
}
|
||||
if (type === 'add' && pageNum.value < maxPage) {
|
||||
pageNum.value += 1;
|
||||
params.pageSize=pageSize.value
|
||||
params.pageNum=pageNum.value
|
||||
$api.myRequest('/dispatch/assist/records/pageRecords', params,'get',9100,header).then((resData) => {
|
||||
dataList.value=dataList.value.concat(resData.rows)
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
function goFollow(item) {
|
||||
navTo(`/packageB/priority/helpFollow?task_id=${item.task_id}&person_id=${item.person_id}&&name=${item.name}&&taskType=${getTaskTypeLabelByValue(item.task_type)}`);
|
||||
}
|
||||
//智能推荐
|
||||
const goRecommend = (item) => {
|
||||
navTo('/packageB/priority/recommend');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
|
||||
image
|
||||
height: 100%
|
||||
width: 100%
|
||||
|
||||
.main-list
|
||||
background-color: #ffffff
|
||||
padding: 20rpx 30rpx 28rpx 30rpx
|
||||
margin: 30rpx 30rpx
|
||||
box-shadow: 0px 3px 20px 0px rgba(0,105,234,0.1)
|
||||
border-radius: 12px
|
||||
.list-top
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
.list-title
|
||||
font-weight: bold
|
||||
font-size: 36rpx
|
||||
color: #404040
|
||||
position: relative
|
||||
|
||||
.title-line
|
||||
position: absolute
|
||||
bottom: -10rpx
|
||||
left: 36rpx
|
||||
width: 70rpx
|
||||
height: 8rpx
|
||||
background: linear-gradient(90deg, #FFAD58 0%, #FF7A5B 100%)
|
||||
border-radius: 4rpx
|
||||
.search-box-btn
|
||||
border-radius: 32rpx !important
|
||||
background: #3088FF !important
|
||||
margin-right: 16rpx
|
||||
.reset-box-btn
|
||||
border-radius: 32rpx !important
|
||||
background: #02B44D
|
||||
color: #fff
|
||||
.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,
|
||||
.picker
|
||||
background: #FFFFFF
|
||||
flex: 1
|
||||
min-width: 0
|
||||
.list-box
|
||||
margin-top: 40rpx
|
||||
.con-box
|
||||
background: #fff
|
||||
padding: 20rpx
|
||||
box-shadow: 0px 0px 6rpx 0px rgba(0,71,200,0.16)
|
||||
border-radius: 24rpx
|
||||
border: 1rpx solid #EDF5FF
|
||||
margin-top: 30rpx
|
||||
.form-title
|
||||
display: flex
|
||||
align-items: center
|
||||
|
||||
.form-name
|
||||
font-weight: bold
|
||||
font-size: 32rpx
|
||||
color: #595959
|
||||
margin-right:16rpx
|
||||
.form-type
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #FF7D26;
|
||||
font-size: 24rpx
|
||||
color: #F1690E
|
||||
padding: 4rpx 10rpx
|
||||
.form-item
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
margin-top: 30rpx
|
||||
.item-left
|
||||
display: flex
|
||||
align-items: center
|
||||
.item-img
|
||||
width: 26rpx
|
||||
height: 26rpx
|
||||
margin-right: 10rpx
|
||||
.item-label
|
||||
font-size: 26rpx
|
||||
color: #B3B3B3
|
||||
width: 130rpx
|
||||
.item-right
|
||||
font-size: 26rpx
|
||||
color: #737373
|
||||
overflow: hidden
|
||||
text-overflow: ellipsis
|
||||
white-space: nowrap
|
||||
.form-btns
|
||||
margin-top:30rpx
|
||||
.form-box-btn
|
||||
border-radius: 50rpx !important
|
||||
margin-right: 24rpx
|
||||
padding: 0rpx 40rpx
|
||||
.detail-btn
|
||||
background: #EDF5FF
|
||||
border: 1px solid #3088FF
|
||||
font-size: 28rpx
|
||||
color: #3088FF
|
||||
.follow-btn
|
||||
background: #EEF9F3
|
||||
border: 1px solid #00933E
|
||||
font-size: 28rpx
|
||||
color: #00933E
|
||||
.recommend-btn
|
||||
background: linear-gradient(92deg, #0DCCFF 0%, #4760FF 100%)
|
||||
font-size: 28rpx
|
||||
color: #FFFFFF
|
||||
</style>
|
||||
526
packageB/priority/taskAssignment.vue
Normal file
526
packageB/priority/taskAssignment.vue
Normal file
@@ -0,0 +1,526 @@
|
||||
<template>
|
||||
<AppLayout :title="title" :show-bg-image="false" @onScrollBottom="getDataList('add')">
|
||||
<view class="main-list" :style="getBackgroundStyle('k.png')">
|
||||
<view class="list-top">
|
||||
<view class="list-title">
|
||||
<text>筛选条件</text>
|
||||
<view class="title-line"></view>
|
||||
</view>
|
||||
<view class="title-right button-sp-area">
|
||||
<button class="mini-btn search-box-btn" type="primary" size="mini" @click="handleSearch">查询</button>
|
||||
<button class="mini-btn reset-box-btn" type="default" size="mini" @click="handleReset">重置</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="search-container">
|
||||
<!-- 人员姓名 -->
|
||||
<view class="search-item">
|
||||
<text class="label">人员姓名:</text>
|
||||
<uni-easyinput v-model="formData.name" placeholder="请输入人员姓名"></uni-easyinput>
|
||||
</view>
|
||||
|
||||
<!-- 身份证号 -->
|
||||
<view class="search-item">
|
||||
<text class="label">身份证号:</text>
|
||||
<uni-easyinput v-model="formData.idCard" placeholder="请输入身份证号"></uni-easyinput>
|
||||
</view>
|
||||
|
||||
<!-- 帮扶类型(下拉选择) -->
|
||||
<view class="search-item">
|
||||
<text class="label">帮扶类型:</text>
|
||||
<uni-data-select v-model="formData.taskType" :localdata="taskTypeOptions" placeholder="请选择帮扶类型" @change="onTaskTypeChange"></uni-data-select>
|
||||
</view>
|
||||
|
||||
<!-- 帮扶人员 -->
|
||||
<view class="search-item">
|
||||
<text class="label">帮扶人员:</text>
|
||||
<uni-easyinput v-model="formData.createByName" placeholder="请输入帮扶人员姓名"></uni-easyinput>
|
||||
</view>
|
||||
|
||||
<!-- 所属区域(下拉选择) -->
|
||||
<view class="search-item">
|
||||
<text class="label">所属区域:</text>
|
||||
<uni-data-picker ref="picker" class="picker" placeholder="请选择所属区域" popup-title="请选择所属区域" :localdata="regions" v-model="formData.deptTags"
|
||||
@change="onchange" >
|
||||
</uni-data-picker>
|
||||
</view>
|
||||
|
||||
<!-- 开始时间 -->
|
||||
<view class="search-item" v-if="false">
|
||||
<text class="label">开始时间:</text>
|
||||
<uni-datetime-picker type="date" placeholder="请选择开始时间" v-model="formData.startTime" @maskClick="onStartTimeChange" />
|
||||
</view>
|
||||
|
||||
<!-- 结束时间 -->
|
||||
<view class="search-item" v-if="false">
|
||||
<text class="label">结束时间:</text>
|
||||
<uni-datetime-picker type="date" placeholder="请选择结束时间" v-model="formData.endTime" @maskClick="onEndTimeChange" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-list" :style="getBackgroundStyle('k.png')">
|
||||
<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-title">
|
||||
<view class="form-name">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="form-type">
|
||||
{{getTaskTypeLabelByValue(item.task_type)}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.phone">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/tele.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
联系电话:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.phone}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.id_card">
|
||||
<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.id_card}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.dept_name">
|
||||
<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.dept_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.create_by_name">
|
||||
<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.create_by_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.create_by_dept_name">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/help.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
帮扶单位:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.create_by_dept_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.follow_date">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/date.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
帮扶日期:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.follow_date}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.next_contact_date">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/next.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
下次联系:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.next_contact_date}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-btns">
|
||||
<button class="mini-btn form-box-btn detail-btn" size="mini" v-if="false">详情</button>
|
||||
<button class="mini-btn form-box-btn follow-btn" size="mini" @click="goFollow(item)">跟进</button>
|
||||
<button class="mini-btn form-box-btn recommend-btn" size="mini" @click="goRecommend(item)">智能推荐</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { inject, ref, reactive,onMounted } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
const { $api, navTo, navBack } = inject('globalFunction');
|
||||
import config from "@/config.js"
|
||||
|
||||
// state
|
||||
const title = ref('');
|
||||
const initialForm = {
|
||||
name: '',
|
||||
idCard: '',
|
||||
taskType: '',
|
||||
createByName: '',
|
||||
// helpArea: [],
|
||||
// startTime: '',
|
||||
// endTime: '',
|
||||
// deptId:'',
|
||||
deptTags:''
|
||||
}
|
||||
const formData = reactive({ ...initialForm });
|
||||
const taskTypeOptions=ref([])
|
||||
const dataList=ref([])
|
||||
const pageSize=ref(10)
|
||||
const pageNum=ref(1)
|
||||
const totalNum=ref(0)
|
||||
const baseUrl = config.imgBaseUrl
|
||||
const getBackgroundStyle = (imageName) => ({
|
||||
backgroundImage: `url(${baseUrl}/dispatch/${imageName})`,
|
||||
backgroundSize: 'cover', // 覆盖整个容器
|
||||
backgroundPosition: 'center', // 居中
|
||||
backgroundRepeat: 'no-repeat'
|
||||
});
|
||||
const trainVideoImgUrl=config.trainVideoImgUrl
|
||||
const picker = ref(null)
|
||||
|
||||
|
||||
// 所属区域选项(可根据实际替换为动态数据)
|
||||
const regions = ref([])
|
||||
|
||||
// 事件处理
|
||||
const onTaskTypeChange = (e) => {
|
||||
formData.taskType=e
|
||||
}
|
||||
const onStartTimeChange = (e) => {
|
||||
formData.startTime = e.detail.value
|
||||
}
|
||||
|
||||
const onEndTimeChange = (e) => {
|
||||
formData.endTime = e.detail.value
|
||||
}
|
||||
|
||||
const handleSearch = () => {
|
||||
// 在这里调用接口进行搜索
|
||||
getDataList('refresh')
|
||||
}
|
||||
const handleReset = () =>{
|
||||
Object.assign(formData, initialForm);
|
||||
getDataList('refresh')
|
||||
}
|
||||
onMounted(async () => {
|
||||
// await loadLevelData('201');
|
||||
});
|
||||
onLoad(() => {
|
||||
// let token=uni.getStorageSync('fourLevelLinkage-token')
|
||||
// if(token){
|
||||
// $api.myRequest("/system/user/login/user/info", {}, "GET", 9100, {
|
||||
// Authorization: `Bearer ${uni.getStorageSync("fourLevelLinkage-token")}`
|
||||
// }).then(async (resData) => {
|
||||
|
||||
// await loadLevelData(resData.sysUser.dept.deptId);
|
||||
// getDictionary()
|
||||
// getDataList('refresh');
|
||||
// });
|
||||
// }else{
|
||||
// navTo('/packageB/login2');
|
||||
// }
|
||||
});
|
||||
function getDictionary(){
|
||||
$api.myRequest('/system/public/dict/data/type/assist_task_type').then((resData) => {
|
||||
if(resData && resData.code == 200){
|
||||
resData.data.forEach(item=>{
|
||||
const obj = {
|
||||
value: item.dictValue,
|
||||
text: item.dictLabel
|
||||
}
|
||||
taskTypeOptions.value.push(obj)
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
function getTaskTypeLabelByValue(value) {
|
||||
if (!Array.isArray(taskTypeOptions.value)) {
|
||||
return ''
|
||||
}
|
||||
const item = taskTypeOptions.value.find(item => item.value === String(value))
|
||||
return item ? item.text : '暂无帮扶类型'
|
||||
}
|
||||
// 加载某一级的数据(parentId 为空表示根)
|
||||
async function loadLevelData(parentId,node) {
|
||||
let header = {
|
||||
'Authorization': uni.getStorageSync('fourLevelLinkage-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 getDeptOptions(){
|
||||
let header={
|
||||
'Authorization':uni.getStorageSync('fourLevelLinkage-token'),
|
||||
'Content-Type': "application/x-www-form-urlencoded"
|
||||
}
|
||||
let params={
|
||||
parentId:''
|
||||
}
|
||||
$api.myRequest('/dispatch/dept/list', params,'get',9100,header).then((resData) => {
|
||||
});
|
||||
}
|
||||
function getDataList(type = 'add') {
|
||||
let maxPage=Math.ceil(totalNum.value/pageSize.value)
|
||||
let params=({...formData})
|
||||
let header={
|
||||
'Authorization':uni.getStorageSync('fourLevelLinkage-token'),
|
||||
'Content-Type': "application/x-www-form-urlencoded"
|
||||
}
|
||||
if (type === 'refresh') {
|
||||
pageNum.value = 1;
|
||||
params.pageSize=pageSize.value
|
||||
params.pageNum=pageNum.value
|
||||
$api.myRequest('/dispatch/assist/records/pageRecords', params,'get',9100,header).then((resData) => {
|
||||
if(resData&&resData.code == 200){
|
||||
dataList.value=resData.rows
|
||||
totalNum.value=resData.total
|
||||
}
|
||||
});
|
||||
}
|
||||
if (type === 'add' && pageNum.value < maxPage) {
|
||||
pageNum.value += 1;
|
||||
params.pageSize=pageSize.value
|
||||
params.pageNum=pageNum.value
|
||||
$api.myRequest('/dispatch/assist/records/pageRecords', params,'get',9100,header).then((resData) => {
|
||||
dataList.value=dataList.value.concat(resData.rows)
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
function goFollow(item) {
|
||||
navTo(`/packageB/priority/helpFollow?task_id=${item.task_id}&person_id=${item.person_id}&&name=${item.name}&&taskType=${getTaskTypeLabelByValue(item.task_type)}`);
|
||||
}
|
||||
//智能推荐
|
||||
const goRecommend = (item) => {
|
||||
navTo('/packageB/priority/recommend');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
|
||||
image
|
||||
height: 100%
|
||||
width: 100%
|
||||
|
||||
.main-list
|
||||
background-color: #ffffff
|
||||
padding: 20rpx 30rpx 28rpx 30rpx
|
||||
margin: 30rpx 30rpx
|
||||
box-shadow: 0px 3px 20px 0px rgba(0,105,234,0.1)
|
||||
border-radius: 12px
|
||||
.list-top
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
.list-title
|
||||
font-weight: bold
|
||||
font-size: 36rpx
|
||||
color: #404040
|
||||
position: relative
|
||||
|
||||
.title-line
|
||||
position: absolute
|
||||
bottom: -10rpx
|
||||
left: 36rpx
|
||||
width: 70rpx
|
||||
height: 8rpx
|
||||
background: linear-gradient(90deg, #FFAD58 0%, #FF7A5B 100%)
|
||||
border-radius: 4rpx
|
||||
.search-box-btn
|
||||
border-radius: 32rpx !important
|
||||
background: #3088FF !important
|
||||
margin-right: 16rpx
|
||||
.reset-box-btn
|
||||
border-radius: 32rpx !important
|
||||
background: #02B44D
|
||||
color: #fff
|
||||
.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,
|
||||
.picker
|
||||
background: #FFFFFF
|
||||
flex: 1
|
||||
min-width: 0
|
||||
.list-box
|
||||
margin-top: 40rpx
|
||||
.con-box
|
||||
background: #fff
|
||||
padding: 20rpx
|
||||
box-shadow: 0px 0px 6rpx 0px rgba(0,71,200,0.16)
|
||||
border-radius: 24rpx
|
||||
border: 1rpx solid #EDF5FF
|
||||
margin-top: 30rpx
|
||||
.form-title
|
||||
display: flex
|
||||
align-items: center
|
||||
|
||||
.form-name
|
||||
font-weight: bold
|
||||
font-size: 32rpx
|
||||
color: #595959
|
||||
margin-right:16rpx
|
||||
.form-type
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #FF7D26;
|
||||
font-size: 24rpx
|
||||
color: #F1690E
|
||||
padding: 4rpx 10rpx
|
||||
.form-item
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
margin-top: 30rpx
|
||||
.item-left
|
||||
display: flex
|
||||
align-items: center
|
||||
.item-img
|
||||
width: 26rpx
|
||||
height: 26rpx
|
||||
margin-right: 10rpx
|
||||
.item-label
|
||||
font-size: 26rpx
|
||||
color: #B3B3B3
|
||||
width: 130rpx
|
||||
.item-right
|
||||
font-size: 26rpx
|
||||
color: #737373
|
||||
overflow: hidden
|
||||
text-overflow: ellipsis
|
||||
white-space: nowrap
|
||||
.form-btns
|
||||
margin-top:30rpx
|
||||
.form-box-btn
|
||||
border-radius: 50rpx !important
|
||||
margin-right: 24rpx
|
||||
padding: 0rpx 40rpx
|
||||
.detail-btn
|
||||
background: #EDF5FF
|
||||
border: 1px solid #3088FF
|
||||
font-size: 28rpx
|
||||
color: #3088FF
|
||||
.follow-btn
|
||||
background: #EEF9F3
|
||||
border: 1px solid #00933E
|
||||
font-size: 28rpx
|
||||
color: #00933E
|
||||
.recommend-btn
|
||||
background: linear-gradient(92deg, #0DCCFF 0%, #4760FF 100%)
|
||||
font-size: 28rpx
|
||||
color: #FFFFFF
|
||||
</style>
|
||||
526
packageB/priority/taskIssue.vue
Normal file
526
packageB/priority/taskIssue.vue
Normal file
@@ -0,0 +1,526 @@
|
||||
<template>
|
||||
<AppLayout :title="title" :show-bg-image="false" @onScrollBottom="getDataList('add')">
|
||||
<view class="main-list" :style="getBackgroundStyle('k.png')">
|
||||
<view class="list-top">
|
||||
<view class="list-title">
|
||||
<text>筛选条件</text>
|
||||
<view class="title-line"></view>
|
||||
</view>
|
||||
<view class="title-right button-sp-area">
|
||||
<button class="mini-btn search-box-btn" type="primary" size="mini" @click="handleSearch">查询</button>
|
||||
<button class="mini-btn reset-box-btn" type="default" size="mini" @click="handleReset">重置</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="search-container">
|
||||
<!-- 人员姓名 -->
|
||||
<view class="search-item">
|
||||
<text class="label">人员姓名:</text>
|
||||
<uni-easyinput v-model="formData.name" placeholder="请输入人员姓名"></uni-easyinput>
|
||||
</view>
|
||||
|
||||
<!-- 身份证号 -->
|
||||
<view class="search-item">
|
||||
<text class="label">身份证号:</text>
|
||||
<uni-easyinput v-model="formData.idCard" placeholder="请输入身份证号"></uni-easyinput>
|
||||
</view>
|
||||
|
||||
<!-- 帮扶类型(下拉选择) -->
|
||||
<view class="search-item">
|
||||
<text class="label">帮扶类型:</text>
|
||||
<uni-data-select v-model="formData.taskType" :localdata="taskTypeOptions" placeholder="请选择帮扶类型" @change="onTaskTypeChange"></uni-data-select>
|
||||
</view>
|
||||
|
||||
<!-- 帮扶人员 -->
|
||||
<view class="search-item">
|
||||
<text class="label">帮扶人员:</text>
|
||||
<uni-easyinput v-model="formData.createByName" placeholder="请输入帮扶人员姓名"></uni-easyinput>
|
||||
</view>
|
||||
|
||||
<!-- 所属区域(下拉选择) -->
|
||||
<view class="search-item">
|
||||
<text class="label">所属区域:</text>
|
||||
<uni-data-picker ref="picker" class="picker" placeholder="请选择所属区域" popup-title="请选择所属区域" :localdata="regions" v-model="formData.deptTags"
|
||||
@change="onchange" >
|
||||
</uni-data-picker>
|
||||
</view>
|
||||
|
||||
<!-- 开始时间 -->
|
||||
<view class="search-item" v-if="false">
|
||||
<text class="label">开始时间:</text>
|
||||
<uni-datetime-picker type="date" placeholder="请选择开始时间" v-model="formData.startTime" @maskClick="onStartTimeChange" />
|
||||
</view>
|
||||
|
||||
<!-- 结束时间 -->
|
||||
<view class="search-item" v-if="false">
|
||||
<text class="label">结束时间:</text>
|
||||
<uni-datetime-picker type="date" placeholder="请选择结束时间" v-model="formData.endTime" @maskClick="onEndTimeChange" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-list" :style="getBackgroundStyle('k.png')">
|
||||
<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-title">
|
||||
<view class="form-name">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="form-type">
|
||||
{{getTaskTypeLabelByValue(item.task_type)}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.phone">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/tele.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
联系电话:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.phone}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.id_card">
|
||||
<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.id_card}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.dept_name">
|
||||
<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.dept_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.create_by_name">
|
||||
<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.create_by_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.create_by_dept_name">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/help.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
帮扶单位:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.create_by_dept_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.follow_date">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/date.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
帮扶日期:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.follow_date}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="item.next_contact_date">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/next.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
下次联系:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.next_contact_date}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-btns">
|
||||
<button class="mini-btn form-box-btn detail-btn" size="mini" v-if="false">详情</button>
|
||||
<button class="mini-btn form-box-btn follow-btn" size="mini" @click="goFollow(item)">跟进</button>
|
||||
<button class="mini-btn form-box-btn recommend-btn" size="mini" @click="goRecommend(item)">智能推荐</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { inject, ref, reactive,onMounted } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
const { $api, navTo, navBack } = inject('globalFunction');
|
||||
import config from "@/config.js"
|
||||
|
||||
// state
|
||||
const title = ref('');
|
||||
const initialForm = {
|
||||
name: '',
|
||||
idCard: '',
|
||||
taskType: '',
|
||||
createByName: '',
|
||||
// helpArea: [],
|
||||
// startTime: '',
|
||||
// endTime: '',
|
||||
// deptId:'',
|
||||
deptTags:''
|
||||
}
|
||||
const formData = reactive({ ...initialForm });
|
||||
const taskTypeOptions=ref([])
|
||||
const dataList=ref([])
|
||||
const pageSize=ref(10)
|
||||
const pageNum=ref(1)
|
||||
const totalNum=ref(0)
|
||||
const baseUrl = config.imgBaseUrl
|
||||
const getBackgroundStyle = (imageName) => ({
|
||||
backgroundImage: `url(${baseUrl}/dispatch/${imageName})`,
|
||||
backgroundSize: 'cover', // 覆盖整个容器
|
||||
backgroundPosition: 'center', // 居中
|
||||
backgroundRepeat: 'no-repeat'
|
||||
});
|
||||
const trainVideoImgUrl=config.trainVideoImgUrl
|
||||
const picker = ref(null)
|
||||
|
||||
|
||||
// 所属区域选项(可根据实际替换为动态数据)
|
||||
const regions = ref([])
|
||||
|
||||
// 事件处理
|
||||
const onTaskTypeChange = (e) => {
|
||||
formData.taskType=e
|
||||
}
|
||||
const onStartTimeChange = (e) => {
|
||||
formData.startTime = e.detail.value
|
||||
}
|
||||
|
||||
const onEndTimeChange = (e) => {
|
||||
formData.endTime = e.detail.value
|
||||
}
|
||||
|
||||
const handleSearch = () => {
|
||||
// 在这里调用接口进行搜索
|
||||
getDataList('refresh')
|
||||
}
|
||||
const handleReset = () =>{
|
||||
Object.assign(formData, initialForm);
|
||||
getDataList('refresh')
|
||||
}
|
||||
onMounted(async () => {
|
||||
// await loadLevelData('201');
|
||||
});
|
||||
onLoad(() => {
|
||||
// let token=uni.getStorageSync('fourLevelLinkage-token')
|
||||
// if(token){
|
||||
// $api.myRequest("/system/user/login/user/info", {}, "GET", 9100, {
|
||||
// Authorization: `Bearer ${uni.getStorageSync("fourLevelLinkage-token")}`
|
||||
// }).then(async (resData) => {
|
||||
|
||||
// await loadLevelData(resData.sysUser.dept.deptId);
|
||||
// getDictionary()
|
||||
// getDataList('refresh');
|
||||
// });
|
||||
// }else{
|
||||
// navTo('/packageB/login2');
|
||||
// }
|
||||
});
|
||||
function getDictionary(){
|
||||
$api.myRequest('/system/public/dict/data/type/assist_task_type').then((resData) => {
|
||||
if(resData && resData.code == 200){
|
||||
resData.data.forEach(item=>{
|
||||
const obj = {
|
||||
value: item.dictValue,
|
||||
text: item.dictLabel
|
||||
}
|
||||
taskTypeOptions.value.push(obj)
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
function getTaskTypeLabelByValue(value) {
|
||||
if (!Array.isArray(taskTypeOptions.value)) {
|
||||
return ''
|
||||
}
|
||||
const item = taskTypeOptions.value.find(item => item.value === String(value))
|
||||
return item ? item.text : '暂无帮扶类型'
|
||||
}
|
||||
// 加载某一级的数据(parentId 为空表示根)
|
||||
async function loadLevelData(parentId,node) {
|
||||
let header = {
|
||||
'Authorization': uni.getStorageSync('fourLevelLinkage-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 getDeptOptions(){
|
||||
let header={
|
||||
'Authorization':uni.getStorageSync('fourLevelLinkage-token'),
|
||||
'Content-Type': "application/x-www-form-urlencoded"
|
||||
}
|
||||
let params={
|
||||
parentId:''
|
||||
}
|
||||
$api.myRequest('/dispatch/dept/list', params,'get',9100,header).then((resData) => {
|
||||
});
|
||||
}
|
||||
function getDataList(type = 'add') {
|
||||
let maxPage=Math.ceil(totalNum.value/pageSize.value)
|
||||
let params=({...formData})
|
||||
let header={
|
||||
'Authorization':uni.getStorageSync('fourLevelLinkage-token'),
|
||||
'Content-Type': "application/x-www-form-urlencoded"
|
||||
}
|
||||
if (type === 'refresh') {
|
||||
pageNum.value = 1;
|
||||
params.pageSize=pageSize.value
|
||||
params.pageNum=pageNum.value
|
||||
$api.myRequest('/dispatch/assist/records/pageRecords', params,'get',9100,header).then((resData) => {
|
||||
if(resData&&resData.code == 200){
|
||||
dataList.value=resData.rows
|
||||
totalNum.value=resData.total
|
||||
}
|
||||
});
|
||||
}
|
||||
if (type === 'add' && pageNum.value < maxPage) {
|
||||
pageNum.value += 1;
|
||||
params.pageSize=pageSize.value
|
||||
params.pageNum=pageNum.value
|
||||
$api.myRequest('/dispatch/assist/records/pageRecords', params,'get',9100,header).then((resData) => {
|
||||
dataList.value=dataList.value.concat(resData.rows)
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
function goFollow(item) {
|
||||
navTo(`/packageB/priority/helpFollow?task_id=${item.task_id}&person_id=${item.person_id}&&name=${item.name}&&taskType=${getTaskTypeLabelByValue(item.task_type)}`);
|
||||
}
|
||||
//智能推荐
|
||||
const goRecommend = (item) => {
|
||||
navTo('/packageB/priority/recommend');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
|
||||
image
|
||||
height: 100%
|
||||
width: 100%
|
||||
|
||||
.main-list
|
||||
background-color: #ffffff
|
||||
padding: 20rpx 30rpx 28rpx 30rpx
|
||||
margin: 30rpx 30rpx
|
||||
box-shadow: 0px 3px 20px 0px rgba(0,105,234,0.1)
|
||||
border-radius: 12px
|
||||
.list-top
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
.list-title
|
||||
font-weight: bold
|
||||
font-size: 36rpx
|
||||
color: #404040
|
||||
position: relative
|
||||
|
||||
.title-line
|
||||
position: absolute
|
||||
bottom: -10rpx
|
||||
left: 36rpx
|
||||
width: 70rpx
|
||||
height: 8rpx
|
||||
background: linear-gradient(90deg, #FFAD58 0%, #FF7A5B 100%)
|
||||
border-radius: 4rpx
|
||||
.search-box-btn
|
||||
border-radius: 32rpx !important
|
||||
background: #3088FF !important
|
||||
margin-right: 16rpx
|
||||
.reset-box-btn
|
||||
border-radius: 32rpx !important
|
||||
background: #02B44D
|
||||
color: #fff
|
||||
.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,
|
||||
.picker
|
||||
background: #FFFFFF
|
||||
flex: 1
|
||||
min-width: 0
|
||||
.list-box
|
||||
margin-top: 40rpx
|
||||
.con-box
|
||||
background: #fff
|
||||
padding: 20rpx
|
||||
box-shadow: 0px 0px 6rpx 0px rgba(0,71,200,0.16)
|
||||
border-radius: 24rpx
|
||||
border: 1rpx solid #EDF5FF
|
||||
margin-top: 30rpx
|
||||
.form-title
|
||||
display: flex
|
||||
align-items: center
|
||||
|
||||
.form-name
|
||||
font-weight: bold
|
||||
font-size: 32rpx
|
||||
color: #595959
|
||||
margin-right:16rpx
|
||||
.form-type
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #FF7D26;
|
||||
font-size: 24rpx
|
||||
color: #F1690E
|
||||
padding: 4rpx 10rpx
|
||||
.form-item
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
margin-top: 30rpx
|
||||
.item-left
|
||||
display: flex
|
||||
align-items: center
|
||||
.item-img
|
||||
width: 26rpx
|
||||
height: 26rpx
|
||||
margin-right: 10rpx
|
||||
.item-label
|
||||
font-size: 26rpx
|
||||
color: #B3B3B3
|
||||
width: 130rpx
|
||||
.item-right
|
||||
font-size: 26rpx
|
||||
color: #737373
|
||||
overflow: hidden
|
||||
text-overflow: ellipsis
|
||||
white-space: nowrap
|
||||
.form-btns
|
||||
margin-top:30rpx
|
||||
.form-box-btn
|
||||
border-radius: 50rpx !important
|
||||
margin-right: 24rpx
|
||||
padding: 0rpx 40rpx
|
||||
.detail-btn
|
||||
background: #EDF5FF
|
||||
border: 1px solid #3088FF
|
||||
font-size: 28rpx
|
||||
color: #3088FF
|
||||
.follow-btn
|
||||
background: #EEF9F3
|
||||
border: 1px solid #00933E
|
||||
font-size: 28rpx
|
||||
color: #00933E
|
||||
.recommend-btn
|
||||
background: linear-gradient(92deg, #0DCCFF 0%, #4760FF 100%)
|
||||
font-size: 28rpx
|
||||
color: #FFFFFF
|
||||
</style>
|
||||
@@ -878,7 +878,7 @@ function navToService(serviceType) {
|
||||
// 'skill-evaluation': '/pages/service/skill-evaluation',
|
||||
"question-bank": "/pages/service/question-bank",
|
||||
"quality-assessment": "/pages/service/quality-assessment",
|
||||
"ai-interview": "/pages/chat/chat",
|
||||
"ai-interview": "/packageA/pages/chat/chat",
|
||||
"job-search": "/pages/search/search",
|
||||
"career-planning": "/pages/service/career-planning",
|
||||
"salary-query": "/pages/service/salary-query",
|
||||
|
||||
54
pages.json
54
pages.json
@@ -36,15 +36,6 @@
|
||||
"navigationBarTitleText": "搜索职位"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/chat/chat",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智能客服",
|
||||
"navigationBarBackgroundColor": "#4778EC",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/service/career-planning",
|
||||
"style": {
|
||||
@@ -319,6 +310,27 @@
|
||||
"navigationBarTitleText": "取消投递",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/agreement/user",
|
||||
"style": {
|
||||
"navigationBarTitleText": "隐私协议"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/agreement/privacy",
|
||||
"style": {
|
||||
"navigationBarTitleText": "隐私政策"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/chat/chat",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智能客服",
|
||||
"navigationBarBackgroundColor": "#4778EC",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -421,6 +433,30 @@
|
||||
"navigationBarTitleText": "推荐"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "priority/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "帮扶任务"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "priority/taskAssignment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "帮扶任务分配"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "priority/taskIssue",
|
||||
"style": {
|
||||
"navigationBarTitleText": "帮扶任务下发"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "priority/recordsManagement",
|
||||
"style": {
|
||||
"navigationBarTitleText": "帮扶记录管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "train/wrongAnswer/mistakeNotebook",
|
||||
"style": {
|
||||
|
||||
@@ -161,6 +161,12 @@
|
||||
</view>
|
||||
<view class="service-title">帮扶</view>
|
||||
</view>
|
||||
<view class="service-item press-button" v-if="isFourLevelLinkagePurview" @click="helpTaskClick">
|
||||
<view class="service-icon service-icon-1">
|
||||
<uni-icons type="shop" size="32" color="#FFFFFF"></uni-icons>
|
||||
</view>
|
||||
<view class="service-title">帮扶任务</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="handleNoticeClick">
|
||||
<view class="service-icon service-icon-10">
|
||||
<uni-icons type="sound" size="32" color="#FFFFFF"></uni-icons>
|
||||
@@ -299,7 +305,7 @@
|
||||
>
|
||||
<view v-for="(job, index) in list" :key="index" :slot="`slot${index}`">
|
||||
<view class="item btn-feel" v-if="!job.recommend">
|
||||
<view class="falls-card" @click="nextDetail(job)">
|
||||
<view class="falls-card" :class="{ 'disabled-card': Number(job.jobStatus) === 1 }" @click="nextDetail(job)">
|
||||
<view class="falls-card-pay">
|
||||
<view class="pay-text">
|
||||
<Salary-Expectation
|
||||
@@ -344,6 +350,17 @@
|
||||
{{ job.companyName }}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 招聘者显示上下架开关 -->
|
||||
<view class="falls-card-actions" v-if="isRecruiter">
|
||||
<view class="job-status-switch" @click.stop="toggleJobStatus(job)">
|
||||
<view class="switch-track" :class="{ 'active': Number(job.jobStatus) === 0 }">
|
||||
<view class="switch-thumb" :class="{ 'active': Number(job.jobStatus) === 0 }"></view>
|
||||
</view>
|
||||
<view class="switch-label">
|
||||
{{ Number(job.jobStatus) === 0 ? '已上架' : '已下架' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="falls-card-matchingrate">
|
||||
<view class=""><matchingDegree :job="job"></matchingDegree></view>
|
||||
<uni-icons type="star" size="30"></uni-icons>
|
||||
@@ -376,7 +393,7 @@
|
||||
>
|
||||
<template v-slot:default="job">
|
||||
<view class="item btn-feel" v-if="!job.recommend">
|
||||
<view class="falls-card" @click="nextDetail(job)">
|
||||
<view class="falls-card" :class="{ 'disabled-card': Number(job.jobStatus) === 1 }" @click="nextDetail(job)">
|
||||
<view class="falls-card-pay">
|
||||
<view class="pay-text">
|
||||
<Salary-Expectation
|
||||
@@ -421,6 +438,17 @@
|
||||
{{ job.companyName }}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 招聘者显示上下架开关 -->
|
||||
<view class="falls-card-actions" v-if="isRecruiter">
|
||||
<view class="job-status-switch" @click.stop="toggleJobStatus(job)">
|
||||
<view class="switch-track" :class="{ 'active': Number(job.jobStatus) === 0 }">
|
||||
<view class="switch-thumb" :class="{ 'active': Number(job.jobStatus) === 0 }"></view>
|
||||
</view>
|
||||
<view class="switch-label">
|
||||
{{ Number(job.jobStatus) === 0 ? '已上架' : '已下架' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="falls-card-matchingrate">
|
||||
<view class=""><matchingDegree :job="job"></matchingDegree></view>
|
||||
<uni-icons type="star" size="30"></uni-icons>
|
||||
@@ -550,6 +578,25 @@ const shouldShowCompanyContent = computed(() => {
|
||||
return userType === 0;
|
||||
});
|
||||
|
||||
// 判断当前用户是否为招聘者(企业用户)
|
||||
const isRecruiter = computed(() => {
|
||||
if (!hasLogin.value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 优先从store获取,如果为空则从缓存获取
|
||||
const storeIsCompanyUser = userInfo.value?.isCompanyUser;
|
||||
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||
const cachedIsCompanyUser = cachedUserInfo.isCompanyUser;
|
||||
|
||||
// 获取用户类型:优先使用store中的isCompanyUser,如果store中没有,使用缓存中的isCompanyUser
|
||||
// 缓存中的值可能是字符串,需要转换为数值类型
|
||||
const userType = storeIsCompanyUser !== undefined ? Number(storeIsCompanyUser) : Number(cachedIsCompanyUser);
|
||||
|
||||
// 企业用户(isCompanyUser=0)是招聘者
|
||||
return userType === 0;
|
||||
});
|
||||
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
const { getTransformChildren, oneDictData, dictLabel: getDictLabel, industryLabel } = useDictStore();
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
@@ -656,6 +703,9 @@ const state = reactive({
|
||||
const helpClick = () => {
|
||||
navTo('/packageB/priority/helpFilter');
|
||||
};
|
||||
const helpTaskClick = () =>{
|
||||
navTo('/packageB/priority/index');
|
||||
}
|
||||
//招聘会模块跳转
|
||||
const handleJobFairClick = () => {
|
||||
navTo('/pages/careerfair/careerfair');
|
||||
@@ -680,7 +730,7 @@ const rangeOptions = ref([
|
||||
{ value: 0, text: '推荐' },
|
||||
{ value: 1, text: '最热' },
|
||||
{ value: 2, text: '最新发布' },
|
||||
{ value: 3, text: '疆外' },
|
||||
// { value: 3, text: '疆外' },
|
||||
{ value: 4, text: '零工市场' }
|
||||
]);
|
||||
const isLoaded = ref(false);
|
||||
@@ -1015,7 +1065,7 @@ function navToService(serviceType) {
|
||||
// 'skill-evaluation': '/pages/service/skill-evaluation',
|
||||
'question-bank': '/pages/service/question-bank',
|
||||
// 'quality-assessment': '/packageCa/search/search',
|
||||
// 'ai-interview': '/pages/chat/chat',
|
||||
// 'ai-interview': '/packageA/pages/chat/chat',
|
||||
'job-search': '/pages/search/search',
|
||||
'career-planning': '/pages/service/career-planning',
|
||||
'salary-query': '/pages/service/salary-query',
|
||||
@@ -1135,6 +1185,9 @@ function getJobRecommend(type = 'add') {
|
||||
// 只有企业用户(isCompanyUser=0)才添加current字段
|
||||
if (userType === 0) {
|
||||
params.current = pageNull.value;
|
||||
} else {
|
||||
// 求职者只显示已上架的岗位(jobStatus=0)
|
||||
params.jobStatus = 0;
|
||||
}
|
||||
let comd = { recommend: true, jobCategory: '', tip: '确认你的兴趣,为您推荐更多合适的岗位' };
|
||||
$api.createRequest('/app/job/recommend', params).then((resData) => {
|
||||
@@ -1208,6 +1261,18 @@ function getJobList(type = 'add') {
|
||||
if (pageState.search.order === 3 || pageState.search.order === 4) {
|
||||
params.order = 0;
|
||||
}
|
||||
|
||||
// 判断用户类型,求职者只显示已上架的岗位(jobStatus=0)
|
||||
// 优先从store获取,如果为空则从缓存获取
|
||||
const storeIsCompanyUser = userInfo.value?.isCompanyUser;
|
||||
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||
const cachedIsCompanyUser = cachedUserInfo.isCompanyUser;
|
||||
const userType = storeIsCompanyUser !== undefined ? Number(storeIsCompanyUser) : Number(cachedIsCompanyUser);
|
||||
|
||||
// 如果不是企业用户(求职者),只显示已上架的岗位
|
||||
if (userType !== 0) {
|
||||
params.jobStatus = 0;
|
||||
}
|
||||
|
||||
$api.createRequest('/app/job/list', params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
@@ -1231,6 +1296,93 @@ function getJobList(type = 'add') {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 上架岗位
|
||||
const jobUp = (jobId) => {
|
||||
if (!checkLogin()) return;
|
||||
|
||||
uni.showLoading({
|
||||
title: '处理中...',
|
||||
mask: true
|
||||
});
|
||||
|
||||
$api.createRequest(`/app/job/jobUp/${jobId}`, {}, 'PUT', true).then((res) => {
|
||||
uni.hideLoading();
|
||||
$api.msg('上架成功');
|
||||
// 刷新数据
|
||||
if (state.tabIndex === 'all') {
|
||||
getJobRecommend('refresh');
|
||||
} else {
|
||||
getJobList('refresh');
|
||||
}
|
||||
}).catch((err) => {
|
||||
uni.hideLoading();
|
||||
console.error('上架失败:', err);
|
||||
$api.msg('上架失败,请重试');
|
||||
});
|
||||
};
|
||||
|
||||
// 下架岗位
|
||||
const jobDown = (jobId) => {
|
||||
if (!checkLogin()) return;
|
||||
|
||||
uni.showLoading({
|
||||
title: '处理中...',
|
||||
mask: true
|
||||
});
|
||||
|
||||
$api.createRequest(`/app/job/jobDown/${jobId}`, {}, 'PUT', true).then((res) => {
|
||||
uni.hideLoading();
|
||||
$api.msg('下架成功');
|
||||
// 刷新数据
|
||||
if (state.tabIndex === 'all') {
|
||||
getJobRecommend('refresh');
|
||||
} else {
|
||||
getJobList('refresh');
|
||||
}
|
||||
}).catch((err) => {
|
||||
uni.hideLoading();
|
||||
console.error('下架失败:', err);
|
||||
$api.msg('下架失败,请重试');
|
||||
});
|
||||
};
|
||||
|
||||
// 切换岗位状态(上架/下架)
|
||||
const toggleJobStatus = (job) => {
|
||||
if (!checkLogin()) return;
|
||||
|
||||
uni.showLoading({
|
||||
title: '处理中...',
|
||||
mask: true
|
||||
});
|
||||
|
||||
// 根据当前状态决定调用哪个接口
|
||||
const isCurrentlyUp = Number(job.jobStatus) === 0; // 0: 已上架, 1: 已下架
|
||||
const apiUrl = isCurrentlyUp ? `/app/job/jobDown/${job.jobId}` : `/app/job/jobUp/${job.jobId}`;
|
||||
|
||||
$api.createRequest(apiUrl, {}, 'PUT', true).then((res) => {
|
||||
uni.hideLoading();
|
||||
$api.msg(isCurrentlyUp ? '下架成功' : '上架成功');
|
||||
|
||||
// 更新本地数据状态,避免立即刷新整个列表
|
||||
const jobIndex = list.value.findIndex(item => item.jobId === job.jobId);
|
||||
if (jobIndex !== -1) {
|
||||
// 更新状态
|
||||
list.value[jobIndex].jobStatus = isCurrentlyUp ? 1 : 0;
|
||||
}
|
||||
|
||||
// 也可以选择刷新数据
|
||||
// if (state.tabIndex === 'all') {
|
||||
// getJobRecommend('refresh');
|
||||
// } else {
|
||||
// getJobList('refresh');
|
||||
// }
|
||||
}).catch((err) => {
|
||||
uni.hideLoading();
|
||||
console.error('操作失败:', err);
|
||||
$api.msg(isCurrentlyUp ? '下架失败,请重试' : '上架失败,请重试');
|
||||
});
|
||||
};
|
||||
const isFourLevelLinkagePurview=ref(false)
|
||||
const getIsFourLevelLinkagePurview=()=>{
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
@@ -2264,4 +2416,54 @@ defineExpose({ loadData });
|
||||
color: #FFFFFF
|
||||
text-align: center
|
||||
white-space: nowrap
|
||||
|
||||
// 上下架开关样式
|
||||
.falls-card-actions
|
||||
margin-top: 20rpx
|
||||
.job-status-switch
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
padding: 8rpx 0
|
||||
.switch-track
|
||||
width: 80rpx
|
||||
height: 40rpx
|
||||
background: #e0e0e0
|
||||
border-radius: 20rpx
|
||||
position: relative
|
||||
transition: all 0.3s ease
|
||||
cursor: pointer
|
||||
&.active
|
||||
background: #52c41a
|
||||
.switch-thumb
|
||||
position: absolute
|
||||
top: 4rpx
|
||||
left: 4rpx
|
||||
width: 32rpx
|
||||
height: 32rpx
|
||||
background: #ffffff
|
||||
border-radius: 50%
|
||||
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2)
|
||||
transition: all 0.3s ease
|
||||
&.active
|
||||
left: 44rpx
|
||||
.switch-label
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif
|
||||
font-weight: 500
|
||||
font-size: 24rpx
|
||||
color: #666666
|
||||
margin-left: 16rpx
|
||||
min-width: 80rpx
|
||||
text-align: center
|
||||
|
||||
// 下架后卡片置灰样式
|
||||
.disabled-card
|
||||
opacity: 0.6
|
||||
filter: grayscale(50%)
|
||||
background: #f8f8f8 !important
|
||||
.falls-card-title,
|
||||
.falls-card-company,
|
||||
.falls-card-pepleNumber,
|
||||
.falls-card-company2
|
||||
color: #999999 !important
|
||||
</style>
|
||||
|
||||
@@ -34,6 +34,15 @@
|
||||
{{ companyInfo.isVerified ? '已通过' : '未认证' }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="service-item btn-feel" @click="goToMessage">
|
||||
<view class="service-left">
|
||||
<uni-icons type="chat" size="20" color="#256BFA"></uni-icons>
|
||||
<text class="service-text">消息</text>
|
||||
</view>
|
||||
<view class="service-status">
|
||||
<uni-icons type="right" size="14" color="#909090"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="service-item btn-feel">
|
||||
<view class="service-left">
|
||||
<uni-icons type="notification" size="20" color="#256BFA"></uni-icons>
|
||||
@@ -83,6 +92,11 @@ function goToCompanyInfo() {
|
||||
navTo('/pages/mine/company-info');
|
||||
}
|
||||
|
||||
// 跳转到消息页面
|
||||
function goToMessage() {
|
||||
navTo('/pages/msglog/msglog');
|
||||
}
|
||||
|
||||
function logOut() {
|
||||
popup.value.open();
|
||||
}
|
||||
|
||||
@@ -96,6 +96,15 @@
|
||||
<uni-icons color="#909090" type="right" size="14"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-row btn-feel" @click="goToMessage()">
|
||||
<view class="row-left">
|
||||
<image class="left-img" src="@/static/tabbar/chat4.png"></image>
|
||||
<text class="left-text">消息</text>
|
||||
</view>
|
||||
<view class="row-right">
|
||||
<uni-icons color="#909090" type="right" size="14"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-row btn-feel">
|
||||
<view class="row-left">
|
||||
<image class="left-img" src="@/static/icon/server4.png"></image>
|
||||
@@ -218,6 +227,11 @@ function goCaAI(){
|
||||
navTo(`/packageCa/search/AIAudition?name=${userInfo.name}&userId=${userInfo.idCard}`);
|
||||
}
|
||||
|
||||
// 跳转到消息页面
|
||||
function goToMessage(){
|
||||
navTo('/pages/msglog/msglog');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
|
||||
BIN
static/tabbar/robot2.png
Normal file
BIN
static/tabbar/robot2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
Reference in New Issue
Block a user