Просмотр исходного кода

Update 情景中添加引导信息

YueYunyun 1 год назад
Родитель
Сommit
ca48d43e24

+ 1 - 0
SourceCode/WeApp.Web/App_Start/RouteConfig.cs

@@ -20,6 +20,7 @@ namespace WeApp
             routes.MapRoute("Gis", url: "Gis", defaults: new { controller = "ExerciseV2", action = "Gis", id = UrlParameter.Optional });
             routes.MapRoute("Qs", url: "Qs/{id}", defaults: new { controller = "ExerciseV2", action = "QueryScore", id = UrlParameter.Optional });
             routes.MapRoute("QueryScore", url: "QueryScore/{id}", defaults: new { controller = "ExerciseV2", action = "QueryScore", id = UrlParameter.Optional });
+            routes.MapRoute("SelectV1", "SV1", new { controller = "Exercise", action = "Select", id = 0 });
             routes.MapRoute("Select", "S", new { controller = "ExerciseV2", action = "Select", id = 0 });
             routes.MapRoute("SelectPage", "S{id}", new { controller = "ExerciseV2", action = "Select", id = 0 });
 

+ 13 - 0
SourceCode/WeApp.Web/Content/Css/ExerciseV2/screen.css

@@ -288,6 +288,19 @@ body {
   margin: 0 5px;
   padding: 3px 8px;
 }
+.box .scene-box .guide-box {
+  margin: 10px 0;
+  padding: 10px;
+  background: var(--bg);
+  border-radius: 5px;
+}
+.box .scene-box .guide-box p {
+  margin: 0;
+  font-size: 13px;
+}
+.box .scene-box .guide-box .guide-title {
+  font-weight: 600;
+}
 .box .scene-box .desc {
   padding: 8px;
   color: #36536D;

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
SourceCode/WeApp.Web/Content/Css/ExerciseV2/screen.min.css


+ 1 - 1
SourceCode/WeApp.Web/Content/Css/ExerciseV2/stu-cmd.css

@@ -209,5 +209,5 @@
   position: absolute;
   left: 15px;
   bottom: 15px;
-  width: 300px;
+  width: 70%;
 }

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
SourceCode/WeApp.Web/Content/Css/ExerciseV2/stu-cmd.min.css


+ 16 - 0
SourceCode/WeApp.Web/Content/Scss/ExerciseV2/screen.scss

@@ -171,6 +171,22 @@ body {
             }
         }
 
+        .guide-box {
+            margin:10px 0;
+            padding: 10px;
+            background: var(--bg);
+            border-radius: 5px;
+
+            p {
+                margin: 0;
+                font-size: 13px;
+            }
+
+            .guide-title {
+                font-weight: 600;
+            }
+        }
+
         .desc {
             padding: 8px;
             color: #36536D;

+ 1 - 1
SourceCode/WeApp.Web/Content/Scss/ExerciseV2/stu-cmd.scss

@@ -52,7 +52,7 @@
             position: absolute;
             left: 15px;
             bottom: 15px;
-            width: 300px;
+            width: 70%;
         }
     }
 }

+ 2 - 2
SourceCode/WeApp.Web/Views/ExerciseV2/Student.cshtml

@@ -60,7 +60,7 @@
                 success: function(res) {
                     if (res) {
                         //$('.help-box').show();
-                        $('select[name="help"]').html(`<option value="">请选择提示信息</option>` + res);//.select2();
+                        $('select[name="help"]').html(`<option value="">请选择提示信息</option>` + res).select2();
                     } else {
                         $('.help-box').hide();
                     }
@@ -77,7 +77,7 @@
             $('select[name="help"]').on('change',
                 function () {
                     if ($(this).val()) {
-                        var $txt = $(this).closest('.form-box').find('.txt');
+                        var $txt = $(this).closest('.cmd-box').find('.txt');
                         $txt.val($txt.val() + " " + $(this).find('option:selected').text());
                         $(this).val('');
                     }

+ 15 - 3
SourceCode/WeApp.Web/Views/ExerciseV2/_Screen.cshtml

@@ -229,7 +229,7 @@
                     if ($(`#scene_${groupNo} .box-body .scene-box[data-path="${data.path}"]`).length > 0) {
                         return "";
                     }
-                    var c = "handled", str3 = '', descShow = '', attachStr = '';
+                    var c = "handled", str3 = '', descShow = '', attachStr = '', guideIcon = '', guideStr = '';
                     if (isNew) {
                         c = "flash-scene new-scene new-scene2";
                         //str2 = '<span class="label label-danger no-scene">未处理</span>';
@@ -255,9 +255,21 @@
                             }
                         }
                     }
+                    if (data.guideInfos && data.guideInfos.length) {
+                        guideIcon =
+                            '<span class="btn btn-tool" title="点击查看提示引导信息" onclick="ToggleGuide(this)"><i class="fas fa-question"></i></span>';
+                        guideStr += '<div class="guide-box" style="display:block"><p class="guide-title">提示:</p>';
+                        var i = 0;
+                        data.guideInfos.forEach((v) => {
+                            i++;
+                            guideStr += '<p class="guide-info">{0}、{1}</p>'.format(i, v.description);
+                        });
+                        guideStr += '</div>';
+                    }
+
                     str +=
-                        '<div class="scene-box {3}" data-id="{0}"  data-path="{5}"><div class="title"><span class="text">{1}</span><div class="attach-box">{4}</div>{6}</div><div class="desc"  style="display:{7};">{2}</div></div>'
-                            .format(data.id, data.name, data.description, c, attachStr, data.path, str3, descShow);
+                        '<div class="scene-box {3}" data-id="{0}"  data-path="{5}"><div class="title"><span class="text">{1}</span><div class="attach-box">{4}</div>{6}</div><div class="desc"  style="display:{7};">{2}{8}</div></div>'
+                        .format(data.id, data.name, data.description, c, attachStr, data.path, str3, descShow, guideStr);
                 }
                 return str;
             }

Некоторые файлы не были показаны из-за большого количества измененных файлов