温红权 7 лет назад
Родитель
Сommit
8e5394a542

+ 1 - 1
VisualInspection/js/config.js

@@ -78,7 +78,7 @@ function getImageaddr() {
     } else if (base_ui_url.indexOf("localhost") != -1) {
         // return "http://10.112.0.199:7000/"
         // return "http://file_release_yanhai.jsxt.jsjtyxt.com:8283/";
-        // return "http://localhost:8081/";
+        return "http://localhost:8081/";
     } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
         return "http://192.168.8.236/"
     } else if (base_ui_url.indexOf("200.200.19.126") != -1) {

+ 3 - 0
VisualInspection/js/lib/ckplayer/ckplayer/ckplayer.js

@@ -409,6 +409,9 @@ function ckplayerConfig() {
                         case '.mp4':
                             this.VA[0][1] = 'video/mp4';
                             break;
+                        case '.MP4':
+                            this.VA[0][1] = 'video/mp4';
+                            break;
                         case '.ogg':
                             this.VA[0][1] = 'video/ogg';
                             break;

+ 8 - 0
VisualInspection/js/lib/mytable.js

@@ -179,6 +179,10 @@ String.prototype.replaceAll = function(s1, s2) {
                                     src = src.split('.mp4')[0] + "_screen_0.png"
                                     ispic = false;
                                 }
+                                if (src.indexOf('.MP4') != -1) {
+                                    src = src.split('.MP4')[0] + "_screen_0.png"
+                                    ispic = false;
+                                }
                                 var pic = (ispic ? '<a class="card lightbox-toggle" onclick="img_play(\'' + src + '\')" href="javascript:void(0)" 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>';
@@ -218,6 +222,10 @@ String.prototype.replaceAll = function(s1, s2) {
                                     src = src.split('.mp4')[0] + "_screen_0.png"
                                     ispic = false;
                                 }
+                                if (src.indexOf('.MP4') != -1) {
+                                    src = src.split('.MP4')[0] + "_screen_0.png"
+                                    ispic = false;
+                                }
                                 // var pic = (ispic ? '<a class="card lightbox-toggle" onclick="img_play(\'' + src + '\')" href="javascript:void(0)" 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>';

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

@@ -68,4 +68,6 @@ var ROLE_FWQ_ADMIN = "ROLE_FWQ_ADMIN";
 var ROLE_FWQ = "ROLE_FWQ";
 var ROLE_WRECKER_MANAGER = "ROLE_WRECKER_MANAGER";
 var ROLE_WRECKER = "ROLE_WRECKER";
-var ROLE_WRECKER_NQ = "ROLE_WRECKER_NQ";
+var ROLE_WRECKER_NQ = "ROLE_WRECKER_NQ";
+var ROLE_DDZS_ADMIN = "ROLE_DDZS_ADMIN";
+var ROLE_DDZS = "ROLE_DDZS";

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

@@ -112,8 +112,9 @@ function initCheck() {
             for (var v in vlist) {
 
                 var vv = vlist[v];
-                console.log(vv.split("/")[0]);
-                var o = "<option val='" + vv + "' " + (v == 0 ? "selected" : "") + " >" + vv.split("/")[0] + "</option>"
+                var idss = vv.split("/");
+                var filename = idss[idss.length - 1];
+                var o = "<option value='" + vv + "' " + (v == 0 ? "selected" : "") + " >" + filename + "</option>"
                 htmlo += o;
             }
 
@@ -139,6 +140,7 @@ function initCheck() {
 
 function onvideoselect(obj) {
     videoid = (obj.value);
+    console.log(videoid)
     var videoObject = {
         container: '.video', //“#”代表容器的ID,“.”或“”代表容器的class
         variable: 'player', //该属性必需设置,值等于下面的new chplayer()的对象

+ 4 - 5
VisualInspection/qzd/js/task/new.js

@@ -96,12 +96,12 @@ function queryTask() {
         { width: 160, 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 (user.roles[0].id == 20 || user.roles[0].id == 21) {
+    if (hasRole(ROLE_DDZS_ADMIN) || hasRole(ROLE_DDZS)) {
         var colFunc = { width: 160, text: '操作', type: 'string', flex: true, field: 'id', colClass: 'text-center' };
         colFunc.oper = $.zui.store.get("task_table_btn_1");
         cols.push(colFunc);
         $("#saveButton").show();
-    } else if (user.roles[0].id == 16 || user.roles[0].id == 17) {
+    } 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);
@@ -216,12 +216,11 @@ function checkUpdate(id) {
         setRecordUser();
         $("#carUserSatisfaction").val(redata.car_user_satisfaction);
         var userids = redata.users.split(",");
-        setTimeout(function (){
+        setTimeout(function() {
             for (var i in userids) {
                 $('span[data-id="' + userids[i] + '"] input').click();
             }
-        }
-        ,500);
+        }, 500);
         $("#recordUser").val(redata.userNames);
         $("#addr").val(redata.addr);
     })