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,
name: this.codeData.name,
note: this.codeData.note,
active: this.codeData.active
};
this.$api.codes.addTrafficCode(data, this.curCateUnid).then(res => {
console.log(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.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$api.codes this.$api.codes
.editTrafficCode(row, this.curCateUnid, row.code_unid) .deleteTrafficCode(this.curCateUnid, row.code_unid)
.then(res => { .then(res => {
console.log(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"
......
...@@ -3,11 +3,21 @@ ...@@ -3,11 +3,21 @@
<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
v-model="storename"
placeholder="请输入存储配置名称"
></el-input>
</span> </span>
<el-button type="primary" style="position: relative;top: -2px;" @click="query">查询</el-button> <el-button
type="primary"
style="position: relative;top: -2px;"
@click="query"
>查询</el-button
>
<span style="float: right;"> <span style="float: right;">
<el-button type="info" icon="el-icon-search" @click="add">添加</el-button> <el-button type="info" icon="el-icon-search" @click="add"
>添加</el-button
>
</span> </span>
</div> </div>
<div style="padding: 0 15px 20px 23px;"> <div style="padding: 0 15px 20px 23px;">
...@@ -16,24 +26,21 @@ ...@@ -16,24 +26,21 @@
:data="tableData" :data="tableData"
stripe stripe
border border
style="width: 100%"> style="width: 100%"
<el-table-column >
align="center" <el-table-column align="center" prop="name" label="名称">
prop="name"
label="名称">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="create_dt" align="center" label="上传时间">
prop="create_dt"
align="center"
label="上传时间">
</el-table-column> </el-table-column>
<el-table-column <el-table-column align="center" prop="task_list" label="应用任务">
align="center"
prop="task_list"
label="应用任务">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :content="scope.row.ellipsis" placement="bottom" effect="light" :visible-arrow=false> <el-tooltip
<span class="ellipsis">{{scope.row.ellipsis}}</span> :content="scope.row.ellipsis"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span class="ellipsis">{{ scope.row.ellipsis }}</span>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
...@@ -41,14 +48,31 @@ ...@@ -41,14 +48,31 @@
align="center" align="center"
width="300" width="300"
prop="operation" prop="operation"
label="操作"> label="操作"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false> <el-tooltip
<span class="el-icon-info editIcon" @click="detail(scope.$index, scope.row)"></span> content="详情"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-info editIcon"
@click="detail(scope.$index, scope.row)"
></span>
</el-tooltip> </el-tooltip>
<span class="tableSpanBorder"></span> <span class="tableSpanBorder"></span>
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow=false> <el-tooltip
<span class="el-icon-delete delIcon" @click="delFun(scope.$index, scope.row)"></span> content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
...@@ -60,22 +84,19 @@ ...@@ -60,22 +84,19 @@
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"
:total="total"> :total="total"
>
</el-pagination> </el-pagination>
<div style="clear: both;"></div> <div style="clear: both;"></div>
</div> </div>
</div> </div>
</div> </div>
<el-dialog <el-dialog title="添加" :visible.sync="addVisible" width="450px">
title="添加"
:visible.sync="addVisible"
width="450px">
<div> <div>
<el-form label-position="left" label-width="120px"> <el-form label-position="left" label-width="120px">
<el-form-item label="配置名称"> <el-form-item label="配置名称">
...@@ -86,17 +107,21 @@ ...@@ -86,17 +107,21 @@
ref="upload" ref="upload"
action="uploadUrl" action="uploadUrl"
:http-request="httpRequest" :http-request="httpRequest"
:on-success="uploadsuccess"
multiple multiple
name="file" name="file"
:auto-upload="false"> :auto-upload="false"
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> >
<el-button slot="trigger" size="small" type="primary"
>选取文件</el-button
>
<!-- <div slot="tip" class="el-upload__tip">只能上传视频文件</div> --> <!-- <div slot="tip" class="el-upload__tip">只能上传视频文件</div> -->
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="addVisible=false">取 消</el-button> <el-button @click="addVisible = false">取 消</el-button>
<el-button type="primary" @click="save">上 传</el-button> <el-button type="primary" @click="save">上 传</el-button>
</span> </span>
</el-dialog> </el-dialog>
...@@ -104,73 +129,70 @@ ...@@ -104,73 +129,70 @@
<el-dialog title="详情" :visible.sync="detailVisible" width="30%"> <el-dialog title="详情" :visible.sync="detailVisible" width="30%">
<div class="title">任务列表</div> <div class="title">任务列表</div>
<div class="maxHeight"> <div class="maxHeight">
<el-tree <el-tree :props="props" :load="loadNode" lazy> </el-tree>
:props="props"
:load="loadNode"
lazy>
</el-tree>
</div> </div>
</el-dialog> </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:{
}, },
mounted(){ components: {},
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) { loadNode(node, resolve) {
if (node.level === 0) { if (node.level === 0) {
...@@ -178,244 +200,249 @@ ...@@ -178,244 +200,249 @@
} }
if (node.level > 1) return resolve([]); if (node.level > 1) return resolve([]);
this.$api.resource.getSubTask({},node.data.unid).then(res=>{ this.$api.resource.getSubTask({}, node.data.unid).then(res => {
if(res.list_data==null){ if (res.list_data == null) {
res.list_data=[]; res.list_data = [];
} }
res.list_data.forEach(item=>{ res.list_data.forEach(item => {
item.name=item.subtask_name; item.name = item.subtask_name;
item['leaf']=true; item["leaf"] = true;
}) });
resolve(res.list_data) resolve(res.list_data);
}) });
}, },
query(){ query() {
this.tableData=[]; this.tableData = [];
let offset = (this.page - 1) * this.pageSize; let offset = (this.page - 1) * this.pageSize;
this.$api.resource.getStoreConList({ this.$api.resource
.getStoreConList(
{
limit: this.pageSize, limit: this.pageSize,
offset: offset, offset: offset,
name__like: this.storename, name__like: this.storename
},this.dev_unid).then((res)=>{ },
this.total=res.total_num; this.dev_unid
if(res.list_data==null){ )
this.tableData=[] .then(res => {
}else{ this.total = res.total_num;
this.tableData=res.list_data; if (res.list_data == null) {
} this.tableData = [];
this.tableData.forEach(list=>{ } else {
let ellipsisText=''; this.tableData = res.list_data;
list.task_list.forEach(item=>{ }
ellipsisText+=item.name+',' this.tableData.forEach(list => {
}) let ellipsisText = "";
ellipsisText=ellipsisText.substring(0,ellipsisText.length-1); list.task_list.forEach(item => {
list['ellipsis']=ellipsisText; ellipsisText += item.name + ",";
});
ellipsisText = ellipsisText.substring(0, ellipsisText.length - 1);
list["ellipsis"] = ellipsisText;
//树状图有子节点 //树状图有子节点
list['leaf']=false; list["leaf"] = false;
}) });
console.log(this.tableData) console.log(this.tableData);
}).catch((error)=>{
}) })
.catch(error => {});
}, },
add(){ add() {
this.addVisible=true; this.addVisible = true;
}, },
taskFormatter(row, column, cellValue, index){ taskFormatter(row, column, cellValue, index) {
let columnText=''; let columnText = "";
row.task_list.forEach(item=>{ row.task_list.forEach(item => {
columnText+=item.name+',' columnText += item.name + ",";
}) });
columnText=columnText.substring(0,columnText.length-1); columnText = columnText.substring(0, columnText.length - 1);
return columnText return columnText;
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize=val; this.pageSize = val;
this.query(); this.query();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page=val; this.page = val;
this.query(); this.query();
}, },
detail(index,row){ detail(index, row) {
this.detailVisible=true; this.detailVisible = true;
this.curentSubList=[]; this.curentSubList = [];
this.curentSubList=row.task_list; this.curentSubList = row.task_list;
}, },
delFun(index,row){ delFun(index, row) {
this.$confirm('此操作将永久删除该选项, 是否继续?', '提示', { this.$confirm("此操作将永久删除该选项, 是否继续?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning"
}).then(() => { })
this.$api.resource.delStore({},row.unid).then(res=>{ .then(() => {
if(res.ecode==200){ this.$api.resource.delStore({}, row.unid).then(res => {
if (res.ecode == 200) {
this.$message({ this.$message({
type: 'success', type: "success",
message: '删除成功!' message: "删除成功!"
}); });
this.query(); this.query();
} }
});
}) })
.catch(() => {
}).catch(() => {
this.$message({ this.$message({
type: 'info', type: "info",
message: '已取消删除' message: "已取消删除"
}); });
}); });
} }
},
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.topCon{ .topCon {
background: $white-back-color; background: $white-back-color;
margin-bottom: 12px; margin-bottom: 12px;
height: 100px; height: 100px;
.left{ .left {
display: inline-block; display: inline-block;
margin: { margin: {
top: 22px; top: 22px;
left: 30px; left: 30px;
}; }
img{ img {
width:65px ; width: 65px;
height: 55px; height: 55px;
margin-right: 11px; margin-right: 11px;
} }
.topText{ .topText {
font-size:24px; font-size: 24px;
font-family:MicrosoftYaHeiUI-Bold,MicrosoftYaHeiUI; font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight:bold; font-weight: bold;
margin-bottom: 4px; margin-bottom: 4px;
} }
.bottomText{ .bottomText {
font-size:14px; font-size: 14px;
font-family:MicrosoftYaHeiUI; font-family: MicrosoftYaHeiUI;
} }
} }
.right{ .right {
float: right; float: right;
.topText{ .topText {
font-size:28px; font-size: 28px;
font-family:MicrosoftYaHeiUI-Bold,MicrosoftYaHeiUI; font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight:bold; font-weight: bold;
} }
.bottomText{ .bottomText {
position: relative; position: relative;
top: -1px; top: -1px;
font-size:14px; font-size: 14px;
font-family:MicrosoftYaHeiUI; font-family: MicrosoftYaHeiUI;
} }
} }
.textCon{ .textCon {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
} }
.border{ .border {
display: inline-block; display: inline-block;
height: 40px; height: 40px;
border: { border: {
left: 2px solid $border-color; left: 2px solid $border-color;
};
} }
.rightBox{ }
.rightBox {
margin-top: 14px; margin-top: 14px;
display: inline-block; display: inline-block;
img{ img {
margin:{ margin: {
top:15px; top: 15px;
right: 22px; right: 22px;
} }
} }
} }
.rightBox:nth-of-type(1){ .rightBox:nth-of-type(1) {
img{ img {
width: 34px; width: 34px;
height: 34px; height: 34px;
} }
.textCon{ .textCon {
margin-right:114px ; margin-right: 114px;
} }
} }
.rightBox:nth-of-type(2){ .rightBox:nth-of-type(2) {
position: relative; position: relative;
top: 4px; top: 4px;
img{ img {
width: 40px; width: 40px;
height: 40px; height: 40px;
margin-left: 102px; margin-left: 102px;
} }
.textCon{ .textCon {
margin-right:101px ; margin-right: 101px;
} }
} }
.rightBox:nth-of-type(3){ .rightBox:nth-of-type(3) {
img{ img {
width: 34px; width: 34px;
height: 35px; height: 35px;
margin-left: 104px; margin-left: 104px;
} }
.textCon{ .textCon {
margin-right:184px ; margin-right: 184px;
}
} }
} }
.title{ }
.title {
font-size: 18px; font-size: 18px;
margin-bottom: 6px; margin-bottom: 6px;
} }
.maxHeight{ .maxHeight {
max-height: 400px; max-height: 400px;
overflow-y: auto; overflow-y: auto;
} }
.ellipsis{ .ellipsis {
display: inline-block; display: inline-block;
width: 200px; width: 200px;
overflow: hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.resourceDiv{ .resourceDiv {
display: inline-block; display: inline-block;
margin-left: 10%; margin-left: 10%;
span{ span {
margin-right: 5%; margin-right: 5%;
} }
} }
.content{ .content {
background: #FFFFFF; background: #ffffff;
} }
.inputBox{ .inputBox {
margin-right: 20px; margin-right: 20px;
} }
.selectBox{ .selectBox {
margin-right: 20px; margin-right: 20px;
} }
.editIcon{ .editIcon {
cursor: pointer; cursor: pointer;
color:#0069ff; color: #0069ff;
font-size:16px; font-size: 16px;
} }
.editIcon2{ .editIcon2 {
cursor: pointer; cursor: pointer;
color:#87d14b; color: #87d14b;
font-size:16px; font-size: 16px;
} }
.playIcon{ .playIcon {
cursor: pointer; cursor: pointer;
color:#34b3a2; color: #34b3a2;
font-size:16px; font-size: 16px;
} }
.pauseIcon{ .pauseIcon {
cursor: pointer; cursor: pointer;
color:#ffc62e; color: #ffc62e;
font-size:14px; font-size: 14px;
} }
.delIcon{ .delIcon {
cursor: pointer; cursor: pointer;
color:#f2365a; color: #f2365a;
font-size:16px; font-size: 16px;
} }
</style> </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,7 +21,7 @@ ...@@ -21,7 +21,7 @@
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"
......
...@@ -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!