瀏覽代碼

评估内容为空去掉评估内容

wyq 3 年之前
父節點
當前提交
ff55cdbeb7
共有 3 個文件被更改,包括 15 次插入13 次删除
  1. 4 4
      src/js/informationOut.js
  2. 4 2
      src/js/promise.js
  3. 7 7
      src/js/staticInfo.js

+ 4 - 4
src/js/informationOut.js

@@ -531,10 +531,10 @@ function renderTab(detailList, scale) {
     $(".tabList").append(`<span class="tab" data-module="notice" data-title="` + noticeName + `">注意事项</span>`)
     //$(".tabBox .title").html(noticeName);
   }
-  // if (scale || getUrlArgObject('gauge') == 'gauge' || getUrlArgObject('type') == 8) {
-  //   $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
-  //   //$(".tabBox .title").html(noticeName);
-  // }
+  if (scale || getUrlArgObject('gauge') == 'gauge' || getUrlArgObject('type') == 8) {
+    $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
+    //$(".tabBox .title").html(noticeName);
+  }
   let defaultModuleName
   if ((getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale && detailList['静态知识']) || getUrlArgObject('scale') == 'scale') {
     $(".tabList .tab").eq(1).addClass("activeTab")

+ 4 - 2
src/js/promise.js

@@ -344,11 +344,13 @@ const Toast = function (msg, duration,type) {
   var m = document.createElement('div');
   if(type == 'warn'){
     m.innerHTML = '<div style="margin:auto"><img class="warn" style="margin-right:14px;float:left" src="./../images/icon-warning.png" /><span>'+msg+'</span></div>'
+    m.style.cssText = "margin:auto;width:250px;vertical-align:middle;padding:25px 14px;height: 30px;color: #fff;line-height: 30px;text-align: center;border-radius: 8px;position: absolute;top: 0;left: 0;right:0;bottom:0;z-index: 999999;background: #333;font-size: 16px;";
   }else if(type == 'success'){
-    m.innerHTML = '<div style="margin:auto"><img class="warn" style="width:32px;margin-right:14px;float:left" src="./../images/icon-success.png" /><span>' + msg +'</span></div>'
+    m.innerHTML = '<div style="margin:auto;width:120px"><img class="warn" style="width:32px;margin-right:14px;float:left" src="./../images/icon-success.png" /><span>' + msg +'</span></div>'
+    m.style.cssText = "margin:auto;width:120px;vertical-align:middle;padding:25px 14px;height: 30px;color: #fff;line-height: 30px;text-align: center;border-radius: 8px;position: absolute;top: 0;left: 0;right:0;bottom:0;z-index: 999999;background: #333;font-size: 16px;";
   }
   
-  m.style.cssText = "margin-left:50%;display:flex;vertical-align:middle;padding:25px 14px;height: 30px;color: #fff;line-height: 30px;text-align: center;border-radius: 8px;position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: 999999;background: #333;font-size: 16px;";
+  
   $('.warn').css('margin-top','10px')
   document.body.appendChild(m);
   setTimeout(function () {

+ 7 - 7
src/js/staticInfo.js

@@ -322,7 +322,7 @@ function copy(name) {
   $(".copy").click(function () {
     var texts = document.getElementById("result_title").innerText;
     if (texts == '') {
-      Toast('结果为空,无法复制', 500, 'warn')
+      Toast('温馨提示:结果为空,无法复制', 5000000000, 'warn')
       return
     }
     var inputs = document.getElementById("inputs");
@@ -330,7 +330,7 @@ function copy(name) {
     console.log(inputs.value)
     inputs.select(); // 选中文本
     document.execCommand("copy"); // 执行浏览器复制命令
-    Toast('复制成功', 500, 'success')
+    Toast('复制成功', 5000000000000, 'success')
   })
 
 }
@@ -430,7 +430,7 @@ function getResult(pushInfo, textType) {
         $(".foot").css('display', 'block')
       }
     } else {
-      Toast('温馨提示:必填选项不能为空~', 500, 'warn')
+      Toast('温馨提示:必填选项不能为空~', 5000000000, 'warn')
     }
   })
   $(".printing").hover(
@@ -466,10 +466,10 @@ function renderTab(detailList, scale) {
     $(".tabList").append(`<span class="tab" data-module="notice" data-title="` + noticeName + `">注意事项</span>`)
     //$(".tabBox .title").html(noticeName);
   }
-  // if (scale || getUrlArgObject('gauge') == 'gauge' || getUrlArgObject('type') == 8) {
-  //   $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
-  //   //$(".tabBox .title").html(noticeName);
-  // }
+  if (scale || getUrlArgObject('gauge') == 'gauge' || getUrlArgObject('type') == 8) {
+    $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
+    //$(".tabBox .title").html(noticeName);
+  }
   let defaultModuleName
   if (getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale && detailList['静态知识']) {
     $(".tabList .tab").eq(1).addClass("activeTab")