MSI\liwei 7 年之前
父節點
當前提交
4f2be4c2b1

+ 26 - 0
VisualInspection/css/main.css

@@ -241,6 +241,32 @@ a:focus {
     border-color: #ed980f;
 }
 
+.btn-info7 {
+    color: #fff;
+    background-color: #0373cf;
+    border-radius: 4px;
+    border-color: #0373cf;
+    text-shadow: none;
+}
+
+.btn-info7:hover {
+    color: #0373cf;
+    background-color: #fff;
+    border-color: #0373cf;
+}
+
+.btn-info7:focus {
+    color: #0373cf;
+    background-color: #fff;
+}
+
+.btn-info7:active {
+    color: #fff;
+    background-color: #0373cf;
+    border-radius: 4px;
+    border-color: #0373cf;
+}
+
 .btn-table {
     color: #fff;
     background-color: #2196F3;

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

@@ -231,7 +231,7 @@ String.prototype.replaceAll = function(s1, s2) {
                                 //     '</a>';
 
                                 var pic = '<div class="img_item" style="width:80px;height:45px;display:inline-block;margin-right:5px">' +
-                                    '<a href="javascript:void(0)" onclick="removeVideo(\'' + obj.id + '\',\'' + pics + '\',\'' + j + '\')" style="float:right;position:relative;z-index:100;font-size:10px"><span class="label label-danger" style="padding:0"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
+                                    '<a href="javascript:void(0)" onclick="removeVideo(\'' + obj.id + '\',\'' + pics + '\',\'' +cols[i].field+'\',\''+ j + '\')" style="float:right;position:relative;z-index:100;font-size:10px"><span class="label label-danger" style="padding:0"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
                                     (ispic ? '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="position:absolute">') +
                                     '<img class="pic-class img-thumbnail" path="' + videosrc + '" style="width:80px;height:45px;" src="' + src + '" alt="">' + (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 20px;position: absolute;top: 15px;left: 30px;color: white;"></i>') +
                                     '</a>' +
@@ -243,7 +243,7 @@ String.prototype.replaceAll = function(s1, s2) {
                         // picStr += '<a href="javascript:void(0)" class="btn-table" onclick=""><i class="icon ' +' text-center' + '"></i>' + "继续上传" + ' </a>';
                         //picStr +="<button onclick='openUpload()' style='width:80%;background-color:#2196F3;color:white'>继续上传</button>"
                         //  picStr +="<input id='fileupload' type='file' style='display:none'></input>"
-                        picStr += '<div style="position:absolute;bottom:10px;width:200px"><div id="uploaderExample_' + obj.id + '" class="uploader uploadervideo">' +
+                        picStr += '<div style="position:absolute;bottom:10px;width:200px"><div id="uploaderExample_' + obj.id +'_'+cols[i].field+ '" class="uploader uploadervideo">' +
                             '<div class="file-list" data-drag-placeholder="请拖拽文件到此处" style="margin-bottom:5px"></div>';
                         picStr += '<button onclick="setRecordId(\'' + obj.id + '\',\'' + pics + '\')" type="button" class="btn btn-primary uploader-btn-browse" style="float:left;width:100%"><i class="icon icon-cloud-upload"></i> 选择文件</button>'; +
                         '</div></div>';

+ 18 - 10
VisualInspection/qzd/js/task/add.js

@@ -106,7 +106,6 @@ function inittAreaable(time, dept) {
                     }
                 }
             });
-
         });
 
         checkuserlist = redatatemp.checkusers;
@@ -138,7 +137,15 @@ function inittAreaable(time, dept) {
                 });
             });
             $(".doingc").mouseover(function() {
-                var titlehtml = "稽查中";
+                var ids = this.id.split("_");
+                var temp = moment(moment(t + "-25T23:00:00", "YYYY-MM-DD HH:mm:ss").subtract(1, 'month'));
+                var currentday = temp.add(ids[1], "day");
+                var key = ids[0] + "_" + currentday.format("YYYY-MM-DD");
+                for(var i in taskMap.get(key)){
+                     if(taskMap.get(key)[i].id == ids[2]){
+                        var titlehtml = taskMap.get(key)[i].task.check_status_name;
+                     }
+                }
                 layer.tips(titlehtml, "#" + this.id, {
                     tips: [1, '#8e8e8e'],
                     time: 0,
@@ -450,18 +457,19 @@ function reloadtableData() {
                     //未生成任务
                     if (t == null) {
                         if (r.videos == null || r.videos == undefined || r.videos == "") {
-                            temphtml += '<button data-toggle="button" class="btc novideoc" style="margin:10px;background:#fff;border-color:#fff;color:#03b8cf"  type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
-
+                            if(r.pics == null || r.pics == undefined || r.pics == ""){
+                                temphtml += '<button data-toggle="button" class="btc novideoc" style="margin:10px;background:#fff;border-color:#fff;color:#03b8cf"  type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
+                            }
+                            temphtml += '<div class="btn-group normal" style="margin:10px;" data-toggle="buttons" id="btn_u_' + user.id + '_r_' + r.id + '"> <label class="btn btn-info7 "> <input type="checkbox"  onchange="selectedTask(this)" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</label></div>';
                         } else {
                             temphtml += '<div class="btn-group normal" style="margin:10px;" data-toggle="buttons" id="btn_u_' + user.id + '_r_' + r.id + '"> <label class="btn btn-info2 "> <input type="checkbox"  onchange="selectedTask(this)" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</label></div>';
                             //temphtml += '<button data-toggle="button" class="btc normal" style="margin:10px" onclick="selectedTask(this)" type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
-
                         }
 
                     } else
-                    if (t.check_status == 4 || t.check_status == 16 || t.check_status == 6) {
-                        //完成稽查
-                        temphtml += '<button data-toggle="button" class="btc completec" style="margin:10px"  type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
+                    if (t.check_status == 2 || t.check_status == 7) {
+                        //考核进行中
+                        temphtml += '<button data-toggle="button" class="btc doingc" style="margin:10px"  type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
 
                     } else
                     if (t.check_status == 22) {
@@ -469,8 +477,8 @@ function reloadtableData() {
                         temphtml += '<button data-toggle="button" class="btc unusec" style="margin:10px"  type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
 
                     } else {
-                        //考核进行中
-                        temphtml += '<button data-toggle="button" class="btc doingc" style="margin:10px;" type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
+                        //完成稽查
+                        temphtml += '<button data-toggle="button" class="btc completec" style="margin:10px;" type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
                     }
                 });
             }

+ 2 - 2
VisualInspection/qzd/js/task/check.js

@@ -127,8 +127,8 @@ function initCheck() {
             variable: 'player', //该属性必需设置,值等于下面的new chplayer()的对象
             //poster: 'pic/wdm.jpg', //封面图片
             autoplay: true,
-            // video: base_image_server_url + videoid //视频地址
-            video: "file:///H://N3J4803_00030220180708095248_1289.MP4"   //视频地址
+            video: base_image_server_url + videoid //视频地址
+           // video: "file:///H://N3J4803_00030220180708095248_1289.MP4"   //视频地址
         };
         videoPlayer = new ckplayer(videoObject);
        // videoPlayer.addListener('time', timeHandler);

+ 35 - 11
VisualInspection/qzd/js/task/new.js

@@ -80,6 +80,7 @@ function queryTask() {
         "startTime": getMomentTimeFormat(t.starttime),
         "endTime": getMomentTimeFormat(t.endtime),
         "dept": $("#deptlist").val(),
+        "isComplete":$("#isComplete").val(),
         // "check_status": cur_status
     };
 
@@ -95,18 +96,23 @@ function queryTask() {
         { width: 80, text: '车牌号', type: 'string', flex: true, hide: hide, colClass: 'text-center', field: 'car_info' },
         { width: 80, text: '客户信息', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'car_user_info' },
         { width: 120, text: '接警时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'received_time' },
-        { width: 160, text: '出勤人员', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'userNames' },
+       // { width: 160, text: '最后时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'last_time' },
+        { width: 120, text: '出勤人员', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'userNames' },
         // {width: 120, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'}
     ];
     if (hasRole(ROLE_DDZS_ADMIN) || hasRole(ROLE_DDZS)) {
         var colFunc = { width: 160, text: '操作', type: 'string', flex: true, field: 'id', colClass: 'text-center' };
+        var colStr =  { width: 160, text: '最后时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'last_time' };
         colFunc.oper = $.zui.store.get("task_table_btn_1");
+        cols.push(colStr);
         cols.push(colFunc);
         $("#saveButton").show();
     } else if (hasRole(ROLE_WRECKER_MANAGER) || hasRole(ROLE_WRECKER_NQ) || hasRole(ROLE_WRECKER)) {
-        var colFunc = { width: 160, text: '操作', type: 'imagebutton', flex: true, field: 'videos', colClass: 'text-center' };
-        colFunc.oper = $.zui.store.get("task_table_btn_1");
-        cols.push(colFunc);
+        var colFunc1 = { width: 160, text: '视频上传', type: 'imagebutton', flex: true, field: 'videos', colClass: 'text-center' };
+        var colFunc2 = { width: 160, text: '图片上传', type: 'imagebutton', flex: true, field: 'pics', colClass: 'text-center' };
+       // colFunc.oper = $.zui.store.get("task_table_btn_1");
+        cols.push(colFunc1);
+        cols.push(colFunc2);
     }
     //只有下发才显示复选框
     var checkable = false;
@@ -129,20 +135,31 @@ function queryTask() {
         renderfunction: function() {
 
             $(".uploadervideo").each(function() {
+                var type = this.id.split("_")[2];
+                var title= '';
+                var extensions = '';
+                if(type == "videos"){
+                     title = "视频";
+                     extensions ='mp4,avi';
+                }else{
+                    title ='图片', 
+                    extensions ='jpg,gif,png' 
+                }
                 $(this).uploader({
                     autoUpload: true, // 当选择文件后立即自动进行上传操作
                     url: base_image_server_url + 'fileServer/file/upload', // 文件上传提交地址
                     chunk_size: 0,
                     filters: {
                         mime_types: [{
-                            title: '视频',
-                            extensions: 'mp4,avi'
+                            title: title,
+                            extensions: extensions
                         }],
+                
                         // 不允许上传重复文件
                         prevent_duplicates: true
                     },
                     onFileUploaded: function(file, responseObject) {
-                        var id = this.$.attr("id").split("uploaderExample_")[1];
+                        var id = this.$.attr("id").split("_")[1];
                         var file_src = recordVideos;
                         var datas = eval('(' + responseObject.response + ')');
                         if (file_src != '' && file_src != null && file_src != undefined) {
@@ -151,9 +168,13 @@ function queryTask() {
                             file_src += datas.result_data.path;
                         }
                         var data = {
-                            "videos": file_src,
                             "id": id
                         };
+                        if(file.type.indexOf('image') === 0) {
+                            data.pics = file_src;
+                        }else{
+                            data.videos = file_src;
+                        }
                         recordVideos = file_src;
 
                         post_common_service('q/record/update', data, function(redata) {
@@ -313,7 +334,7 @@ function setRecordId(id, videos) {
 }
 
 
-function removeVideo(id, videos, index) {
+function removeVideo(id, videos, field ,index) {
 
 
     var p = "";
@@ -327,11 +348,14 @@ function removeVideo(id, videos, index) {
         }
     }
     p = p.substring(0, p.length - 1);
-
     var data = {
-        "videos": p,
         "id": recordId
     };
+    if(field == videos){
+        data.videos = p;
+      }else{
+        data.pics = p;  
+      }
     post_common_service('q/record/update', data, function(redata) {
         queryTask();
     });

+ 8 - 0
VisualInspection/qzd/view/task/add.html

@@ -122,6 +122,9 @@
             <div class="divstyle" style="background-color: #03b8cf"></div><span style="float: left;">&nbsp;&nbsp;未稽查</span>
         </div>
         <div class="col-xs-2">
+            <div class="divstyle" style="background-color: #0373cf"></div><span style="float: left;">&nbsp;&nbsp;上传图片未稽查</span>
+        </div>
+        <div class="col-xs-2">
             <div class="divstyle" style="background-color: gray"></div><span style="float: left;">&nbsp;&nbsp;已选任务</span>
         </div>
         <div class="col-xs-2">
@@ -130,6 +133,11 @@
         <div class="col-xs-2">
             <div class="divstyle" style="background-color:#2EA98C"></div><span style="float: left;">&nbsp;&nbsp;稽查中</span>
         </div>
+        <!-- <div class="col-xs-2">
+            <div class="divstyle" style="background-color: #ed980f"></div><span style="float: left;">&nbsp;&nbsp;无效</span>
+        </div> -->
+    </div>
+    <div class="row" style="margin-top: 5px">
         <div class="col-xs-2">
             <div class="divstyle" style="background-color: #ed980f"></div><span style="float: left;">&nbsp;&nbsp;无效</span>
         </div>

+ 3 - 0
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/TaskService_QImpl.java

@@ -90,6 +90,9 @@ public  class TaskService_QImpl implements TaskService_Q {
             if(q.getAppeal_result()!=null){
                 q.setAppeal_result_name(codeMap.get("appeal_result" + "_" + q.getAppeal_result() + "").getCode_name());
             }
+            if(q.getCheck_status()!=null){
+                q.setCheck_status_name(codeMap.get("task_status" + "_" + q.getCheck_status() + "").getCode_name());
+            }
             String users = q.getChecked_users();
             if (users != null && users != "") {
                 String[] usersdata = users.split(",");