温红权 8 лет назад
Родитель
Сommit
2ea45bbe53
1 измененных файлов с 18 добавлено и 3 удалено
  1. 18 3
      VisualInspection/view/mytask/taskDetail.html

+ 18 - 3
VisualInspection/view/mytask/taskDetail.html

@@ -327,8 +327,22 @@
         };
         post_common_service("/task/getStatusById/", data, function(data) {
             if (data) {
+                console.log(data)
                 var flowStr = "";
+
+                var color_t = new $.zui.Color("#63B8FF");
                 for (var i in data) {
+                    var color = new $.zui.Color(color_t.r - i * 10, color_t.g - i * 10, color_t.b - i * 10);
+
+                    var startcolor = new $.zui.Color(color_t.r - i * 10 + 5, color_t.g - i * 10 + 5, color_t.b - i * 10 + 5);
+
+                    var endcolor = new $.zui.Color(color_t.r - i * 10 - 5, color_t.g - i * 10 - 5, color_t.b - i * 10 - 5);
+
+                    var background = "background:-webkit-gradient(linear, 0 % 0 % , 0 % 100 % , from(" + startcolor.hexStr() + "), to(" + endcolor.hexStr() + "));" +
+                        "background:-webkit-linear-gradient(top, " + startcolor.hexStr() + ", " + endcolor.hexStr() + ");" + "background:-moz-linear-gradient(top," + startcolor.hexStr() + "," + endcolor.hexStr() + ");"
+
+
+
                     var str = "";
                     if (i == 0) {
                         str = '<div class="col-sm-2" style="text-align:center;padding:0px;width: 87px;margin-left:-60px;">' +
@@ -345,14 +359,15 @@
                         '<div class="row">' +
                         '   <label>' + data[i].check_status_name + '</label>' +
                         '</div>' +
-                        '<div class="row line" style="margin-top: 3px;">' +
-                        '    <div class="timeline_item_station"></div>' +
+                        '<div class="row line" style="margin-top: 3px;' + background + '">' +
+                        '    <div class="timeline_item_station" style="background:' + color.hexStr() + '"></div>' +
                         '</div>' +
                         '<div class="row" style="margin-top: -5px;">' +
                         '   <label style="    font-weight: 400;">' + data[i].update_time + '</label>' +
                         '</div>' +
                         (i == data.length - 1 ? (
-                            '   <img src="/images/end.png" style="width: 28px;right:-10px; position: absolute; top:16px;">'
+                            '<i class="icon icon-angle-right" style="font-size: 45px;right: -5px;position: absolute;top: 6px;color:' + endcolor.hexStr() + '"></i>'
+                            // '   <img src="/images/end.png" style="width: 28px;right:-10px; position: absolute; top:16px;">'
                         ) : "") +
                         '</div>';