hd 3 months ago
parent
commit
5237a57136
4 changed files with 457 additions and 4 deletions
  1. 3 0
      api/jbsc-api.js
  2. 100 4
      app/jbsc/html/view_screening_results.html
  3. 346 0
      app/jbsc/js/questionList.js
  4. 8 0
      app/jbsc/js/statistics.js

+ 3 - 0
api/jbsc-api.js

@ -140,6 +140,9 @@
		},
    getSurveyMessage(data){
      return httpRequest.post('doctor/screen/getSurveyMessage',{data:data})
    },
    getDictDataByName(name){
      return httpRequest.get("common/getDictByDictName",{data:{name:name}})
    }
  }

+ 100 - 4
app/jbsc/html/view_screening_results.html

@ -381,7 +381,7 @@
      .el-dialog--center .el-dialog__body {
        text-align: center;
      }
      .wenjuan-textarea{
      .wenjuan-textarea {
        width: 240px;
      }
    </style>
@ -427,7 +427,29 @@
      </div>
      <div class="single-choice-question" v-loading="isloading">
        <div class="question-title">问卷题目</div>
        <div class="question-content">
        <div class="question-content" v-if="surveyCode == 'aa9bd609fd8b492296f6a34849b76520'">
          <div class="pt10 pb5 pr10" v-for="(item,index) in questionList" :key="item.field">
            <div class="question-name">{{index + 1}}、{{item.label}}</div>
            <div class="daan-list" v-if="item.type== 'input'">
              <textarea class="wenjuan-textarea" rows="1" v-model="answer[item.field]"></textarea>
            </div>
            <div class="daan-list" v-if="item.type =='radio'">
              <label class="label-block">
                <input type="radio" readonly="readonly"  checked="checked" value="1" />
                <i></i>
                <span v-text="answer[item.field]"></span>
              </label>
            </div>
            <div class="daan-list" v-if="item.type =='checkbox'">
              <label class="label-block" v-for="el in answer[item.field]">
                <input type="qst.questionType==1?'checked" readonly="readonly"  checked="checked" value="1" />
                <i></i>
                <span v-text="el"></span>
              </label>
            </div>
          </div>
        </div>
        <div class="question-content" v-else>
          <ul class="question-list" v-for="(qst,key,index) in answer">
            <li v-if="qst.option">
              <p class="question-name" v-html="key+'、'+qst.question.title"></p>
@ -576,6 +598,7 @@
    <script type="text/javascript" src="../../../api/jbsc-api.js"></script>
    <script src="../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/questionList.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
      var httpData = GetRequest()
      var wlyyAgent = JSON.parse(window.localStorage.getItem('wlyyAgent'))
@ -602,10 +625,34 @@
          jiayiShow: false,
          showOpt: httpData['opt'],
          messageVisible: false,
          messInfo: {}
          messInfo: {},
          questionList: [],
          dictData: [
            {
              name: 'obScreen_isMerge',
              field: 'isMerge'
            },
            {
              name: 'obScreen_eduState',
              field: 'eduState'
            },
            {
              name: 'obScreen_jobState',
              field: 'jobState'
            },
            {
              name: 'obScreen_ksDrugName1',
              field: 'ksDrugName1'
            }
          ],
          surveyCode: ""
        },
        mounted: function () {
          this.getScreenResultDetail()
          var vm = this
          this.getDictData()
          setTimeout(function(){
            vm.getScreenResultDetail()
          },200)
          this.getDoctorInfo()
        },
        methods: {
@ -696,6 +743,25 @@
            var vm = this
            vm.centerDialogVisible = true
          },
          getDictData() {
            this.questionList = questionList
            var vm = this
            this.dictData.forEach(function (item) {
              jbscAPI.getDictDataByName(item.name).then(function(res){
                var index = vm.questionList.findIndex(function (el) {
                  return el.field == item.field
                })
                vm.questionList[index].options = res.list.map(function (el) {
                  return {
                    label: el.value,
                    value: el.code
                  }
                })
                vm.$forceUpdate()
              })
            })
          },
          getScreenResultDetail: function () {
            var vm = this
            var loadding = top.layer.load(0, { shade: false }) //0代表加载的风格,支持0-2
@ -706,6 +772,9 @@
              top.layer.close(loadding)
              if (res.status == 200) {
                var data = res.data
                vm.surveyCode = data.info.template_code
                console.log(vm.surveyCode,"vm.surveyCode");
                
                vm.getScreenData = res.data
                data && ((vm.answer = data.answer), (vm.userInfo = data.info), (vm.result = data.result))
                data && data.info && data.info.code && vm.getHealth()
@ -773,6 +842,33 @@
                  }
                } else {
                }
                if (data.info.template_code == 'aa9bd609fd8b492296f6a34849b76520') {
                  vm.questionList.forEach(function (item) {
                    if (item.type == 'radio') {
                      var obj = item.options.find(function (el) {
                        return el.value == vm.answer[item.field]
                      })
                      if (obj) {
                        vm.answer[item.field] = obj.label
                      }
                    }
                    if (item.type == 'checkbox') {
                      var arr = vm.answer[item.field].split(',')
                      var answer = []
                      arr.forEach(function (el) {
                        var obj = item.options.find(function (el1) {
                          return el1.value == vm.answer[item.field]
                        })
                        if (obj) {
                          answer.push(obj.label)
                        }
                      })
                      vm.answer[item.field] = answer
                    }
                  })
                  console.log(vm.answer,"answer");
                  
                }
              } else {
                top.layer.msg(res.msg, { icon: 5 })
              }

+ 346 - 0
app/jbsc/js/questionList.js

@ -0,0 +1,346 @@
var questionList = [
  {
    label: '(第一次)大便潜血阳性(使用试剂盒化验后填写结果)',
    type: 'radio',
    options: [
      {
        label: '阴性',
        value: '1'
      },
      {
        label: '阳性',
        value: '2'
      }
    ],
    field: 'isHigh1',
    required: true
  },
  {
    label: '(第二次)大便潜血阳性(第一次检查后7天再次复查,结果更准确,非必填)',
    type: 'radio',
    options: [
      {
        label: '阴性',
        value: '1'
      },
      {
        label: '阳性',
        value: '2'
      }
    ],
    field: 'isHigh2'
  },
  {
    label: '社区名称',
    type: 'input',
    field: 'belongCommunity',
    required: true
  },
  {
    label: '医生姓名',
    type: 'input',
    field: 'doctorName',
    required: true
  },
  {
    label: '医生电话',
    type: 'input',
    field: 'doctorPhoneNo',
    required: true
  },
  {
    label: '申请单号',
    type: 'input',
    field: 'applyNo'
  },
  {
    label: '用户姓名',
    type: 'input',
    field: 'userName',
    required: true
  },
  {
    label: '证件类型',
    type: 'input',
    field: 'idNoType',
    required: true
  },
  {
    label: '身份证号',
    type: 'input',
    field: 'idNo',
    required: true
  },
  {
    label: '手机',
    type: 'input',
    field: 'phoneNo',
    required: true
  },
  {
    label: '年龄',
    type: 'input',
    field: 'age',
    required: true
  },
  {
    label: '性别',
    type: 'radio',
    field: 'sex',
    required: true,
    options: [
      {
        label: '男',
        value: '1'
      },
      {
        label: '女',
        value: '2'
      }
    ]
  },
  {
    label: '户籍省市区',
    type: 'input',
    field: 'hujiAddress',
    required: true
  },
  {
    label: '户籍街道地址',
    type: 'input',
    field: 'hujiAddressJiedao',
    required: true
  },
  {
    label: '居住省市区',
    type: 'input',
    field: 'juzhuAddress',
    required: true
  },
  {
    label: '居住街道地址',
    type: 'input',
    field: 'juzhuAddressJiedao',
    required: true
  },
  {
    label: '婚姻状况',
    type: 'radio',
    options: [],
    field: 'isMerge',
    required: true
  },
  {
    label: '文化程度',
    type: 'radio',
    options: [],
    field: 'eduState',
    required: true
  },
  {
    label: '工作状况',
    type: 'radio',
    options: [],
    field: 'jobState',
    required: true
  },
  {
    label: '服用抗栓药物',
    type: 'radio',
    options: [
      {
        label: '有',
        value: '1'
      },
      {
        label: '无',
        value: '2'
      }
    ],
    field: 'isFuyongks',
    required: true
  },
  {
    label: '抗栓药物名称',
    type: 'checkbox',
    options: [],
    field: 'ksDrugName1'
  },
  {
    label: '抗栓药物其他名称',
    type: 'input',
    field: 'ksDrugName'
  },
  {
    label: '本人有癌症史',
    type: 'radio',
    field: 'isCancerHistory',
    options: [
      {
        label: '有',
        value: '1'
      },
      {
        label: '无',
        value: '2'
      },
      {
        label: '不详',
        value: '3'
      }
    ],
    required: true
  },
  {
    label: '癌症类型或名称',
    type: 'input',
    field: 'cancerType',
    required: true
  },
  {
    label: '是否做过胃肠镜检查',
    type: 'radio',
    field: 'isEndoscopy',
    required: true,
    options: [
      {
        label: '是',
        value: '1'
      },
      {
        label: '否',
        value: '2'
      },
    ]
  },
  {
    label: '做胃肠镜检查时间',
    type: 'input',
    field: 'endoscopyTime'
  },
  {
    label: '胃肠镜检查结果',
    type: 'input',
    field: 'endoscopyResult'
  },
  {
    label: '胃肠镜检查医院',
    type: 'input',
    field: 'endoscopyHospitalName'
  },
  {
    label: '本人有无肠息肉史',
    type: 'radio',
    field: 'isCxrHistory',
    required: true,
    options: [
      {
        label: '有',
        value: '1'
      },
      {
        label: '无',
        value: '2'
      },
      {
        label: '不详',
        value: '3'
      },
    ]
  },
  {
    label: '一级亲属有结直肠癌病史(如:父母、兄弟姐妹、子女)',
    type: 'radio',
    field: 'relativeAizHistory',
    required: true,
    options: [
      {
        label: '有',
        value: '1'
      },
      {
        label: '无',
        value: '2'
      },
      {
        label: '不详',
        value: '3'
      },
    ]
  },
  {
    label: '有无以下任意2项:慢性腹泻、慢性便秘、粘液血便、慢性阑尾炎或阑尾切除史、慢性胆囊炎或胆囊切除史、长期精神压抑',
    type:'radio',
    field: 'isMangxibing',
    required: true,
    options: [
    {
        label: '有',
        value: '1'
      },
      {
        label: '无',
        value: '2'
      },
      {
        label: '不详',
        value: '3'
      },
    ]
  },
  {
    label: '填写人签名',
    type:'input',
    field: 'signName',
    required: true
  },
  {
    label: '与被筛查人关系',
    type:'input',
    field: 'relations',
    required: true
  },
  {
    label: '申请时间',
    type:'input',
    field: 'createDate',
    required: true
  },
  {
    label: '钙卫蛋白结果(如无请忽略)',
    type:'radio',
    field: 'gwdbResult',
    options: [
      {
        label: '阴性',
        value: '1'
      },
      {
        label: '阳性',
        value: '2'
      }
    ]
  },
  {
    label: '是否医技检查',
    type:'input',
    field: 'isExam',
    required: true
  },
  {
    label: '评估结果',
    type:'radio',
    field: 'screenResult',
    required: true,
    options: [
      {
        label: '阴性',
        value: '1'
      },
      {
        label: '阳性',
        value: '2'
      }
    ]
  },
]

+ 8 - 0
app/jbsc/js/statistics.js

@ -393,6 +393,9 @@ new Vue({
    search: function (page) {
      var vm = this
      vm.type = $('#Type').attr('data-id')
      if(vm.type == undefined){
        vm.type = ''
      }
      var status = $('#Status').attr('data-id')
      if (status == '5') {
        vm.status = ''
@ -406,6 +409,11 @@ new Vue({
        vm.isDanger = '1'
        vm.status = status
      }
      // if(vm.status == undefined){
      //   vm.status = ""
      // }
      // console.log(vm.status,"vm.status");
      
      vm.currentPage = page
      if (vm.docInfo.level == '1') {
        vm.getList()