define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) {　
  var discomfortGeneralPage = {
    // 问卷id
    followUpId: medtap.getRequest('followUpId'),
    // 修改人员id
    adminId: medtap.getRequest('adminId')||'',
    // 获取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.innerText)
      discomfortGeneralPage.symptomScoreVal = e.detail.el.innerText
      console.log(discomfortGeneralPage.symptomScoreVal)
      // 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(){
       //  获取用户填写的数据
      var ScoreVal = $('.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(ScoreVal=='') 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(){
      var crm = discomfortGeneralPage.adminId==''? '':'/crm'
      medtap.submitAjax({
        url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/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) 
          if(!res.content.followAnswer.answer) {
            return
          }
          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(){
      var crm = discomfortGeneralPage.adminId==''? '':'/crm'
      medtap.submitAjax({
        url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/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+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 15:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 16:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 17:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 18:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 19:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 20:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 21:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 22:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 23:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 24:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 25:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 26:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 27:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 28:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 29:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 30:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 31:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 32:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
            case 33:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionId='+questionId+'&questionNo='+questionNo+'&parentId='+parentId+'&backChecks='+questionId+'&adminId='+discomfortGeneralPage.adminId)
            break;
          }
        }
      })
     },
      // 提交答案获取下一题id
	  getNextQuestion:function(data,url){
      var crm = discomfortGeneralPage.adminId==''? '':'/crm'
			medtap.submitAjax({
				url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/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+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 17:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 18:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 19:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 20:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 21:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 22:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 23:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 24:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 25:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 26:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 27:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 28:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 29:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 30:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 31:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 32:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            case 33:
            medtap.pushWindow('discomfortGeneralPage.html?followUpId='+discomfortGeneralPage.followUpId+'&questionNo='+questionNo+'&questionId='+questionId+'&parentId='+parentId+'&lastChecks='+discomfortGeneralPage.lastChecks+'&adminId='+discomfortGeneralPage.adminId)  
            break;
            default:
            medtap.pushWindow('submitSuccessfully.html?adminId='+discomfortGeneralPage.adminId)
          }
				}
			})
    },
     //  最后提交问卷
     submitQuestionAnswer: function(data){
      var crm = discomfortGeneralPage.adminId==''? '':'/crm'
      medtap.submitAjax({
				url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/completeQuestion',
				type: 'post',
				async: false,
				contentType: 'application/json',
        data: data,
        success: function(res){
          console.log(res)
          medtap.pushWindow('submitSuccessfully.html?followUpId='+discomfortGeneralPage.followUpId+'&adminId='+discomfortGeneralPage.adminId)
        }
      })
     }
   }
   discomfortGeneralPage.init();
   discomfortGeneralPage.getQuestionAnswer();
  })