Browse Source

抽屉bug修复

360view
bianyaqi 2 years ago
parent
commit
941b1f8db7
  1. 3
      src/components/360View/drawer.vue
  2. 14
      src/components/360View/index1.vue
  3. 2
      src/components/360View/shrink.vue

3
src/components/360View/drawer.vue

@ -94,7 +94,8 @@ export default {
closeByMask() { closeByMask() {
this.maskClosable && this.$emit('update:display', false) this.maskClosable && this.$emit('update:display', false)
}, },
closeByButton() {
closeByButton(val) {
this.$emit('display', val)
this.$emit('update:display', false) this.$emit('update:display', false)
document.getElementsByClassName('drawer')[0].style.display = 'none' document.getElementsByClassName('drawer')[0].style.display = 'none'
}, },

14
src/components/360View/index1.vue

@ -196,7 +196,7 @@
</div> </div>
</div> </div>
<shrink ref="shrinks" :arrow-type="1" @display="handleDisplay" @changeType="changeType" /> <shrink ref="shrinks" :arrow-type="1" @display="handleDisplay" @changeType="changeType" />
<drawer ref="drawers" :cur-type="dataType" :display.sync="display" :width="drawerWidth" :mask="true">
<drawer ref="drawers" :cur-type="dataType" :display.sync="display" :width="drawerWidth" :mask="true" @display="closeDrawer">
<!-- 关键指标--> <!-- 关键指标-->
<key-indicators <key-indicators
v-if="dataType === 1" v-if="dataType === 1"
@ -289,6 +289,13 @@ export default {
dataForm: {} dataForm: {}
} }
}, },
watch: {
display(val) {
if (val) {
this.$refs.drawers.$el.style.display = 'inline-block'
}
}
},
created() { created() {
this.getPatientData() this.getPatientData()
this.getTimeAxisData() this.getTimeAxisData()
@ -320,11 +327,9 @@ export default {
// //
eventBus.$off('sendForData') eventBus.$off('sendForData')
eventBus.$on('sendForData', data => { eventBus.$on('sendForData', data => {
console.log(data)
const arr = this.foreList.concat(data) const arr = this.foreList.concat(data)
const id = 'id' const id = 'id'
this.foreList = arr.reduce((all, next) => all.some((item) => item[id] == next[id]) ? all : [...all, next], []) this.foreList = arr.reduce((all, next) => all.some((item) => item[id] == next[id]) ? all : [...all, next], [])
console.log(this.foreList)
this.openDataDrink() this.openDataDrink()
}) })
}, },
@ -341,6 +346,9 @@ export default {
} }
}) })
}, },
closeDrawer(val) {
this.display = val
},
changeType(val) { changeType(val) {
this.dataType = val this.dataType = val
this.display = true this.display = true

2
src/components/360View/shrink.vue

@ -76,7 +76,7 @@ export default {
document.getElementsByClassName('key-indicators-shrink')[0].style.zIndex = 999 document.getElementsByClassName('key-indicators-shrink')[0].style.zIndex = 999
} else { } else {
this.$emit('display', false) this.$emit('display', false)
document.getElementsByClassName('key-indicators-shrink')[0].style.zIndex = 9999
document.getElementsByClassName('key-indicators-shrink')[0].style.zIndex = 999
} }
}, },
handleType(type) { handleType(type) {

Loading…
Cancel
Save