yangg il y a 2 jours
Parent
commit
00e7971122

+ 1 - 1
src/router/index.ts

@@ -105,7 +105,7 @@ router.beforeEach(async (to, from, next) => {
     NProgress.configure({showSpinner: false});
     if (to.meta.title) NProgress.start();
     const token = Session.get('token');
-    if (to.path === '/login'|| to.path === '/superlogin' && !token) {
+    if (to.path === '/login'|| to.path === '/superlogin' ||to.path==='/user-agreement' ||to.path==='/privacy-policy'&& !token) {
         next();
         NProgress.done();
     } else {

+ 18 - 0
src/router/route.ts

@@ -97,6 +97,24 @@ export const staticRoutes: Array<RouteRecordRaw> = [
 			title: '登录',
 		},
 	},
+	{
+		path: '/user-agreement',
+		name: 'userAgreementPublic',
+		component: () => import('/@/views/system/UserAgreement/view.vue'),
+		meta: {
+			title: '用户服务协议',
+			
+		},
+	},
+	{
+		path: '/privacy-policy',
+		name: 'privacyPolicyPublic',
+		component: () => import('/@/views/system/UserAgreement/view.vue'),
+		meta: {
+			title: '隐私协议',
+			
+		},
+	},
 	{
 		path: '/superlogin',
 		name: 'superlogin',

+ 7 - 0
src/views/JobApplication/list/crud.tsx

@@ -293,6 +293,13 @@ export const createCrudOptions = function ({ crudExpose, context}: CreateCrudOpt
 								return;
 							}
 
+							// 检查是否选择了状态为"已面试待处理"(status=2)的申请
+							const hasInterviewedPending = selection.some((row: any) => row.status === 2);
+							if (hasInterviewedPending) {
+								warningMessage('请先修改为状态后再进行短信通知');
+								return;
+							}
+
 							// 打开批量短信通知对话框
 							context.openSmsNotification(selection);
 						}

+ 1 - 1
src/views/position/detail/index.vue

@@ -4960,7 +4960,7 @@ const editAIVideo = async (step: AIVideoStep) => {
     });
   }
   if (step.name === '综合素质考察') {
-    GetQuestionList({ page: 1, limit: 20 }).then((res: any) => {
+    GetQuestionList({ page: 1, limit: 20, question_form: "1,2,3,4,6" }).then((res: any) => {
       if (res.data) {
         questionList.value = res.data.items;
         questionListpage.page = res.data.page;

+ 8 - 0
src/views/system/UserAgreement/api.ts

@@ -40,3 +40,11 @@ export function DelObj(id: DelReq) {
 		data: { id,tenant_id:Session.get('tenant_id')},
 	});
 }
+
+/*  */
+export function GetObjByPath(id: number) {
+	return request({
+		url:`/api/platform/agreements/${id}/`,
+		method: 'get',
+	});
+}

+ 92 - 0
src/views/system/UserAgreement/view.vue

@@ -0,0 +1,92 @@
+<template>
+    <div class="agreement-page">
+        <div class="agreement-header">
+            <h2>{{ pageTitle }}</h2>
+        </div>
+        <el-scrollbar class="agreement-content" v-loading="loading">
+            <div v-if="error" class="agreement-error">{{ error }}</div>
+            <div v-else v-html="htmlContent"></div>
+        </el-scrollbar>
+    </div>
+</template>
+
+<script setup lang="ts">
+import { onMounted, ref, computed } from 'vue';
+import { useRoute } from 'vue-router';
+import { GetObjByPath } from './api';
+
+const route = useRoute();
+
+const loading = ref(false);
+const error = ref('');
+const htmlContent = ref('');
+
+// 根据路径名默认映射 ID;也支持通过 ?id= 覆盖
+const defaultIdByPath: Record<string, number> = {
+    '/user-agreement': 3,
+    '/privacy-policy': 4,
+};
+
+const currentId = computed(() => {
+    const qid = Number(route.query.id);
+    if (!Number.isNaN(qid) && qid > 0) return qid;
+    return defaultIdByPath[route.path] ?? 3;
+});
+
+const pageTitle = computed(() => {
+    if (route.path === '/privacy-policy') return '隐私协议';
+    return '用户服务协议';
+});
+
+const parseContent = (data: any): string => {
+    // 兼容不同字段命名
+    return (
+        data?.content_html ||
+        data?.content ||
+        data?.detail ||
+        data?.description ||
+        ''
+    );
+};
+
+const fetchAgreement = async () => {
+    loading.value = true;
+    error.value = '';
+    htmlContent.value = '';
+    try {
+        const res: any = await GetObjByPath(currentId.value as any);
+        // 兼容 service 里 code=200 / 2000 的返回
+        const payload = res?.data ?? res;
+        htmlContent.value = parseContent(payload) || '<p>暂无内容</p>';
+    } catch (e: any) {
+        error.value = e?.msg || '内容加载失败';
+    } finally {
+        loading.value = false;
+    }
+};
+
+onMounted(fetchAgreement);
+</script>
+
+<style scoped lang="scss">
+.agreement-page {
+    display: flex;
+    flex-direction: column;
+    width: 100%;
+    height: 100vh;
+    background: #fff;
+}
+.agreement-header {
+    padding: 16px 20px;
+    border-bottom: 1px solid #f0f0f0;
+}
+.agreement-content {
+    padding: 20px;
+    height: calc(100vh - 64px);
+}
+.agreement-error {
+    color: #f56c6c;
+}
+</style>
+
+

+ 2 - 2
src/views/system/login/component/account.vue

@@ -49,9 +49,9 @@
 		<el-form-item>
 			<el-checkbox v-model="state.agreePolicy">
 				已阅读并同意
-				<a href="/user-agreement" target="_blank" class="login-link">《用户服务协议》</a>
+				<a href="http://192.168.100.247:8080/#/user-agreement" target="_blank" rel="noopener" class="login-link">《用户服务协议》</a>
-				<a href="/privacy-policy" target="_blank" class="login-link">《隐私协议》</a>
+				<a href="http://192.168.100.247:8080/#/privacy-policy" target="_blank" rel="noopener" class="login-link">《隐私协议》</a>
 			</el-checkbox>
 		</el-form-item>
 		<el-form-item class="login-animation4">

+ 4 - 4
src/views/talent/overseas/index.vue

@@ -45,21 +45,21 @@
 					</div>
 					
 					<!-- 状态6 -->
-					<div class="tree-item" :class="{ active: activeNode === 'status-6' }" @click="handleNodeClick({ type: 'status', value: 7, id: 'status-6' })">
+					<div class="tree-item" :class="{ active: activeNode === 'status-6' }" @click="handleNodeClick({ type: 'status', value: 6, id: 'status-6' })">
 						<div class="item-content">
 							<el-icon><RefreshRight /></el-icon>
 							<span>曾就职</span>
 						</div>
-						<div class="item-count" v-if="statusCounts['7']">{{ statusCounts['7'] }}</div>
+						<div class="item-count" v-if="statusCounts['6']">{{ statusCounts['6'] }}</div>
 					</div>
 					
 					<!-- 状态7 -->
-					<div class="tree-item" :class="{ active: activeNode === 'status-7' }" @click="handleNodeClick({ type: 'status', value: 6, id: 'status-7' })">
+					<div class="tree-item" :class="{ active: activeNode === 'status-7' }" @click="handleNodeClick({ type: 'status', value: 7, id: 'status-7' })">
 						<div class="item-content">
 							<el-icon><RefreshRight /></el-icon>
 							<span>拒不录用</span>
 						</div>
-						<div class="item-count" v-if="statusCounts['6']">{{ statusCounts['6'] }}</div>
+						<div class="item-count" v-if="statusCounts['7']">{{ statusCounts['7'] }}</div>
 					</div>
 					
 					<!-- 曾就职 -->