Merge remote-tracking branch 'origin/main'

This commit is contained in:
MDSMO
2025-08-20 09:08:10 +08:00
13 changed files with 1369 additions and 550 deletions

View File

@@ -1,4 +1,4 @@
import request from '@/utils/request' import request from "@/utils/request";
/** /**
* 获取聊天历史记录 * 获取聊天历史记录
@@ -9,29 +9,24 @@ import request from '@/utils/request'
* @param {string} [params.beforeId] 获取此ID之前的记录 * @param {string} [params.beforeId] 获取此ID之前的记录
* @returns {Promise} 包含历史记录的Promise * @returns {Promise} 包含历史记录的Promise
*/ */
export const getHistory = ({ export const getHistory = ({ conversationId, user, limit = 20, beforeId }) => {
conversationId,
user,
limit = 20,
beforeId
}) => {
const params = { const params = {
conversationId, conversationId,
user, user,
limit limit,
} };
// 如果有beforeId参数添加到请求中后端参数名为firstId // 如果有beforeId参数添加到请求中后端参数名为firstId
if (beforeId) { if (beforeId) {
params.firstId = beforeId params.firstId = beforeId;
} }
return request({ return request({
url: '/aitutor/aichat/getMessagesToUser', url: "/aitutor/aichat/getMessagesToUser",
method: 'get', method: "get",
params params,
}) });
} };
/** /**
* 发送反馈(点赞/点踩) * 发送反馈(点赞/点踩)
@@ -41,21 +36,17 @@ export const getHistory = ({
* @param {string} params.user 用户ID * @param {string} params.user 用户ID
* @returns {Promise} 包含操作结果的Promise * @returns {Promise} 包含操作结果的Promise
*/ */
export const sendFeedback = ({ export const sendFeedback = ({ messageId, action, user }) => {
messageId,
action,
user
}) => {
return request({ return request({
url: '/aitutor/aichat/feedback', url: "/aitutor/aichat/feedback",
method: 'post', method: "post",
data: { data: {
message_id: messageId, message_id: messageId,
rating: action === 1 ? 'like' : 'dislike', rating: action === 1 ? "like" : "dislike",
user user,
} },
}) });
} };
/** /**
* 上传文件 * 上传文件
@@ -64,16 +55,16 @@ export const sendFeedback = ({
* @returns {Promise} 包含文件URL的Promise * @returns {Promise} 包含文件URL的Promise
*/ */
export const uploadFile = (formData, user) => { export const uploadFile = (formData, user) => {
formData.append('user', user) formData.append("user", user);
return request({ return request({
url: '/aitutor/aichat/files/upload', url: "/aitutor/aichat/files/upload",
method: 'post', method: "post",
data: formData, data: formData,
headers: { headers: {
'Content-Type': 'multipart/form-data' "Content-Type": "multipart/form-data",
} },
}) });
} };
/** /**
* 创建新会话 * 创建新会话
@@ -83,14 +74,14 @@ export const uploadFile = (formData, user) => {
*/ */
export const createConversation = (user, title) => { export const createConversation = (user, title) => {
return request({ return request({
url: '/aitutor/aichat/conversation/create', url: "/aitutor/aichat/conversation/create",
method: 'post', method: "post",
data: { data: {
user, user,
title title,
} },
}) });
} };
/** /**
* 删除会话 * 删除会话
@@ -100,11 +91,11 @@ export const createConversation = (user, title) => {
*/ */
export const deleteConversation = (conversationId, user) => { export const deleteConversation = (conversationId, user) => {
return request({ return request({
url: '/aitutor/aichat/conversation/delete', url: "/aitutor/aichat/conversation/delete",
method: 'post', method: "post",
data: { data: {
conversation_id: conversationId, conversation_id: conversationId,
user user,
} },
}) });
} };

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,7 @@ import {
getTokenKeySessionStorage, getTokenKeySessionStorage,
removeToken, removeToken,
setTokenKeySessionStorage, setTokenKeySessionStorage,
clearAllUserCache,
} from "@/utils/auth"; } from "@/utils/auth";
const user = { const user = {
@@ -92,7 +93,9 @@ const user = {
commit("SET_TOKEN", ""); commit("SET_TOKEN", "");
commit("SET_ROLES", []); commit("SET_ROLES", []);
commit("SET_PERMISSIONS", []); commit("SET_PERMISSIONS", []);
removeToken(); commit("SET_USERINFO", {});
// 清理所有用户相关的缓存数据包括conversation_id
clearAllUserCache();
resolve(); resolve();
}) })
.catch((error) => { .catch((error) => {
@@ -105,7 +108,11 @@ const user = {
FedLogOut({ commit }) { FedLogOut({ commit }) {
return new Promise((resolve) => { return new Promise((resolve) => {
commit("SET_TOKEN", ""); commit("SET_TOKEN", "");
removeToken(); commit("SET_ROLES", []);
commit("SET_PERMISSIONS", []);
commit("SET_USERINFO", {});
// 清理所有用户相关的缓存数据包括conversation_id
clearAllUserCache();
resolve(); resolve();
}); });
}, },

View File

@@ -5,7 +5,8 @@ import { showToast } from "@/utils/toast"; // 请替换为你的Toast组件
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
baseURL: process.env.VUE_APP_API_BASE_URL || 'http://localhost:8088', // baseURL: process.env.VUE_APP_API_BASE_URL || 'http://localhost:8088',
baseURL: process.env.VUE_APP_BASE_API,
timeout: 15000, timeout: 15000,
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",

View File

@@ -23,3 +23,28 @@ export function getTokenKeySessionStorage() {
export function removeToken() { export function removeToken() {
return Cookies.remove(TokenKey) return Cookies.remove(TokenKey)
} }
// 清理sessionStorage中的token
export function removeTokenFromSessionStorage() {
sessionStorage.removeItem(TokenKey)
}
// 清理AI聊天相关的localStorage数据
export function clearAIChatCache() {
localStorage.removeItem('conversation_id')
// 可以根据需要添加其他AI聊天相关的缓存清理
}
// 清理所有用户相关的缓存数据
export function clearAllUserCache() {
// 清理token相关
removeToken()
removeTokenFromSessionStorage()
// 清理AI聊天缓存
clearAIChatCache()
// 清理其他用户相关的localStorage数据
localStorage.removeItem('userId')
localStorage.removeItem('userName')
}

View File

@@ -1,15 +1,22 @@
<template> <template>
<div> <div>
<div class="six-action-container"> <div class="six-action-container">
<div style="padding: 1rem;" class="six-action-item" v-for="(v, i) in taskList" :key="i"> <div
<div class="bubble" style="padding: 1rem"
:style="{ backgroundImage: `url(${require('@/assets/index_bg/' + (i + 1) + '.png')})` }"> class="six-action-item"
v-for="(v, i) in taskList"
:key="i"
>
<div
class="bubble"
:style="{
backgroundImage: `url(${require('@/assets/index_bg/' +
(i + 1) +
'.png')})`,
}"
>
<div class="act-text"> <div class="act-text">
<div class="title">{{ v.label }}·待办</div>
<div class="title">
{{ v.label }}·待办
</div>
<div class="todo"> <div class="todo">
{{ v.value }} {{ v.value }}
</div> </div>
@@ -22,7 +29,6 @@
</template> </template>
<script> <script>
import { isEmpty } from "@/api/helpFunc"; import { isEmpty } from "@/api/helpFunc";
import { countDeptUnTodo as getUndo } from "@/api/workstudy/post"; import { countDeptUnTodo as getUndo } from "@/api/workstudy/post";
@@ -33,20 +39,21 @@ export default {
name: "zzbld-qgzx", name: "zzbld-qgzx",
data() { data() {
return { return {
hasPrem:false, hasPrem: false,
taskList: [ taskList: [],
],
myChartStyle: {
float: "left",
width: "400px",
height: "300px",
margin: 0,
}, //图表样式
myChartStyle: { float: "left", width: "400px", height: "300px", margin: 0 },//图表样式 init_park_list: [],
};
init_park_list: []
}
}, },
created() { created() {
if (checkPermi(['home:dept:qgzx'])) { if (checkPermi(["home:dept:qgzx"])) {
this.getUndo(); this.getUndo();
this.hasPrem = true; this.hasPrem = true;
} }
@@ -62,13 +69,13 @@ export default {
label: "部门·学生岗位审核", label: "部门·学生岗位审核",
name: "post", name: "post",
value: data.post, value: data.post,
url: "/workstudy/post/dept" url: "/workstudy/post/dept",
}); });
this.taskList.push({ this.taskList.push({
label: "部门·薪资审核", label: "部门·薪资审核",
name: "money", name: "money",
value: data.money, value: data.money,
url: "/workstudy/money/dept" url: "/workstudy/money/dept",
}); });
} }
}, },
@@ -78,10 +85,8 @@ export default {
this.$router.push(url); this.$router.push(url);
} }
}, },
} },
};
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@@ -111,7 +116,6 @@ export default {
z-index: 2; z-index: 2;
margin: 1rem; margin: 1rem;
.title { .title {
text-align: left; text-align: left;
font-size: 1.25rem; font-size: 1.25rem;

View File

@@ -67,6 +67,18 @@ export default {
value: 0, value: 0,
url: "/dormitory/stuDormitoryManage/fdys" url: "/dormitory/stuDormitoryManage/fdys"
}, },
{
label: "辅导员·学生证补办审核",
name: "xszb",
value: 0,
url: "/routine/sicr/counsellorExamine"
},
{
label: "辅导员·在校证明审核",
name: "zxzm",
value: 0,
url: "/routine/school/application"
},
{ {
label: "辅导员·任务管理审核", label: "辅导员·任务管理审核",
@@ -98,7 +110,21 @@ export default {
name: "knzzgl", name: "knzzgl",
value: 0, value: 0,
url: "/hard/gl/fdy" url: "/hard/gl/fdy"
} },
// 陈冠元
{
label: "辅导员·自治区人民政府奖学金审核",
name: "knzzzzq",
value: 0,
url: "/hard/zzq/fdy",
},
//知无涯
{
label: "辅导员·中职升高职补助审核",
name: "zsg",
value: 0,
url: "hard/zsg/fdy"
},
], ],

View File

@@ -1,13 +1,22 @@
<template> <template>
<div> <div>
<div class="six-action-container"> <div class="six-action-container">
<div style="padding: 1rem;" class="six-action-item" v-for="(v, i) in taskList" :key="i"> <div
<div class="bubble" style="padding: 1rem"
:style="{ backgroundImage: `url(${require('@/assets/index_bg/' + (i + 1) + '.png')})` }"> class="six-action-item"
v-for="(v, i) in taskList"
:key="i"
>
<div
class="bubble"
:style="{
backgroundImage: `url(${require('@/assets/index_bg/' +
(i + 1) +
'.png')})`,
}"
>
<div class="act-text"> <div class="act-text">
<div class="title"> <div class="title">{{ v.label }}·待办</div>
{{ v.label }}·待办
</div>
<div class="todo"> <div class="todo">
{{ v.value }} {{ v.value }}
</div> </div>
@@ -20,79 +29,115 @@
</template> </template>
<script> <script>
import { countJwcUnDo as countUndo } from "@/api/stuCQS/good/apply"; import { countJwcUnDo as countUndo } from "@/api/stuCQS/good/apply";
import { isEmpty } from "@/api/helpFunc"; import { isEmpty } from "@/api/helpFunc";
import { checkPermi } from "@/utils/permission"; import { checkPermi } from "@/utils/permission";
export default { export default {
name: "jwc-undo", name: "jwc-undo",
data() { data() {
return { return {
hasPrem:false, hasPrem: false,
taskList: [ taskList: [
{ {
label: "学工·评优评先审核", label: "学工·评优评先审核",
name: "good", name: "good",
value: 0, value: 0,
url: "/stuGood/about-good/jwc" url: "/stuGood/about-good/jwc",
}, },
{ {
label: "学工·静湖之星审核", label: "学工·静湖之星审核",
name: "lake", name: "lake",
value: 0, value: 0,
url: "/stuGood/about-lake/jwc" url: "/stuGood/about-lake/jwc",
}, },
{ {
label: "学工·优秀毕业生审核", label: "学工·优秀毕业生审核",
name: "biye", name: "biye",
value: 0, value: 0,
url: "/stuGood/good-graduate/jwc" url: "/stuGood/good-graduate/jwc",
}, },
{ {
label: "学工·困难认定审核", label: "学工·困难认定审核",
name: "kn", name: "kn",
value: 0, value: 0,
url: "/hard/pks/jwc" url: "/hard/pks/jwc",
}, },
{ {
label: "学工·助学金审核", label: "学工·助学金审核",
name: "zx", name: "zx",
value: 0, value: 0,
url: "/hard/zxj/jwc" url: "/hard/zxj/jwc",
}, },
{ {
label: "学工·宿舍管理审核", label: "学工·宿舍管理审核",
name: "dms", name: "dms",
value: 0, value: 0,
url: "/dormitory/stuDormitoryManage/final" url: "/dormitory/stuDormitoryManage/final",
}, },
{ {
label: "学工·任务管理审核", label: "学工·任务管理审核",
name: "rwgl", name: "rwgl",
value: 0, value: 0,
url: "/task/todo" url: "/task/todo",
}, },
{ {
label: "学工·困难资助审核", label: "学工·困难资助审核",
name: "knzz", name: "knzz",
value: 0, value: 0,
url: "hard/tufa/xg" url: "hard/tufa/xg",
}, },
// 宁博 // 宁博
{ {
label: "学工·国家励志奖学金审核", label: "学工·国家励志奖学金审核",
name: "knzzgl", name: "knzzgl",
value: 0, value: 0,
url: "/hard/gl/xg" url: "/hard/gl/xg",
} },
] // 陈冠元
{
} label: "学工·自治区人民政府奖学金审核",
name: "knzzzzq",
value: 0,
url: "/hard/zzq/xg",
},
{
label: "学工·学生证补办审核",
name: "xszb",
value: 0,
url: "/routine/sicr/learningIndustrialProductionAudit",
},
{
label: "学工·在校证明审核",
name: "zxzm",
value: 0,
url: "/routine/school/learning",
},
//知无涯 学工·中职升高职补助审核
{
label: "学工·中职升高职补助审核",
name: "zsg",
value: 0,
url: "/hard/zsg/xg",
},
{
label: "学工·辅导员综合绩效审核初审",
name: "jx",
value: 0,
url: "teacher/performance/evaluate/learn",
},
// 宁博
{
label: "学工·辅导员管理-成果绩效审核",
name: "cg",
value: 0,
url: "/teacher/achievement/achievementCheck",
},
],
};
}, },
created() { created() {
if (checkPermi(['home:xg:undo1'])) { if (checkPermi(["home:xg:undo1"])) {
this.countUndo(); this.countUndo();
this.hasPrem = true; this.hasPrem = true;
} }
@@ -102,8 +147,8 @@ export default {
let res = await countUndo(); let res = await countUndo();
if (res.code == 200) { if (res.code == 200) {
let data = [...res.data]; let data = [...res.data];
this.taskList.map(x => { this.taskList.map((x) => {
let temp = data.filter(y => y.startsWith(x.name)); let temp = data.filter((y) => y.startsWith(x.name));
if (!isEmpty(temp)) { if (!isEmpty(temp)) {
let result = temp[0].split("-")[1]; let result = temp[0].split("-")[1];
x.value = result; x.value = result;
@@ -117,10 +162,8 @@ export default {
this.$router.push(url); this.$router.push(url);
} }
}, },
} },
};
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@@ -150,7 +193,6 @@ export default {
z-index: 2; z-index: 2;
margin: 1rem; margin: 1rem;
.title { .title {
text-align: left; text-align: left;
font-size: 1.25rem; font-size: 1.25rem;

View File

@@ -1,13 +1,22 @@
<template> <template>
<div> <div>
<div class="six-action-container"> <div class="six-action-container">
<div style="padding: 1rem;" class="six-action-item" v-for="(v, i) in taskList" :key="i"> <div
<div class="bubble" style="padding: 1rem"
:style="{ backgroundImage: `url(${require('@/assets/index_bg/' + (i + 1) + '.png')})` }"> class="six-action-item"
v-for="(v, i) in taskList"
:key="i"
>
<div
class="bubble"
:style="{
backgroundImage: `url(${require('@/assets/index_bg/' +
(i + 1) +
'.png')})`,
}"
>
<div class="act-text"> <div class="act-text">
<div class="title"> <div class="title">{{ v.label }}·待办</div>
{{ v.label }}·待办
</div>
<div class="todo"> <div class="todo">
{{ v.value }} {{ v.value }}
</div> </div>
@@ -20,15 +29,14 @@
</template> </template>
<script> <script>
import { countSjUnDo as countUndo } from "@/api/stuCQS/good/apply";
import {countSjUnDo as countUndo} from "@/api/stuCQS/good/apply";
import { isEmpty } from "@/api/helpFunc"; import { isEmpty } from "@/api/helpFunc";
import { checkPermi } from "@/utils/permission"; import { checkPermi } from "@/utils/permission";
export default { export default {
name: "sj-undo", name: "sj-undo",
data() { data() {
return { return {
hasPrem:false, hasPrem: false,
taskList: [ taskList: [
{ {
@@ -36,13 +44,25 @@ export default {
name: "rwgl", name: "rwgl",
value: 0, value: 0,
url: "/task/todo", url: "/task/todo",
} },
] {
label: "书记·辅导员综合绩效审核",
} name: "jx",
value: 0,
url: "teacher/performance/evaluate/party",
},
// 宁博
{
label: "书记·辅导员管理-成果绩效审核",
name: "cg",
value: 0,
url: "/teacher/achievement/achievementCheck",
},
],
};
}, },
created() { created() {
if (checkPermi(['home:sj:undo1'])) { if (checkPermi(["home:sj:undo1"])) {
this.countUndo(); this.countUndo();
this.hasPrem = true; this.hasPrem = true;
} }
@@ -52,8 +72,8 @@ export default {
let res = await countUndo(); let res = await countUndo();
if (res.code == 200) { if (res.code == 200) {
let data = [...res.data]; let data = [...res.data];
this.taskList.map(x => { this.taskList.map((x) => {
let temp = data.filter(y => y.startsWith(x.name)); let temp = data.filter((y) => y.startsWith(x.name));
if (!isEmpty(temp)) { if (!isEmpty(temp)) {
let result = temp[0].split("-")[1]; let result = temp[0].split("-")[1];
x.value = result; x.value = result;
@@ -67,9 +87,8 @@ export default {
this.$router.push(url); this.$router.push(url);
} }
}, },
} },
};
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@@ -99,7 +118,6 @@ export default {
z-index: 2; z-index: 2;
margin: 1rem; margin: 1rem;
.title { .title {
text-align: left; text-align: left;
font-size: 1.25rem; font-size: 1.25rem;

View File

@@ -95,6 +95,20 @@ export default {
value: 0, value: 0,
url: "/hard/gl/xw", url: "/hard/gl/xw",
}, },
// 陈冠元
{
label: "学务·自治区人民政府奖学金审核",
name: "knzzzzq",
value: 0,
url: "/hard/zzq/xw",
},
// 宁博
{
label: "学务·辅导员管理-成果绩效审核",
name: "cg",
value: 0,
url: "/teacher/achievement/achievementCheck",
},
], ],
}; };
}, },

View File

@@ -70,6 +70,18 @@ export default {
value: data.workLog, value: data.workLog,
url: "/workstudy/worklog/zdls" url: "/workstudy/worklog/zdls"
}); });
this.taskList.push({
label: "学工处长综合绩效审核",
name: "jx",
value: data.jx || 0,
url: "teacher/performance/studentW/director"
});
this.taskList.push({
label: "科室综合绩效复核",
name: "jx",
value: data.jx || 0,
url: "teacher/performance/studentW/department"
});
} }
}, },

View File

@@ -372,7 +372,7 @@
</template> </template>
<template v-slot="scope"> <template v-slot="scope">
<button class="action-button" @click="going(scope.row.url)"> <button class="action-button" @click="going(scope.row.url)">
查看更多 点击前往处理
</button> </button>
</template> </template>
</el-table-column> </el-table-column>