瀏覽代碼

判断是否存在评估内容

wyq 3 年之前
父節點
當前提交
7b3ac38ecf
共有 4 個文件被更改,包括 363 次插入340 次删除
  1. 334 329
      src/js/cdss.js
  2. 7 3
      src/js/cdssHorizontal.js
  3. 10 4
      src/js/informationOut.js
  4. 12 4
      src/js/staticInfo.js

File diff suppressed because it is too large
+ 334 - 329
src/js/cdss.js


+ 7 - 3
src/js/cdssHorizontal.js

@@ -347,8 +347,8 @@ function renderScale(list, showNum, type, hasInfo) {
     $('.moduleItem.evaluation').append(shortStr)
     $('.moduleItem.evaluation').append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
     $('.moduleItem.evaluation').css("display", "block")
-    $('.moduleItem.evaluation').children(".shortBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
-    $('.moduleItem.evaluation').children(".longStrBox").children(".longBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
+    // $('.moduleItem.evaluation').children(".shortBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
+    // $('.moduleItem.evaluation').children(".longStrBox").children(".longBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
   }
 }
 
@@ -590,7 +590,11 @@ function renderItemWrapper(list, showNum, type, hasInfo) {
   }
 }
 function renderPushItem(item, type) {
-  str = `<span class="pushItemBox" data-name="${item.name}" data-type="${type}"><span class="pushItemName">${type == 8 ? ('【' + item.name + '】') : item.name}</span>${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}</span>`
+  str = `<span class="pushItemBox" data-name="${item.name}" data-type="${type}">`
+  str += `${item.hasScale == "0" ? `<span class="pushItemName">${type == 8 ? ('【' + item.name + '】') : item.name}</span>` : `<span class="pushItemName evaluationtitle">${type == 8 ? ('【' + item.name + '】') : item.name}</span>`}`
+  str += `${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}`
+  str += '</span >'
+  return str
   return str
 }
 function bindOpenInfo() {

+ 10 - 4
src/js/informationOut.js

@@ -419,6 +419,7 @@ function getResult(pushInfo) {
     let proposal = ''
     let proposals = []
     let scrollTop = []
+    let v
     isclick = true
     $(".contentList").each(function (i) {
       if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
@@ -433,10 +434,15 @@ function getResult(pushInfo) {
       }
       scrollTop.push($(this).eq(0).find(".chColor").offset())
     });
-    // var v = scrollTop.indexOf(undefined)
-    // if (v) {
-    //   $(`.scale .infos`).scrollTop(v.top + 346)
-    // }
+    for (var i = 0; i < scrollTop.length; i++) {
+      if (scrollTop[i] != undefined) {
+        v = scrollTop[i]
+        break
+      }
+    }
+    if (v) {
+      $(`.scale .infos`).scrollTop(v.top + 346)
+    }
     if (!$(".contentList").find(".item-title").hasClass('chColor') && !$(".contentList").find(".item-titles").hasClass('chColor')) {
       $('input[type="radio"]:checked').each(function () {
         if ($(this).attr("resultType") == 1) {

+ 12 - 4
src/js/staticInfo.js

@@ -255,6 +255,7 @@ function getcheck() {
     if ($radio.data('waschecked') == true) {
       $radio.prop('checked', false);
       $("input:radio[name='" + domName + "']").data('waschecked', false);
+      $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
       $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#666666");
       $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#333333");
       if (isclick) {
@@ -353,6 +354,7 @@ function getResult(pushInfo) {
     let proposal = ''
     let proposals = []
     let scrollTop = []
+    let v
     isclick = true
     $(".contentList").each(function (i) {
       if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
@@ -367,10 +369,16 @@ function getResult(pushInfo) {
       }
       scrollTop.push($(this).eq(0).find(".chColor").offset())
     });
-    // var v = scrollTop.indexOf(undefined)
-    // if (v) {
-    //   $(`.scale .infos`).scrollTop(v.top + 346)
-    // }
+
+    for (var i = 0; i < scrollTop.length; i++) {
+      if (scrollTop[i] != undefined){
+        v = scrollTop[i]
+        break
+      }
+    }
+    if (v) {
+      $(`.scale .infos`).scrollTop(v.top + 346)
+    }
     if (!$(".contentList").find(".item-title").hasClass('chColor') && !$(".contentList").find(".item-titles").hasClass('chColor')) {
       $('input[type="radio"]:checked').each(function () {
         if ($(this).attr("resultType") == 1) {