Browse Source

修复bug

hwy 3 days ago
parent
commit
54e80f2914

+ 13 - 0
component/statistics/LascCervical/index.js

@ -593,9 +593,22 @@ Vue.component('lasc-cervical', {
      } else {
        this.init()
      }
    },
    formatDate(date) {
      const year = date.getFullYear()
      const month = String(date.getMonth() + 1).padStart(2, '0')
      const day = String(date.getDate()).padStart(2, '0')
      return `${year}-${month}-${day}`
    }
  },
  mounted() {
    const now = new Date()
    // 获取当前日期
    const endDate = new Date()
    // 获取30天前的日期
    const startDate = new Date()
    startDate.setDate(endDate.getDate() - 30)
    this.chooseTime = [this.formatDate(startDate), this.formatDate(endDate)]
    this.init()
  }
})

+ 14 - 0
component/statistics/LascPatient/index.js

@ -86,6 +86,12 @@ Vue.component('lasc-patient', {
    }
  },
  methods: {
    formatDate(date) {
      const year = date.getFullYear()
      const month = String(date.getMonth() + 1).padStart(2, '0')
      const day = String(date.getDate()).padStart(2, '0')
      return `${year}-${month}-${day}`
    },
    init() {
      var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
      if (selectedRole.code.indexOf('350200') > -1) {
@ -295,6 +301,14 @@ Vue.component('lasc-patient', {
    }
  },
  mounted() {
    const now = new Date()
    // 获取当前日期
    const endDate = new Date()
    // 获取30天前的日期
    const startDate = new Date()
    startDate.setDate(endDate.getDate() - 30)
    this.chooseTime1 = [this.formatDate(startDate), this.formatDate(endDate)]
    this.chooseTime = [this.formatDate(startDate), this.formatDate(endDate)]
    this.init()
  }
})

+ 13 - 0
component/statistics/LascProgress/index.js

@ -430,9 +430,22 @@ Vue.component('lasc-progress', {
        total: 0
      }
      this.caseDataList()
    },
    formatDate(date) {
      const year = date.getFullYear()
      const month = String(date.getMonth() + 1).padStart(2, '0')
      const day = String(date.getDate()).padStart(2, '0')
      return `${year}-${month}-${day}`
    }
  },
  mounted() {
    const now = new Date()
    // 获取当前日期
    const endDate = new Date()
    // 获取30天前的日期
    const startDate = new Date()
    startDate.setDate(endDate.getDate() - 30)
    this.chooseTime = [this.formatDate(startDate), this.formatDate(endDate)]
    this.init()
  }
})

+ 13 - 0
component/statistics/breastCancerPatient/index.js

@ -474,9 +474,22 @@ Vue.component('breast-cancer-patient', {
        total: 0
      }
      this.caseDataList()
    },
    formatDate(date) {
      const year = date.getFullYear()
      const month = String(date.getMonth() + 1).padStart(2, '0')
      const day = String(date.getDate()).padStart(2, '0')
      return `${year}-${month}-${day}`
    }
  },
  mounted() {
    const now = new Date()
    // 获取当前日期
    const endDate = new Date()
    // 获取30天前的日期
    const startDate = new Date()
    startDate.setDate(endDate.getDate() - 30)
    this.chooseTime = [this.formatDate(startDate), this.formatDate(endDate)]
    this.init()
  }
})