Pārlūkot izejas kodu

结果样式修改

wyq 4 gadi atpakaļ
vecāks
revīzija
d46da332e3
1 mainītis faili ar 8 papildinājumiem un 10 dzēšanām
  1. 8 10
      src/js/staticInfo.js

+ 8 - 10
src/js/staticInfo.js

@@ -163,9 +163,9 @@ function renderContentscale(list, contentWrapClassName, name) {
             } else if (it.selectType == 22 && item.resultType == 1) {
               str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '"/>'
             } else if (it.selectType == 21 && item.resultType == 2) {
-              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + it.content + '问题' + its.result + '"/>'
+              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo +'"/>'
             } else if (it.selectType == 22 && item.resultType == 2) {
-              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + its.result + '"/>'
+              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo +'"/>'
             }
             str += its.content
             if (item.resultType == 1) {
@@ -220,7 +220,6 @@ function renderContentscale(list, contentWrapClassName, name) {
     $('.result_title').css({
       'margin-left': '0', //高度自动
     })
-    $('.result_left').height() = $('.result_title').height()
   }
   addLinkClickEvent(contentWrapClassName);
   adjustHeight();
@@ -346,6 +345,7 @@ function getResult(pushInfo, textType) {
     let result
     let key = false
     let proposal = ''
+    let proposals = []
     isclick = true
     $(".contentList").each(function (i) {
       if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
@@ -365,20 +365,17 @@ function getResult(pushInfo, textType) {
           num += parseFloat($(this).val())
         } else {
           arr.push($(this).attr("data_obj"))
+          proposals.push($(this).attr("proposal"))
         }
       });
       $('input[type="checkbox"]:checkbox:checked').each(function () {
         if (!isNaN($(this).val())) {
           num += parseFloat($(this).val())
         } else {
-          multname = $(this).parents('.item-content').siblings('.item-titles').html()
-          multarr.push($(this).attr("data_obj"))
+          arr.push($(this).attr("data_obj"))
+          proposals.push($(this).attr("proposal"))
         }
       });
-
-      if (multarr.join(";")) {
-        arr.push(multname + multarr.join(";"))
-      }
       tmp = arr.join(";");
       if (pushInfo.length > 0) {
         for (var i = 0; i < pushInfo.length; i++) {
@@ -396,6 +393,7 @@ function getResult(pushInfo, textType) {
         }
       } else {
         result = tmp
+        proposal = proposals.join(";");
       }
 
       if (result == undefined) {
@@ -456,7 +454,7 @@ function renderTab(detailList, scale) {
     $(".tabList").append(`<span class="tab" data-module="notice" data-title="` + noticeName + `">注意事项</span>`)
     //$(".tabBox .title").html(noticeName);
   }
-  if (scale) {
+  if (scale || getUrlArgObject('gauge') == 'gauge' || getUrlArgObject('type') == 8) {
     $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
     //$(".tabBox .title").html(noticeName);
   }