瀏覽代碼

厦心静态页面

hd 1 周之前
父節點
當前提交
3dc79a695c

+ 9 - 1
app/statistics/html/comprehensive-query.html

@ -122,6 +122,15 @@
                  {{item.label}}
                </div>
              </template>
              <template v-if="tabsId == 9">
                <div
                  class="particulars"
                  v-for="(item,index) in jtbcTabsData"
                  @click="handleNodeClick(item, 8)"
                  :style="handleNodeId==item.id?'background-color: #409eff;color:#fff;':''">
                  {{item.label}}
                </div>
              </template>
              <div class="resetSelected" v-if="tabsId != 2">
                <div @click="reset">重置已选</div>
              </div>
@ -992,7 +1001,6 @@
    <script src="../js/dejdsqyysfjd.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/dejdsjyysfjdjczqk.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../component/statistics/CopdPatientRecord/index.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../component/statistics/jtbcTablePage/index.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../component/statistics/CopdPatientRecordEdit/index.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../component/statistics/CopdServiceRecord/index.js?v=1.0.0" type="text/javascript" charset="utf-8"></script>
    <script src="../../../component/statistics/HealthRecord/index.js" type="text/javascript" charset="utf-8"></script>

+ 909 - 898
app/statistics/js/comprehensive-query.js

@ -1,18 +1,17 @@
Vue.use(Vuedals.default);
Vue.use(Vuedals.default)
new Vue({
  el: '#main',
  data: {
    height: '',
    isloading: false, //加载中
    start: '',
    searchStr:1,
    searchStr: 1,
    end: '',
    tabledata: [], //表格数据
    levelList: [
      {level: '4', areaLevel: '2'},
      {level: '3', areaLevel: '3'},
      {level: '2', areaLevel: '4'}
      { level: '4', areaLevel: '2' },
      { level: '3', areaLevel: '3' },
      { level: '2', areaLevel: '4' }
    ], //两种搜索,地区等级对比
    areaLevel: '', // 2、市,3、区,4、社区,5、团队
    initareaLevel: '',
@ -28,7 +27,7 @@ new Vue({
    chooseYear: '',
    userRole: '',
    treedata: [],
    treedataExpert: [{label: '邀请专科回复统计', id: '1'}],
    treedataExpert: [{ label: '邀请专科回复统计', id: '1' }],
    tableHeader: [],
    defaultProps: {
      children: 'children',
@ -36,7 +35,7 @@ new Vue({
    },
    pickerOptions: {
      disabledDate: function (time) {
        return time.getTime() > Date.now();
        return time.getTime() > Date.now()
      }
    },
    radio: '1',
@ -49,52 +48,52 @@ new Vue({
    rangeCode: '',
    areaList: [],
    areaCode: '',
    communityList: [{code: '', name: '全部'}],
    communityList: [{ code: '', name: '全部' }],
    communityCode: '',
    teamList: [{code: '', name: '全部'}],
    teamList: [{ code: '', name: '全部' }],
    teamCode: '',
    detailInquire: [
      {
        label: '明细查询',
        children: [
          {label: '咨询分析', id: '33'},
          {label: '签约分析', id: '34'},
          {label: '专病分析', id: '35'},
          {label: '生日祝福分析', id: '36'},
          {label: '上门服务分析', id: '37'},
          {label: '长处方分析', id: '38'},
          {label: '体征数据分析', id: '39'},
          {label: '上转预约明细', id: '40'},
          {label: '专病复诊明细', id: '53'},
          {label: '微信绑定明细', id: '41'},
          {label: '居民积分明细', id: '42'},
          {label: '入户访视明细', id: '43'},
          {label: '康复下转明细', id: '44'},
          {label: '邀请专科回复明细', id: '45'}
          { label: '咨询分析', id: '33' },
          { label: '签约分析', id: '34' },
          { label: '专病分析', id: '35' },
          { label: '生日祝福分析', id: '36' },
          { label: '上门服务分析', id: '37' },
          { label: '长处方分析', id: '38' },
          { label: '体征数据分析', id: '39' },
          { label: '上转预约明细', id: '40' },
          { label: '专病复诊明细', id: '53' },
          { label: '微信绑定明细', id: '41' },
          { label: '居民积分明细', id: '42' },
          { label: '入户访视明细', id: '43' },
          { label: '康复下转明细', id: '44' },
          { label: '邀请专科回复明细', id: '45' }
        ]
      }
    ],
    mzfTabsData: [
      {label: '慢阻肺医院工作量表', id: '46'},
      {label: '慢阻肺患者查询', id: '47'},
      {label: '慢阻肺入组进度', id: '48'},
      {label: '慢阻肺入组总明细', id: '49'},
      {label: '慢阻肺随访进度', id: '50'},
      {label: '慢阻肺随访总明细', id: '51'},
      {label: 'v1入组情况报表', id: '52'},
      {label: '慢阻肺呼吸训练数据', id: '54'},
      {label: '慢阻肺手表数据', id: '55'},
      {label: '慢阻肺监查、稽查情况统计', id: '56'},
      {label: '第一阶段入组随访进度', id: '57'},
      {label: '第二阶段三级医院入组进度', id: '58'},
      {label: '第二阶段社区医院入组进度', id: '59'},
      {label: '第二阶段三级医院随访进度', id: '60'},
      {label: '第二阶段社区医院随访进度', id: '61'},
      {label: '第二阶段三级医院随访进度及出组情况', id: '62'}
      { label: '慢阻肺医院工作量表', id: '46' },
      { label: '慢阻肺患者查询', id: '47' },
      { label: '慢阻肺入组进度', id: '48' },
      { label: '慢阻肺入组总明细', id: '49' },
      { label: '慢阻肺随访进度', id: '50' },
      { label: '慢阻肺随访总明细', id: '51' },
      { label: 'v1入组情况报表', id: '52' },
      { label: '慢阻肺呼吸训练数据', id: '54' },
      { label: '慢阻肺手表数据', id: '55' },
      { label: '慢阻肺监查、稽查情况统计', id: '56' },
      { label: '第一阶段入组随访进度', id: '57' },
      { label: '第二阶段三级医院入组进度', id: '58' },
      { label: '第二阶段社区医院入组进度', id: '59' },
      { label: '第二阶段三级医院随访进度', id: '60' },
      { label: '第二阶段社区医院随访进度', id: '61' },
      { label: '第二阶段三级医院随访进度及出组情况', id: '62' }
    ],
    mzfJcTabsData: [
      {label: '慢阻肺患者档案', id: '63'},
      {label: '管理情况自助查询', id: '64'}
      { label: '慢阻肺患者档案', id: '63' },
      { label: '管理情况自助查询', id: '64' }
    ],
    // 慢阻肺管理情况自处查询字段列表
    copdManageSearchFilterList: [
@ -169,12 +168,26 @@ new Vue({
    ],
    // 家庭病床统计
    jtbcTabsData: [
      {label: '患者情况分析', id: '71'},
      {label: '建床人数统计', id: '72'},
      {label: '计划服务情况分析', id: '73'},
      {label: '病床查床情况分析', id: '74'},
      {label: '转诊与撤床情况分析', id: '75'},
      {label: '一键报警记录查询', id: '76'},
      { label: '患者情况分析', id: '71' },
      { label: '建床人数统计', id: '72' },
      { label: '计划服务情况分析', id: '73' },
      { label: '病床查床情况分析', id: '74' },
      { label: '转诊与撤床情况分析', id: '75' },
      { label: '一键报警记录查询', id: '76' }
    ],
    gxbTabsData: [
      { label: '冠心病评估情况统计表', id: '77' },
      { label: '冠心病上转情况表', id: '78' },
      { label: '冠心病门诊下转统计表', id: '79' },
      { label: '冠心病出院下转统计表', id: '80' },
      { label: '冠心病管理全流程闭环情况', id: '81' },
      { label: '签约情况统计', id: '82' },
      { label: '就诊情况统计', id: '83' },
      { label: '下转动态分析', id: '84' },
      { label: '康复随访记录', id: '85' },
      { label: '康复随访详情', id: '86' },
      { label: '康复下转明细', id: '87' },
      { label: '居民预约情况明细', id: '88' }
    ],
    copdFilterCheckValue: [],
    handleNodeShow: 1,
@ -190,29 +203,29 @@ new Vue({
    radio9: '',
    radio10: '',
    cities: [
      {value: '高血压', num: '4'},
      {value: '糖尿病', num: '5'},
      {value: '65岁以上人群', num: '3'},
      {value: '0-6岁小孩', num: '7'},
      {value: '计划生育家庭', num: '9'},
      {value: '严重精神障碍', num: '10'},
      {value: '残疾人', num: '11'},
      {value: '普通人群', num: '1'},
      {value: '结核病', num: '12'},
      {value: '低保人群', num: '8'},
      {value: '孕产妇', num: '6'}
      { value: '高血压', num: '4' },
      { value: '糖尿病', num: '5' },
      { value: '65岁以上人群', num: '3' },
      { value: '0-6岁小孩', num: '7' },
      { value: '计划生育家庭', num: '9' },
      { value: '严重精神障碍', num: '10' },
      { value: '残疾人', num: '11' },
      { value: '普通人群', num: '1' },
      { value: '结核病', num: '12' },
      { value: '低保人群', num: '8' },
      { value: '孕产妇', num: '6' }
    ],
    checkedCities: [],
    specialCities: [],
    specialCheckedCities: [],
    serveCities: [
      {value: '残疾人', num: '1'},
      {value: '失能/半失能老人', num: '5'},
      {value: '80岁以上老人', num: '7'},
      {value: '肺结核患者', num: '2'},
      {value: '计生特殊家庭', num: '3'},
      {value: '重性精神病', num: '4'},
      {value: '其他', num: '6'}
      { value: '残疾人', num: '1' },
      { value: '失能/半失能老人', num: '5' },
      { value: '80岁以上老人', num: '7' },
      { value: '肺结核患者', num: '2' },
      { value: '计生特殊家庭', num: '3' },
      { value: '重性精神病', num: '4' },
      { value: '其他', num: '6' }
    ],
    serveSpecialCities: [],
    options: [
@ -263,14 +276,15 @@ new Vue({
    fullscreenLoading: false,
    derive: '',
    tabsList: [
      {id: '1', text: '综合查询', show: true},
      {id: '2', text: '明细查询', show: false},
      {id: '3', text: '汇总数据', show: false},
      {id: '4', text: '专科综合查询', show: false},
      { id: '1', text: '综合查询', show: true },
      { id: '2', text: '明细查询', show: false },
      { id: '3', text: '汇总数据', show: false },
      { id: '4', text: '专科综合查询', show: false },
      // {id:'5',text:'慢阻肺综合查询',show:false},
      {id: '6', text: '慢阻肺统计', show: false},
      {id: '7', text: '疾控慢阻肺监测', show: false},
      {id: '8', text: '家庭病床统计', show: false}
      { id: '6', text: '慢阻肺统计', show: false },
      { id: '7', text: '疾控慢阻肺监测', show: false },
      { id: '8', text: '家庭病床统计', show: false },
      { id: '9', text: '冠心病统计', show: false }
    ],
    tabsId: '1',
    facility: '', //体征数据分析  - 设备类型
@ -327,10 +341,10 @@ new Vue({
        label: '专病汇总',
        code: '1',
        children: [
          {id: 'kfxzrs', label: '康复下转人数', code: '1'},
          {id: 'kfxzrc', label: '康复下转人次', code: '1'},
          {id: 'szrs', label: '上转人数', code: '1'},
          {id: 'szrc', label: '上转人次', code: '1'}
          { id: 'kfxzrs', label: '康复下转人数', code: '1' },
          { id: 'kfxzrc', label: '康复下转人次', code: '1' },
          { id: 'szrs', label: '上转人数', code: '1' },
          { id: 'szrc', label: '上转人次', code: '1' }
        ]
      },
      {
@ -338,17 +352,17 @@ new Vue({
        label: '体征数据汇总',
        code: '2',
        children: [
          {id: 'scsbs', label: '上传设备数', code: '2'},
          {id: 'scrc', label: '上传人次', code: '2'},
          {id: 'yctzrc', label: '异常体征人次', code: '2'},
          {id: 'gyrc', label: '干预人次', code: '2'}
          { id: 'scsbs', label: '上传设备数', code: '2' },
          { id: 'scrc', label: '上传人次', code: '2' },
          { id: 'yctzrc', label: '异常体征人次', code: '2' },
          { id: 'gyrc', label: '干预人次', code: '2' }
        ]
      },
      {
        id: 'fwgd',
        label: '上门服务汇总',
        code: '3',
        children: [{id: 'fwgd', label: '服务工单', code: '3'}]
        children: [{ id: 'fwgd', label: '服务工单', code: '3' }]
      }
    ],
    specHosName: '',
@ -366,20 +380,20 @@ new Vue({
    getDoorHeader: [],
    isCheck: false,
    deorsumvergence: [{value: '', label: '全部'}],
    rehabilitationHospital: [{value: '', label: '全部'}],
    archiveList: [{value: '', label: '全部'}],
    deorsumvergence: [{ value: '', label: '全部' }],
    rehabilitationHospital: [{ value: '', label: '全部' }],
    archiveList: [{ value: '', label: '全部' }],
    inviteStatus: [
      {value: '', label: '全部'},
      {value: '0', label: '待回复'},
      {value: '1', label: '进行中'},
      {value: '2', label: '已完成'},
      {value: '3', label: '未回复'}
      { value: '', label: '全部' },
      { value: '0', label: '待回复' },
      { value: '1', label: '进行中' },
      { value: '2', label: '已完成' },
      { value: '3', label: '未回复' }
    ],
    inviteStatus1: [
      {value: '', label: '全部'},
      {value: '1', label: '门诊患者'},
      {value: '2', label: '出院患者'}
      { value: '', label: '全部' },
      { value: '1', label: '门诊患者' },
      { value: '2', label: '出院患者' }
    ],
    recoveryList: [],
    dialogVisible: false,
@ -390,21 +404,21 @@ new Vue({
    invitationList: [],
    expertFamilyIdType: '',
    expertReplyData: [],
    specializedHospital: [{value: '', label: '全部'}],
    mzfzhcxData: [{name: '测试数据1条'}],
    specializedHospital: [{ value: '', label: '全部' }],
    mzfzhcxData: [{ name: '测试数据1条' }],
    mzftjTree: [
      {
        id: 'zhzrs,yglrs,yrzrs,ysfrs,yczrs,bnrglrs,swrs',
        label: '患者管理统计',
        code: '1',
        children: [
          {id: 'zhzrs', label: '总患者人数', code: '1'},
          {id: 'yglrs', label: '已管理人数', code: '1'},
          {id: 'yrzrs', label: '已入组人数', code: '1'},
          {id: 'ysfrs', label: '已失访人数', code: '1'},
          {id: 'yczrs', label: '已出组人数', code: '1'},
          {id: 'bnrglrs', label: '不纳入管理人数', code: '1'},
          {id: 'swrs', label: '死亡人数', code: '1'}
          { id: 'zhzrs', label: '总患者人数', code: '1' },
          { id: 'yglrs', label: '已管理人数', code: '1' },
          { id: 'yrzrs', label: '已入组人数', code: '1' },
          { id: 'ysfrs', label: '已失访人数', code: '1' },
          { id: 'yczrs', label: '已出组人数', code: '1' },
          { id: 'bnrglrs', label: '不纳入管理人数', code: '1' },
          { id: 'swrs', label: '死亡人数', code: '1' }
        ]
      },
      {
@ -412,12 +426,12 @@ new Vue({
        label: '监查稽查统计',
        code: '2',
        children: [
          {id: 'yjcrs', label: '已稽查人数', code: '2'},
          {id: 'yjccs', label: '已稽查次数', code: '2'},
          {id: 'djcrs', label: '待监查人数', code: '2'},
          {id: 'djccs', label: '待监查次数', code: '2'},
          {id: 'djcrs', label: '待稽查人数', code: '2'},
          {id: 'djccs', label: '待稽查次数', code: '2'}
          { id: 'yjcrs', label: '已稽查人数', code: '2' },
          { id: 'yjccs', label: '已稽查次数', code: '2' },
          { id: 'djcrs', label: '待监查人数', code: '2' },
          { id: 'djccs', label: '待监查次数', code: '2' },
          { id: 'djcrs', label: '待稽查人数', code: '2' },
          { id: 'djccs', label: '待稽查次数', code: '2' }
        ]
      },
      {
@ -425,8 +439,8 @@ new Vue({
        label: '下转接收统计',
        code: '3',
        children: [
          {id: 'xzrs', label: '下转人数', code: '3'},
          {id: 'jsxzrs', label: '接收下转人数', code: '3'}
          { id: 'xzrs', label: '下转人数', code: '3' },
          { id: 'jsxzrs', label: '接收下转人数', code: '3' }
        ]
      },
      {
@ -434,14 +448,14 @@ new Vue({
        label: '随访进度统计',
        code: '4',
        children: [
          {id: 'v1sxrs', label: 'v1筛选人数', code: '4'},
          {id: 'v2rzrs', label: 'v2入组人数', code: '4'},
          {id: 'v3rs', label: 'v3人数', code: '4'},
          {id: 'v4rs', label: 'v4人数', code: '4'},
          {id: 'v5rs', label: 'v5人数', code: '4'},
          {id: 'v6rs', label: 'v6人数', code: '4'},
          {id: 'zgrs', label: '在管人数', code: '4'},
          {id: 'tlzls', label: '脱落总例数', code: '4'}
          { id: 'v1sxrs', label: 'v1筛选人数', code: '4' },
          { id: 'v2rzrs', label: 'v2入组人数', code: '4' },
          { id: 'v3rs', label: 'v3人数', code: '4' },
          { id: 'v4rs', label: 'v4人数', code: '4' },
          { id: 'v5rs', label: 'v5人数', code: '4' },
          { id: 'v6rs', label: 'v6人数', code: '4' },
          { id: 'zgrs', label: '在管人数', code: '4' },
          { id: 'tlzls', label: '脱落总例数', code: '4' }
        ]
      }
    ],
@ -449,15 +463,15 @@ new Vue({
    startTime: new Date('2023', '05', '26'),
    endTime: new Date(),
    regionList: [],
    regionData: [{label: '全市', id: '1', type: '1'}],
    regionData: [{ label: '全市', id: '1', type: '1' }],
    regionListList: [],
    tertiaryHospitalsData: [{label: '全部', id: '1', type: '2'}],
    tertiaryHospitalsData: [{ label: '全部', id: '1', type: '2' }],
    communityHospitalsList: [],
    communityHospitalsData: [{label: '全部', id: '1', type: '3'}],
    communityHospitalsData: [{ label: '全部', id: '1', type: '3' }],
    groupingList: [],
    groupingData: [{label: '全部', id: '1', type: '4'}],
    groupingData: [{ label: '全部', id: '1', type: '4' }],
    administrationStatusList: [],
    administrationStatusData: [{label: '全部', id: '1', type: '5'}],
    administrationStatusData: [{ label: '全部', id: '1', type: '5' }],
    show: false,
    showTwo: false,
    showThree: false,
@ -467,7 +481,7 @@ new Vue({
    loadingTwo: false,
    setDisabled: {
      disabledDate: function (time) {
        return time.getTime() < new Date('2023', '05', '26') || time.getTime() > Date.now();
        return time.getTime() < new Date('2023', '05', '26') || time.getTime() > Date.now()
      }
    },
    s: '',
@ -538,32 +552,32 @@ new Vue({
        value: 2
      }
    ],
    componentId: ['46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','71','75','72','73','74','75','76']
    componentId: []
  },
  components: {
    vuedals: Vuedals.Component
  },
  watch: {
    rangeCode: function (val) {
      var vm = this;
      var vm = this
      if (vm.initlevel != 2) {
        vm.communityCode = '';
        vm.communityCode = ''
      }
      vm.teamCode = '';
      vm.getTreeList();
      vm.teamCode = ''
      vm.getTreeList()
    },
    areaCode: function (val) {
      var vm = this;
      vm.selChange(3);
      var vm = this
      vm.selChange(3)
    },
    communityCode: function (val) {
      var vm = this;
      vm.selChange(5);
      var vm = this
      vm.selChange(5)
    },
    'startTime': {
      handler: function (o) {
        if (!o) {
          this.list.splice(0, 1);
          this.list.splice(0, 1)
        }
      },
      deep: true,
@ -572,7 +586,7 @@ new Vue({
    'endTime': {
      handler: function (o) {
        if (!o) {
          this.list.splice(0, 1);
          this.list.splice(0, 1)
        }
      },
      deep: true,
@ -580,33 +594,36 @@ new Vue({
    }
  },
  mounted: function () {
    var vm = this;
    var vm = this
    //初始化数据
    var searchStr = location.search;
if(searchStr){
   vm.searchStr=0
   vm.tabsList=[{id: '7', text: '疾控慢阻肺监测', show: true}]
   vm.tabsClick({id: '7', text: '疾控慢阻肺监测', show: true})
}
    initData(vm);
    var searchStr = location.search
    if (searchStr) {
      vm.searchStr = 0
      vm.tabsList = [{ id: '7', text: '疾控慢阻肺监测', show: true }]
      vm.tabsClick({ id: '7', text: '疾控慢阻肺监测', show: true })
    }
    initData(vm)
    vm.getQuotaStr()
    vm.getDiseaseTypeList();
    vm.height = document.body.offsetHeight - 85;
    vm.getDiseaseTypeList()
    vm.height = document.body.offsetHeight - 85
    window.onresize = function () {
      vm.height = document.body.offsetHeight - 85;
    };
    this.s = this.startTime.format('yyyy-MM-dd');
    this.e = this.endTime.format('yyyy-MM-dd');
    this.list.unshift({type: '0', id: 'time', label: this.s + '~' + this.e});
      vm.height = document.body.offsetHeight - 85
    }
    this.s = this.startTime.format('yyyy-MM-dd')
    this.e = this.endTime.format('yyyy-MM-dd')
    this.list.unshift({ type: '0', id: 'time', label: this.s + '~' + this.e })
    for (var i = 46; i <= 88; i++) {
      this.componentId.push(i + '')
    }
  },
  methods: {
    //获取综合查询指标
    getQuotaStr(){
      var vm =this
    statisticAPI.getDictByDictName({name:'jkcopd_quotaStr'}).then(function(res){
      vm.copdManageSearchFilterList=res.list
      console.log(vm.copdManageSearchFilterList,'osidosioaidoasodais')
    })
    getQuotaStr() {
      var vm = this
      statisticAPI.getDictByDictName({ name: 'jkcopd_quotaStr' }).then(function (res) {
        vm.copdManageSearchFilterList = res.list
        console.log(vm.copdManageSearchFilterList, 'osidosioaidoasodais')
      })
    },
    startTimeChange: function (o) {
      if (!this.list[0] || this.list[0].type != 0) {
@ -614,9 +631,9 @@ if(searchStr){
          type: '0',
          id: 'time',
          label: o.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd')
        });
        })
      } else {
        this.list[0].label = o.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd');
        this.list[0].label = o.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd')
      }
    },
    endTimeChange: function (o) {
@ -625,49 +642,49 @@ if(searchStr){
          type: '0',
          id: 'time',
          label: this.startTime.format('yyyy-MM-dd') + '~' + o.format('yyyy-MM-dd')
        });
        })
      } else {
        this.list[0].label = this.startTime.format('yyyy-MM-dd') + '~' + o.format('yyyy-MM-dd');
        this.list[0].label = this.startTime.format('yyyy-MM-dd') + '~' + o.format('yyyy-MM-dd')
      }
    },
    // 确定
    confirm: function () {
      this.hospitalWorkStatistics();
      this.hospitalWorkStatistics()
    },
    // 选择
    change: function (val) {
      this.list = this.list.concat(val);
      this.list = this.list.concat(val)
    },
    // 已选
    deleteClick: function (item) {
      if (item.id == 'time') {
        this.startTime = '';
        this.endTime = '';
        this.list.splice(0, 1);
        this.startTime = ''
        this.endTime = ''
        this.list.splice(0, 1)
      }
      var index = this.list.findIndex(function (v) {
        return item.id == v.id;
      });
      this.list.splice(index, 1);
        return item.id == v.id
      })
      this.list.splice(index, 1)
    },
    // 取消
    cancel: function () {
      this.startTime = new Date('2023', '05', '26');
      this.endTime = new Date();
      this.startTime = new Date('2023', '05', '26')
      this.endTime = new Date()
      if (!this.list[0] || this.list[0].type != 0) {
        this.list.unshift({
          type: '0',
          id: 'time',
          label: this.startTime.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd')
        });
        })
      } else {
        this.list[0].label = this.startTime.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd');
        this.list[0].label = this.startTime.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd')
      }
    },
    // 导出
    exportHandle: function () {
      var vm = this;
      vm.loadingTwo = true;
      var vm = this
      vm.loadingTwo = true
      statisticAPI
        .exportHospitalWorkStatistics(
          {
@ -677,11 +694,11 @@ if(searchStr){
          '慢阻肺综合查询表.xls'
        )
        .then(function (res) {
          vm.loadingTwo = false;
        });
          vm.loadingTwo = false
        })
    },
    renderTableHeader: function (h, item) {
      var $index = item.$index;
      var $index = item.$index
      return h('div', [
        h('span', this.diseaseHeader[$index - 1] + '  ', {
          align: 'center',
@ -708,24 +725,24 @@ if(searchStr){
            })
          ]
        )
      ]);
      ])
    },
    renderHeadeRexpert: function (h, item) {
      var index = item.$index;
      var index = item.$index
      return [
        index == '3'
          ? '邀请次数'
          : index == '4'
            ? '进行中'
            : index == '5'
              ? '已回复'
              : index == '6'
                ? '未回复'
                : index == '7'
                  ? '回复率'
                  : index == '8'
                    ? '平均响应时长'
                    : '用户评价',
          ? '进行中'
          : index == '5'
          ? '已回复'
          : index == '6'
          ? '未回复'
          : index == '7'
          ? '回复率'
          : index == '8'
          ? '平均响应时长'
          : '用户评价',
        h(
          'el-tooltip',
          {
@ -734,16 +751,16 @@ if(searchStr){
                return index == '3'
                  ? '发起邀请总次数'
                  : index == ''
                    ? '其中咨询未完成,包含待回复和进行中'
                    : index == '5'
                      ? '其中医生已回复且咨询已结束的'
                      : index == '6'
                        ? '其中咨询已结束医生未回复的'
                        : index == '7'
                          ? '已回复 / 邀请次数'
                          : index == '8'
                            ? '[邀请1响应时长+ 邀请2响应时长 + ...] / 总次数'
                            : '用户评价';
                  ? '其中咨询未完成,包含待回复和进行中'
                  : index == '5'
                  ? '其中医生已回复且咨询已结束的'
                  : index == '6'
                  ? '其中咨询已结束医生未回复的'
                  : index == '7'
                  ? '已回复 / 邀请次数'
                  : index == '8'
                  ? '[邀请1响应时长+ 邀请2响应时长 + ...] / 总次数'
                  : '用户评价'
              })(),
              placement: 'top'
            }
@ -756,43 +773,43 @@ if(searchStr){
            })
          ]
        )
      ];
      ]
    },
    // 获取康复下转明细 ---  下转状态
    deorsumvergenceStatusFunction: function (name) {
      var vm = this;
      signAPI.getDictByDictName({name: name}).then(function (res) {
      var vm = this
      signAPI.getDictByDictName({ name: name }).then(function (res) {
        if (res.status === 200) {
          if (name == 'rehabilitation_status') {
            res.list.forEach(function (v) {
              vm.deorsumvergence.push({
                value: v.code,
                label: v.value
              });
            });
              })
            })
          }
          if (name == 'rehabilitation_hospital') {
            res.list.forEach(function (v) {
              vm.rehabilitationHospital.push({
                value: v.code,
                label: v.value
              });
            });
              })
            })
          }
          if (name == 'archive_status') {
            res.list.forEach(function (v) {
              vm.archiveList.push({
                value: v.code,
                label: v.value
              });
            });
              })
            })
          }
        }
      });
      })
    },
    // 获取社区医院
    hospitalsByType: function () {
      var vm = this;
      var vm = this
      statisticAPI
        .hospitalsByType({
          type: 1,
@ -804,55 +821,55 @@ if(searchStr){
              vm.communityHospitals.push({
                value: v.code,
                label: v.name
              });
            });
              })
            })
          }
        })
        .catch(function (err) {
          console.log(err, 'Errr');
        });
          console.log(err, 'Errr')
        })
    },
    // 康复下转操作
    operation: function (num, item) {
      var vm = this;
      var vm = this
      if (num != 2) {
        statisticAPI
          .synchronizePationSingle({id: item.id})
          .synchronizePationSingle({ id: item.id })
          .then(function (res) {
            if (res.status == 200) {
              toastr.info('操作成功');
              this.tableKey = Math.random();
              toastr.info('操作成功')
              this.tableKey = Math.random()
            } else {
              toastr.error(res.msg);
              toastr.error(res.msg)
            }
          })
          .catch(function (err) {
            console.log(err, 'Errr');
          });
            console.log(err, 'Errr')
          })
      } else {
        vm.signatoryList = [];
        vm.signatoryList = []
        statisticAPI
          .kangfuGetSignInfo({idcard: item.idcard})
          .kangfuGetSignInfo({ idcard: item.idcard })
          .then(function (res) {
            if (res.status == 200) {
              if (res.data != null) {
                vm.signatoryList.push(res.data);
                vm.signatoryList.push(res.data)
              }
            }
          })
          .catch(function (err) {
            console.log(err, 'Errr');
          });
        this.dialogVisible = true;
            console.log(err, 'Errr')
          })
        this.dialogVisible = true
      }
    },
    getImgurl: function (url) {
      var imgUrl=url&& url.split(',')[0]
      return httpRequest.getImgUrl(imgUrl);
      var imgUrl = url && url.split(',')[0]
      return httpRequest.getImgUrl(imgUrl)
    },
    reset: function () {
      if (this.tabsId == 1) {
        this.getTreeList();
        this.getTreeList()
      } else {
        this.collect = [
          {
@ -860,10 +877,10 @@ if(searchStr){
            label: '专病汇总',
            code: '1',
            children: [
              {id: 'kfxzrs', label: '康复下转人数', code: '1'},
              {id: 'kfxzrc', label: '康复下转人次', code: '1'},
              {id: 'szrs', label: '下转人数', code: '1'},
              {id: 'szrc', label: '下转人数', code: '1'}
              { id: 'kfxzrs', label: '康复下转人数', code: '1' },
              { id: 'kfxzrc', label: '康复下转人次', code: '1' },
              { id: 'szrs', label: '下转人数', code: '1' },
              { id: 'szrc', label: '下转人数', code: '1' }
            ]
          },
          {
@ -871,64 +888,63 @@ if(searchStr){
            label: '体征数据汇总',
            code: '2',
            children: [
              {id: 'scsbs', label: '上传设备数', code: '2'},
              {id: 'scrc', label: '上传人次', code: '2'},
              {id: 'yctzrc', label: '异常体征人次', code: '2'},
              {id: 'gyrc', label: '干预人次', code: '2'}
              { id: 'scsbs', label: '上传设备数', code: '2' },
              { id: 'scrc', label: '上传人次', code: '2' },
              { id: 'yctzrc', label: '异常体征人次', code: '2' },
              { id: 'gyrc', label: '干预人次', code: '2' }
            ]
          },
          {
            id: 'fwgd',
            label: '上门服务汇总',
            code: '3',
            children: [{id: 'fwgd', label: '服务工单', code: '3'}]
            children: [{ id: 'fwgd', label: '服务工单', code: '3' }]
          }
        ];
        ]
      }
    },
    // 清除
    eliminateClick: function () {
      this.radio =
        this.handleNodeId == 44 || this.expertFamilyIdType == 'zhuanke1' || this.handleNodeId == 45 ? '2' : '1';
      this.radio1 = '';
      this.radio2 = '';
      this.radio3 = '';
      this.radio4 = '';
      this.radio5 = '';
      this.radio6 = '';
      this.radio7 = '';
      this.radio8 = '';
      this.radio9 = '';
      this.radio10 = '';
      this.radio = this.handleNodeId == 44 || this.expertFamilyIdType == 'zhuanke1' || this.handleNodeId == 45 ? '2' : '1'
      this.radio1 = ''
      this.radio2 = ''
      this.radio3 = ''
      this.radio4 = ''
      this.radio5 = ''
      this.radio6 = ''
      this.radio7 = ''
      this.radio8 = ''
      this.radio9 = ''
      this.radio10 = ''
      this.form = {
        endorseTheTicket: '',
        renew: '',
        backToSign: '',
        WeChat: ''
      };
      }
      this.form2 = {
        juniorCollege: '',
        family: '',
        resident: ''
      };
      }
      this.form3 = {
        family: '',
        resident: ''
      };
      }
      this.form4 = {
        family: '',
        resident: ''
      };
      }
      this.form5 = {
        family: '',
        resident: ''
      };
      this.facility = ''; //体征数据分析  - 设备类型
      this.illness = ''; //体征数据分析  - 疾病类型
      }
      this.facility = '' //体征数据分析  - 设备类型
      this.illness = '' //体征数据分析  - 疾病类型
      this.form6 = {
        resident: '',
        doctor: ''
      };
      }
      this.form7 = {
        resident: '',
        doctorOne: '',
@ -946,8 +962,8 @@ if(searchStr){
        }),
        (this.form8 = {
          renew: ''
        });
      this.facilitySign = '';
        })
      this.facilitySign = ''
      this.form11 = {
        patientName: '',
        status: '',
@ -964,158 +980,158 @@ if(searchStr){
        hospital: '',
        archiveStatus: ''
      }),
        initData(this);
        initData(this)
      // initTime(this)
      // initScope(this)
    },
    tabsClick: function (item) {
      console.log(item, 'item')
      var vm = this;
      this.copdFilterCheckValue=[]
      vm.tabsId = item.id;
      var vm = this
      this.copdFilterCheckValue = []
      vm.tabsId = item.id
      if (item.id != 4) {
        vm.expertFamilyIdType = '';
        vm.expertFamilyIdType = ''
      }
      if (item.id == 5) {
        vm.handleNodeShow = 5;
        vm.handleNodeShow = 5
      }
      vm.tabsList.forEach(function (res) {
        if (res.id == item.id) {
          res.show = true;
          res.show = true
        } else {
          res.show = false;
          res.show = false
        }
      });
      vm.eliminateClick();
      })
      vm.eliminateClick()
    },
    // 获取汇总数据的专科医院
    specHosData: function () {
      var vm = this;
      var vm = this
      statisticAPI.getSpecialHospital().then(function (res) {
        if (res.status == 200) {
          res.data.forEach(function (item) {
            vm.specHosList.push({code: item.code, name: item.name});
          });
            vm.specHosList.push({ code: item.code, name: item.name })
          })
        }
      });
      })
    },
    getDiseaseTypeList: function () {
      var vm = this;
      var vm = this
      statisticAPI.getDiseaseTypeList({}).then(function (res) {
        if (res.status == 200) {
          vm.specialCities = res.list;
          vm.specialCities = res.list
        }
      });
      })
    },
    // 签约人群
    handleCheckedCitiesChange: function (value) {
      var vm = this;
      vm.handleData = value;
      var vm = this
      vm.handleData = value
    },
    // 下转病种
    diseaseChange: function (value) {
      var vm = this;
      vm.diseaseData = value;
      var vm = this
      vm.diseaseData = value
    },
    // 服务类型
    serviceTypeChange: function (value) {
      var vm = this;
      vm.serviceTypeData = value;
      var vm = this
      vm.serviceTypeData = value
    },
    // 综合析树形图
    treedataClick: function (name, data) {
      var vm = this;
      vm.handleNodeShow = 1;
      vm.handleNodeId = 0;
      vm.currentPage = 1;
      vm.radio = '1'; //签约年度  --创建时间
      var vm = this
      vm.handleNodeShow = 1
      vm.handleNodeId = 0
      vm.currentPage = 1
      vm.radio = '1' //签约年度  --创建时间
      // initTime(vm)
      // initScope(vm)
    },
    // 汇总树形图
    collectClick: function (data, isCheck) {
      var vm = this;
      vm.derive = data.label;
      vm.handleNodeShow = 3;
      vm.currentPage = 1;
      vm.radio = '1'; //签约年度  --创建时间
      vm.isCheck = isCheck;
      var vm = this
      vm.derive = data.label
      vm.handleNodeShow = 3
      vm.currentPage = 1
      vm.radio = '1' //签约年度  --创建时间
      vm.isCheck = isCheck
    },
    collCheck: function (data, name) {
      // console.log(arguments)
      var vm = this;
      vm.diseaseReport = [];
      vm.datatotal = 0;
      var vm = this
      vm.diseaseReport = []
      vm.datatotal = 0
      vm.collect.forEach(function (item) {
        item.children.forEach(function (o) {
          if (o.code != data.code) {
            vm.$refs.collectTree.setChecked(o, false, true);
            vm.$refs.collectTree.setChecked(o, false, true)
          }
        });
        })
        if (data.id == item.id) {
          vm.$refs.collectTree.setChecked(item, vm.isCheck, true);
          vm.$refs.collectTree.setChecked(item, vm.isCheck, true)
        } else {
          item.children.forEach(function (o) {
            if (data.id == o.id) {
              vm.$refs.collectTree.setChecked(o, vm.isCheck, true);
              vm.$refs.collectTree.setChecked(o, vm.isCheck, true)
            }
          });
          })
        }
      });
      })
      vm.handleNodeId = 'huizongshuju';
      vm.collectCode = data.code;
      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.specHosData();
          { name: '按区', code: 'town' },
          { name: '按社区', code: 'hospital' },
          { name: '按团队', code: 'team' },
          { name: '按专科医院', code: 'specHos' }
        ]
        vm.specHosData()
      } else {
        vm.rangeList = [
          {name: '按区', code: 'town'},
          {name: '按社区', code: 'hospital'},
          {name: '按团队', code: 'team'}
        ];
          { name: '按区', code: 'town' },
          { name: '按社区', code: 'hospital' },
          { name: '按团队', code: 'team' }
        ]
      }
    },
    // 点击明细查询树形图
    handleNodeClick: function (item, type) {
      var vm = this;
      vm.copdFilterCheckValue=[]
      vm.handleNodeId = 0;
      vm.derive = item.label;
      var vm = this
      vm.copdFilterCheckValue = []
      vm.handleNodeId = 0
      vm.derive = item.label
      // if(data.id>=33) {     //明细查询以下
      vm.handleNodeShow = 2; //  明细查询tabs为2
      vm.tableHeader = []; //  选择统计的数组
      vm.analyseData = []; //  明细查询数组
      vm.handleNodeShow = 2 //  明细查询tabs为2
      vm.tableHeader = [] //  选择统计的数组
      vm.analyseData = [] //  明细查询数组
      // }
      vm.handleNodeId = item.id; //切换后的id
      vm.radio = '1'; //签约年度  --创建时间
      vm.radio1 = ''; //咨询分析咨询状态
      vm.radio2 = '';
      vm.radio3 = '';
      vm.radio4 = '';
      vm.radio5 = '';
      vm.radio6 = '';
      vm.radio7 = '';
      vm.radio8 = '';
      vm.radio9 = '';
      vm.radio10 = '';
      vm.checkedCities = []; //签约人群清空
      vm.specialCheckedCities = []; //下转病种清空
      vm.serveSpecialCities = []; //服务类型清空
      vm.diseaseReport = [];
      vm.datatotal = 0;
      vm.handleNodeId = item.id //切换后的id
      vm.radio = '1' //签约年度  --创建时间
      vm.radio1 = '' //咨询分析咨询状态
      vm.radio2 = ''
      vm.radio3 = ''
      vm.radio4 = ''
      vm.radio5 = ''
      vm.radio6 = ''
      vm.radio7 = ''
      vm.radio8 = ''
      vm.radio9 = ''
      vm.radio10 = ''
      vm.checkedCities = [] //签约人群清空
      vm.specialCheckedCities = [] //下转病种清空
      vm.serveSpecialCities = [] //服务类型清空
      vm.diseaseReport = []
      vm.datatotal = 0
      vm.form = {
        endorseTheTicket: '',
        renew: '',
        backToSign: '',
        WeChat: ''
      };
      }
      vm.form2 = {
        juniorCollege: '',
        family: '',
@ -1136,7 +1152,7 @@ if(searchStr){
        (this.form6 = {
          resident: '',
          doctor: ''
        });
        })
      this.form7 = {
        resident: '',
        doctorOne: '',
@ -1154,7 +1170,7 @@ if(searchStr){
        }),
        (this.form8 = {
          renew: ''
        });
        })
      this.form11 = {
        patientName: '',
        status: '',
@ -1163,40 +1179,40 @@ if(searchStr){
        orgCode: '',
        doctor: '',
        archiveStatus: ''
      };
      initTime(vm); //时间初始化
      initScope(vm); //数据范围初始化
      vm.currentPage = 1;
      }
      initTime(vm) //时间初始化
      initScope(vm) //数据范围初始化
      vm.currentPage = 1
      if (type == 'zhuanke') {
        vm.handleNodeShow = 4;
        vm.radio = '2';
        vm.expertFamilyIdType = 'zhuanke' + item.id;
        vm.expertFamily(item.id);
        vm.handleNodeShow = 4
        vm.radio = '2'
        vm.expertFamilyIdType = 'zhuanke' + item.id
        vm.expertFamily(item.id)
      } else {
        vm.analysFunction(vm.handleNodeId); //明细查询列表查询
        vm.analysFunction(vm.handleNodeId) //明细查询列表查询
      }
      // 慢阻肺监测档案
      if (type == 7) {
        console.log("点击了");
        EventBus.$emit('copd-reset-select', {});
        console.log('点击了')
        EventBus.$emit('copd-reset-select', {})
      }
      // 家庭病床统计
      if (type == 8) {
        console.log(item, type, '---')
        EventBus.$emit('jtbc-table-page', {type, id: item.id});
        EventBus.$emit('jtbc-table-page', { type, id: item.id })
        console.log('家庭病床')
      }
    },
    expertFamily: function (id) {
      var vm = this;
      var vm = this
      if (id == '1') {
        vm.expertReplyList();
        vm.expertReplyList()
      }
    },
    // 邀请专科回复统计传参
    expertReply: function () {
      var vm = this;
      vm.searchJsonTime = vm.beforeReq();
      var vm = this
      vm.searchJsonTime = vm.beforeReq()
      return {
        // signYear :vm.radio=='1'?vm.chooseYear:'',     //签约年度
        team: vm.teamCode, //团队
@ -1207,29 +1223,29 @@ if(searchStr){
        endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
        pageSize: vm.currentSize,
        page: vm.currentPage
      };
      }
    },
    // 邀请专科回复统计列表
    expertReplyList: function () {
      var vm = this;
      vm.loadingTwo = true;
      var vm = this
      vm.loadingTwo = true
      statisticAPI.consultHelpCountPage(vm.expertReply()).then(function (res) {
        if (res.status == 200) {
          vm.expertReplyData = res.detailModelList;
          vm.datatotal = res.totalCount;
          vm.loadingTwo = false;
          vm.expertReplyData = res.detailModelList
          vm.datatotal = res.totalCount
          vm.loadingTwo = false
        }
      });
      })
    },
    analysFunction: function (id) {
      var vm = this;
      var vm = this
      // idcard =  idcard.replace(/^(.{6})(?:\d+)(.{4})$/,"$1****$2")    身份证 医保卡 脱敏显示
      vm.detailFunction(id);
      vm.detailFunction(id)
    },
    // 下转预约获取医生,科室
    getReservationHosAndDept: function (data) {
      var vm = this;
      var vm = this
      statisticAPI
        .getReservationHosAndDept({
          hospital: data ? data : '',
@ -1238,35 +1254,35 @@ if(searchStr){
        .then(function (res) {
          if (res.status == 200) {
            if (data) {
              vm.administrativeOffice = [];
              vm.administrativeOffice = []
              res.data.forEach(function (item) {
                vm.administrativeOffice.push({
                  value: item.code,
                  label: item.name
                });
              });
                })
              })
            } else {
              vm.hospitalData = [];
              vm.hospitalData = []
              res.data.forEach(function (item) {
                vm.hospitalData.push({
                  value: item.code,
                  label: item.name
                });
              });
                })
              })
            }
          }
        });
        })
    },
    hospitalChange: function (data) {
      var vm = this;
      vm.getReservationHosAndDept(data);
      var vm = this
      vm.getReservationHosAndDept(data)
    },
    // 咨询分析
    getConsultList: function () {
      var vm = this;
      vm.loadingTwo = true;
      vm.lastAjax = 'statisticsExport/getConsultList';
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/getConsultList'
      statisticAPI
        .getConsultList({
          year: vm.radio == '1' ? vm.chooseYear : '', //签约年度
@ -1283,27 +1299,27 @@ if(searchStr){
        .then(function (res) {
          // console.log(res,"咨询分析")
          if (res.status == 200) {
            vm.analyseData = res.data.list;
            vm.datatotal = res.data.total;
            vm.loadingTwo = false;
            vm.analyseData = res.data.list
            vm.datatotal = res.data.total
            vm.loadingTwo = false
          }
          if (res.status == -1) {
            vm.loadingTwo = false;
            vm.$message.error(res.msg);
            vm.loadingTwo = false
            vm.$message.error(res.msg)
          }
        });
        })
    },
    // 签约分析
    getSignList: function () {
      var vm = this;
      vm.lastAjax = 'statisticsExport/getSignList';
      vm.loadingTwo = true;
      var handleDataList = [];
      vm.serverType = '';
      var vm = this
      vm.lastAjax = 'statisticsExport/getSignList'
      vm.loadingTwo = true
      var handleDataList = []
      vm.serverType = ''
      vm.handleData.forEach(function (res) {
        handleDataList.push(res.num);
      });
      vm.serverType = handleDataList.join(',');
        handleDataList.push(res.num)
      })
      vm.serverType = handleDataList.join(',')
      statisticAPI
        .getSignList({
          year: vm.radio == '1' ? vm.chooseYear : '', //签约年度
@ -1327,31 +1343,31 @@ if(searchStr){
          // console.log(res,"签约分析")
          if (res.status == 200) {
            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');
            });
            vm.analyseData = res.data.list;
            vm.datatotal = res.data.total;
            vm.loadingTwo = false;
              item.sscNum = item.sscNum.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2')
              item.idcardNum = item.idcardNum.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
            })
            vm.analyseData = res.data.list
            vm.datatotal = res.data.total
            vm.loadingTwo = false
          }
          if (res.status == -1) {
            vm.loadingTwo = false;
            vm.$message.error(res.msg);
            vm.loadingTwo = false
            vm.$message.error(res.msg)
          }
        });
        })
    },
    // 专病分析
    getSickList: function () {
      var vm = this;
      var vm = this
      // vm.diseaseData
      vm.lastAjax = 'statisticsExport/getSickList';
      vm.loadingTwo = true;
      var handleDataList = [];
      vm.diseaseDataType = '';
      vm.lastAjax = 'statisticsExport/getSickList'
      vm.loadingTwo = true
      var handleDataList = []
      vm.diseaseDataType = ''
      vm.diseaseData.forEach(function (res) {
        handleDataList.push(res.code);
      });
      vm.diseaseDataType = handleDataList.join(',');
        handleDataList.push(res.code)
      })
      vm.diseaseDataType = handleDataList.join(',')
      statisticAPI
        .getSickList({
          year: vm.radio == '1' ? vm.chooseYear : '', //年度
@ -1374,24 +1390,24 @@ if(searchStr){
          // console.log(res,"专病分析")
          if (res.status == 200) {
            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');
            });
            vm.analyseData = res.data.list;
            vm.datatotal = res.data.total;
            vm.loadingTwo = false;
              item.sscNum = item.sscNum.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2')
              item.idcardNum = item.idcardNum.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
            })
            vm.analyseData = res.data.list
            vm.datatotal = res.data.total
            vm.loadingTwo = false
          }
          if (res.status == -1) {
            vm.loadingTwo = false;
            vm.$message.error(res.msg);
            vm.loadingTwo = false
            vm.$message.error(res.msg)
          }
        });
        })
    },
    // 生日祝福分析明细
    getBirthdayPatientList: function () {
      var vm = this;
      vm.loadingTwo = true;
      vm.lastAjax = 'statisticsExport/getBirthdayPatientList';
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/getBirthdayPatientList'
      statisticAPI
        .getBirthdayPatientList({
          patientName: vm.form3.resident, // 居民姓名
@ -1411,24 +1427,24 @@ if(searchStr){
          if (res.status == 200) {
            // console.log(res,"Sddddd")
            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');
            });
            vm.analyseData = res.data.detailModelList;
            vm.datatotal = res.data.total;
            vm.loadingTwo = false;
              item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2')
              item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
            })
            vm.analyseData = res.data.detailModelList
            vm.datatotal = res.data.total
            vm.loadingTwo = false
          }
          if (res.status == -1) {
            vm.loadingTwo = false;
            vm.$message.error(res.msg);
            vm.loadingTwo = false
            vm.$message.error(res.msg)
          }
        });
        })
    },
    // 长处方分析明细
    getPrescriptionList: function () {
      var vm = this;
      vm.loadingTwo = true;
      vm.lastAjax = 'statisticsExport/getPrescriptionList';
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/getPrescriptionList'
      statisticAPI
        .getPrescriptionList({
          patientName: vm.form5.resident, // 居民姓名
@ -1450,30 +1466,30 @@ if(searchStr){
          if (res.status == 200) {
            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');
            });
            vm.analyseData = res.data.detailModelList;
            vm.datatotal = res.data.total;
            vm.loadingTwo = false;
              item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2')
              item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
            })
            vm.analyseData = res.data.detailModelList
            vm.datatotal = res.data.total
            vm.loadingTwo = false
          }
          if (res.status == -1) {
            vm.loadingTwo = false;
            vm.$message.error(res.msg);
            vm.loadingTwo = false
            vm.$message.error(res.msg)
          }
        });
        })
    },
    // 上门服务分析明细
    getDoorServiceList: function () {
      var vm = this;
      vm.lastAjax = '';
      vm.loadingTwo = true;
      var handleDataList = [];
      vm.serviceTypeDataType = 'statisticsExport/getDoorServiceList';
      var vm = this
      vm.lastAjax = ''
      vm.loadingTwo = true
      var handleDataList = []
      vm.serviceTypeDataType = 'statisticsExport/getDoorServiceList'
      vm.serviceTypeData.forEach(function (res) {
        handleDataList.push(res.num);
      });
      vm.serviceTypeDataType = handleDataList.join(',');
        handleDataList.push(res.num)
      })
      vm.serviceTypeDataType = handleDataList.join(',')
      statisticAPI
        .getDoorServiceList({
          patientName: vm.form4.resident, // 居民姓名
@ -1494,22 +1510,22 @@ if(searchStr){
          if (res.status == 200) {
            // console.log(res,"上门服务分析明细")
            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');
            });
            vm.analyseData = res.data.detailModelList;
            vm.datatotal = res.data.total;
            vm.loadingTwo = false;
              item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2')
              item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
            })
            vm.analyseData = res.data.detailModelList
            vm.datatotal = res.data.total
            vm.loadingTwo = false
          }
          if (res.status == -1) {
            vm.loadingTwo = false;
            vm.$message.error(res.msg);
            vm.loadingTwo = false
            vm.$message.error(res.msg)
          }
        });
        })
    },
    //体征数据分析传参
    getHealthParameter: function () {
      var vm = this;
      var vm = this
      return {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
        team: vm.teamCode, //团队
@ -1524,29 +1540,29 @@ if(searchStr){
        serverType: vm.illness, //签约疾病类型
        pageSize: vm.currentSize,
        page: vm.currentPage
      };
      }
    },
    //体征数据分析
    physicalSignData: function () {
      var vm = this;
      vm.loadingTwo = true;
      vm.lastAjax = 'statisticsExport/getHealthList';
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/getHealthList'
      statisticAPI.getHealthList(vm.getHealthParameter()).then(function (res) {
        if (res.status == 200) {
          // console.log(res,"体征数据")
          vm.getHealthData = res.data.detailModelList;
          vm.datatotal = res.data.total;
          vm.loadingTwo = false;
          vm.getHealthData = res.data.detailModelList
          vm.datatotal = res.data.total
          vm.loadingTwo = false
        }
        if (res.status == -1) {
          vm.loadingTwo = false;
          vm.$message.error(res.msg);
          vm.loadingTwo = false
          vm.$message.error(res.msg)
        }
      });
      })
    },
    //上转预约传参
    reservationParameter: function () {
      var vm = this;
      var vm = this
      return {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
        team: vm.teamCode, //团队
@ -1562,30 +1578,30 @@ if(searchStr){
        reservationDoctorName: vm.form7.doctorTwo, //预约医生
        pageSize: vm.currentSize,
        page: vm.currentPage
      };
      }
    },
    // 上转预约
    upTransferAppointment: function () {
      var vm = this;
      vm.loadingTwo = true;
      vm.lastAjax = 'statisticsExport/getDoctorReservationList';
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/getDoctorReservationList'
      statisticAPI.getDoctorReservationList(vm.reservationParameter()).then(function (res) {
        if (res.status == 200) {
          // console.log(res,"上转预约")
          vm.reservationData = res.data.detailModelList;
          vm.datatotal = res.data.total;
          vm.loadingTwo = false;
          vm.getReservationHosAndDept();
          vm.reservationData = res.data.detailModelList
          vm.datatotal = res.data.total
          vm.loadingTwo = false
          vm.getReservationHosAndDept()
        }
        if (res.status == -1) {
          vm.loadingTwo = false;
          vm.$message.error(res.msg);
          vm.loadingTwo = false
          vm.$message.error(res.msg)
        }
      });
      })
    },
    //微信绑定传参
    wexinBindingParameter: function () {
      var vm = this;
      var vm = this
      return {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
        team: vm.teamCode, //团队
@ -1597,33 +1613,33 @@ if(searchStr){
        binging: vm.form8.renew, //是否绑定微信
        pageSize: vm.currentSize,
        page: vm.currentPage
      };
      }
    },
    // 微信绑定
    wechatBinding: function () {
      var vm = this;
      vm.loadingTwo = true;
      vm.lastAjax = 'statisticsExport/getWexinBindingList';
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/getWexinBindingList'
      statisticAPI.getWexinBindingList(vm.wexinBindingParameter()).then(function (res) {
        if (res.status == 200) {
          // console.log(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');
          });
          vm.wexinBindingData = res.data.detailModelList;
          vm.datatotal = res.data.total;
          vm.loadingTwo = false;
            res.sex = res.sex == 1 ? '男' : '女'
            res.apply_date = new Date(res.apply_date).format('yyyy-MM-dd HH:mm:ss')
          })
          vm.wexinBindingData = res.data.detailModelList
          vm.datatotal = res.data.total
          vm.loadingTwo = false
        }
        if (res.status == -1) {
          vm.loadingTwo = false;
          vm.$message.error(res.msg);
          vm.loadingTwo = false
          vm.$message.error(res.msg)
        }
      });
      })
    },
    // 居民积分明细传参
    residentIntegralParameter: function () {
      var vm = this;
      var vm = this
      var parameter = {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
        team: vm.teamCode, //团队
@ -1636,32 +1652,32 @@ if(searchStr){
        page: vm.currentPage,
        patientName: vm.form9.resident || '',
        doctorName: vm.form9.doctorTwo || ''
      };
      return parameter;
      }
      return parameter
    },
    // 居民积分明细
    residentIntegral: function () {
      var vm = this;
      vm.loadingTwo = true;
      vm.lastAjax = 'statisticsExport/patinetIntegralAnalysis';
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/patinetIntegralAnalysis'
      statisticAPI.patinetIntegralAnalysis(vm.residentIntegralParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false;
          vm.loadingTwo = false
          res.data.list.forEach(function (item) {
            item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
            item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2')
            // item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/,"$1****$2")
          });
          vm.jifenData = res.data.list;
          vm.datatotal = res.data.total;
          })
          vm.jifenData = res.data.list
          vm.datatotal = res.data.total
        } else {
          vm.loadingTwo = false;
          vm.$message.error(res.msg);
          vm.loadingTwo = false
          vm.$message.error(res.msg)
        }
      });
      })
    },
    // 入户访视明细传参
    interviewParameter: function () {
      var vm = this;
      var vm = this
      var parameter = {
        // signYear:'2020',     //签约年度
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
@ -1675,29 +1691,29 @@ if(searchStr){
        page: vm.currentPage,
        patientName: vm.form10.resident || '',
        doctorName: vm.form10.doctorTwo || ''
      };
      return parameter;
      }
      return parameter
    },
    // 入户访视
    interview: function () {
      var vm = this;
      vm.loadingTwo = true;
      vm.lastAjax = 'statisticsExport/findPatientFollowListByCondition';
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'statisticsExport/findPatientFollowListByCondition'
      statisticAPI.findPatientFollowListByCondition(vm.interviewParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false;
          vm.ruhuData = res.data.list;
          vm.datatotal = res.data.total;
          vm.loadingTwo = false
          vm.ruhuData = res.data.list
          vm.datatotal = res.data.total
        } else {
          vm.loadingTwo = false;
          vm.$message.error(res.msg);
          vm.loadingTwo = false
          vm.$message.error(res.msg)
        }
      });
      })
    },
    //邀请专科回复明细传参
    invitationDetailsParameter: function () {
      var vm = this;
      vm.searchJsonTime = vm.beforeReq();
      var vm = this
      vm.searchJsonTime = vm.beforeReq()
      var parameter = {
        patientName: vm.form12.patientName,
        name: '',
@ -1713,32 +1729,32 @@ if(searchStr){
        hospital: vm.communityCode, //医院
        pageSize: vm.currentSize,
        page: vm.currentPage
      };
      return parameter;
      }
      return parameter
    },
    //邀请专科回复明细列表
    invitationDetails: function () {
      var vm = this;
      vm.loadingTwo = true;
      var vm = this
      vm.loadingTwo = true
      statisticAPI.consultHelpDetailPage(vm.invitationDetailsParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false;
          vm.loadingTwo = false
          res.detailModelList.forEach(function (v) {
            v.sex = v.sex == 1 ? '男' : '女';
          });
          vm.invitationList = res.detailModelList;
          vm.datatotal = res.totalCount;
            v.sex = v.sex == 1 ? '男' : '女'
          })
          vm.invitationList = res.detailModelList
          vm.datatotal = res.totalCount
        } else {
          vm.loadingTwo = false;
          vm.$message.error(res.msg);
          vm.loadingTwo = false
          vm.$message.error(res.msg)
        }
      });
      })
    },
    // 康复下转明细传参
    recoveryParameter: function () {
      var vm = this;
      vm.searchJsonTime = vm.beforeReq();
      var vm = this
      vm.searchJsonTime = vm.beforeReq()
      var parameter = {
        // signYear:vm.radio=='1'?vm.chooseYear:'',     //签约年度
        // team:vm.teamCode,     //团队
@ -1757,32 +1773,32 @@ if(searchStr){
        doctor: vm.form11.doctor,
        archiveStatus: vm.form11.archiveStatus,
        patientType: vm.form11.patientType
      };
      return parameter;
      }
      return parameter
    },
    // 康复下转
    recovery: function () {
      var vm = this;
      vm.loadingTwo = true;
      vm.lastAjax = 'doctor/specialist/rehabilitation/rehabilitationPatientInfo';
      var vm = this
      vm.loadingTwo = true
      vm.lastAjax = 'doctor/specialist/rehabilitation/rehabilitationPatientInfo'
      statisticAPI.rehabilitationPatientInfo(vm.recoveryParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false;
          vm.loadingTwo = false
          res.detailModelList.forEach(function (v) {
            v.sex = v.sex == 1 ? '男' : '女';
          });
          vm.recoveryList = res.detailModelList;
          vm.datatotal = res.totalCount;
            v.sex = v.sex == 1 ? '男' : '女'
          })
          vm.recoveryList = res.detailModelList
          vm.datatotal = res.totalCount
        } else {
          vm.loadingTwo = false;
          vm.$message.error(res.msg);
          vm.loadingTwo = false
          vm.$message.error(res.msg)
        }
      });
      })
    },
    //专病汇总传参
    getSpecialParameter: function () {
      var vm = this;
      var vm = this
      var parameter = {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
        team: vm.teamCode, //团队
@ -1794,46 +1810,46 @@ if(searchStr){
        menu: vm.beforeReq().checked
        // pageSize:vm.currentSize,
        // page:vm.currentPage,
      };
      return parameter;
      }
      return parameter
    },
    // 专病汇总
    getSpecialDiseaseReport: function () {
      var vm = this;
      vm.loadingTwo = true;
      var vm = this
      vm.loadingTwo = true
      statisticAPI.getSpecialDiseaseReport(vm.getSpecialParameter()).then(function (res) {
        if (res.status == 200) {
          vm.indicator = [];
          vm.indicator = []
          res.data.column.forEach(function (v) {
            if (v == 'kfxzrs') {
              vm.indicator.push('康复计划人数');
              vm.indicator.push('康复计划人数')
            }
            if (v == 'kfxzrc') {
              vm.indicator.push('康复计划数');
              vm.indicator.push('康复计划数')
            }
            if (v == 'szrs') {
              vm.indicator.push('预约挂号人数');
              vm.indicator.push('预约挂号人数')
            }
            if (v == 'szrc') {
              vm.indicator.push('预约挂号数');
              vm.indicator.push('预约挂号数')
            }
          });
          vm.loadingTwo = false;
          vm.diseaseReport = res.data.list;
          vm.diseaseColumn = res.data.column;
          })
          vm.loadingTwo = false
          vm.diseaseReport = res.data.list
          vm.diseaseColumn = res.data.column
          // '康复计划人数','康复计划数','预约挂号人数','预约挂号数'
          vm.diseaseHeader = res.data.header;
          vm.datatotal = res.data.list.length;
          vm.diseaseHeader = res.data.header
          vm.datatotal = res.data.list.length
        } else {
          vm.loadingTwo = false;
          vm.$message.error(res.msg);
          vm.loadingTwo = false
          vm.$message.error(res.msg)
        }
      });
      })
    },
    //体征分析传参
    getDeviceParameter: function () {
      var vm = this;
      var vm = this
      var parameter = {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
        team: vm.teamCode, //团队
@ -1846,31 +1862,31 @@ if(searchStr){
        menu: vm.beforeReq().checked
        // pageSize:vm.currentSize,
        // page:vm.currentPage,
      };
      return parameter;
      }
      return parameter
    },
    // 体征分析数据
    getDeviceHealthReport: function () {
      var vm = this;
      vm.loadingTwo = true;
      var vm = this
      vm.loadingTwo = true
      statisticAPI.getDeviceHealthReport(vm.getDeviceParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false;
          vm.loadingTwo = false
          // console.log(res,"sss")
          vm.getDeviceReport = res.data.list;
          vm.getDeviceColumn = res.data.column;
          vm.getDeviceHeader = res.data.header;
          vm.datatotal = res.data.list.length;
          vm.getDeviceReport = res.data.list
          vm.getDeviceColumn = res.data.column
          vm.getDeviceHeader = res.data.header
          vm.datatotal = res.data.list.length
        } else {
          vm.loadingTwo = false;
          vm.$message.error(res.msg);
          vm.loadingTwo = false
          vm.$message.error(res.msg)
        }
      });
      })
    },
    //上门汇总传参
    getDoorParameter: function () {
      var vm = this;
      var vm = this
      var parameter = {
        signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
        team: vm.teamCode, //团队
@ -1883,133 +1899,133 @@ if(searchStr){
        menu: vm.beforeReq().checked
        // pageSize:vm.currentSize,
        // page:vm.currentPage,
      };
      return parameter;
      }
      return parameter
    },
    // 上门汇总
    getDoorServerOrderReport: function () {
      var vm = this;
      vm.loadingTwo = true;
      var vm = this
      vm.loadingTwo = true
      statisticAPI.getDoorServerOrderReport(vm.getDoorParameter()).then(function (res) {
        if (res.status == 200) {
          vm.loadingTwo = false;
          vm.loadingTwo = false
          // console.log(res,"sss")
          vm.getDoorReport = res.data.list;
          vm.getDoorColumn = res.data.column;
          vm.getDoorHeader = res.data.header;
          vm.datatotal = res.data.list.length;
          vm.getDoorReport = res.data.list
          vm.getDoorColumn = res.data.column
          vm.getDoorHeader = res.data.header
          vm.datatotal = res.data.list.length
        } else {
          vm.loadingTwo = false;
          vm.$message.error(res.msg);
          vm.loadingTwo = false
          vm.$message.error(res.msg)
        }
      });
      })
    },
    getTreeList: function () {
      var vm = this;
      statisticAPI.exportTreeList({rang: vm.rangeCode}).then(function (res) {
      var vm = this
      statisticAPI.exportTreeList({ rang: vm.rangeCode }).then(function (res) {
        if (res.status == 200) {
          console.log(res, 'Sddd')
          ;(vm.treedata = []), (jindex = 0);
          ;(vm.treedata = []), (jindex = 0)
          _.each(res.data, function (item, index) {
            vm.treedata.push({
              id: 'p_' + jindex,
              label: index,
              children: []
            });
            })
            _.each(item, function (citem, cindex) {
              vm.treedata[jindex].children.push({
                id: cindex,
                label: citem
              });
            });
            jindex++;
          });
              })
            })
            jindex++
          })
        }
      });
      })
    },
    beforeReq: function (flag) {
      var vm = this,
        startDate = '',
        endDate = '',
        checked = [];
        checked = []
      if (vm.radio == '1') {
        if (vm.chooseYear == 2022) {
          startDate = '2022-07-01';
          endDate = '2022-12-31';
          startDate = '2022-07-01'
          endDate = '2022-12-31'
        } else if (vm.chooseYear > 2022) {
          startDate = vm.chooseYear + '-01-01';
          endDate = getEndDate(vm.chooseYear);
          startDate = vm.chooseYear + '-01-01'
          endDate = getEndDate(vm.chooseYear)
        } else {
          startDate = getStartDate(vm.chooseYear);
          endDate = getEndDate(vm.chooseYear);
          startDate = getStartDate(vm.chooseYear)
          endDate = getEndDate(vm.chooseYear)
        }
        vm.timeLevel = 2;
        vm.timeLevel = 2
      } else {
        if (!vm.start && !vm.end) {
          this.$message({
            message: '请选择创建时间',
            type: 'warning'
          });
          return false;
          })
          return false
        } else {
          if (vm.start > vm.end) {
            this.$message({
              message: '开始时间应早于结束时间',
              type: 'warning'
            });
            return false;
            })
            return false
          } else {
            startDate = vm.start;
            endDate = vm.end;
            vm.timeLevel = 1;
            startDate = vm.start
            endDate = vm.end
            vm.timeLevel = 1
          }
        }
      }
      if (vm.handleNodeId == 0 || vm.handleNodeId == 'huizongshuju') {
        var checkTree;
        var checkTree
        if (vm.tabsId == 1) {
          checkTree = vm.$refs.tree.getCheckedNodes(true);
          checkTree = vm.$refs.tree.getCheckedNodes(true)
        } else {
          checkTree = vm.$refs.collectTree.getCheckedNodes(true);
          checkTree = vm.$refs.collectTree.getCheckedNodes(true)
        }
        if (checkTree.length) {
          if (!flag) {
            vm.tableHeader = [];
            vm.tableHeader = []
          }
          _.each(checkTree, function (item, index) {
            if (!flag) {
              vm.tableHeader.push({prop: item.label, label: item.label});
              vm.tableHeader.push({ prop: item.label, label: item.label })
            }
            checked.push(item.id);
          });
            checked.push(item.id)
          })
        } else {
          this.$message({
            message: '请选择搜索指标!',
            type: 'warning'
          });
          return false;
          })
          return false
        }
      } else if (vm.handleNodeId == 2) {
        this.$message({
          message: '请选择明细查询!',
          type: 'warning'
        });
        return false;
        })
        return false
      }
      return {start: startDate, end: endDate, checked: checked.join(',')};
      return { start: startDate, end: endDate, checked: checked.join(',') }
    },
    // 查询
    searchHandle: function (status) {
      // console.log(this.beforeReq())
      var vm = this;
      vm.searchJsonTime = vm.beforeReq();
      vm.currentPage = 1;
      var vm = this
      vm.searchJsonTime = vm.beforeReq()
      vm.currentPage = 1
      if (this.radio1 == 1) {
        this.radio1Show = true;
        this.radio1Show = true
      } else {
        this.radio1Show = false;
        this.radio1Show = false
      }
      if (vm.handleNodeId == 0) {
        if (vm.searchJsonTime) {
@ -2024,33 +2040,33 @@ if(searchStr){
            size: vm.currentSize,
            page: vm.currentPage,
            timeLevel: vm.timeLevel
          };
          vm.getStatisticDataList();
          }
          vm.getStatisticDataList()
        }
      } else if (vm.collectCode == 1) {
        // 专病汇总
        vm.getSpecialDiseaseReport();
        vm.getSpecialDiseaseReport()
      } else if (vm.collectCode == 2) {
        // 体征数据汇总
        vm.getDeviceHealthReport();
        vm.getDeviceHealthReport()
      } else if (vm.collectCode == 3) {
        // 上门服务汇总
        vm.getDoorServerOrderReport();
        vm.getDoorServerOrderReport()
      } else {
        vm.detailFunction(vm.handleNodeId, status);
        vm.detailFunction(vm.handleNodeId, status)
      }
    },
    getStatisticDataList: function () {
      var vm = this;
      vm.isloading = true;
      var params = JSON.parse(JSON.stringify(vm.searchJson));
      params.page = vm.currentPage;
      var vm = this
      vm.isloading = true
      var params = JSON.parse(JSON.stringify(vm.searchJson))
      params.page = vm.currentPage
      statisticAPI.getStatisticDataList(params).then(function (res) {
        if (res.status == 200) {
          vm.tabledata = res.data.data;
          vm.datatotal = res.data.total;
          vm.tabledata = res.data.data
          vm.datatotal = res.data.total
          if (vm.tabledata.length) {
            vm.tableHeader = [];
            vm.tableHeader = []
            _.each(vm.tabledata[0], function (item, index) {
              if (
                index != 'town' &&
@ -2062,14 +2078,14 @@ if(searchStr){
                index != 'code' &&
                index != 'name'
              )
                vm.tableHeader.push({prop: index, label: index});
            });
                vm.tableHeader.push({ prop: index, label: index })
            })
          }
        } else {
          vm.$message.error(res.msg);
          vm.$message.error(res.msg)
        }
        vm.isloading = false;
      });
        vm.isloading = false
      })
    },
    // 导出
    exportHandle: function () {
@ -2077,15 +2093,15 @@ if(searchStr){
      // var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
      // saveAs(blob, "hello world.txt");
      // return
      var vm = this;
      var vm = this
      var vm = this,
        searchJson = undefined;
      vm.fullscreenLoading = true;
      searchJson = vm.beforeReq('export');
      var areaCode = vm.areaCode == '350200' ? '' : vm.areaCode;
      var chooseYear = vm.radio == '1' ? vm.chooseYear : ''; //年份
      var startDate = vm.radio == '2' ? vm.searchJsonTime.start : '';
      var endDate = vm.radio == '2' ? vm.searchJsonTime.end : '';
        searchJson = undefined
      vm.fullscreenLoading = true
      searchJson = vm.beforeReq('export')
      var areaCode = vm.areaCode == '350200' ? '' : vm.areaCode
      var chooseYear = vm.radio == '1' ? vm.chooseYear : '' //年份
      var startDate = vm.radio == '2' ? vm.searchJsonTime.start : ''
      var endDate = vm.radio == '2' ? vm.searchJsonTime.end : ''
      if (vm.handleNodeId == 0) {
        if (searchJson) {
          statisticAPI
@ -2103,7 +2119,7 @@ if(searchStr){
              '综合查询.xls'
            )
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
              // toastr.info("导出成功")
              // var blob = new Blob(["Hello, world!"]);
@ -2113,8 +2129,8 @@ if(searchStr){
              // FileSaver()
            })
            .catch(function (err) {
              console.error(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
          // window.location.href = str
        }
@ -2136,19 +2152,19 @@ if(searchStr){
              vm.derive + '.xls'
            )
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
          // var str = httpRequest.server + 'statisticsExport/exportConsultList?year='+chooseYear+'&startDate='+startDate+'&endDate='+endDate+
          // '&status='+vm.radio1+'&area='+areaCode+'&hospital='+vm.communityCode+'&rang='+vm.rangeCode+'&team='+vm.teamCode
          // window.location.href = str
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.handleNodeId == 34) {
        // 签约分析
@ -2174,15 +2190,15 @@ if(searchStr){
              vm.derive + '.xls'
            )
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.handleNodeId == 35) {
        // 专病分析
@ -2207,15 +2223,15 @@ if(searchStr){
              vm.derive + '.xls'
            )
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.handleNodeId == 36) {
        // 生日祝福分析
@ -2239,15 +2255,15 @@ if(searchStr){
              vm.derive + '.xls'
            )
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.handleNodeId == 37) {
        // 上门服务分析
@ -2272,15 +2288,15 @@ if(searchStr){
              vm.derive + '.xls'
            )
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.handleNodeId == 38) {
        // 长处方分析
@ -2306,15 +2322,15 @@ if(searchStr){
              vm.derive + '.xls'
            )
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.handleNodeId == 39) {
        // 体征数据
@ -2322,15 +2338,15 @@ if(searchStr){
          statisticAPI
            .exportHealthList(vm.getHealthParameter(), vm.derive + '.xls')
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.handleNodeId == 40) {
        // 上转预约
@ -2338,15 +2354,15 @@ if(searchStr){
          statisticAPI
            .exportDoctorReservationList(vm.reservationParameter(), vm.derive + '.xls')
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.handleNodeId == 41) {
        // 微信绑定数据
@ -2354,34 +2370,31 @@ if(searchStr){
          statisticAPI
            .exportWexinBindingList(vm.wexinBindingParameter(), vm.derive + '.xls')
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.handleNodeId == 42) {
        // 居民积分明细导出
        if (vm.jifenData.length != 0) {
          statisticAPI
            .exPatinetIntegralAnalysis(
              _.assign({}, vm.residentIntegralParameter(), {pageSize: 99999}),
              vm.derive + '.xls'
            )
            .exPatinetIntegralAnalysis(_.assign({}, vm.residentIntegralParameter(), { pageSize: 99999 }), vm.derive + '.xls')
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.handleNodeId == 43) {
        // 入户访视导出
@ -2389,15 +2402,15 @@ if(searchStr){
          statisticAPI
            .exfindPatientFollowListByCondition(vm.interviewParameter(), vm.derive + '.xls')
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.handleNodeId == 44) {
        // 康复下转导出
@ -2405,37 +2418,37 @@ if(searchStr){
          statisticAPI
            .exportRehabilitationPatientInfo(vm.recoveryParameter(), vm.derive + '.xls')
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.handleNodeId == 45) {
        // 邀请专科回复明细导出
        if (vm.invitationList.length != 0) {
          var p = _.assign({}, vm.invitationDetailsParameter());
          var docInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'));
          delete p.page;
          delete p.pageSize;
          p.doctor = docInfo.uid;
          var p = _.assign({}, vm.invitationDetailsParameter())
          var docInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'))
          delete p.page
          delete p.pageSize
          p.doctor = docInfo.uid
          statisticAPI
            .exportConsultHelpDetailPage(p, vm.derive + '.xls')
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.collectCode == 1) {
        // 专病汇总
@ -2443,15 +2456,15 @@ if(searchStr){
          statisticAPI
            .exportSpecialDiseaseReport(vm.getSpecialParameter(), vm.derive + '.xls')
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.collectCode == 2) {
        // 体征分析
@ -2459,15 +2472,15 @@ if(searchStr){
          statisticAPI
            .exportDeviceHealthReport(vm.getDeviceParameter(), vm.derive + '.xls')
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.collectCode == 3) {
        // 上门汇总
@ -2475,15 +2488,15 @@ if(searchStr){
          statisticAPI
            .exportDoorServerOrderReport(vm.getDoorParameter(), vm.derive + '.xls')
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      } else if (vm.expertFamilyIdType == 'zhuanke1') {
        // 邀请专科回复统计导出
@ -2491,261 +2504,259 @@ if(searchStr){
          statisticAPI
            .exportConsultHelpCountPage(vm.expertReply(), vm.derive + '.xls')
            .then(function (res) {
              vm.fullscreenLoading = false;
              vm.fullscreenLoading = false
            })
            .catch(function (err) {
              toastr.info(err);
              vm.fullscreenLoading = false;
              console.error(err);
            });
              toastr.info(err)
              vm.fullscreenLoading = false
              console.error(err)
            })
        } else {
          vm.fullscreenLoading = false;
          vm.fullscreenLoading = false
        }
      }
    },
    backClick: function () {
      history.go(-1);
      history.go(-1)
    },
    bindEvent: function () {
      var vm = this;
      var vm = this
      //监听后退按钮的操作
      EventBus.$on('back-click', function (arg) {
        EventBus.$emit('update-statistics-time', {}); //更新统计时间
        vm.backClick();
      });
        EventBus.$emit('update-statistics-time', {}) //更新统计时间
        vm.backClick()
      })
      //监听页面刷新
      EventBus.$on('refresh-click', function (arg) {
        EventBus.$emit('update-statistics-time', {}); //更新统计时间
        initData(vm);
      });
      $('#main').removeClass('c-hide');
        EventBus.$emit('update-statistics-time', {}) //更新统计时间
        initData(vm)
      })
      $('#main').removeClass('c-hide')
    },
    detailFunction: function (id, status) {
      var vm = this;
      window.ajaxInsArr[vm.lastAjax] && window.ajaxInsArr[vm.lastAjax].abort();
      var vm = this
      window.ajaxInsArr[vm.lastAjax] && window.ajaxInsArr[vm.lastAjax].abort()
      if (id == 33) {
        // 咨询分析
        vm.getConsultList();
        vm.getConsultList()
      } else if (id == 34) {
        // 签约分析
        vm.getSignList();
        vm.getSignList()
      } else if (id == 35) {
        // 专病分析
        vm.getSickList();
        vm.getSickList()
      } else if (id == 36) {
        // 生日祝福分析
        vm.getBirthdayPatientList();
        vm.getBirthdayPatientList()
      } else if (id == 37) {
        // 上门服务分析
        vm.getDoorServiceList();
        vm.getDoorServiceList()
      } else if (id == 38) {
        // 长处方分析
        vm.getPrescriptionList();
        vm.getPrescriptionList()
      } else if (id == 39) {
        // 体征数据
        vm.physicalSignData();
        vm.physicalSignData()
      } else if (id == 40) {
        // 上转预约
        vm.upTransferAppointment();
        vm.upTransferAppointment()
      } else if (id == 41) {
        // 微信绑定
        vm.wechatBinding();
        vm.wechatBinding()
      } else if (id == 42) {
        // 居民积分明细
        vm.residentIntegral();
        vm.residentIntegral()
      } else if (id == 43) {
        // 入户访视
        vm.interview();
        vm.interview()
      } else if (id == 44) {
        // 康复下转
        vm.radio = '2';
        vm.recovery();
        vm.radio = '2'
        vm.recovery()
        if (!status) {
          vm.pullDown();
          vm.pullDown()
        }
      } else if (id == 45) {
        vm.radio = '2';
        vm.invitationDetails();
        vm.radio = '2'
        vm.invitationDetails()
        if (!status) {
          vm.getSpecialistHospital(); //获取专科医院
          vm.getSpecialistHospital() //获取专科医院
        }
      } else if (vm.expertFamilyIdType == 'zhuanke1') {
        vm.expertReplyList();
        vm.expertReplyList()
      }
    },
    getSpecialistHospital: function () {
      var vm = this;
      vm.specializedHospital = [{value: '', label: '全部'}];
      var vm = this
      vm.specializedHospital = [{ value: '', label: '全部' }]
      homeAPI.getSpecialistHospital().then(function (res) {
        console.log(res, 'Sdddddd');
        console.log(res, 'Sdddddd')
        if (res.status == 200) {
          res.data.forEach(function (v) {
            vm.specializedHospital.push({
              value: v.code,
              label: v.name
            });
          });
            })
          })
        }
      });
      })
    },
    pullDown: function () {
      this.deorsumvergenceStatusFunction('archive_status'); //档案状态
      this.deorsumvergenceStatusFunction('rehabilitation_status'); //下转状态
      this.deorsumvergenceStatusFunction('rehabilitation_hospital'); //下转医院
      this.hospitalsByType();
      this.deorsumvergenceStatusFunction('archive_status') //档案状态
      this.deorsumvergenceStatusFunction('rehabilitation_status') //下转状态
      this.deorsumvergenceStatusFunction('rehabilitation_hospital') //下转医院
      this.hospitalsByType()
    },
    // 下一页  上一页
    handleCurrentChange: function (val) {
      var vm = this;
      vm.currentPage = val;
      var vm = this
      vm.currentPage = val
      if (vm.handleNodeId == 0) {
        vm.getStatisticDataList();
        vm.getStatisticDataList()
      } else {
        vm.detailFunction(vm.handleNodeId);
        vm.detailFunction(vm.handleNodeId)
      }
    },
    //获取省市区  type:区3
    getDistrict: function (type, code, name) {
      var vm = this,
        list = [],
        param = '';
        param = ''
      if (type == 3) {
        list = [{code: code, name: name}];
        param = 'area';
        list = [{ code: code, name: name }]
        param = 'area'
      } else if (type == 5) {
        list = [{code: '', name: '全部'}];
        param = 'community';
        list = [{ code: '', name: '全部' }]
        param = 'community'
      }
      var params = {
        type: type,
        code: code
      };
      }
      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;
          vm[param + 'List'] = list.concat(res.list)
          vm[param + 'Code'] = vm[param + 'List'][0].code
        } else {
          vm.$message.error(res.msg);
          vm.$message.error(res.msg)
        }
      });
      })
    },
    selChange: function (type) {
      var vm = this,
        name = '';
        name = ''
      if (type == 3) {
        vm.initSelOption('community');
        vm.initSelOption('team');
        vm.getCommunityHospital();
        vm.initSelOption('community')
        vm.initSelOption('team')
        vm.getCommunityHospital()
      } else if (type == 5) {
        vm.initSelOption('team');
        vm.teamListByArea();
        vm.initSelOption('team')
        vm.teamListByArea()
      }
    },
    initSelOption: function (param) {
      var vm = this;
      vm[param + 'List'] = [{code: '', name: '全部'}];
      var vm = this
      vm[param + 'List'] = [{ code: '', name: '全部' }]
      if (param == 'team') {
        vm[param + 'List'] = [{id: '', name: '全部'}];
        vm[param + 'List'] = [{ id: '', name: '全部' }]
      }
      vm[param + 'Code'] = vm[param + 'List'][0].code || vm[param + 'List'][0].id;
      vm[param + 'Code'] = vm[param + 'List'][0].code || vm[param + 'List'][0].id
    },
    getCommunityHospital: function () {
      var vm = this,
        list = [{code: '', name: '全部'}],
        param = 'community';
      homeAPI.getCommunityHospital({area: vm.areaCode == '350200' ? '' : vm.areaCode}).then(function (res) {
        list = [{ code: '', name: '全部' }],
        param = 'community'
      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;
          vm[param + 'List'] = list.concat(res.data)
          vm[param + 'Code'] = vm[param + 'List'][0].code
        } else {
          vm.$message.error(res.msg);
          vm.$message.error(res.msg)
        }
      });
      })
    },
    teamListByArea: function () {
      var vm = this,
        list = [{id: '', name: '全部'}],
        param = 'team';
      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;
          } else {
            vm.$message.error(res.msg);
          }
        });
        list = [{ id: '', name: '全部' }],
        param = 'team'
      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
        } else {
          vm.$message.error(res.msg)
        }
      })
    },
    // 慢阻肺搜索左侧字段变化
    onCopdFilterChange(event) {
      EventBus.$emit("copd-record-filter-change", event);
      EventBus.$emit('copd-record-filter-change', event)
    }
  }
});
})
// 初始化时间
function initTime(vm) {
  var now = new Date();
  vm.end = now.format('yyyy-MM-dd');
  var start = now.getTime() - 30 * 24 * 60 * 60 * 1000;
  vm.start = new Date(start).format('yyyy-MM-dd');
  var now = new Date()
  vm.end = now.format('yyyy-MM-dd')
  var start = now.getTime() - 30 * 24 * 60 * 60 * 1000
  vm.start = new Date(start).format('yyyy-MM-dd')
  vm.nowyear = vm.chooseYear = now.getFullYear();
  vm.nowmonth = now.getMonth() + 1;
  vm.years = [];
  vm.nowyear = vm.chooseYear = now.getFullYear()
  vm.nowmonth = now.getMonth() + 1
  vm.years = []
  for (i = vm.nowyear; i >= 2016; i--) {
    vm.years.push(i);
    vm.years.push(i)
  }
}
// 数据范围初始化
function initScope(vm) {
  //获得缓存中缓存的角色权限
  var userRole = window.sessionStorage.getItem('selectedRole');
  var userRole = window.sessionStorage.getItem('selectedRole')
  if (!userRole) {
    return false;
    return false
  }
  vm.userRole = JSON.parse(userRole);
  vm.userRole = JSON.parse(userRole)
  //level:2、市,3、区,4、社区,5、团队
  vm.initareaLevel = vm.areaLevel = vm.userRole.code == '350200' ? 2 : vm.userRole.code.length == 6 ? 3 : 4;
  vm.initlevel = vm.level = vm.userRole.code == '350200' ? 4 : vm.userRole.code.length == 6 ? 3 : 2;
  vm.initareaLevel = vm.areaLevel = vm.userRole.code == '350200' ? 2 : vm.userRole.code.length == 6 ? 3 : 4
  vm.initlevel = vm.level = vm.userRole.code == '350200' ? 4 : vm.userRole.code.length == 6 ? 3 : 2
  //	vm.lowLevel = vm.initlowLevel = vm.userRole.code == '350200' ? 3 : vm.userRole.code.length == 6 ? 2 : 1;
  vm.initarea = vm.area = vm.userRole.code;
  vm.areaTitle = vm.userRole.name;
  vm.initarea = vm.area = vm.userRole.code
  vm.areaTitle = vm.userRole.name
  vm.rangeList = [
    {name: '按区', code: 'town'},
    {name: '按社区', code: 'hospital'},
    {name: '按团队', code: 'team'}
  ];
    { name: '按区', code: 'town' },
    { name: '按社区', code: 'hospital' },
    { name: '按团队', code: 'team' }
  ]
  if (vm.initlevel == 4) {
    //市获取区
    vm.getDistrict(3, vm.initarea, vm.areaTitle.substr(0, 3));
    vm.rangeCode = vm.rangeList[0].code;
    vm.getDistrict(3, vm.initarea, vm.areaTitle.substr(0, 3))
    vm.rangeCode = vm.rangeList[0].code
  } else if (vm.initlevel == 3) {
    //区获取社区
    vm.areaList = [{code: vm.initarea, name: vm.areaTitle}];
    vm.areaCode = vm.initarea;
    vm.rangeCode = vm.rangeList[0].code;
    vm.areaList = [{ code: vm.initarea, name: vm.areaTitle }]
    vm.areaCode = vm.initarea
    vm.rangeCode = vm.rangeList[0].code
  } else if (vm.initlevel == 2) {
    //社区获取团队
    vm.communityList = [{code: vm.initarea, name: vm.areaTitle}];
    vm.communityCode = vm.initarea;
    vm.rangeList.shift();
    vm.rangeCode = vm.rangeList[0].code;
    vm.communityList = [{ code: vm.initarea, name: vm.areaTitle }]
    vm.communityCode = vm.initarea
    vm.rangeList.shift()
    vm.rangeCode = vm.rangeList[0].code
  }
  vm.searchJson.range = vm.rangeCode;
  vm.searchJson.range = vm.rangeCode
}
function initData(vm) {
  initScope(vm);
  initScope(vm)
  //初始化时间
  initTime(vm);
  initTime(vm)
  vm.tabledata = [];
  vm.bindEvent();
  vm.tabledata = []
  vm.bindEvent()
}

+ 1 - 1
component/statistics/PlanService/index.html

@ -39,7 +39,7 @@
  </div>
  <el-table :data="tableData" style="width: 100%">
    <el-table-column type="index" min-width="60" label="序号"></el-table-column>
    <el-table-column :label="item.label" v-for="item in tableHeader" :key="item.prop">
    <el-table-column :label="item.label" v-for="item in tableHeader" :key="item.prop" :width="item.width">
      <template slot-scope="scope">{{scope.row[item.prop]}}</template>
    </el-table-column>
    <el-table-column label="操作" align="center">

+ 2 - 2
component/statistics/PlanService/index.js

@ -27,8 +27,8 @@ Vue.component('plan-service', {
        { label: '患者姓名', prop: 'patientName' },
        { label: '性别', prop: 'sex' },
        { label: '年龄', prop: 'age' },
        { label: '建床日期', prop: 'buildingTime' },
        { label: '查床周期', prop: 'checkBedCircle' },
        { label: '建床日期', prop: 'buildingTime', width: '140' },
        { label: '查床周期', prop: 'checkBedCircleName' },
        { label: '查床开始日期', prop: 'checkTime' },
        { label: '查床人员', prop: 'doctorName' }
      ],

+ 4 - 4
component/statistics/Referral/index.js

@ -29,7 +29,7 @@ Vue.component('referral', {
        { label: '性别', prop: 'sex' },
        { label: '年龄', prop: 'age' },
        { label: '建床诊断', prop: 'diagnoseName' },
        { label: '建床日期', prop: 'buildingDay' },
        { label: '建床日期', prop: 'buildingDate', width: '140' },
        { label: '建床天数', prop: 'buildingDays' },
        { label: '撤床日期', prop: 'withdrawalTime', width: '140' },
        { label: '撤床诊断', prop: 'sickOutDiagnoseName' },
@ -74,7 +74,7 @@ Vue.component('referral', {
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
          params.endDate = this.chooseTime[1] + ' 23:59'
        }
      }
@ -104,7 +104,7 @@ Vue.component('referral', {
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
          params.endDate = this.chooseTime[1] + ' 23:59'
        }
      }
      this.exportLoading = true
@ -147,7 +147,7 @@ Vue.component('referral', {
      this.size = val
      this.getList()
    },
    getImgUrl(url){
    getImgUrl(url) {
      return httpRequest.getImgUrl(url)
    }
  },

+ 0 - 27
component/statistics/jtbcTablePage/index.css

@ -1,27 +0,0 @@
.ad-schedule-import, .schedule-import .fileName{
    width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    white-space: nowrap;
    vertical-align: middle;
    text-align: left;
    margin-top: -1px;
}
.red{
    color: red;
}
.down-temp{
    color: #12b7f5;
    font-size: 14px;
    text-align: left;
    margin-top: 5px;
}
.err-list{
    border: 1px solid #e1e1e1;
    padding: 10px;
    color: red;
    font-size: 14px;
    margin: 10px 15px;
    text-align: left;
}

+ 0 - 168
component/statistics/jtbcTablePage/index.html

@ -1,168 +0,0 @@
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta
          name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
  <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  <title>慢阻肺患者档案</title>
  <link rel="stylesheet" type="text/css" href="index.css" />
</head>
<body>
<div id="app">
  <div class="copd-table-main">
      <div class="copd-filter-group ui-col-1 bgc-fff" style="min-width: 900px">
          <template v-if="show1">
              <div class="searchDiv pb20">
                  <label class="c-333 c-f14">患者姓名:</label>
                  <el-input v-model="name" class="pr20 formWidth wd160" placeholder="请输入患者姓名查询"></el-input>
              </div>
          </template>
          <template v-if="show2 || show4">
              <div class="searchDiv pb20">
                  <label class="c-333 c-f14">费别:</label>
                  <el-input v-model="obj2.cost" class="pr20 formWidth wd160" placeholder="请输入患者姓名查询"></el-input>
              </div>
              <div class="searchDiv pb20">
                  <label class="c-333 c-f14">入院病情:</label>
                  <el-select class="pr20 formWidth" v-model="obj2.toHospital" placeholder="请选择">
                      <el-option
                              v-for="(option, index) in toHospitalOptions"
                              :label="option.value"
                              :value="option.code"></el-option>
                      <!-- <el-option label="全部" value="item.value"></el-option> -->
                  </el-select>
              </div>
              <div class="searchDiv pb20">
                  <label class="c-333 c-f14">入院方式:</label>
                  <el-select class="pr20 formWidth" v-model="obj2.way" placeholder="请选择">
                      <el-option
                              v-for="(option, index) in toHospitalOptions"
                              :label="option.value"
                              :value="option.code"></el-option>
                      <!-- <el-option label="全部" value="item.value"></el-option> -->
                  </el-select>
              </div>
              <div class="searchDiv pb20">
                  <label class="c-333 c-f14">患者姓名:</label>
                  <el-input v-model="obj2.name" class="pr20 formWidth wd160" placeholder="请输入患者姓名查询"></el-input>
              </div>
          </template>
          <template v-if="show3">
              <div class="searchDiv pb20">
                  <label class="c-333 c-f14">医生姓名:</label>
                  <el-input v-model="obj3.doctorName" class="pr20 formWidth wd160" placeholder="请输入患者姓名查询"></el-input>
              </div>
              <div class="searchDiv pb20">
                  <label class="c-333 c-f14">患者姓名:</label>
                  <el-input v-model="obj3.name" class="pr20 formWidth wd160" placeholder="请输入患者姓名查询"></el-input>
              </div>
          </template>
          <template v-if="show5">
              <div class="searchDiv pb20">
                  <label class="c-333 c-f14">转诊机构:</label>
                  <el-input v-model="obj5.organization" class="pr20 formWidth wd160" placeholder="请输入患者姓名查询"></el-input>
              </div>
              <div class="searchDiv pb20">
                  <label class="c-333 c-f14">患者姓名:</label>
                  <el-input v-model="obj5.name" class="pr20 formWidth wd160" placeholder="请输入患者姓名查询"></el-input>
              </div>
          </template>
          <div class="searchDiv pb20">
              <el-button type="primary" size="mini">查询</el-button>
              <el-button type="ff9526" size="mini" >导出</el-button>
              <span class="eliminate" >清除筛选条件</span>
          </div>
      </div>
    <el-table style="width: 100%" :data="dataList" v-loading="daLoading" v-if="show1">
      <el-table-column type="selection" width="55"></el-table-column>
      <el-table-column prop="name" label="患者姓名" width="180"></el-table-column>
      <el-table-column prop="nationality" label="国籍" width="180"></el-table-column>
      <el-table-column prop="nationName" label="民族" width="180"></el-table-column>
      <el-table-column prop="idcardTypeName" label="证件类型" width="180"></el-table-column>
      <el-table-column prop="idcard" label="证件号码" width="180"></el-table-column>
      <el-table-column prop="sexName" label="性别" width="180"></el-table-column>
      <el-table-column prop="birthday" label="出生日期" width="180"></el-table-column>
      <el-table-column prop="age" label="年龄" width="180"></el-table-column>
      <el-table-column prop="mobile" label="联系电话" width="180"></el-table-column>
      <el-table-column prop="liveAddress" label="常住地址" width="180"></el-table-column>
      <el-table-column prop="registAddress" label="户籍地址" width="180"></el-table-column>
      <el-table-column prop="occupationName" label="职业" width="180"></el-table-column>
      <el-table-column prop="marriageName" label="婚姻状态" width="180"></el-table-column>
      <el-table-column prop="firstChargeType" label="医保类型" width="180"></el-table-column>
      <el-table-column prop="turnDownStatusName" label="下转状态" width="180"></el-table-column>
      <el-table-column prop="receiveStatusName" label="接收状态" width="180"></el-table-column>
      <el-table-column prop="hospitalName" label="接收医院" width="180"></el-table-column>
      <el-table-column prop="doctorName" label="接收医生" width="180"></el-table-column>
      <el-table-column prop="archivesStatusName" label="随访状态" width="180"></el-table-column>
      <el-table-column prop="isLiveName" label="生存状态" width="180"></el-table-column>
      <el-table-column prop="deathTime" label="死亡日期" width="180"></el-table-column>
      <el-table-column label="操作" min-width="220" fixed="right">
        <template slot-scope="{row}">
          <el-button type="text" @click="onClickEdit(row)">编辑</el-button>
          <el-button type="text" @click="onClickServiceRecord(row)">服务记录</el-button>
          <el-button type="text" @click="onClickHealthRecord(row)">健康档案</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-table style="width: 100%" :data="dataList" v-loading="daLoading" v-if="show2">
      <el-table-column type="index" width="55"></el-table-column>
      <el-table-column prop="name" label="姓名" width="180"></el-table-column>
      <el-table-column prop="nationality" label="性别" width="180"></el-table-column>
      <el-table-column prop="nationName" label="年龄" width="180"></el-table-column>
      <el-table-column prop="idcardTypeName" label="证件号" width="180"></el-table-column>
      <el-table-column prop="idcard" label="人群分类(职业)" width="180"></el-table-column>
      <el-table-column prop="sexName" label="住院号" width="180"></el-table-column>
      <el-table-column prop="birthday" label="住院次数" width="180"></el-table-column>
      <el-table-column prop="age" label="床位" width="180"></el-table-column>
      <el-table-column prop="mobile" label="费别" width="180"></el-table-column>
      <el-table-column prop="liveAddress" label="通讯地址" width="180"></el-table-column>
      <el-table-column prop="registAddress" label="联系电话" width="180"></el-table-column>
      <el-table-column prop="occupationName" label="入院病情" width="180"></el-table-column>
      <el-table-column prop="marriageName" label="入院方式" width="180"></el-table-column>
      <el-table-column prop="firstChargeType" label="入院办理人" width="180"></el-table-column>
      <el-table-column prop="firstChargeType" label="入院科室" width="180"></el-table-column>
      <el-table-column prop="firstChargeType" label="入院时间" width="180"></el-table-column>
    </el-table>
    <el-table style="width: 100%" :data="dataList" v-loading="daLoading" v-if="show3">
        <el-table-column type="index" width="55"></el-table-column>
        <el-table-column prop="name" label="患者姓名" width="180"></el-table-column>
        <el-table-column prop="nationality" label="诊断" width="180"></el-table-column>
        <el-table-column prop="nationName" label="责任医生" width="180"></el-table-column>
        <el-table-column prop="idcardTypeName" label="药物治疗服务情况" width="180"></el-table-column>
        <el-table-column prop="idcard" label="康复治疗服务情况" width="180"></el-table-column>
        <el-table-column prop="sexName" label="家庭病床查床服务情况" width="180"></el-table-column>
        <el-table-column prop="birthday" label="服务时间" width="180"></el-table-column>
    </el-table>
    <el-table style="width: 100%" :data="dataList" v-loading="daLoading" v-if="show4">
        <el-table-column type="index" width="55"></el-table-column>
        <el-table-column prop="name" label="患者姓名" width="180"></el-table-column>
        <el-table-column prop="nationality" label="诊断" width="180"></el-table-column>
        <el-table-column prop="nationName" label="责任医生" width="180"></el-table-column>
        <el-table-column prop="idcardTypeName" label="查床时间" width="180"></el-table-column>
        <el-table-column prop="idcard" label="查床情况" width="180"></el-table-column>
        <el-table-column prop="sexName" label="查床结果" ></el-table-column>
    </el-table>
    <el-table style="width: 100%" :data="dataList" v-loading="daLoading" v-if="show5">
        <el-table-column type="index" width="55"></el-table-column>
        <el-table-column prop="name" label="患者姓名" width="180"></el-table-column>
        <el-table-column prop="nationality" label="诊断" width="180"></el-table-column>
        <el-table-column prop="nationName" label="转诊时间" width="180"></el-table-column>
        <el-table-column prop="idcardTypeName" label="撤床时间" width="180"></el-table-column>
        <el-table-column prop="idcard" label="转诊机构" width="180"></el-table-column>
        <el-table-column prop="sexName" label="评价情况" ></el-table-column>
    </el-table>
    <div class="c-t-right mt20">
        <!-- TODO 修正 -->
        <el-pagination
                @current-change="handleCurrentChange"
                :current-page.sync="currentPage"
                :page-size="currentSize"
                layout="total, prev, pager, next, jumper"
                :total="totalCount"></el-pagination>
      </div>
  </div>
</div>
</body>
</html>

+ 0 - 69
component/statistics/jtbcTablePage/index.js

@ -1,69 +0,0 @@
// 慢阻肺患者档案表格组件
var template = ''
$.ajax('../../../component/statistics/jtbcTablePage/index.html', {
    data: {},
    dataType: 'html',
    cache: false,
    timeout: 60000,
    async: false,
    error: function (res) {},
    success: function (res) {
        template = res
    }
})
Vue.component('jtbc-table-page', {
    template: template,
    props: [],
    data() {
        return {
            show1: true,
            show2: false,
            show3: false,
            show4: false,
            show5: false,
            currentSize:50,
            currentPage: 1,
            totalCount: 0,
            docInfo: JSON.parse(window.localStorage.getItem('docInfo')),
            daLoading:false,
            dataList: [
            ],
            // show1
            name: '',
            // show2 || show4
            obj2: {name: '1', way: '1', toHospital: '1', cost: '2'},
            toHospitalOptions: [{value: '1', code: '1'}],
            // show3
            obj3: { name: '123', doctorName: '456' },
            // show5
            obj5: {organization: '1', name: '1'}
        }
    },
    mounted() {
        var vm = this
        EventBus.$on('jtbc-table-page', function (obj) {
            vm.show1 = false
            vm.show2 = false
            vm.show3 = false
            vm.show4 = false
            vm.show5 = false
            if (obj.id == 71) vm.show1 = true
            else if (obj.id == 72) vm.show2 = true
            else if (obj.id == 73) vm.show3 = true
            else if (obj.id == 74) vm.show4 = true
            if (obj.id == 75) vm.show5 = true
        })
    },
    destroyed() {
        // EventBus.$off('jtbc-table-page')
    },
    methods: {
        handleCurrentChange:function(val) {
            console.log(val)
        },
    }
})