Explorar el Código

对接服务人数

hwy hace 1 mes
padre
commit
38619f1f0b

+ 9 - 0
api/statistics-api.js

@ -576,6 +576,15 @@
    },
    findDistributionBatch(data) {
      return httpRequest.get('doctor/jkCopd/findDistributionBatch', { data })
    },
    getServiceProgress: function (data) {
      return httpRequest.get('/doctor/jkCopd/getServiceProgress', { data: data })
    },
    importPlanExcel: function (data) {
      return httpRequest.post('/doctor/jkCopd/importPlanExcel', { data: data })
    },
    exportServiceProgress(data, filename) {
      return httpRequest.downLoadFileForAjax('/doctor/jkCopd/exportServiceProgress', filename, data)
    }
  }

BIN
app/statistics/html/template.xls


+ 3 - 27
component/statistics/CopdServeNum/index.html

@ -51,6 +51,7 @@
              <el-button style="vertical-align: middle" size="small" type="primary">选择文件</el-button>
            </el-upload>
          </el-form-item>
          <div style="color: #12b7f5; margin-left: 100px; cursor: pointer" @click="gotoDownLoad">模板下载</div>
        </el-form>
      </div>
      <span slot="footer" class="dialog-footer">
@ -58,31 +59,6 @@
        <el-button v-loading="loading" type="primary" @click="check">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog
      :destroy-on-close="true"
      title="导入进度"
      custom-class="schedule-import"
      :visible.sync="isProgressShow"
      :append-to-body="true"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :show-close="false"
      width="400px">
      <div class="tc">
        <div class="mb20">{{percentage!=100? '批量处理中,请耐心等待' : success? '处理成功!' : '处理失败,请重试'}}</div>
        <el-progress v-if="percentage!=100||success" :percentage="percentage"></el-progress>
        <el-progress v-else="" status="exception" :percentage="percentage"></el-progress>
        <div class="err-list" v-if="errList&&errList.length">
          <div v-for="(item, i) in errList" :key="i" v-html="item.errorMes"></div>
        </div>
        <div class="mt20">
          <el-button v-if="percentage!=100" type="info">处理中...</el-button>
          <el-button @click="close()" v-else-if="success" type="primary">处理成功</el-button>
          <el-button @click="close(1)" v-else type="danger">重试</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
  <el-table border :data="tabledata" style="width: 100%" class="mt20" v-loading="daLoading">
    <el-table-column fixed type="index" label="序号" :width="70" align="center" v-if="tableHeader.length>0"></el-table-column>
@ -96,7 +72,7 @@
      v-for="(item,index) in tableHeader"
      :key="index"></el-table-column>
  </el-table>
  <div class="c-t-right mt20">
  <!-- <div class="c-t-right mt20">
    <el-pagination
      @current-change="handleCurrentChange"
      @size-change="handleSizeChange"
@ -105,5 +81,5 @@
      :page-sizes="[10, 20, 50]"
      layout="total,sizes, prev, pager, next, jumper"
      :total="datatotal"></el-pagination>
  </div>
  </div> -->
</div>

+ 39 - 33
component/statistics/CopdServeNum/index.js

@ -61,10 +61,10 @@ Vue.component('copd-serve-num', {
      tabledata: [],
      tableHeader: [
        { label: '地区', prop: 'name', width: '90' },
        { label: '总患者人数', prop: 'sex', width: '90' },
        { label: '计划服务人数', prop: 'age', width: '90' },
        { label: '已服务人数', prop: 'mobile', width: '90' },
        { label: '服务完成度', prop: 'idcard', width: '90' }
        { label: '总患者人数', prop: 'patientNum', width: '90' },
        { label: '计划服务人数', prop: 'planNum', width: '90' },
        { label: '已服务人数', prop: 'serviceNum', width: '90' },
        { label: '服务完成度', prop: 'serviceProgress', width: '90' }
      ],
      radio: '1',
      fileList: [],
@ -83,6 +83,14 @@ Vue.component('copd-serve-num', {
  },
  methods: {
    gotoDownLoad() {
      const a = document.createElement('a')
      a.style.display = 'none'
      a.download = '模板.xlsx'
      a.href = './template.xls'
      a.target = '_blank'
      a.click()
    },
    hospitalList() {
      var vm = this
      statisticAPI.hospitalList({ queryArea: vm.userRoleCode }).then(function (res) {
@ -232,31 +240,12 @@ Vue.component('copd-serve-num', {
    exportTable() {
      var vm = this
      vm.daLoading = true
      //  var quotaStrs= this.bubbleSort(this.quotaStrArr)
      this.quotaStrArr.sort(function (a, b) {
        return a - b
      })
      var params = {
        startTime: this.radio == 1 ? this.chooseYear + '-01-01' : this.startTime,
        endTime: this.radio == 1 ? this.chooseYear + '-12-31' : this.endTime,
        quotaStr: this.quotaStrArr.join(','),
        range: this.rangeCode,
        area: this.areaCode == '350200' ? '' : this.areaCode,
        hospital: this.communityCode,
        page: 1,
        size: 50,
        sex: this.sex,
        firstVisitType: this.firstVisitType,
        hasLung: this.hasLung,
        hasCt: this.hasCt,
        hasx: this.hasx,
        hasBloodGas: this.hasBloodGas,
        hasSmoke: this.hasSmoke,
        hasDrink: this.hasDrink,
        diseaseConversion: this.diseaseConversion,
        age: this.age
        year: this.chooseYear,
        range: 1 || this.rangeCode,
        area: this.areaCode == '350200' ? '' : this.areaCode
      }
      statisticAPI.exportManageInfo(params, '管理情况.xls').then(function (res) {
      statisticAPI.exportServiceProgress(params, '服务人数配置及进度查询.xls').then(function (res) {
        vm.daLoading = false
        vm.$message({
          message: '导出成功!',
@ -319,7 +308,26 @@ Vue.component('copd-serve-num', {
        this.month = ''
      }
    },
    search() {},
    search() {
      var vm = this
      vm.daLoading = true
      var params = {
        year: this.chooseYear,
        range: 1 || this.rangeCode,
        area: this.areaCode == '350200' ? '' : this.areaCode
      }
      statisticAPI.getServiceProgress(params).then(function (res) {
        vm.daLoading = false
        if (res.status == 200) {
          vm.tabledata = res.detailModelList
          vm.totalCount = res.totalCount
          vm.totalPage = res.totalPage
        } else {
          vm.$message.error(res.msg)
        }
        console.log(res, 'llllllllllllllllllllllllllllllll')
      })
    },
    close(type) {
      this.reset(type)
      this.isProgressShow = false
@ -347,7 +355,7 @@ Vue.component('copd-serve-num', {
      formData.append('file', vm.file)
      // vm.initProgress()
      httpRequest
        .post('doctor/jkCopd/importExcel', {
        .post('doctor/jkCopd/importPlanExcel', {
          data: formData,
          cache: false, //上传文件无需缓存
          processData: false, //用于对data参数进行序列化处理 这里必须false
@ -355,10 +363,7 @@ Vue.component('copd-serve-num', {
        })
        .then(function (res) {
          if (res.status == 200) {
            vm.getJkCopdPatientPage()
            vm.dicName.forEach(function (item) {
              vm.getDictByDictName(item)
            })
            vm.search()
            vm.daLoading = false
            vm.isShow = false
            vm.$message({
@ -407,6 +412,7 @@ Vue.component('copd-serve-num', {
      // vm.receivingHospitalList = [{code:this.docInfo.hospital,name:this.docInfo.hospitalName}]
      // this.hospital = this.docInfo.hospital
    }
    this.search()
    EventBus.$on('copd-record-filter-change', function (event) {
      vm.quotaStrArr = event