Commit 8a360e30 by 潘建波

添加变倍操作

1 parent f2d908c7
......@@ -51,7 +51,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -86,14 +86,14 @@
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<div style="margin-top: 28px;" hidden>
<el-pagination
style="float: right;"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]"
layout="prev, pager, next,sizes"
:page-sizes="[30, 50, 100, 200]"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -170,7 +170,7 @@ export default {
return {
total: 0,
page: 1,
pageSize: 20,
pageSize: 50,
tableData: [],
detailVisible: false,
eventCateData: [],
......@@ -188,7 +188,7 @@ export default {
},
components: {},
created() {
// this.getEventList();
this.getEventList();
this.getEventCate();
},
methods: {
......@@ -197,8 +197,14 @@ export default {
this.tableData = res.list_data;
});
},
cateChange() {
this.$api.codes.eventType({}, this.curcate).then(res => {
cateChange(unid) {
let offset = (this.page - 1) * this.pageSize;
let obj = {
limit: this.pageSize,
offset: offset
};
this.tableData = [];
this.$api.codes.eventType(obj, unid).then(res => {
this.tableData = res.list_data;
});
},
......
......@@ -33,7 +33,7 @@
type="index"
align="center"
label="#"
width="40"
width="60"
></el-table-column>
<el-table-column align="center" prop="code_unid" label="code_unid">
</el-table-column>
......@@ -77,14 +77,14 @@
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<div style="margin-top: 28px;" hidden>
<el-pagination
style="float: right;"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -242,34 +242,54 @@ export default {
});
},
saveAddCode() {
this.$api.codes
.addTrafficCode(this.codeData, this.curCateUnid)
.then(res => {
console.log(res);
});
let data = {
code_unid: this.codeData.code_unid,
code: this.codeData.code,
name: this.codeData.name,
note: this.codeData.note,
active: this.codeData.active
};
this.$api.codes.addTrafficCode(data, this.curCateUnid).then(res => {
console.log(res);
this.detailVisible = false;
this.cateChange(this.curCateUnid);
});
},
saveEditCode() {
saveEditCode() {
let data = {
"code_unid": this.codeData.code_unid,
"code":this.codeData.code,
"name":this.codeData.name,
"note":this.codeData.note,
"active":this.codeData.active }
code_unid: this.codeData.code_unid,
code: this.codeData.code,
name: this.codeData.name,
note: this.codeData.note,
active: this.codeData.active
};
this.$api.codes
.editTrafficCode(
data,
this.curCateUnid,
this.codeData.code_unid
)
.editTrafficCode(data, this.curCateUnid, this.codeData.code_unid)
.then(res => {
console.log(res);
this.detailVisible = false;
this.cateChange(this.curCateUnid);
});
},
deleteCode(index, row) {
this.$api.codes
.editTrafficCode(row, this.curCateUnid, row.code_unid)
.then(res => {
console.log(res);
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$api.codes
.deleteTrafficCode(this.curCateUnid, row.code_unid)
.then(res => {
console.log(res);
this.cateChange(this.curCateUnid);
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
});
});
},
handleSizeChange(val) {
......
......@@ -85,7 +85,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -207,7 +207,7 @@ export default {
unid: this.addVideoParam.addr_unid
};
this.$emit("getAllData", data);
// this.$parent.$parent.$parent.submitLaterGet(data)
// this.$parent.$parent.$parent.$parent.submitLaterGet(data);
this.cameraAddVisible = false;
} else {
this.$message.error(res.enote);
......@@ -251,6 +251,11 @@ export default {
});
}
}
},
created(){
this.dirCodeList = localStorage.getItem("卡口方向")
? JSON.parse(localStorage.getItem("卡口方向"))
: [];
}
};
</script>
......
......@@ -21,14 +21,14 @@
data.vchan_name == "" ? "未命名" : data.vchan_name
}}</span>
</span>
<span class="tree-btn" v-if="data.label || data.label == ''">
<span class="tree-btn" v-if="(data.label || data.label == '') && data.vtype ? false:true" >
<i class="el-icon-plus" @click.stop="nodeAddClick(node, data)"></i>
<i
class="el-icon-edit"
@click.stop="nodeEditClick(node, data)"
v-if="data.org_type != 'root'"
></i>
<i
<i
class="el-icon-delete"
@click.stop="nodeDelClick(node, data)"
v-if="data.org_type != 'root'"
......
......@@ -135,7 +135,6 @@ export default {
console.log("error", req);
},
handleNodeClick(data) {
debugger
this.$emit("clickHandle", data, "video");
// this.$parent.$parent.getVideoTable(data,'video')
},
......
......@@ -314,8 +314,8 @@ export default {
.then(res => {
this.cameraTree = res.vchan_struct;
this.cameraArr = [];
this.cameraBuildTree(res.vchan_struct);
this.getTable(data, "camera");
this.cameraTreeData = this.cameraBuildTree(res.vchan_struct);
// this.getTable(data, "camera");
});
},
syncBuildTree(data) {
......@@ -394,6 +394,7 @@ export default {
obj["label"] =
data[i].vchan_name === "" ? "未命名" : data[i].vchan_name;
obj["type"] = data[i].vchan_type;
obj["vtype"] = "camera";
obj["root"] = "手动添加相机资源";
obj["orgNode"] = orgObject;
obj["addrNode"] = addrObject;
......@@ -459,6 +460,10 @@ export default {
vchan_type: "camera",
org_unid: data.unid
};
if (data.vtype) {
this.formattterData.push(data);
return;
}
this.$api.resource
.getCameraTable(search_params, this.dev_unid)
.then(res => {
......
......@@ -54,7 +54,7 @@
</div>
</div>
<div class="control-right-box">
<div class="slider-box">
<!-- <div class="slider-box">
<span class="title">光圈</span>
<el-slider class="slider-item" v-model="value1" show-input></el-slider>
</div>
......@@ -69,6 +69,17 @@
<div class="slider-box">
<span class="title">速度</span>
<el-slider class="slider-item" v-model="value4" show-input></el-slider>
</div> -->
<div class="slider-box" style="margin-bottom:6vh;margin-top:3vh">
<span class="title">变倍</span>
<span class="el-icon-circle-plus s-icon s-plus"
@mousedown="Ytontroller(10)"
@mouseup="stopYtontroller(11)"
></span>
<span class="el-icon-remove s-icon"
@mousedown="Ytontroller(9)"
@mouseup="stopYtontroller(11)"
></span>
</div>
<div class="right-bottom-box">
<div class="setyzw item-box">
......@@ -207,8 +218,9 @@ export default {
.title {
float: left;
width: 2vw;
width: 2.3vw;
line-height: 35px;
font-size 16px
}
.slider-item {
......@@ -239,4 +251,12 @@ export default {
.yzw-box .control-btn:hover{
color #409EFF
}
.s-icon {
font-size 25px
line-height 35px
}
.s-plus {
margin-right 20px
margin-left 10px
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!