|
|
@ -95,6 +95,8 @@ |
|
|
|
</el-dropdown-item> |
|
|
|
</el-dropdown-item> |
|
|
|
<el-dropdown-item command="showLog" icon="el-icon-view" v-hasPermi="['web:camera:remove']">查看日志 |
|
|
|
<el-dropdown-item command="showLog" icon="el-icon-view" v-hasPermi="['web:camera:remove']">查看日志 |
|
|
|
</el-dropdown-item> |
|
|
|
</el-dropdown-item> |
|
|
|
|
|
|
|
<el-dropdown-item command="showDate" icon="el-icon-view" v-hasPermi="['web:camera:remove']">查看时间 |
|
|
|
|
|
|
|
</el-dropdown-item> |
|
|
|
<el-dropdown-item command="reboot" icon="el-icon-refresh" v-hasPermi="['web:camera:remove']">重启 |
|
|
|
<el-dropdown-item command="reboot" icon="el-icon-refresh" v-hasPermi="['web:camera:remove']">重启 |
|
|
|
</el-dropdown-item> |
|
|
|
</el-dropdown-item> |
|
|
|
<el-dropdown-item command="autocfg" icon="el-icon-refresh" v-hasPermi="['web:camera:remove']">自动重启配置 |
|
|
|
<el-dropdown-item command="autocfg" icon="el-icon-refresh" v-hasPermi="['web:camera:remove']">自动重启配置 |
|
|
@ -220,7 +222,7 @@ |
|
|
|
end-placeholder="结束日期" @change="chooseTimeRange" :picker-options="setDateRange"> |
|
|
|
end-placeholder="结束日期" @change="chooseTimeRange" :picker-options="setDateRange"> |
|
|
|
</el-date-picker> |
|
|
|
</el-date-picker> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button> |
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleAutoQuery">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-table :data="logInfoList" stripe style="width: 100%"> |
|
|
|
<el-table :data="logInfoList" stripe style="width: 100%"> |
|
|
|
|
|
|
|
|
|
|
@ -239,11 +241,85 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="查看时间" :visible.sync="updateDate.open"> |
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
|
|
<el-form :model="updateDate.queryForm" label-width="80px"> |
|
|
|
|
|
|
|
<el-form-item label="模式"> |
|
|
|
|
|
|
|
<el-select v-model="updateDate.queryForm.emMode" placeholder="请选择模式" style="width: 200px;"> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in modelList" |
|
|
|
|
|
|
|
:key="item.value" |
|
|
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
|
|
:value="item.value"> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="预设亮度"> |
|
|
|
|
|
|
|
<el-input-number v-model="updateDate.queryForm.nPreValue" controls-position="right" :min="1" :max="100"></el-input-number> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<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 v-if="updateDate.queryForm.emMode=='3'" label="时间段1"> |
|
|
|
|
|
|
|
<el-time-picker |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
format="HH:mm:ss" |
|
|
|
|
|
|
|
style="width: 150px;margin-right: 5px;" |
|
|
|
|
|
|
|
v-model="updateDate.queryForm.startTime1" |
|
|
|
|
|
|
|
:picker-options="{ |
|
|
|
|
|
|
|
selectableRange: '00:00:00 - 23:59:59' |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
placeholder="任意时间点"> |
|
|
|
|
|
|
|
</el-time-picker> |
|
|
|
|
|
|
|
<el-time-picker |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
style="width: 150px" |
|
|
|
|
|
|
|
arrow-control |
|
|
|
|
|
|
|
v-model="updateDate.queryForm.endTime1" |
|
|
|
|
|
|
|
:picker-options="{ |
|
|
|
|
|
|
|
selectableRange: '00:00:00 - 23:59:59' |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
placeholder="任意时间点"> |
|
|
|
|
|
|
|
</el-time-picker> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item v-if="updateDate.queryForm.emMode=='3'" label="时间段2"> |
|
|
|
|
|
|
|
<el-time-picker |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
style="width: 150px;margin-right: 5px;" |
|
|
|
|
|
|
|
v-model="updateDate.queryForm.startTime2" |
|
|
|
|
|
|
|
:picker-options="{ |
|
|
|
|
|
|
|
selectableRange: '00:00:00 - 23:59:59' |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
placeholder="任意时间点"> |
|
|
|
|
|
|
|
</el-time-picker> |
|
|
|
|
|
|
|
<el-time-picker |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
style="width: 150px" |
|
|
|
|
|
|
|
arrow-control |
|
|
|
|
|
|
|
v-model="updateDate.queryForm.endTime2" |
|
|
|
|
|
|
|
:picker-options="{ |
|
|
|
|
|
|
|
selectableRange: '00:00:00 - 23:59:59' |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
placeholder="任意时间点"> |
|
|
|
|
|
|
|
</el-time-picker> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
|
|
<el-button @click="updateDate.open = false">取 消</el-button> |
|
|
|
|
|
|
|
<el-button type="primary" @click="setLightCfg()">确 定</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<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() { |
|
|
@ -301,6 +377,20 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
width: '100px' |
|
|
|
width: '100px' |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
modelList:[ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
value: '0', label: '强制关闭' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
value: '1', label: '强制开启' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
value: '2', label: '自动' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
value: '3', label: '自动时间' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
//自动重启设置 |
|
|
|
//自动重启设置 |
|
|
|
restartcfg: { |
|
|
|
restartcfg: { |
|
|
|
open: false, |
|
|
|
open: false, |
|
|
@ -323,6 +413,19 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
run: false, |
|
|
|
run: false, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
updateDate:{ |
|
|
|
|
|
|
|
open: false, |
|
|
|
|
|
|
|
queryForm: { |
|
|
|
|
|
|
|
id: '', |
|
|
|
|
|
|
|
emMode: '', |
|
|
|
|
|
|
|
nPreValue: '1', |
|
|
|
|
|
|
|
nBrightness: '1', |
|
|
|
|
|
|
|
startTime1: new Date(2022, 9, 10, 18, 40), |
|
|
|
|
|
|
|
endTime1: new Date(2022, 9, 10, 18, 40), |
|
|
|
|
|
|
|
startTime2: new Date(2022, 9, 10, 18, 40), |
|
|
|
|
|
|
|
endTime2: new Date(2022, 9, 10, 18, 40), |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
logInfoList: [], |
|
|
|
logInfoList: [], |
|
|
|
options: [{ |
|
|
|
options: [{ |
|
|
|
value: '0', |
|
|
|
value: '0', |
|
|
@ -424,6 +527,19 @@ export default { |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.resetForm("form"); |
|
|
|
this.resetForm("form"); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
updateDateReset(){ |
|
|
|
|
|
|
|
this.updateDate.queryForm= { |
|
|
|
|
|
|
|
id: '', |
|
|
|
|
|
|
|
emMode: '2', |
|
|
|
|
|
|
|
nPreValue: '1', |
|
|
|
|
|
|
|
nBrightness: '1', |
|
|
|
|
|
|
|
startTime1: new Date(2022, 9, 10, 18, 40), |
|
|
|
|
|
|
|
endTime1: new Date(2022, 9, 10, 18, 40), |
|
|
|
|
|
|
|
startTime2: new Date(2022, 9, 10, 18, 40), |
|
|
|
|
|
|
|
endTime2: new Date(2022, 9, 10, 18, 40), |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
/** 搜索按钮操作 */ |
|
|
|
/** 搜索按钮操作 */ |
|
|
|
handleQuery() { |
|
|
|
handleQuery() { |
|
|
|
this.queryParams.pageNum = 1; |
|
|
|
this.queryParams.pageNum = 1; |
|
|
@ -461,6 +577,9 @@ export default { |
|
|
|
case "showLog": |
|
|
|
case "showLog": |
|
|
|
this.showLog(row); |
|
|
|
this.showLog(row); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case "showDate": |
|
|
|
|
|
|
|
this.showDate(row); |
|
|
|
|
|
|
|
break; |
|
|
|
case "reboot": |
|
|
|
case "reboot": |
|
|
|
this.reboot(row); |
|
|
|
this.reboot(row); |
|
|
|
break; |
|
|
|
break; |
|
|
@ -548,7 +667,7 @@ export default { |
|
|
|
//发送自动重启配置表单 |
|
|
|
//发送自动重启配置表单 |
|
|
|
async restartcfgConfirm() { |
|
|
|
async restartcfgConfirm() { |
|
|
|
|
|
|
|
|
|
|
|
console.log(this.restartcfg.form) |
|
|
|
|
|
|
|
this.restartcfg.form.bEnable = this.restartcfg.run ? 1 : 0; |
|
|
|
this.restartcfg.form.bEnable = this.restartcfg.run ? 1 : 0; |
|
|
|
this.restartcfg.form.uHour = this.restartcfg.form.uHour.substring(0, 2) |
|
|
|
this.restartcfg.form.uHour = this.restartcfg.form.uHour.substring(0, 2) |
|
|
|
let res = await this.$axiosPost('/web/camera/setautocfg', this.restartcfg.form); |
|
|
|
let res = await this.$axiosPost('/web/camera/setautocfg', this.restartcfg.form); |
|
|
@ -557,6 +676,48 @@ export default { |
|
|
|
this.restartcfg.open = false; |
|
|
|
this.restartcfg.open = false; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 显示时间 |
|
|
|
|
|
|
|
showDate(row){ |
|
|
|
|
|
|
|
// 重置表单 |
|
|
|
|
|
|
|
this.updateDateReset() |
|
|
|
|
|
|
|
this.updateDate.queryForm.id = row.id; |
|
|
|
|
|
|
|
this.getLigntCfg(row.id); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 查询时间 |
|
|
|
|
|
|
|
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; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//修改时间 |
|
|
|
|
|
|
|
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) { |
|
|
|
reboot(row) { |
|
|
|
const id = row.id; |
|
|
|
const id = row.id; |
|
|
|
const status = row.status; |
|
|
|
const status = row.status; |
|
|
@ -615,11 +776,16 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
async handleQuery() { |
|
|
|
async handleAutoQuery() { |
|
|
|
|
|
|
|
if(this.timeStage == null || this.timeStage.length == 0 ){ |
|
|
|
|
|
|
|
this.$modal.msg("请选择时间"); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
let res = await this.$axiosGet('/web/camera/getloginfo', this.logform.queryForm); |
|
|
|
let res = await this.$axiosGet('/web/camera/getloginfo', this.logform.queryForm); |
|
|
|
|
|
|
|
|
|
|
|
if (res.code === 0) { |
|
|
|
if (res.code === 0) { |
|
|
|
this.logInfoList = res.data; |
|
|
|
this.logInfoList = res.data; |
|
|
|
|
|
|
|
this.$modal.msgSuccess("查询成功"); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
async register() { |
|
|
|
async register() { |
|
|
|