Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
| | |
| | | content: opt.content, |
| | | area: opt.area |
| | | } */ |
| | | self.closeAll() |
| | | var options = mergeJson(opt, defOptions) |
| | | const id = `notification_${new Date().getTime()}_${seed++}` |
| | | options.id = id |
| | |
| | | * @return {[type]} [description] |
| | | */ |
| | | self.close = function (id) { |
| | | console.log(id) |
| | | const oElm = document.getElementById(id).parentElement |
| | | if (oElm) { |
| | | document.body.removeChild(oElm) |
| | |
| | | * @param {[type]} id [description] |
| | | * @return {[type]} [description] |
| | | */ |
| | | self.closeAll = function (type = -1) { |
| | | const types = { |
| | | page: 0, |
| | | iframe: 1 |
| | | } |
| | | if (type === -1) { |
| | | for (const k in self.instances) { |
| | | self.close(k) |
| | | } |
| | | } else { |
| | | const targetType = types[type] |
| | | for (const k in self.instances) { |
| | | if (self.instances[k].type === targetType) { |
| | | self.close(k) |
| | | } |
| | | } |
| | | self.closeAll = function () { |
| | | for (const k in self.instances) { |
| | | self.close(k) |
| | | } |
| | | } |
| | | /** |
| | |
| | | <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="max"></i> |
| | | <i class="el-icon-circle-close" @click="close"></i> |
| | | </div> |
| | | <div class="public-bounced-content" :id="id"> |
| | |
| | | cls: { |
| | | 'vl-notify-iframe': true |
| | | }, |
| | | style: {}, |
| | | id: 'vlip' + new Date().getTime() |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | contentStyle () { |
| | | return { |
| | | height: 'calc(100% - 50px)', // parseInt(this.options.area[1]) - 50 + "px", |
| | | minHeight: '20px', |
| | | overflow: 'auto' |
| | | } |
| | | } |
| | | }, |
| | | async mounted () { |
| | | helper.hiddenScrollBar(this.options) |
| | |
| | | }) |
| | | 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 |
| | | } |
| | | } |
| | | } |