清理分析:下线旧成绩与时空分析残留入口
This commit is contained in:
1 parent
48e94aa889
commit
de3fd00265
4 files changed
+54
-954
No files matched your search
@@ -1,532 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<div class="app-container">
|
||||
<el-form :inline="true" label-width="68px" style="margin-left:10px;">
|
||||
<el-form-item label="起止时间">
|
||||
<el-date-picker
|
||||
unlink-panels
|
||||
v-model="start_time"
|
||||
size="small"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="地点">
|
||||
<el-input
|
||||
placeholder="地点"
|
||||
style="background-color: transparent;color:#fff; height:30px; width:300px;border-color: #00bcd4"
|
||||
suffix-icon="el-icon-map-location"
|
||||
v-model="input_place">
|
||||
</el-input>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="人员阈值">
|
||||
<el-input-number v-model="yuzhi" :min="1" :max="10000" label="描述文字"
|
||||
style="background-color: transparent;color:#fff; height:30px; width:150px;border-color: #00bcd4"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" id="search_but" @click="open">分析</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="radioButton" style="margin-left: 1%">
|
||||
<div style="overflow-y: auto; overflow-x:hidden; margin-top: 20px">
|
||||
<el-table v-show="ifShow"
|
||||
:data="tableData.slice((currentPage-1)*pagesize,currentPage*pagesize)"
|
||||
:span-method="objectSpanMethod"
|
||||
@cell-mouse-leave="cellMouseLeave"
|
||||
@cell-mouse-enter="cellMouseEnter"
|
||||
:cell-class-name="tableRowClassName"
|
||||
:cell-style="tableCellStyle"
|
||||
style="margin-left: 50px ;height: 100%">
|
||||
<el-table-column type="index" label="序号" :index="tableIndex" width="70"
|
||||
style="color: #9cd8f0"></el-table-column>
|
||||
<el-table-column
|
||||
label="姓名"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
{{ scope.row.properties.姓名 }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="身份证号"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
{{ scope.row.properties.身份证号 }}
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="时间"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
{{ scope.row.properties.时间}}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="地点"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
{{ scope.row.properties.地点}}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="事件类型"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
{{ scope.row.事件类型[0]}}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleClick(scope.row)">详细
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="图谱操作"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click="addRelation(scope.row)" title="添加关联关系">添加关联
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-remove-outline"
|
||||
@click="removeRelation(scope.row)" title="删除关联关系">删除关联
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-dialog title="详情信息" :visible.sync="dialogTableVisible" append-to-body
|
||||
style="width: 60% !important;margin-left: 20%">
|
||||
<el-form v-for="(key,value) in detailInfo.properties">
|
||||
<el-form-item v-if="value ==='name'">
|
||||
事件简称:{{key}}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="value !== 'Name'&& value !=='name'">
|
||||
{{value}}:{{key}}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form v-for="(key,value) in detailInfo.事件类型">
|
||||
<el-form-item>
|
||||
事件类型:{{key}}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogTableVisible = false">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="pagination" style="float: right;">
|
||||
<el-pagination
|
||||
:background="true"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pagesize"
|
||||
layout="total, sizes,prev, pager, next, jumper"
|
||||
:total="tableData.length">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
<div class="app-container">
|
||||
<el-card shadow="never" style="margin-top: 20px; text-align: center; padding: 40px 20px;">
|
||||
<el-result
|
||||
icon="info"
|
||||
title="图谱时空分析功能已归档"
|
||||
sub-title="该功能系其他知识图谱项目历史原型代码,不属于 SYFJGYD学员管理系统核心业务闭环。"
|
||||
>
|
||||
<template slot="extra">
|
||||
<el-button type="primary" size="medium" @click="$router.push('/')">返回管理驾驶舱</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {setting} from "@/config";
|
||||
import axios from "axios";
|
||||
|
||||
axios.defaults.baseURL = setting.apiUrl;
|
||||
import {getToken} from '@/utils/auth'
|
||||
|
||||
export default {
|
||||
name: "Delete",
|
||||
|
||||
data() {
|
||||
return {
|
||||
name: '',
|
||||
incident: '',
|
||||
Place: '',
|
||||
ifShow: true,
|
||||
radioButton: true,
|
||||
RelShow: false,
|
||||
keyword: '',
|
||||
tableData: [],
|
||||
input_place: '',
|
||||
start_time: '',
|
||||
end_time: '',
|
||||
pagesize: 10,
|
||||
currentPage: 1,
|
||||
dialogTableVisible: false,
|
||||
options: [{
|
||||
value: '火车出行',
|
||||
label: '火车出行'
|
||||
}, {
|
||||
value: '飞机出行',
|
||||
label: '飞机出行'
|
||||
}],
|
||||
value: '',
|
||||
yuzhi: '',
|
||||
detailInfo: {},
|
||||
rowIndex: '-1',
|
||||
orderIndexArr: [],
|
||||
hoverOrderArr: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
//重定义数组
|
||||
// this.agentlisttwo = this.agentlist;
|
||||
window.open = this.open;
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
let tableData = []
|
||||
this.currentPage = 1
|
||||
|
||||
let params = {
|
||||
"开始时间": this.start_time.length > 0 ? this.start_time[0] : "",
|
||||
"结束时间": this.start_time.length > 0 ? this.start_time[1] : "",
|
||||
"地点": this.input_place,
|
||||
"阈值": this.yuzhi
|
||||
}
|
||||
//console.log(params)
|
||||
if (this.input_place == ''
|
||||
) {
|
||||
this.$message({
|
||||
type: "warning",
|
||||
message: "请输入地点",
|
||||
});
|
||||
} else {
|
||||
axios.post("event/analysis/timeAndAddress", {params}, {
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + getToken()
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
//console.log('res', res.data)
|
||||
this.tableData = res.data
|
||||
this.getOrderNumber();
|
||||
if (res.data == '') {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "暂无匹配数据",
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
this.ifShow = true
|
||||
|
||||
|
||||
},
|
||||
|
||||
tableIndex(index) {
|
||||
return (this.currentPage - 1) * this.pagesize + index + 1
|
||||
},
|
||||
handleSizeChange: function (size) {
|
||||
this.pagesize = size;
|
||||
/*console.log(this.pagesize) */
|
||||
},
|
||||
//点击第几页
|
||||
handleCurrentChange: function (currentPage) {
|
||||
this.currentPage = currentPage;
|
||||
/*console.log(this.currentPage) */
|
||||
},
|
||||
back() {
|
||||
this.$router.push('/neo4j')
|
||||
},
|
||||
handleClick(row) {
|
||||
this.dialogTableVisible = true;
|
||||
this.detailInfo = row
|
||||
},
|
||||
//table多行合并成一行,2022-05-30
|
||||
//获取相同时间、地点的数组
|
||||
getOrderNumber() {
|
||||
const orderObj = {};
|
||||
let rowspans = this.yuzhi;
|
||||
this.tableData.forEach((item, index) => {
|
||||
item.rowIndex = index;
|
||||
//console.log("index====="+index);
|
||||
//console.log(item);
|
||||
let tmpId = item.id;
|
||||
let tmpDate = item.properties.时间.substring(0,10);
|
||||
let tmpPlace = item.properties.地点;
|
||||
let tmpDatePlace = tmpDate + tmpPlace;
|
||||
//console.log("tmpDatePlace===="+tmpDatePlace);
|
||||
//let tmpRowIndex = "R"+parseInt((index / rowspans), 10);
|
||||
let tmpRowIndex = tmpDatePlace;
|
||||
if (orderObj[tmpRowIndex]) {
|
||||
orderObj[tmpRowIndex].push(tmpId);
|
||||
} else {
|
||||
orderObj[tmpRowIndex] = [];
|
||||
orderObj[tmpRowIndex].push(tmpId);
|
||||
}
|
||||
});
|
||||
//初始化this.orderIndexArr,否则阈值从3->2时,this.orderIndexArr的0会保留0,1,2,导致把前3行归为1行(即保留了历史数据)
|
||||
this.orderIndexArr = [];
|
||||
// 将数组长度大于1的值 存储到this.orderIndexArr(也就是需要合并的项)
|
||||
//console.log(orderObj);
|
||||
Object.keys(orderObj).forEach((key) => {
|
||||
if (orderObj[key].length > 1) {
|
||||
this.orderIndexArr.push(orderObj[key]);
|
||||
}
|
||||
});
|
||||
},
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
//console.log("row");
|
||||
//console.log(row);
|
||||
let curPagesize = this.pagesize;
|
||||
if (columnIndex === 7) {
|
||||
for (let i = 0; i < this.orderIndexArr.length; i += 1) {
|
||||
let element = this.orderIndexArr[i];
|
||||
for (let j = 0; j < element.length; j += 1) {
|
||||
let item = element[j];
|
||||
//if (rowIndex === item) {
|
||||
if (item === row.id) {
|
||||
if (j === 0) {//合并行的第一行设置rowspan
|
||||
//如果本页显示不开element.length行,则需要跨页
|
||||
if(rowIndex + element.length > curPagesize){
|
||||
//console.log("rowIndex="+rowIndex+",element.length="+element.length+",j="+j+",rowspan="+(10 - rowIndex));
|
||||
return {
|
||||
rowspan: (curPagesize - rowIndex),
|
||||
colspan: 1,
|
||||
};
|
||||
}else{
|
||||
//console.log("rowIndex="+rowIndex+",j="+j+",rowspan="+(element.length));
|
||||
return {
|
||||
rowspan: element.length,
|
||||
colspan: 1,
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
if (j !== 0) {
|
||||
//合并行的非第一行,理论上不设置rowspan,但是跨页时,需设置跨页后的第一行
|
||||
if(rowIndex === 0){
|
||||
//console.log("rowIndex="+rowIndex+",element.length="+element.length+",j="+j+",rowspan="+(element.length - j));
|
||||
let rowspan = element.length - j;
|
||||
//console.log("rowspan="+rowspan);
|
||||
return {
|
||||
rowspan: rowspan,
|
||||
colspan: 1,
|
||||
};
|
||||
}else{
|
||||
//console.log("rowIndex="+rowIndex+",j="+j+",rowspan=0");
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
let arr = this.hoverOrderArr;
|
||||
for (let i = 0; i < arr.length; i += 1) {
|
||||
if (row.id === arr[i]) {
|
||||
return 'hovered-row';
|
||||
}
|
||||
}
|
||||
},
|
||||
cellMouseEnter(row, column, cell, event) {
|
||||
this.rowIndex = row.rowIndex;
|
||||
this.hoverOrderArr = [];
|
||||
this.orderIndexArr.forEach((element) => {
|
||||
if (element.indexOf(row.id) >= 0) {
|
||||
this.hoverOrderArr = element;
|
||||
}
|
||||
});
|
||||
},
|
||||
cellMouseLeave(row, column, cell, event) {
|
||||
this.rowIndex = '-1';
|
||||
this.hoverOrderArr = [];
|
||||
},
|
||||
//设置某列的样式
|
||||
tableCellStyle({ row, column, rowIndex, columnIndex }){
|
||||
let rowBackground = {};
|
||||
if (columnIndex === 7) {
|
||||
//奇偶行不同颜色
|
||||
/*if ((rowIndex / this.yuzhi) % 2 === 0) {
|
||||
rowBackground.background = "#0A2052";
|
||||
}else{
|
||||
rowBackground.background = "#1a2f71";
|
||||
}*/
|
||||
rowBackground.background = "#0A2052";
|
||||
rowBackground.border = "1px solid #1a2f71";
|
||||
}
|
||||
return rowBackground;
|
||||
},
|
||||
addRelation(row){
|
||||
let chkId = row.id;
|
||||
let element = [];
|
||||
let chkName = "";
|
||||
let i = 0;
|
||||
for (i = 0; i < this.orderIndexArr.length; i += 1) {
|
||||
element = this.orderIndexArr[i];
|
||||
if(element.indexOf(chkId) !== -1){
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(i === this.orderIndexArr.length){
|
||||
element = [];
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "单个事件不存在关联关系,不可执行添加操作",
|
||||
});
|
||||
}else{
|
||||
this.tableData.forEach((item, index) => {
|
||||
let tmpId = item.id;
|
||||
if(element.indexOf(tmpId) !== -1){
|
||||
chkName += item.properties.姓名+",";
|
||||
}
|
||||
});
|
||||
|
||||
let params = {
|
||||
"idArr": element
|
||||
};
|
||||
this.$confirm('此操作将添加:'+chkName+'之间的事件关联关系, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
axios.post("event/analysis/addEventRelation", {params}, {
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + getToken()
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
//console.log(res);
|
||||
if (res.data > 0) {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功",
|
||||
});
|
||||
}else{
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "操作失败",
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error)
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消添加关联关系'
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
removeRelation(row){
|
||||
let chkId = row.id;
|
||||
let element = [];
|
||||
let chkName = "";
|
||||
let i = 0;
|
||||
for (i = 0; i < this.orderIndexArr.length; i += 1) {
|
||||
element = this.orderIndexArr[i];
|
||||
if(element.indexOf(chkId) !== -1){
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(i === this.orderIndexArr.length){
|
||||
element = [];
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "单个事件不存在关联关系,不可执行删除操作",
|
||||
});
|
||||
}else{
|
||||
this.tableData.forEach((item, index) => {
|
||||
let tmpId = item.id;
|
||||
if(element.indexOf(tmpId) !== -1){
|
||||
chkName += item.properties.姓名+",";
|
||||
}
|
||||
});
|
||||
//console.log(element);
|
||||
|
||||
let params = {
|
||||
"idArr": element
|
||||
};
|
||||
this.$confirm('此操作将删除:'+chkName+'之间的事件关联关系, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
//console.log('id',params)
|
||||
axios.post("event/analysis/removeEventRelation", {params}, {
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + getToken()
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
if (res.data > 0) {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功",
|
||||
});
|
||||
}else{
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "操作失败",
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error)
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除关联关系'
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
export default {
|
||||
name: "TimeAndAddressLegacyArchived"
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,91 +1,22 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card shadow="never" class="box-card mb8">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-weight: bold; font-size: 16px;">
|
||||
<i class="el-icon-data-line" style="color: #409EFF; margin-right: 8px;"></i>统计分析 · 课程成绩总览
|
||||
</span>
|
||||
</div>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="课程ID" prop="cId">
|
||||
<el-input v-model="queryParams.cId" placeholder="请输入课程ID" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开班计划" prop="planId">
|
||||
<el-input v-model="queryParams.planId" placeholder="请输入开班计划ID" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-table v-loading="loading" :data="scoreList">
|
||||
<el-table-column label="课程ID" align="center" prop="cId" />
|
||||
<el-table-column label="开班计划ID" align="center" prop="planId" />
|
||||
<el-table-column label="学员学号" align="center" prop="studentId" />
|
||||
<el-table-column label="课程成绩" align="center" prop="courseScore" sortable />
|
||||
<el-table-column label="实训成绩" align="center" prop="trainScore" sortable />
|
||||
<el-table-column label="考核成绩" align="center" prop="examScore" sortable />
|
||||
<el-table-column label="综合评级" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.examScore >= 90" type="success">优秀</el-tag>
|
||||
<el-tag v-else-if="scope.row.examScore >= 80">良好</el-tag>
|
||||
<el-tag v-else-if="scope.row.examScore >= 60" type="warning">及格</el-tag>
|
||||
<el-tag v-else type="danger">待补考</el-tag>
|
||||
<el-card shadow="never" style="margin-top: 20px; text-align: center; padding: 40px 20px;">
|
||||
<el-result
|
||||
icon="info"
|
||||
title="课程成绩旧查询入口已下线"
|
||||
sub-title="该页面原依赖旧表 train_score_info 且包含前端硬编码分级逻辑。当前新一代课程考勤与教学调度分析已上线至【考勤专题分析】。"
|
||||
>
|
||||
<template slot="extra">
|
||||
<el-button type="primary" size="medium" @click="$router.push('/train/analysis/attendance')">前往考勤专题分析</el-button>
|
||||
<el-button size="medium" @click="$router.push('/')">返回管理驾驶舱</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="来源系统" align="center" prop="sourceSystem" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-result>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listScore } from "@/api/train/score"
|
||||
|
||||
export default {
|
||||
name: "CourseScore",
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
total: 0,
|
||||
scoreList: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cId: null,
|
||||
planId: null
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listScore(this.queryParams).then(response => {
|
||||
this.scoreList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
name: "CourseScoreLegacyDeactivated"
|
||||
};
|
||||
</script>
|
||||
@@ -1,280 +1,22 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="学员学号" prop="studentId">
|
||||
<el-input
|
||||
v-model="queryParams.studentId"
|
||||
placeholder="请输入学员学号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="课程ID" prop="cId">
|
||||
<el-input
|
||||
v-model="queryParams.cId"
|
||||
placeholder="请输入课程ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开班计划" prop="planId">
|
||||
<el-input
|
||||
v-model="queryParams.planId"
|
||||
placeholder="请输入开班计划ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
v-hasPermi="['system:info:add']"
|
||||
@click="handleAdd"
|
||||
>新增成绩</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
v-hasPermi="['system:info:edit']"
|
||||
@click="handleUpdate"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
v-hasPermi="['system:info:remove']"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="scoreList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="成绩ID" align="center" prop="scoreId" />
|
||||
<el-table-column label="学员学号" align="center" prop="studentId" />
|
||||
<el-table-column label="开班计划ID" align="center" prop="planId" />
|
||||
<el-table-column label="课程ID" align="center" prop="cId" />
|
||||
<el-table-column label="课程成绩" align="center" prop="courseScore" />
|
||||
<el-table-column label="实训成绩" align="center" prop="trainScore" />
|
||||
<el-table-column label="考核成绩" align="center" prop="examScore" />
|
||||
<el-table-column label="数据来源" align="center" prop="sourceType">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.sourceType === 1" type="info">手动录入</el-tag>
|
||||
<el-tag v-else-if="scope.row.sourceType === 2" type="success">Excel导入</el-tag>
|
||||
<el-tag v-else-if="scope.row.sourceType === 3" type="warning">接口采集</el-tag>
|
||||
<span v-else>未指定</span>
|
||||
<el-card shadow="never" style="margin-top: 20px; text-align: center; padding: 40px 20px;">
|
||||
<el-result
|
||||
icon="info"
|
||||
title="成绩管理旧模块已停用下线 (V2架构升级)"
|
||||
sub-title="底层 train_score_info 旧表已在数据库V2结构治理中彻底停用。新一代成绩体系已升级至 train_score_item 与 train_student_score。"
|
||||
>
|
||||
<template slot="extra">
|
||||
<el-button type="primary" size="medium" @click="$router.push('/train/analysis/attendance')">前往考勤分析</el-button>
|
||||
<el-button size="medium" @click="$router.push('/train/portrait')">查看学员画像</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="来源系统" align="center" prop="sourceSystem" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-hasPermi="['system:info:edit']"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-hasPermi="['system:info:remove']"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改成绩信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="550px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="学员学号" prop="studentId">
|
||||
<el-input v-model="form.studentId" placeholder="请输入学员学号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开班计划ID" prop="planId">
|
||||
<el-input v-model="form.planId" placeholder="请输入开班计划ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="课程ID" prop="cId">
|
||||
<el-input v-model="form.cId" placeholder="请输入课程ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="课程成绩" prop="courseScore">
|
||||
<el-input-number v-model="form.courseScore" :precision="1" :step="0.5" :min="0" :max="100" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实训成绩" prop="trainScore">
|
||||
<el-input-number v-model="form.trainScore" :precision="1" :step="0.5" :min="0" :max="100" />
|
||||
</el-form-item>
|
||||
<el-form-item label="考核成绩" prop="examScore">
|
||||
<el-input-number v-model="form.examScore" :precision="1" :step="0.5" :min="0" :max="100" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据来源" prop="sourceType">
|
||||
<el-select v-model="form.sourceType" placeholder="请选择来源">
|
||||
<el-option label="手动录入" :value="1" />
|
||||
<el-option label="Excel导入" :value="2" />
|
||||
<el-option label="接口采集" :value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源系统" prop="sourceSystem">
|
||||
<el-input v-model="form.sourceSystem" placeholder="例如:VR实训/考核系统" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-result>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listScore, getScore, delScore, addScore, updateScore } from "@/api/train/score"
|
||||
|
||||
export default {
|
||||
name: "Score",
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
ids: [],
|
||||
single: true,
|
||||
multiple: true,
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
scoreList: [],
|
||||
title: "",
|
||||
open: false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
studentId: null,
|
||||
planId: null,
|
||||
cId: null
|
||||
},
|
||||
form: {},
|
||||
rules: {
|
||||
studentId: [
|
||||
{ required: true, message: "学员学号不能为空", trigger: "blur" }
|
||||
],
|
||||
cId: [
|
||||
{ required: true, message: "课程ID不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listScore(this.queryParams).then(response => {
|
||||
this.scoreList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
reset() {
|
||||
this.form = {
|
||||
scoreId: null,
|
||||
planId: null,
|
||||
cId: null,
|
||||
studentId: null,
|
||||
courseScore: 0,
|
||||
trainScore: 0,
|
||||
examScore: 0,
|
||||
sourceType: 1,
|
||||
sourceSystem: "教务后台"
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
},
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.scoreId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = "添加成绩信息"
|
||||
},
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
const scoreId = row.scoreId || this.ids
|
||||
getScore(scoreId).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = "修改成绩信息"
|
||||
})
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.scoreId != null) {
|
||||
updateScore(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addScore(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
const scoreIds = row.scoreId || this.ids
|
||||
const confirmText = row.scoreId && row.studentId
|
||||
? `确定要删除学员【${row.studentId}】的课程成绩记录(成绩编号: ${row.scoreId})吗?`
|
||||
: `是否确认删除成绩编号为"${scoreIds}"的数据项?`
|
||||
this.$modal.confirm(confirmText).then(() => {
|
||||
return delScore(scoreIds)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
name: "ScoreLegacyDeactivated"
|
||||
};
|
||||
</script>
|
||||
@@ -1,84 +1,22 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card shadow="never" class="box-card mb8">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-weight: bold; font-size: 16px;">
|
||||
<i class="el-icon-user" style="color: #409EFF; margin-right: 8px;"></i>统计分析 · 学员综合成绩档案
|
||||
</span>
|
||||
</div>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="学员学号" prop="studentId">
|
||||
<el-input v-model="queryParams.studentId" placeholder="请输入学员学号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询学员</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-table v-loading="loading" :data="scoreList">
|
||||
<el-table-column label="学员学号" align="center" prop="studentId" />
|
||||
<el-table-column label="开班计划ID" align="center" prop="planId" />
|
||||
<el-table-column label="课程ID" align="center" prop="cId" />
|
||||
<el-table-column label="课程成绩" align="center" prop="courseScore" />
|
||||
<el-table-column label="实训成绩" align="center" prop="trainScore" />
|
||||
<el-table-column label="考核成绩" align="center" prop="examScore" sortable />
|
||||
<el-table-column label="导入时间" align="center" prop="importTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.importTime, '{y}-{m}-{d}') }}</span>
|
||||
<el-card shadow="never" style="margin-top: 20px; text-align: center; padding: 40px 20px;">
|
||||
<el-result
|
||||
icon="info"
|
||||
title="学员成绩旧查询入口已下线"
|
||||
sub-title="该页面原依赖旧表 train_score_info。学员全景档案及各模块综合表现已统一收拢至【学员 360 画像】。"
|
||||
>
|
||||
<template slot="extra">
|
||||
<el-button type="primary" size="medium" @click="$router.push('/train/portrait')">前往学员 360 画像</el-button>
|
||||
<el-button size="medium" @click="$router.push('/')">返回管理驾驶舱</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="来源" align="center" prop="sourceSystem" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-result>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listScore } from "@/api/train/score"
|
||||
|
||||
export default {
|
||||
name: "StudentScore",
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
total: 0,
|
||||
scoreList: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
studentId: null
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listScore(this.queryParams).then(response => {
|
||||
this.scoreList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
name: "StudentScoreLegacyDeactivated"
|
||||
};
|
||||
</script>
|
||||
Reference in new issue
Block a user