Browse Source

优化

master
blankk 2 years ago
parent
commit
eaf4149774
  1. 135
      src/views/web/camera/index.vue

135
src/views/web/camera/index.vue

@ -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']">自动重启配置
@ -239,6 +241,79 @@
</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 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 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="updateDateForm()"> </el-button>
</div>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -301,6 +376,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 +412,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 +526,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 +576,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;
@ -557,6 +675,23 @@ export default {
this.restartcfg.open = false; this.restartcfg.open = false;
} }
}, },
//
showDate(row){
//
this.updateDateReset()
this.updateDate.queryForm.id = row.id;
this.getDate(row.id);
this.updateDate.open = true;
},
//
async getDate(id){
let res = await this.$axiosGet('/web/camera/getDate/' + id);
console.log(res.data)
},
//
updateDateForm(){
console.log(this.updateDate.queryForm)
},
reboot(row) { reboot(row) {
const id = row.id; const id = row.id;
const status = row.status; const status = row.status;

Loading…
Cancel
Save