Commit 8a360e30 by 潘建波

添加变倍操作

1 parent f2d908c7
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
prev-text="上一页" prev-text="上一页"
next-text="下一页" next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]" :page-sizes="[20, 30, 50, 100, 200]"
layout="prev, pager, next,sizes" layout="total, prev, pager, next,sizes, jumper"
:current-page="page" :current-page="page"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
......
...@@ -86,14 +86,14 @@ ...@@ -86,14 +86,14 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="margin-top: 28px;"> <div style="margin-top: 28px;" hidden>
<el-pagination <el-pagination
style="float: right;" style="float: right;"
background background
prev-text="上一页" prev-text="上一页"
next-text="下一页" next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]" :page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes" layout="total, prev, pager, next,sizes, jumper"
:current-page="page" :current-page="page"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
return { return {
total: 0, total: 0,
page: 1, page: 1,
pageSize: 20, pageSize: 50,
tableData: [], tableData: [],
detailVisible: false, detailVisible: false,
eventCateData: [], eventCateData: [],
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
}, },
components: {}, components: {},
created() { created() {
// this.getEventList(); this.getEventList();
this.getEventCate(); this.getEventCate();
}, },
methods: { methods: {
...@@ -197,8 +197,14 @@ export default { ...@@ -197,8 +197,14 @@ export default {
this.tableData = res.list_data; this.tableData = res.list_data;
}); });
}, },
cateChange() { cateChange(unid) {
this.$api.codes.eventType({}, this.curcate).then(res => { 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; this.tableData = res.list_data;
}); });
}, },
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
type="index" type="index"
align="center" align="center"
label="#" label="#"
width="40" width="60"
></el-table-column> ></el-table-column>
<el-table-column align="center" prop="code_unid" label="code_unid"> <el-table-column align="center" prop="code_unid" label="code_unid">
</el-table-column> </el-table-column>
...@@ -77,14 +77,14 @@ ...@@ -77,14 +77,14 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="margin-top: 28px;"> <div style="margin-top: 28px;" hidden>
<el-pagination <el-pagination
style="float: right;" style="float: right;"
background background
prev-text="上一页" prev-text="上一页"
next-text="下一页" next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]" :page-sizes="[20, 30, 50, 100, 200]"
layout="prev, pager, next,sizes" layout="total, prev, pager, next,sizes, jumper"
:current-page="page" :current-page="page"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -242,34 +242,54 @@ export default { ...@@ -242,34 +242,54 @@ export default {
}); });
}, },
saveAddCode() { saveAddCode() {
this.$api.codes let data = {
.addTrafficCode(this.codeData, this.curCateUnid) code_unid: this.codeData.code_unid,
.then(res => { code: this.codeData.code,
console.log(res); 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 = { let data = {
"code_unid": this.codeData.code_unid, code_unid: this.codeData.code_unid,
"code":this.codeData.code, code: this.codeData.code,
"name":this.codeData.name, name: this.codeData.name,
"note":this.codeData.note, note: this.codeData.note,
"active":this.codeData.active } active: this.codeData.active
};
this.$api.codes this.$api.codes
.editTrafficCode( .editTrafficCode(data, this.curCateUnid, this.codeData.code_unid)
data,
this.curCateUnid,
this.codeData.code_unid
)
.then(res => { .then(res => {
console.log(res); console.log(res);
this.detailVisible = false;
this.cateChange(this.curCateUnid);
}); });
}, },
deleteCode(index, row) { deleteCode(index, row) {
this.$api.codes this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
.editTrafficCode(row, this.curCateUnid, row.code_unid) confirmButtonText: "确定",
.then(res => { cancelButtonText: "取消",
console.log(res); 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) { handleSizeChange(val) {
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
prev-text="上一页" prev-text="上一页"
next-text="下一页" next-text="下一页"
:page-sizes="[30, 50, 100, 200]" :page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes" layout="total, prev, pager, next,sizes, jumper"
:current-page="page" :current-page="page"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
......
<template> <template>
<div class="contentBox"> <div class="contentBox">
<div class="content"> <div class="content">
<div style="padding:8px 20px;"> <div style="padding:8px 20px;">
<span class="inputBox"> <span class="inputBox">
<el-input v-model="storename" placeholder="请输入存储配置名称"></el-input> <el-input
</span> v-model="storename"
<el-button type="primary" style="position: relative;top: -2px;" @click="query">查询</el-button> placeholder="请输入存储配置名称"
<span style="float: right;"> ></el-input>
<el-button type="info" icon="el-icon-search" @click="add">添加</el-button> </span>
</span> <el-button
</div> type="primary"
<div style="padding: 0 15px 20px 23px;"> style="position: relative;top: -2px;"
<el-table @click="query"
:height="tableHeight" >查询</el-button
:data="tableData" >
stripe <span style="float: right;">
border <el-button type="info" icon="el-icon-search" @click="add"
style="width: 100%"> >添加</el-button
<el-table-column >
align="center" </span>
prop="name" </div>
label="名称"> <div style="padding: 0 15px 20px 23px;">
</el-table-column> <el-table
<el-table-column :height="tableHeight"
prop="create_dt" :data="tableData"
align="center" stripe
label="上传时间"> border
</el-table-column> style="width: 100%"
<el-table-column >
align="center" <el-table-column align="center" prop="name" label="名称">
prop="task_list" </el-table-column>
label="应用任务"> <el-table-column prop="create_dt" align="center" label="上传时间">
<template slot-scope="scope"> </el-table-column>
<el-tooltip :content="scope.row.ellipsis" placement="bottom" effect="light" :visible-arrow=false> <el-table-column align="center" prop="task_list" label="应用任务">
<span class="ellipsis">{{scope.row.ellipsis}}</span> <template slot-scope="scope">
</el-tooltip> <el-tooltip
</template> :content="scope.row.ellipsis"
</el-table-column> placement="bottom"
<el-table-column effect="light"
align="center" :visible-arrow="false"
width="300" >
prop="operation" <span class="ellipsis">{{ scope.row.ellipsis }}</span>
label="操作"> </el-tooltip>
<template slot-scope="scope"> </template>
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false> </el-table-column>
<span class="el-icon-info editIcon" @click="detail(scope.$index, scope.row)"></span> <el-table-column
</el-tooltip> align="center"
<span class="tableSpanBorder"></span> width="300"
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow=false> prop="operation"
<span class="el-icon-delete delIcon" @click="delFun(scope.$index, scope.row)"></span> label="操作"
</el-tooltip> >
</template> <template slot-scope="scope">
</el-table-column> <el-tooltip
</el-table> content="详情"
<div style="margin-top: 28px;"> placement="bottom"
<el-pagination effect="light"
style="float: right;" :visible-arrow="false"
background >
prev-text="上一页" <span
next-text="下一页" class="el-icon-info editIcon"
:page-sizes="[30, 50, 100, 200]" @click="detail(scope.$index, scope.row)"
layout="prev, pager, next,sizes" ></span>
:current-page="page" </el-tooltip>
@size-change="handleSizeChange" <span class="tableSpanBorder"></span>
@current-change="handleCurrentChange" <el-tooltip
:total="total"> content="删除"
</el-pagination> placement="bottom"
<div style="clear: both;"></div> effect="light"
</div> :visible-arrow="false"
>
</div> <span
</div> class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
<el-dialog ></span>
title="添加" </el-tooltip>
:visible.sync="addVisible" </template>
width="450px"> </el-table-column>
<div> </el-table>
<el-form label-position="left" label-width="120px"> <div style="margin-top: 28px;">
<el-form-item label="配置名称"> <el-pagination
<el-input v-model="names"></el-input> style="float: right;"
</el-form-item> background
<el-form-item label="添加文件"> prev-text="上一页"
<el-upload next-text="下一页"
ref="upload" :page-sizes="[30, 50, 100, 200]"
action="uploadUrl" layout="total, prev, pager, next,sizes, jumper"
:http-request="httpRequest" :current-page="page"
multiple @size-change="handleSizeChange"
name="file" @current-change="handleCurrentChange"
:auto-upload="false"> :total="total"
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> >
<!-- <div slot="tip" class="el-upload__tip">只能上传视频文件</div> --> </el-pagination>
</el-upload> <div style="clear: both;"></div>
</el-form-item> </div>
</el-form> </div>
</div> </div>
<span slot="footer" class="dialog-footer">
<el-button @click="addVisible=false">取 消</el-button> <el-dialog title="添加" :visible.sync="addVisible" width="450px">
<el-button type="primary" @click="save">上 传</el-button> <div>
</span> <el-form label-position="left" label-width="120px">
</el-dialog> <el-form-item label="配置名称">
<el-input v-model="names"></el-input>
<el-dialog title="详情" :visible.sync="detailVisible" width="30%"> </el-form-item>
<div class="title">任务列表</div> <el-form-item label="添加文件">
<div class="maxHeight"> <el-upload
<el-tree ref="upload"
:props="props" action="uploadUrl"
:load="loadNode" :http-request="httpRequest"
lazy> :on-success="uploadsuccess"
</el-tree> multiple
</div> name="file"
</el-dialog> :auto-upload="false"
>
<el-button slot="trigger" size="small" type="primary"
>选取文件</el-button
>
<!-- <div slot="tip" class="el-upload__tip">只能上传视频文件</div> -->
</el-upload>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="addVisible = false">取 消</el-button>
<el-button type="primary" @click="save">上 传</el-button>
</span>
</el-dialog>
<el-dialog title="详情" :visible.sync="detailVisible" width="30%">
<div class="title">任务列表</div>
<div class="maxHeight">
<el-tree :props="props" :load="loadNode" lazy> </el-tree>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data(){ data() {
return{ return {
addVisible:false, addVisible: false,
uploadUrl: '', uploadUrl: "",
names:'', names: "",
file:[], file: [],
props: { props: {
label: 'name', label: "name",
children: 'child', children: "child",
isLeaf: 'leaf' isLeaf: "leaf"
}, },
detailData:[], detailData: [],
dev_unid: localStorage.getItem('dev_unid'), dev_unid: localStorage.getItem("dev_unid"),
resource:{ resource: {
picture_busy: 0, picture_busy: 0,
picture_free: 0, picture_free: 0,
video_busy: 0, video_busy: 0,
video_free: 0, video_free: 0
}, },
total:0, total: 0,
page:1, page: 1,
pageSize:30, pageSize: 30,
tableData: [], tableData: [],
devsList:[], devsList: [],
selectDevs:'', selectDevs: "",
detailVisible:false, detailVisible: false,
storename:'', storename: "",
curentSubList:[], curentSubList: [],
tableHeight:window.opsTableHeight tableHeight: window.opsTableHeight
} };
}, },
components:{ components: {},
}, mounted() {
mounted(){ this.query();
this.query(); },
}, methods: {
methods:{ // 自定义的上传函数
// 自定义的上传函数 httpRequest(param) {
httpRequest(param) { this.file = [];
this.file=[]; // 一般情况下是在这里创建FormData对象,但我们需要上传多个文件,为避免发送多次请求,因此在这里只进行文件的获取,param可以拿到文件上传的所有信息
// 一般情况下是在这里创建FormData对象,但我们需要上传多个文件,为避免发送多次请求,因此在这里只进行文件的获取,param可以拿到文件上传的所有信息 this.file.push(param.file);
this.file.push(param.file) },
}, save() {
save(){ this.$refs.upload.submit(); // 这里是执行文件上传的函数,其实也就是获取我们要上传的文件
this.$refs.upload.submit(); // 这里是执行文件上传的函数,其实也就是获取我们要上传的文件 // 最重要的就是这段代码
// 最重要的就是这段代码 var upData = new FormData(); // 首先创建FormData对象
var upData = new FormData() // 首先创建FormData对象 this.file.forEach(file => {
this.file.forEach((file)=>{ upData.append("file", file); // 因为要上传多个文件,所以需要遍历一下才行
upData.append('file', file); // 因为要上传多个文件,所以需要遍历一下才行 upData.append("name", this.names);
upData.append('name', this.names); upData.append("is_temp", 0);
upData.append("is_temp", 0); });
}) this.$api.resource.uploadStore(upData).then(res => {
this.$api.resource.uploadStore(upData).then(res=>{ this.query();
this.query(); });
}) },
uploadsuccess() {
}, this.addVisible = false;
loadNode(node, resolve) { },
if (node.level === 0) { loadNode(node, resolve) {
return resolve(this.curentSubList); if (node.level === 0) {
} return resolve(this.curentSubList);
if (node.level > 1) return resolve([]); }
if (node.level > 1) return resolve([]);
this.$api.resource.getSubTask({},node.data.unid).then(res=>{
if(res.list_data==null){ this.$api.resource.getSubTask({}, node.data.unid).then(res => {
res.list_data=[]; if (res.list_data == null) {
} res.list_data = [];
res.list_data.forEach(item=>{ }
item.name=item.subtask_name; res.list_data.forEach(item => {
item['leaf']=true; item.name = item.subtask_name;
}) item["leaf"] = true;
resolve(res.list_data) });
}) resolve(res.list_data);
}, });
query(){ },
this.tableData=[]; query() {
let offset = (this.page - 1) * this.pageSize; this.tableData = [];
this.$api.resource.getStoreConList({ let offset = (this.page - 1) * this.pageSize;
limit: this.pageSize, this.$api.resource
offset: offset, .getStoreConList(
name__like: this.storename, {
},this.dev_unid).then((res)=>{ limit: this.pageSize,
this.total=res.total_num; offset: offset,
if(res.list_data==null){ name__like: this.storename
this.tableData=[] },
}else{ this.dev_unid
this.tableData=res.list_data; )
} .then(res => {
this.tableData.forEach(list=>{ this.total = res.total_num;
let ellipsisText=''; if (res.list_data == null) {
list.task_list.forEach(item=>{ this.tableData = [];
ellipsisText+=item.name+',' } else {
}) this.tableData = res.list_data;
ellipsisText=ellipsisText.substring(0,ellipsisText.length-1); }
list['ellipsis']=ellipsisText; this.tableData.forEach(list => {
//树状图有子节点 let ellipsisText = "";
list['leaf']=false; list.task_list.forEach(item => {
}) ellipsisText += item.name + ",";
console.log(this.tableData) });
}).catch((error)=>{ ellipsisText = ellipsisText.substring(0, ellipsisText.length - 1);
list["ellipsis"] = ellipsisText;
}) //树状图有子节点
}, list["leaf"] = false;
add(){ });
this.addVisible=true; console.log(this.tableData);
}, })
taskFormatter(row, column, cellValue, index){ .catch(error => {});
let columnText=''; },
row.task_list.forEach(item=>{ add() {
columnText+=item.name+',' this.addVisible = true;
}) },
columnText=columnText.substring(0,columnText.length-1); taskFormatter(row, column, cellValue, index) {
return columnText let columnText = "";
}, row.task_list.forEach(item => {
handleSizeChange(val) { columnText += item.name + ",";
this.pageSize=val; });
this.query(); columnText = columnText.substring(0, columnText.length - 1);
}, return columnText;
handleCurrentChange(val) { },
this.page=val; handleSizeChange(val) {
this.query(); this.pageSize = val;
}, this.query();
detail(index,row){ },
this.detailVisible=true; handleCurrentChange(val) {
this.curentSubList=[]; this.page = val;
this.curentSubList=row.task_list; this.query();
}, },
delFun(index,row){ detail(index, row) {
this.$confirm('此操作将永久删除该选项, 是否继续?', '提示', { this.detailVisible = true;
confirmButtonText: '确定', this.curentSubList = [];
cancelButtonText: '取消', this.curentSubList = row.task_list;
type: 'warning' },
}).then(() => { delFun(index, row) {
this.$api.resource.delStore({},row.unid).then(res=>{ this.$confirm("此操作将永久删除该选项, 是否继续?", "提示", {
if(res.ecode==200){ confirmButtonText: "确定",
this.$message({ cancelButtonText: "取消",
type: 'success', type: "warning"
message: '删除成功!' })
}); .then(() => {
this.query(); this.$api.resource.delStore({}, row.unid).then(res => {
} if (res.ecode == 200) {
}) this.$message({
type: "success",
}).catch(() => { message: "删除成功!"
this.$message({ });
type: 'info', this.query();
message: '已取消删除' }
}); });
}); })
} .catch(() => {
}, this.$message({
} type: "info",
message: "已取消删除"
});
});
}
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.topCon{
background: $white-back-color;
margin-bottom: 12px;
height: 100px;
.left{
display: inline-block;
margin: {
top: 22px;
left: 30px;
};
img{
width:65px ;
height: 55px;
margin-right: 11px;
}
.topText{
font-size:24px;
font-family:MicrosoftYaHeiUI-Bold,MicrosoftYaHeiUI;
font-weight:bold;
margin-bottom: 4px;
}
.bottomText{
font-size:14px;
font-family:MicrosoftYaHeiUI;
}
}
.right{
float: right;
.topText{
font-size:28px;
font-family:MicrosoftYaHeiUI-Bold,MicrosoftYaHeiUI;
font-weight:bold;
}
.bottomText{
position: relative;
top: -1px;
font-size:14px;
font-family:MicrosoftYaHeiUI;
}
}
.textCon{
display: inline-block;
vertical-align: top;
}
.border{
display: inline-block;
height: 40px;
border: {
left: 2px solid $border-color;
};
}
.rightBox{
margin-top: 14px;
display: inline-block;
img{
margin:{
top:15px;
right: 22px;
}
}
}
.rightBox:nth-of-type(1){
img{
width: 34px;
height: 34px;
}
.textCon{
margin-right:114px ;
}
}
.rightBox:nth-of-type(2){
position: relative;
top: 4px;
img{
width: 40px;
height: 40px;
margin-left: 102px;
}
.textCon{
margin-right:101px ;
}
}
.rightBox:nth-of-type(3){
img{
width: 34px;
height: 35px;
margin-left: 104px;
}
.textCon{
margin-right:184px ;
}
}
}
.title{
font-size: 18px;
margin-bottom: 6px;
}
.maxHeight{
max-height: 400px;
overflow-y: auto;
}
.ellipsis{
display: inline-block;
width: 200px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.resourceDiv{
display: inline-block;
margin-left: 10%;
span{
margin-right: 5%;
}
}
.content{
background: #FFFFFF;
}
.inputBox{
margin-right: 20px;
}
.selectBox{
margin-right: 20px;
}
.editIcon{
cursor: pointer;
color:#0069ff;
font-size:16px;
}
.editIcon2{
cursor: pointer;
color:#87d14b;
font-size:16px;
}
.playIcon{
cursor: pointer;
color:#34b3a2;
font-size:16px;
}
.pauseIcon{
cursor: pointer;
color:#ffc62e;
font-size:14px;
}
.delIcon{
cursor: pointer;
color:#f2365a;
font-size:16px;
}
</style>
\ No newline at end of file \ No newline at end of file
.topCon {
background: $white-back-color;
margin-bottom: 12px;
height: 100px;
.left {
display: inline-block;
margin: {
top: 22px;
left: 30px;
}
img {
width: 65px;
height: 55px;
margin-right: 11px;
}
.topText {
font-size: 24px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
margin-bottom: 4px;
}
.bottomText {
font-size: 14px;
font-family: MicrosoftYaHeiUI;
}
}
.right {
float: right;
.topText {
font-size: 28px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
}
.bottomText {
position: relative;
top: -1px;
font-size: 14px;
font-family: MicrosoftYaHeiUI;
}
}
.textCon {
display: inline-block;
vertical-align: top;
}
.border {
display: inline-block;
height: 40px;
border: {
left: 2px solid $border-color;
}
}
.rightBox {
margin-top: 14px;
display: inline-block;
img {
margin: {
top: 15px;
right: 22px;
}
}
}
.rightBox:nth-of-type(1) {
img {
width: 34px;
height: 34px;
}
.textCon {
margin-right: 114px;
}
}
.rightBox:nth-of-type(2) {
position: relative;
top: 4px;
img {
width: 40px;
height: 40px;
margin-left: 102px;
}
.textCon {
margin-right: 101px;
}
}
.rightBox:nth-of-type(3) {
img {
width: 34px;
height: 35px;
margin-left: 104px;
}
.textCon {
margin-right: 184px;
}
}
}
.title {
font-size: 18px;
margin-bottom: 6px;
}
.maxHeight {
max-height: 400px;
overflow-y: auto;
}
.ellipsis {
display: inline-block;
width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.resourceDiv {
display: inline-block;
margin-left: 10%;
span {
margin-right: 5%;
}
}
.content {
background: #ffffff;
}
.inputBox {
margin-right: 20px;
}
.selectBox {
margin-right: 20px;
}
.editIcon {
cursor: pointer;
color: #0069ff;
font-size: 16px;
}
.editIcon2 {
cursor: pointer;
color: #87d14b;
font-size: 16px;
}
.playIcon {
cursor: pointer;
color: #34b3a2;
font-size: 16px;
}
.pauseIcon {
cursor: pointer;
color: #ffc62e;
font-size: 14px;
}
.delIcon {
cursor: pointer;
color: #f2365a;
font-size: 16px;
}
</style>
...@@ -207,7 +207,7 @@ export default { ...@@ -207,7 +207,7 @@ export default {
unid: this.addVideoParam.addr_unid unid: this.addVideoParam.addr_unid
}; };
this.$emit("getAllData", data); this.$emit("getAllData", data);
// this.$parent.$parent.$parent.submitLaterGet(data) // this.$parent.$parent.$parent.$parent.submitLaterGet(data);
this.cameraAddVisible = false; this.cameraAddVisible = false;
} else { } else {
this.$message.error(res.enote); this.$message.error(res.enote);
...@@ -251,6 +251,11 @@ export default { ...@@ -251,6 +251,11 @@ export default {
}); });
} }
} }
},
created(){
this.dirCodeList = localStorage.getItem("卡口方向")
? JSON.parse(localStorage.getItem("卡口方向"))
: [];
} }
}; };
</script> </script>
......
...@@ -21,14 +21,14 @@ ...@@ -21,14 +21,14 @@
data.vchan_name == "" ? "未命名" : data.vchan_name data.vchan_name == "" ? "未命名" : data.vchan_name
}}</span> }}</span>
</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-plus" @click.stop="nodeAddClick(node, data)"></i>
<i <i
class="el-icon-edit" class="el-icon-edit"
@click.stop="nodeEditClick(node, data)" @click.stop="nodeEditClick(node, data)"
v-if="data.org_type != 'root'" v-if="data.org_type != 'root'"
></i> ></i>
<i <i
class="el-icon-delete" class="el-icon-delete"
@click.stop="nodeDelClick(node, data)" @click.stop="nodeDelClick(node, data)"
v-if="data.org_type != 'root'" v-if="data.org_type != 'root'"
......
...@@ -135,7 +135,6 @@ export default { ...@@ -135,7 +135,6 @@ export default {
console.log("error", req); console.log("error", req);
}, },
handleNodeClick(data) { handleNodeClick(data) {
debugger
this.$emit("clickHandle", data, "video"); this.$emit("clickHandle", data, "video");
// this.$parent.$parent.getVideoTable(data,'video') // this.$parent.$parent.getVideoTable(data,'video')
}, },
......
...@@ -314,8 +314,8 @@ export default { ...@@ -314,8 +314,8 @@ export default {
.then(res => { .then(res => {
this.cameraTree = res.vchan_struct; this.cameraTree = res.vchan_struct;
this.cameraArr = []; this.cameraArr = [];
this.cameraBuildTree(res.vchan_struct); this.cameraTreeData = this.cameraBuildTree(res.vchan_struct);
this.getTable(data, "camera"); // this.getTable(data, "camera");
}); });
}, },
syncBuildTree(data) { syncBuildTree(data) {
...@@ -394,6 +394,7 @@ export default { ...@@ -394,6 +394,7 @@ export default {
obj["label"] = obj["label"] =
data[i].vchan_name === "" ? "未命名" : data[i].vchan_name; data[i].vchan_name === "" ? "未命名" : data[i].vchan_name;
obj["type"] = data[i].vchan_type; obj["type"] = data[i].vchan_type;
obj["vtype"] = "camera";
obj["root"] = "手动添加相机资源"; obj["root"] = "手动添加相机资源";
obj["orgNode"] = orgObject; obj["orgNode"] = orgObject;
obj["addrNode"] = addrObject; obj["addrNode"] = addrObject;
...@@ -459,6 +460,10 @@ export default { ...@@ -459,6 +460,10 @@ export default {
vchan_type: "camera", vchan_type: "camera",
org_unid: data.unid org_unid: data.unid
}; };
if (data.vtype) {
this.formattterData.push(data);
return;
}
this.$api.resource this.$api.resource
.getCameraTable(search_params, this.dev_unid) .getCameraTable(search_params, this.dev_unid)
.then(res => { .then(res => {
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</div> </div>
</div> </div>
<div class="control-right-box"> <div class="control-right-box">
<div class="slider-box"> <!-- <div class="slider-box">
<span class="title">光圈</span> <span class="title">光圈</span>
<el-slider class="slider-item" v-model="value1" show-input></el-slider> <el-slider class="slider-item" v-model="value1" show-input></el-slider>
</div> </div>
...@@ -69,6 +69,17 @@ ...@@ -69,6 +69,17 @@
<div class="slider-box"> <div class="slider-box">
<span class="title">速度</span> <span class="title">速度</span>
<el-slider class="slider-item" v-model="value4" show-input></el-slider> <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>
<div class="right-bottom-box"> <div class="right-bottom-box">
<div class="setyzw item-box"> <div class="setyzw item-box">
...@@ -207,8 +218,9 @@ export default { ...@@ -207,8 +218,9 @@ export default {
.title { .title {
float: left; float: left;
width: 2vw; width: 2.3vw;
line-height: 35px; line-height: 35px;
font-size 16px
} }
.slider-item { .slider-item {
...@@ -239,4 +251,12 @@ export default { ...@@ -239,4 +251,12 @@ export default {
.yzw-box .control-btn:hover{ .yzw-box .control-btn:hover{
color #409EFF color #409EFF
} }
.s-icon {
font-size 25px
line-height 35px
}
.s-plus {
margin-right 20px
margin-left 10px
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!