hd 1 month ago
parent
commit
6d34c00d41

+ 2 - 2
component/statistics/CopdPatientRecord/index.html

@ -99,14 +99,14 @@
        <!--=======================================================-->
        <div class="searchDiv pb20">
          <label class="c-333 c-f14">数据范围:</label>
          <el-select class="pr20 formWidth" v-model="rangeCode" placeholder="请选择" @change="initScope(3)">
          <el-select class="pr20 formWidth" v-model="rangeCode" placeholder="请选择" >
            <el-option v-for="(option, index) in rangeList" :label="option.name" :value="option.code"></el-option>
          </el-select>
        </div>
        <!--=======================================================-->
        <div class="searchDiv pb20">
          <label class="c-333 c-f14">地区:</label>
          <el-select v-model="areaCode" style="width: 100px" class="pr10" @change="initScope(5)">
          <el-select v-model="areaCode" style="width: 100px" class="pr10" @change="selChange(3)">
            <el-option v-for="(item , index) in areaList" :key="index" :label="item.name" :value="item.code"></el-option>
          </el-select>
        </div>

+ 56 - 17
component/statistics/CopdPatientRecord/index.js

@ -181,7 +181,7 @@ Vue.component('copd-patient-record', {
  watch: {
    rangeCode(nv) {
      if (nv == 'hospital') {
        this.initScope(5)
        // this.initScope(5)
      }
    }
  },
@ -229,6 +229,13 @@ Vue.component('copd-patient-record', {
          vm.getDistrict(type, vm.userRole.code.substring(3), vm.areaTitle.substring(0, 3))
        } else if (vm.userRole.code.length == 6) {
          vm.getDistrict(type, vm.userRole.code, vm.areaTitle.substring(0, 3))
        } else if (vm.userRole.code.length == 10) {
          this.rangeList = [{ name: '按社区', code: 'hospital' }]
          this.rangeCode = 'hospital'
          this.areaList = [{ name: this.userRole.name.substring(0, 3), code: this.userRole.code.substring(0, 6) }]
          this.areaCode = this.userRole.code.substring(0, 6)
          this.communityList = [{ name: this.userRole.name, code: this.userRole.code }]
          this.communityCode = this.userRole.code
        }
      } else {
        this.communityCode = null
@ -576,20 +583,20 @@ Vue.component('copd-patient-record', {
        endTime: this.chooseYear == '全部' ? '' : this.chooseYear + '-12-31',
        isSign: this.isSign
      }
      if(this.liveAddress.length >0){
        if(this.liveAddress[0]=='other'){
      if (this.liveAddress.length > 0) {
        if (this.liveAddress[0] == 'other') {
          params.liveProvince = 'other'
        }else{
        } else {
          params.liveProvince = this.liveAddress[0]
          params.liveCity = this.liveAddress[1]
          params.liveTown = this.liveAddress[2]
          params.liveStreet = this.liveAddress[3]
        }
      }
      if(this.registAddress.length > 0){
        if(this.registAddress[0]=='other'){
      if (this.registAddress.length > 0) {
        if (this.registAddress[0] == 'other') {
          params.registProvince = 'other'
        }else{
        } else {
          params.registProvince = this.registAddress[0]
          params.registCity = this.registAddress[1]
          params.registTown = this.registAddress[2]
@ -813,7 +820,7 @@ Vue.component('copd-patient-record', {
        return true
      }
    },
    handleItemChange(val, type){
    handleItemChange(val, type) {
      // 获取地址
      if (val.length == 1) {
        // 获取市
@ -872,15 +879,14 @@ Vue.component('copd-patient-record', {
        if (res.status == 200) {
          var detailModelList = res.list
          for(let item of detailModelList){
            if(id == 3){
          for (let item of detailModelList) {
            if (id == 3) {
              item.children = null
            }else{
            } else {
              item.children = []
            }
          }
          
          if (arr[provinceIndex].children[activeIndex]) {
            arr[provinceIndex].children[activeIndex].children = detailModelList
          }
@ -917,9 +923,9 @@ Vue.component('copd-patient-record', {
        if (res.status == 200) {
          var detailModelList = res.list
          if (arr[provinceIndex].children[activeIndex].children[xIndex]) {
            if(detailModelList.length >0){
            if (detailModelList.length > 0) {
              arr[provinceIndex].children[activeIndex].children[xIndex].children = detailModelList
            }else{
            } else {
              arr[provinceIndex].children[activeIndex].children[xIndex].children = null
            }
          }
@ -929,11 +935,11 @@ Vue.component('copd-patient-record', {
    initDistrict() {
      var vm = this
      homeAPI.getDistrict({ type: 1, code: '' }).then(function (res) {
        var detailModelList = res.list.concat({code:'other',name:'不详'})
        var detailModelList = res.list.concat({ code: 'other', name: '不详' })
        detailModelList.forEach(function (item) {
          if(item.code == 'other'){
          if (item.code == 'other') {
            item.children = null
          }else{
          } else {
            item.children = []
          }
        })
@ -941,5 +947,38 @@ Vue.component('copd-patient-record', {
        vm.addressOptions2 = JSON.parse(JSON.stringify(detailModelList))
      })
    },
    selChange: function (type) {
      var vm = this,
        name = ''
      if (type == 3) {
        vm.initSelOption('community')
        vm.initSelOption('team')
        vm.getCommunityHospital()
      } else if (type == 5) {
        vm.initSelOption('team')
        // vm.teamListByArea();
      }
    },
    initSelOption: function (param) {
      var vm = this
      vm[param + 'List'] = [{ code: '', name: '全部' }]
      if (param == 'team') {
        vm[param + 'List'] = [{ id: '', name: '全部' }]
      }
      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) {
        if (res.status == 200) {
          vm[param + 'List'] = list.concat(res.data)
          vm[param + 'Code'] = vm[param + 'List'][0].code
        } else {
          vm.$message.error(res.msg)
        }
      })
    }
  }
})

+ 12 - 4
component/statistics/CopdRecordSearch/index.js

@ -194,6 +194,7 @@ Vue.component('copd-record-search', {
      }
      vm.userRole = JSON.parse(userRole)
      vm.areaTitle = vm.userRole.name
      if (vm.isGuGan) {
        return
      }
@ -201,12 +202,20 @@ Vue.component('copd-record-search', {
      if (type == 3) {
        this.areaCode = null
        this.communityCode = null
        if (vm.userRole.code == '350200' || vm.userRole.code == 'jk_350200') {
          vm.getDistrict(type, 350200, '厦门市')
        } else if (vm.userRole.code.indexOf('jk_') > -1) {
          vm.getDistrict(type, vm.userRole.code.substring(3), vm.areaTitle.substring(0, 3))
        } else if (vm.userRole.code.length == 6) {
          vm.getDistrict(type, vm.userRole.code, vm.areaTitle.substring(0, 3))
        } else if (vm.userRole.code.length == 10) {
          this.rangeList = [{ name: '按社区', code: 'hospital' }]
          this.rangeCode = 'hospital'
          this.areaList = [{ name: this.userRole.name.substring(0, 3), code: this.userRole.code.substring(0, 6) }]
          this.areaCode = this.userRole.code.substring(0, 6)
          this.communityList = [{ name: this.userRole.name, code: this.userRole.code }]
          this.communityCode = this.userRole.code
        }
      } else {
        this.communityCode = null
@ -272,7 +281,6 @@ Vue.component('copd-record-search', {
      if (this.rangeCode == 'hospital') {
        params.hospital = this.communityCode
      }
      console.log('tableheader')
      statisticAPI
        .manageInfo(params)
@ -415,11 +423,11 @@ Vue.component('copd-record-search', {
      })
    },
    resetDate() {
      if(this.isGuGan){
      if (this.isGuGan) {
        this.rangeCode = 'hospital'
        this.areaCode = this.docInfo.town
        this.communityCode = this.docInfo.hospital
      }else{
      } else {
        this.rangeCode = 'town'
        this.areaCode = ''
        this.communityCode = ''
@ -460,6 +468,7 @@ Vue.component('copd-record-search', {
    if (this.docInfo.expandLevelName) {
      this.isGuGan = this.docInfo.expandLevelName.indexOf('慢病骨干') > -1
    }
    this.initScope(3)
    if (this.isGuGan) {
@ -476,7 +485,6 @@ Vue.component('copd-record-search', {
    EventBus.$on('copd-record-filter-change', function (event) {
      vm.quotaStrArr = event
      console.log(vm.quotaStrArr, '999sd8s9a8d9s8ad9sa89')
    })
    this.dicName.forEach(function (item) {
      vm.getDictByDictName(item)