添加下发水印

ds1.0
fanluyan 2 years ago
parent df6f2ceb3f
commit fa6d458b89

@ -284,31 +284,32 @@
>
<el-tab-pane label="查询水印" name="first">
<div class="queryParam">
<el-form :model="waterForm" label-width="150px">
<el-form-item label="通道" prop="channelId">
<el-select
v-model="waterForm.channelId"
placeholder="请选择"
class="mr20"
<div class="channelBox">
<span class="title">通道</span>
<el-select
v-model="channelId"
placeholder="请选择"
class="mr20"
>
<el-option
v-for="item in accesslist"
:key="item.channelid"
:label="
item.alias !== null && item.alias !== ''
? item.alias
: item.channelname
"
:value="item.channelid"
>
<el-option
v-for="item in accesslist"
:key="item.channelid"
:label="
item.alias !== null && item.alias !== ''
? item.alias
: item.channelname
"
:value="item.channelid"
>
{{
item.alias !== null && item.alias !== ""
? item.alias
: item.channelname
}}
</el-option>
</el-select>
</el-form-item>
{{
item.alias !== null && item.alias !== ""
? item.alias
: item.channelname
}}
</el-option>
</el-select>
</div>
<el-form :model="waterForm" label-width="150px">
<el-form-item label="左下角水印">
<el-input
v-model="waterForm.leftBottom"
@ -335,31 +336,32 @@
</el-tab-pane>
<el-tab-pane label="设置水印" name="second">
<div class="queryParam">
<el-form :model="waterForm" label-width="150px">
<el-form-item label="通道" prop="channelId">
<el-select
v-model="waterForm.channelId"
placeholder="请选择"
class="mr20"
<div class="channelBox">
<span class="title">通道</span>
<el-select
v-model="channelId"
placeholder="请选择"
class="mr20"
>
<el-option
v-for="item in accesslist"
:key="item.channelid"
:label="
item.alias !== null && item.alias !== ''
? item.alias
: item.channelname
"
:value="item.channelid"
>
<el-option
v-for="item in accesslist"
:key="item.channelid"
:label="
item.alias !== null && item.alias !== ''
? item.alias
: item.channelname
"
:value="item.channelid"
>
{{
item.alias !== null && item.alias !== ""
? item.alias
: item.channelname
}}
</el-option>
</el-select>
</el-form-item>
{{
item.alias !== null && item.alias !== ""
? item.alias
: item.channelname
}}
</el-option>
</el-select>
</div>
<el-form :model="waterForm" label-width="150px">
<el-form-item label="左下角水印">
<el-input v-model="waterForm.leftBottom"></el-input>
</el-form-item>
@ -565,6 +567,7 @@ export default {
//
waterForm: {},
accesslist: [], //
channelId: 1,
waterLoading: false,
waterSetLoading: false,
runStatusForm: {},
@ -576,6 +579,7 @@ export default {
timer: null,
i: 0,
tabName: "",
};
},
mounted() {},
@ -601,6 +605,7 @@ export default {
this.$refs.videoCaptureref.getSingleAccess(this.rowData);
this.$refs.videoCaptureref.getRatio(this.rowData);
}
this.tabName = tab.label;
},
//
getSingleAccess() {
@ -609,7 +614,6 @@ export default {
.then((res) => {
this.accesslist = res.data.list;
// this.waterForm.channelId = res.data.list[0].channelid;
this.$set(this.waterForm, "channelId", res.data.list[0].channelid);
})
.catch((err) => {});
},
@ -958,7 +962,7 @@ export default {
{
name: "channel",
value: this.waterForm.channelId,
value: this.channelId,
},
{
name: "leftBottom",
@ -981,7 +985,8 @@ export default {
},
waterhandleClick() {
this.waterForm = {};
this.$set(this.waterForm, "channelId", this.accesslist[0].channelid);
this.channelId = 1;
this.i = 0;
this.timer = null;
clearInterval(this.timer);
@ -1052,21 +1057,26 @@ export default {
this.upperComputer = JSON.parse(res.data.data);
//cmdid
this.idParameter = JSON.parse(res.data.data);
let hexArray = this.upperComputer.ip
.toString(16)
.match(/.{1,2}/g)
.reverse();
console.log(hexArray);
for (let j = 0; j < hexArray.length; j++) {
console.log(hexArray[j]);
console.log(parseInt(hexArray[j], 16));
hexArray[j] = parseInt(hexArray[j], 16);
this.waterForm = JSON.parse(res.data.data);
console.log(this.tabName);
if (this.tabName == "上位机信息") {
let hexArray = this.upperComputer.ip
.toString(16)
.match(/.{1,2}/g)
.reverse();
console.log(hexArray);
for (let j = 0; j < hexArray.length; j++) {
console.log(hexArray[j]);
console.log(parseInt(hexArray[j], 16));
hexArray[j] = parseInt(hexArray[j], 16);
}
console.log(hexArray);
this.upperComputer.ip = hexArray.join(".");
//ip
console.log(this.idParameter);
}
console.log(hexArray);
this.upperComputer.ip = hexArray.join(".");
//ip
console.log(this.idParameter);
this.$message({
duration: 1500,
showClose: true,
@ -1171,6 +1181,7 @@ export default {
this.idParameter = {};
this.gpsForm = {};
this.waterForm = {};
this.channelId = 1;
this.i = 0;
clearInterval(this.timer);
this.timer = null;
@ -1248,6 +1259,18 @@ export default {
.el-input.is-disabled .el-input__inner {
color: #666;
}
.channelBox {
margin: 0 auto;
margin-bottom: 18px;
text-align: center;
.title {
width: 86px;
display: inline-block;
padding: 0 12px 0 0;
text-align: right;
}
}
}
}
</style>

Loading…
Cancel
Save