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