Browse Source

youhua

master
4670101279 2 years ago
parent
commit
1b1296ed45
  1. 23
      .gitignore
  2. 10
      src/views/data/currdata/index.vue
  3. 2
      src/views/data/monitor/index.vue
  4. 4
      src/views/data/photo/index.vue
  5. 157
      src/views/web/camera/index.vue

23
.gitignore vendored

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
tests/**/coverage/
tests/e2e/reports
selenium-debug.log
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
package-lock.json
yarn.lock

10
src/views/data/currdata/index.vue

@ -9,10 +9,10 @@ @@ -9,10 +9,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="摄像机IP" prop="ip">
<el-form-item label="水位计名称" prop="ip">
<el-input
v-model="queryParams.stnm"
placeholder="请输入摄像机IP"
placeholder="请输入水位计名称"
clearable
@keyup.enter.native="handleQuery"
/>
@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
<el-table v-loading="loading" :data="currdataList"
border>
<el-table-column label="站点名称" align="center" prop="stnm" />
<el-table-column label="摄像机IP" align="center" prop="ip" />
<el-table-column label="水位计名称" align="center" prop="ip" />
<el-table-column label="最新数值" align="center" prop="value" />
<el-table-column label="最新上传时间" align="center" prop="tm" width="180" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
<el-form-item label="测站名称" prop="stnm">
<el-input v-model="form.stnm" :disabled="true" />
</el-form-item>
<el-form-item label="摄像机IP" prop="stcd">
<el-form-item label="水位计名称" prop="stcd">
<el-input v-model="form.stcd" :disabled="true" />
</el-form-item>
<el-form-item label="最新数值" prop="latestValue">
@ -91,7 +91,7 @@ export default { @@ -91,7 +91,7 @@ export default {
total: 100,
//
currdataList: [
{stnmId: 1,stnm:'鄞州公园',ip:'123.2.4.1',value:'2.95',tm: '2022-06-08 13:00:00'},
{stnmId: 1,stnm:'鄞州公园',ip:'视频水位计-yzgy',value:'2.95',tm: '2022-06-08 13:00:00'},
{stnmId: 2,stnm:'画龙',ip:'123.2.3.2',value:'39.2',tm: '2022-06-08 13:00:00'},
{stnmId: 3,stnm:'大盘山',ip:'123.2.3.3',value:'41.2',tm: '2022-06-08 13:00:00'},
{stnmId: 4,stnm:'大石门',ip:'123.2.3.4',value:'45.3',tm: '2022-06-08 13:00:00'},

2
src/views/data/monitor/index.vue

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
<div class="container">
<img src="../../../assets/images/water.jpg" class="video">
<div class="list">
<div class="title">摄像机列表</div><hr />
<div class="title">水位计列表</div><hr />
<div class="station" v-for="item in currdataList" :key="item.stnmId">
{{item.stnm + " (" + item.ip + ")"}}
</div>

4
src/views/data/photo/index.vue

@ -9,10 +9,10 @@ @@ -9,10 +9,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="摄像机IP" prop="ip">
<el-form-item label="水位计" prop="ip">
<el-input
v-model="queryParams.stnm"
placeholder="请输入摄像机IP"
placeholder="请输入水位计名称"
clearable
@keyup.enter.native="handleQuery"
/>

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

@ -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>

Loading…
Cancel
Save