Sfoglia il codice sorgente

更改人员不能查看

minitiger 8 anni fa
parent
commit
6c9ba704e5

+ 8 - 5
VisualInspection/js/mytask/check.js

@@ -191,8 +191,10 @@ function addPic(pic) {
         var i=0;
         // var imgArr = $("#img_container .pic-class");
         // if(imgArr && imgArr.length>0) i = imgArr.length;
-        if(!pic.startWith("http"))
+        
+        if(pic.startWith("http"))
 		    pic= pic.replace(base_image_server_url,"/"); 
+        
         var picStr = genPicstr(pic);
         $('#img_container').append(picStr);
         $('a.lightbox-toggle').lightbox();
@@ -214,20 +216,21 @@ function showPics(pics, divId) {
     }
 }
 
-function genPicstr(src){
+function genPicstr(imgSrc){
+    var src = imgSrc;
     if(!src.startWith("http"))
 		src= base_image_server_url+src;
     var pic = '<div class="img_item" style="width:100px;height:90px;float:left;">'
                 + '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>'
                 + '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">'
-                + '<img class="pic-class img-thumbnail" style="width:100px;height:70px;" src="' + src + '" alt="">'
+                + '<img class="pic-class img-thumbnail" path="'+imgSrc+'" style="width:100px;height:70px;" src="' + src + '" alt="">'
                 + '</a>'
                 + '</div>';
     if(ISCLIENT) {
         pic = '<div class="img_item" style="width:100px;height:90px;float:left;">'
                 + '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>'
                 + '<a class="card" onclick="showClientImg(\''+src +'\')" href="javascript:void(0)" style="position:absolute">'
-                + '<img class="pic-class img-thumbnail" style="width:100px;height:70px;" src="' + src + '" alt="">'
+                + '<img class="pic-class img-thumbnail" path="'+imgSrc+'" style="width:100px;height:70px;" src="' + src + '" alt="">'
                 + '</a>'
                 + '</div>';
     }
@@ -411,7 +414,7 @@ function zTreeOnClick(event, treeId, treeNode) {
     var picsStr = "";
     if (imgArr && imgArr.length > 0) {
         for (var i = 0; i < imgArr.length; i++) {
-            picsStr += imgArr[i].src + ","
+            picsStr += $(imgArr[i]).attr("path") + ","
         }
         picsStr = picsStr.substr(0, picsStr.length - 1);
     }

+ 8 - 2
VisualInspection/js/util/service.js

@@ -318,10 +318,16 @@ function post_common_service(url, param, success, fail) {
         if (data.result_code == 0) {
             success(data.result_data)
         } else {
-            fail(data.result_desc);
+            if(fail)
+                fail(data.result_desc);
+            else
+                console.log(data.result_desc);
         }
     }, function(error) {
-        fail("网络错误");
+        if(fail)
+            fail("网络错误");
+        else
+            console.log("网络错误");
     });
 }
 

+ 3 - 2
VisualInspection/view/main.html

@@ -4,14 +4,15 @@
 <head>
     <meta charset="utf-8">
     <title>稽查</title>
+       
+    <script src="/js/lib/jedate/jedate.js"></script>
     <link rel="import" href="/view/common/commoncsslink.html?__inline">
     <link rel="stylesheet" type="text/css" href="/css/main.css">
     <link rel="import" href="/view/common/commonscriptlink.html?__inline">
     <style>
         img.lightbox-img{width:600px;}
     </style>
-    <script src="/js/mytask/check.js"></script>   
-    <script src="/js/lib/jedate/jedate.js"></script>
+    <script src="/js/mytask/check.js"></script>
     <script src="/js/teamClass/charge_team_schedule.js"></script>
 </head>
 

+ 1 - 1
VisualInspection/view/mytask/changePerson.html

@@ -2,7 +2,7 @@
         <div class="cards" id="user_container" style="overflow:auto;">
              <div style="width:200px;">
                 <a class="card" href="###">
-                    <img src="../../image/img4.jpg" alt="">
+                    <img src="../../images/img4.jpg" alt="">
                     <div class="card-heading"><strong>011 潘虎</strong></div>
                     <div class="card-actions">
                         <button type="button" class="btn btn-danger"><i class="icon-heart"></i> 更换</button>