调整权限分配时间限制
This commit is contained in:
parent
405158b2e3
commit
b43009ab06
@ -216,9 +216,8 @@ class Jlmap {
|
|||||||
(list || []).forEach(elem => {
|
(list || []).forEach(elem => {
|
||||||
const code = elem.code;
|
const code = elem.code;
|
||||||
const type = elem._type;
|
const type = elem._type;
|
||||||
// const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||||
// const nDevice = deepAssign(oDevice || {}, elem);
|
// const oDevice = deviceFactory(type, elem, this.showConfig);
|
||||||
const oDevice = deviceFactory(type, elem, this.showConfig);
|
|
||||||
const nDevice = deepAssign(oDevice || {}, elem);
|
const nDevice = deepAssign(oDevice || {}, elem);
|
||||||
this.$painter.delete(oDevice);
|
this.$painter.delete(oDevice);
|
||||||
delete this.mapDevice[code];
|
delete this.mapDevice[code];
|
||||||
|
@ -161,6 +161,14 @@ export default {
|
|||||||
let endTime;
|
let endTime;
|
||||||
let startTime;
|
let startTime;
|
||||||
if (this.formModel.date) {
|
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];
|
endTime = this.formModel.date[1];
|
||||||
startTime = this.formModel.date[0];
|
startTime = this.formModel.date[0];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user