Ver código fonte

Merge branch 'master' of http://git_xt.jsxt.jsjtyxt.com/wenhongquan/VisualInspection

* 'master' of http://git_xt.jsxt.jsjtyxt.com/wenhongquan/VisualInspection:
  修改bug
温红权 8 anos atrás
pai
commit
cefe83ced9

+ 15 - 2
VisualInspection/js/lib/mytable.js

@@ -150,6 +150,7 @@ String.prototype.replaceAll = function(s1, s2) {
                     } else if (cols[i].type == "imagedd") {
                         var pics = obj[cols[i].field];
                         var picStr = '';
+                        var num = uuid();
                         if (pics) {
                             var picArr = pics.split(',');
                             for (var j in picArr) {
@@ -174,7 +175,7 @@ String.prototype.replaceAll = function(s1, s2) {
                                     src = src.split('.mp4')[0] + "_screen_0.png"
                                     ispic = false;
                                 }
-                                var pic = (ispic ? '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="width:60px;height:50px;float:left;">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="width:60px;height:50px;">') +
+                                var pic = (ispic ? '<a class="card lightbox-toggle" data-group="image-group-'+num+'" data-lightbox-group="example-3" href="' + src + '" style="width:60px;height:50px;float:left;">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="width:60px;height:50px;">') +
                                     '<img class="pic-class  img-thumbnail" style="width:60px;height:50px;" src="' + src + '" alt="">' + (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 10px;left: 15px;color: white;"></i>') +
                                     '</a>';
                                 picStr += pic;
@@ -215,7 +216,19 @@ String.prototype.replaceAll = function(s1, s2) {
                 row.data = dArr;
                 return row;
             }
-
+            function uuid() {
+                var s = [];
+                var hexDigits = "0123456789abcdef";
+                for (var i = 0; i < 36; i++) {
+                    s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
+                }
+                s[14] = "4";  // bits 12-15 of the time_hi_and_version field to 0010
+                s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);  // bits 6-7 of the clock_seq_hi_and_reserved to 01
+                s[8] = s[13] = s[18] = s[23] = "-";
+            
+                var uuid = s.join("");
+                return uuid;
+            }
             function clearTable(cols, options, element) {
                 var checkable = options.checkable;
                 var sortable = options.sortable

+ 5 - 5
VisualInspection/js/statistics/assess_type.js

@@ -128,11 +128,11 @@ function gethtml(data,i,avg,lists){
         strTbody += "<tr><td rowspan="+rowspan+" width='6%'>"+order+"</td>"+"<td rowspan="+rowspan+" width='6%'>"+name+"</td>";
         strTbody+="<td width='6%'>"+ranking+"</td><td width='8%'>"+data.name+"</td><td width='6%'>"+filter(data.people_num,'0')
                    +"</td><td width='6%'>"+filter(data.checked_people_num,'0')
-                   +"</td><td width='6%'>"+filter(data.checked_num,'0')+"</td><td width='67px'>"+getItemScore(data, '环境卫生')
-                   +"</td><td width='67px'>"+getItemScore(data, '仪容仪表')+"</td><td width='67px'>"+getItemScore(data, '表情')
-                   +"</td><td width='67px'>"+getItemScore(data, '动作')+"</td><td width='67px'>"+getItemScore(data, '文明用语')
-                   +"</td><td width='67px'>"+getItemScore(data, '工作纪律')+"</td><td width='67px'>"+getItemScore(data, '便民服务')
-                   +"</td><td width='67px'>"+getItemScore(data, '安全管理')+"</td><td width='6%'>"+data.all_check_score+"</td><td width='6%'>"
+                   +"</td><td width='6%'>"+filter(data.checked_num,'0')+"</td><td width='54px'>"+getItemScore(data, '环境卫生')
+                   +"</td><td width='54px'>"+getItemScore(data, '仪容仪表')+"</td><td width='54px'>"+getItemScore(data, '表情')
+                   +"</td><td width='54px'>"+getItemScore(data, '动作')+"</td><td width='54px'>"+getItemScore(data, '文明用语')
+                   +"</td><td width='54px'>"+getItemScore(data, '工作纪律')+"</td><td width='54px'>"+getItemScore(data, '便民服务')
+                   +"</td><td width='54px'>"+getItemScore(data, '安全管理')+"</td><td>"+data.all_check_score+"</td><td width='6%'>"
                    +filterByZeroHandle(filterJudge(data.all_check_score,data.checked_num),'0')
                    +"</td><td rowspan="+rowspan+" width='6%'>"+avg+"</td>";
         strTbody += "</tr>";

+ 1 - 1
VisualInspection/js/statistics/common_statistic.js

@@ -84,7 +84,7 @@ function getFsStationList(center_manage_id,func,hasAll){
         var str = '';
         if(data.length > 0){
             str = "<option value=''>全部</option>";
-            if(!hasAll) str="";
+            if(hasAll==false) str="";
             for(var i=0;i<data.length;i++){
                 str += "<option value="+data[i].id+">"+data[i].organname+"</option>";  
             }

+ 4 - 4
VisualInspection/js/statistics/common_work.js

@@ -8,6 +8,7 @@ $(function() {
         road_manager = getCurrentUser().organid;
     }
     setRoadManagerSelect("#center_manage", road_manager, true);
+
     // 初始化部门下的收费站
     getFsStationList(GV("#center_manage"), function(obj) {
         $("#fs_station").html(obj);
@@ -65,10 +66,9 @@ $(function() {
 
     // 查询
     $("#searchBtn").click(function() {
-            // $("#month_name").html( $("#sel_month").find("option:selected").text()  )
-            getFsWorkInfo();
-        })
-        // end
+        // $("#month_name").html( $("#sel_month").find("option:selected").text()  )
+        getFsWorkInfo();
+    })
 })
 
 /**

+ 3 - 3
VisualInspection/view/statistics/assess_type.html

@@ -34,9 +34,9 @@
                         <th rowspan="2" width="6%">受检人平均每人次扣分(千分制)</th><th rowspan="2" width="6%">管道中心受检人平均每人次扣分(千分制)</th>
                         </tr>
                         <tr> 
-                        <th width="67px">环境卫生</th><th width="67px">仪容仪表</th><th width="67px">表情</th>
-                        <th width="67px">收费动作</th><th width="67px">文明用语</th><th width="67px">工作纪律</th>
-                        <th width="67px">便民服务</th><th width="67px">安全管理</th><th width="67px">扣分合计</th>
+                        <th width="54px">环境卫生</th><th width="54px">仪容仪表</th><th width="54px">表情</th>
+                        <th width="54px">收费动作</th><th width="54px">文明用语</th><th width="54px">工作纪律</th>
+                        <th width="54px">便民服务</th><th width="54px">安全管理</th><th>扣分合计</th>
                         </tr>
                  </thead>
                     <!-- <tbody class="table-tbody" style="background:white" align="center">

+ 4 - 4
VisualInspection/view/statistics/change_work.html

@@ -23,10 +23,10 @@
                     </select>-->
                 <!--</div>-->
 
-                <div class="col-sm-1">
+                <div class="col-sm-2">
                     <input type="text" id="start-time" class="form-control form-date" placeholder="开始日期">
                 </div>
-                <div class="col-sm-1">
+                <div class="col-sm-2">
                     <input type="text" id="end-time" class="form-control form-date" placeholder="结束日期">
                 </div>
 
@@ -45,12 +45,12 @@
 
                     </select>
                 </div>
-                <div class="col-sm-2">
+                <div class="col-sm-1">
                     <select class="form-control" id="fs_employee">
 
                     </select>
                 </div>
-                <div class="col-sm-2">
+                <div class="col-sm-1">
                     <button class="btn btn-primary" id="searchBtn" type="button" >查询</button>
                 </div>
             </div>

+ 4 - 4
VisualInspection/view/statistics/common_work.html

@@ -22,10 +22,10 @@
                         <option value="12">十二月</option>
                     </select>
                 </div>-->
-                <div class="col-sm-1">
+                <div class="col-sm-2">
                     <input type="text" id="start-time" class="form-control form-date" placeholder="开始日期">
                 </div>
-                <div class="col-sm-1">
+                <div class="col-sm-2">
                     <input type="text" id="end-time" class="form-control form-date" placeholder="结束日期">
                 </div>
                 <label for="exampleInputAccount1" class="col-sm-1">部门</label>
@@ -42,12 +42,12 @@
 
                     </select>
                 </div>
-                <div class="col-sm-2">
+                <div class="col-sm-1">
                     <select class="form-control" id="fs_employee">
 
                     </select>
                 </div>
-                <div class="col-sm-2">
+                <div class="col-sm-1">
                     <button class="btn btn-primary" id="searchBtn" type="button" >查询</button>
                 </div>
             </div>