Преглед изворни кода

厦心修改筛查结果新需求

hd пре 1 месец
родитељ
комит
6edbad3250

+ 7 - 1
api/jbsc-api.js

@ -50,13 +50,19 @@
    },
    //		获取筛查结果
    getScreenResultDetail: function (data) {
      return httpRequest.get('doctor/screen/getScreenResultDetail', { data: data })
    },
    getYdScreenResultDetail: function (data) {
      return httpRequest.get('statistics/collaborate/getYdScreenResultDetail', { data: data })
    },
    updAscvdResult: function (data) {
      return httpRequest.post('doctor/questionnaire/updAscvdResult', { data: data })
    },
    //		获取居民健康
    getHealth: function (data) {
      return httpRequest.get('doctor/health_index/last', { data: data })
    },
    getLastYd(data){
    getLastYd(data) {
      return httpRequest.get('statistics/collaborate/lastYd', { data: data })
    },
    //		获取医生基础信息

+ 122 - 0
app/jbsc/html/changeResult.html

@ -0,0 +1,122 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>修改结果</title>
    <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
    <link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="../css/questionnaire.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/element-ui.css" />
    <style>
      .recommand {
        padding: 16px 20px;
      }
      .dialog-footer {
        display: flex;
        border-top: 1px solid #eee;
        margin: 50px 20px 0;
        padding-top: 12px;
        display: flex;
        justify-content: flex-end;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <div class="c-999 recommand">
        当前评估推荐结果为:{{result.screen_result}}。若需修改,请选择下方的“评估结果”字段进行修改。若使用当前推荐结果,请点击【使用推荐结果】按钮。
      </div>
      <el-form :model="form" label-width="100px" ref="form" :rules="rules" style="margin-top: 20px">
        <el-form-item label="评估结果" prop="screenResultScore">
          <el-select v-model="form.screenResultScore">
            <el-option v-for="el in resultList" :label="el.label" :value="el.value"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <div class="dialog-footer">
        <el-button @click="goScreeningResult">使用推荐结果({{result.screen_result}})</el-button>
        <el-button type="primary" @click="updateResult">修改评估结果</el-button>
      </div>
    </div>
    <script src="../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../js/jquery-2.2.4.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../component/common/event-bus.js"></script>
    <script src="../../../js/element-ui.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../plugins/toastr/toastr.min.js"></script>
    <script type="text/javascript" src="../../../plugins/layer/layer.min.js"></script>
    <script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="../../../api/jbsc-api.js"></script>
    <script>
      var httpData = GetRequest()
      new Vue({
        el: '#app',
        data() {
          return {
            form: {},
            resultList: [
              { label: '超高危', value: 1 },
              { label: '极高危', value: 2 },
              { label: '高危', value: 3 },
              { label: '中危', value: 4 },
              { label: '低危', value: 5 }
            ],
            rules: {
              screenResultScore: { required: true, message: '请选择评估结果' }
            },
            resultCode: httpData['resultCode'],
            result: {}
          }
        },
        methods: {
          getScreenResult() {
            var vm = this
            jbscAPI.getScreenResultDetail({ code: this.resultCode }).then(function (res) {
              console.log(res, 'res')
              vm.result = res.data.result
              for (var item of vm.resultList) {
                if (item.label == vm.result.screen_result) {
                  vm.$set(vm.form, 'screenResultScore', item.value)
                }
              }
            })
          },
          goScreeningResult() {
            top.layer.open({
              type: 2,
              //				  offset: ['100px'], //右下角弹出
              area: ['568px', '100%'],
              shade: 0.5,
              title: '查看筛选结果',
              fixed: true, //不固定
              maxmin: true,
              closeBtn: 1,
              shift: 5,
              shadeClose: false, //点击遮罩关闭层
              content: '../../jbsc/html/view_screening_results.html?resultCode=' + this.resultCode,
              end: function () {
                var index = top.layer.getFrameIndex(window.name) //先得到当前iframe层的索引
                parent.eventBuss.$emit('guan_results', index)
              }
            })
          },
          updateResult() {
            var vm = this
            jbscAPI.updAscvdResult({ screenCode: this.resultCode, screenResultScore: this.form.screenResultScore }).then(function (res) {
              vm.goScreeningResult()
            })
          }
        },
        mounted() {
          this.getScreenResult()
        }
      })
    </script>
  </body>
</html>

+ 13 - 14
app/jbsc/html/questionnaire.html

@ -176,7 +176,7 @@
                      <textarea class="wenjuan-textarea" disabled rows="2" v-model="qst.question.content"></textarea>
                    </div>
                    <div class="daan-list" v-else-if="qst.question.thirdKey != 'bmi'">
                      <textarea class="wenjuan-textarea"  @keyup="changeContent(qst.question,qst.question.content,1)" @four rows="2" v-model="qst.question.content"></textarea>
                      <textarea class="wenjuan-textarea" @keyup="changeContent(qst.question,qst.question.content,1)" @four rows="2" v-model="qst.question.content"></textarea>
                    </div>
                    <div class="daan-list" v-if="(shaowas&&qst.question.thirdKey == 'bmi')">
                      <textarea class="wenjuan-textarea" disabled rows="2" v-model="shaowas"></textarea>
@ -629,7 +629,7 @@
              }
              if (select.thirdKey == 'isCkd34') {
                vm.isCkd34 = select.thirdValue
                console.log('kkkkkkkkkkkkkkkkkkkkkkkkkk88888888888',select)
                console.log('kkkkkkkkkkkkkkkkkkkkkkkkkk88888888888', select)
              }
              if (select.thirdKey == 'hypertension') {
                vm.hypertension = select.thirdValue
@ -988,7 +988,7 @@
          },
          save: function () {
            var vm = this
            var flag=0
            var flag = 0
            if (vm.progress != 100) {
              top.layer.msg('问卷还未全部填写', { icon: 5 })
              return
@ -1006,20 +1006,18 @@
                  })
                }
                if (v.options[0].thirdValue == '1') {
     
                  vm.selectArr.forEach(function (it) {
                    if (it.thirdKey == 'ckd34'&&(typeof it.content == "undefined"||it.content =='')) {
                      flag=1
                    if (it.thirdKey == 'ckd34' && (typeof it.content == 'undefined' || it.content == '')) {
                      flag = 1
                    }
                  })
                
                }
              }
            })
            if(flag){
                    top.layer.msg('问卷还未全部填写', { icon: 5 })
                    return
                  }
            if (flag) {
              top.layer.msg('问卷还未全部填写', { icon: 5 })
              return
            }
            var loadding = top.layer.load(0, { shade: false }) //0代表加载的风格,支持0-2
            var data
@ -1057,15 +1055,16 @@
                  top.layer.open({
                    type: 2,
                    //				  offset: ['100px'], //右下角弹出
                    area: ['568px', '100%'],
                    area: ['550px', '300px'],
                    shade: 0.5,
                    title: '查看筛选结果',
                    title: '选择评估结果',
                    fixed: true, //不固定
                    maxmin: true,
                    closeBtn: 1,
                    shift: 5,
                    shadeClose: false, //点击遮罩关闭层
                    content: '../../jbsc/html/view_screening_results.html?resultCode=' + res.data,
                    // content: '../../jbsc/html/view_screening_results.html?resultCode=' + res.data,
                    content: './changeResult.html?resultCode=' + res.data,
                    end: function () {
                      var index = top.layer.getFrameIndex(window.name) //先得到当前iframe层的索引
                      parent.eventBuss.$emit('guan_results', index)

+ 9 - 5
app/jbsc/html/view_screening_results.html

@ -625,7 +625,7 @@
          docInfo: JSON.parse(window.localStorage.getItem('docInfo')),
          jiayiShow: false,
          showOpt: httpData['opt'],
          flag: httpData['flag'] || false,
          flag: httpData['flag'] || false, // flag == yd,说明是平和县医院统计跳转过来的
          messageVisible: false,
          messInfo: '',
          questionList: [],
@ -770,7 +770,13 @@
            var data = {
              code: vm.resultCode
            }
            jbscAPI.getScreenResultDetail(data).then(function (res) {
            var api
            if (this.flag == 'yd') {
              api = jbscAPI.getYdScreenResultDetail
            } else {
              api = jbscAPI.getScreenResultDetail
            }
            api(data).then(function (res) {
              top.layer.close(loadding)
              if (res.status == 200) {
                var data = res.data
@ -878,11 +884,10 @@
            var data = {
              patient: vm.userInfo.patient_code
            }
            
            if (this.flag && this.flag == 'yd') {
              // 异地医院管理情况过来的
              jbscAPI.getLastYd(data).then(function (res) {
                
                if (res.status == 200) {
                  vm.tizhongRecord =
                    _.find(res.data, function (o) {
@ -893,7 +898,6 @@
                }
                JSON.stringify(vm.tizhongRecord) !== '{}' && (vm.noTiZhong = false)
                setTimeout(function () {
                  vm.dealAction = '住院补筛'
                }, 1000)
              })

+ 250 - 214
app/statistics/js/comprehensive-query.js

@ -10,7 +10,11 @@ new Vue({
    searchStr: 1,
    end: '',
    tabledata: [], //表格数据
    levelList: [{ level: '4', areaLevel: '2' }, { level: '3', areaLevel: '3' }, { level: '2', areaLevel: '4' }], //两种搜索,地区等级对比
    levelList: [
      { level: '4', areaLevel: '2' },
      { level: '3', areaLevel: '3' },
      { level: '2', areaLevel: '4' }
    ], //两种搜索,地区等级对比
    areaLevel: '', // 2、市,3、区,4、社区,5、团队
    initareaLevel: '',
    initlevel: '',
@ -32,7 +36,7 @@ new Vue({
      label: 'label'
    },
    pickerOptions: {
      disabledDate: function(time) {
      disabledDate: function (time) {
        return time.getTime() > Date.now()
      }
    },
@ -88,7 +92,11 @@ new Vue({
      { label: '第二阶段社区医院随访进度', id: '61' },
      { label: '第二阶段三级医院随访进度及出组情况', id: '62' }
    ],
    mzfJcTabsData: [{ label: '慢阻肺患者档案', id: '63' }, { label: '服务人数配置及进度查询', id: '66' }, { label: '管理情况自助查询', id: '64' }],
    mzfJcTabsData: [
      { label: '慢阻肺患者档案', id: '63' },
      { label: '服务人数配置及进度查询', id: '66' },
      { label: '管理情况自助查询', id: '64' }
    ],
    // 慢阻肺管理情况自处查询字段列表
    copdManageSearchFilterList: [
      {
@ -252,7 +260,12 @@ new Vue({
        ]
      }
    ],
    jkjlbTabsData: [{ label: '活动举办明细', id: '95' }, { label: '居民活动报名明细', id: '96' }, { label: '居民积分明细', id: '97' }, { label: '居民红包奖励明细', id: '90' }],
    jkjlbTabsData: [
      { label: '活动举办明细', id: '95' },
      { label: '居民活动报名明细', id: '96' },
      { label: '居民积分明细', id: '97' },
      { label: '居民红包奖励明细', id: '90' }
    ],
    jkjlbList: [],
    copdFilterCheckValue: [],
    handleNodeShow: 1,
@ -348,7 +361,7 @@ new Vue({
      // {id:'5',text:'慢阻肺综合查询',show:false},
      { id: '10', text: '健康俱乐部', show: false },
      { id: '6', text: '慢阻肺统计', show: false },
      // { id: '7', text: '疾控慢阻肺监测', show: false },
      { id: '7', text: '疾控慢阻肺监测', show: false },
      { id: '8', text: '家庭病床统计', show: false },
      { id: '9', text: '冠心病统计', show: false }
    ],
@ -461,7 +474,11 @@ new Vue({
      { value: '2', label: '已完成' },
      { value: '3', label: '未回复' }
    ],
    inviteStatus1: [{ value: '', label: '全部' }, { value: '1', label: '门诊患者' }, { value: '2', label: '出院患者' }],
    inviteStatus1: [
      { value: '', label: '全部' },
      { value: '1', label: '门诊患者' },
      { value: '2', label: '出院患者' }
    ],
    recoveryList: [],
    dialogVisible: false,
    signatoryList: [],
@ -505,7 +522,10 @@ new Vue({
        id: 'xzrs,jsxzrs',
        label: '下转接收统计',
        code: '3',
        children: [{ id: 'xzrs', label: '下转人数', code: '3' }, { id: 'jsxzrs', label: '接收下转人数', code: '3' }]
        children: [
          { id: 'xzrs', label: '下转人数', code: '3' },
          { id: 'jsxzrs', label: '接收下转人数', code: '3' }
        ]
      },
      {
        id: 'v1sxrs,v2rzrs,v3rs,v4rs,v5rs,v6rs,zgrs,tlzls',
@ -544,7 +564,7 @@ new Vue({
    datatotal: 0, //总数
    loadingTwo: false,
    setDisabled: {
      disabledDate: function(time) {
      disabledDate: function (time) {
        return time.getTime() < new Date('2023', '05', '26') || time.getTime() > Date.now()
      }
    },
@ -622,7 +642,7 @@ new Vue({
    vuedals: Vuedals.Component
  },
  watch: {
    rangeCode: function(val) {
    rangeCode: function (val) {
      var vm = this
      if (vm.initlevel != 2) {
        vm.communityCode = ''
@ -630,16 +650,16 @@ new Vue({
      vm.teamCode = ''
      vm.getTreeList()
    },
    areaCode: function(val) {
    areaCode: function (val) {
      var vm = this
      vm.selChange(3)
    },
    communityCode: function(val) {
    communityCode: function (val) {
      var vm = this
      vm.selChange(5)
    },
    startTime: {
      handler: function(o) {
      handler: function (o) {
        if (!o) {
          this.list.splice(0, 1)
        }
@ -648,7 +668,7 @@ new Vue({
      immediate: true
    },
    endTime: {
      handler: function(o) {
      handler: function (o) {
        if (!o) {
          this.list.splice(0, 1)
        }
@ -657,7 +677,7 @@ new Vue({
      immediate: true
    }
  },
  mounted: function() {
  mounted: function () {
    var vm = this
    //初始化数据
    var searchStr = location.search
@ -671,7 +691,7 @@ new Vue({
    vm.getfwDictName()
    vm.getDiseaseTypeList()
    vm.height = document.body.offsetHeight - 85
    window.onresize = function() {
    window.onresize = function () {
      vm.height = document.body.offsetHeight - 85
    }
    this.s = this.startTime.format('yyyy-MM-dd')
@ -680,9 +700,9 @@ new Vue({
    for (var i = 46; i <= 99; i++) {
      this.componentId.push(i + '')
    }
    EventBus.$on('toPage', function(data) {
    EventBus.$on('toPage', function (data) {
      vm.handleNodeId = data.id
      vm.$nextTick(function() {
      vm.$nextTick(function () {
        if (vm.handleNodeId == 77) {
          vm.$refs.gxbEvaluation.getData(data)
        } else if (vm.handleNodeId == 78) {
@ -694,7 +714,7 @@ new Vue({
        }
      })
    })
    EventBus.$on('preview-person-info', function(data) {
    EventBus.$on('preview-person-info', function (data) {
      vm.$refs.personInfo.openDialog(data)
    })
  },
@ -705,18 +725,18 @@ new Vue({
  methods: {
    getfwDictName() {
      var vm = this
      statisticAPI.getDictByDictName({ name: 'health_bank_service_type' }).then(function(res) {
      statisticAPI.getDictByDictName({ name: 'health_bank_service_type' }).then(function (res) {
        vm.health_bank_service_type = res.list
      })
    },
    //获取综合查询指标
    getQuotaStr() {
      var vm = this
      statisticAPI.getDictByDictName({ name: 'jkcopd_quotaStr' }).then(function(res) {
      statisticAPI.getDictByDictName({ name: 'jkcopd_quotaStr' }).then(function (res) {
        vm.copdManageSearchFilterList = res.list
      })
    },
    startTimeChange: function(o) {
    startTimeChange: function (o) {
      if (!this.list[0] || this.list[0].type != 0) {
        this.list.unshift({
          type: '0',
@ -727,7 +747,7 @@ new Vue({
        this.list[0].label = o.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd')
      }
    },
    endTimeChange: function(o) {
    endTimeChange: function (o) {
      if (!this.list[0] || this.list[0].type != 0) {
        this.list.unshift({
          type: '0',
@ -739,27 +759,27 @@ new Vue({
      }
    },
    // 确定
    confirm: function() {
    confirm: function () {
      this.hospitalWorkStatistics()
    },
    // 选择
    change: function(val) {
    change: function (val) {
      this.list = this.list.concat(val)
    },
    // 已选
    deleteClick: function(item) {
    deleteClick: function (item) {
      if (item.id == 'time') {
        this.startTime = ''
        this.endTime = ''
        this.list.splice(0, 1)
      }
      var index = this.list.findIndex(function(v) {
      var index = this.list.findIndex(function (v) {
        return item.id == v.id
      })
      this.list.splice(index, 1)
    },
    // 取消
    cancel: function() {
    cancel: function () {
      this.startTime = new Date('2023', '05', '26')
      this.endTime = new Date()
      if (!this.list[0] || this.list[0].type != 0) {
@ -773,7 +793,7 @@ new Vue({
      }
    },
    // 导出
    exportHandle: function() {
    exportHandle: function () {
      var vm = this
      vm.loadingTwo = true
      statisticAPI
@ -784,11 +804,11 @@ new Vue({
          },
          '慢阻肺综合查询表.xls'
        )
        .then(function(res) {
        .then(function (res) {
          vm.loadingTwo = false
        })
    },
    renderTableHeader: function(h, item) {
    renderTableHeader: function (h, item) {
      var $index = item.$index
      return h('div', [
        h('span', this.diseaseHeader[$index - 1] + '  ', {
@ -818,7 +838,7 @@ new Vue({
        )
      ])
    },
    renderHeadeRexpert: function(h, item) {
    renderHeadeRexpert: function (h, item) {
      var index = item.$index
      return [
        index == '3'
@ -838,7 +858,7 @@ new Vue({
          'el-tooltip',
          {
            props: {
              content: (function() {
              content: (function () {
                return index == '3'
                  ? '发起邀请总次数'
                  : index == ''
@ -867,12 +887,12 @@ new Vue({
      ]
    },
    // 获取康复下转明细 ---  下转状态
    deorsumvergenceStatusFunction: function(name) {
    deorsumvergenceStatusFunction: function (name) {
      var vm = this
      signAPI.getDictByDictName({ name: name }).then(function(res) {
      signAPI.getDictByDictName({ name: name }).then(function (res) {
        if (res.status === 200) {
          if (name == 'rehabilitation_status') {
            res.list.forEach(function(v) {
            res.list.forEach(function (v) {
              vm.deorsumvergence.push({
                value: v.code,
                label: v.value
@ -880,7 +900,7 @@ new Vue({
            })
          }
          if (name == 'rehabilitation_hospital') {
            res.list.forEach(function(v) {
            res.list.forEach(function (v) {
              vm.rehabilitationHospital.push({
                value: v.code,
                label: v.value
@ -888,7 +908,7 @@ new Vue({
            })
          }
          if (name == 'archive_status') {
            res.list.forEach(function(v) {
            res.list.forEach(function (v) {
              vm.archiveList.push({
                value: v.code,
                label: v.value
@ -899,16 +919,16 @@ new Vue({
      })
    },
    // 获取社区医院
    hospitalsByType: function() {
    hospitalsByType: function () {
      var vm = this
      statisticAPI
        .hospitalsByType({
          type: 1,
          code: '350200'
        })
        .then(function(res) {
        .then(function (res) {
          if (res.status == 200) {
            res.list.forEach(function(v) {
            res.list.forEach(function (v) {
              vm.communityHospitals.push({
                value: v.code,
                label: v.name
@ -916,17 +936,17 @@ new Vue({
            })
          }
        })
        .catch(function(err) {
        .catch(function (err) {
          console.log(err, 'Errr')
        })
    },
    // 康复下转操作
    operation: function(num, item) {
    operation: function (num, item) {
      var vm = this
      if (num != 2) {
        statisticAPI
          .synchronizePationSingle({ id: item.id })
          .then(function(res) {
          .then(function (res) {
            if (res.status == 200) {
              toastr.info('操作成功')
              this.tableKey = Math.random()
@ -934,31 +954,31 @@ new Vue({
              toastr.error(res.msg)
            }
          })
          .catch(function(err) {
          .catch(function (err) {
            console.log(err, 'Errr')
          })
      } else {
        vm.signatoryList = []
        statisticAPI
          .kangfuGetSignInfo({ idcard: item.idcard })
          .then(function(res) {
          .then(function (res) {
            if (res.status == 200) {
              if (res.data != null) {
                vm.signatoryList.push(res.data)
              }
            }
          })
          .catch(function(err) {
          .catch(function (err) {
            console.log(err, 'Errr')
          })
        this.dialogVisible = true
      }
    },
    getImgurl: function(url) {
    getImgurl: function (url) {
      var imgUrl = url && url.split(',')[0]
      return httpRequest.getImgUrl(imgUrl)
    },
    reset: function() {
    reset: function () {
      if (this.tabsId == 1) {
        this.getTreeList()
      } else {
@ -1007,7 +1027,7 @@ new Vue({
      }
    },
    // 清除
    eliminateClick: function() {
    eliminateClick: function () {
      this.radio = this.handleNodeId == 44 || this.expertFamilyIdType == 'zhuanke1' || this.handleNodeId == 45 ? '2' : '1'
      this.radio1 = ''
      this.radio2 = ''
@ -1092,7 +1112,7 @@ new Vue({
      // initTime(this)
      // initScope(this)
    },
    tabsClick: function(item) {
    tabsClick: function (item) {
      var vm = this
      this.collectCode = ''
      this.copdFilterCheckValue = []
@ -1103,7 +1123,7 @@ new Vue({
      if (item.id == 5) {
        vm.handleNodeShow = 5
      }
      vm.tabsList.forEach(function(res) {
      vm.tabsList.forEach(function (res) {
        if (res.id == item.id) {
          res.show = true
        } else {
@ -1113,42 +1133,42 @@ new Vue({
      vm.eliminateClick()
    },
    // 获取汇总数据的专科医院
    specHosData: function() {
    specHosData: function () {
      var vm = this
      statisticAPI.getSpecialHospital().then(function(res) {
      statisticAPI.getSpecialHospital().then(function (res) {
        if (res.status == 200) {
          res.data.forEach(function(item) {
          res.data.forEach(function (item) {
            vm.specHosList.push({ code: item.code, name: item.name })
          })
        }
      })
    },
    getDiseaseTypeList: function() {
    getDiseaseTypeList: function () {
      var vm = this
      statisticAPI.getDiseaseTypeList({}).then(function(res) {
      statisticAPI.getDiseaseTypeList({}).then(function (res) {
        if (res.status == 200) {
          vm.specialCities = res.list
        }
      })
    },
    // 签约人群
    handleCheckedCitiesChange: function(value) {
    handleCheckedCitiesChange: function (value) {
      var vm = this
      vm.handleData = value
    },
    // 下转病种
    diseaseChange: function(value) {
    diseaseChange: function (value) {
      var vm = this
      vm.diseaseData = value
    },
    // 服务类型
    serviceTypeChange: function(value) {
    serviceTypeChange: function (value) {
      var vm = this
      vm.serviceTypeData = value
    },
    // 综合析树形图
    treedataClick: function(name, data) {
    treedataClick: function (name, data) {
      var vm = this
      vm.handleNodeShow = 1
      vm.handleNodeId = 0
@ -1158,7 +1178,7 @@ new Vue({
      // initScope(vm)
    },
    // 汇总树形图
    collectClick: function(data, isCheck) {
    collectClick: function (data, isCheck) {
      var vm = this
      vm.derive = data.label
@ -1167,13 +1187,13 @@ new Vue({
      vm.radio = '1' //签约年度  --创建时间
      vm.isCheck = isCheck
    },
    collCheck: function(data, name) {
    collCheck: function (data, name) {
      // console.log(arguments)
      var vm = this
      vm.diseaseReport = []
      vm.datatotal = 0
      vm.collect.forEach(function(item) {
        item.children.forEach(function(o) {
      vm.collect.forEach(function (item) {
        item.children.forEach(function (o) {
          if (o.code != data.code) {
            vm.$refs.collectTree.setChecked(o, false, true)
          }
@ -1181,7 +1201,7 @@ new Vue({
        if (data.id == item.id) {
          vm.$refs.collectTree.setChecked(item, vm.isCheck, true)
        } else {
          item.children.forEach(function(o) {
          item.children.forEach(function (o) {
            if (data.id == o.id) {
              vm.$refs.collectTree.setChecked(o, vm.isCheck, true)
            }
@ -1192,12 +1212,24 @@ new Vue({
      vm.handleNodeId = 'huizongshuju'
      vm.collectCode = data.code
      if (data.code == 1) {
        vm.rangeList = [{ name: '按区', code: 'town' }, { name: '按社区', code: 'hospital' }, { name: '按团队', code: 'team' }, { name: '按专科医院', code: 'specHos' }]
        vm.rangeList = [
          { name: '按区', code: 'town' },
          { name: '按社区', code: 'hospital' },
          { name: '按团队', code: 'team' },
          { name: '按专科医院', code: 'specHos' }
        ]
        vm.specHosData()
      } else if (data.code == 4) {
        vm.rangeList = [{ name: '按区', code: 'town' }, { name: '按社区', code: 'hospital' }]
        vm.rangeList = [
          { name: '按区', code: 'town' },
          { name: '按社区', code: 'hospital' }
        ]
      } else {
        vm.rangeList = [{ name: '按区', code: 'town' }, { name: '按社区', code: 'hospital' }, { name: '按团队', code: 'team' }]
        vm.rangeList = [
          { name: '按区', code: 'town' },
          { name: '按社区', code: 'hospital' },
          { name: '按团队', code: 'team' }
        ]
      }
    },
    // jkjlbClick(data, isCheck) {},
@ -1209,26 +1241,26 @@ new Vue({
      this.handleNodeId = data.code
      vm.handleNodeShow = 2 //  明细查询tabs为2
      vm.jkjlbTabsTree.forEach(function(item) {
        item.children.forEach(function(o) {
      vm.jkjlbTabsTree.forEach(function (item) {
        item.children.forEach(function (o) {
          if (o.code != data.code) {
            vm.$refs.collectTree.setChecked(o, false, true)
          }
        })
      })
      this.$nextTick(function() {
        vm.jkjlbList = vm.$refs.collectTree.getCheckedNodes().filter(function(item) {
      this.$nextTick(function () {
        vm.jkjlbList = vm.$refs.collectTree.getCheckedNodes().filter(function (item) {
          return item.root != true
        })
      })
    },
    // 点击明细查询树形图
    handleNodeClick: function(item, type) {
    handleNodeClick: function (item, type) {
      var vm = this
      vm.jkjlbList = []
      vm.jkjlbTabsTree.forEach(function(item) {
        item.children.forEach(function(o) {
      vm.jkjlbTabsTree.forEach(function (item) {
        item.children.forEach(function (o) {
          if (vm.$refs.collectTree) vm.$refs.collectTree.setChecked(o, false, true)
        })
      })
@ -1332,7 +1364,7 @@ new Vue({
      //   EventBus.$emit('jtbc-table-page', { type, id: item.id })
      //   console.log('家庭病床')
      // }
      vm.$nextTick(function() {
      vm.$nextTick(function () {
        if (vm.handleNodeId == 77) {
          vm.$refs.gxbEvaluation.getData()
        } else if (vm.handleNodeId == 78) {
@ -1344,14 +1376,14 @@ new Vue({
        }
      })
    },
    expertFamily: function(id) {
    expertFamily: function (id) {
      var vm = this
      if (id == '1') {
        vm.expertReplyList()
      }
    },
    // 邀请专科回复统计传参
    expertReply: function() {
    expertReply: function () {
      var vm = this
      vm.searchJsonTime = vm.beforeReq()
      return {
@ -1367,10 +1399,10 @@ new Vue({
      }
    },
    // 邀请专科回复统计列表
    expertReplyList: function() {
    expertReplyList: function () {
      var vm = this
      vm.loadingTwo = true
      statisticAPI.consultHelpCountPage(vm.expertReply()).then(function(res) {
      statisticAPI.consultHelpCountPage(vm.expertReply()).then(function (res) {
        if (res.status == 200) {
          vm.expertReplyData = res.detailModelList
          vm.datatotal = res.totalCount
@ -1379,24 +1411,24 @@ new Vue({
      })
    },
    analysFunction: function(id) {
    analysFunction: function (id) {
      var vm = this
      // idcard =  idcard.replace(/^(.{6})(?:\d+)(.{4})$/,"$1****$2")    身份证 医保卡 脱敏显示
      vm.detailFunction(id)
    },
    // 下转预约获取医生,科室
    getReservationHosAndDept: function(data) {
    getReservationHosAndDept: function (data) {
      var vm = this
      statisticAPI
        .getReservationHosAndDept({
          hospital: data ? data : '',
          type: data ? '2' : ''
        })
        .then(function(res) {
        .then(function (res) {
          if (res.status == 200) {
            if (data) {
              vm.administrativeOffice = []
              res.data.forEach(function(item) {
              res.data.forEach(function (item) {
                vm.administrativeOffice.push({
                  value: item.code,
                  label: item.name
@ -1404,7 +1436,7 @@ new Vue({
              })
            } else {
              vm.hospitalData = []
              res.data.forEach(function(item) {
              res.data.forEach(function (item) {
                vm.hospitalData.push({
                  value: item.code,
                  label: item.name
@ -1414,13 +1446,13 @@ new Vue({
          }
        })
    },
    hospitalChange: function(data) {
    hospitalChange: function (data) {
      var vm = this
      vm.getReservationHosAndDept(data)
    },
    // 咨询分析
    getConsultList: function() {
    getConsultList: function () {
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/getConsultList'
@ -1437,7 +1469,7 @@ new Vue({
          pageSize: vm.currentSize,
          page: vm.currentPage
        })
        .then(function(res) {
        .then(function (res) {
          // console.log(res,"咨询分析")
          if (res.status == 200) {
            vm.analyseData = res.data.list
@ -1451,13 +1483,13 @@ new Vue({
        })
    },
    // 签约分析
    getSignList: function() {
    getSignList: function () {
      var vm = this
      vm.lastAjax = 'statisticsExport/getSignList'
      vm.loadingTwo = true
      var handleDataList = []
      vm.serverType = ''
      vm.handleData.forEach(function(res) {
      vm.handleData.forEach(function (res) {
        handleDataList.push(res.num)
      })
      vm.serverType = handleDataList.join(',')
@ -1480,10 +1512,10 @@ new Vue({
          pageSize: vm.currentSize,
          page: vm.currentPage
        })
        .then(function(res) {
        .then(function (res) {
          // console.log(res,"签约分析")
          if (res.status == 200) {
            res.data.list.forEach(function(item) {
            res.data.list.forEach(function (item) {
              item.sscNum = item.sscNum.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2')
              item.idcardNum = item.idcardNum.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
            })
@ -1498,14 +1530,14 @@ new Vue({
        })
    },
    // 专病分析
    getSickList: function() {
    getSickList: function () {
      var vm = this
      // vm.diseaseData
      vm.lastAjax = 'statisticsExport/getSickList'
      vm.loadingTwo = true
      var handleDataList = []
      vm.diseaseDataType = ''
      vm.diseaseData.forEach(function(res) {
      vm.diseaseData.forEach(function (res) {
        handleDataList.push(res.code)
      })
      vm.diseaseDataType = handleDataList.join(',')
@ -1527,10 +1559,10 @@ new Vue({
          page: vm.currentPage,
          patientType: vm.form2.patientType
        })
        .then(function(res) {
        .then(function (res) {
          // console.log(res,"专病分析")
          if (res.status == 200) {
            res.data.list.forEach(function(item) {
            res.data.list.forEach(function (item) {
              item.sscNum = item.sscNum.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2')
              item.idcardNum = item.idcardNum.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
            })
@ -1545,7 +1577,7 @@ new Vue({
        })
    },
    // 生日祝福分析明细
    getBirthdayPatientList: function() {
    getBirthdayPatientList: function () {
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/getBirthdayPatientList'
@ -1564,10 +1596,10 @@ new Vue({
          pageSize: vm.currentSize,
          page: vm.currentPage
        })
        .then(function(res) {
        .then(function (res) {
          if (res.status == 200) {
            // console.log(res,"Sddddd")
            res.data.detailModelList.forEach(function(item) {
            res.data.detailModelList.forEach(function (item) {
              item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2')
              item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
            })
@ -1582,7 +1614,7 @@ new Vue({
        })
    },
    // 长处方分析明细
    getPrescriptionList: function() {
    getPrescriptionList: function () {
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/getPrescriptionList'
@ -1603,9 +1635,9 @@ new Vue({
          pageSize: vm.currentSize,
          page: vm.currentPage
        })
        .then(function(res) {
        .then(function (res) {
          if (res.status == 200) {
            res.data.detailModelList.forEach(function(item) {
            res.data.detailModelList.forEach(function (item) {
              // console.log(item.finish_time,"长处方分析")
              item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2')
              item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
@ -1621,13 +1653,13 @@ new Vue({
        })
    },
    // 上门服务分析明细
    getDoorServiceList: function() {
    getDoorServiceList: function () {
      var vm = this
      vm.lastAjax = ''
      vm.loadingTwo = true
      var handleDataList = []
      vm.serviceTypeDataType = 'statisticsExport/getDoorServiceList'
      vm.serviceTypeData.forEach(function(res) {
      vm.serviceTypeData.forEach(function (res) {
        handleDataList.push(res.num)
      })
      vm.serviceTypeDataType = handleDataList.join(',')
@ -1647,10 +1679,10 @@ new Vue({
          pageSize: vm.currentSize,
          page: vm.currentPage
        })
        .then(function(res) {
        .then(function (res) {
          if (res.status == 200) {
            // console.log(res,"上门服务分析明细")
            res.data.detailModelList.forEach(function(item) {
            res.data.detailModelList.forEach(function (item) {
              item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2')
              item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
            })
@ -1665,7 +1697,7 @@ new Vue({
        })
    },
    //体征数据分析传参
    getHealthParameter: function() {
    getHealthParameter: function () {
      var vm = this
      return {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
@ -1684,11 +1716,11 @@ new Vue({
      }
    },
    //体征数据分析
    physicalSignData: function() {
    physicalSignData: function () {
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/getHealthList'
      statisticAPI.getHealthList(vm.getHealthParameter()).then(function(res) {
      statisticAPI.getHealthList(vm.getHealthParameter()).then(function (res) {
        if (res.status == 200) {
          // console.log(res,"体征数据")
          vm.getHealthData = res.data.detailModelList
@ -1702,7 +1734,7 @@ new Vue({
      })
    },
    //上转预约传参
    reservationParameter: function() {
    reservationParameter: function () {
      var vm = this
      return {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
@ -1722,11 +1754,11 @@ new Vue({
      }
    },
    // 上转预约
    upTransferAppointment: function() {
    upTransferAppointment: function () {
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/getDoctorReservationList'
      statisticAPI.getDoctorReservationList(vm.reservationParameter()).then(function(res) {
      statisticAPI.getDoctorReservationList(vm.reservationParameter()).then(function (res) {
        if (res.status == 200) {
          // console.log(res,"上转预约")
          vm.reservationData = res.data.detailModelList
@ -1741,7 +1773,7 @@ new Vue({
      })
    },
    //微信绑定传参
    wexinBindingParameter: function() {
    wexinBindingParameter: function () {
      var vm = this
      return {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
@ -1757,14 +1789,14 @@ new Vue({
      }
    },
    // 微信绑定
    wechatBinding: function() {
    wechatBinding: function () {
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/getWexinBindingList'
      statisticAPI.getWexinBindingList(vm.wexinBindingParameter()).then(function(res) {
      statisticAPI.getWexinBindingList(vm.wexinBindingParameter()).then(function (res) {
        if (res.status == 200) {
          // console.log(res,"微信绑定")
          res.data.detailModelList.forEach(function(res) {
          res.data.detailModelList.forEach(function (res) {
            res.sex = res.sex == 1 ? '男' : '女'
            res.apply_date = new Date(res.apply_date).format('yyyy-MM-dd HH:mm:ss')
          })
@ -1779,7 +1811,7 @@ new Vue({
      })
    },
    // 居民积分明细传参
    residentIntegralParameter: function() {
    residentIntegralParameter: function () {
      var vm = this
      var parameter = {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
@ -1797,14 +1829,14 @@ new Vue({
      return parameter
    },
    // 居民积分明细
    residentIntegral: function() {
    residentIntegral: function () {
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/patinetIntegralAnalysis'
      statisticAPI.patinetIntegralAnalysis(vm.residentIntegralParameter()).then(function(res) {
      statisticAPI.patinetIntegralAnalysis(vm.residentIntegralParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false
          res.data.list.forEach(function(item) {
          res.data.list.forEach(function (item) {
            item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2')
            // item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/,"$1****$2")
          })
@ -1816,7 +1848,7 @@ new Vue({
        }
      })
    },
    patientFeeAnalysisParams: function() {
    patientFeeAnalysisParams: function () {
      var vm = this
      var parameter = {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
@ -1837,7 +1869,7 @@ new Vue({
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'doctor/healthBank/patientFeeAnalysis'
      statisticAPI.patientFeeAnalysis(vm.patientFeeAnalysisParams()).then(function(res) {
      statisticAPI.patientFeeAnalysis(vm.patientFeeAnalysisParams()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false
          vm.redPacketData = res.data.list
@ -1849,7 +1881,7 @@ new Vue({
      })
    },
    // 入户访视明细传参
    interviewParameter: function() {
    interviewParameter: function () {
      var vm = this
      var parameter = {
        // signYear:'2020',     //签约年度
@ -1868,11 +1900,11 @@ new Vue({
      return parameter
    },
    // 入户访视
    interview: function() {
    interview: function () {
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/findPatientFollowListByCondition'
      statisticAPI.findPatientFollowListByCondition(vm.interviewParameter()).then(function(res) {
      statisticAPI.findPatientFollowListByCondition(vm.interviewParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false
          vm.ruhuData = res.data.list
@ -1884,7 +1916,7 @@ new Vue({
      })
    },
    //邀请专科回复明细传参
    invitationDetailsParameter: function() {
    invitationDetailsParameter: function () {
      var vm = this
      vm.searchJsonTime = vm.beforeReq()
      var parameter = {
@ -1906,13 +1938,13 @@ new Vue({
      return parameter
    },
    //邀请专科回复明细列表
    invitationDetails: function() {
    invitationDetails: function () {
      var vm = this
      vm.loadingTwo = true
      statisticAPI.consultHelpDetailPage(vm.invitationDetailsParameter()).then(function(res) {
      statisticAPI.consultHelpDetailPage(vm.invitationDetailsParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false
          res.detailModelList.forEach(function(v) {
          res.detailModelList.forEach(function (v) {
            v.sex = v.sex == 1 ? '男' : '女'
          })
          vm.invitationList = res.detailModelList
@ -1925,7 +1957,7 @@ new Vue({
    },
    // 康复下转明细传参
    recoveryParameter: function() {
    recoveryParameter: function () {
      var vm = this
      vm.searchJsonTime = vm.beforeReq()
      var parameter = {
@ -1950,14 +1982,14 @@ new Vue({
      return parameter
    },
    // 康复下转
    recovery: function() {
    recovery: function () {
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'doctor/specialist/rehabilitation/rehabilitationPatientInfo'
      statisticAPI.rehabilitationPatientInfo(vm.recoveryParameter()).then(function(res) {
      statisticAPI.rehabilitationPatientInfo(vm.recoveryParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false
          res.detailModelList.forEach(function(v) {
          res.detailModelList.forEach(function (v) {
            v.sex = v.sex == 1 ? '男' : '女'
          })
          vm.recoveryList = res.detailModelList
@ -1970,7 +2002,7 @@ new Vue({
    },
    //专病汇总传参
    getSpecialParameter: function() {
    getSpecialParameter: function () {
      var vm = this
      var parameter = {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
@ -1987,13 +2019,13 @@ new Vue({
      return parameter
    },
    // 专病汇总
    getSpecialDiseaseReport: function() {
    getSpecialDiseaseReport: function () {
      var vm = this
      vm.loadingTwo = true
      statisticAPI.getSpecialDiseaseReport(vm.getSpecialParameter()).then(function(res) {
      statisticAPI.getSpecialDiseaseReport(vm.getSpecialParameter()).then(function (res) {
        if (res.status == 200) {
          vm.indicator = []
          res.data.column.forEach(function(v) {
          res.data.column.forEach(function (v) {
            if (v == 'kfxzrs') {
              vm.indicator.push('康复计划人数')
            }
@ -2021,7 +2053,7 @@ new Vue({
    },
    //体征分析传参
    getDeviceParameter: function() {
    getDeviceParameter: function () {
      var vm = this
      var parameter = {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
@ -2040,10 +2072,10 @@ new Vue({
    },
    // 体征分析数据
    getDeviceHealthReport: function() {
    getDeviceHealthReport: function () {
      var vm = this
      vm.loadingTwo = true
      statisticAPI.getDeviceHealthReport(vm.getDeviceParameter()).then(function(res) {
      statisticAPI.getDeviceHealthReport(vm.getDeviceParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false
          // console.log(res,"sss")
@ -2058,7 +2090,7 @@ new Vue({
      })
    },
    //上门汇总传参
    getDoorParameter: function() {
    getDoorParameter: function () {
      var vm = this
      var parameter = {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
@ -2076,10 +2108,10 @@ new Vue({
      return parameter
    },
    // 上门汇总
    getDoorServerOrderReport: function() {
    getDoorServerOrderReport: function () {
      var vm = this
      vm.loadingTwo = true
      statisticAPI.getDoorServerOrderReport(vm.getDoorParameter()).then(function(res) {
      statisticAPI.getDoorServerOrderReport(vm.getDoorParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false
          // console.log(res,"sss")
@ -2094,7 +2126,7 @@ new Vue({
      })
    },
    getredPackageParameter: function() {
    getredPackageParameter: function () {
      var vm = this
      var parameter = {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
@ -2111,10 +2143,10 @@ new Vue({
      return parameter
    },
    redPackageRewardStatistics: function() {
    redPackageRewardStatistics: function () {
      var vm = this
      vm.loadingTwo = true
      statisticAPI.redPackageRewardStatistics(vm.getredPackageParameter()).then(function(res) {
      statisticAPI.redPackageRewardStatistics(vm.getredPackageParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false
          vm.getDoorReport = res.data.list
@ -2128,18 +2160,18 @@ new Vue({
      })
    },
    getTreeList: function() {
    getTreeList: function () {
      var vm = this
      statisticAPI.exportTreeList({ rang: vm.rangeCode }).then(function(res) {
      statisticAPI.exportTreeList({ rang: vm.rangeCode }).then(function (res) {
        if (res.status == 200) {
          ;(vm.treedata = []), (jindex = 0)
          _.each(res.data, function(item, index) {
          _.each(res.data, function (item, index) {
            vm.treedata.push({
              id: 'p_' + jindex,
              label: index,
              children: []
            })
            _.each(item, function(citem, cindex) {
            _.each(item, function (citem, cindex) {
              vm.treedata[jindex].children.push({
                id: cindex,
                label: citem
@ -2150,7 +2182,7 @@ new Vue({
        }
      })
    },
    beforeReq: function(flag) {
    beforeReq: function (flag) {
      var vm = this,
        startDate = '',
        endDate = '',
@ -2199,7 +2231,7 @@ new Vue({
          if (!flag) {
            vm.tableHeader = []
          }
          _.each(checkTree, function(item, index) {
          _.each(checkTree, function (item, index) {
            if (!flag) {
              vm.tableHeader.push({ prop: item.label, label: item.label })
            }
@ -2223,7 +2255,7 @@ new Vue({
      return { start: startDate, end: endDate, checked: checked.join(',') }
    },
    // 查询
    searchHandle: function(status) {
    searchHandle: function (status) {
      // console.log(this.beforeReq())
      var vm = this
      vm.searchJsonTime = vm.beforeReq()
@ -2264,18 +2296,18 @@ new Vue({
        vm.detailFunction(vm.handleNodeId, status)
      }
    },
    getStatisticDataList: function() {
    getStatisticDataList: function () {
      var vm = this
      vm.isloading = true
      var params = JSON.parse(JSON.stringify(vm.searchJson))
      params.page = vm.currentPage
      statisticAPI.getStatisticDataList(params).then(function(res) {
      statisticAPI.getStatisticDataList(params).then(function (res) {
        if (res.status == 200) {
          vm.tabledata = res.data.data
          vm.datatotal = res.data.total
          if (vm.tabledata.length) {
            vm.tableHeader = []
            _.each(vm.tabledata[0], function(item, index) {
            _.each(vm.tabledata[0], function (item, index) {
              if (
                index != 'town' &&
                index != 'townName' &&
@ -2296,7 +2328,7 @@ new Vue({
      })
    },
    // 导出
    exportHandle: function() {
    exportHandle: function () {
      // var uid = JSON.parse(window.localStorage.getItem('wlyyAgentForDoc')).uid
      // var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
      // saveAs(blob, "hello world.txt");
@ -2326,7 +2358,7 @@ new Vue({
              },
              '综合查询.xls'
            )
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
              // toastr.info("导出成功")
@ -2336,7 +2368,7 @@ new Vue({
              // console.log(res)
              // FileSaver()
            })
            .catch(function(err) {
            .catch(function (err) {
              console.error(err)
            })
          // let str = httpRequest.server + 'statisticsExport/export?startDate='+searchJson.start+'&endDate='+searchJson.end+'&quotaStr='+searchJson.checked+'&range='+vm.rangeCode+'&area='+areaCode+'&hospital='+vm.communityCode+'&team='+vm.teamCode+'&timeLevel='+vm.timeLevel
@ -2359,10 +2391,10 @@ new Vue({
              },
              vm.derive + '.xls'
            )
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2397,10 +2429,10 @@ new Vue({
              },
              vm.derive + '.xls'
            )
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2430,10 +2462,10 @@ new Vue({
              },
              vm.derive + '.xls'
            )
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2462,10 +2494,10 @@ new Vue({
              },
              vm.derive + '.xls'
            )
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2495,10 +2527,10 @@ new Vue({
              },
              vm.derive + '.xls'
            )
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2529,10 +2561,10 @@ new Vue({
              },
              vm.derive + '.xls'
            )
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2545,10 +2577,10 @@ new Vue({
        if (vm.getHealthData.length != 0) {
          statisticAPI
            .exportHealthList(vm.getHealthParameter(), vm.derive + '.xls')
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2561,10 +2593,10 @@ new Vue({
        if (vm.reservationData.length != 0) {
          statisticAPI
            .exportDoctorReservationList(vm.reservationParameter(), vm.derive + '.xls')
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2577,10 +2609,10 @@ new Vue({
        if (vm.wexinBindingData.length != 0) {
          statisticAPI
            .exportWexinBindingList(vm.wexinBindingParameter(), vm.derive + '.xls')
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2593,10 +2625,10 @@ new Vue({
        if (vm.jifenData.length != 0) {
          statisticAPI
            .exPatinetIntegralAnalysis(_.assign({}, vm.residentIntegralParameter(), { pageSize: 99999 }), vm.derive + '.xls')
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2609,10 +2641,10 @@ new Vue({
        if (vm.ruhuData.length != 0) {
          statisticAPI
            .exfindPatientFollowListByCondition(vm.interviewParameter(), vm.derive + '.xls')
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2625,10 +2657,10 @@ new Vue({
        if (vm.recoveryList.length != 0) {
          statisticAPI
            .exportRehabilitationPatientInfo(vm.recoveryParameter(), vm.derive + '.xls')
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2647,10 +2679,10 @@ new Vue({
          statisticAPI
            .exportConsultHelpDetailPage(p, vm.derive + '.xls')
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2663,10 +2695,10 @@ new Vue({
        if (vm.diseaseReport.length != 0) {
          statisticAPI
            .exportSpecialDiseaseReport(vm.getSpecialParameter(), vm.derive + '.xls')
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2679,10 +2711,10 @@ new Vue({
        if (vm.getDeviceReport.length != 0) {
          statisticAPI
            .exportDeviceHealthReport(vm.getDeviceParameter(), vm.derive + '.xls')
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2695,10 +2727,10 @@ new Vue({
        if (vm.getDoorReport.length != 0) {
          statisticAPI
            .exportDoorServerOrderReport(vm.getDoorParameter(), vm.derive + '.xls')
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2711,10 +2743,10 @@ new Vue({
        if (vm.getDoorReport.length != 0) {
          statisticAPI
            .exportRedPackageRewardStatistics(vm.getredPackageParameter(), vm.derive + '.xls')
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2727,10 +2759,10 @@ new Vue({
        if (vm.expertReplyData.length != 0) {
          statisticAPI
            .exportConsultHelpCountPage(vm.expertReply(), vm.derive + '.xls')
            .then(function(res) {
            .then(function (res) {
              vm.fullscreenLoading = false
            })
            .catch(function(err) {
            .catch(function (err) {
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
@ -2740,24 +2772,24 @@ new Vue({
        }
      }
    },
    backClick: function() {
    backClick: function () {
      history.go(-1)
    },
    bindEvent: function() {
    bindEvent: function () {
      var vm = this
      //监听后退按钮的操作
      EventBus.$on('back-click', function(arg) {
      EventBus.$on('back-click', function (arg) {
        EventBus.$emit('update-statistics-time', {}) //更新统计时间
        vm.backClick()
      })
      //监听页面刷新
      EventBus.$on('refresh-click', function(arg) {
      EventBus.$on('refresh-click', function (arg) {
        EventBus.$emit('update-statistics-time', {}) //更新统计时间
        initData(vm)
      })
      $('#main').removeClass('c-hide')
    },
    detailFunction: function(id, status) {
    detailFunction: function (id, status) {
      var vm = this
      window.ajaxInsArr[vm.lastAjax] && window.ajaxInsArr[vm.lastAjax].abort()
      if (id == 33) {
@ -2810,12 +2842,12 @@ new Vue({
        vm.expertReplyList()
      }
    },
    getSpecialistHospital: function() {
    getSpecialistHospital: function () {
      var vm = this
      vm.specializedHospital = [{ value: '', label: '全部' }]
      homeAPI.getSpecialistHospital().then(function(res) {
      homeAPI.getSpecialistHospital().then(function (res) {
        if (res.status == 200) {
          res.data.forEach(function(v) {
          res.data.forEach(function (v) {
            vm.specializedHospital.push({
              value: v.code,
              label: v.name
@ -2824,14 +2856,14 @@ new Vue({
        }
      })
    },
    pullDown: function() {
    pullDown: function () {
      this.deorsumvergenceStatusFunction('archive_status') //档案状态
      this.deorsumvergenceStatusFunction('rehabilitation_status') //下转状态
      this.deorsumvergenceStatusFunction('rehabilitation_hospital') //下转医院
      this.hospitalsByType()
    },
    // 下一页  上一页
    handleCurrentChange: function(val) {
    handleCurrentChange: function (val) {
      var vm = this
      vm.currentPage = val
      if (vm.handleNodeId == 0) {
@ -2841,7 +2873,7 @@ new Vue({
      }
    },
    //获取省市区  type:区3
    getDistrict: function(type, code, name) {
    getDistrict: function (type, code, name) {
      var vm = this,
        list = [],
        param = ''
@ -2856,7 +2888,7 @@ new Vue({
        type: type,
        code: code
      }
      homeAPI.getDistrict(params).then(function(res) {
      homeAPI.getDistrict(params).then(function (res) {
        if (res.status == 200) {
          vm[param + 'List'] = list.concat(res.list)
          vm[param + 'Code'] = vm[param + 'List'][0].code
@ -2865,7 +2897,7 @@ new Vue({
        }
      })
    },
    selChange: function(type) {
    selChange: function (type) {
      var vm = this,
        name = ''
      if (type == 3) {
@ -2877,7 +2909,7 @@ new Vue({
        vm.teamListByArea()
      }
    },
    initSelOption: function(param) {
    initSelOption: function (param) {
      var vm = this
      vm[param + 'List'] = [{ code: '', name: '全部' }]
      if (param == 'team') {
@ -2885,11 +2917,11 @@ new Vue({
      }
      vm[param + 'Code'] = vm[param + 'List'][0].code || vm[param + 'List'][0].id
    },
    getCommunityHospital: function() {
    getCommunityHospital: function () {
      var vm = this,
        list = [{ code: '', name: '全部' }],
        param = 'community'
      homeAPI.getCommunityHospital({ area: vm.areaCode == '350200' ? '' : vm.areaCode }).then(function(res) {
      homeAPI.getCommunityHospital({ area: vm.areaCode == '350200' ? '' : vm.areaCode }).then(function (res) {
        if (res.status == 200) {
          vm[param + 'List'] = list.concat(res.data)
          vm[param + 'Code'] = vm[param + 'List'][0].code
@ -2898,11 +2930,11 @@ new Vue({
        }
      })
    },
    teamListByArea: function() {
    teamListByArea: function () {
      var vm = this,
        list = [{ id: '', name: '全部' }],
        param = 'team'
      homeAPI.teamListByArea({ area: vm.areaCode == '350200' ? '' : vm.areaCode, hospital: vm.communityCode }).then(function(res) {
      homeAPI.teamListByArea({ area: vm.areaCode == '350200' ? '' : vm.areaCode, hospital: vm.communityCode }).then(function (res) {
        if (res.status == 200) {
          vm[param + 'List'] = list.concat(res.data)
          vm[param + 'Code'] = vm[param + 'List'][0].id
@ -2949,7 +2981,11 @@ function initScope(vm) {
  vm.initarea = vm.area = vm.userRole.code
  vm.areaTitle = vm.userRole.name
  vm.rangeList = [{ name: '按区', code: 'town' }, { name: '按社区', code: 'hospital' }, { name: '按团队', code: 'team' }]
  vm.rangeList = [
    { name: '按区', code: 'town' },
    { name: '按社区', code: 'hospital' },
    { name: '按团队', code: 'team' }
  ]
  if (vm.initlevel == 4) {
    //市获取区