Browse Source

js与cs交互

wenhongquan 9 years ago
parent
commit
059a0093dd

+ 7 - 0
VisualInspection/js/main.js

@@ -125,8 +125,15 @@ function getPageInfo(id) {
 
 }
 
+
 function changePage(url) {
     if (typeof(url) != "undefined") {
+        CURRENT_PAGE_URL=url;
         $("#main_content").load(base_ui_url + url);
+
+        event = document.createEvent('MessageEvent');
+		var origin = window.location.protocol + '//' + window.location.host;
+		event.initMessageEvent ('changepage', true, true, CURRENT_PAGE_URL, origin, 1234, window, null);
+		document.dispatchEvent (event);
     }
 }

+ 1 - 0
VisualInspection/js/user/userManager.js

@@ -48,6 +48,7 @@
      colClass: 'text-center'
  }];
  $(document).ready(function() {
+     alert("asdsa")
 
      $("#main_content_title").html("用户管理")
 

+ 4 - 1
VisualInspection/js/util/const.js

@@ -23,4 +23,7 @@ var DEPT_DELETE = "/dept/deleteDept/"
 
 
 //File
-var FILE_UPLOAD = "/file/upload"
+var FILE_UPLOAD = "/file/upload"
+
+
+var CURRENT_PAGE_URL="-1";

+ 5 - 5
VisualInspection/view/mytask/check.html

@@ -230,11 +230,11 @@
             forceParse: 0,
             format: "yyyy-mm-dd"
         });
-        setFeSelect("#fsList",$.checkTask.deptid);
-        setLaneSelect("#lane",$.checkTask.checked_location);
-        get_common_service('user/getUserById/'+$.checkTask.checked_person, null, function(data){
-            $("#checked_person").html(data.truename);
-        }) 
+        // setFeSelect("#fsList",$.checkTask.deptid);
+        // setLaneSelect("#lane",$.checkTask.checked_location);
+        // get_common_service('user/getUserById/'+$.checkTask.checked_person, null, function(data){
+        //     $("#checked_person").html(data.truename);
+        // }) 
         // 使用data参数更新数据:
         $('.datatable').datatable({
             checkable: false,