Files
zhxg_app/pages/index/index.vue
Stickman ecc0d00a4f 辅导员管理-添加业绩考核个人填报详情和加分项、就业指导工作API
- 新增kpiFillingDetail函数用于获取业绩考核个人填报详情
- 新增加分项相关API:kpiFillingBonusPointsAdd、kpiFillingBonusPointsUpdate、
  kpiFillingBonusPointsDetail
- 新增就业指导工作相关API:kpiFillingGraduationGuidanceAdd、
  kpiFillingGraduationGuidanceUpdate、kpiFillingGraduationGuidanceDetail
- 添加TODO注释标记待后端API完成的功能

fix(pages): 解决部门名称存储问题

- 启用被注释掉的部门名称存储功能
- 确保deptName正确存入本地缓存

feat(performance): 支持毕业班和非毕业班不同考核标准

- 为考勤管理组件添加classType参数支持
- 为负面清单组件添加classType参数支持
- 为专业工作组件重构标签显示逻辑,支持根据classType动态显示
- 为奖励绩效加班组件添加classType参数支持
- 为学生突发事件组件添加classType参数支持
- 为学生管理组件添加毕业班/非毕业班差异化显示逻辑

refactor(performance): 优化业绩评估页面结构

- 添加班级类型选择按钮(毕业班/非毕业班)
- 在填报时间弹窗中集成班级类型选择功能
- 更新数据加载逻辑以支持classType参数
- 修正各种评分计算中的数值类型转换问题
```
2026-03-13 15:14:29 +08:00

476 lines
11 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- index/index.vue -->
<template>
<view class="index">
<!-- 头部个人信息 -->
<view class="header">
<view class="left">
<image :src="avater" mode=""></image>
</view>
<view class="right">
<text>账号{{username}}</text>
<text>姓名{{nickName}}</text>
<!-- <text>班级{{studentClass}}</text> -->
</view>
</view>
<uni-notice-bar show-icon scrollable :text="noticeText" />
<!-- 个人信息结束 -->
<!-- 工作台 -->
<view class="workbench">
<view class="workbench-grid" v-for="(item,index) in iconBoxList">
<view class="title">
{{item.meta.title}}
</view>
<view class="list">
<view class="item" v-for="(child,index) in item.children" :key="index"
@click="gotopage(child.component)">
<image :src="getImgUrl(child.path)" mode="aspectFit"></image>
<text> {{child.meta.title}}</text>
<text class="num" v-show="child.meta.title=='任务管理'&&total">{{total}}</text>
<text class="num" v-show="child.meta.title=='工作记录审核'&&qgzxLogTotal">{{qgzxLogTotal}}</text>
<text class="num" v-show="child.meta.title=='部门薪资审核'&&qgzxMenoyTotal">{{qgzxMenoyTotal}}</text>
</view>
</view>
</view>
</view>
<!-- AI 悬浮按钮 -->
<view class="ai-hover" @click="toAI">
<view class="ai-hover-content">
<image src="/static/iconAI.png" class="ai-hover-icon" mode="aspectFit"></image>
</view>
</view>
<!-- <view>{{log}}</view> -->
</view>
</view>
</template>
<script>
import {
getToken,
setToken
} from '@/utils/auth'
import {
getOwnInfo,
getInfo
} from "@/api/person/person.js";
import {
getUserProfile
} from "@/api/system/user.js";
import {
getRouters
} from '@/api/login'
import {
todoList
} from "@/api/task.js";
import {
listZdls as getList,
} from "@/api/workStudy/worklog";
import {
listDept as getMoneyList,
} from "@/api/workStudy/money";
import {
initCoze
} from "@/utils/ai.js";
import {
getAccessToken
} from "@/api/aiJWT/aiJWT.js"
export default {
data() {
return {
total: "",
qgzxLogTotal: "", //指导老师审核记录数量
qgzxMenoyTotal: "", //部门审核数据
avater: require('../../static/avatar2.png'),
nickName: '',
username: '',
studentId: "",
studentClass: "",
noticeText: "您好, ",
// 图标列表
iconBoxList: [], // [{
// img: require('../../static/images/workbench/degree-hat.png'),
// text: '学业奖学金',
// path: "/pages/award/award"
// },
// {
// img: require('../../static/images/workbench/Subtract.png'),
// text: '优秀毕业生',
// path: "/pages/graduate/graduate"
// },
// {
// img: require('../../static/images/workbench/peoples.png'),
// text: '三好学生',
// path: "/pages/student/student"
// },
// {
// img: require('../../static/images/workbench/effects.png'),
// text: '静湖之星',
// path: "/pages/star/star"
// },
// {
// img: require('../../static/images/workbench/finance.png'),
// text: '助学金',
// path: "/pages/Financialaid/Financialaid"
// },
// {
// img: require('../../static/images/workbench/Vector.png'),
// text: '贫困认定',
// path: "/pages/cognizance/cognizance"
// },
// {
// img: require('../../static/images/workbench/necktie.png'),
// text: '优秀学生干部',
// path: "/pages/cadre/cadre"
// },
// {
// img: require('../../static/images/workbench/add.png'),
// text: '思想品德加分',
// path: "/pages/add/add"
// }, {
// img: require('../../static/images/workbench/home.png'),
// text: '调宿管理',
// path: "/pages/administration/administration"
// },
// {
// img: require('../../static/images/workbench/calendar-alt.png'),
// text: '请假管理',
// // path: "/pages/applyleave/applyleave"
// path: "/pages/applyleave/list"
// },
// {
// img: require('../../static/images/workbench/ban.png'),
// text: '解除处分',
// path: "/pages/applyrelieve/applyrelieve"
// },
// {
// img: require('../../static/images/workbench/edit.png'),
// text: '任务管理',
// path: "/pages/Approval/Approval",
// num: this.total
// },
// {
// img: require('../../static/images/workbench/class-meeting.png'),
// text: '班会管理',
// path: "/pages/classMeeting/classMeeting",
// },
// {
// img: require('../../static/images/workbench/One-stop-management.png'),
// text: '一站式管理',
// path: "/pages/functionRoom/functionRoom",
// },
// {
// img: require('../../static/images/workbench/instructor.png'),
// text: '辅导员管理',
// path: "/pages/superintendent/index",
// }
// ]
log: "log",
// 新增AI聊天显示状态与聊天页同步
isAIChatVisible: true
}
},
onLoad(query) {
let ticket = query.jwt;
// console.log("jwt", ticket)
// this.log = '标题' + ticket + window.location.href
if (ticket) {
setToken(ticket);
this.getUserInfo();
this.getUndo();
this.getUserRouters();
this.getQgzxLogExamineTotal()
this.getqgzxMenoyTotal();
}
// 从本地存储获取AI状态
const aiStatus = uni.getStorageSync('aiVisibleStatus');
if (aiStatus !== null && aiStatus !== undefined) {
this.isAIChatVisible = aiStatus;
} else {
// 默认显示
this.isAIChatVisible = true;
uni.setStorageSync('aiVisibleStatus', true);
}
},
onShow() {
// 检查token是否存在
if (!getToken()) {
uni.showToast({
title: '请先登录',
icon: 'none'
});
uni.navigateTo({
url: '/pages/login/index'
});
return;
}
this.getUserInfo();
this.getUndo();
this.getUserRouters();
this.getQgzxLogExamineTotal()
this.getqgzxMenoyTotal();
// 页面显示时同步AI状态
this.isAIChatVisible = uni.getStorageSync('aiVisibleStatus') || true;
},
methods: {
getUserRouters() {
let params = {
menuUseful: 1
}
getRouters(params).then(res => {
console.log(res);
if (res.data.length > 0) {
this.iconBoxList = res.data[0].children;
}
});
},
getUndo() {
let sdata = {
pageNum: 1,
pageSize: 10
};
todoList(sdata).then(res => {
this.total = res.data.total;
// this.iconBoxList[11].num = this.total;
})
},
getQgzxLogExamineTotal() {
let sdata = {
pageNum: 1,
pageSize: 10
};
getList(sdata).then(res => {
this.qgzxLogTotal = res.total;
})
},
getqgzxMenoyTotal() {
let sdata = {
pageNum: 1,
pageSize: 10
};
getMoneyList(sdata).then(res => {
this.qgzxMenoyTotal = res.total;
})
},
// 页面调转
gotopage(path) {
uni.navigateTo({
url: path
})
},
// 跳转到特殊困难资助
goToSpecialAid() {
uni.navigateTo({
url: '/pages/finance/special/index'
})
},
// 跳转到中升高困难补助
goToKnzzZsg() {
uni.navigateTo({
url: '/pages/finance/knzzZsg/index'
})
},
// 跳转到励志奖学金
goToKnzzGl() {
uni.navigateTo({
url: '/pages/finance/knzzGl/index'
})
},
// 跳转到自治区奖学金
goToKnzzZzq() {
uni.navigateTo({
url: '/pages/finance/knzzZzq/index'
})
},
// 获取个人信息
getUserInfo() {
getUserProfile().then(res => {
if (res.code == 200) {
let data = {
...res.data
};
console.log(187, data)
uni.setStorageSync('stuName', data.nickName);
uni.setStorageSync('stuId', data.userId);
uni.setStorageSync("stuNo", data.userName)
uni.setStorageSync("deptName", data.dept.deptName)
uni.setStorageSync("roles", res.roleGroup)
this.nickName = data.nickName
this.username = data.userName
this.noticeText = "你好 " + this.nickName;
}
});
},
//组装图片路径
getImgUrl(name) {
return require('../../static/images/workbench/' + name + '.png');
},
//跳转到AI
toAI() {
uni.navigateTo({
url: '/pages/aiChat/simple_chat'
});
},
async getAccessToken() {
const res = await getAccessToken(); // 调用请求函数
const data = JSON.parse(res.data); // 解析数据
return data; // ✅ 返回 data
}
}
}
</script>
<style lang="less" scoped>
.index {
background-color: #F3F4F6;
padding-bottom: 10rpx;
min-height: 95vh;
}
.header {
display: flex;
align-items: center;
width: 100%;
height: 300rpx;
background: url("../../static/top.png");
padding: 0rpx 40rpx;
.left {
padding-top: 20rpx;
width: 170rpx;
height: 170rpx;
border-radius: 50%;
image {
width: 160rpx;
height: 160rpx;
}
}
.right {
display: flex;
flex-direction: column;
justify-content: space-around;
margin-left: 20rpx;
width: 65%;
height: 160rpx;
color: #fff;
text {
padding-top: 10rpx;
}
}
}
.workbench {
width: 100%;
padding: 5px 15px 0px;
.workbench-grid {
background-color: white;
margin-bottom: 10px;
padding: 20px 0;
border-radius: 10px;
.title {
color: gray;
font-size: 36rpx;
margin: 0 0 25px 15px;
}
.list {
display: flex;
flex-wrap: wrap;
.item {
position: relative;
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 50rpx;
color: #202020;
font-size: 27rpx;
image {
width: 80rpx;
height: 80rpx;
margin-bottom: 10rpx;
}
.num {
position: absolute;
background-color: red;
color: white;
right: 8px;
top: 0;
width: 50rpx;
height: 50rpx;
line-height: 50rpx;
border-radius: 50%;
text-align: center;
font-size: 30rpx;
}
}
}
}
}
// ai悬停
.ai-hover {
position: fixed;
bottom: 120rpx;
right: 40rpx;
z-index: 999;
width: 120rpx;
height: 120rpx;
border-radius: 50%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #fff;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
transition: all 0.3s ease;
border: 3px solid rgba(255, 255, 255, 0.2);
}
.ai-hover-content {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.ai-hover-icon {
width: 80rpx;
height: 80rpx;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
.ai-hover:active {
transform: scale(0.95);
}
.ai-hover:hover {
transform: scale(1.05);
box-shadow: 0 12px 25px rgba(102, 126, 234, 0.6);
}
</style>