You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1267 lines
39 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

$(function () {
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 r2Type = 1
let r1Type = 1
let c2Type = 1
let l1Type = 1
l1(l1Type, switchTime);
l2_paihang("4")
c1();
c2(c2Type, switchTime);
c2_huizong(c2Type, switchTime);
r1(r1Type, 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);
r1(r1Type, switchTime);
r2_jspaihang(r2Type, switchTime);
r2_jgpaihang(r2Type, switchTime);
})
$('body').on('click', '#switch_year', function (e) {
switchTime = "year"
$('#switch-time').children().removeClass("act")
$('#switch_year').addClass("act")
l1(l1Type, switchTime);
l2_paihang("4", switchTime);
c1(switchTime);
c2(c2Type, switchTime);
c2_huizong(c2Type, switchTime);
r1(r1Type, 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);
r1(r1Type, switchTime);
r2_jspaihang(r2Type, switchTime);
r2_jgpaihang(r2Type, switchTime);
})
// lllllllllllllllllllllllllllllllll
// 资源建设情况监测
$('body').on('click', '#zyjsqkjc_zysc', function (e) {
l1Type = 1
$('#zyjsqkjc').children().removeClass("act")
$('#zyjsqkjc_zysc').addClass("act")
l1(l1Type, switchTime);
})
$('body').on('click', '#zyjsqkjc_aygx', function (e) {
l1Type = 2
$('#zyjsqkjc').children().removeClass("act")
$('#zyjsqkjc_aygx').addClass("act")
l1(l1Type, switchTime);
})
function l1(type = 1, time = "all") {
var myChart = echarts.init(document.getElementById('l1')); // 各阶段学校数量
myChart.showLoading(chartsLoadindStyle);
let query_id = ""
if (time == "all") {
query_id = "resource_up_share_all"
query_param = []
query_group = ["year_name", "type_name"]
xAxisformatter = '{value} 年'
} else if (time == "year") {
query_id = "resource_up_share_month"
query_param = ["2021"]
query_group = ["month_name", "type_name"]
xAxisformatter = '{value} 月'
} else if (time == "month") {
query_id = "resource_up_share_day"
query_param = ["2021", nowMonth]
query_group = ["day_name", "type_name"]
xAxisformatter = '{value} 日'
}
$.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": [
"upload_total",
"share_total"
],
"query_format": "echarts",
"query_group": query_group
}
), function (resport) {
const data = JSON.parse(resport.result)
// console.log(JSON.parse(resport.result), data.groups[0]);
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: {
textStyle: {
color: '#ffffff'
},
formatter: xAxisformatter,
interval: 0,
},
},
],
yAxis: [
{
type: 'value',
axisLabel: {
textStyle: {
color: '#ffffff', //坐标轴的颜色
},
},
},
],
series: seriesData
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize", function () {
myChart.resize();
});
}, 'json')
}
$('body').on('click', '#l2_xiaoxue', function (e) {
$('#xuezhi').children().removeClass("act")
$('#l2_xiaoxue').addClass("act")
l2_paihang(edu = "4")
})
$('body').on('click', '#l2_chuzhong', function (e) {
$('#xuezhi').children().removeClass("act")
$('#l2_chuzhong').addClass("act")
l2_paihang(edu = "5")
})
$('body').on('click', '#l2_gaozhong', function (e) {
$('#xuezhi').children().removeClass("act")
$('#l2_gaozhong').addClass("act")
l2_paihang(edu = "6")
})
// 学科资源共建共享排行榜
function l2_paihang(edu = "4", time = "all") {
$("#zyph").html(loadingHtml)
let query_id = ""
if (time == "all") {
query_id = "subject_top_all"
query_param = [edu, edu]
} else if (time == "year") {
query_id = "subject_top_month"
query_param = ["2021", edu, "2021", edu]
} else if (time == "month") {
query_id = "subject_top_day"
query_param = ["2021", nowMonth, edu, "2021", nowMonth, edu]
}
$.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": [
"sub_total",
"total"
],
"query_format": "json",
"query_group": [
"subject_name",
"type_name"
]
}
), function (resport) {
const data = JSON.parse(resport.result);
console.log(JSON.parse(resport.result), '学科资源共建共享排行榜 num');
// 获取学科
const xueke = [];
data.map((item) => {
xueke.push({ id: item.subject_id, name: item.subject_name, total: item.total });
})
// 去重
xuekeFil = xueke.filter((item, index) => {
return xueke.findIndex(_item => _item.id == item.id) == index;
})
// push子数据
xuekeFil.map((xuekeItem, index) => {
let nr = []
data.map((item) => {
if (item.subject_name == xuekeItem.name) {
nr.push(item)
}
})
xuekeFil[index].item = nr
// console.log(nr, '111', xuekeFil[index].item = nr);
})
// 根据学科遍历列表
// console.log(xuekeFil);
var phHtml = ""
xuekeFil.map((item, index) => {
console.log(md5(item.name), item.name);
var html = ""
html += item.item.map((e) => `<div>${e.type_name} <span>${e.sub_total}</span></div>`
).join("")
phHtml += `
<div class="ziyuanpaihang">
<img src="./images/top${index + 1}.png" alt="" class="top">
<div class="ico">
<img src="./images/${md5(item.name)}.svg" alt=""><br>
${item.name}
</div>
<div class="content">
${html}
</div>
<div class="line"></div>
<div class="total">
<span>${item.total}</span><br>资源总量
</div>
</div>`
})
// console.log(phHtml);
$("#zyph").html(phHtml)
}, 'json');
}
// ccccccccccccccccccccccccccccccccccccccccc
function c1() {
var myChart = echarts.init(document.getElementById('c1')); // 各阶段学校数量
myChart.showLoading(chartsLoadindStyle);
$.post(config_serverIp + "/dataex/report/QuerySimpleGP", JSON.stringify(
{
"access_token": "TSKP##20211130104505##a6ce11eab94df48a6ce11eab",
"query": {
"query_id": "resource_up_down_month",
"query_param": [
"2021"
]
},
"query_cache": 0,
"query_count": [
"upload_total",
"download_total"
],
"query_format": "echarts",
"query_group": [
"month_name",
"type_name"
]
}
), function (resport) {
const data = JSON.parse(resport.result)
// console.log(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')
}
// 区域资源汇总及监测
$('body').on('click', '#qyzyhzjjc_zysc', function (e) {
c2Type = 1
$('#qyzyhzjjc').children().removeClass("act")
$('#qyzyhzjjc_zysc').addClass("act");
$("#qyzyhzjc").html(loadingHtml)
c2(c2Type, switchTime);
c2_huizong(c2Type, switchTime);
})
$('body').on('click', '#qyzyhzjjc_zyxz', function (e) {
c2Type = 2
$('#qyzyhzjjc').children().removeClass("act")
$('#qyzyhzjjc_zyxz').addClass("act")
c2(c2Type, switchTime);
c2_huizong(c2Type, switchTime);
})
$('body').on('click', '#qyzyhzjjc_zygx', function (e) {
c2Type = 3
$('#qyzyhzjjc').children().removeClass("act")
$('#qyzyhzjjc_zygx').addClass("act")
c2(c2Type, switchTime);
c2_huizong(c2Type, switchTime);
})
$('body').on('click', '#qyzyhzjjc_zytj', function (e) {
c2Type = 4
$('#qyzyhzjjc').children().removeClass("act")
$('#qyzyhzjjc_zytj').addClass("act")
c2(c2Type, switchTime);
c2_huizong(c2Type, switchTime);
})
function c2(type = 1, time = "all") {
var myChart = echarts.init(document.getElementById('c2')); // 各阶段学校数量
myChart.showLoading({
text: 'loading',
color: '#4cbbff',
textColor: '#4cbbff',
maskColor: 'rgba(0, 0, 0, 0.1)',
});
let query_id = ""
if (time == "all") {
query_id = "org_res_type_all"
query_param = []
} else if (time == "year") {
query_id = "org_res_type_month"
query_param = ["2021"]
} else if (time == "month") {
query_id = "org_res_type_day"
query_param = ["2021", 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": [
"upload_total",
"download_total",
"share_total",
"recommend_total"
],
"query_format": "echarts",
"query_group": [
"org_name",
"type_name"
]
}
), function (resport) {
const data = JSON.parse(resport.result)
// console.log(JSON.parse(resport.result), '运行情况监测11');
var dataCharts = []
if (type === 1) {
dataCharts = data.datas
} else if (type === 2) {
dataCharts = data.datas2
} else if (type === 3) {
dataCharts = data.datas3
} else if (type === 4) {
dataCharts = data.datas4
}
myChart.hideLoading();
option = {
// height: "100px",
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
textStyle: {
color: '#01DFF4'
},
grid: {
top: 60,
bottom: 70,
right: 35
},
color: ["#fcff00", "#01f0ff"],
legend: {
data: data.groups[1],
textStyle: {
color: '#01DFF4'
},
top: 35
},
xAxis: [
{
type: 'category',
data: data.groups[0],
axisLine: {
lineStyle: {
color: '#01DFF4' //更改坐标轴颜色
}
},
axisLabel: {
rotate: 35,
color: "white"
},
splitLine: {//分割线配置
lineStyle: {
color: "rgba(219,225,255,1)",
}
}
},
],
yAxis: [
{
type: 'value',
axisLine: {
lineStyle: {
color: '#01DFF4' //更改坐标轴颜色
}
},
splitLine: {//分割线配置
lineStyle: {
color: "#00ffff50",
}
},
axisLabel: {
color: "white"
}
}
],
series: [
{
name: data.groups[1][0],
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
}
},
data: dataCharts[0],
smooth: true
},
{
name: data.groups[1][1],
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: dataCharts[1],
smooth: true
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize", function () {
myChart.resize();
});
}, 'json')
}
// 学科资源共建共享排行榜
function c2_huizong(type = 1, time = "all") {
$("#qyzyhzjc").html(loadingHtml)
let query_id = ""
if (time == "all") {
query_id = "stage_rate_all"
query_param = []
} else if (time == "year") {
query_id = "stage_rate_month"
query_param = ["2021"]
} else if (time == "month") {
query_id = "stage_rate_day"
query_param = ["2021", 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": [
"upload_total",
"download_total",
"share_total",
"recommend_total"
],
"query_format": "json",
"query_group": [
"stage_name"
]
}
), function (resport) {
const data = JSON.parse(resport.result);
console.log(JSON.parse(resport.result), '区域资源汇总及监测 c2');
// 获取学科
let upload_total_sum = 0
let download_total_sum = 0
let share_total_sum = 0
let recommend_total_sum = 0
data.map((item) => {
download_total_sum += Number(item.download_total)
recommend_total_sum += Number(item.recommend_total)
share_total_sum += Number(item.share_total)
upload_total_sum += Number(item.upload_total)
})
let html = ""
if (type == 1) {
data.map((item) => {
html += `<div class="item">
<div class="num">
<span style="">${item.upload_total}</span><br>占比${(item.upload_total / upload_total_sum * 100).toFixed(2) + "%"}
</div>
<div class="num edus">${item.stage_name}</div>
</div>`
})
} else if (type == 2) {
data.map((item) => {
html += `<div class="item">
<div class="num">
<span style="">${item.download_total}</span><br>占比${(item.download_total / download_total_sum * 100).toFixed(2) + "%"}
</div>
<div class="num edus">${item.stage_name}</div>
</div>`
})
} else if (type == 3) {
data.map((item) => {
html += `<div class="item">
<div class="num">
<span style="">${item.share_total}</span><br>占比${(item.share_total / share_total_sum * 100).toFixed(2) + "%"}
</div>
<div class="num edus">${item.stage_name}</div>
</div>`
})
} else if (type == 4) {
data.map((item) => {
html += `<div class="item">
<div class="num">
<span style="">${item.recommend_total}</span><br>占比${recommend_total_sum ? (item.recommend_total / recommend_total_sum * 100).toFixed(2) : 0 + "%"}
</div>
<div class="num edus">${item.stage_name}</div>
</div>`
})
}
$("#qyzyhzjc").html(html)
}, 'json');
}
// rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
// 资源建设情况监测
$('body').on('click', '#zyyyqkjc_zyxz', function (e) {
r1Type = 1
$('#zyyyqkjc').children().removeClass("act")
$('#zyyyqkjc_zyxz').addClass("act")
r1(r1Type, switchTime);
})
$('body').on('click', '#zyyyqkjc_zytj', function (e) {
r1Type = 2
$('#zyyyqkjc').children().removeClass("act")
$('#zyyyqkjc_zytj').addClass("act")
r1(r1Type, switchTime);
})
function r1(type = 1, time = "all") {
console.log(type, time)
var myChart = echarts.init(document.getElementById('r1')); // 各阶段学校数量
myChart.showLoading(chartsLoadindStyle);
let query_id = ""
if (time == "all") {
query_id = "resource_down_rec_all"
query_param = []
query_group = ["year_name", "type_name"]
xAxisformatter = '{value} 年'
} else if (time == "year") {
query_id = "resource_down_rec_month"
query_param = ["2021"]
query_group = ["month_name", "type_name"]
xAxisformatter = '{value} 月'
} else if (time == "month") {
query_id = "resource_down_rec_day"
query_param = ["2021", nowMonth]
query_group = ["day_name", "type_name"]
xAxisformatter = '{value} 日'
}
$.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": [
"download_total",
"recommend_total"
],
"query_format": "echarts",
"query_group": query_group
}
), 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: xAxisformatter
},
},
],
yAxis: [
{
type: 'value',
axisLabel: {
textStyle: {
color: '#ffffff', //坐标轴的颜色
},
},
},
],
// dataZoom: [
// {
// type: "slider",   //slider:滑块  inside:内置,依靠鼠标滚轮或者双击缩放
// xAxisIndex: 0,   //显示x轴滑块
// height: "15px",
// end: 80,
// top: "85%"
// }
// ],
series: seriesData
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize", function () {
myChart.resize();
});
}, 'json')
}
$('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 = query_id + "all"
query_param = []
} else if (time == "year") {
query_id = query_id + "month"
query_param = ["2021"]
} else if (time == "month") {
query_id = query_id + "day"
query_param = ["2021", 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": query_count,
"query_format": "json",
"query_group": [
"person_name",
"org_name"
]
}
), function (resport) {
const data = JSON.parse(resport.result);
console.log(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">${total}</span><br><span class="num-name">资源上传</span>
</div>
<div class="total"><span class="num">${item.share_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") {
let params = {}
let query_id = ""
let query_param = []
if (type == 1) {
query_id = "org_up_top_"
query_count = [
"upload_total",
"share_total"
]
} else if (type == 2) {
query_id = "org_down_top_"
query_count = [
"download_total",
"share_total"
]
}
if (time == "all") {
query_id = query_id + "all"
query_param = []
} else if (time == "year") {
query_id = query_id + "month"
query_param = ["2021"]
} else if (time == "month") {
query_id = query_id + "day"
query_param = ["2021", 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": query_count,
"query_format": "json",
"query_group": [
"org_name"
]
}), function (resport) {
const data = JSON.parse(resport.result);
console.log(JSON.parse(resport.result), '资源共建共享应用排行榜 机构');
let html = ""
let total = ""
data.map((item, index) => {
if (type == 1) {
total = item.upload_total
} else if (type == 2) {
total = item.download_total
}
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.org_name}</span></div>
<div class="total"><span class="num">${total}</span><br><span class="num-name">资源上传</span>
</div>
<div class="total"><span class="num">${item.share_total}</span><br><span class="num-name">资源共享</span>
</div>
</div>`
})
// console.log(phHtml);
$("#gjgx_jg_paihang").html(html)
}, 'json');
}
})