|
|
@@ -206,11 +206,17 @@ function initQueryEmp(parent_dept_id, dept_id) {
|
|
|
function getEmployeeInfosClick(url, param, start_score, end_score, start_num, end_num) {
|
|
|
post_common_service(url, param, function(data) {
|
|
|
|
|
|
-
|
|
|
var userChangeStations = data["userChangeStations"];
|
|
|
var userChangeStationMap = new HashMap();
|
|
|
for (var i in userChangeStations) {
|
|
|
var s = userChangeStations[i];
|
|
|
+ if (userChangeStationMap.get(s.userid) != null) {
|
|
|
+ var p = [];
|
|
|
+ p.push(userChangeStationMap.get(s.userid));
|
|
|
+ p.push(s);
|
|
|
+ userChangeStationMap.set(s.userid, p);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
userChangeStationMap.set(s.userid, s);
|
|
|
}
|
|
|
|
|
|
@@ -251,10 +257,38 @@ function getEmployeeInfosClick(url, param, start_score, end_score, start_num, en
|
|
|
var userChangeStation = userChangeStationMap.get(data[i].user.id);
|
|
|
var ischage = false;
|
|
|
var tiptext = "";
|
|
|
+ var texttip = "";
|
|
|
if (userChangeStation != null) {
|
|
|
ischage = true;
|
|
|
- tiptext = userChangeStation.old_dept_name + ":" + userChangeStation.old_dept_check_num + "次," +
|
|
|
- userChangeStation.new_dept_name + ":" + userChangeStation.new_dept_check_num + "次";
|
|
|
+ if (userChangeStation instanceof Array) {
|
|
|
+ for (var iii in userChangeStation) {
|
|
|
+ var ppp = userChangeStation[iii];
|
|
|
+ console.log(ppp);
|
|
|
+ console.log(tiptext.indexOf(ppp.old_dept_name))
|
|
|
+ console.log(tiptext.indexOf(ppp.new_dept_name))
|
|
|
+ if (tiptext.indexOf(ppp.old_dept_name) == -1) {
|
|
|
+ tiptext += (ppp.old_dept_name + ":" + ppp.old_dept_check_num + "次,");
|
|
|
+ texttip += ("+" + ppp.old_dept_check_num);
|
|
|
+ }
|
|
|
+ if (tiptext.indexOf(ppp.new_dept_name) == -1) {
|
|
|
+ tiptext += (ppp.new_dept_name + ":" + ppp.new_dept_check_num + "次,");
|
|
|
+ texttip += ("+" + ppp.new_dept_check_num);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ texttip = texttip.substring(1);
|
|
|
+
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ tiptext = userChangeStation.old_dept_name + ":" + userChangeStation.old_dept_check_num + "次," +
|
|
|
+ userChangeStation.new_dept_name + ":" + userChangeStation.new_dept_check_num + "次";
|
|
|
+
|
|
|
+ texttip = userChangeStation.old_dept_check_num + "+" + userChangeStation.new_dept_check_num;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
var exuserHtml = "";
|
|
|
@@ -263,7 +297,7 @@ function getEmployeeInfosClick(url, param, start_score, end_score, start_num, en
|
|
|
|
|
|
var showNumberHtml = (isshownumber ? (filter(data[i].checked_num, '0') + (data[i].checked_num < 6 ? html : "")) : "-");
|
|
|
if (hasRole(ROLE_ADMIN) || hasRole(ROLE_JICHA_ADMIN)) {
|
|
|
- showNumberHtml = (ischage ? ("<span style='color:red;' data-toggle='tooltip' data-placement='right' title=" + tiptext + ">" + userChangeStation.old_dept_check_num + "+" + userChangeStation.new_dept_check_num + "</span>") : filter(data[i].checked_num, '0')) + html;
|
|
|
+ showNumberHtml = (ischage ? ("<span style='color:red;' data-toggle='tooltip' data-placement='right' title=" + tiptext + ">" + texttip + "</span>") : filter(data[i].checked_num, '0')) + html;
|
|
|
exuserHtml = '<div class="switch"><input type="checkbox" onchange="exUserfun(this,' + data[i].user.id + ',' + data[i].period_id + ')" ' + (data[i].isEx ? 'checked="checked"' : '') + ' > <label>排除</label></div>';
|
|
|
$("#th_14").html("是否排除统计");
|
|
|
}
|