|
|
|
|
|
|
|
|
$(function () {
|
|
|
const axiosConf = { url: config_serverIp + "/dataex/report/QuerySimpleGP", method: 'post' };
|
|
|
var loadingHtml = ` <div class="loader">
|
|
|
<div class="loader-inner ball-pulse">
|
|
|
<div></div>
|
|
|
<div></div>
|
|
|
<div></div>
|
|
|
</div>
|
|
|
</div>`
|
|
|
var chartsLoadindStyle = {
|
|
|
text: 'loading',
|
|
|
color: '#4cbbff',
|
|
|
textColor: '#4cbbff',
|
|
|
maskColor: 'rgba(0, 0, 0, 0.3)',
|
|
|
|
|
|
}
|
|
|
var switchTime = "all"
|
|
|
let l1xueduan = "0"
|
|
|
let l1Type = "teacher"
|
|
|
l1(l1xueduan, l1Type, switchTime);
|
|
|
l2(switchTime)
|
|
|
let r1_xueduan = "0"
|
|
|
|
|
|
let c2_peple = "teacher"
|
|
|
|
|
|
let r2Type = 1
|
|
|
let c2Type = 0
|
|
|
// let l1Type = 1
|
|
|
|
|
|
// l1(l1Type, switchTime);
|
|
|
// l2_paihang("4")
|
|
|
// c1();
|
|
|
// c2(c2Type, switchTime);
|
|
|
// c2_huizong(c2Type, switchTime);
|
|
|
|
|
|
r2_jspaihang(r2Type, switchTime)
|
|
|
r2_jgpaihang(r2Type, switchTime)
|
|
|
|
|
|
|
|
|
$('body').on('click', '#switch_day', function (e) {
|
|
|
switchTime = "day"
|
|
|
$('.switch-time').children().removeClass("act")
|
|
|
$('#switch_day').addClass("act")
|
|
|
|
|
|
// l1(l1Type, switchTime);
|
|
|
// l2_paihang("4", switchTime);
|
|
|
// c1(switchTime);
|
|
|
// c2(c2Type, switchTime);
|
|
|
// c2_huizong(c2Type, switchTime);
|
|
|
l1(l1xueduan, l1Type, switchTime);
|
|
|
l2(switchTime)
|
|
|
c2(c2_peple, switchTime);
|
|
|
C2B(switchTime, c2Type)
|
|
|
r1(r1_xueduan, switchTime);
|
|
|
r2_jspaihang(r2Type, switchTime);
|
|
|
r2_jgpaihang(r2Type, switchTime);
|
|
|
})
|
|
|
$('body').on('click', '#switch_month', function (e) {
|
|
|
switchTime = "month"
|
|
|
$('.switch-time').children().removeClass("act")
|
|
|
|
|
|
$('#switch_month').addClass("act")
|
|
|
// l1(l1Type, switchTime);
|
|
|
// l2_paihang("4", switchTime);
|
|
|
// c1(switchTime);
|
|
|
// c2(c2Type, switchTime);
|
|
|
// c2_huizong(c2Type, switchTime);
|
|
|
|
|
|
l1(l1xueduan, l1Type, switchTime);
|
|
|
l2(switchTime)
|
|
|
c2(c2_peple, switchTime);
|
|
|
C2B(switchTime, c2Type)
|
|
|
r1(r1_xueduan, switchTime);
|
|
|
r2_jspaihang(r2Type, switchTime);
|
|
|
r2_jgpaihang(r2Type, switchTime);
|
|
|
})
|
|
|
$('body').on('click', '#switch_all', function (e) {
|
|
|
switchTime = "all"
|
|
|
$('.switch-time').children().removeClass("act")
|
|
|
$('#switch_all').addClass("act")
|
|
|
|
|
|
// l1(l1Type, switchTime);
|
|
|
// l2_paihang("4", switchTime);
|
|
|
// c1(switchTime);
|
|
|
// c2(c2Type, switchTime);
|
|
|
// c2_huizong(c2Type, switchTime);
|
|
|
l1(l1xueduan, l1Type, switchTime);
|
|
|
l2(switchTime)
|
|
|
c2(c2_peple, switchTime);
|
|
|
C2B(switchTime, c2Type)
|
|
|
r1(r1_xueduan, switchTime);
|
|
|
r2_jspaihang(r2Type, switchTime);
|
|
|
r2_jgpaihang(r2Type, switchTime);
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
|
|
|
|
|
|
|
|
|
// 资源建设情况监测
|
|
|
$('#hdktfw').on('change', function () {
|
|
|
l1_xueduan = $(this).val() + ""
|
|
|
l1(l1_xueduan, l1Type, switchTime);
|
|
|
})
|
|
|
$('body').on('click', '#l1_hdkt', function (e) {
|
|
|
l1Type = "teacher"
|
|
|
$('#l1_xuezhi a').removeClass("act")
|
|
|
$('#l1_hdkt').addClass("act")
|
|
|
l1(l1xueduan, l1Type, switchTime);
|
|
|
})
|
|
|
$('body').on('click', '#l1_lxxt', function (e) {
|
|
|
l1Type = "student"
|
|
|
$('#l1_xuezhi a').removeClass("act")
|
|
|
$('#l1_lxxt').addClass("act")
|
|
|
l1(l1xueduan, l1Type, switchTime);
|
|
|
})
|
|
|
function l1(xueduan, type, time) {
|
|
|
|
|
|
|
|
|
let query_id = "org_" + type + "_login_num_" + time
|
|
|
var myChart = echarts.init(document.getElementById('l1')); // 各阶段学校数量
|
|
|
myChart.showLoading(chartsLoadindStyle);
|
|
|
|
|
|
if (time == "all") {
|
|
|
query_param = [xueduan, xueduan]
|
|
|
} else if (time == "month") {
|
|
|
query_param = [xueduan, xueduan, nowYear]
|
|
|
|
|
|
} else if (time == "day") {
|
|
|
query_param = [xueduan, xueduan, nowYear, nowMonth]
|
|
|
}
|
|
|
|
|
|
$.post(config_serverIp + "/dataex/report/QuerySimpleGP", JSON.stringify(
|
|
|
{
|
|
|
"access_token": "TSKP##20211130104505##a6ce11eab94df48a6ce11eab",
|
|
|
"query": {
|
|
|
"query_id": query_id,
|
|
|
"query_param": query_param
|
|
|
},
|
|
|
"query_cache": 0,
|
|
|
"query_count": [
|
|
|
"total"
|
|
|
],
|
|
|
"query_format": "echarts",
|
|
|
"query_group": [
|
|
|
"org_name"
|
|
|
]
|
|
|
}
|
|
|
|
|
|
|
|
|
), function (resport) {
|
|
|
|
|
|
const data = JSON.parse(resport.result)
|
|
|
|
|
|
let seriesData = []
|
|
|
|
|
|
// if (type == 1) {
|
|
|
// data.groups[1].map((e, i) => {
|
|
|
// seriesData.push({
|
|
|
// name: e,
|
|
|
// type: 'bar',
|
|
|
// stack: 'total',
|
|
|
// barMaxWidth: 18,
|
|
|
// data: data.datas[i]
|
|
|
// })
|
|
|
// })
|
|
|
// } else if (type == 2) {
|
|
|
// data.groups[1].map((e, i) => {
|
|
|
// seriesData.push({
|
|
|
// name: e,
|
|
|
// type: 'bar',
|
|
|
// stack: 'total',
|
|
|
// data: data.datas2[i]
|
|
|
|
|
|
// })
|
|
|
// })
|
|
|
// }
|
|
|
|
|
|
|
|
|
myChart.hideLoading();
|
|
|
|
|
|
option = {
|
|
|
// height: "100px",
|
|
|
tooltip: {
|
|
|
trigger: 'axis',
|
|
|
axisPointer: {
|
|
|
type: 'cross',
|
|
|
crossStyle: {
|
|
|
color: '#999'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
textStyle: {
|
|
|
color: '#01DFF4'
|
|
|
},
|
|
|
grid: {
|
|
|
top: 60,
|
|
|
bottom: 20,
|
|
|
right: 20
|
|
|
},
|
|
|
color: ["#0BCAEA", "#FE8E3A", "#3FDB94", "#4992FF", "#FF6E76"],
|
|
|
legend: {
|
|
|
data: data.groups[1],
|
|
|
top: 20,
|
|
|
right: 10,
|
|
|
itemWidth: 8,
|
|
|
itemHeight: 8,
|
|
|
textStyle: {
|
|
|
color: '#01DFF4'
|
|
|
},
|
|
|
},
|
|
|
xAxis: [
|
|
|
{
|
|
|
type: 'category',
|
|
|
data: data.groups[0],
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#01DFF4' //更改坐标轴颜色
|
|
|
}
|
|
|
},
|
|
|
|
|
|
axisLabel: {
|
|
|
interval: 0,
|
|
|
textStyle: {
|
|
|
color: '#ffffff'
|
|
|
},
|
|
|
formatter: data.groups[0]
|
|
|
},
|
|
|
},
|
|
|
|
|
|
],
|
|
|
yAxis: [
|
|
|
{
|
|
|
type: 'value',
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#01DFF4' //更改坐标轴颜色
|
|
|
}
|
|
|
},
|
|
|
splitLine: {//分割线配置
|
|
|
lineStyle: {
|
|
|
color: "#00ffff50",
|
|
|
}
|
|
|
},
|
|
|
axisLabel: {
|
|
|
color: "white"
|
|
|
}
|
|
|
},
|
|
|
|
|
|
],
|
|
|
// dataZoom: [
|
|
|
// {
|
|
|
// type: "slider", //slider:滑块 inside:内置,依靠鼠标滚轮或者双击缩放
|
|
|
// xAxisIndex: 0, //显示x轴滑块
|
|
|
// height: "15px",
|
|
|
// end: 80,
|
|
|
// top: "85%"
|
|
|
// }
|
|
|
// ],
|
|
|
series: {
|
|
|
name: "互动课堂",
|
|
|
type: 'bar',
|
|
|
stack: 'total',
|
|
|
barMaxWidth: 18,
|
|
|
data: data.datas[0]
|
|
|
}
|
|
|
};
|
|
|
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
|
myChart.setOption(option);
|
|
|
window.addEventListener("resize", function () {
|
|
|
myChart.resize();
|
|
|
});
|
|
|
}, 'json')
|
|
|
}
|
|
|
|
|
|
function l2(time) {
|
|
|
|
|
|
if (time == "all") {
|
|
|
query_param = []
|
|
|
query_group = ["year_name"]
|
|
|
} else if (time == "month") {
|
|
|
query_param = [nowYear]
|
|
|
query_group = ["month_name"]
|
|
|
} else if (time == "day") {
|
|
|
query_param = [nowYear, nowMonth]
|
|
|
query_group = ["day_name"]
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var myChart = echarts.init(document.getElementById('l2')); // 各阶段学校数量
|
|
|
myChart.showLoading(chartsLoadindStyle);
|
|
|
|
|
|
$.post(config_serverIp + "/dataex/report/QuerySimpleGP", JSON.stringify(
|
|
|
{
|
|
|
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
|
|
|
"query": {
|
|
|
"query_id": "teacher_student_login_num_" + time,
|
|
|
"query_param": query_param
|
|
|
},
|
|
|
"query_cache": 0,
|
|
|
"query_count": [
|
|
|
"total"
|
|
|
],
|
|
|
"query_format": "echarts",
|
|
|
"query_group": query_group
|
|
|
}
|
|
|
|
|
|
), function (resport) {
|
|
|
const data = JSON.parse(resport.result)
|
|
|
|
|
|
|
|
|
|
|
|
myChart.hideLoading();
|
|
|
|
|
|
option = {
|
|
|
// height: "100px",
|
|
|
tooltip: {
|
|
|
trigger: 'axis',
|
|
|
axisPointer: {
|
|
|
type: 'cross',
|
|
|
crossStyle: {
|
|
|
color: '#999'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
textStyle: {
|
|
|
color: '#01DFF4'
|
|
|
},
|
|
|
grid: {
|
|
|
top: 40,
|
|
|
bottom: 40,
|
|
|
right: 35
|
|
|
},
|
|
|
color: ["#fcff00", "#01f0ff"],
|
|
|
legend: {
|
|
|
data: ['资源上传', '资源下载'],
|
|
|
textStyle: {
|
|
|
color: '#01DFF4'
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
xAxis: [
|
|
|
{
|
|
|
type: 'category',
|
|
|
data: data.groups[0],
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#01DFF4' //更改坐标轴颜色
|
|
|
}
|
|
|
},
|
|
|
axisLabel: {
|
|
|
rotate: 30,
|
|
|
color: "white"
|
|
|
},
|
|
|
splitLine: {//分割线配置
|
|
|
lineStyle: {
|
|
|
color: "rgba(219,225,255,1)",
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
],
|
|
|
yAxis: [
|
|
|
|
|
|
{
|
|
|
name: "资源上传",
|
|
|
type: 'value',
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#01DFF4' //更改坐标轴颜色
|
|
|
}
|
|
|
},
|
|
|
splitLine: {//分割线配置
|
|
|
lineStyle: {
|
|
|
color: "#00ffff50",
|
|
|
}
|
|
|
},
|
|
|
axisLabel: {
|
|
|
color: "white"
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
splitLine: {//分割线配置
|
|
|
lineStyle: {
|
|
|
show: false,
|
|
|
color: "#010d5f",
|
|
|
}
|
|
|
},
|
|
|
name: "资源下载",
|
|
|
type: 'value',
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#01DFF4' //更改坐标轴颜色
|
|
|
}
|
|
|
},
|
|
|
axisLabel: {
|
|
|
color: "white"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
series: [
|
|
|
{
|
|
|
name: '资源上传',
|
|
|
type: 'line',
|
|
|
areaStyle: {
|
|
|
color: {
|
|
|
type: 'linear',
|
|
|
x: 0,
|
|
|
y: 0,
|
|
|
x2: 0,
|
|
|
y2: 1,
|
|
|
colorStops: [{
|
|
|
offset: 0, color: '#fcff00' // 100% 处的颜色
|
|
|
}, {
|
|
|
offset: 1, color: '#fcff0000' // 0% 处的颜色
|
|
|
}],
|
|
|
global: false // 缺省为 false
|
|
|
}
|
|
|
},
|
|
|
yAxisIndex: 0,
|
|
|
data: data.datas[0],
|
|
|
smooth: true
|
|
|
},
|
|
|
{
|
|
|
name: '资源下载',
|
|
|
type: 'line',
|
|
|
areaStyle: {
|
|
|
color: {
|
|
|
type: 'linear',
|
|
|
x: 0,
|
|
|
y: 0,
|
|
|
x2: 0,
|
|
|
y2: 1,
|
|
|
colorStops: [{
|
|
|
offset: 0, color: '#01f0ff' // 100% 处的颜色
|
|
|
}, {
|
|
|
offset: 1, color: '#01f0ff00' // 0% 处的颜色
|
|
|
}],
|
|
|
global: false // 缺省为 false
|
|
|
}
|
|
|
},
|
|
|
data: data.datas2[0],
|
|
|
yAxisIndex: 1,
|
|
|
smooth: true
|
|
|
}
|
|
|
|
|
|
]
|
|
|
};
|
|
|
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
|
myChart.setOption(option);
|
|
|
window.addEventListener("resize", function () {
|
|
|
myChart.resize();
|
|
|
});
|
|
|
}, 'json')
|
|
|
}
|
|
|
|
|
|
l3()
|
|
|
function l3() {
|
|
|
axios({
|
|
|
...axiosConf,
|
|
|
data: {
|
|
|
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
|
|
|
"query": {
|
|
|
"query_id": "stage_interact_num_month_all",
|
|
|
"query_param": [
|
|
|
"1",
|
|
|
"1",
|
|
|
"2021",
|
|
|
"10",
|
|
|
"1",
|
|
|
"1",
|
|
|
"1",
|
|
|
"1",
|
|
|
"2021",
|
|
|
"10",
|
|
|
"1",
|
|
|
"1",
|
|
|
"1",
|
|
|
"1",
|
|
|
"2021",
|
|
|
"10",
|
|
|
"1",
|
|
|
"1",
|
|
|
"1",
|
|
|
"1",
|
|
|
"2021",
|
|
|
"10",
|
|
|
"1",
|
|
|
"1",
|
|
|
"1",
|
|
|
"1",
|
|
|
"2021",
|
|
|
"10",
|
|
|
"1",
|
|
|
"1"
|
|
|
]
|
|
|
},
|
|
|
"query_cache": 0,
|
|
|
"query_count": [
|
|
|
"total"
|
|
|
],
|
|
|
"query_format": "json",
|
|
|
"query_group": [
|
|
|
"subname", "item"
|
|
|
]
|
|
|
}
|
|
|
|
|
|
})
|
|
|
.then((response) => {
|
|
|
|
|
|
const resData = JSON.parse(response.data.result)
|
|
|
|
|
|
resData.map((e, index) => {
|
|
|
switch (e.no) {
|
|
|
|
|
|
case 1:
|
|
|
$("#kttiwenmonth").html(e.total)
|
|
|
break;
|
|
|
case 2:
|
|
|
$("#kttiwentotal").html(e.total)
|
|
|
break;
|
|
|
case 3:
|
|
|
$("#ktqiangdamonth").html(e.total)
|
|
|
break;
|
|
|
case 4:
|
|
|
$("#ktqiangdatotal").html(e.total)
|
|
|
break;
|
|
|
case 5:
|
|
|
$("#kttoupiaomonth").html(e.total)
|
|
|
break;
|
|
|
case 6:
|
|
|
$("#kttoupiaototal").html(e.total)
|
|
|
break;
|
|
|
case 7:
|
|
|
$("#kttupianmonth").html(e.total)
|
|
|
break;
|
|
|
case 8:
|
|
|
$("#kttupiantotal").html(e.total)
|
|
|
break;
|
|
|
case 9:
|
|
|
$("#ktnowtotal").html(e.total)
|
|
|
break;
|
|
|
case 10:
|
|
|
$("#kttotal").html(e.total)
|
|
|
break;
|
|
|
|
|
|
default: break;
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
c2(c2_peple, switchTime);
|
|
|
|
|
|
function c2(peple, time) {
|
|
|
if (time === "all") {
|
|
|
query_param = []
|
|
|
} else if (time === "month") {
|
|
|
query_id = "social_topic_chart_month"
|
|
|
query_param = [nowYear, nowYear, nowYear, nowYear, nowYear]
|
|
|
} else if (time === "day") {
|
|
|
query_id = "social_topic_chart_day"
|
|
|
query_param = [nowYear, nowMonth, nowYear, nowMonth, nowYear, nowMonth, nowYear, nowMonth, nowYear, nowMonth,]
|
|
|
|
|
|
}
|
|
|
|
|
|
console.log({
|
|
|
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
|
|
|
"query": {
|
|
|
"query_id": peple + "_use_chart_" + time,
|
|
|
"query_param": query_param
|
|
|
},
|
|
|
"query_cache": 0,
|
|
|
"query_count": [
|
|
|
"total"
|
|
|
],
|
|
|
"query_format": "echarts",
|
|
|
"query_group": [
|
|
|
"item"
|
|
|
]
|
|
|
});
|
|
|
|
|
|
axios({
|
|
|
...axiosConf,
|
|
|
data: {
|
|
|
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
|
|
|
"query": {
|
|
|
"query_id": peple + "_use_chart_" + time,
|
|
|
"query_param": query_param
|
|
|
},
|
|
|
"query_cache": 0,
|
|
|
"query_count": [
|
|
|
"total"
|
|
|
],
|
|
|
"query_format": "echarts",
|
|
|
"query_group": [
|
|
|
"item"
|
|
|
]
|
|
|
}
|
|
|
|
|
|
|
|
|
}).then((response) => {
|
|
|
const resData = JSON.parse(response.data.result)
|
|
|
console.log(resData, 'bing');
|
|
|
const pieData = []
|
|
|
resData.groups[0].map((e, i) => {
|
|
|
pieData.push({
|
|
|
name: e,
|
|
|
value: resData.datas[0][i]
|
|
|
})
|
|
|
})
|
|
|
|
|
|
var myChart = echarts.init(document.getElementById('c3')); // 各阶段学校数量
|
|
|
option = {
|
|
|
// height: "100px",
|
|
|
tooltip: {
|
|
|
trigger: 'item'
|
|
|
},
|
|
|
grid: {
|
|
|
left: 0,
|
|
|
top: 0,
|
|
|
right: 0,
|
|
|
bottom: 0
|
|
|
},
|
|
|
color: ["#0BCAEA", "#FE8E3A", "#3FDB94"],
|
|
|
legend: {
|
|
|
data: resData.groups[0],
|
|
|
itemWidth: 8,
|
|
|
itemHeight: 8,
|
|
|
right: 30,
|
|
|
top: 30,
|
|
|
orient: "vertical",
|
|
|
textStyle: {
|
|
|
color: '#01DFF4'
|
|
|
},
|
|
|
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
name: '访问量',
|
|
|
type: 'pie',
|
|
|
radius: '50%',
|
|
|
data: pieData,
|
|
|
selectedMode: 'single',
|
|
|
},
|
|
|
|
|
|
]
|
|
|
};
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
|
myChart.setOption(option);
|
|
|
myChart.on('click', function (param) {
|
|
|
//param.name x轴值,param.data y轴值
|
|
|
c2Type = param.dataIndex
|
|
|
C2B(switchTime, param.dataIndex)
|
|
|
});
|
|
|
|
|
|
window.addEventListener("resize", function () {
|
|
|
myChart.resize();
|
|
|
});
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
C2B(switchTime, c2Type)
|
|
|
function C2B(time, type) {
|
|
|
if (time === "all") {
|
|
|
query_param = []
|
|
|
query_group = ["year_name"]
|
|
|
} else if (time === "month") {
|
|
|
query_param = [nowYear]
|
|
|
query_group = ["month_name"]
|
|
|
} else if (time === "day") {
|
|
|
query_param = [nowYear, nowMonth]
|
|
|
query_group = ["day_name"]
|
|
|
}
|
|
|
|
|
|
|
|
|
axios({
|
|
|
...axiosConf,
|
|
|
data: {
|
|
|
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
|
|
|
"query": {
|
|
|
"query_id": "teacher_use_num_" + time,
|
|
|
"query_param": query_param
|
|
|
},
|
|
|
"query_cache": 0,
|
|
|
"query_count": [
|
|
|
"total",
|
|
|
"total2",
|
|
|
"total3",
|
|
|
"total4",
|
|
|
"total5"
|
|
|
],
|
|
|
"query_format": "echarts",
|
|
|
"query_group": query_group
|
|
|
}
|
|
|
|
|
|
}).then((response) => {
|
|
|
const resData = JSON.parse(response.data.result)
|
|
|
console.log(resData, 1);
|
|
|
let series = {}
|
|
|
let name = ""
|
|
|
|
|
|
switch (type) {
|
|
|
case 0:
|
|
|
name = '提问'
|
|
|
series = {
|
|
|
name: name,
|
|
|
type: 'line',
|
|
|
data: resData.datas[0]
|
|
|
}
|
|
|
break;
|
|
|
case 1:
|
|
|
name = '投票'
|
|
|
series = {
|
|
|
name: name,
|
|
|
type: 'line',
|
|
|
data: resData.datas2[0]
|
|
|
}
|
|
|
break;
|
|
|
case 2:
|
|
|
name = '抢答'
|
|
|
series = {
|
|
|
|
|
|
name: name,
|
|
|
type: 'line',
|
|
|
data: resData.datas3[0]
|
|
|
}
|
|
|
break;
|
|
|
case 3:
|
|
|
name = '图片分享'
|
|
|
series = {
|
|
|
|
|
|
name: name,
|
|
|
type: 'line',
|
|
|
data: resData.datas4[0]
|
|
|
}
|
|
|
break;
|
|
|
case 4:
|
|
|
name = '收集图片'
|
|
|
series = {
|
|
|
|
|
|
name: name,
|
|
|
type: 'line',
|
|
|
data: resData.datas5[0]
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var myChart = echarts.init(document.getElementById('c4')); // 各阶段学校数量
|
|
|
option = {
|
|
|
// height: "100px",
|
|
|
tooltip: {
|
|
|
trigger: 'axis',
|
|
|
axisPointer: {
|
|
|
type: 'cross',
|
|
|
crossStyle: {
|
|
|
color: '#999'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
textStyle: {
|
|
|
color: '#01DFF4'
|
|
|
},
|
|
|
grid: {
|
|
|
right: 10,
|
|
|
top: 25,
|
|
|
bottom: 80,
|
|
|
},
|
|
|
color: ["#0BCAEA", "#FE8E3A", "#3FDB94"],
|
|
|
|
|
|
title: {
|
|
|
show: true,
|
|
|
left: 'center',
|
|
|
text: name,
|
|
|
textStyle: {
|
|
|
fontSize: 16,
|
|
|
color: "white",
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
xAxis: [
|
|
|
{
|
|
|
type: 'category',
|
|
|
data: resData.groups[0],
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#01DFF4' //更改坐标轴颜色
|
|
|
}
|
|
|
},
|
|
|
axisLabel: {
|
|
|
rotate: 30,
|
|
|
fontSize: 10
|
|
|
},
|
|
|
|
|
|
},
|
|
|
],
|
|
|
yAxis: [
|
|
|
|
|
|
{
|
|
|
type: 'value',
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#01DFF4' //更改坐标轴颜色
|
|
|
}
|
|
|
},
|
|
|
splitLine: {//分割线配置
|
|
|
lineStyle: {
|
|
|
color: "#00ffff50",
|
|
|
}
|
|
|
},
|
|
|
axisLabel: {
|
|
|
color: "white"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
// dataZoom: [
|
|
|
// {
|
|
|
// type: "slider", //slider:滑块 inside:内置,依靠鼠标滚轮或者双击缩放
|
|
|
// xAxisIndex: 0, //显示x轴滑块
|
|
|
// height: "15px",
|
|
|
// end: 80,
|
|
|
// top: "90%"
|
|
|
// }
|
|
|
// ],
|
|
|
series: series
|
|
|
};
|
|
|
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
|
myChart.setOption(option);
|
|
|
window.addEventListener("resize", function () {
|
|
|
myChart.resize();
|
|
|
});
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
$('#r1_xueduan').on('change', function () {
|
|
|
r1_xueduan = $(this).val() + ""
|
|
|
r1(r1_xueduan, switchTime);
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r1(r1_xueduan, switchTime);
|
|
|
function r1(xueduan, time) {
|
|
|
|
|
|
if (time === "all") {
|
|
|
query_id = "stage_org_social_all"
|
|
|
query_param = [xueduan, xueduan]
|
|
|
} else if (time === "month") {
|
|
|
query_id = "stage_org_social_month"
|
|
|
query_param = [xueduan, xueduan, nowYear]
|
|
|
} else if (time === "day") {
|
|
|
query_id = "stage_org_social_day"
|
|
|
query_param = [xueduan, xueduan, nowYear, nowMonth]
|
|
|
}
|
|
|
|
|
|
axios({
|
|
|
...axiosConf,
|
|
|
data: {
|
|
|
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
|
|
|
"query": {
|
|
|
"query_id": "teacher_class_time_" + time,
|
|
|
"query_param": query_param
|
|
|
},
|
|
|
"query_cache": 0,
|
|
|
"query_count": [
|
|
|
"total"
|
|
|
],
|
|
|
"query_format": "echarts",
|
|
|
"query_group": [
|
|
|
"org_name"
|
|
|
]
|
|
|
}
|
|
|
})
|
|
|
.then((response) => {
|
|
|
|
|
|
const resData = JSON.parse(response.data.result)
|
|
|
console.log(resData, 1);
|
|
|
const xAxisName = resData.groups[0].map((e, i) => {
|
|
|
return e.replace("唐山市", "")
|
|
|
})
|
|
|
const legendData = resData.groups[1]
|
|
|
|
|
|
let series = []
|
|
|
resData.groups[0].map((e, i) => {
|
|
|
series.push({
|
|
|
name: e,
|
|
|
type: 'bar',
|
|
|
stack: "all",
|
|
|
data: resData.datas[i],
|
|
|
barMaxWidth: 40,
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var myChart = echarts.init(document.getElementById('r1')); // 各阶段学校数量
|
|
|
option = {
|
|
|
// height: "100px",
|
|
|
tooltip: {
|
|
|
trigger: 'axis',
|
|
|
axisPointer: {
|
|
|
type: 'cross',
|
|
|
crossStyle: {
|
|
|
color: '#999'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
textStyle: {
|
|
|
color: '#01DFF4'
|
|
|
},
|
|
|
grid: {
|
|
|
top: 55,
|
|
|
bottom: 85,
|
|
|
right: 10,
|
|
|
left: 80
|
|
|
},
|
|
|
color: ["#0BCAEA", "#FE8E3A", "#3FDB94", "#4992FF", "#FF6E76"],
|
|
|
legend: {
|
|
|
data: legendData,
|
|
|
top: 15,
|
|
|
right: 10,
|
|
|
itemWidth: 8,
|
|
|
itemHeight: 8,
|
|
|
textStyle: {
|
|
|
color: '#01DFF4'
|
|
|
},
|
|
|
},
|
|
|
xAxis: [
|
|
|
{
|
|
|
type: 'category',
|
|
|
data: xAxisName,
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#01DFF4' //更改坐标轴颜色
|
|
|
}
|
|
|
},
|
|
|
axisLabel: {
|
|
|
interval: 0,
|
|
|
fontSize: 10,
|
|
|
rotate: "35"
|
|
|
}
|
|
|
},
|
|
|
|
|
|
],
|
|
|
yAxis: [
|
|
|
{
|
|
|
type: 'value',
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#01DFF4' //更改坐标轴颜色
|
|
|
}
|
|
|
},
|
|
|
splitLine: {//分割线配置
|
|
|
lineStyle: {
|
|
|
color: "#00ffff50",
|
|
|
}
|
|
|
},
|
|
|
axisLabel: {
|
|
|
color: "white"
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
type: 'value',
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#01DFF4' //更改坐标轴颜色
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
dataZoom: [
|
|
|
{
|
|
|
type: "slider", //slider:滑块 inside:内置,依靠鼠标滚轮或者双击缩放
|
|
|
xAxisIndex: 0, //显示x轴滑块
|
|
|
height: "15px",
|
|
|
end: 80,
|
|
|
top: "90%"
|
|
|
}
|
|
|
],
|
|
|
series: {
|
|
|
name: "互动课堂",
|
|
|
type: 'bar',
|
|
|
stack: "all",
|
|
|
data: resData.datas[0],
|
|
|
barMaxWidth: 40,
|
|
|
}
|
|
|
};
|
|
|
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
|
myChart.setOption(option);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.addEventListener("resize", function () {
|
|
|
myChart.resize();
|
|
|
});
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('body').on('click', '#r2_zysc', function (e) {
|
|
|
r2Type = 1
|
|
|
$('#r2_paihang').children().removeClass("act")
|
|
|
$('#r2_zysc').addClass("act")
|
|
|
|
|
|
r2_jspaihang(r2Type, switchTime)
|
|
|
r2_jgpaihang(r2Type, switchTime)
|
|
|
})
|
|
|
$('body').on('click', '#r2_zyxz', function (e) {
|
|
|
r2Type = 2
|
|
|
$('#r2_paihang').children().removeClass("act")
|
|
|
$('#r2_zyxz').addClass("act")
|
|
|
|
|
|
|
|
|
r2_jspaihang(r2Type, switchTime)
|
|
|
r2_jgpaihang(r2Type, switchTime)
|
|
|
})
|
|
|
// 学科资源共建共享排行榜
|
|
|
|
|
|
function r2_jspaihang(type = 1, time = "all") {
|
|
|
|
|
|
$("#gjgx_js_paihang").html(loadingHtml)
|
|
|
$("#gjgx_jg_paihang").html(loadingHtml)
|
|
|
let params = {}
|
|
|
|
|
|
// if (type == 1) {
|
|
|
// query_id = "teacher_up_top_"
|
|
|
// query_count = [
|
|
|
// "upload_total",
|
|
|
// "share_total"
|
|
|
// ]
|
|
|
// } else if (type == 2) {
|
|
|
// query_id = "teacher_down_top_"
|
|
|
// query_count = [
|
|
|
// "download_total",
|
|
|
// "share_total"
|
|
|
// ]
|
|
|
// }
|
|
|
|
|
|
if (time == "all") {
|
|
|
query_id = "teacher_use_top_all"
|
|
|
query_param = []
|
|
|
|
|
|
} else if (time == "month") {
|
|
|
query_id = "teacher_use_top_month"
|
|
|
query_param = ["2021"]
|
|
|
} else if (time == "day") {
|
|
|
query_id = "teacher_use_top_day"
|
|
|
query_param = ["2021", nowMonth]
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
$.post(config_serverIp + "/dataex/report/QuerySimpleGP", JSON.stringify(
|
|
|
{
|
|
|
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
|
|
|
"query": {
|
|
|
"query_id": "teacher_use_top_" + time,
|
|
|
"query_param": query_param
|
|
|
},
|
|
|
"query_cache": 0,
|
|
|
"query_count": [
|
|
|
"total"
|
|
|
],
|
|
|
"query_format": "json",
|
|
|
"query_group": [
|
|
|
"person_name",
|
|
|
"org_name"
|
|
|
]
|
|
|
}
|
|
|
), function (resport) {
|
|
|
const data = JSON.parse(resport.result);
|
|
|
let html = ""
|
|
|
|
|
|
|
|
|
data.map((item, index) => {
|
|
|
if (type == 1) {
|
|
|
total = item.upload_total
|
|
|
} else if (type == 2) {
|
|
|
total = item.download_total
|
|
|
|
|
|
}
|
|
|
|
|
|
html += ` <div class="list">
|
|
|
<div class="top"><img src="./images/t${index + 1}.png" /></div>
|
|
|
<div class="head"><span class="name">${item.person_name}</span><br><p class="school">${item.org_name}</p></div>
|
|
|
|
|
|
<div class="total"><span class="num">${item.total}</span><br><span class="num-name">当前累计</span>
|
|
|
</div>
|
|
|
</div>`
|
|
|
})
|
|
|
|
|
|
|
|
|
// console.log(phHtml);
|
|
|
$("#gjgx_js_paihang").html(html)
|
|
|
|
|
|
}, 'json');
|
|
|
}
|
|
|
function r2_jgpaihang(type = 1, time = "year") {
|
|
|
|
|
|
if (time === "all") {
|
|
|
query_param = []
|
|
|
query_param1 = []
|
|
|
} else if (time === "month") {
|
|
|
query_param = [nowYear, nowYear]
|
|
|
query_param1 = [nowYear]
|
|
|
} else if (time === "day") {
|
|
|
query_param = [nowYear, nowMonth]
|
|
|
query_param1 = [nowYear, nowMonth, nowYear, nowMonth]
|
|
|
}
|
|
|
|
|
|
|
|
|
axios.all([
|
|
|
axios({
|
|
|
...axiosConf,
|
|
|
data: {
|
|
|
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
|
|
|
"query": {
|
|
|
"query_id": "org_use_top_" + time,
|
|
|
"query_param": query_param
|
|
|
},
|
|
|
"query_cache": 0,
|
|
|
"query_count": [
|
|
|
"total"
|
|
|
],
|
|
|
"query_format": "json",
|
|
|
"query_group": [
|
|
|
"org_name"
|
|
|
]
|
|
|
}
|
|
|
}),
|
|
|
axios({
|
|
|
...axiosConf,
|
|
|
data: {
|
|
|
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
|
|
|
"query": {
|
|
|
"query_id": "org_use_top_total_" + time,
|
|
|
"query_param": query_param1
|
|
|
},
|
|
|
"query_cache": 0,
|
|
|
"query_count": [
|
|
|
"total"
|
|
|
],
|
|
|
"query_format": "json",
|
|
|
"query_group": [
|
|
|
"org_name"
|
|
|
]
|
|
|
}
|
|
|
|
|
|
})
|
|
|
]).then(axios.spread(function (orgUseTopNum, orgUsUopTotalNum) {
|
|
|
console.log("orgUseTopNum", JSON.parse(orgUseTopNum.data.result));
|
|
|
console.log("orgUsUopTotalNum", JSON.parse(orgUsUopTotalNum.data.result));
|
|
|
const orgUserTop = JSON.parse(orgUseTopNum.data.result)
|
|
|
const orgUsUopTotal = JSON.parse(orgUsUopTotalNum.data.result)
|
|
|
let school = []
|
|
|
orgUserTop.map((item) => {
|
|
|
school.push({ name: item.org_name });
|
|
|
})
|
|
|
// 去重
|
|
|
schoolFil = school.filter((item, index) => {
|
|
|
return school.findIndex(_item => _item.name == item.name) == index;
|
|
|
})
|
|
|
|
|
|
schoolFil.map((e) => {
|
|
|
e.children = []
|
|
|
orgUserTop.map((item) => {
|
|
|
if (item.org_name == e.name) {
|
|
|
e.children.push({ item: item.item, total: item.total })
|
|
|
}
|
|
|
})
|
|
|
orgUsUopTotal.map((item) => {
|
|
|
if (item.org_name == e.name) {
|
|
|
e.total = item.total
|
|
|
}
|
|
|
|
|
|
})
|
|
|
})
|
|
|
console.log(schoolFil, 'schoolFil');
|
|
|
|
|
|
let html = ""
|
|
|
let total = ""
|
|
|
|
|
|
|
|
|
|
|
|
schoolFil.map((item, index) => {
|
|
|
|
|
|
html += `
|
|
|
<div class="list">
|
|
|
<img src="./images/top${index + 1}.png" alt="" class="top1" />
|
|
|
|
|
|
<div class="top"><img src="./images/school_ico.svg" class="ico" /></div>
|
|
|
<div class="head"><span class="name">${item.name}</span></div>
|
|
|
<div class="total"><span class="num">${item.children[0].total}</span><br><span class="num-name">资源上传</span></div>
|
|
|
<div class="total"><span class="num">${item.children[1].total}</span><br><span class="num-name">资源共享</span></div>
|
|
|
<div class="total"><span class="num">${item.children[2].total}</span><br><span class="num-name">资源共享</span></div>
|
|
|
<div class="total"><span class="num">${item.children[3].total}</span><br><span class="num-name">资源共享</span></div>
|
|
|
<div class="total" style="float:right;"><span class="numSum">${item.total}</span></div>
|
|
|
|
|
|
</div>`
|
|
|
|
|
|
})
|
|
|
// console.log(phHtml);
|
|
|
$("#gjgx_jg_paihang").html(html);
|
|
|
}));
|
|
|
// $.post(config_serverIp + "/dataex/report/QuerySimpleGP", JSON.stringify(
|
|
|
// {
|
|
|
// "access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
|
|
|
// "query": {
|
|
|
// "query_id": "org_use_top_all",
|
|
|
// "query_param": [
|
|
|
// ]
|
|
|
// },
|
|
|
// "query_cache": 0,
|
|
|
// "query_count": [
|
|
|
// "total"
|
|
|
// ],
|
|
|
// "query_format": "json",
|
|
|
// "query_group": [
|
|
|
// "org_name"
|
|
|
// ]
|
|
|
// }
|
|
|
// ), function (resport) {
|
|
|
// const data = JSON.parse(resport.result);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// console.log(schoolFil, '111');
|
|
|
|
|
|
|
|
|
// console.log(data, '^^22^');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }, 'json');
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|