diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 6021aad5d..472eeef36 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -216,9 +216,8 @@ class Jlmap { (list || []).forEach(elem => { const code = elem.code; const type = elem._type; - // const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig); - // const nDevice = deepAssign(oDevice || {}, elem); - const oDevice = deviceFactory(type, elem, this.showConfig); + const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig); + // const oDevice = deviceFactory(type, elem, this.showConfig); const nDevice = deepAssign(oDevice || {}, elem); this.$painter.delete(oDevice); delete this.mapDevice[code]; diff --git a/src/views/components/limits/distribute.vue b/src/views/components/limits/distribute.vue index a52e3a77c..a12c06355 100644 --- a/src/views/components/limits/distribute.vue +++ b/src/views/components/limits/distribute.vue @@ -161,6 +161,14 @@ export default { let endTime; let startTime; if (this.formModel.date) { + const h = new Date().getHours(); + const m = new Date().getMinutes(); + if (+new Date(this.formModel.date[0]) < +new Date()) { + this.formModel.date[0] = `${this.formModel.date[0].split(' ')[0]} ${h < 10 ? '0' + h : h }:${m < 10 ? '0' + m : m }:00`; + } + if (+new Date(this.formModel.date[1]) < +new Date()) { + this.formModel.date[1] = `${this.formModel.date[1].split(' ')[0]} ${h < 10 ? '0' + h : h }:${m < 10 ? '0' + m : m }:00`; + } endTime = this.formModel.date[1]; startTime = this.formModel.date[0]; }