|
|
|
@ -260,7 +260,7 @@
@@ -260,7 +260,7 @@
|
|
|
|
|
<el-form-item label="亮度"> |
|
|
|
|
<el-input-number v-model="updateDate.queryForm.nBrightness" controls-position="right" :min="1" :max="100"></el-input-number> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="时间段1"> |
|
|
|
|
<el-form-item v-if="updateDate.queryForm.emMode=='3'" label="时间段1"> |
|
|
|
|
<el-time-picker |
|
|
|
|
size="small" |
|
|
|
|
align="center" |
|
|
|
@ -284,7 +284,7 @@
@@ -284,7 +284,7 @@
|
|
|
|
|
placeholder="任意时间点"> |
|
|
|
|
</el-time-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="时间段2"> |
|
|
|
|
<el-form-item v-if="updateDate.queryForm.emMode=='3'" label="时间段2"> |
|
|
|
|
<el-time-picker |
|
|
|
|
size="small" |
|
|
|
|
align="center" |
|
|
|
@ -310,7 +310,7 @@
@@ -310,7 +310,7 @@
|
|
|
|
|
</el-form> |
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="updateDate.open = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="updateDateForm()">确 定</el-button> |
|
|
|
|
<el-button type="primary" @click="setLightCfg()">确 定</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
@ -319,6 +319,7 @@
@@ -319,6 +319,7 @@
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { formatDate } from "../../../utils/common"; |
|
|
|
|
import { Message } from 'element-ui' |
|
|
|
|
export default { |
|
|
|
|
name: "Camera", |
|
|
|
|
data() { |
|
|
|
@ -680,17 +681,42 @@ export default {
@@ -680,17 +681,42 @@ export default {
|
|
|
|
|
// 重置表单 |
|
|
|
|
this.updateDateReset() |
|
|
|
|
this.updateDate.queryForm.id = row.id; |
|
|
|
|
this.getDate(row.id); |
|
|
|
|
this.updateDate.open = true; |
|
|
|
|
this.getLigntCfg(row.id); |
|
|
|
|
}, |
|
|
|
|
// 查询时间 |
|
|
|
|
async getDate(id){ |
|
|
|
|
let res = await this.$axiosGet('/web/camera/getDate/' + id); |
|
|
|
|
console.log(res.data) |
|
|
|
|
async getLigntCfg(id){ |
|
|
|
|
let res = await this.$axiosGet('/web/camera/getLigntCfg/' + id); |
|
|
|
|
if(res.code === 0){ |
|
|
|
|
let objDate = res.data |
|
|
|
|
this.updateDate.queryForm.emMode = objDate.emMode + ''; |
|
|
|
|
this.updateDate.queryForm.nPreValue = objDate.nPreValue; |
|
|
|
|
this.updateDate.queryForm.nBrightness = objDate.nBrightness; |
|
|
|
|
this.updateDate.queryForm.startTime1 = new Date(2022,12,12,objDate.startHour,objDate.startMinute,objDate.startSecond) |
|
|
|
|
this.updateDate.queryForm.endTime1 = new Date(2022,12,12,objDate.endHour,objDate.endMinute,objDate.endSecond) |
|
|
|
|
this.updateDate.queryForm.startTime2 = new Date(2022,12,12,objDate.startHour2,objDate.startMinute2,objDate.startSecond2) |
|
|
|
|
this.updateDate.queryForm.endTime2 = new Date(2022,12,12,objDate.endHour2,objDate.endMinute2,objDate.endSecond2) |
|
|
|
|
this.updateDate.open = true; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//修改时间 |
|
|
|
|
updateDateForm(){ |
|
|
|
|
console.log(this.updateDate.queryForm) |
|
|
|
|
async setLightCfg(){ |
|
|
|
|
let queryData = { |
|
|
|
|
id: this.updateDate.queryForm.id, |
|
|
|
|
emMode: this.updateDate.queryForm.emMode, |
|
|
|
|
nPreValue: this.updateDate.queryForm.nPreValue, |
|
|
|
|
nBrightness: this.updateDate.queryForm.nBrightness, |
|
|
|
|
startTime1:formatDate(this.updateDate.queryForm.startTime1).split(' ')[1], |
|
|
|
|
endTime1: formatDate(this.updateDate.queryForm.endTime1).split(' ')[1], |
|
|
|
|
startTime2: formatDate(this.updateDate.queryForm.startTime2).split(' ')[1], |
|
|
|
|
endTime2: formatDate(this.updateDate.queryForm.endTime2).split(' ')[1], |
|
|
|
|
}; |
|
|
|
|
let res = await this.$axiosPost('/web/camera/setLightCfg',queryData); |
|
|
|
|
if (res.code === 0){ |
|
|
|
|
Message.success(res.msg) |
|
|
|
|
this.updateDate.open = false; |
|
|
|
|
}else{ |
|
|
|
|
Message.error(res.msg) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
reboot(row) { |
|
|
|
|
const id = row.id; |
|
|
|
|