修改行政人员登入
This commit is contained in:
parent
d3e4bf733e
commit
fa6c669b86
|
@ -91,6 +91,14 @@ export async function checkUser(code) {
|
||||||
});
|
});
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
//检查用户身份
|
||||||
|
export async function checkUserByEmployeeCode(employeeCode,code) {
|
||||||
|
const response = await http.post('/h5/cees/ceesUser/checkUserByEmployeeCode', {
|
||||||
|
workNumber: employeeCode,
|
||||||
|
userId: code,
|
||||||
|
});
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
// 研究生保存数据
|
// 研究生保存数据
|
||||||
export function save(data) {
|
export function save(data) {
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.4 MiB |
|
@ -1,5 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<van-nav-bar :title="$t($route.meta.title as string)" :left-arrow="true" @click-left="goBack" />
|
<!-- ✅ 根据 meta.showHeader 控制 van-nav-bar 是否显示 -->
|
||||||
|
<van-nav-bar
|
||||||
|
v-if="$route.meta.showHeader !== false"
|
||||||
|
:title="$t($route.meta.title as string)"
|
||||||
|
:left-arrow="true"
|
||||||
|
@click-left="goBack"
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="main-page">
|
<div class="main-page">
|
||||||
<RouterView v-slot="{ Component }" v-if="$route.meta.keepAlive">
|
<RouterView v-slot="{ Component }" v-if="$route.meta.keepAlive">
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
|
@ -27,7 +34,7 @@
|
||||||
|
|
||||||
.main-page {
|
.main-page {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: calc(100vh - 92px); // 减去导航栏高度
|
//height: calc(100vh - 92px); // 减去导航栏高度
|
||||||
overflow-y: auto; // 使用 auto 而不是 scroll,避免不必要的滚动条
|
overflow-y: auto; // 使用 auto 而不是 scroll,避免不必要的滚动条
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
//padding: 16px; // 添加内边距,使内容不紧贴边缘
|
//padding: 16px; // 添加内边距,使内容不紧贴边缘
|
||||||
|
|
|
@ -10,6 +10,7 @@ export const routes = [
|
||||||
meta: {
|
meta: {
|
||||||
title: '哈尔滨师范大学评卷报名系统',
|
title: '哈尔滨师范大学评卷报名系统',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
showHeader: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -19,6 +20,7 @@ export const routes = [
|
||||||
meta: {
|
meta: {
|
||||||
title: '哈尔滨师范大学评卷报名系统',
|
title: '哈尔滨师范大学评卷报名系统',
|
||||||
border: false,
|
border: false,
|
||||||
|
showHeader: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -28,6 +30,8 @@ export const routes = [
|
||||||
meta: {
|
meta: {
|
||||||
title: '哈尔滨师范大学评卷报名系统',
|
title: '哈尔滨师范大学评卷报名系统',
|
||||||
border: false,
|
border: false,
|
||||||
|
showHeader: false,
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -37,6 +41,8 @@ export const routes = [
|
||||||
meta: {
|
meta: {
|
||||||
title: '哈尔滨师范大学评卷报名系统',
|
title: '哈尔滨师范大学评卷报名系统',
|
||||||
border: false,
|
border: false,
|
||||||
|
showHeader: false,
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -46,6 +52,8 @@ export const routes = [
|
||||||
meta: {
|
meta: {
|
||||||
title: '哈尔滨师范大学评卷报名系统',
|
title: '哈尔滨师范大学评卷报名系统',
|
||||||
border: false,
|
border: false,
|
||||||
|
showHeader: false,
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -55,6 +63,8 @@ export const routes = [
|
||||||
meta: {
|
meta: {
|
||||||
title: '哈尔滨师范大学评卷报名系统',
|
title: '哈尔滨师范大学评卷报名系统',
|
||||||
border: false,
|
border: false,
|
||||||
|
showHeader: false,
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -64,6 +74,8 @@ export const routes = [
|
||||||
meta: {
|
meta: {
|
||||||
title: '哈尔滨师范大学评卷报名系统',
|
title: '哈尔滨师范大学评卷报名系统',
|
||||||
border: false,
|
border: false,
|
||||||
|
showHeader: false,
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -73,6 +85,7 @@ export const routes = [
|
||||||
meta: {
|
meta: {
|
||||||
title: '哈尔滨师范大学评卷报名系统',
|
title: '哈尔滨师范大学评卷报名系统',
|
||||||
border: false,
|
border: false,
|
||||||
|
showHeader: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
import { showDialog } from 'vant';
|
||||||
|
|
||||||
|
export function showInputDialog({ title, message, placeholder = '请输入内容' }) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let inputValue = '';
|
||||||
|
showDialog({
|
||||||
|
title,
|
||||||
|
allowHtml: true,
|
||||||
|
message: `
|
||||||
|
<div style="margin-bottom: 10px;">${message}</div>
|
||||||
|
<input id="custom-input" placeholder="${placeholder}" style="width: 100%; padding: 6px; border: 1px solid #ccc; border-radius: 4px;" />
|
||||||
|
`,
|
||||||
|
showCancelButton: true,
|
||||||
|
beforeClose: (action) => {
|
||||||
|
if (action === 'confirm') {
|
||||||
|
const val = (document.getElementById('custom-input') as HTMLInputElement)?.value;
|
||||||
|
if (!val) {
|
||||||
|
(document.getElementById('custom-input') as HTMLInputElement).style.border = '1px solid red';
|
||||||
|
return false; // 阻止关闭
|
||||||
|
}
|
||||||
|
inputValue = val;
|
||||||
|
}
|
||||||
|
return true; // 允许关闭
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(() => resolve(inputValue))
|
||||||
|
.catch(() => reject());
|
||||||
|
});
|
||||||
|
}
|
|
@ -31,8 +31,9 @@
|
||||||
import { onMounted, ref, } from 'vue';
|
import { onMounted, ref, } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { showDialog,showNotify, showConfirmDialog,showFailToast } from 'vant';
|
import { showDialog,showNotify, showConfirmDialog,showFailToast } from 'vant';
|
||||||
import { getAccessTime,getMajor, checkUser,getCode, getUserInfo,AutocheckUser } from '@/api';
|
import { getAccessTime,getMajor, checkUser,getCode, getUserInfo,AutocheckUser,checkUserByEmployeeCode } from '@/api';
|
||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
|
import { showInputDialog } from '@/utils/request/showInputDialog';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -287,14 +288,52 @@ async function login() {
|
||||||
});
|
});
|
||||||
} else if (res.result.identity === 1) {
|
} else if (res.result.identity === 1) {
|
||||||
// 行政人员
|
// 行政人员
|
||||||
showConfirmDialog({
|
//showConfirmDialog({
|
||||||
|
// title: '工号确认',
|
||||||
|
// allowHtml: true,
|
||||||
|
// confirmButtonColor: '#8D2328',
|
||||||
|
// message: `<p style="text-align: left;text-indent:24px"><span style="font-weight: 700">${res.result.userName}</span>同志,已在2024年哈尔滨师范大学评卷数据库中检索到您的信息,请点击确认查看您的分工。</p>`,
|
||||||
|
//})
|
||||||
|
// .then(() => {
|
||||||
|
// checkUser(code).then((res) => {
|
||||||
|
//if (res.result.code == 500) {
|
||||||
|
// loading.value = false;
|
||||||
|
// show.value = false;
|
||||||
|
// store.logout();
|
||||||
|
// alert(res.result.message);
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
//// 未填写信息
|
||||||
|
//if (res.result.status == '1') {
|
||||||
|
// showNotify({ type: 'success', message: '登录成功' });
|
||||||
|
// loading.value = false;
|
||||||
|
// show.value = false;
|
||||||
|
// store.login(res.result);
|
||||||
|
// router.push(res.result.router);
|
||||||
|
//}
|
||||||
|
//// 填写过信息
|
||||||
|
//if (res.result.status == '2') {
|
||||||
|
// showNotify({ type: 'success', message: '登录成功' });
|
||||||
|
// loading.value = false;
|
||||||
|
// show.value = false;
|
||||||
|
// localStorage.clear();
|
||||||
|
|
||||||
|
// store.login(res.result);
|
||||||
|
// store.setUserId(res.result.userId);
|
||||||
|
// store.setGroupId(res.result.groupId);
|
||||||
|
// router.push(res.result.router);
|
||||||
|
//}
|
||||||
|
// });
|
||||||
|
// })
|
||||||
|
// .catch(() => {});
|
||||||
|
showInputDialog({
|
||||||
title: '工号确认',
|
title: '工号确认',
|
||||||
allowHtml: true,
|
message: '请输入您的工号以继续操作',
|
||||||
confirmButtonColor: '#8D2328',
|
placeholder: '请输入工号',
|
||||||
message: `<p style="text-align: left;text-indent:24px"><span style="font-weight: 700">${res.result.userName}</span>同志,已在2024年哈尔滨师范大学评卷数据库中检索到您的信息,请点击确认查看您的分工。</p>`,
|
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then((employeeCode) => {
|
||||||
checkUser(code).then((res) => {
|
// 调用后端接口
|
||||||
|
checkUserByEmployeeCode(employeeCode,code).then((res) => {
|
||||||
if (res.result.code == 500) {
|
if (res.result.code == 500) {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
show.value = false;
|
show.value = false;
|
||||||
|
@ -324,7 +363,9 @@ async function login() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
console.log('用户取消输入');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -307,7 +307,7 @@
|
||||||
<div class="ditu-img" v-if="show1">
|
<div class="ditu-img" v-if="show1">
|
||||||
<span @click="show1 = false"> 关闭 ✕ </span>
|
<span @click="show1 = false"> 关闭 ✕ </span>
|
||||||
<div class="card-img">
|
<div class="card-img">
|
||||||
<img src="@/assets/orangeUi/ditu.jpg" style="width: 100%; height: 100%" alt="师大地图" />
|
<img src="@/assets/Ui/地图.png" style="width: 100%; height: 100%" alt="师大地图" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p style="color: white;">师大地图</p>
|
<p style="color: white;">师大地图</p>
|
||||||
|
@ -392,8 +392,8 @@
|
||||||
<div class="grop-by">
|
<div class="grop-by">
|
||||||
评卷地点信息
|
评卷地点信息
|
||||||
<p>暂时未发布</p>
|
<p>暂时未发布</p>
|
||||||
<!-- <p v-if="!group">暂时未发布</p>-->
|
<p v-if="!group">暂时未发布</p>
|
||||||
<!-- <p v-else>{{ group }}</p>-->
|
<p v-else>{{ group }}</p>
|
||||||
</div>
|
</div>
|
||||||
<!-- <img src="@/assets/img/dt.jpg"/>-->
|
<!-- <img src="@/assets/img/dt.jpg"/>-->
|
||||||
<span class="dialog-close-content" @click="show5 = false">×</span>
|
<span class="dialog-close-content" @click="show5 = false">×</span>
|
||||||
|
@ -852,5 +852,4 @@
|
||||||
margin-right: -20px;
|
margin-right: -20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue