|
@ -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()
|
|
|
}
|
|
|
})
|