Compare commits

..

3 Commits

Author SHA1 Message Date
Tang_kai
297d87b399 助管前端 2026-01-12 16:12:14 +08:00
汤凯
49d0c43a2a 2 2025-12-08 17:19:41 +08:00
汤凯
6dbbd47caf 1 2025-12-08 17:18:51 +08:00
9 changed files with 73 additions and 56 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@@ -15,7 +15,6 @@
<HelloWorld msg="Vite + Vue" /> -->
</template>
<script setup lang="ts">
import HelloWorld from "./components/HelloWorld.vue";
import TopHeader from "./components/TopHeader.vue";
import Header from "./components/Header.vue";

View File

@@ -38,7 +38,7 @@ let departmentList = [
{ key: "1", name: "电子信息工程系" },
{ key: "2", name: "通信工程系" },
// { key: "4", name: "本科实验教学中心" },
// { key: "4", name: "未知" },
{ key: "5", name: "数据统计" },
];
</script>

View File

@@ -1,21 +1,31 @@
<template>
<div class="w-full flex justify-between py-[18px] px-[40px] bg-white">
<div>
<img
src="../assets/web/statisTop.png"
alt=""
class="w-[167px] h-[60px]"
/>
<img src="../assets/web/weblogo1.png" alt="" class="w-[372px] h-[60px]" />
</div>
<div
v-if="userStore.userInfo && userStore.userInfo.data"
class="h-[48px] flex py-[6px] px-[14px] bg-[#F6F8FA] rounded-[10px]"
>
<div class="avatar"></div>
<div class="leading-[34px] ml-[10px]">
{{ userStore.userInfo.data.name }}
<el-popover placement="top-start" :width="120" trigger="hover">
<div
@click="toLogin"
class="px-[12px] py-[4px] cursor-pointer text-[#333] hover:bg-[#F5F5F5]"
>
重新登录
</div>
</div>
<template #reference>
<div
v-if="
userStore.userInfo &&
userStore.userInfo.data &&
route.path != '/login'
"
class="h-[48px] flex py-[6px] px-[14px] bg-[#F6F8FA] rounded-[10px] cursor-pointer"
>
<div class="avatar"></div>
<div class="leading-[34px] ml-[10px]">
{{ userStore.userInfo.data.name }}
</div>
</div>
</template>
</el-popover>
</div>
</template>
@@ -23,8 +33,13 @@
import { watch } from "vue";
import { useUserStore } from "@/store/user.ts";
import { useRouter, useRoute } from "vue-router";
const route = useRoute();
const router = useRouter();
let userStore: any = useUserStore();
function toLogin() {
router.push("/login");
}
</script>
<style scoped>

View File

@@ -28,17 +28,21 @@ export const LogoutAPI = (): Res<null> => instance.post("/admin/logout");
// post请求有参数,如传用户名和密码
export const loginAPI = (data: any): Res<any> =>
instance.post(
`/basic-api/auth/login?teacherId=${data.teacherId}&password=${data.password}`,
{}
`/basic-api/auth/login`,
// `/basic-api/auth/login`,
{ teacherId: data.teacherId, password: data.password }
);
// post请求 ,没参数,但要路径传参
export const StatusAPI = (data: ReqStatus): Res<null> =>
instance.post(`/productCategory?ids=${data.id}&navStatus=${data.navStatus}`);
instance.post(`/productCategory`, {
ids: data.id,
navStatus: data.navStatus,
});
// get请求没参数
export const getTeacherListApi = (params: any): Res<null> =>
instance.get(`/basic-api/mentors/lsit?id=${params}`);
instance.get(`/basic-api/mentors/list?id=${params}`);
export const getStuListApi = (params: any) =>
instance.get(`/basic-api/mentors/studentList?teacherId=${params.teacherId}`);
//获取用户信息

View File

@@ -75,44 +75,35 @@
<div class="text-[#333]">学生号:</div>
<div class="text-[#666]">{{ stuDetail.data.studentId || "-" }}</div>
</div>
<div class="flex mb-[10px]">
<!-- <div class="flex mb-[10px]">
<div class="text-[#333]">性别:</div>
<div class="text-[#666]">{{ stuDetail.data.gender || "-" }}</div>
</div>
</div> -->
<div class="flex mb-[10px]">
<div class="text-[#333]">院系:</div>
<div class="text-[#666]">
{{
(stuDetail.data.department && stuDetail.data.department.name) ||
"-"
}}
{{ stuDetail.data.departmentName || "-" }}
</div>
</div>
<div class="flex mb-[10px]">
<div class="text-[#333]">专业:</div>
<div class="text-[#666]">
{{ (stuDetail.data.major && stuDetail.data.major.name) || "-" }}
{{ stuDetail.data.majorName || "-" }}
</div>
</div>
<div class="flex mb-[10px]">
<div class="text-[#333]">级:</div>
<!-- <div class="flex mb-[10px]">
<div class="text-[#333]">级:</div>
<div class="text-[#666]">
{{
(stuDetail.data.academicClass &&
stuDetail.data.academicClass.name) ||
"-"
}}
{{ stuDetail.data.currentGrade || "-" }}
</div>
</div>
</div> -->
<div class="flex mb-[10px]">
<div class="text-[#333]">书院:</div>
<div class="text-[#666]">
{{
(stuDetail.data.college && stuDetail.data.college.name) || "-"
}}
{{ stuDetail.data.collegeName || "-" }}
</div>
</div>
<div class="flex mb-[10px]">
<!-- <div class="flex mb-[10px]">
<div class="text-[#333]">班级:</div>
<div class="text-[#666]">
{{
@@ -121,7 +112,7 @@
"-"
}}
</div>
</div>
</div> -->
<div>
<div class="mb-[10px]">学生评估:</div>
<el-input
@@ -158,7 +149,7 @@
</div>
</div>
<div class="flex mb-[10px]">
<div class="text-[#333]">性别:</div>
<div class="text-[#333]">性别:</div>
<div class="text-[#666]">
{{ teacherDail.data.gender || "-" }}
</div>
@@ -169,6 +160,12 @@
{{ teacherDail.data.birthYear || "-" }}
</div>
</div>
<div class="flex mb-[10px]">
<div class="text-[#333]">入职时间:</div>
<div class="text-[#666]">
{{ teacherDail.data.hireDate || "-" }}
</div>
</div>
<div class="flex mb-[10px]">
<div class="text-[#333]">职称:</div>
<div class="text-[#666]">
@@ -360,10 +357,11 @@ const columns = [
key: "collegeName",
},
{
title: "班级",
dataIndex: "collegeClassName",
key: "collegeClassName",
title: "辅导员",
dataIndex: "counselor",
key: "counselor",
},
{
title: "详情",
key: "action",
@@ -506,12 +504,10 @@ async function getStuList() {
if (res?.data?.students?.length) {
res?.data?.students.forEach((item) => {
item.collegeClassName = item?.collegeClass?.name || "-";
item.collegeName = item?.college?.name || "-";
item.majorName = item?.major?.name || "-";
item.departmentName = item?.department?.name || "-";
// item.collegeClassName = item.collegeClass.name;
// item.collegeClassName = item.collegeClass.name;
item.collegeName = item?.collegeName || "-";
item.majorName = item?.majorName || "-";
item.departmentName = item?.departmentName || "-";
item.counselor = item?.counselor || "-";
});
stuList.data.push(...res.data.students);
}

View File

@@ -113,8 +113,8 @@ const InputPassword = Input.Password;
const formRef = ref();
const loading = ref(false);
const formData: any = reactive({
teacherId: "995042",
password: "123456",
teacherId: "",
password: "",
});
async function handleLogin() {
// let res1 = await getTeacherListApi();

View File

@@ -1,14 +1,15 @@
<template>
<div class="sta_bg p-[20px] mt-[96px] relative">
<div class="absolute left-[250px] top-[-65px]">
<div class="sta_bg p-[20px] mt-[96px] relative pt-[50px]">
<div class="absolute left-[20px] top-[8px]">
<div class="mr-[20px]">
<!-- <Button type="primary" size="large" block @click="back"> 返回 </Button> -->
<div
<!-- <div
@click="back"
class="cursor-pointer px-[20px] py-[6px] rounded-[6px] bg-[#F5F6FA]"
>
< 返回
</div>
</div> -->
<el-button type="primary" @click="back">< 返回</el-button>
</div>
</div>
<div class="w-full h-[calc(100%-132px)]">

View File

@@ -34,7 +34,9 @@ export default defineConfig({
// target: 'http://lh.holo.huatengkexun.com/',
// target: "http://chen.hnedu.huatengkexun.com/",
// target: "https://hnaicm.admin.huatengkexun.com/",
target: " http://localhost:6669/",
// target: "https://tk2.aicm.huatengkexun.com/",
// target: "https://hnaicm.admin.huatengkexun.com/",
target: "http://localhost:6669/", //生产
changeOrigin: true,
// ws: true,