discomfortGeneralPage.js 27.3 KB
Newer Older
zujiaozhang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327
define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
  var discomfortGeneralPage = {
    // 问卷id
    followUpId: medtap.getRequest('followUpId'),

    // 获取checks数据判断下面跳转的页面
    checks: medtap.getRequest('checks'),
    // 获取本题id
    questionId: medtap.getRequest('questionId')||'',
    // 获取本题序号
    questionNo: medtap.getRequest('questionNo')||'',
     // 传递的checks用来判断是否为最后一个
    lastChecks: medtap.getRequest('lastChecks')||'',
     // 最后一个quesitionId
    lastQuesitionId:'',
    parentId: medtap.getRequest('parentId'),
    // checks数据的数组形式
    newChecks:[],
    // 症状评分
    SymptomScorepicker: '',
    // 发生时间
    happenTimepicker: '',
    // 是否缓解
    IsRelievepicker: '',
    // 是否有处理方案
    Ishandlepicker: '',
    // 症状评分的临时存储
    symptomScore: '',
    //  症状评分
    symptomScoreVal:'',
    // 发生时间
    happenTimeVal:'',
    // 是否缓解
    isRelieveVal: '',
    // 是否有对应处理
    isHandleVal: '',
    // 处理方案
    dataText: '',
    init: function(){
      // 判断是否为最后一题
      var arrlist = discomfortGeneralPage.lastChecks.split(',')
      discomfortGeneralPage.lastQuesitionId = arrlist[arrlist.length-1]
      if(discomfortGeneralPage.questionId==discomfortGeneralPage.lastQuesitionId){
        $('.next').text('提交')
      }
      switch(discomfortGeneralPage.questionId){
        case '15':
        $('.content_body_title').text('9、请填写 ‘疲劳’ 症状详情')
        $('.first').text('疲劳,休息后缓解。')
        $('.second').text('疲劳,休息后不能缓解;影响工具性日常生活活动。')
        $('.three').text('疲劳,休息后不能缓解;影响个人日常生活活动。')
        $('.mask_item_four').hide()
        break;
        case '16':
        $('.content_body_title').text('9、请填写 ‘发热’ 症状详情')
        $('.first').text('38.0 ~ 39.0 ℃')
        $('.second').text('39.0~ 40.0 ℃')
        $('.three').text('高于40.0 ℃,不到24小时')
        $('.four').text('高于40.0 ℃,超过24小时')
        break;
        case '17':
        $('.content_body_title').text('9、请填写 ‘痤疮样皮疹’ 症状详情')
        $('.first').text('丘疹和脓疱小于10%的体表面积,伴有/不伴有瘙痒和敏感。')
        $('.second').text('丘疹和脓疱10%-30%的体表面积,伴有/不伴有瘙痒和压痛;伴心理影响;影响工具性日常生活活动。')
        $('.three').text('丘疹和脓疱大于30%的体表面积,伴有/不伴有瘙痒和压痛;影响个人日常生活活动;需要口服抗生素治疗二重感染。')
        $('.four').text('丘疹和脓疱遍布全身表面,伴有/不伴有瘙痒和敏感;需要静脉给予抗生素治疗广泛的多重感染;危及生命。')
        break;
        case '18':
        $('.content_body_title').text('9、请填写 ‘手足综合征’ 症状详情')
        $('.first').text('无痛性轻微皮肤改变或皮肤炎(如红斑,水肿,角化过度)。')
        $('.second').text('痛性皮肤改变(如剥落,水泡,出血,肿胀,角化过度);影响工具性日常生活活动。')
        $('.three').text('重度皮肤改变(剥落,水泡,出血,水肿,角化过度),伴疼痛;影响个人日常生活活动。')
        $('.mask_item_four').hide()
        break;
        case '19':
        $('.content_body_title').text('9、请填写 ‘腹泻’ 症状详情')
        $('.first').text('大便次数增加每天<4次;造瘘口排出物轻度增加。')
        $('.second').text('大便次数增加每天4~6次;造瘘口排出物中度增加。')
        $('.three').text('大便次数增加每天≥7次;大便失禁;需要院治疗;与基线相比,造瘘口排出物重度增加;影响个人日常生活活动。')
        $('.four').text('危及生命; 需要紧急治疗。')
        break;
        case '20':
        $('.content_body_title').text('9、请填写 ‘便秘’ 症状详情')
        $('.first').text('偶然或间断性出现; 偶尔需要使用粪便软化剂,轻泻药,饮食习惯调整或灌肠。')
        $('.second').text('持续症状,需要有规律的使用轻泻药或灌肠;影响工具性日常生活活动。')
        $('.three').text('需手工疏通的顽固性便秘;影响个人日常生活活动。')
        $('.four').text('危及生命; 需要紧急治疗。')
        break;
        case '21':
        $('.content_body_title').text('9、请填写 ‘腹胀’ 症状详情')
        $('.first').text('肠道功能或经口进食未改变。')
        $('.second').text('有症状,经口进食减少;肠道功能改变。')
        // $('.three').text('')
        // $('.four').text('')
        $('.mask_item_three').hide()
        $('.mask_item_four').hide()
        break;
        case '22':
        $('.content_body_title').text('9、请填写 ‘腹痛’ 症状详情')
        $('.first').text('轻度疼痛。')
        $('.second').text('中度疼痛; 影响工具性日常生活活动。')
        $('.three').text('重度疼痛;影响个人日常生活活动。')
        // $('.four').text('')
        $('.mask_item_four').hide()
        break;
        case '23':
        $('.content_body_title').text('9、请填写 ‘恶心’ 症状详情')
        $('.first').text('食欲降低,不伴进食习惯改变消化不良。')
        $('.second').text('经口摄食减少不伴明显的体重下降,脱水或营养不良。')
        $('.three').text('经口摄入能量和水分不足;需要鼻饲,全肠外营养或者住院。')
        // $('.four').text('')
        $('.mask_item_four').hide()
        break;
        case '24':
        $('.content_body_title').text('9、请填写 ‘呕吐’ 症状详情')
        $('.first').text('24小时内1-2发作(间隔5分钟)')
        $('.second').text('24小时内3-5发作(间隔5分钟)')
        $('.three').text('24小时内发作>=6次(间隔5分钟)需要鼻饲,全肠外营养或住院治疗。')
        $('.four').text('危及生命; 需要紧急治疗。')
        break;
        case '25':
        $('.content_body_title').text('9、请填写 ‘胃痛’ 症状详情')
        $('.first').text('轻度疼痛。')
        $('.second').text('中度疼痛;影响工具性日常生活活动。')
        $('.three').text('重度疼痛;影响个人日常生活活动。')
        // $('.four').text('')
        $('.mask_item_four').hide()
        break;
        case '26':
        $('.content_body_title').text('9、请填写 ‘口腔黏膜炎’ 症状详情')
        $('.first').text('无症状或轻症;无需治疗。')
        $('.second').text('中度疼痛;不影响经口进食;需要调整饮食。')
        $('.three').text('重度疼痛;影响经口进食。')
        $('.four').text('危及生命; 需要紧急治疗。')
        break;
        case '27':
        $('.content_body_title').text('9、请填写 ‘咳嗽’ 症状详情')
        $('.first').text('轻度症状;需要非处方药治。')
        $('.second').text('中度症状;需要药物治疗;影响工具性日常生活活动。')
        $('.three').text('重度症状;影响个人日常生活活动。')
         // $('.four').text('')
         $('.mask_item_four').hide()
        break;
        case '28':
        $('.content_body_title').text('9、请填写 ‘呼吸困难’ 症状详情')
        $('.first').text('中度活动时呼吸短促。')
        $('.second').text('少量活动时呼吸短促;影响工具性日常生活活动。')
        $('.three').text('休息时呼吸短促;影响个人日常生活活动。')
        $('.four').text('危及生命;需要紧急干预。')
        break;
        case '29':
        $('.content_body_title').text('9、请填写 ‘脱发’ 症状详情')
        $('.first').text('头发丢失不多于50%,远看没有区别,但近看能看出。需要改变发型来掩饰头发丢失,但不需要假发或假发块来掩饰')
        $('.second').text('头发丢失大于50%,症状明显,需要假发或假发块,心理有影响')
        // $('.three').text('')
        // $('.four').text('')
        $('.mask_item_three').hide()
        $('.mask_item_four').hide()
        break;
        case '30':
        $('.content_body_title').text('9、请填写 ‘体重降低’ 症状详情')
        $('.first').text('体重减轻5-<10% ,无需治疗')
        $('.second').text('体重减轻10 - <20%,需要给予营养支持')
        $('.three').text('体重减轻>=20%;需要鼻饲或全肠外营养')
        // $('.four').text('')
        $('.mask_item_four').hide()
        break;
        case '31':
        $('.content_body_title').text('9、请填写 ‘头痛头晕’ 症状详情')
        $('.content_body_symptomScore').hide()
        discomfortGeneralPage.symptomScoreVal=''
        break;
        case '32':
        $('.content_body_title').text('9、请填写 ‘四肢麻木’ 症状详情')
        $('.content_body_symptomScore').hide()
        discomfortGeneralPage.symptomScoreVal=''
        break;
        case '33':
        $('.content_body_title').text('9、请填写 ‘其他’ 症状详情')
        $('.content_body_symptomScore').hide()
        discomfortGeneralPage.symptomScoreVal=''
        break;
      }
      // 蒙层
      var mask = mui.createMask(function(){
        $('.mask_box').hide()
      });//callback为用户点击蒙版时自动执行的回调;
    // 点击症状评分
    $('.content_body_symptomScore').on('tap',function(){
      mask.show()
      $('.mask_box').show()
    })
    // 弹出菜单点击取消
    $('.mui-poppicker-btn-cancel').on('tap',function(){
      mask.close()
    })
    // 弹出菜单点击确定按钮
    $('.mui-poppicker-btn-ok').on('tap',function(){
      mask.close()
      $('.input_item_symptomScore').val(discomfortGeneralPage.symptomScore)
    })
    // 监视选中状态
    var list = document.querySelector('.mui-table-view.mui-table-view-radio');
    list.addEventListener('selected',function(e){
      console.log(e.detail.el.dataset.title);
      discomfortGeneralPage.symptomScore=e.detail.el.dataset.title
    });
      // discomfortGeneralPage.newChecks =  discomfortGeneralPage.checks.split(',')
      // console.log(discomfortGeneralPage.newChecks)
      // 点击下一题
      $('.next').on('tap',function(){
       //  获取用户填写的数据
      discomfortGeneralPage.symptomScoreVal = $('.input_item_symptomScore').val()
      discomfortGeneralPage.happenTimeVal = $('.input_item_happenTime').val()
      discomfortGeneralPage.isRelieveVal = $('.input_item_isRelieve').val()
      discomfortGeneralPage.isHandleVal = $('.input_item_isHandle').val()
      discomfortGeneralPage.dataText = $('#content_body_fill').val()
      if(discomfortGeneralPage.questionId!='33'&&discomfortGeneralPage.questionId!='32'&&discomfortGeneralPage.questionId!='31'){
        if(discomfortGeneralPage.symptomScoreVal=='') return medtap.winPop('请输入症状评分')
      }
     
      var data = {
              "questionId":discomfortGeneralPage.questionId,
              'parentId':discomfortGeneralPage.parentId,
              "answer":{
                "symptomScoreVal":discomfortGeneralPage.symptomScoreVal||'',
                "happenTimeVal":discomfortGeneralPage.happenTimeVal||'',
                "isRelieveVal":discomfortGeneralPage.isRelieveVal||'',
                "isHandleVal":discomfortGeneralPage.isHandleVal||'',
                "dataText": discomfortGeneralPage.dataText||'',
                "status": 1
              },
              "questionNo":Number(discomfortGeneralPage.questionNo),
              "followUpId": discomfortGeneralPage.followUpId
            }
            if(discomfortGeneralPage.questionId==discomfortGeneralPage.lastQuesitionId){
              discomfortGeneralPage.submitQuestionAnswer(data)
            }else{
              discomfortGeneralPage.getNextQuestion(data)
            }
            
        })

     
       
			 // 点击上一题
			 $('.pre').on('click',function(){
        discomfortGeneralPage.getPreQuestion()
      })
      // tab切换
      $(".tabbox li").click(function (){
          //获取点击的元素给其添加样式,讲其兄弟元素的样式移除
          $(this).addClass("active").siblings().removeClass("active");
          //获取选中元素的下标
          var index = $(this).index();
          $(this).parent().siblings().children().eq(index).addClass("active")
          .siblings().removeClass("active");
       });
      discomfortGeneralPage.initHappenTimepicker();
      discomfortGeneralPage.initIsRelieve();
      discomfortGeneralPage.initIshandle();
      discomfortGeneralPage.selectItems();
    },
     //  发生时间
     initHappenTimepicker: function(){
      discomfortGeneralPage.happenTimepicker = new mui.DtPicker({type:'date'});
     },
    //  是否缓解
    initIsRelieve: function(){
      discomfortGeneralPage.IsRelievepicker = new mui.PopPicker();
      discomfortGeneralPage.IsRelievepicker.setData([
        {value:'1',text:'是'},
        {value:'2',text:'部分缓解'},
        {value:'3',text:'否'}
      ]);
    },
    // 是否有处理方案
    initIshandle:function(){
      discomfortGeneralPage.Ishandlepicker = new mui.PopPicker();
      discomfortGeneralPage.Ishandlepicker.setData([
        {value:'1',text:'是'},
        {value:'2',text:'否'}
      ]);
    },
       // 点击picker后的事件注册
    selectItems:function(){
      
        // 点击发生时间
        $('.content_body_happenTime').click(function(){
          discomfortGeneralPage.happenTimepicker.show(function (selectItems) { 
            var timer = selectItems.y.text + '年' + selectItems.m.text + '月' + selectItems.d.text + '日'
            $('.input_item_happenTime').val(timer)
          })
        })
         // 点击是否缓解
         $('.content_body_isRelieve').click(function(){
          discomfortGeneralPage.IsRelievepicker.show(function (selectItems) { 
            $('.input_item_isRelieve').val(selectItems[0].text)
          })
        })
          // 点击是否有处理方案
        $('.content_body_isHandle').click(function(){
            discomfortGeneralPage.Ishandlepicker.show(function (selectItems) { 
              $('.input_item_isHandle').val(selectItems[0].text)
              if(selectItems[0].value=='1'){
                $('.doctorExplanation').show()
              }else{
                $('.doctorExplanation').hide()
                $('#content_body_fill').val('')
              }
            })
          })
      },
      	// 获取问题答案
		getQuestionAnswer: function(){
      medtap.submitAjax({
        url: "https://testdevgw.medtap.cn/operation/followUp/getAnswer",
        type: 'post',
        async: false,
        contentType: 'application/json',
        data: {
          "followUpId": discomfortGeneralPage.followUpId,
          "questionId": discomfortGeneralPage.questionId,
        },
        success: function(res) {
          if(!res.success) return medtap.winPop('获取数据失败')
          console.log(res) 
328 329 330
          if(!res.content.followAnswer.answer) {
            return
          }
zujiaozhang committed
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508
          if(res.content.followAnswer.answer.isHandleVal=='是'){
            $('.doctorExplanation').show()
          }
             $('.input_item_symptomScore').val(res.content.followAnswer.answer.symptomScoreVal||'')
             $('.input_item_happenTime').val(res.content.followAnswer.answer.happenTimeVal||'')
             $('.input_item_isRelieve').val(res.content.followAnswer.answer.isRelieveVal||'')
             $('.input_item_isHandle').val(res.content.followAnswer.answer.isHandleVal||'')
             $('#content_body_fill').val(res.content.followAnswer.answer.dataText||'')
        }
      })
    },
    // 上一题
    getPreQuestion:function(){
      medtap.submitAjax({
        url: "https://testdevgw.medtap.cn/operation/followUp/previousQuestion",
        type: 'post',
        async: false,
        contentType: 'application/json',
        data: {
          "questionId":discomfortGeneralPage.questionId,
          "questionNo":discomfortGeneralPage.questionNo,
          "followUpId":discomfortGeneralPage.followUpId,
        },
        success: function(res) {
          console.log(res)
          if(!res.success) return medtap.winPop('获取数据失败')
          var parentId = res.content.previousQuestion.parentId||''
          var questionId = res.content.previousQuestion.questionId||''
          var questionNo = res.content.previousQuestion.questionNo||''
          switch(questionId){
            case 14:
            medtap.pushWindow('discomfort.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId)
            break;
            case 15:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId)
            break;
            case 16:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 17:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 18:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 19:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 20:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 21:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 22:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 23:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 24:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 25:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 26:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 27:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 28:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 29:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 30:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 31:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 32:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
            case 33:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId)
            break;
          }
        }
      })
     },
      // 提交答案获取下一题id
	  getNextQuestion:function(data,url){
			medtap.submitAjax({
				url: "https://testdevgw.medtap.cn/operation/followUp/nextQuestion",
				type: 'post',
				async: false,
				contentType: 'application/json',
				data: data,
				success: function(res) {
          console.log(res)
          var questionNo = res.content.nextQuestion.questionNo||''
          var questionId = res.content.nextQuestion.questionId||''
          var parentId =res.content.nextQuestion.parentId||''
          switch(questionId){
            case 16:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 17:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 18:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 19:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 20:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 21:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 22:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 23:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 24:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 25:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 26:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 27:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 28:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 29:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 30:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 31:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 32:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            case 33:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks)  
            break;
            default:
            medtap.pushWindow('submitSuccessfully.html')
          }
				}
			})
    },
     //  最后提交问卷
     submitQuestionAnswer: function(data){
      medtap.submitAjax({
				url: "https://testdevgw.medtap.cn/operation/followUp/completeQuestion",
				type: 'post',
				async: false,
				contentType: 'application/json',
        data: data,
        success: function(res){
          console.log(res)
zujiaozhang committed
509
          medtap.pushWindow('submitSuccessfully.html?followUpId='+discomfortGeneralPage.followUpId)
zujiaozhang committed
510 511 512 513 514 515 516
        }
      })
     }
   }
   discomfortGeneralPage.init();
   discomfortGeneralPage.getQuestionAnswer();
  })