班级评比

init
gongdi 4 years ago
parent 89383052c3
commit e4e99fc2a5

@ -4,6 +4,7 @@
<TotalEvaluation v-if="tabIndex == 0"/>
<ClassEvaluation v-if="tabIndex == 1"/>
<ScoreRecord v-if="tabIndex == 2"/>
<SummaryEva v-if="tabIndex == 3"/>
</div>
</template>
<script>
@ -11,6 +12,7 @@
import TotalEvaluation from './totalEva.vue';
import ClassEvaluation from './classEva.vue';
import ScoreRecord from './scoreRecord.vue';
import SummaryEva from './summaryEva.vue';
export default{
data(){
return {
@ -35,7 +37,8 @@
TabComp,
TotalEvaluation,
ClassEvaluation,
ScoreRecord
ScoreRecord,
SummaryEva
}
}
</script>

@ -97,4 +97,22 @@ export default {
method:'get',
isTestLogin:true
},
/*
* 汇总结果集
* */
"getGatherTaskList":{
url:'/intellioa/dailyEvaluate/dailyReportView/utils/getGatherTaskList',
method:'get',
isTestLogin:true
},
/*
* 红旗班汇总结果查看分页表格中号-汇总评价
* */
"redFlagGather":{
url:'/intellioa/dailyEvaluate/dailyReportView/redFlagGather',
method:'get',
isTestLogin:true
},
}

@ -1,24 +1,373 @@
<template>
<div class="score-record-div">
<div class="search-div">
<div class="task-search-div">
<div class="search-title">评价任务</div>
<div class="search-dom">
<a-select :value="taskName" style="width: 200px" @change="taskChange">
<a-select-option v-for="item in taskList" :key="item.task_id + '-' + item.task_name">
{{ item.task_name }}
</a-select-option>
</a-select>
</div>
</div>
<div class="time-search-div">
<DateChoose @flushDate="flushDate" :begin_date="begin_date" :end_date="end_date"></DateChoose>
</div>
</div>
<div v-if="showLoading" class="show-loading-div">
<a-spin/>
</div>
<div v-if="!showLoading && recordList.length == 0" class="no-data-div">
<a-empty/>
</div>
<div v-if="!showLoading && recordList.length > 0" class="record-list-div">
<div class="line-style">
<a-icon class="line-icon-style" type="down" :style="{ fontSize: '16px', color: '#31a8fa' }"/>
</div>
<div class="record-row-div" v-for="(item,index) in recordList" :key="item.score_id + '-' + index">
<div :class="'record-item ' + (index%2 == 0?'':' transform-item')">
<div v-if="index%2 == 0" class="message-icon-div">
<img src="./image/messageIcon.png"/>
</div>
<div v-if="index%2 == 1" class="message-time-div">
{{item.last_updated_time}}
</div>
<div class="message-info-div">
<div>
<span style="color: #8400FF">{{'[' + item.class_name + ']'}}</span>
<span style="color: #808000">{{'[' + item.be_evaluated_person_name + ']'}}</span>
同学
<span style="color: #0000FF">{{'“' + item.plandetail_name + '”'}}</span>
<span :class="parseInt(item.score) == 0?'default-style':(parseInt(item.score) > 0?'add-style':'reduce-style')">
{{(parseInt(item.score) == 0 ? '[评分' : (parseInt(item.score) > 0 ? '[加分' : '[减分')) + item.score + ']'}}
</span>
</div>
</div>
<div v-if="index%2 == 0" class="message-time-div">
{{item.last_updated_time}}
</div>
<div v-if="index%2 == 1" class="message-icon-div transform-div">
<img src="./image/messageIcon.png"/>
</div>
</div>
</div>
</div>
<div v-if="!showLoading && recordList.length > 0" class="page-dom-div">
<a-icon type="left-circle" title="上一页"
:class="'page-icon-dom '+ (pageNumber == 1?'cannot-click':'can-click')"
v-on:click="changePage('previous')"/>
<span class="total-num-span">{{totolNum}}</span>
<a-icon type="right-circle" title="下一页"
:class="'page-icon-dom '+ (pageNumber == totalPage?'cannot-click':'can-click')"
v-on:click="changePage('next')"/>
</div>
</div>
</template>
<script>
import interConfig from './interConfig';
import {Select, Spin, Empty, Icon} from 'ant-design-vue';
import DateChoose from '../common/dateChoose.vue';
import moment from 'moment';
export default{
data(){
return {}
return {
showLoading: true,
taskId: "",//ID
taskName: "",//
taskList: [],//
begin_date: null,
end_date: null,
pageNumber: 1,
pageSize: 12,
totolNum: 0,
totalPage: 0,
recordList: [],
currentDate:"",
}
},
mounted(){
this.getRecordParam();
},
methods: {
getNowTime: function () {
let _this = this;
let p = new Promise(function (resolve, reject) {
_this.InterfaceConfig.callInterface([{
url: interConfig.getNowTime.url,
params: {},
method: interConfig.getNowTime.method,
isTestLogin: interConfig.getNowTime.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
let year = resData.data.year;
let month = resData.data.month;
let day = resData.data.day;
resolve({
begin_date: moment(year + "-" + month + "-01"),
end_date: moment(year + "-" + month + "-" + day),
})
}
}
})
})
return p;
},
getTaskList: function () {
let _this = this;
let p = new Promise(function (resolve, reject) {
let param = {
org_id: _this.BaseConfig.person_info_my.bureau_id,
}
_this.InterfaceConfig.callInterface([{
url: interConfig.getClassListByTask.url,
params: param,
method: interConfig.getClassListByTask.method,
isTestLogin: interConfig.getClassListByTask.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
resolve(resData.data);
}
}
})
})
return p;
},
getRecordParam: function () {
//
let _this = this;
this.getNowTime().then(function (data) {
_this.begin_date = data.begin_date;
_this.end_date = data.end_date;
return _this.getTaskList();
}).then(function (data) {
_this.taskList = data.task_list;
if (_this.taskList && _this.taskList.length > 0) {
_this.taskId = _this.taskList[0].task_id;
_this.taskName = _this.taskList[0].task_name;
}
//
let gather = data.gather;
if (gather && gather.gather_flag == 1 && gather.gather_info == 'true') {
_this.begin_date = moment(gather.begin_time.split(" ")[0]);
_this.end_date = moment(gather.end_time.split(" ")[0]);
}
_this.listSuperfusionTaskScore();
}).catch(function (reason) {
console.log(reason)
})
},
listSuperfusionTaskScore: function () {
this.showLoading = true;
let param = {
org_id: this.BaseConfig.person_info_my.bureau_id,
task_id: this.taskId,
begin_date: moment(this.begin_date).format("YYYY-MM-DD"),
end_date: moment(this.end_date).format("YYYY-MM-DD"),
page_number: this.pageNumber,
page_size: this.pageSize,
};
this.InterfaceConfig.callInterface([{
url: interConfig.listSuperfusionTaskScore.url,
params: param,
method: interConfig.listSuperfusionTaskScore.method,
isTestLogin: interConfig.listSuperfusionTaskScore.isTestLogin,
}], (result) => {
this.showLoading = false;
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
this.recordList = resData.data.list;
this.totolNum = resData.data.total_row;
this.totalPage = resData.data.total_page;
}
}
})
},
taskChange: function (value) {
let taskId = value.substring(0, value.indexOf('-'));
if (parseInt(this.taskId) != parseInt(taskId)) {
this.taskId = taskId;
this.taskName = value.substring(value.indexOf('-') + 1);
}
},
flushDate: function (param) {
this.begin_date = param.beginDate;
this.end_date = param.endDate;
this.listSuperfusionTaskScore();
},
changePage: function (type) {
if (type == 'previous') {
if (this.pageNumber == 1) {
return;
}
this.pageNumber--;
} else if (type == 'next') {
if (this.pageNumber == this.totalPage) {
return;
}
this.pageNumber++;
}
this.listSuperfusionTaskScore();
},
},
components: {
ASelect: Select,
ASelectOption: Select.Option,
DateChoose,
ASpin: Spin,
AEmpty: Empty,
AIcon: Icon
}
}
</script>
<style lang="scss">
.score-record-div{
.score-record-div {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.search-div {
width: 100%;
height: 3rem;
display: flex;
.task-search-div {
width: 50%;
display: flex;
.search-title {
width: 100px;
display: flex;
justify-content: center;
align-items: center;
font-size: 13px;
}
.search-dom {
width: calc(100% - 100px);
display: flex;
justify-content: center;
align-items: center;
}
}
.time-search-div {
width: 50%;
}
}
.record-list-div {
width: 100%;
min-height: 20rem;
position: relative;
display: flex;
/*flex-direction: column;*/
flex-wrap: wrap;
align-content: flex-start;
.line-style {
/*min-height: 20rem;*/
width: 1px;
height: 100%;
background-color: #31a8fa;
position: absolute;
left: 50%;
.line-icon-style {
position: absolute;
bottom: -8px;
left: -7.5px;
}
}
.record-row-div {
width: 50%;
padding: 0 0.5rem;
min-height: 2rem;
margin-top: 0.5rem;
display: flex;
align-items: center;
.record-item {
width: 100%;
min-height: 2rem;
display: flex;
align-items: center;
.message-icon-div {
width: 25px;
height: 25px;
img {
width: 100%;
height: 100%;
}
}
.transform-div {
transform: rotateY(180deg); /* 水平镜像翻转 */
}
.message-info-div {
width: 50%;
margin-left: 0.5rem;
padding: 0.5rem;
background-color: #f2f2f2;
border-radius: 10px;
display: flex;
flex-wrap: wrap;
font-size: 12px;
.add-style {
color: #a5c94b;
}
.reduce-style {
color: #fc012c;
}
}
.message-time-div {
margin-left: 0.5rem;
color: #AAAAAA;
}
}
.transform-item{
display: flex;
justify-content: flex-end;
.message-time-div{
margin-right: 0 !important;
}
.message-info-div {
margin-right: 0.5rem;
}
}
}
}
.page-dom-div {
height: 2.5rem;
line-height: 2.5rem;
text-align: right;
padding-right: 0.5rem;
.page-icon-dom {
font-size: 1.2rem;
border: none;
border-radius: 1rem;
}
.cannot-click {
background-color: #a3b0c0;
color: white;
}
.can-click {
background-color: #31a8fa;
color: white;
}
.total-num-span {
margin-left: 1rem;
margin-right: 1rem;
}
}
.show-loading-div {
min-height: 15rem;
display: flex;
justify-content: center;
align-items: center;
}
.no-data-div {
min-height: 15rem;
display: flex;
justify-content: center;
align-items: center;
}
}
</style>

@ -0,0 +1,278 @@
<template>
<div class="summary-evaluation-div">
<div class="search-div">
<div class="title-item">
<div class="title-text"><span>汇总查看</span></div>
</div>
<div class="title-dom">
<a-select :value="gatherName" @change="taskChange">
<a-icon class="drop-down-icon" slot="suffixIcon" type="caret-down"
:style="{fontSize:'16px',color:'#c280ff'}"/>
<a-select-option v-for="item in gatherTaskList" :key="item.id + '-' + item.gather_name">
{{ item.gather_name }}
</a-select-option>
</a-select>
</div>
<div class="title-item">
<div class="title-text"><span>参数设置</span></div>
</div>
<div class="title-dom">
<div class="gather-info-div">
<div>
汇总周期{{gatherDate}}
计算规则{{calcMethods}}
评定班额数{{classNum}}
</div>
</div>
</div>
</div>
<div class="table-list-div">
<a-table :columns="columns" :data-source="tableData" bordered tableLayout="fixed"
:loading="showLoading"
:scroll="{ x: '100%' }"
/>
</div>
</div>
</template>
<script>
import interConfig from './interConfig';
import {Select, Icon, Table} from 'ant-design-vue';
export default{
data(){
return {
showLoading: true,
columns: [],
tableData: [],
gatherTaskList: [],
gatherId: "",
gatherName: "",
gatherDate: "",//
calcMethods: "",//
classNum: "",//
pageNumber: 1,
pageSize: 10,
}
},
mounted(){
this.getGatherTaskList();
},
methods: {
getGatherTaskList: function () {
let param = {
org_id: this.BaseConfig.person_info_my.bureau_id,
};
this.InterfaceConfig.callInterface([{
url: interConfig.getGatherTaskList.url,
params: param,
method: interConfig.getGatherTaskList.method,
isTestLogin: interConfig.getGatherTaskList.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
this.gatherTaskList = resData.data.gather_task_list;
if (this.gatherTaskList && this.gatherTaskList.length > 0) {
this.gatherId = this.gatherTaskList[0].id;
this.gatherName = this.gatherTaskList[0].gather_name;
let calc_method = this.gatherTaskList[0].calc_method;
this.gatherDate = this.gatherTaskList[0].begin_time + "-" + this.gatherTaskList[0].end_time;
this.calcMethods = calc_method == 1 ? '求和' : (calc_method == 2 ? '平均' : (calc_method == 3 ? '权重求和' : ''));// 123
this.classNum = this.gatherTaskList[0].class_num;
this.redFlagGather();
}
}
}
})
},
redFlagGather: function () {
let param = {
org_id: this.BaseConfig.person_info_my.bureau_id,
gather_id: this.gatherId,
page_number: this.pageNumber,
page_size: this.pageSize
};
this.InterfaceConfig.callInterface([{
url: interConfig.redFlagGather.url,
params: param,
method: interConfig.redFlagGather.method,
isTestLogin: interConfig.redFlagGather.isTestLogin,
}], (result) => {
this.showLoading = false;
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
this.buildTableData(resData.data);
}
}
})
},
buildTableData: function (data) {
console.log(data)
//tableData
let list = data.list;
let tableData = [];
let taskMap = data.task_plan_map;
let dataKeys = Object.keys(taskMap);
for (let i = 0, len = dataKeys.length; i < len; i++) {
let dataRow = taskMap[dataKeys[i]];
let dataJson = {
key: i + 1,
taskId: dataRow['task_name'],
}
list.forEach(item => {
let classId = item.class_id;
let scoreMap = item.task_score_map;
let scoreMapKeys = Object.keys(scoreMap);
for (let k = 0, kLen = scoreMapKeys.length; k < kLen; k++) {
if (scoreMapKeys[k] == dataKeys[i]) {
//key key
let score = scoreMap[scoreMapKeys[k]];
dataJson[classId] = score;
break;
}
}
})
tableData.push(dataJson);
}
//columns
let columns = [
{
title: '评价任务',
dataIndex: "taskId",
key: 1,
align:"center",
ellipsis:true,//
width:150,
fixed: 'left'
},
];
//JSON
let totalJson = {
key: dataKeys.length + 1,
taskId: '合计',
};//key classId, score: totalScore
for (let i = 0, len = list.length; i < len; i++) {
let classItem = list[i];
let column = {
title: classItem.class_name,
dataIndex: classItem.class_id,
key: i + 2,
align:"center",
ellipsis:true,//
width:120
}
columns.push(column);
//
let task_score_map = classItem.task_score_map;
let scoreKeys = Object.keys(task_score_map);
let totalScore = 0;
scoreKeys.forEach(key=>{
let score = task_score_map[key];
totalScore += parseFloat(score);
})
totalJson[classItem.class_id] = totalScore;
}
this.columns = columns;
tableData.push(totalJson);
this.tableData = tableData;
},
taskChange: function (value) {
let taskId = value.substring(0, value.indexOf('-'));
if (parseInt(this.gatherId) != parseInt(taskId)) {
this.gatherId = taskId;
this.gatherName = value.substring(value.indexOf('-') + 1);
}
},
},
components: {
ASelect: Select,
ASelectOption: Select.Option,
AIcon: Icon,
ATable: Table
}
}
</script>
<style lang="scss">
.summary-evaluation-div {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
flex-direction: column;
.search-div {
width: calc(100% - 5rem);
min-height: 2.5rem;
transform: skew(-30deg) translateZ(0); /*设置倾斜度为-30 防止点击抖动*/
-webkit-transform: skew(-30deg);
-moz-transform: skew(-30deg);
-o-transform: skew(-30deg);
-ms-transform: skew(-30deg);
border: 1px solid #c280ff;
margin: auto;
display: flex;
.title-item {
width: 5rem;
height: auto;
background-color: #c280ff;
display: flex;
justify-content: center;
align-items: center;
.title-text {
color: white;
transform: skew(30deg) translateZ(0); /*设置倾斜度为-30 防止点击抖动*/
-webkit-transform: skew(30deg);
-moz-transform: skew(30deg);
-o-transform: skew(30deg);
-ms-transform: skew(30deg);
}
}
.title-dom {
width: calc(50% - 5rem);
height: auto;
display: flex;
justify-content: center;
align-items: center;
.ant-select {
width: calc(100% - 5rem);
margin: auto;
transform: skew(30deg);
-webkit-transform: skew(30deg);
-moz-transform: skew(30deg);
-o-transform: skew(30deg);
-ms-transform: skew(30deg);
.ant-select-selection {
border: none !important;
box-shadow: none !important;
}
}
.gather-info-div {
width: calc(100% - 2rem);
height: auto;
transform: skew(30deg) translateZ(0); /*设置倾斜度为-30 防止点击抖动*/
-webkit-transform: skew(30deg) translateZ(0); /*设置倾斜度为-30 防止点击抖动*/
-moz-transform: skew(30deg) translateZ(0); /*设置倾斜度为-30 防止点击抖动*/
-o-transform: skew(30deg) translateZ(0); /*设置倾斜度为-30 防止点击抖动*/
-ms-transform: skew(30deg) translateZ(0); /*设置倾斜度为-30 防止点击抖动*/
display: flex;
flex-wrap: wrap;
align-items: center;
font-size: 12px;
}
}
}
.table-list-div {
width: 100%;
min-height: 20rem;
margin-top: 0.5rem;
.ant-table-content{
.ant-table-thead{
tr th .ant-table-header-column{
color: #31a8fa;
}
}
}
}
}
</style>
Loading…
Cancel
Save