|
|
@ -260,7 +260,7 @@ |
|
|
|
<el-form-item label="亮度"> |
|
|
|
<el-form-item label="亮度"> |
|
|
|
<el-input-number v-model="updateDate.queryForm.nBrightness" controls-position="right" :min="1" :max="100"></el-input-number> |
|
|
|
<el-input-number v-model="updateDate.queryForm.nBrightness" controls-position="right" :min="1" :max="100"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="时间段1"> |
|
|
|
<el-form-item v-if="updateDate.queryForm.emMode=='3'" label="时间段1"> |
|
|
|
<el-time-picker |
|
|
|
<el-time-picker |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
align="center" |
|
|
|
align="center" |
|
|
@ -284,7 +284,7 @@ |
|
|
|
placeholder="任意时间点"> |
|
|
|
placeholder="任意时间点"> |
|
|
|
</el-time-picker> |
|
|
|
</el-time-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="时间段2"> |
|
|
|
<el-form-item v-if="updateDate.queryForm.emMode=='3'" label="时间段2"> |
|
|
|
<el-time-picker |
|
|
|
<el-time-picker |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
align="center" |
|
|
|
align="center" |
|
|
@ -310,7 +310,7 @@ |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="updateDate.open = false">取 消</el-button> |
|
|
|
<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> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
@ -319,6 +319,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { formatDate } from "../../../utils/common"; |
|
|
|
import { formatDate } from "../../../utils/common"; |
|
|
|
|
|
|
|
import { Message } from 'element-ui' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "Camera", |
|
|
|
name: "Camera", |
|
|
|
data() { |
|
|
|
data() { |
|
|
@ -680,17 +681,42 @@ export default { |
|
|
|
// 重置表单 |
|
|
|
// 重置表单 |
|
|
|
this.updateDateReset() |
|
|
|
this.updateDateReset() |
|
|
|
this.updateDate.queryForm.id = row.id; |
|
|
|
this.updateDate.queryForm.id = row.id; |
|
|
|
this.getDate(row.id); |
|
|
|
this.getLigntCfg(row.id); |
|
|
|
this.updateDate.open = true; |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 查询时间 |
|
|
|
// 查询时间 |
|
|
|
async getDate(id){ |
|
|
|
async getLigntCfg(id){ |
|
|
|
let res = await this.$axiosGet('/web/camera/getDate/' + id); |
|
|
|
let res = await this.$axiosGet('/web/camera/getLigntCfg/' + id); |
|
|
|
console.log(res.data) |
|
|
|
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(){ |
|
|
|
async setLightCfg(){ |
|
|
|
console.log(this.updateDate.queryForm) |
|
|
|
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) { |
|
|
|
reboot(row) { |
|
|
|
const id = row.id; |
|
|
|
const id = row.id; |
|
|
|