| | |
| | | <template> |
| | | <div class="public-bounced map-background" v-drag> |
| | | <div class="public-bounced map-background" v-drag :style="style"> |
| | | <div class="public-bounced-title panel-title" ref="publicBounced"> |
| | | <span>{{title}}</span> |
| | | <i class="el-icon-circle-close" @click="close"></i> |
| | |
| | | export default { |
| | | data () { |
| | | return { |
| | | cls: { |
| | | 'vl-notify-iframe': true |
| | | }, |
| | | id: 'vlip' + new Date().getTime() |
| | | style: {}, |
| | | id: 'sewer_layeropen_' + new Date().getTime() |
| | | } |
| | | }, |
| | | props: { |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | contentStyle () { |
| | | return { |
| | | height: 'calc(100% - 50px)', // parseInt(this.options.area[1]) - 50 + "px", |
| | | minHeight: '20px', |
| | | overflow: 'auto' |
| | | } |
| | | } |
| | | }, |
| | | async mounted () { |
| | | helper.hiddenScrollBar(this.options) |
| | | mounted () { |
| | | }, |
| | | methods: { |
| | | close () { |
| | | this.layer.close(this.id) |
| | | }, |
| | | init () { |
| | | const propsData = helper.deepClone(this.content.content.data) || {} |
| | | const propsData = helper.deepClone(this.content.data) || {} |
| | | propsData.layerid = this.id |
| | | propsData.lydata = this.content.data |
| | | propsData.lyoption = this.options |
| | | const instance = new this.content.content({ |
| | | // 具体参数信息,请参考vue源码 |
| | | parent: this.content.parent, |
| | | // parent: this.content.parent, |
| | | propsData: propsData |
| | | }) |
| | | instance.vm = instance.$mount() |
| | | document.getElementById(this.id).appendChild(instance.vm.$el) |
| | | }, |
| | | max () { |
| | | // 最大化窗口 |
| | | let height = document.documentElement.clientHeight |
| | | if (height % 2 === 1) { |
| | | height += 1 |
| | | } |
| | | this.style = { |
| | | overflow: 'hidden', |
| | | left: '50%', |
| | | width: '100%', |
| | | height: height + 'px', |
| | | minHeight: '42px' |
| | | } |
| | | this.maxMiniState = 2 |
| | | }, |
| | | maxmini () { // 还原 |
| | | document.getElementById(this.options.id).removeAttribute('style') |
| | | this.maxMiniState = 0 |
| | | } |
| | | } |
| | | } |