调整权限分配时间限制

This commit is contained in:
zyy 2020-06-30 15:44:31 +08:00
parent 405158b2e3
commit b43009ab06
2 changed files with 10 additions and 3 deletions

View File

@ -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];

View File

@ -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];
} }