From 544c45ffda066479843ef4fb083caa8ccdd62ac6 Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Fri, 02 Feb 2018 14:51:40 +0800
Subject: [PATCH] updated

---
 src/main/webapp/js/moralmap.js |   30 ++++++++++--------------------
 1 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/src/main/webapp/js/moralmap.js b/src/main/webapp/js/moralmap.js
index e26429f..c28f4b8 100644
--- a/src/main/webapp/js/moralmap.js
+++ b/src/main/webapp/js/moralmap.js
@@ -360,29 +360,19 @@
 				var pageSize = option["pageSize"] || 20;
 				var pageNo = option["pageNo"] || 1;
 				var url = option['url'];
-				url += "&page=" + pageNo;
-				url += "&rows=" + pageSize;
+				url += "&pageNo=" + pageNo;
+				url += "&pageSize=" + pageSize;
+				console.log(url);
 				$.ajax({
 					type: "get",
 					cache: false,
 					url: url,
 					async: true,
-					success: function(data) {
-						if(data) {
-							if(typeof data !== 'object' && typeof data === 'string') {
-								try {
-									data = $.parseJSON(data);
-								} catch(e) {
-									return;
-								}
-							}
-							var rows = null;
-							if(data['rows'] != undefined) {
-								rows = data['rows'];
-							} else {
-								rows = data;
-							}
-							if(rows.length == 0) {
+					success: function(res) {
+						if(res!=null&&res.total!=null) {
+							debugger;
+							var rows = res.data;
+							if(rows==null||rows.length == 0) {
 								$(option['id']).html("������������������������������");
 								return;
 							}
@@ -417,7 +407,7 @@
 								outHtml += li;
 							}
 							outHtml += "</ul>";
-							var total = data['total'];
+							var total = res['total'];
 							var totalPage = Math.ceil(total / pageSize);
 							if(totalPage > 1) {
 								outHtml += "<div id='page' class='page_div'></div>";
@@ -494,7 +484,7 @@
 	//��������������� ������Mark������
 	moralMap.Monitorpoint = function(option) {
 		var icon = {};
-		icon["stateIcons"] = ["img/ico00.png", "img/ico01.png", "img/ico02.png", "img/ico03.png", "img/ico04.png"];
+		icon["stateIcons"] = ["/img/ico00.png", "/img/ico01.png", "/img/ico02.png", "/img/ico03.png", "/img/ico04.png"];
 		icon["width"] = 50;
 		icon["height"] = 50;
 		option["icon"] = icon;

--
Gitblit v1.8.0