Commit a0900ce3 authored by agping's avatar agping

修改

parent 40e4ef81
...@@ -117,7 +117,18 @@ ...@@ -117,7 +117,18 @@
#pk_list td,#pk_list th{ #pk_list td,#pk_list th{
padding: 3px; padding: 3px;
} }
/*加载图标*/
#main_loading_pic {
position: fixed;
top: 50%;
left: 50%;
width: 100px;
height: 100px;
margin-left: -50px;
margin-top: -100px;
overflow: hidden;
display: none;
}
</style> </style>
<div id="page-content-wrapper"> <div id="page-content-wrapper">
<div class="container pk-container"> <div class="container pk-container">
...@@ -143,16 +154,32 @@ ...@@ -143,16 +154,32 @@
<span class="export-pk">导出报表</span> <span class="export-pk">导出报表</span>
</div> </div>
<div class="pk-container-detail-a"> <div class="pk-container-detail-a">
<span class="a-span">A</span> <span class="a-span-active ld-Marheight" data-id='1'>A</span>
<span class="a-span">B</span> <span class="a-span ld-Marheight" data-id='2'>B</span>
<span class="a-span-active">C</span> <span class="a-span ld-Marheight" data-id='3'>C</span>
<span class="a-span">D</span> <span class="a-span ld-Marheight" data-id='4'>D</span>
<span class="a-span">E</span> <span class="a-span ld-Marheight" data-id='5'>E</span>
<span class="a-span">F</span> <span class="a-span ld-Marheight" data-id='6'>F</span>
<span class="a-span">G</span> <span class="a-span ld-Marheight" data-id='7'>G</span>
<span class="a-span">H</span> <span class="a-span ld-Marheight" data-id='8'>H</span>
<span class="a-span">I</span> <span class="a-span ld-Marheight" data-id='9'>I</span>
<span class="a-span">J</span> <span class="a-span ld-Marheight" data-id='10'>J</span>
<span class="a-span ld-Marheight" data-id='11'>K</span>
<span class="a-span ld-Marheight" data-id='12'>L</span>
<span class="a-span ld-Marheight" data-id='13'>M</span>
<span class="a-span ld-Marheight" data-id='14'>N</span>
<span class="a-span ld-Marheight" data-id='15'>O</span>
<span class="a-span ld-Marheight" data-id='16'>P</span>
<span class="a-span ld-Marheight" data-id='17'>Q</span>
<span class="a-span ld-Marheight" data-id='18'>R</span>
<span class="a-span ld-Marheight" data-id='19'>S</span>
<span class="a-span ld-Marheight" data-id='20'>T</span>
<span class="a-span ld-Marheight" data-id='21'>U</span>
<span class="a-span ld-Marheight" data-id='22'>V</span>
<span class="a-span ld-Marheight" data-id='23'>W</span>
<span class="a-span ld-Marheight" data-id='24'>X</span>
<span class="a-span ld-Marheight" data-id='25'>Y</span>
<span class="a-span ld-Marheight" data-id='26'>Z</span>
</div> </div>
<div class="pk_list_content"> <div class="pk_list_content">
<table id="pk_list" class="table"> <table id="pk_list" class="table">
...@@ -163,3 +190,7 @@ ...@@ -163,3 +190,7 @@
</div> </div>
</div> </div>
</div> </div>
<!--加载图标-->
<div id="main_loading_pic">
<img src="/resource/image/jz2.gif">
</div>
define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) { define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) {
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
pkList = { pkList = {
pageNo: 1, pageNo: 1,
/*第几页*/ /*第几页*/
pageSize: 25, pageSize: 25,
/*每页显示多少条*/ /*每页显示多少条*/
mainTabIndex: 0, mainTabIndex: 1,
mainTabIndexTwo: 0, mainTabIndexTwo: 0,
init: function() { init: function() {
//初始化dot //初始化dot
...@@ -20,17 +22,35 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css', ...@@ -20,17 +22,35 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css',
e.stopPropagation(); e.stopPropagation();
var _this = $(this); var _this = $(this);
_this.removeClass('team-span').addClass('team-span-active').siblings().removeClass('team-span-active').addClass('team-span'); _this.removeClass('team-span').addClass('team-span-active').siblings().removeClass('team-span-active').addClass('team-span');
pkList.mainTabIndex = _this.index(); if(_this.index() == 0){
console.log(pkList.mainTabIndex) pkList.mainTabIndex = -1
}
if(_this.index() == 1){
pkList.mainTabIndex = 1;
}
if(_this.index() == 2){
pkList.mainTabIndex = 2;
}
if(_this.index() == 3){
pkList.mainTabIndex = 3;
}
if(_this.index() == 4){
pkList.mainTabIndex = 4;
}
if(_this.index() == 5){
pkList.mainTabIndex = 0;
}
}); });
_doc.on('click', '.pk-container-detail-a>span', function(e){ _doc.on('click', '.pk-container-detail-a>span', function(e){
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
var _this = $(this); var _this = $(this);
_this.removeClass('a-span').addClass('a-span-active').siblings().removeClass('a-span-active').addClass('a-span'); _this.removeClass('a-span').addClass('a-span-active').siblings().removeClass('a-span-active').addClass('a-span');
pkList.mainTabIndexTwo = _this.index(); pkList.mainTabIndexTwo = _this.attr('data-id');
console.log(pkList.mainTabIndexTwo) pkList.getList();
}); });
$("#export").click(function() { //导出列表 $("#export").click(function() { //导出列表
pkList.exportList(); pkList.exportList();
}); });
...@@ -56,20 +76,22 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css', ...@@ -56,20 +76,22 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css',
getList: function(pageNo) { getList: function(pageNo) {
var params = {}; var params = {};
params.pageNo =pkList.pageNo; params.position = pkList.mainTabIndex;
params.pageSize =pkList.pageSize; params.AuthToken = user_info_obj.AuthToken;
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
url: '/index/evaluationList',//拜访列表 url: '/index/getRandKingList',//拜访列表
data: params, data: params,
timeout: 30000, timeout: 30000,
dataType: 'json', dataType: 'json',
beforeSend: function() {}, beforeSend: function() {
$('#main_loading_pic').show();
},
success: function(data) { success: function(data) {
if(typeof data === 'object') { if(typeof data === 'object') {
if (data.code == 200) { if (data.code == 200) {
var doTtmpl = doT.template(document.getElementById('pk_list_tpl').innerHTML); var doTtmpl = doT.template(document.getElementById('pk_list_tpl').innerHTML);
$("#pk_list").html(doTtmpl(data.data.list)); $("#pk_list").html(doTtmpl(data.data[pkList.mainTabIndexTwo]));
add_page(data.data.total,pageNo,pkList.pageSize,pkList.getList); add_page(data.data.total,pageNo,pkList.pageSize,pkList.getList);
}else { }else {
alert(data['msg']); alert(data['msg']);
...@@ -82,6 +104,7 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css', ...@@ -82,6 +104,7 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css',
alert('error'); alert('error');
}, },
complete: function(xhr, textStatus){ complete: function(xhr, textStatus){
$('#main_loading_pic').hide();
if(textStatus === 'timeout'){ if(textStatus === 'timeout'){
alert('请求超时'); alert('请求超时');
}; };
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<tr class="text-center"> <tr class="text-center">
<td>[%= it[item]["name"] %]</td> <td>[%= it[item]["name"] %]</td>
<td>[%= it[item]["evaluate_content"] %]</td> <td>[%= it[item]["evaluate_content"] %]</td>
<td>[%= it[item]["phone"] %]</td> <td>[%= it[item]["name"] %]</td>
<td>[%= it[item]["create_time"] %]</td> <td>[%= it[item]["performance"] %]</td>
</tr> </tr>
[% } %] [% } %]
[% }else{ %] [% }else{ %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment