|
@@ -39,10 +39,16 @@ import AppToday from './AppToday'
|
39
|
39
|
import AppCumulative from './AppCumulative'
|
40
|
40
|
export default {
|
41
|
41
|
name: 'AppHeader',
|
|
42
|
+ inject: ['parentDutyId', 'hosId', 'dutyId'],
|
42
|
43
|
components: {
|
43
|
44
|
AppToday,
|
44
|
45
|
AppCumulative
|
45
|
46
|
},
|
|
47
|
+ computed: {
|
|
48
|
+ getHosId () {
|
|
49
|
+ return this.parentDutyId || this.dutyId || this.hosId
|
|
50
|
+ }
|
|
51
|
+ },
|
46
|
52
|
data () {
|
47
|
53
|
return {
|
48
|
54
|
logoTitle: '',
|
|
@@ -126,10 +132,9 @@ export default {
|
126
|
132
|
}
|
127
|
133
|
},
|
128
|
134
|
mounted () {
|
129
|
|
- const loginUser = JSON.parse(localStorage.getItem('user'))
|
130
|
|
- const hosId = loginUser.user.currentHospital ? loginUser.user.currentHospital.id : ''
|
131
|
135
|
this.runTime()
|
132
|
|
- this.getSysNameAndLogo(hosId)
|
|
136
|
+ this.getSysNameAndLogo(this.getHosId)
|
|
137
|
+ console.log('this.getHosId:', this.getHosId)
|
133
|
138
|
},
|
134
|
139
|
beforeDestroy () {
|
135
|
140
|
clearTimeout(this.timer)
|