|
|
|
@ -77,6 +77,13 @@
@@ -77,6 +77,13 @@
|
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-setting" |
|
|
|
|
@click="openFtpCfg(scope.row)" |
|
|
|
|
v-hasPermi="['web:camera:edit']" |
|
|
|
|
>FTP配置</el-button> |
|
|
|
|
<el-button |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
@ -132,6 +139,66 @@
@@ -132,6 +139,66 @@
|
|
|
|
|
<el-button @click="cancel">取 消</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- ftp配置对话框 --> |
|
|
|
|
<el-dialog title="FTP配置" :visible.sync="ftp.open"> |
|
|
|
|
<div class="container"> |
|
|
|
|
<!-- 表单 --> |
|
|
|
|
<div class="ftpform"> |
|
|
|
|
<el-form :model="ftp.form" :label-width="ftp.width"> |
|
|
|
|
<el-form-item label="启用"> |
|
|
|
|
<el-switch v-model="ftp.run"></el-switch> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="服务器地址"> |
|
|
|
|
<el-input v-model="ftp.form.address"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="服务器端口"> |
|
|
|
|
<el-input v-model="ftp.form.port"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="用户名"> |
|
|
|
|
<el-input v-model="ftp.form.username"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="密码"> |
|
|
|
|
<el-input v-model="ftp.form.password"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="FTP图片路径"> |
|
|
|
|
<el-input v-model="ftp.form.pathRule" type="textarea" :rows="3" ></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
<!-- 参考表格 --> |
|
|
|
|
<div class="table"> |
|
|
|
|
<div class="head">路径配置参考</div> |
|
|
|
|
<div class="content"> |
|
|
|
|
<div class="tips"> |
|
|
|
|
<span>%Y: 年</span> |
|
|
|
|
<span>%M: 月</span> |
|
|
|
|
<span>%D: 日</span> |
|
|
|
|
<span>%h: 时</span> |
|
|
|
|
<span>%m: 分</span> |
|
|
|
|
<span>%s: 秒</span> |
|
|
|
|
<span>%u: 毫秒</span> |
|
|
|
|
<span>%c: 通道</span> |
|
|
|
|
<span>%n: 设备序列号</span> |
|
|
|
|
<span>%i: 设备ip</span> |
|
|
|
|
<span>%e: 事件名称</span> |
|
|
|
|
<span>%a: MAC地址</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="notice"> |
|
|
|
|
<div>注意: </div> |
|
|
|
|
<div> |
|
|
|
|
文件夹名以/隔开; 多个%%自动转为一个%; |
|
|
|
|
不可出现路径代码提示中没有的"%"+字符组合, 否则将保存失败! |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="ftp.open = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="ftpConfirm">确 定</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -174,6 +241,21 @@ export default {
@@ -174,6 +241,21 @@ export default {
|
|
|
|
|
form: {}, |
|
|
|
|
// 表单校验 |
|
|
|
|
rules: { |
|
|
|
|
}, |
|
|
|
|
// ftp配置 |
|
|
|
|
ftp: { |
|
|
|
|
open: false, |
|
|
|
|
form: { |
|
|
|
|
address: '', |
|
|
|
|
port: '', |
|
|
|
|
username: '', |
|
|
|
|
password: '', |
|
|
|
|
pathRule: '', |
|
|
|
|
isEnable: '', |
|
|
|
|
devsn: '' |
|
|
|
|
}, |
|
|
|
|
run: false, |
|
|
|
|
width: '100px' |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
@ -210,6 +292,19 @@ export default {
@@ -210,6 +292,19 @@ export default {
|
|
|
|
|
}; |
|
|
|
|
this.resetForm("form"); |
|
|
|
|
}, |
|
|
|
|
// 表单重置 |
|
|
|
|
ftpCfgReset() { |
|
|
|
|
this.ftp.form = { |
|
|
|
|
address: '', |
|
|
|
|
port: '', |
|
|
|
|
username: '', |
|
|
|
|
password: '', |
|
|
|
|
pathRule: '', |
|
|
|
|
isEnable: '', |
|
|
|
|
devsn: '' |
|
|
|
|
}; |
|
|
|
|
this.resetForm("form"); |
|
|
|
|
}, |
|
|
|
|
/** 搜索按钮操作 */ |
|
|
|
|
handleQuery() { |
|
|
|
|
this.queryParams.pageNum = 1; |
|
|
|
@ -243,6 +338,25 @@ export default {
@@ -243,6 +338,25 @@ export default {
|
|
|
|
|
this.title = "修改"; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
async openFtpCfg(row){ |
|
|
|
|
this.ftpCfgReset(); |
|
|
|
|
const id = row.id; |
|
|
|
|
let res = await this.$axiosGet('/camera/ftp/getNetCfg',{'cameraId': id}); |
|
|
|
|
if(res.code === 0){ |
|
|
|
|
this.ftp.form = res.data; |
|
|
|
|
this.ftp.run = this.ftp.form.isEnable == 1; |
|
|
|
|
this.ftp.open = true; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 发送ftp配置表单 |
|
|
|
|
async ftpConfirm() { |
|
|
|
|
this.ftp.form.isEnable = this.ftp.run ? 1 : 0; |
|
|
|
|
let res = await this.$axiosPost('/camera/ftp/editNetCfg',this.ftp.form); |
|
|
|
|
if(res.code === 0){ |
|
|
|
|
this.$modal.msgSuccess("修改成功"); |
|
|
|
|
this.ftp.open = false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
async reboot(row) { |
|
|
|
|
const id = row.id; |
|
|
|
|
const status = row.status; |
|
|
|
@ -317,3 +431,46 @@ export default {
@@ -317,3 +431,46 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
.container { |
|
|
|
|
display: flex; |
|
|
|
|
} |
|
|
|
|
.ftpform { |
|
|
|
|
width: 300px; |
|
|
|
|
margin-right: 50px; |
|
|
|
|
} |
|
|
|
|
.ftpform .el-form { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
.table { |
|
|
|
|
flex: 1; |
|
|
|
|
} |
|
|
|
|
.head { |
|
|
|
|
font-size: 24px; |
|
|
|
|
line-height: 36px; |
|
|
|
|
text-align: center; |
|
|
|
|
height: 36px; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
border-radius: 2px; |
|
|
|
|
box-shadow: |
|
|
|
|
1px 1px 2px hsla(200, 88%, 55%, .22), |
|
|
|
|
inset -2px -2px 2px hsla(200, 88%, 55%, .22), |
|
|
|
|
inset 0 0 1px hsla(200, 88%, 55%, .22); |
|
|
|
|
} |
|
|
|
|
.tips { |
|
|
|
|
margin: 10px 0; |
|
|
|
|
} |
|
|
|
|
.tips span { |
|
|
|
|
display: grid; |
|
|
|
|
grid: 1fr/1fr 10px; |
|
|
|
|
} |
|
|
|
|
.notice { |
|
|
|
|
color: #f33; |
|
|
|
|
padding-right: 20px; |
|
|
|
|
display: flex; |
|
|
|
|
} |
|
|
|
|
.notice div:first-child { |
|
|
|
|
width: 80px; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|