|
@@ -2426,6 +2426,7 @@
|
|
<script type="text/javascript" src="../page/js/echarts.min.js" charset="utf-8"></script>
|
|
<script type="text/javascript" src="../page/js/echarts.min.js" charset="utf-8"></script>
|
|
<script src="../zdjc/js/constans.js"></script>
|
|
<script src="../zdjc/js/constans.js"></script>
|
|
<script>
|
|
<script>
|
|
|
|
+ var dataList = [];
|
|
var newDataList = [];
|
|
var newDataList = [];
|
|
var hasDept = 1;
|
|
var hasDept = 1;
|
|
var type = 0;
|
|
var type = 0;
|
|
@@ -2476,7 +2477,7 @@
|
|
},
|
|
},
|
|
type: "post",
|
|
type: "post",
|
|
success: function (data) {
|
|
success: function (data) {
|
|
- let dataList = [];
|
|
|
|
|
|
+ dataList = [];
|
|
let lastDataList = [];
|
|
let lastDataList = [];
|
|
for (let i = 0; i < data.data.deptids.length; i++) {
|
|
for (let i = 0; i < data.data.deptids.length; i++) {
|
|
let dataD = {};
|
|
let dataD = {};
|
|
@@ -2503,25 +2504,29 @@
|
|
let dlLength = dataList.length;
|
|
let dlLength = dataList.length;
|
|
newDataList = [];
|
|
newDataList = [];
|
|
for (let i = 0; i < dlLength; i++) {
|
|
for (let i = 0; i < dlLength; i++) {
|
|
- newDataList.push(dataList[dlLength - 1 - i]);
|
|
|
|
|
|
+ newDataList.push(dataList[i]);
|
|
newDataList[i].totalScore = (newDataList[i].basicScore + newDataList[i].addScore) + '(' + newDataList[i].basicScore + '/' + newDataList[i].addScore + ')';
|
|
newDataList[i].totalScore = (newDataList[i].basicScore + newDataList[i].addScore) + '(' + newDataList[i].basicScore + '/' + newDataList[i].addScore + ')';
|
|
for (let j = 0; j < lastDataList.length; j++) {
|
|
for (let j = 0; j < lastDataList.length; j++) {
|
|
if (newDataList[i].deptid == lastDataList[j].deptid) {
|
|
if (newDataList[i].deptid == lastDataList[j].deptid) {
|
|
- newDataList[i].rankingLast = j - i;
|
|
|
|
|
|
+ newDataList[i].rankingLast = i - j;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //对数据进步进行排序
|
|
|
|
+ // listSort(newDataList);
|
|
|
|
+
|
|
|
|
+ //生成此类型排名表格
|
|
|
|
+ rankingDetails(newDataList, hasDept, type);
|
|
|
|
|
|
//生成此类型排名最优3位
|
|
//生成此类型排名最优3位
|
|
bestRanking(newDataList, hasDept, type);
|
|
bestRanking(newDataList, hasDept, type);
|
|
let lowestRankingList = [];
|
|
let lowestRankingList = [];
|
|
- lowestRankingList.push(dataList[0]);
|
|
|
|
- lowestRankingList.push(dataList[1]);
|
|
|
|
- lowestRankingList.push(dataList[2]);
|
|
|
|
|
|
+ lowestRankingList.push(newDataList[0]);
|
|
|
|
+ lowestRankingList.push(newDataList[1]);
|
|
|
|
+ lowestRankingList.push(newDataList[2]);
|
|
//生成此类型排名最末3位
|
|
//生成此类型排名最末3位
|
|
lowestRanking(lowestRankingList, hasDept, type);
|
|
lowestRanking(lowestRankingList, hasDept, type);
|
|
|
|
|
|
- //对数据进步进行排序
|
|
|
|
progressSort(newDataList);
|
|
progressSort(newDataList);
|
|
//此类型排名进步最大3位
|
|
//此类型排名进步最大3位
|
|
let greatestProgressList = [];
|
|
let greatestProgressList = [];
|
|
@@ -2535,12 +2540,11 @@
|
|
regressiveMaximumList.push(newDataList[1]);
|
|
regressiveMaximumList.push(newDataList[1]);
|
|
regressiveMaximumList.push(newDataList[2]);
|
|
regressiveMaximumList.push(newDataList[2]);
|
|
regressiveMaximum(regressiveMaximumList, hasDept, type);
|
|
regressiveMaximum(regressiveMaximumList, hasDept, type);
|
|
- //生成此类型排名表格
|
|
|
|
- rankingDetails(newDataList, hasDept, type);
|
|
|
|
|
|
+
|
|
//生成相应的部门
|
|
//生成相应的部门
|
|
generationDepartment(data.data, hasDept, type);
|
|
generationDepartment(data.data, hasDept, type);
|
|
//默认选中第一个部门
|
|
//默认选中第一个部门
|
|
- selectDepartment(data.data.deptids[0],hasDept,type);
|
|
|
|
|
|
+ selectDepartment(data.data.deptids[0], hasDept, type);
|
|
// lineChart(data.data['detail-data'], data.data['detail-x'], hasDept, type);
|
|
// lineChart(data.data['detail-data'], data.data['detail-x'], hasDept, type);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -2693,23 +2697,23 @@
|
|
|
|
|
|
//生成本月排名最优3位
|
|
//生成本月排名最优3位
|
|
function bestRanking(obj, hasDept, type) {
|
|
function bestRanking(obj, hasDept, type) {
|
|
- $("#bestRanking1" + hasDept + type).parent().children("div").eq(0).children("p").text(obj[0].department.substring(1, 3));
|
|
|
|
- $("#bestRanking1" + hasDept + type).children("h1").text(obj[0].department);
|
|
|
|
- $("#bestRanking1" + hasDept + type).children("p").children("span").text((obj[0].basicScore + obj[0].addScore).toFixed(2));
|
|
|
|
- $("#bestRanking1" + hasDept + type).children("div").children("p").eq(0).text(obj[0].basicScore);
|
|
|
|
- $("#bestRanking1" + hasDept + type).children("div").children("p").eq(1).text(obj[0].addScore);
|
|
|
|
-
|
|
|
|
- $("#bestRanking2" + hasDept + type).parent().children("div").eq(0).children("p").text(obj[1].department.substring(1, 3));
|
|
|
|
- $("#bestRanking2" + hasDept + type).children("h1").text(obj[1].department);
|
|
|
|
- $("#bestRanking2" + hasDept + type).children("p").children("span").text((obj[1].basicScore + obj[1].addScore).toFixed(2));
|
|
|
|
- $("#bestRanking2" + hasDept + type).children("div").children("p").eq(0).text(obj[1].basicScore);
|
|
|
|
- $("#bestRanking2" + hasDept + type).children("div").children("p").eq(1).text(obj[1].addScore);
|
|
|
|
-
|
|
|
|
- $("#bestRanking3" + hasDept + type).parent().children("div").eq(0).children("p").text(obj[2].department.substring(1, 3));
|
|
|
|
- $("#bestRanking3" + hasDept + type).children("h1").text(obj[2].department);
|
|
|
|
- $("#bestRanking3" + hasDept + type).children("p").children("span").text((obj[2].basicScore + obj[2].addScore).toFixed(2));
|
|
|
|
- $("#bestRanking3" + hasDept + type).children("div").children("p").eq(0).text(obj[2].basicScore);
|
|
|
|
- $("#bestRanking3" + hasDept + type).children("div").children("p").eq(1).text(obj[2].addScore);
|
|
|
|
|
|
+ $("#bestRanking1" + hasDept + type).parent().children("div").eq(0).children("p").text(obj[obj.length - 1].department.substring(1, 3));
|
|
|
|
+ $("#bestRanking1" + hasDept + type).children("h1").text(obj[obj.length - 1].department);
|
|
|
|
+ $("#bestRanking1" + hasDept + type).children("p").children("span").text((obj[obj.length - 1].basicScore + obj[obj.length - 1].addScore).toFixed(2));
|
|
|
|
+ $("#bestRanking1" + hasDept + type).children("div").children("p").eq(0).text(obj[obj.length - 1].basicScore);
|
|
|
|
+ $("#bestRanking1" + hasDept + type).children("div").children("p").eq(1).text(obj[obj.length - 1].addScore);
|
|
|
|
+
|
|
|
|
+ $("#bestRanking2" + hasDept + type).parent().children("div").eq(0).children("p").text(obj[obj.length - 2].department.substring(1, 3));
|
|
|
|
+ $("#bestRanking2" + hasDept + type).children("h1").text(obj[obj.length - 2].department);
|
|
|
|
+ $("#bestRanking2" + hasDept + type).children("p").children("span").text((obj[obj.length - 2].basicScore + obj[obj.length - 2].addScore).toFixed(2));
|
|
|
|
+ $("#bestRanking2" + hasDept + type).children("div").children("p").eq(0).text(obj[obj.length - 2].basicScore);
|
|
|
|
+ $("#bestRanking2" + hasDept + type).children("div").children("p").eq(1).text(obj[obj.length - 2].addScore);
|
|
|
|
+
|
|
|
|
+ $("#bestRanking3" + hasDept + type).parent().children("div").eq(0).children("p").text(obj[obj.length - 3].department.substring(1, 3));
|
|
|
|
+ $("#bestRanking3" + hasDept + type).children("h1").text(obj[obj.length - 3].department);
|
|
|
|
+ $("#bestRanking3" + hasDept + type).children("p").children("span").text((obj[obj.length - 3].basicScore + obj[obj.length - 3].addScore).toFixed(2));
|
|
|
|
+ $("#bestRanking3" + hasDept + type).children("div").children("p").eq(0).text(obj[obj.length - 3].basicScore);
|
|
|
|
+ $("#bestRanking3" + hasDept + type).children("div").children("p").eq(1).text(obj[obj.length - 3].addScore);
|
|
}
|
|
}
|
|
|
|
|
|
//生成本月排名最末3位
|
|
//生成本月排名最末3位
|
|
@@ -2802,8 +2806,9 @@
|
|
if (type == 0) {
|
|
if (type == 0) {
|
|
layui.table.render({
|
|
layui.table.render({
|
|
elem: '#rankingDetails' + hasDept + type
|
|
elem: '#rankingDetails' + hasDept + type
|
|
- , height: 450
|
|
|
|
- , page: true //开启分页
|
|
|
|
|
|
+ // , height: 450
|
|
|
|
+ , limit: dataList1.length
|
|
|
|
+ , page: false //开启分页
|
|
, cols: [[ //表头
|
|
, cols: [[ //表头
|
|
{field: 'department', title: '部门', width: 300}
|
|
{field: 'department', title: '部门', width: 300}
|
|
, {field: 'totalScore', title: '总分(基础分/加分)', width: 200}
|
|
, {field: 'totalScore', title: '总分(基础分/加分)', width: 200}
|
|
@@ -2824,8 +2829,9 @@
|
|
}
|
|
}
|
|
layui.table.render({
|
|
layui.table.render({
|
|
elem: '#rankingDetails' + hasDept + type
|
|
elem: '#rankingDetails' + hasDept + type
|
|
- , height: 450
|
|
|
|
- , page: true //开启分页
|
|
|
|
|
|
+ // , height: 450
|
|
|
|
+ , page: false //开启分页
|
|
|
|
+ , limit: dataList1.length
|
|
, cols: [[ //表头
|
|
, cols: [[ //表头
|
|
{field: 'department', title: '部门', width: 300}
|
|
{field: 'department', title: '部门', width: 300}
|
|
, {field: 'totalScore', title: '总分(基础分/加分)', width: 200}
|
|
, {field: 'totalScore', title: '总分(基础分/加分)', width: 200}
|
|
@@ -2851,9 +2857,9 @@
|
|
if (obj.deptids.length > 0) {
|
|
if (obj.deptids.length > 0) {
|
|
let selectHtml = '<option value=""></option>';
|
|
let selectHtml = '<option value=""></option>';
|
|
for (let i = 0; i < obj.deptids.length; i++) {
|
|
for (let i = 0; i < obj.deptids.length; i++) {
|
|
- if(i==0){
|
|
|
|
|
|
+ if (i == 0) {
|
|
selectHtml += '<option value="' + obj.deptids[i] + '" selected="true">' + obj.yData[i] + '</option>';
|
|
selectHtml += '<option value="' + obj.deptids[i] + '" selected="true">' + obj.yData[i] + '</option>';
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
selectHtml += '<option value="' + obj.deptids[i] + '">' + obj.yData[i] + '</option>';
|
|
selectHtml += '<option value="' + obj.deptids[i] + '">' + obj.yData[i] + '</option>';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2952,10 +2958,10 @@
|
|
}
|
|
}
|
|
|
|
|
|
function rankingScore(pid, hasDept, type) {
|
|
function rankingScore(pid, hasDept, type) {
|
|
- for (let i = 0; i < newDataList.length; i++) {
|
|
|
|
- if (newDataList[i].deptid == pid) {
|
|
|
|
- $("#rank_text" + hasDept + type).children("h1").eq(0).children("p").text(newDataList.length - i);
|
|
|
|
- $("#rank_text" + hasDept + type).children("h1").eq(1).children("p").text(newDataList[i].basicScore + newDataList[i].addScore);
|
|
|
|
|
|
+ for (let i = 0; i < dataList.length; i++) {
|
|
|
|
+ if (dataList[i].deptid == pid) {
|
|
|
|
+ $("#rank_text" + hasDept + type).children("h1").eq(0).children("p").text(dataList.length - i);
|
|
|
|
+ $("#rank_text" + hasDept + type).children("h1").eq(1).children("p").text(dataList[i].basicScore + dataList[i].addScore);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2968,9 +2974,9 @@
|
|
success: function (data) {
|
|
success: function (data) {
|
|
layui.table.render({
|
|
layui.table.render({
|
|
elem: '#newMediaTable'
|
|
elem: '#newMediaTable'
|
|
- , height: 800
|
|
|
|
- , page: true //开启分页
|
|
|
|
- , limit: 20
|
|
|
|
|
|
+ // , height: 1600
|
|
|
|
+ , page: false //开启分页
|
|
|
|
+ , limit: data.data.length
|
|
, cols: [[ //表头
|
|
, cols: [[ //表头
|
|
{field: 'official_account', title: '名称', width: 300}
|
|
{field: 'official_account', title: '名称', width: 300}
|
|
, {field: 'type', title: '类型', width: 200}
|
|
, {field: 'type', title: '类型', width: 200}
|