Procházet zdrojové kódy

计算公式结果年龄性别不可编辑

zhangxc před 5 roky
rodič
revize
7d55315599
4 změnil soubory, kde provedl 12 přidání a 4 odebrání
  1. 2 2
      src/js/illness.js
  2. 2 2
      src/js/indexVertDom.js
  3. 4 0
      src/js/popup.js
  4. 4 0
      src/js/popupEdit.js

+ 2 - 2
src/js/illness.js

@@ -50,7 +50,7 @@ function bqtsFun(data){//病情提示
         for(var n = 0;n < tmpBqDetail.content.details.length;n++){
           var deepDetail = tmpBqDetail.content.details[n]
           if(deepDetail.controlType == 2){//0-radio,1-checkbox,2-text,3-dropdownlist
-            deepDetailStr+='<li class="radioCheck"><span class="modalMaintltle">请输入'+deepDetail.name+': </span><input type="text" placeholder="请输入" value="'+deepDetail.value+'"><i class="uint">'+deepDetail.uint+'</i></li>'
+            deepDetailStr+='<li class="radioCheck"><span class="modalMaintltle">请输入'+deepDetail.name+': </span><input type="text" placeholder="请输入"' +(deepDetail.isShow == 0 ? 'readonly':'') + ' value="'+deepDetail.value+'"><i class="uint">'+deepDetail.uint+'</i></li>'
           }
           if(deepDetail.controlType == 0){
             let tooDeepDetailStr = ''
@@ -63,7 +63,7 @@ function bqtsFun(data){//病情提示
               }
             }
             deepDetailStr+='<li class="radioCheck"><span class="modalMaintltle">'+deepDetail.name+': </span>'+
-              '<ul class="clearfix caculateLis">'+
+              '<ul class="clearfix caculateLis" data-isShow="'+deepDetail.isShow+'">'+
               tooDeepDetailStr+
               '</ul>'+
               '</li>'

+ 2 - 2
src/js/indexVertDom.js

@@ -179,7 +179,7 @@ function renderRecommendConditTips(className,title,data) {
             for(var n = 0;n < tmpBqDetail.content.details.length;n++){
               var deepDetail = tmpBqDetail.content.details[n]
               if(deepDetail.controlType == 2){//0-radio,1-checkbox,2-text,3-dropdownlist
-                deepDetailStr+=`<li class="radioCheck"><span class="modalMaintltle">请输入${deepDetail.name}: </span><input type="text" placeholder="请输入" value=${deepDetail.value}><i class="uint">${deepDetail.uint}</i></li>`
+                deepDetailStr+=`<li class="radioCheck"><span class="modalMaintltle">请输入${deepDetail.name}: </span><input type="text" ${deepDetail.isShow=='0' ? 'readonly':''} placeholder="请输入" value=${deepDetail.value}><i class="uint">${deepDetail.uint}</i></li>`
               }
               if(deepDetail.controlType == 0){
                 let tooDeepDetailStr = ''
@@ -194,7 +194,7 @@ function renderRecommendConditTips(className,title,data) {
                 
                 
                 deepDetailStr+=`<li class="radioCheck"><span class="modalMaintltle">${deepDetail.name}: </span>
-                                <ul class="clearfix caculateLis">
+                                <ul class="clearfix caculateLis" data-isShow = ${deepDetail.isShow}>
                                     ${tooDeepDetailStr}
                                 </ul>
                             </li>`

+ 4 - 0
src/js/popup.js

@@ -2,6 +2,10 @@ const {post,config} = require('./promise.js');
 const $ = require("jquery");
 
 $(".conditionHintTips").on('click',".radioChecks",function(e){
+    const isShow =  $(this).parent().attr("data-isShow")
+    if(isShow == '0') {
+        return;
+    }
   e.stopPropagation()
   $(this).attr("data-select","select").children("i").css({
     "background":"url('../images/sex2.png') center center no-repeat"

+ 4 - 0
src/js/popupEdit.js

@@ -4,6 +4,10 @@ const $ = require("jquery");
 function bindTipsEvent() {
 
     $(".conditTips").on('click',".radioChecks",function(e){
+        const isShow =  $(this).parent().attr("data-isShow")
+        if(isShow == '0') {
+          return;
+        }
         e.stopPropagation()
         $(this).attr("data-select","select").children("i").css({
           "background":"url('../images/sex2.png') center center no-repeat"