首页添加参数配置

ds1.0
fanluyan 2 years ago
parent e867fdb04e
commit f1ae253314

@ -9,7 +9,12 @@
<div class="captureBoxVideo"> <div class="captureBoxVideo">
<div class="flexnr"> <div class="flexnr">
<div class="wt80">通道:</div> <div class="wt80">通道:</div>
<el-select v-model="selaccess" placeholder="请选择" class="mr20"> <el-select
v-model="selaccess"
placeholder="请选择"
class="mr20"
@change="clearform"
>
<el-option <el-option
v-for="item in accesslist" v-for="item in accesslist"
:key="item.channelid" :key="item.channelid"
@ -144,7 +149,10 @@
<!-- <el-button type="primary" @click="submitbtn('setForm')" <!-- <el-button type="primary" @click="submitbtn('setForm')"
>确认</el-button >确认</el-button
> --> > -->
<el-button type="primary" @click="videoSet('setForm')" <el-button
type="primary"
@click="videoSet('setForm')"
:loading="setloading"
>确认</el-button >确认</el-button
> >
</el-form-item> </el-form-item>
@ -169,6 +177,7 @@ export default {
loading: false, loading: false,
isShow: false, isShow: false,
searchloading: false, searchloading: false,
setloading: false,
activeName: "1", // activeName: "1", //
accesslist: [], // accesslist: [], //
ratiolist: [], ratiolist: [],
@ -339,6 +348,7 @@ export default {
//videoSearch //videoSearch
// --act=videoparams [0xD5] --flag=[Request Set Flag, default is set=1, 0: request] --channel=[Channel No] --preset=[Preset No] format=[Video Format: 1 QVGA 2 VGA 3 480p 4 720P 5 1080P] time=[seconds] // --act=videoparams [0xD5] --flag=[Request Set Flag, default is set=1, 0: request] --channel=[Channel No] --preset=[Preset No] format=[Video Format: 1 QVGA 2 VGA 3 480p 4 720P 5 1080P] time=[seconds]
videoSearch() { videoSearch() {
this.searchloading = true;
let params = [ let params = [
{ {
name: "act", name: "act",
@ -369,6 +379,7 @@ export default {
}, },
videoSet(setForm) { videoSet(setForm) {
console.log(this.setForm); console.log(this.setForm);
this.setloading = true;
let params = [ let params = [
{ {
name: "act", name: "act",
@ -428,6 +439,8 @@ export default {
this.i = 0; this.i = 0;
console.log("终止轮询"); console.log("终止轮询");
// && res.data.result == 255 // && res.data.result == 255
this.searchloading = false;
this.setloading = false;
console.log(JSON.parse(res.data.data)); console.log(JSON.parse(res.data.data));
this.capturenr = JSON.parse(res.data.data); this.capturenr = JSON.parse(res.data.data);
this.$message({ this.$message({
@ -440,6 +453,8 @@ export default {
window.clearInterval(this.timer); window.clearInterval(this.timer);
this.timer = null; this.timer = null;
this.i = 0; this.i = 0;
this.searchloading = false;
this.setloading = false;
this.$message({ this.$message({
duration: 1500, duration: 1500,
showClose: true, showClose: true,
@ -450,9 +465,18 @@ export default {
}) })
.catch(); .catch();
}, },
clearform() {
console.log("清除其他数据");
this.capturenr = {};
this.setForm = {};
this.searchloading = false;
this.setloading = false;
},
clearData() { clearData() {
this.capturenr = {}; this.capturenr = {};
this.setForm = {}; this.setForm = {};
this.searchloading = false;
this.setloading = false;
}, },
}, },
}; };

@ -105,7 +105,7 @@
<el-form-item> <el-form-item>
<el-input <el-input
v-model="formdata.search" v-model="formdata.search"
placeholder="请输入设备名称" placeholder="请输入线路/杆塔/设备名称"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>

Loading…
Cancel
Save