个人画像大屏修改
This commit is contained in:
@@ -111,14 +111,6 @@ export function listStuFive(stuNo, params) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getOwn() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/system/cqScore/getOwn'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function listOwnRecord(query) {
|
||||
return request({
|
||||
method: 'get',
|
||||
@@ -177,3 +169,47 @@ export function delCqScore(id) {
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
//查询个人加分项申请
|
||||
export function getcphiamByOne(stuNo) {
|
||||
return request({
|
||||
url: '/system/cqScore/getcphiamByOne/' + stuNo,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function getOwncphiamByOne() {
|
||||
return request({
|
||||
url: '/system/cqScore/getOwncphiamByOne',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//查询个人素质综合信息
|
||||
export function getStuData(stuNo) {
|
||||
return request({
|
||||
url: '/system/cqScore/getStuData?stuNo=' + stuNo,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getOwnData() {
|
||||
return request({
|
||||
url: '/system/cqScore/getOwnData',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//查询综合素质分数
|
||||
export function getOwn() {
|
||||
return request({
|
||||
url: '/system/cqScore/getOwn',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getStu(stuNo) {
|
||||
return request({
|
||||
url: '/system/cqScore/getStu?stuNo='+stuNo,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -147,10 +147,3 @@ export function cancelAudit(id) {
|
||||
})
|
||||
}
|
||||
|
||||
//查询个人加分项申请
|
||||
export function getcphiamByOne(stuNo) {
|
||||
return request({
|
||||
url: '/comprehensive/auditDetails/getcphiamByOne/'+stuNo,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
@@ -70,11 +70,10 @@
|
||||
<script>
|
||||
import { nowTime } from '../../../utils/index.js'
|
||||
import { getUserProfile } from '@/api/system/user'
|
||||
import { listOwnFive, listStuFive } from '@/api/stuCQS/info-fill/cqScore'
|
||||
import { listOwnFive, listStuFive, getcphiamByOne, getOwncphiamByOne, getStuData, getOwnData, getOwn, getStu } from '@/api/stuCQS/info-fill/cqScore'
|
||||
import { getOwnInfo, getStuInfo } from '@/api/stuCQS/basedata/stuInfoView'
|
||||
import { getOwnInfo as getExtraInfo, } from '@/api/stuCQS/basedata/extraInfo'
|
||||
import { listCourseScore } from '@/api/stuCQS/basedata/course'
|
||||
import { getcphiamByOne } from '@/api/stuCQS/process-center/auditDetails'
|
||||
export default {
|
||||
props: {
|
||||
stuNo: {
|
||||
@@ -115,7 +114,7 @@ export default {
|
||||
this.timeFn()
|
||||
this.getUserInfo()
|
||||
this.getExtraInfo()
|
||||
this.getcphiamByOne()
|
||||
this.getUserCphiamByOne()
|
||||
},
|
||||
mounted() {
|
||||
if (this.stuNo == null) {
|
||||
@@ -131,13 +130,17 @@ export default {
|
||||
clearInterval(this.timing)
|
||||
},
|
||||
methods: {
|
||||
|
||||
getcphiamByOne() {
|
||||
getUserCphiamByOne() {
|
||||
if (this.stuNo != null) {
|
||||
getcphiamByOne(this.stuNo).then(res => {
|
||||
this.cphiams = res.rows
|
||||
})
|
||||
} else {
|
||||
getOwncphiamByOne().then(res => {
|
||||
this.cphiams = res.rows
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
doFull() {
|
||||
this.$store.dispatch('app/toggleSideBarHide', true)
|
||||
document.querySelector('.navbar').style.display = 'none'
|
||||
@@ -191,7 +194,7 @@ export default {
|
||||
},
|
||||
async getExtraInfo() {
|
||||
let res = await getExtraInfo()
|
||||
console.log(res)
|
||||
//console.log(res)
|
||||
if (res.code == 200) {
|
||||
this.extraForm = {
|
||||
...res.data
|
||||
@@ -205,7 +208,52 @@ export default {
|
||||
const chart = this.$echarts.init(document.getElementById(chartId))
|
||||
chart.setOption(option)
|
||||
},
|
||||
qualityChart() {
|
||||
async qualityChart() {
|
||||
let stuData = []
|
||||
if (this.stuNo != null) {
|
||||
let res = await getStuData(this.stuNo)
|
||||
stuData = [...res.rows]
|
||||
} else {
|
||||
let res = await getOwnData()
|
||||
stuData = [...res.rows]
|
||||
}
|
||||
|
||||
let stuYearNames = []
|
||||
let stuYearDatas = []
|
||||
if (stuData != null) {
|
||||
for (let i = 0; i < stuData.length; i++) {
|
||||
let stuYearName = {};//存储学年名称
|
||||
stuYearName.name = stuData[i].stuYearName;
|
||||
stuYearName.itemStyle = {};
|
||||
if (i <= 0) {
|
||||
stuYearName.itemStyle.color = '#EE6666';
|
||||
}
|
||||
if (i >= 1 && i < stuData.length) {
|
||||
stuYearName.itemStyle.color = null;
|
||||
}
|
||||
stuYearNames.push(stuYearName);
|
||||
|
||||
let stuYearData = {};//存储学年数据
|
||||
let stus = [];
|
||||
stus.push(stuData[i].classtwoScore);
|
||||
stus.push(stuData[i].ceScore);
|
||||
stus.push(stuData[i].sportScore);
|
||||
stus.push(stuData[i].iamScore);
|
||||
stus.push(stuData[i].stuScore);
|
||||
stuYearData.value = stus;
|
||||
stuYearData.name = stuData[i].stuYearName;
|
||||
stuYearData.symbol = 'none';
|
||||
stuYearData.lineStyle = {};
|
||||
if (i <= 0) {
|
||||
stuYearData.lineStyle.color = '#EE6666';
|
||||
}
|
||||
if (i >= 1 && i < stuData.length) {
|
||||
stuYearData.lineStyle.color = null;
|
||||
}
|
||||
stuYearDatas.push(stuYearData);
|
||||
}
|
||||
}
|
||||
|
||||
const option = {
|
||||
legend: {
|
||||
icon: 'circle',
|
||||
@@ -214,23 +262,16 @@ export default {
|
||||
color: '#ffffff',
|
||||
fontSize: 14
|
||||
},
|
||||
// 设置图例的颜色与班级线条的颜色一致
|
||||
data: [{
|
||||
name: '班级',
|
||||
itemStyle: {
|
||||
color: '#EE6666' // 图例的颜色设置为红色,与班级线条一致
|
||||
}
|
||||
}, {
|
||||
name: '个人',
|
||||
}]
|
||||
|
||||
data: [...stuYearNames]
|
||||
},
|
||||
radar: {
|
||||
indicator: [
|
||||
{ name: '第二课堂', color: '#fff' },
|
||||
{ name: '综合评价', color: '#fff' },
|
||||
{ name: '体测', color: '#fff' },
|
||||
{ name: '体能素质', color: '#fff' },
|
||||
{ name: '思想品德', color: '#fff' },
|
||||
{ name: '平均学分绩', color: '#fff' },
|
||||
{ name: '科学文化素质', color: '#fff' },
|
||||
],
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
@@ -251,21 +292,7 @@ export default {
|
||||
series: [
|
||||
{
|
||||
type: 'radar',
|
||||
data: [
|
||||
{
|
||||
value: [4200, 3000, 20000, 35000, 50000, 18000],
|
||||
name: '班级',
|
||||
symbol: 'none',
|
||||
lineStyle: {
|
||||
color: '#EE6666' // 修改班级线条颜色为红色
|
||||
},
|
||||
},
|
||||
{
|
||||
value: [5000, 14000, 28000, 26000, 42000, 21000],
|
||||
name: '个人',
|
||||
symbol: 'none'
|
||||
}
|
||||
]
|
||||
data: [...stuYearDatas]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -280,10 +307,12 @@ export default {
|
||||
let data = []
|
||||
///ownRecordParams
|
||||
if (this.stuNo == null) {
|
||||
let res = await listOwnFive(ownRecordParams)
|
||||
//let res = await listOwnFive(ownRecordParams)
|
||||
let res = await getOwn()
|
||||
data = [...res.rows]
|
||||
} else {
|
||||
let res = await listStuFive(this.stuNo, ownRecordParams)
|
||||
//let res = await listStuFive(this.stuNo, ownRecordParams)
|
||||
let res = await getStu(this.stuNo)
|
||||
data = [...res.rows]
|
||||
}
|
||||
//console.log(res);
|
||||
@@ -292,8 +321,10 @@ export default {
|
||||
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
|
||||
typeList.push(data[i].typeName)
|
||||
scoreList.push(data[i].score)
|
||||
//typeList.push(data[i].typeName)
|
||||
//scoreList.push(data[i].score)
|
||||
typeList.push(data[i].stuYearName)
|
||||
scoreList.push(data[i].totalScore)
|
||||
}
|
||||
|
||||
const option = {
|
||||
@@ -330,9 +361,9 @@ export default {
|
||||
data: [
|
||||
{ value: scoreList[0], itemStyle: { color: '#4A90E2' } },
|
||||
{ value: scoreList[1], itemStyle: { color: '#50E3C2' } },
|
||||
{ value: scoreList[2], itemStyle: { color: '#5EABE1' } },
|
||||
{ value: scoreList[3], itemStyle: { color: '#7ED321' } },
|
||||
{ value: scoreList[4], itemStyle: { color: '#57D9E3' } }
|
||||
{ value: scoreList[2], itemStyle: { color: '#5EABE1' } }
|
||||
// { value: scoreList[3], itemStyle: { color: '#7ED321' } },
|
||||
// { value: scoreList[4], itemStyle: { color: '#57D9E3' } }
|
||||
],
|
||||
type: 'bar'
|
||||
}
|
||||
@@ -340,11 +371,27 @@ export default {
|
||||
}
|
||||
this.createChart('grade', option)
|
||||
},
|
||||
rankingChart() {
|
||||
async rankingChart() {
|
||||
let data = []
|
||||
if (this.stuNo == null) {
|
||||
let res = await getOwn()
|
||||
data = [...res.rows]
|
||||
} else {
|
||||
let res = await getStu(this.stuNo)
|
||||
data = [...res.rows]
|
||||
}
|
||||
let typeList = []
|
||||
let rankList = []
|
||||
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
typeList.push(data[i].stuYearName)
|
||||
rankList.push(data[i].majorRank)
|
||||
}
|
||||
console.log(this.stuNo);
|
||||
const option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['第一学期', '第二学期', '第三学期', '第四学期', '第五学期', '第六学期'], // 这里填入你的数据
|
||||
data: [...typeList], // 这里填入你的数据
|
||||
axisLabel: {
|
||||
color: 'white',
|
||||
fontSize: 12,
|
||||
@@ -377,7 +424,7 @@ export default {
|
||||
color: '#154A89',
|
||||
opacity: 0.5,
|
||||
},
|
||||
data: [56, 45, 34, 7, 20, 7],
|
||||
data: [...rankList],
|
||||
}],
|
||||
grid: {
|
||||
left: 0,
|
||||
@@ -652,7 +699,8 @@ html {
|
||||
|
||||
}
|
||||
}
|
||||
tr:gt(0) td:gt(1){
|
||||
|
||||
tr:gt(0) td:gt(1) {
|
||||
padding-left: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user