浏览代码

调整main、project,适应今天更新的代码

MaiXinRong 8 年之前
父节点
当前提交
d63917d9c8
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 3 2
      web/main/html/main.html
  2. 2 2
      web/main/js/models/project.js

+ 3 - 2
web/main/html/main.html

@@ -536,6 +536,7 @@
     <script type="text/javascript" src="web/main/js/main_ajax.js"></script>
     <script type="text/javascript" src="web/main/js/main.js"></script>
     <script type="text/javascript" src="/public/web/common_ajax.js"></script>
+    <script type="text/javascript" src="/public/web/urlUtil.js"></script>
     <SCRIPT type="text/javascript">
   		<!--
   		var setting = {
@@ -631,9 +632,9 @@
         });*/
 
         project = PROJECT.createNew();
-        CommonAjax.post('/bills/getBills', {}, function (bills) {
+        CommonAjax.post('/bills/getData', {projectId: scUrlUtil.GetQueryString('project')}, function (bills) {
             project.Bills.loadDatas(bills);
-            project.Rations.loadDatas([]);
+            project.Ration.loadDatas([]);
             //project.Rations.loadDatas(drawing_data);
             project.loadMainTree();
 

+ 2 - 2
web/main/js/models/project.js

@@ -51,7 +51,7 @@ var PROJECT = {
                     if (ration[that.masterField.ration] && ration[that.masterField.ration] === cacheNode.source.getID()) {
                         newNode = that.mainTree.addNode(cacheNode);
                         newNode.source = ration;
-                        newNode.sourceType = that.Rations.getSourceType();
+                        newNode.sourceType = that.Ration.getSourceType();
                         newNode.data = ration;
                     }
                 });
@@ -65,7 +65,7 @@ var PROJECT = {
                     newNode.data = nodes[i].data;
 
                     if (nodes[i].children.length === 0) {
-                        loadRationNode(that.Rations.datas, newNode);
+                        loadRationNode(that.Ration.datas, newNode);
                     } else {
                         loadIdTreeNode(nodes[i].children, newNode);
                     }