Files
zhxg_app/pages/instructor/performance-appraisal/components/student-emergencies.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

233 lines
5.2 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.

<template>
<view class="container">
<view class="tip">
<label>本月已提交{{total}}</label>
<!-- <uni-icons type="right" size="16" color="#202020"></uni-icons> -->
</view>
<scroll-view @scrolltolower="scrolltolower" scroll-y="true" style="height:calc(100vh - 150rpx);">
<uni-swipe-action>
<view class="list">
<view class="row" v-for="item in list" :key="item.id" @tap="toDetail(item.id)">
<uni-swipe-action-item :right-options="actionOptions" @tap="onDel(item.id)">
<view class="top">
<label>{{item.eventLevel==0?'一般事件':'重大事件'}}</label>
<uni-icons type="right" size="16" color="#202020"></uni-icons>
</view>
<view class="bottom">
<view class="desc">
{{item.eventDescription}}
</view>
<view>
起止时间{{item.startTime}}~{{item.endTime}}
</view>
</view>
</uni-swipe-action-item>
</view>
</view>
</uni-swipe-action>
<view class="empty" v-if="list.length==0">
<image src="@/static/empty.png" mode="widthFix"></image>
暂时没有数据
</view>
<view class="loading-more" v-if="loading">
<uni-load-more status="loading" />
</view>
<view class="no-more" v-if="!loading&&list.length!=0">
到底啦~~
</view>
</scroll-view>
<view class="add" @tap="addEvidence" v-if="commitStatus!=1">
+
</view>
</view>
</template>
<script>
import {
listkpiFillingStuEmergency,
delkpiFillingStuEmergency
} from "@/api/instructor/studentEmergencies.js"
export default {
props: ["queryDetailParams", "commitStatus", "classType"],
data() {
return {
actionOptions: [{
text: '删除',
style: {
width: "200px",
backgroundColor: '#df0000'
}
}],
formData: {
id: ""
},
query: {},
list: [],
totalPage: 0,
total: 0,
loading: false
}
},
mounted() {
this.query = {
...this.queryDetailParams,
classType: this.classType,
fdyName: uni.getStorageSync("stuName"),
pageNum: 1,
pageSize: 10,
}
uni.$on('refreshStuEmergencyList', this.getlistkpiFillingStuEmergency);
this.getlistkpiFillingStuEmergency();
},
beforeDestroy() {
uni.$off('refreshStuEmergencyList', this.getlistkpiFillingStuEmergency);
},
methods: {
toDetail(id) {
uni.navigateTo({
url: `../performance-evaluation/student-emergencies-materials/detail?id=${id}&commitStatus=${this.commitStatus}`
})
},
scrolltolower() {
console.log('下');
if (this.query.pageNum < this.totalPages) {
this.query.pageNum++;
this.loading = true;
setTimeout(() => {
this.getlistkpiFillingStuEmergency()
}, 1000)
} else {
}
},
async getlistkpiFillingStuEmergency() {
let res = await listkpiFillingStuEmergency(this.query);
if (res.code == 200) {
this.loading = false;
if (this.query.pageNum == 1) {
this.list = res.rows; // 如果是第一页,直接显示新数据
this.total = res.total; // 如果是第一页,直接显示新数据
console.log(res);
} else {
this.list = this.list.concat(res.rows); // 否则追加新数据到列表中
}
this.totalPages = Math.ceil(res.total / this.query.pageSize);
}
},
addEvidence() {
uni.navigateTo({
url: `../performance-evaluation/student-emergencies-materials/add?year=${this.query.fillingYear}&month=${this.query.fillingMonth}`
})
},
getFormData() {
return this.formData;
},
onDel(id) {
console.log(id);
uni.showModal({
title: "确定删除吗?",
success: (res) => {
if (res.confirm) {
delkpiFillingStuEmergency(id).then(res => {
if (res.code == 200) {
uni.showToast({
title: "删除成功"
})
this.getlistkpiFillingStuEmergency();
}
})
}
}
})
}
}
}
</script>
<style scoped lang="scss">
.container {
.add {
background-color: #1890FF;
width: 90rpx;
height: 90rpx;
border-radius: 50%;
color: white;
display: flex;
justify-content: center;
align-items: center;
font-size: 60rpx;
position: fixed;
bottom: 80px;
right: 25px;
}
.tip {
padding: 22rpx 40rpx 22rpx 40rpx;
background-color: white;
margin-bottom: 30rpx;
border-radius: 16rpx;
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
left: 40rpx;
right: 40rpx;
z-index: 2;
box-shadow: 0 0 2px 0px #dadada;
}
.no-more {
text-align: center;
color: gray;
padding-bottom: 10px;
}
.empty {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 200rpx;
color: #9E9E9E;
font-size: 36rpx;
image {
width: 250rpx;
margin-bottom: 50rpx;
}
}
.list {
padding-top: 120rpx;
}
.row {
padding: 22rpx 40rpx 22rpx 40rpx;
background-color: white;
margin-bottom: 30rpx;
border-radius: 16rpx;
.uni-icons {
opacity: 0.5;
}
.top {
display: flex;
justify-content: space-between;
align-items: center;
font-weight: bold;
border-bottom: 1px solid #F5F5F7;
padding-bottom: 22rpx;
}
.bottom {
color: #9C9C9C;
padding-top: 22rpx;
.desc {
color: #404040;
margin-bottom: 15rpx;
}
}
}
}
</style>