更换文件夹

pull/58/head
lukeyan 2 years ago
parent a6e5e1756e
commit e9b4615a36

@ -1,261 +1,390 @@
<template>
<!-- 设备表格 -->
<div class="equipment_data">
<p>{{ table_title }}</p>
<!-- 查询表 -->
<div v-if="display_search" class="equipment_data_search">
<el-form :inline="true" :model="search" class="search_data">
<div>
<div v-if="table_flag" class="equipment_table_video">
<div class="table_title">视频监控设备列表</div>
<div class="table_search">
<el-form :model="search" class="table_search_form">
<el-form-item>
<el-input v-model="search.equipment" placeholder="输入设备名称搜索"></el-input>
<el-input
v-model="search.deviceName"
placeholder="输入设备名称搜索"
></el-input>
</el-form-item>
<el-form-item>
<el-form-item>
<el-input v-model="search.channel_code" placeholder="输入通道国际编码搜索"></el-input>
</el-form-item>
<el-input
v-model="search.gbsChannelNo"
placeholder="输入通道国际编码搜索"
></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="search.equipment_ip" placeholder="输入设备IP搜索"></el-input>
<el-input
v-model="search.deviceIp"
placeholder="输入设备IP搜索"
></el-input>
</el-form-item>
<el-form-item>
<el-button @click="onSubmitVideo"></el-button>
<el-button @click="video_search"></el-button>
</el-form-item>
<el-form-item>
<el-button @click="resetVideo"></el-button>
<el-button @click="video_reset"></el-button>
</el-form-item>
</el-form>
</div>
<div v-else class="equipment_data_search">
<el-form :inline="true" :model="search" class="search_data">
<div class="table_btn_list">
<el-button
v-for="item in btn_list"
:key="item.value"
@click="open_video_dialog(item.value)"
>
<i :class="`el-icon-${item.icon}`" />
{{ item.label }}</el-button
>
</div>
<div class="table_video">
<el-table
:cell-style="{ background: 'revert' }"
:header-cell-style="table_header"
:data="table_data"
:highlight-current-row="true"
@selection-change="handle_video_change"
height="336"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column
v-for="item in table_column_video"
:key="item.prop"
:prop="item.prop"
:label="item.label"
:width="item.width"
></el-table-column>
<el-table-column prop="operation" label="操作">
<template slot-scope="scope">
<el-button
size="small"
class="operation"
@click="open_video_dialog('5', scope.row)"
>编辑
</el-button>
<el-button
size="small"
class="operation"
@click="open_video_dialog('6', scope.row)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="table_pagination">
<el-pagination
:background="true"
@current-change="handleCurrentChange"
:page-sizes="[5]"
:page-size="pageSize"
:current-page="pageNum"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div>
</div>
<div v-else class="equipment_table_perception">
<div class="table_title">智能感知设备列表</div>
<div class="table_search">
<el-form :model="search" class="table_search_form">
<el-form-item>
<el-input v-model="search.equipment" placeholder="输入设备名称搜索"></el-input>
<el-input
v-model="search_p.deviceName"
placeholder="输入设备名称搜索"
></el-input>
</el-form-item>
<el-form-item>
<el-form-item>
<el-input v-model="search.ip" placeholder="输入IP名称搜索"></el-input>
</el-form-item>
<el-input
v-model="search_p.deviceIp"
placeholder="输入设备IP搜索"
></el-input>
</el-form-item>
<el-form-item>
<el-button @click="onSubmit"></el-button>
<el-button @click="perception_search"></el-button>
</el-form-item>
<el-form-item>
<el-button @click="reset"></el-button>
<el-button @click="perception_reset"></el-button>
</el-form-item>
</el-form>
</div>
<!-- 增删按钮 -->
<div class="equipment_data_btn">
<el-button v-for="item in btnList" :key="item.value" @click="openDialog(item.value)">
<div class="table_btn_list">
<el-button
v-for="item in btn_list"
:key="item.value"
@click="open_perception_dialog(item.value)"
>
<i :class="`el-icon-${item.icon}`" />
{{ item.label }}</el-button>
{{ item.label }}</el-button
>
</div>
<!-- 表格 -->
<div class="equipment_data_table">
<el-table :cell-style="{ background: 'revert' }" :header-cell-style="table_header" :data="pushTableData"
:highlight-current-row="true" height="250">
<div class="table_perception">
<el-table
:cell-style="{ background: 'revert' }"
:header-cell-style="table_header"
:data="table_data"
:highlight-current-row="true"
@selection-change="handle_perception_change"
height="336"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column v-for="item in tableColumn" :key="item.prop" :prop="item.prop" :label="item.label"
:width="item.width"></el-table-column>
<el-table-column
v-for="item in table_column_perception"
:key="item.prop"
:prop="item.prop"
:label="item.label"
:width="item.width"
></el-table-column>
<el-table-column prop="operation" label="操作">
<template slot-scope="scope">
<el-button size="small" class="operation" @click="openDialog('2', scope.row)">编辑
<el-button
size="small"
class="operation"
@click="open_perception_dialog('5', scope.row)"
>编辑
</el-button>
<el-button size="small" class="operation" @click="openDialog('5', scope.row)">详情
<el-button
size="small"
class="operation"
@click="open_perception_dialog('6', scope.row)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="equipment_data_pagination">
<el-pagination :background="true" @current-change="handleCurrentChange" :page-sizes="[4]" :page-size="PageSize"
:current-page="pageNum" layout="total, sizes, prev, pager, next, jumper" :total="pushTableData.length">
<div class="table_pagination">
<el-pagination
:background="true"
@current-change="handleCurrentChangePerception"
:page-sizes="[5]"
:page-size="pageSize"
:current-page="pageNum"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div>
<AddVideoDialog ref="addVideoDialog"></AddVideoDialog>
<AddPerceptionDialog ref="addPerceptionDialog"></AddPerceptionDialog>
<UploadDialog ref="uploadDialog"></UploadDialog>
<DeriveDialog ref="deriveDialog" :table_title="table_title"></DeriveDialog>
</div>
<!-- 视频设备表单弹窗 -->
<VideoForm ref="videoForm" @refresh_video="refresh_video"></VideoForm>
<!-- 删除视频设备表单弹窗 -->
<DeleteVideo ref="deleteVideo" @refresh_video="refresh_video"></DeleteVideo>
<!-- 导入视频设备弹窗 -->
<ImportVideo ref="importVideo"></ImportVideo>
<!-- 导出视频设备弹窗 -->
<ExportVideo ref="exportVideo"></ExportVideo>
<!-- 智能设备表单弹窗 -->
<PerceptionForm
ref="perceptionForm"
@refresh_perception="refresh_perception"
></PerceptionForm>
<!-- 删除智能设备表单弹窗 -->
<DeletePerception
ref="deletePerception"
@refresh_perception="refresh_perception"
></DeletePerception>
<!-- 导入智能设备弹窗 -->
<ImportPerception ref="importPerception"></ImportPerception>
<!-- 导出智能设备弹窗 -->
<ExportPerception ref="exportPerception"></ExportPerception>
</div>
</template>
<script>
import AddVideoDialog from "./addVideoDialog";
import AddPerceptionDialog from "./addPerceptionDialog";
import UploadDialog from "./uploadDialog";
import DeriveDialog from "./deriveDialog";
import bus from "@/assets/js/eventBus.js";
import { getVideoList, getPerceptionList } from "@/api/correlationEquipment";
import VideoForm from "./videoForm";
import DeleteVideo from "./deleteVideo";
import ImportVideo from "./importVideo";
import ExportVideo from "./exportVideo";
import PerceptionForm from "./perceptionForm";
import DeletePerception from "./deletePerception";
import ImportPerception from "./importPerception";
import ExportPerception from "./exportPerception"
export default {
name: "EquipmentTable",
name:'EquipmentTable',
components: {
AddPerceptionDialog,
AddVideoDialog,
UploadDialog,
DeriveDialog,
},
props: {
pushTableData: [],
only_params: {},
VideoForm,
DeleteVideo,
ImportVideo,
ExportVideo,
PerceptionForm,
DeletePerception,
ImportPerception,
ExportPerception,
},
data() {
return {
table_title: "视频监控设备列表", //
display_search: true, //
search_params_table: {}, //
table_flag: true,
//
search: {
equipment: "",
ip: "",
channel_code: "",
equipemnt_ip: "",
deviceName: "",
gbsChannelNo: "",
deviceIp: "",
},
btnList: [
//
search_p: {
deviceName: "",
deviceIp: "",
},
btn_list: [
{ value: "1", label: "新增", icon: "plus" },
{ value: "2", label: "删除", icon: "delete" },
{ value: "3", label: "导入", icon: "bottom-right" },
{ value: "4", label: "导出", icon: "top-left" },
],
tableColumn: [],
tableData: [],
//
tableColumn_video: [
table_data: [],
table_column_video: [
{ prop: "gbsChannelNo", label: "通道国际编码", width: "200" },
{ prop: "gbsNvrNo", label: "NVR设备编码", width: "200" },
{ prop: "deviceName", label: "设备名称", width: "270" },
{ prop: "deviceVideoSubTypeCn", label: "设备类型", width: "200" },
{ prop: "deviceIp", label: "设备IP" },
// { prop: "deviceBrand", label: "" },
// { prop: "longitude", label: "" },
// { prop: "latitude", label: "" },
],
//
tableColumn_preception: [
table_column_perception: [
{ prop: "deviceName", label: "设备名称", width: "270" },
{ prop: "devicePerceptionSubTypeCn", label: "设备类型" },
{ prop: "deviceIp", label: "设备IP" },
// { prop: "longitude", label: "" },
// { prop: "latitude", label: "" },
{ prop: "orientationCn", label: "进出方向" },
],
table_params: {}, //
pageSize: 4,
pageNum: 1,
total: 0, //
handle_video: "", //
handle_perception: "", //
pageSize: 0,
pageNum: 0,
only_params: {},
total: 0,
};
},
created() {
this.tableColumn = this.tableColumn_video; //
},
mounted() {
bus.$on("send", (data) => {
this.table_title = data.title;
if (this.table_title === "视频监控设备列表") {
this.display_search = true;
this.tableColumn = this.tableColumn_video;
} else if (this.table_title === "智能感知设备列表") {
this.display_search = false;
this.tableColumn = this.tableColumn_preception;
}
this.pushTableData = data.pushTableData;
this.only_params = data.search_params; //
console.log("this.pushTableData", this.pushTableData);
this.search_params_table = data.search_params;
});
this.table_column = this.table_column_video;
},
methods: {
//
onSubmit() {
this.only_params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
deviceIp: this.search.ip,
deviceName: this.search.equipment,
};
Object.assign(this.only_params, this.search_params_table);
getPerceptionList(this.only_params).then((res) => {
// res.row
this.pushTableData = res.rows;
obtain_table_data(data, params, flag) {
this.table_flag = flag;
console.log("data_1", data);
this.table_data = data.rows;
this.total = data.total;
this.pageSize = params.pageSize;
this.pageNum = params.pageNum;
this.only_params = params;
console.log("params_1", params);
},
//
refresh_video() {
getVideoList(this.only_params).then((res) => {
this.table_data = res.rows;
this.total = res.total;
});
},
//
reset() {
(this.search.equipment = ""), (this.search.ip = "");
this.only_params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
deviceIp: this.search.ip,
deviceName: this.search.equipment,
};
Object.assign(this.only_params, this.search_params_table);
refresh_perception() {
getPerceptionList(this.only_params).then((res) => {
// res.row
this.pushTableData = res.rows;
this.table_data = res.rows;
this.total = res.total;
});
},
//
onSubmitVideo() {
this.only_params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
gbsChannelNo: this.search.channel_code,
deviceIp: this.search.equipemnt_ip,
deviceName: this.search.equipment,
};
Object.assign(this.only_params, this.search_params_table);
//
video_search() {
this.only_params = Object.assign(this.only_params, this.search);
getVideoList(this.only_params).then((res) => {
// res.row
this.pushTableData = res.rows;
this.table_data = res.rows;
this.total = res.total;
});
},
//
resetVideo() {
(this.search.channel_code = ""),
(this.search.equipemnt_ip = ""),
(this.search.equipment = "");
this.only_params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
gbsChannelNo: this.search.channel_code,
deviceIp: this.search.equipemnt_ip,
deviceName: this.search.equipment,
};
Object.assign(this.only_params, this.search_params_table);
//
video_reset() {
//
this.search.gbsChannelNo = "";
this.search.deviceName = "";
this.search.deviceIp = "";
this.only_params = Object.assign(this.only_params, this.search);
getVideoList(this.only_params).then((res) => {
// res.row
this.pushTableData = res.rows;
this.table_data = res.rows;
this.total = res.total;
});
},
//
perception_search() {
this.only_params = Object.assign(this.only_params, this.search_p);
getPerceptionList(this.only_params).then((res) => {
this.table_data = res.rows;
this.total = res.total;
});
},
//
perception_reset() {
//
this.search_p.deviceIp = "";
this.search_p.deviceName = "";
this.only_params = Object.assign(this.only_params, this.search_p);
getPerceptionList(this.only_params).then((res) => {
this.table_data = res.rows;
this.total = res.total;
});
},
openDialog(num, row) {
console.log(num, "num");
//
open_video_dialog(num, row) {
if (num === "1") {
//
console.log(num, "num");
if (this.table_title === "视频监控设备列表") {
this.$refs.addVideoDialog.open(num);
} else if (this.table_title === "智能感知设备列表") {
this.$refs.addPerceptionDialog.open(num);
}
//
this.$refs.videoForm.open(num);
} else if (num === "2") {
//
console.log("rowww", row);
if (this.table_title === "视频监控设备列表") {
this.$refs.addVideoDialog.open(num, row);
} else if (this.table_title === "智能感知设备列表") {
this.$refs.addPerceptionDialog.open(num, row);
//
if (this.handle_video.length != 1) {
this.$message.warning("请选择一条表格数据");
} else {
this.$refs.deleteVideo.open(this.handle_video);
}
} else if (num === "3") {
//
this.$refs.uploadDialog.open();
//
this.$refs.importVideo.open();
} else if (num === "4") {
//
this.$refs.deriveDialog.open();
//
this.$refs.exportVideo.open();
} else if (num === "5") {
//
console.log("rowww", row);
if (this.table_title === "视频监控设备列表") {
this.$refs.addVideoDialog.open(num, row);
} else if (this.table_title === "智能感知设备列表") {
this.$refs.addPerceptionDialog.open(num, row);
//
this.$refs.videoForm.open(num, row);
} else if (num === "6") {
//
this.$refs.videoForm.open(num, row);
}
},
//
open_perception_dialog(num, row) {
if (num === "1") {
//
this.$refs.perceptionForm.open(num);
} else if (num === "2") {
//
if (this.handle_perception.length != 1) {
this.$message.warning("请选择一条表格数据");
} else {
this.$refs.deletePerception.open(this.handle_perception);
}
} else if (num === "3") {
//
this.$refs.importPerception.open();
} else if (num === "4") {
//
this.$refs.exportPerception.open();
} else if (num === "5") {
//
this.$refs.perceptionForm.open(num, row);
} else if (num === "6") {
//
this.$refs.perceptionForm.open(num, row);
}
},
//
handle_video_change(val) {
console.log("val_handle", val);
this.handle_video = val;
},
//
handle_perception_change(val) {
this.handle_perception = val;
},
table_header({ row, rowIndex }) {
console.log(row);
console.log(rowIndex);
@ -263,42 +392,53 @@ export default {
color: "#fff",
};
},
//
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.only_params.pageNum = val
console.log('this.only_params', this.only_params);
if (this.table_title === "视频监控设备列表") {
this.only_params.pageNum = val;
getVideoList(this.only_params).then((res) => {
this.pushTableData = res.rows;
this.table_data = res.rows;
});
} else if (this.table_title === "智能感知设备列表") {
},
//
handleCurrentChangePerception(val) {
console.log(`当前页: ${val}`);
this.only_params.pageNum = val;
getPerceptionList(this.only_params).then((res) => {
this.pushTableData = res.rows;
this.table_data = res.rows;
});
}
},
},
};
</script>
<style lang="less" scoped>
.equipment_data {
p {
.equipment_table_video,
.equipment_table_perception {
.table_title {
color: #fff;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
margin-left: 10px;
font-size: 17px;
}
.table_search {
margin-top: 1vh;
width: 64vw;
height: 4vh;
.table_search_form {
display: flex;
.el-form-item {
margin-left: 0.5vw;
}
}
.equipment_data_search {
margin-left: 12px;
/deep/.el-input__inner {
border-radius: 0px 0px 0px 0px;
background: #3c4b4a;
color: #fff;
width: 10vw;
}
.el-button {
width: 100%;
width: 4vw;
border: 1px solid #4a6072;
color: #fff;
border-radius: 0px !important;
@ -312,10 +452,9 @@ export default {
background-size: 100% 100% !important;
}
}
.equipment_data_btn {
margin-left: 12px;
.table_btn_list {
width: 64vw;
height: 5vh;
.el-button {
width: 90px;
height: 5vh;
@ -325,39 +464,30 @@ export default {
background: url("~@/assets/companyFile/btn1.png") no-repeat !important;
background-size: 100% 100% !important;
}
.el-button:focus,
.el-button:hover {
filter: brightness(200%);
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
}
}
.equipment_data_table {
width: calc(100% - 30px);
margin-top: 12px;
margin-left: 12px;
height: 27vh;
.el-table,
.el-table__expanded-cell {
color: #fff;
background-color: transparent;
.table_video {
width: 64vw;
height: 34vh;
margin-left: 10px;
}
/deep/.el-table {
width: 98.2%;
.el-table__body-wrapper {
overflow: auto;
background: #233438;
color: #fff;
&::-webkit-scrollbar {
width: 3px;
}
// ,
&::-webkit-scrollbar-thumb {
background: #4CF993;
background: #4cf993;
border-radius: 2px;
}
@ -365,17 +495,18 @@ export default {
&::-webkit-scrollbar-track {
background: transparent;
}
}
thead {
text-align: center;
color: #fff;
font-weight: 500;
background: linear-gradient(to right,
background: linear-gradient(
to right,
#284f49,
#2f6363,
#233b38) !important;
#233b38
) !important;
& th {
background-color: transparent;
@ -390,36 +521,29 @@ export default {
background: #233438;
}
}
.el-table::before {
//线
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
/deep/.el-button.operation {
width: 40px;
height: 30px;
background-color: rgb(35 52 56);
border: 0px;
color: #fff;
color: #2fabdc;
}
/deep/.el-button.operation:hover,
.el-button.operation:focus {
width: 40px;
height: 30px;
background-color: rgb(35 52 56);
background-color: rgb(35 52 56 0);
border: 0px;
color: #fff;
color: #2fabdc;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
}
}
.table_pagination {
width: 64vw;
height: 5vh;
.el-pagination {
margin-left: 50%;
margin-top: 2vh;
/deep/.el-pagination__total {
color: #fff;
@ -456,5 +580,6 @@ export default {
}
}
}
}
}
</style>

@ -1,223 +1,304 @@
<template>
<!-- 关联设备的右侧查询盒子 -->
<div class="searchBox_body">
<div class="searchBox_img">
<el-button
class="searchBox_img_top"
@click="change_types(searchBoxData.typesAll)"
<!-- 视频设备智能设备查询 -->
<div class="search_box">
<div class="box_title">设备列表</div>
<div class="search_check">
<!-- 视频设备查询条件 -->
<div class="video_check">
<div class="video_btn">
<el-button class="video_button" @click="video_all_check">
<img :src="video_btn_img_src" alt="" />
</el-button>
<div class="video_text">{{ video_text }}</div>
</div>
<el-checkbox-group v-model="video_checkgroup">
<el-checkbox
class="video_checks"
v-for="item in video_btn_list"
:key="item.value"
:label="item.name"
@change="video_check_search($event, item.value)"
>
{{ item.name }}</el-checkbox
>
<img :src="searchBoxData.src" alt="" />
</el-checkbox-group>
</div>
<!-- 智能设备查询条件 -->
<div class="perception_check">
<div class="perception_btn">
<el-button class="perception_button" @click="perception_all_check">
<img :src="perception_btn_img_src" alt="" />
</el-button>
<span>{{ searchBoxData.img_text }}</span>
<div class="perception_text">{{ perception_text }}</div>
</div>
<el-checkbox-group v-model="searchBoxData.company_types">
<el-checkbox-group v-model="perception_checkgroup">
<el-checkbox
class="searchBox_btn"
v-for="item in searchBoxData.btnList"
class="perception_checks"
v-for="item in perception_btn_list"
:key="item.value"
@change="sendClearList($event, item.type, item.value)"
:label="item.name"
name="type"
@change="perception_check_search($event, item.value)"
>
{{ item.name }}</el-checkbox
>
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
</div>
</template>
<script>
import bus from "@/assets/js/eventBus.js";
import { getVideoList, getPerceptionList } from "@/api/correlationEquipment";
export default {
name: "searchBox",
name: "SearchBox",
props: {
searchBoxData: {},
only_params: {}, //
},
data() {
return {
pushValue: {
title: "",
pushTableData: [],
search_params:{}, //
},
types_params_list: [], // id
per_types_params_list: [], // id
back_types:'', //
video_checkgroup: [], //
deviceVideoSubTypes: [], //
video_btn_list: [
{ value: 1, name: "公共区域", type: "1" },
{ value: 2, name: "地下车库", type: "1" },
{ value: 3, name: "全景监控", type: "1" },
{ value: 5, name: "人脸抓拍", type: "1" },
{ value: 6, name: "电梯监控", type: "1" },
{ value: 7, name: "人体测温", type: "1" },
{ value: 8, name: "车辆抓拍", type: "1" },
{ value: 9, name: "人脸门禁", type: "1" },
{ value: 4, name: "高空抛物", type: "1" },
],
video_btn_img_src: require("@/assets/companyFile/camera03.png"),
video_text: "视频监控设备",
perception_checkgroup: [], //
devicePerceptionSubTypes: [], //
perception_btn_list: [
{ value: 2, name: "车辆抓拍", type: "2" },
{ value: 1, name: "人脸抓拍", type: "2" },
{ value: 3, name: "门禁设备", type: "2" },
{ value: 4, name: "高抛抓拍", type: "2" },
{ value: 6, name: "全结构化", type: "2" },
{ value: 7, name: "智能烟感", type: "2" },
{ value: 8, name: "访客机", type: "2" },
{ value: 10, name: "多维设备", type: "2" },
{ value: 11, name: "WIFI设备", type: "2" },
],
perception_btn_img_src: require("@/assets/companyFile/intelligence02.png"),
perception_text: "智能感知设备",
check_push_table_data: {}, //
flag: true,
};
},
created() {},
methods: {
async sendClearList(e, item, value) {
if (e) {
//
//
this.$emit("clearList"); //
//
console.log("item123", item);
if (item === "1") {
this.back_types = item
this.$emit('backTypes', this.back_types) //
this.types_params_list.push(value);
this.pushValue.title = "视频监控设备列表";
//
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
deviceVideoSubTypes: "",
};
this.pushValue.search_params.deviceVideoSubTypes = this.types_params_list.sort().toString();
await getVideoList(this.pushValue.search_params).then((res) => {
console.log("resVideoList1", res.rows);
// res.row
this.pushValue.pushTableData = res.rows;
clear_search_list() {
this.video_checkgroup = []; //
this.perception_checkgroup = []; //
this.deviceVideoSubTypes = []; //
this.devicePerceptionSubTypes = []; //
delete this.only_params.deviceVideoSubType;
delete this.only_params.devicePerceptionSubType;
},
//
video_all_check() {
this.perception_checkgroup = []; //
this.video_checkgroup = []; //
this.deviceVideoSubTypes = []
this.devicePerceptionSubTypes = [];
delete this.only_params.devicePerceptionSubTypes; //
this.only_params.deviceVideoSubTypes = ""; //
this.flag = true;
getVideoList(this.only_params).then((res) => {
console.log("res_video", res);
this.check_push_table_data = res;
this.$emit(
"push_data_to_table",
this.check_push_table_data,
this.only_params,
this.flag
); // Table
});
} else if (item === "2") {
this.back_types = item
this.$emit('backTypes', this.back_types) //
this.per_types_params_list.push(value);
this.pushValue.title = "智能感知设备列表";
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
devicePerceptionSubTypes: "",
};
this.pushValue.search_params.devicePerceptionSubTypes = this.per_types_params_list
.sort()
.toString();
await getPerceptionList(this.pushValue.search_params).then((res) => {
// res.row
this.pushValue.pushTableData = res.rows;
},
//
perception_all_check() {
this.perception_checkgroup = []; //
this.video_checkgroup = []; //
this.deviceVideoSubTypes = []
this.devicePerceptionSubTypes = [];
delete this.only_params.deviceVideoSubTypes; //
this.only_params.devicePerceptionSubTypes = ""; //
this.flag = false;
getPerceptionList(this.only_params).then((res) => {
console.log("res_video", res);
this.check_push_table_data = res;
this.$emit(
"push_data_to_table",
this.check_push_table_data,
this.only_params,
this.flag
); // Table
});
}
bus.$emit("send", this.pushValue);
console.log("value", value);
} else {
//
console.log("e1111", e);
this.$emit("clearList"); //
//
console.log("item123", item);
if (item === "1") {
this.back_types = item
this.$emit('backTypes', this.back_types) //
console.log("this.types_params_list2", this.types_params_list);
console.log("value", value);
this.types_params_list = this.types_params_list.filter(
(val) => val != value
); //
console.log("this.types_params_list3", this.types_params_list);
this.pushValue.title = "视频监控设备列表";
//
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
deviceVideoSubTypes: "",
};
this.pushValue.search_params.deviceVideoSubTypes = this.types_params_list.sort().toString();
await getVideoList(this.pushValue.search_params).then((res) => {
console.log("resVideoList1", res.rows);
// res.row
this.pushValue.pushTableData = res.rows;
},
//
video_check_search(e, value) {
if (e) {
//
delete this.only_params.devicePerceptionSubTypes; //
this.perception_checkgroup = []; //
this.devicePerceptionSubTypes = []; //
this.deviceVideoSubTypes.push(value); //
this.only_params.deviceVideoSubTypes =
this.deviceVideoSubTypes.sort((a,b)=>{return a-b}).toString(); //
this.flag = true;
getVideoList(this.only_params).then((res) => {
console.log("res_video", res);
this.check_push_table_data = res;
this.$emit(
"push_data_to_table",
this.check_push_table_data,
this.only_params,
this.flag
); // Table
});
} else if (item === "2") {
this.back_types = item
this.$emit('backTypes', this.back_types) //
this.per_types_params_list = this.per_types_params_list.filter(
} else {
//
delete this.only_params.devicePerceptionSubTypes; //
this.perception_checkgroup = []; //
this.devicePerceptionSubTypes = []; //
this.deviceVideoSubTypes = this.deviceVideoSubTypes.filter(
(item) => item != value
);
this.pushValue.title = "智能感知设备列表";
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
devicePerceptionSubTypes: "",
};
this.pushValue.search_params.devicePerceptionSubTypes = this.per_types_params_list
.sort()
.toString();
await getPerceptionList(this.pushValue.search_params).then((res) => {
// res.row
this.pushValue.pushTableData = res.rows;
); //
this.only_params.deviceVideoSubTypes =
this.deviceVideoSubTypes.sort((a,b)=>{return a-b}).toString(); //
this.flag = true;
getVideoList(this.only_params).then((res) => {
console.log("res_video", res);
this.check_push_table_data = res;
this.$emit(
"push_data_to_table",
this.check_push_table_data,
this.only_params,
this.flag
); // Table
});
}
bus.$emit("send", this.pushValue);
}
},
async change_types(num) {
//
this.$emit("clearList"); //
this.types_params_list = []; //
this.per_types_params_list = [];
this.searchBoxData.company_types = [];
if (num === "1") {
//
this.back_types = num
this.$emit('backTypes', this.back_types) //
this.pushValue.title = "视频监控设备列表";
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
// deviceVideoSubTypes: "1,2,3,4,5,6,7,8,9",
};
await getVideoList(this.pushValue.search_params).then((res) => {
console.log("resVideoList1", res.rows);
// res.row
this.pushValue.pushTableData = res.rows;
//
perception_check_search(e, value) {
if (e) {
//
delete this.only_params.deviceVideoSubTypes; //
this.video_checkgroup = []; //
this.deviceVideoSubTypes = []; //
this.devicePerceptionSubTypes.push(value); //
this.only_params.devicePerceptionSubTypes =
this.devicePerceptionSubTypes.sort((a,b)=>{return a-b}).toString(); //
this.flag = false;
getPerceptionList(this.only_params).then((res) => {
this.check_push_table_data = res;
this.$emit(
"push_data_to_table",
this.check_push_table_data,
this.only_params,
this.flag
); // Table
});
} else if (num === "2") {
console.log("num123", num);
this.back_types = num
this.$emit('backTypes', this.back_types) //
//
this.pushValue.title = "智能感知设备列表";
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
// devicePerceptionSubTypes: "1,2,3,4,6,7,8,10,11",
};
await getPerceptionList(this.pushValue.search_params).then((res) => {
// res.row
this.pushValue.pushTableData = res.rows;
} else {
//
delete this.only_params.deviceVideoSubTypes; //
this.video_checkgroup = []; //
this.deviceVideoSubTypes = []; //
this.devicePerceptionSubTypes = this.devicePerceptionSubTypes.filter(
(item) => item != value
); //
this.only_params.devicePerceptionSubTypes =
this.devicePerceptionSubTypes.sort((a,b)=>{return a-b}).toString(); //
this.flag = false;
getPerceptionList(this.only_params).then((res) => {
this.check_push_table_data = res;
this.$emit(
"push_data_to_table",
this.check_push_table_data,
this.only_params,
this.flag
); // Table
});
}
bus.$emit("send", this.pushValue);
// const types_arr = this.searchBoxData.btnList.map((item) => ({
// name: item.name,
// }));
// const types_text = types_arr.map((item) => item.name);
// console.log("types_text", types_text);
// console.log(
// "this.searchBoxData.company_types",
// this.searchBoxData.company_types.length
// );
// //
// if (this.searchBoxData.company_types.length === 9) {
// this.searchBoxData.company_types = []; //
// } else if (
// this.searchBoxData.company_types.length != 0 &&
// this.searchBoxData.company_types.length != 9
// ) {
// this.searchBoxData.company_types = types_text; //
// } else if (this.searchBoxData.company_types.length === 0) {
// this.searchBoxData.company_types = types_text; //
// }
},
},
};
</script>
<style lang="less" scoped>
.searchBox_body {
width: 100%;
height: 100%;
.search_box {
margin: 0 auto;
margin-top: 1vh;
width: 63vw;
height: 24vh;
// border: 0.1px solid #485f6c;
.box_title {
width: 63vw;
height: 2vh;
color: #fff;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
}
.search_check {
margin-top: 1vh;
width: 63vw;
height: 20vh;
// border: 0.1px solid #485f6c;
display: flex;
justify-content: space-between;
//
.video_check {
width: 31vw;
height: 20vh;
border: 0.1px solid #485f6c;
display: flex;
.searchBox_img {
color: #fff;
text-align: center;
//
.video_btn {
width: 7vw;
height: 20vh;
display: flex;
justify-content: center;
flex-direction: column;
width: 22%;
height: 100%;
.video_button {
background: url("~@/assets/companyFile/btn08.png") no-repeat !important;
background-size: 100% 100% !important;
width: 5vw;
height: 10vh;
margin: 0px auto;
display: flex;
justify-content: center;
align-items: center;
border: 0px;
img {
width: 1.8vw;
height: 3.6vh;
}
}
.video_button:focus,
.video_button:hover {
filter: brightness(170%);
}
}
}
//
.perception_check {
width: 31vw;
height: 20vh;
border: 0.1px solid #485f6c;
display: flex;
color: #fff;
text-align: center;
font-size: 15px;
.searchBox_img_top {
//
.perception_btn {
width: 7vw;
height: 20vh;
display: flex;
justify-content: center;
flex-direction: column;
.perception_button {
background: url("~@/assets/companyFile/btn08.png") no-repeat !important;
background-size: 100% 100% !important;
width: 5vw;
@ -232,21 +313,20 @@ export default {
height: 3.6vh;
}
}
.searchBox_img_top:focus,
.searchBox_img_top:hover {
.perception_button:focus,
.perception_button:hover {
filter: brightness(170%);
}
span {
margin-top: 7%;
}
}
}
/deep/.el-checkbox-group {
width: 70%;
width: 24vw;
overflow: hidden;
display: flex;
justify-content: space-between;
flex-flow: wrap;
padding: 15px 0px 0px 10px;
padding: 20px 5px 0px 5px;
.el-checkbox {
width: 30%;
height: 4vh;
@ -271,24 +351,6 @@ export default {
.el-checkbox__inner {
display: none;
}
// .searchBox_btn {
// list-style: none;
// width: 30%;
// .el-button {
// width: 100%;
// border: 1px solid #4a6072;
// color: #fff;
// border-radius: 0px !important;
// background: #323f43;
// }
// .el-button:focus,
// .el-button:hover {
// color: #34e1b3;
// text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
// background: url("~@/assets/companyFile/891771.png") no-repeat !important;
// background-size: 100% 100% !important;
// }
// }
}
}
</style>

@ -1,27 +1,21 @@
<template>
<!-- 关联设备 -->
<div>
<div class="main">
<!-- 卡片标题 -->
<el-card class="box-card">
<div class="topZS"></div>
<div class="bottomZS"></div>
<div slot="header" class="clearfix">
<span>关联设备</span>
</div>
<!-- 内容 -->
<div class="cardBody">
<!-- 左侧 -->
<div class="cardBodyLeft">
<!-- 左侧搜索框 -->
<div class="cardBodyLeft_search">
<div class="left_tree">
<div class="left_search">
<el-input
class="cardBodyLeft_search_input"
class="left_search_input"
placeholder="输入企业名称搜索"
v-model="searchCompany"
v-model="search_company"
>
</el-input>
<div class="cardBodyLeft_search_button" @click="searchCom()">
<div class="left_search_button" @click="search_com()">
<i class="el-icon-search"></i>
</div>
</div>
@ -29,9 +23,9 @@
<div class="cardBodyLeft_footer">
<el-tree
ref="company_tree"
:data="companyTreeData"
:data="company_tree_data"
:props="defaultProps"
@node-click="handleNodeClick"
@node-click="handle_node_click"
node-key="subAreaCode"
:default-expand-all="defaultExpandAll"
>
@ -45,200 +39,119 @@
</el-tree>
</div>
</div>
<el-divider direction="vertical"></el-divider>
<!-- 右侧 -->
<div class="cardBodyRight">
<p>设备列表</p>
<div class="cardBodyRight_search">
<div class="video">
<div class="right">
<SearchBox
ref="searchBox"
:searchBoxData="searchBox_left_text"
@clearList="clearList('1')"
@backTypes="backTypes"
></SearchBox>
</div>
<div class="intelligence">
<SearchBox
ref="searchBox"
:searchBoxData="searchBox_right_text"
@clearList="clearList('2')"
@backTypes="backTypes"
:only_params="only_params"
@push_data_to_table="push_data_to_table"
></SearchBox>
</div>
</div>
<!-- 右下方表格区域 -->
<div class="right_table">
<EquipmentTable
ref="equipmentTable"
:pushTableData="pushTableData"
:only_params="only_params"
:push_table_data="push_table_data"
></EquipmentTable>
</div>
</div>
</el-card>
</div>
</div>
</el-card>
</template>
<script>
import SearchBox from "./components/searchBox.vue";
import EquipmentTable from "./components/equipmentTable.vue";
import {
getAllData,
getVideoList,
getPerceptionList,
} from "@/api/correlationEquipment";
<script>
import { getAllData, getVideoList } from "@/api/correlationEquipment";
import SearchBox from "./components/searchBox";
import EquipmentTable from "./components/equipmentTable";
export default {
name: "correlationEquipment",
name: "correlationEquipment2",
components: {
SearchBox,
EquipmentTable,
},
data() {
return {
searchCompany: "", //
companyTreeData: [], //
search_company: "",
company_tree_data: [], //
defaultProps: {
children: "children",
label: "areaName",
},
searchBox_left_text: {}, //
searchBox_right_text: {},
pushTableData: [],
defaultExpandAll: true, //
obtain_types: "", //
only_params:{}, //
only_params: {}, //
push_table_data: {}, //
};
},
created() {
//
this.only_params = {
areaName: "宁波",
pageSize: 5,
pageNum: 1,
};
getAllData(this.only_params).then((res) => {
if (res.code === 200) {
//
getAllData({ areaName: "宁波" }).then((res) => {
console.log("resning", res);
//
this.companyTreeData = res.data;
console.log("this.companyTreeData1", this.companyTreeData);
//
this.only_params = {
pageSize: 4,
pageNum: 1,
deviceVideoSubTypes: "1,2,3,4,5,6,7,8,9",
};
this.company_tree_data = res.data;
console.log("this.company_tree_data", this.company_tree_data);
//
//
getVideoList(this.only_params).then((res) => {
console.log("resVideoList", res.rows);
// res.row
this.pushTableData = res.rows;
console.log("resVideoList", res.rows); //res.rows res.total
//
this.push_table_data = res;
this.push_data_to_table(this.push_table_data,this.only_params,true);
});
} else {
this.$message.warning("企业名称查询失败");
}
});
//
//
this.searchBox_left_text = {
src: require("@/assets/companyFile/camera03.png"),
img_text: "视频监控设备",
btnList: [
{ value: 1, name: "公共区域", type: "1" },
{ value: 2, name: "地下车库", type: "1" },
{ value: 3, name: "全景监控", type: "1" },
{ value: 5, name: "人脸抓拍", type: "1" },
{ value: 6, name: "电梯监控", type: "1" },
{ value: 7, name: "人体测温", type: "1" },
{ value: 8, name: "车辆抓拍", type: "1" },
{ value: 9, name: "人脸门禁", type: "1" },
{ value: 4, name: "高空抛物", type: "1" },
],
company_types: [],
typesAll: "1",
};
//
this.searchBox_right_text = {
src: require("@/assets/companyFile/intelligence02.png"),
img_text: "智能感知设备",
btnList: [
{ value: 2, name: "车辆抓拍", type: "2" },
{ value: 1, name: "人脸抓拍", type: "2" },
{ value: 3, name: "门禁设备", type: "2" },
{ value: 4, name: "高抛抓拍", type: "2" },
{ value: 6, name: "全结构化", type: "2" },
{ value: 7, name: "智能烟感", type: "2" },
{ value: 8, name: "访客机", type: "2" },
{ value: 10, name: "多维设备", type: "2" },
{ value: 11, name: "WIFI设备", type: "2" },
],
company_types: [],
typesAll: "2",
};
},
methods: {
//
searchCom() {
this.only_params = {
areaName: this.searchCompany,
};
getAllData(this.only_params).then((res) => {
//
search_com() {
getAllData({
areaName: this.search_company === "" ? "宁波" : this.search_company,
})
.then((res) => {
//
this.companyTreeData = res.data;
console.log("this.companyTreeData", this.companyTreeData);
this.company_tree_data = res.data;
console.log("this.company_tree_data", this.company_tree_data);
})
.catch((err) => {
console.log("err", err);
this.$message.warning("查询失败,请输入正确查询条件");
this.company_tree_data = ""; //
});
},
handleNodeClick(data) {
handle_node_click(data) {
console.log("data123", data);
// List
this.searchBox_right_text.company_types = []; //
this.searchBox_left_text.company_types = [];
if (this.obtain_types === "" || this.obtain_types === "1") {
//
//
// this.searchBox_right_text.company_types = [];
// this.searchBox_left_text.company_types = [];
//
this.only_params = {
pageSize: 4,
pageSize: 5,
pageNum: 1,
company_id: data.subAreaCode, //
deviceVideoSubTypes: "1,2,3,4,5,6,7,8,9",
companyId: data.subAreaCode, //
// deviceVideoSubType: "1,2,3,4,5,6,7,8,9",
};
this.$refs.searchBox.clear_search_list();
getVideoList(this.only_params).then((res) => {
console.log("resVideoList", res.rows);
// res.row
this.pushTableData = res.rows;
this.push_table_data = res;
this.push_data_to_table(this.push_table_data,this.only_params,true);
});
} else if (this.obtain_types === "2") {
//
this.only_params = {
pageSize: 4,
pageNum: 1,
company_id: data.subAreaCode, //
devicePerceptionSubTypes: "1,2,3,4,6,7,8,10,11",
};
getPerceptionList(this.only_params).then((res) => {
if (res.code === 200) {
console.log("resVideoList", res.rows);
// res.row
this.pushTableData = res.rows;
}
});
}
},
clearList(num) {
console.log("num", num);
if (num === "1") {
this.searchBox_right_text.company_types = [];
} else if (num === "2") {
this.searchBox_left_text.company_types = [];
}
},
backTypes(num) {
console.log("num0000", num);
this.obtain_types = num;
push_data_to_table(data,params,flag) {
this.$refs.equipmentTable.obtain_table_data(data,params,flag);
},
},
};
</script>
<style lang="less" scoped>
<style lang="less" scoped>
/* card统一样式 */
.el-card.box-card.is-always-shadow {
height: calc(100vh - 116px); /* 控制card布局高度,用于适配 */
border: 0px;
height: 88.5vh; /* 控制card布局高度,用于适配 */
position: relative;
background: url("~@/assets/companyFile/22136.png") no-repeat !important;
background-size: 100% 100% !important;
}
/* card统一样式 */
/deep/.el-card__header {
@ -252,33 +165,23 @@ export default {
}
}
}
.main {
height: 100%;
.el-card.box-card.is-always-shadow {
background: url("~@/assets/companyFile/22136.png") no-repeat !important;
background-size: 100% 100% !important;
border: 0px;
}
.cardBody {
width: 100%;
.cardBody {
display: flex;
height: 80vh;
/* 左侧 */
.cardBodyLeft {
width: 25%;
height: 75vh;
background: rgba(23, 36, 36, 0.4);
border: 0.5px solid #485f6c;
border-radius: 4px;
.cardBodyLeft_search {
justify-content: space-between;
.left_tree {
width: 20vw;
height: 78vh;
border: 0.1px solid #485f6c;
background: linear-gradient(#314241, #1b2929, #121e1d);
.left_search {
display: flex;
margin-top: 5%;
margin-left: 5%;
width: 90%;
height: 40px;
.cardBodyLeft_search_input ::v-deep {
.left_search_input ::v-deep {
/* 查询框 */
width: 90%;
width: 87%;
.el-input__inner {
border-radius: 4px 0px 0px 4px;
background: #3c4b4a;
@ -290,8 +193,8 @@ export default {
border-color: #1b3736;
}
}
.cardBodyLeft_search_button {
width: 10%;
.left_search_button {
width: 13%;
height: 100%;
border-radius: 0px 4px 4px 0px;
background: #0e3936;
@ -303,8 +206,8 @@ export default {
padding: 12% 0;
}
}
.cardBodyLeft_search_button:focus,
.cardBodyLeft_search_button:hover {
.left_search_button:focus,
.left_search_button:hover {
/* 放大镜点击特效 */
background: #126a58;
}
@ -320,14 +223,16 @@ export default {
overflow: auto;
// box-shadow: 5px 5px 10px #126a58;
border-radius: 4px;
background: #293738;
// background: #293738;
background: rgba(0, 0, 0, 0);
border: 0.1px solid #485f6c;
color: #fff !important;
/deep/.el-tree-node__content {
height: 50px;
}
.el-tree-node__label.node-label {
display: flex;
font-size: 18px;
font-size: 16px;
}
/* 去掉树形数据前面的三角形 */
/deep/.el-icon-caret-right:before {
@ -397,44 +302,15 @@ export default {
}
}
}
/* 竖分割线 */
.el-divider.el-divider--vertical {
opacity: 0;
margin-left: 13px;
height: 100%;
}
/* 右侧 */
.cardBodyRight {
p {
margin-left: 10px;
height: 18px;
color: #fff;
font-size: 18px;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
}
width: 74%;
height: 75vh;
border-radius: 4px;
background: rgba(31, 45, 49, 0.4);
border: 0.5px solid #485f6c;
.cardBodyRight_search {
display: flex;
justify-content: space-evenly;
width: 63vw;
height: 20vh;
.video {
width: 48%;
height: 100%;
background: #3b5153;
border-radius: 4px;
}
.intelligence {
width: 48%;
height: 100%;
background: #3b5153;
border-radius: 4px;
}
}
.right {
width: 64vw;
height: 78vh;
// border: 0.1px solid #485f6c;
.right_table {
margin-top: 1vh;
width: 64vw;
height: 52vh;
// border: 0.1px solid #485f6c;
}
}
}

@ -1,389 +1,260 @@
<template>
<div>
<div v-if="table_flag" class="equipment_table_video">
<div class="table_title">视频监控设备列表</div>
<div class="table_search">
<el-form :model="search" class="table_search_form">
<!-- 设备表格 -->
<div class="equipment_data">
<p>{{ table_title }}</p>
<!-- 查询表 -->
<div v-if="display_search" class="equipment_data_search">
<el-form :inline="true" :model="search" class="search_data">
<el-form-item>
<el-input
v-model="search.deviceName"
placeholder="输入设备名称搜索"
></el-input>
<el-input v-model="search.equipment" placeholder="输入设备名称搜索"></el-input>
</el-form-item>
<el-form-item>
<el-input
v-model="search.gbsChannelNo"
placeholder="输入通道国际编码搜索"
></el-input>
<el-form-item>
<el-input v-model="search.channel_code" placeholder="输入通道国际编码搜索"></el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-input
v-model="search.deviceIp"
placeholder="输入设备IP搜索"
></el-input>
<el-input v-model="search.equipment_ip" placeholder="输入设备IP搜索"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="video_search"></el-button>
<el-button @click="onSubmitVideo"></el-button>
</el-form-item>
<el-form-item>
<el-button @click="video_reset"></el-button>
<el-button @click="resetVideo"></el-button>
</el-form-item>
</el-form>
</div>
<div class="table_btn_list">
<el-button
v-for="item in btn_list"
:key="item.value"
@click="open_video_dialog(item.value)"
>
<i :class="`el-icon-${item.icon}`" />
{{ item.label }}</el-button
>
</div>
<div class="table_video">
<el-table
:cell-style="{ background: 'revert' }"
:header-cell-style="table_header"
:data="table_data"
:highlight-current-row="true"
@selection-change="handle_video_change"
height="336"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column
v-for="item in table_column_video"
:key="item.prop"
:prop="item.prop"
:label="item.label"
:width="item.width"
></el-table-column>
<el-table-column prop="operation" label="操作">
<template slot-scope="scope">
<el-button
size="small"
class="operation"
@click="open_video_dialog('5', scope.row)"
>编辑
</el-button>
<el-button
size="small"
class="operation"
@click="open_video_dialog('6', scope.row)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="table_pagination">
<el-pagination
:background="true"
@current-change="handleCurrentChange"
:page-sizes="[5]"
:page-size="pageSize"
:current-page="pageNum"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div>
</div>
<div v-else class="equipment_table_perception">
<div class="table_title">智能感知设备列表</div>
<div class="table_search">
<el-form :model="search" class="table_search_form">
<div v-else class="equipment_data_search">
<el-form :inline="true" :model="search" class="search_data">
<el-form-item>
<el-input
v-model="search_p.deviceName"
placeholder="输入设备名称搜索"
></el-input>
<el-input v-model="search.equipment" placeholder="输入设备名称搜索"></el-input>
</el-form-item>
<el-form-item>
<el-input
v-model="search_p.deviceIp"
placeholder="输入设备IP搜索"
></el-input>
<el-form-item>
<el-input v-model="search.ip" placeholder="输入IP名称搜索"></el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-button @click="perception_search"></el-button>
<el-button @click="onSubmit"></el-button>
</el-form-item>
<el-form-item>
<el-button @click="perception_reset"></el-button>
<el-button @click="reset"></el-button>
</el-form-item>
</el-form>
</div>
<div class="table_btn_list">
<el-button
v-for="item in btn_list"
:key="item.value"
@click="open_perception_dialog(item.value)"
>
<!-- 增删按钮 -->
<div class="equipment_data_btn">
<el-button v-for="item in btnList" :key="item.value" @click="openDialog(item.value)">
<i :class="`el-icon-${item.icon}`" />
{{ item.label }}</el-button
>
{{ item.label }}</el-button>
</div>
<div class="table_perception">
<el-table
:cell-style="{ background: 'revert' }"
:header-cell-style="table_header"
:data="table_data"
:highlight-current-row="true"
@selection-change="handle_perception_change"
height="336"
>
<!-- 表格 -->
<div class="equipment_data_table">
<el-table :cell-style="{ background: 'revert' }" :header-cell-style="table_header" :data="pushTableData"
:highlight-current-row="true" height="250">
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column
v-for="item in table_column_perception"
:key="item.prop"
:prop="item.prop"
:label="item.label"
:width="item.width"
></el-table-column>
<el-table-column v-for="item in tableColumn" :key="item.prop" :prop="item.prop" :label="item.label"
:width="item.width"></el-table-column>
<el-table-column prop="operation" label="操作">
<template slot-scope="scope">
<el-button
size="small"
class="operation"
@click="open_perception_dialog('5', scope.row)"
>编辑
<el-button size="small" class="operation" @click="openDialog('2', scope.row)">编辑
</el-button>
<el-button
size="small"
class="operation"
@click="open_perception_dialog('6', scope.row)"
>详情
<el-button size="small" class="operation" @click="openDialog('5', scope.row)">详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="table_pagination">
<el-pagination
:background="true"
@current-change="handleCurrentChangePerception"
:page-sizes="[5]"
:page-size="pageSize"
:current-page="pageNum"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
<div class="equipment_data_pagination">
<el-pagination :background="true" @current-change="handleCurrentChange" :page-sizes="[4]" :page-size="PageSize"
:current-page="pageNum" layout="total, sizes, prev, pager, next, jumper" :total="pushTableData.length">
</el-pagination>
</div>
</div>
<!-- 视频设备表单弹窗 -->
<VideoForm ref="videoForm" @refresh_video="refresh_video"></VideoForm>
<!-- 删除视频设备表单弹窗 -->
<DeleteVideo ref="deleteVideo" @refresh_video="refresh_video"></DeleteVideo>
<!-- 导入视频设备弹窗 -->
<ImportVideo ref="importVideo"></ImportVideo>
<!-- 导出视频设备弹窗 -->
<ExportVideo ref="exportVideo"></ExportVideo>
<!-- 智能设备表单弹窗 -->
<PerceptionForm
ref="perceptionForm"
@refresh_perception="refresh_perception"
></PerceptionForm>
<!-- 删除智能设备表单弹窗 -->
<DeletePerception
ref="deletePerception"
@refresh_perception="refresh_perception"
></DeletePerception>
<!-- 导入智能设备弹窗 -->
<ImportPerception ref="importPerception"></ImportPerception>
<!-- 导出智能设备弹窗 -->
<ExportPerception ref="exportPerception"></ExportPerception>
<AddVideoDialog ref="addVideoDialog"></AddVideoDialog>
<AddPerceptionDialog ref="addPerceptionDialog"></AddPerceptionDialog>
<UploadDialog ref="uploadDialog"></UploadDialog>
<DeriveDialog ref="deriveDialog" :table_title="table_title"></DeriveDialog>
</div>
</template>
<script>
import AddVideoDialog from "./addVideoDialog";
import AddPerceptionDialog from "./addPerceptionDialog";
import UploadDialog from "./uploadDialog";
import DeriveDialog from "./deriveDialog";
import bus from "@/assets/js/eventBus.js";
import { getVideoList, getPerceptionList } from "@/api/correlationEquipment";
import VideoForm from "./videoForm";
import DeleteVideo from "./deleteVideo";
import ImportVideo from "./importVideo";
import ExportVideo from "./exportVideo";
import PerceptionForm from "./perceptionForm";
import DeletePerception from "./deletePerception";
import ImportPerception from "./importPerception";
import ExportPerception from "./exportPerception"
export default {
name:'EquipmentTable',
name: "EquipmentTable",
components: {
VideoForm,
DeleteVideo,
ImportVideo,
ExportVideo,
PerceptionForm,
DeletePerception,
ImportPerception,
ExportPerception,
AddPerceptionDialog,
AddVideoDialog,
UploadDialog,
DeriveDialog,
},
props: {
pushTableData: [],
only_params: {},
},
data() {
return {
table_flag: true,
//
table_title: "视频监控设备列表", //
display_search: true, //
search_params_table: {}, //
search: {
deviceName: "",
gbsChannelNo: "",
deviceIp: "",
equipment: "",
ip: "",
channel_code: "",
equipemnt_ip: "",
},
//
search_p: {
deviceName: "",
deviceIp: "",
},
btn_list: [
btnList: [
{ value: "1", label: "新增", icon: "plus" },
{ value: "2", label: "删除", icon: "delete" },
{ value: "3", label: "导入", icon: "bottom-right" },
{ value: "4", label: "导出", icon: "top-left" },
],
table_data: [],
table_column_video: [
tableColumn: [],
tableData: [],
//
tableColumn_video: [
{ prop: "gbsChannelNo", label: "通道国际编码", width: "200" },
{ prop: "gbsNvrNo", label: "NVR设备编码", width: "200" },
{ prop: "deviceName", label: "设备名称", width: "270" },
{ prop: "deviceVideoSubTypeCn", label: "设备类型", width: "200" },
{ prop: "deviceIp", label: "设备IP" },
// { prop: "deviceBrand", label: "" },
// { prop: "longitude", label: "" },
// { prop: "latitude", label: "" },
],
table_column_perception: [
//
tableColumn_preception: [
{ prop: "deviceName", label: "设备名称", width: "270" },
{ prop: "devicePerceptionSubTypeCn", label: "设备类型" },
{ prop: "deviceIp", label: "设备IP" },
// { prop: "longitude", label: "" },
// { prop: "latitude", label: "" },
{ prop: "orientationCn", label: "进出方向" },
],
handle_video: "", //
handle_perception: "", //
pageSize: 0,
pageNum: 0,
only_params: {},
total: 0,
table_params: {}, //
pageSize: 4,
pageNum: 1,
total: 0, //
};
},
created() {
this.table_column = this.table_column_video;
this.tableColumn = this.tableColumn_video; //
},
methods: {
obtain_table_data(data, params, flag) {
this.table_flag = flag;
console.log("data_1", data);
this.table_data = data.rows;
this.total = data.total;
this.pageSize = params.pageSize;
this.pageNum = params.pageNum;
this.only_params = params;
console.log("params_1", params);
},
//
refresh_video() {
getVideoList(this.only_params).then((res) => {
this.table_data = res.rows;
this.total = res.total;
mounted() {
bus.$on("send", (data) => {
this.table_title = data.title;
if (this.table_title === "视频监控设备列表") {
this.display_search = true;
this.tableColumn = this.tableColumn_video;
} else if (this.table_title === "智能感知设备列表") {
this.display_search = false;
this.tableColumn = this.tableColumn_preception;
}
this.pushTableData = data.pushTableData;
this.only_params = data.search_params; //
console.log("this.pushTableData", this.pushTableData);
this.search_params_table = data.search_params;
});
},
refresh_perception() {
methods: {
//
onSubmit() {
this.only_params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
deviceIp: this.search.ip,
deviceName: this.search.equipment,
};
Object.assign(this.only_params, this.search_params_table);
getPerceptionList(this.only_params).then((res) => {
this.table_data = res.rows;
this.total = res.total;
// res.row
this.pushTableData = res.rows;
});
},
//
video_search() {
this.only_params = Object.assign(this.only_params, this.search);
getVideoList(this.only_params).then((res) => {
this.table_data = res.rows;
this.total = res.total;
//
reset() {
(this.search.equipment = ""), (this.search.ip = "");
this.only_params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
deviceIp: this.search.ip,
deviceName: this.search.equipment,
};
Object.assign(this.only_params, this.search_params_table);
getPerceptionList(this.only_params).then((res) => {
// res.row
this.pushTableData = res.rows;
});
},
//
video_reset() {
//
this.search.gbsChannelNo = "";
this.search.deviceName = "";
this.search.deviceIp = "";
this.only_params = Object.assign(this.only_params, this.search);
//
onSubmitVideo() {
this.only_params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
gbsChannelNo: this.search.channel_code,
deviceIp: this.search.equipemnt_ip,
deviceName: this.search.equipment,
};
Object.assign(this.only_params, this.search_params_table);
getVideoList(this.only_params).then((res) => {
this.table_data = res.rows;
this.total = res.total;
// res.row
this.pushTableData = res.rows;
});
},
//
perception_search() {
this.only_params = Object.assign(this.only_params, this.search_p);
getPerceptionList(this.only_params).then((res) => {
this.table_data = res.rows;
this.total = res.total;
});
},
//
perception_reset() {
//
this.search_p.deviceIp = "";
this.search_p.deviceName = "";
this.only_params = Object.assign(this.only_params, this.search_p);
getPerceptionList(this.only_params).then((res) => {
this.table_data = res.rows;
this.total = res.total;
//
resetVideo() {
(this.search.channel_code = ""),
(this.search.equipemnt_ip = ""),
(this.search.equipment = "");
this.only_params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
gbsChannelNo: this.search.channel_code,
deviceIp: this.search.equipemnt_ip,
deviceName: this.search.equipment,
};
Object.assign(this.only_params, this.search_params_table);
getVideoList(this.only_params).then((res) => {
// res.row
this.pushTableData = res.rows;
});
},
//
open_video_dialog(num, row) {
openDialog(num, row) {
console.log(num, "num");
if (num === "1") {
//
this.$refs.videoForm.open(num);
} else if (num === "2") {
//
if (this.handle_video.length != 1) {
this.$message.warning("请选择一条表格数据");
} else {
this.$refs.deleteVideo.open(this.handle_video);
//
console.log(num, "num");
if (this.table_title === "视频监控设备列表") {
this.$refs.addVideoDialog.open(num);
} else if (this.table_title === "智能感知设备列表") {
this.$refs.addPerceptionDialog.open(num);
}
} else if (num === "3") {
//
this.$refs.importVideo.open();
} else if (num === "4") {
//
this.$refs.exportVideo.open();
} else if (num === "5") {
//
this.$refs.videoForm.open(num, row);
} else if (num === "6") {
//
this.$refs.videoForm.open(num, row);
}
},
//
open_perception_dialog(num, row) {
if (num === "1") {
//
this.$refs.perceptionForm.open(num);
} else if (num === "2") {
//
if (this.handle_perception.length != 1) {
this.$message.warning("请选择一条表格数据");
} else {
this.$refs.deletePerception.open(this.handle_perception);
//
console.log("rowww", row);
if (this.table_title === "视频监控设备列表") {
this.$refs.addVideoDialog.open(num, row);
} else if (this.table_title === "智能感知设备列表") {
this.$refs.addPerceptionDialog.open(num, row);
}
} else if (num === "3") {
//
this.$refs.importPerception.open();
//
this.$refs.uploadDialog.open();
} else if (num === "4") {
//
this.$refs.exportPerception.open();
//
this.$refs.deriveDialog.open();
} else if (num === "5") {
//
this.$refs.perceptionForm.open(num, row);
} else if (num === "6") {
//
this.$refs.perceptionForm.open(num, row);
//
console.log("rowww", row);
if (this.table_title === "视频监控设备列表") {
this.$refs.addVideoDialog.open(num, row);
} else if (this.table_title === "智能感知设备列表") {
this.$refs.addPerceptionDialog.open(num, row);
}
}
},
//
handle_video_change(val) {
console.log("val_handle", val);
this.handle_video = val;
},
//
handle_perception_change(val) {
this.handle_perception = val;
},
table_header({ row, rowIndex }) {
console.log(row);
@ -392,53 +263,42 @@ export default {
color: "#fff",
};
},
//
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.only_params.pageNum = val;
this.only_params.pageNum = val
console.log('this.only_params', this.only_params);
if (this.table_title === "视频监控设备列表") {
getVideoList(this.only_params).then((res) => {
this.table_data = res.rows;
this.pushTableData = res.rows;
});
},
//
handleCurrentChangePerception(val) {
console.log(`当前页: ${val}`);
this.only_params.pageNum = val;
} else if (this.table_title === "智能感知设备列表") {
getPerceptionList(this.only_params).then((res) => {
this.table_data = res.rows;
this.pushTableData = res.rows;
});
}
},
},
};
</script>
<style lang="less" scoped>
.equipment_table_video,
.equipment_table_perception {
.table_title {
.equipment_data {
p {
color: #fff;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
margin-left: 10px;
font-size: 17px;
}
.table_search {
margin-top: 1vh;
width: 64vw;
height: 4vh;
.table_search_form {
display: flex;
.el-form-item {
margin-left: 0.5vw;
}
}
.equipment_data_search {
margin-left: 12px;
/deep/.el-input__inner {
border-radius: 0px 0px 0px 0px;
background: #3c4b4a;
color: #fff;
width: 10vw;
}
.el-button {
width: 4vw;
width: 100%;
border: 1px solid #4a6072;
color: #fff;
border-radius: 0px !important;
@ -452,9 +312,10 @@ export default {
background-size: 100% 100% !important;
}
}
.table_btn_list {
width: 64vw;
height: 5vh;
.equipment_data_btn {
margin-left: 12px;
.el-button {
width: 90px;
height: 5vh;
@ -464,30 +325,39 @@ export default {
background: url("~@/assets/companyFile/btn1.png") no-repeat !important;
background-size: 100% 100% !important;
}
.el-button:focus,
.el-button:hover {
filter: brightness(200%);
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
}
}
.table_video {
width: 64vw;
height: 34vh;
margin-left: 10px;
.equipment_data_table {
width: calc(100% - 30px);
margin-top: 12px;
margin-left: 12px;
height: 27vh;
.el-table,
.el-table__expanded-cell {
color: #fff;
background-color: transparent;
}
/deep/.el-table {
width: 98.2%;
.el-table__body-wrapper {
overflow: auto;
background: #233438;
color: #fff;
&::-webkit-scrollbar {
width: 3px;
}
// ,
&::-webkit-scrollbar-thumb {
background: #4cf993;
background: #4CF993;
border-radius: 2px;
}
@ -495,18 +365,17 @@ export default {
&::-webkit-scrollbar-track {
background: transparent;
}
}
thead {
text-align: center;
color: #fff;
font-weight: 500;
background: linear-gradient(
to right,
background: linear-gradient(to right,
#284f49,
#2f6363,
#233b38
) !important;
#233b38) !important;
& th {
background-color: transparent;
@ -521,29 +390,36 @@ export default {
background: #233438;
}
}
.el-table::before {
//线
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
/deep/.el-button.operation {
width: 40px;
height: 30px;
background-color: rgb(35 52 56);
border: 0px;
color: #2fabdc;
color: #fff;
}
/deep/.el-button.operation:hover,
.el-button.operation:focus {
width: 40px;
height: 30px;
background-color: rgb(35 52 56 0);
background-color: rgb(35 52 56);
border: 0px;
color: #2fabdc;
color: #fff;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
}
.table_pagination {
width: 64vw;
height: 5vh;
}
.el-pagination {
margin-left: 50%;
margin-top: 2vh;
/deep/.el-pagination__total {
color: #fff;
@ -580,6 +456,5 @@ export default {
}
}
}
}
}
</style>

@ -1,304 +1,223 @@
<template>
<!-- 视频设备智能设备查询 -->
<div class="search_box">
<div class="box_title">设备列表</div>
<div class="search_check">
<!-- 视频设备查询条件 -->
<div class="video_check">
<div class="video_btn">
<el-button class="video_button" @click="video_all_check">
<img :src="video_btn_img_src" alt="" />
</el-button>
<div class="video_text">{{ video_text }}</div>
</div>
<el-checkbox-group v-model="video_checkgroup">
<el-checkbox
class="video_checks"
v-for="item in video_btn_list"
:key="item.value"
:label="item.name"
@change="video_check_search($event, item.value)"
>
{{ item.name }}</el-checkbox
<!-- 关联设备的右侧查询盒子 -->
<div class="searchBox_body">
<div class="searchBox_img">
<el-button
class="searchBox_img_top"
@click="change_types(searchBoxData.typesAll)"
>
</el-checkbox-group>
</div>
<!-- 智能设备查询条件 -->
<div class="perception_check">
<div class="perception_btn">
<el-button class="perception_button" @click="perception_all_check">
<img :src="perception_btn_img_src" alt="" />
<img :src="searchBoxData.src" alt="" />
</el-button>
<div class="perception_text">{{ perception_text }}</div>
<span>{{ searchBoxData.img_text }}</span>
</div>
<el-checkbox-group v-model="perception_checkgroup">
<el-checkbox-group v-model="searchBoxData.company_types">
<el-checkbox
class="perception_checks"
v-for="item in perception_btn_list"
class="searchBox_btn"
v-for="item in searchBoxData.btnList"
:key="item.value"
@change="sendClearList($event, item.type, item.value)"
:label="item.name"
@change="perception_check_search($event, item.value)"
>
{{ item.name }}</el-checkbox
name="type"
>
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
</div>
</template>
<script>
import bus from "@/assets/js/eventBus.js";
import { getVideoList, getPerceptionList } from "@/api/correlationEquipment";
export default {
name: "SearchBox",
name: "searchBox",
props: {
only_params: {}, //
searchBoxData: {},
},
data() {
return {
video_checkgroup: [], //
deviceVideoSubTypes: [], //
video_btn_list: [
{ value: 1, name: "公共区域", type: "1" },
{ value: 2, name: "地下车库", type: "1" },
{ value: 3, name: "全景监控", type: "1" },
{ value: 5, name: "人脸抓拍", type: "1" },
{ value: 6, name: "电梯监控", type: "1" },
{ value: 7, name: "人体测温", type: "1" },
{ value: 8, name: "车辆抓拍", type: "1" },
{ value: 9, name: "人脸门禁", type: "1" },
{ value: 4, name: "高空抛物", type: "1" },
],
video_btn_img_src: require("@/assets/companyFile/camera03.png"),
video_text: "视频监控设备",
perception_checkgroup: [], //
devicePerceptionSubTypes: [], //
perception_btn_list: [
{ value: 2, name: "车辆抓拍", type: "2" },
{ value: 1, name: "人脸抓拍", type: "2" },
{ value: 3, name: "门禁设备", type: "2" },
{ value: 4, name: "高抛抓拍", type: "2" },
{ value: 6, name: "全结构化", type: "2" },
{ value: 7, name: "智能烟感", type: "2" },
{ value: 8, name: "访客机", type: "2" },
{ value: 10, name: "多维设备", type: "2" },
{ value: 11, name: "WIFI设备", type: "2" },
],
perception_btn_img_src: require("@/assets/companyFile/intelligence02.png"),
perception_text: "智能感知设备",
check_push_table_data: {}, //
flag: true,
pushValue: {
title: "",
pushTableData: [],
search_params:{}, //
},
types_params_list: [], // id
per_types_params_list: [], // id
back_types:'', //
};
},
created() {},
methods: {
clear_search_list() {
this.video_checkgroup = []; //
this.perception_checkgroup = []; //
this.deviceVideoSubTypes = []; //
this.devicePerceptionSubTypes = []; //
delete this.only_params.deviceVideoSubType;
delete this.only_params.devicePerceptionSubType;
},
//
video_all_check() {
this.perception_checkgroup = []; //
this.video_checkgroup = []; //
this.deviceVideoSubTypes = []
this.devicePerceptionSubTypes = [];
delete this.only_params.devicePerceptionSubTypes; //
this.only_params.deviceVideoSubTypes = ""; //
this.flag = true;
getVideoList(this.only_params).then((res) => {
console.log("res_video", res);
this.check_push_table_data = res;
this.$emit(
"push_data_to_table",
this.check_push_table_data,
this.only_params,
this.flag
); // Table
});
},
//
perception_all_check() {
this.perception_checkgroup = []; //
this.video_checkgroup = []; //
this.deviceVideoSubTypes = []
this.devicePerceptionSubTypes = [];
delete this.only_params.deviceVideoSubTypes; //
this.only_params.devicePerceptionSubTypes = ""; //
this.flag = false;
getPerceptionList(this.only_params).then((res) => {
console.log("res_video", res);
this.check_push_table_data = res;
this.$emit(
"push_data_to_table",
this.check_push_table_data,
this.only_params,
this.flag
); // Table
});
},
//
video_check_search(e, value) {
async sendClearList(e, item, value) {
if (e) {
//
delete this.only_params.devicePerceptionSubTypes; //
this.perception_checkgroup = []; //
this.devicePerceptionSubTypes = []; //
this.deviceVideoSubTypes.push(value); //
this.only_params.deviceVideoSubTypes =
this.deviceVideoSubTypes.sort((a,b)=>{return a-b}).toString(); //
this.flag = true;
getVideoList(this.only_params).then((res) => {
console.log("res_video", res);
this.check_push_table_data = res;
this.$emit(
"push_data_to_table",
this.check_push_table_data,
this.only_params,
this.flag
); // Table
//
//
this.$emit("clearList"); //
//
console.log("item123", item);
if (item === "1") {
this.back_types = item
this.$emit('backTypes', this.back_types) //
this.types_params_list.push(value);
this.pushValue.title = "视频监控设备列表";
//
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
deviceVideoSubTypes: "",
};
this.pushValue.search_params.deviceVideoSubTypes = this.types_params_list.sort().toString();
await getVideoList(this.pushValue.search_params).then((res) => {
console.log("resVideoList1", res.rows);
// res.row
this.pushValue.pushTableData = res.rows;
});
} else if (item === "2") {
this.back_types = item
this.$emit('backTypes', this.back_types) //
this.per_types_params_list.push(value);
this.pushValue.title = "智能感知设备列表";
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
devicePerceptionSubTypes: "",
};
this.pushValue.search_params.devicePerceptionSubTypes = this.per_types_params_list
.sort()
.toString();
await getPerceptionList(this.pushValue.search_params).then((res) => {
// res.row
this.pushValue.pushTableData = res.rows;
});
}
bus.$emit("send", this.pushValue);
console.log("value", value);
} else {
//
delete this.only_params.devicePerceptionSubTypes; //
this.perception_checkgroup = []; //
this.devicePerceptionSubTypes = []; //
this.deviceVideoSubTypes = this.deviceVideoSubTypes.filter(
//
console.log("e1111", e);
this.$emit("clearList"); //
//
console.log("item123", item);
if (item === "1") {
this.back_types = item
this.$emit('backTypes', this.back_types) //
console.log("this.types_params_list2", this.types_params_list);
console.log("value", value);
this.types_params_list = this.types_params_list.filter(
(val) => val != value
); //
console.log("this.types_params_list3", this.types_params_list);
this.pushValue.title = "视频监控设备列表";
//
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
deviceVideoSubTypes: "",
};
this.pushValue.search_params.deviceVideoSubTypes = this.types_params_list.sort().toString();
await getVideoList(this.pushValue.search_params).then((res) => {
console.log("resVideoList1", res.rows);
// res.row
this.pushValue.pushTableData = res.rows;
});
} else if (item === "2") {
this.back_types = item
this.$emit('backTypes', this.back_types) //
this.per_types_params_list = this.per_types_params_list.filter(
(item) => item != value
); //
this.only_params.deviceVideoSubTypes =
this.deviceVideoSubTypes.sort((a,b)=>{return a-b}).toString(); //
this.flag = true;
getVideoList(this.only_params).then((res) => {
console.log("res_video", res);
this.check_push_table_data = res;
this.$emit(
"push_data_to_table",
this.check_push_table_data,
this.only_params,
this.flag
); // Table
);
this.pushValue.title = "智能感知设备列表";
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
devicePerceptionSubTypes: "",
};
this.pushValue.search_params.devicePerceptionSubTypes = this.per_types_params_list
.sort()
.toString();
await getPerceptionList(this.pushValue.search_params).then((res) => {
// res.row
this.pushValue.pushTableData = res.rows;
});
}
bus.$emit("send", this.pushValue);
}
},
//
perception_check_search(e, value) {
if (e) {
//
delete this.only_params.deviceVideoSubTypes; //
this.video_checkgroup = []; //
this.deviceVideoSubTypes = []; //
this.devicePerceptionSubTypes.push(value); //
this.only_params.devicePerceptionSubTypes =
this.devicePerceptionSubTypes.sort((a,b)=>{return a-b}).toString(); //
this.flag = false;
getPerceptionList(this.only_params).then((res) => {
this.check_push_table_data = res;
this.$emit(
"push_data_to_table",
this.check_push_table_data,
this.only_params,
this.flag
); // Table
async change_types(num) {
//
this.$emit("clearList"); //
this.types_params_list = []; //
this.per_types_params_list = [];
this.searchBoxData.company_types = [];
if (num === "1") {
//
this.back_types = num
this.$emit('backTypes', this.back_types) //
this.pushValue.title = "视频监控设备列表";
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
// deviceVideoSubTypes: "1,2,3,4,5,6,7,8,9",
};
await getVideoList(this.pushValue.search_params).then((res) => {
console.log("resVideoList1", res.rows);
// res.row
this.pushValue.pushTableData = res.rows;
});
} else {
//
delete this.only_params.deviceVideoSubTypes; //
this.video_checkgroup = []; //
this.deviceVideoSubTypes = []; //
this.devicePerceptionSubTypes = this.devicePerceptionSubTypes.filter(
(item) => item != value
); //
this.only_params.devicePerceptionSubTypes =
this.devicePerceptionSubTypes.sort((a,b)=>{return a-b}).toString(); //
this.flag = false;
getPerceptionList(this.only_params).then((res) => {
this.check_push_table_data = res;
this.$emit(
"push_data_to_table",
this.check_push_table_data,
this.only_params,
this.flag
); // Table
} else if (num === "2") {
console.log("num123", num);
this.back_types = num
this.$emit('backTypes', this.back_types) //
//
this.pushValue.title = "智能感知设备列表";
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
// devicePerceptionSubTypes: "1,2,3,4,6,7,8,10,11",
};
await getPerceptionList(this.pushValue.search_params).then((res) => {
// res.row
this.pushValue.pushTableData = res.rows;
});
}
bus.$emit("send", this.pushValue);
// const types_arr = this.searchBoxData.btnList.map((item) => ({
// name: item.name,
// }));
// const types_text = types_arr.map((item) => item.name);
// console.log("types_text", types_text);
// console.log(
// "this.searchBoxData.company_types",
// this.searchBoxData.company_types.length
// );
// //
// if (this.searchBoxData.company_types.length === 9) {
// this.searchBoxData.company_types = []; //
// } else if (
// this.searchBoxData.company_types.length != 0 &&
// this.searchBoxData.company_types.length != 9
// ) {
// this.searchBoxData.company_types = types_text; //
// } else if (this.searchBoxData.company_types.length === 0) {
// this.searchBoxData.company_types = types_text; //
// }
},
},
};
</script>
<style lang="less" scoped>
.search_box {
margin: 0 auto;
margin-top: 1vh;
width: 63vw;
height: 24vh;
// border: 0.1px solid #485f6c;
.box_title {
width: 63vw;
height: 2vh;
color: #fff;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
}
.search_check {
margin-top: 1vh;
width: 63vw;
height: 20vh;
// border: 0.1px solid #485f6c;
display: flex;
justify-content: space-between;
//
.video_check {
width: 31vw;
height: 20vh;
border: 0.1px solid #485f6c;
.searchBox_body {
width: 100%;
height: 100%;
display: flex;
color: #fff;
text-align: center;
//
.video_btn {
width: 7vw;
height: 20vh;
.searchBox_img {
display: flex;
justify-content: center;
flex-direction: column;
.video_button {
background: url("~@/assets/companyFile/btn08.png") no-repeat !important;
background-size: 100% 100% !important;
width: 5vw;
height: 10vh;
margin: 0px auto;
display: flex;
justify-content: center;
align-items: center;
border: 0px;
img {
width: 1.8vw;
height: 3.6vh;
}
}
.video_button:focus,
.video_button:hover {
filter: brightness(170%);
}
}
}
//
.perception_check {
width: 31vw;
height: 20vh;
border: 0.1px solid #485f6c;
display: flex;
width: 22%;
height: 100%;
color: #fff;
text-align: center;
//
.perception_btn {
width: 7vw;
height: 20vh;
display: flex;
justify-content: center;
flex-direction: column;
.perception_button {
font-size: 15px;
.searchBox_img_top {
background: url("~@/assets/companyFile/btn08.png") no-repeat !important;
background-size: 100% 100% !important;
width: 5vw;
@ -313,20 +232,21 @@ export default {
height: 3.6vh;
}
}
.perception_button:focus,
.perception_button:hover {
.searchBox_img_top:focus,
.searchBox_img_top:hover {
filter: brightness(170%);
}
}
span {
margin-top: 7%;
}
}
/deep/.el-checkbox-group {
width: 24vw;
width: 70%;
overflow: hidden;
display: flex;
justify-content: space-between;
flex-flow: wrap;
padding: 20px 5px 0px 5px;
padding: 15px 0px 0px 10px;
.el-checkbox {
width: 30%;
height: 4vh;
@ -351,6 +271,24 @@ export default {
.el-checkbox__inner {
display: none;
}
// .searchBox_btn {
// list-style: none;
// width: 30%;
// .el-button {
// width: 100%;
// border: 1px solid #4a6072;
// color: #fff;
// border-radius: 0px !important;
// background: #323f43;
// }
// .el-button:focus,
// .el-button:hover {
// color: #34e1b3;
// text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
// background: url("~@/assets/companyFile/891771.png") no-repeat !important;
// background-size: 100% 100% !important;
// }
// }
}
}
</style>

@ -1,21 +1,27 @@
<template>
<!-- 关联设备 -->
<div>
<div class="main">
<!-- 卡片标题 -->
<el-card class="box-card">
<div class="topZS"></div>
<div class="bottomZS"></div>
<div slot="header" class="clearfix">
<span>关联设备</span>
</div>
<!-- 内容 -->
<div class="cardBody">
<div class="left_tree">
<div class="left_search">
<!-- 左侧 -->
<div class="cardBodyLeft">
<!-- 左侧搜索框 -->
<div class="cardBodyLeft_search">
<el-input
class="left_search_input"
class="cardBodyLeft_search_input"
placeholder="输入企业名称搜索"
v-model="search_company"
v-model="searchCompany"
>
</el-input>
<div class="left_search_button" @click="search_com()">
<div class="cardBodyLeft_search_button" @click="searchCom()">
<i class="el-icon-search"></i>
</div>
</div>
@ -23,9 +29,9 @@
<div class="cardBodyLeft_footer">
<el-tree
ref="company_tree"
:data="company_tree_data"
:data="companyTreeData"
:props="defaultProps"
@node-click="handle_node_click"
@node-click="handleNodeClick"
node-key="subAreaCode"
:default-expand-all="defaultExpandAll"
>
@ -39,119 +45,200 @@
</el-tree>
</div>
</div>
<div class="right">
<el-divider direction="vertical"></el-divider>
<!-- 右侧 -->
<div class="cardBodyRight">
<p>设备列表</p>
<div class="cardBodyRight_search">
<div class="video">
<SearchBox
ref="searchBox"
:only_params="only_params"
@push_data_to_table="push_data_to_table"
:searchBoxData="searchBox_left_text"
@clearList="clearList('1')"
@backTypes="backTypes"
></SearchBox>
<!-- 右下方表格区域 -->
<div class="right_table">
</div>
<div class="intelligence">
<SearchBox
ref="searchBox"
:searchBoxData="searchBox_right_text"
@clearList="clearList('2')"
@backTypes="backTypes"
></SearchBox>
</div>
</div>
<EquipmentTable
ref="equipmentTable"
:push_table_data="push_table_data"
:pushTableData="pushTableData"
:only_params="only_params"
></EquipmentTable>
</div>
</div>
</div>
</el-card>
</div>
</div>
</template>
<script>
import { getAllData, getVideoList } from "@/api/correlationEquipment";
import SearchBox from "./components/searchBox";
import EquipmentTable from "./components/equipmentTable";
<script>
import SearchBox from "./components/searchBox.vue";
import EquipmentTable from "./components/equipmentTable.vue";
import {
getAllData,
getVideoList,
getPerceptionList,
} from "@/api/correlationEquipment";
export default {
name: "correlationEquipment2",
name: "correlationEquipment",
components: {
SearchBox,
EquipmentTable,
},
data() {
return {
search_company: "",
company_tree_data: [], //
searchCompany: "", //
companyTreeData: [], //
defaultProps: {
children: "children",
label: "areaName",
},
searchBox_left_text: {}, //
searchBox_right_text: {},
pushTableData: [],
defaultExpandAll: true, //
only_params: {}, //
push_table_data: {}, //
obtain_types: "", //
only_params:{}, //
};
},
created() {
//
this.only_params = {
pageSize: 5,
pageNum: 1,
areaName: "宁波",
};
//
getAllData({ areaName: "宁波" }).then((res) => {
getAllData(this.only_params).then((res) => {
if (res.code === 200) {
console.log("resning", res);
//
this.company_tree_data = res.data;
console.log("this.company_tree_data", this.company_tree_data);
//
//
this.companyTreeData = res.data;
console.log("this.companyTreeData1", this.companyTreeData);
//
this.only_params = {
pageSize: 4,
pageNum: 1,
deviceVideoSubTypes: "1,2,3,4,5,6,7,8,9",
};
getVideoList(this.only_params).then((res) => {
console.log("resVideoList", res.rows); //res.rows res.total
//
this.push_table_data = res;
this.push_data_to_table(this.push_table_data,this.only_params,true);
console.log("resVideoList", res.rows);
// res.row
this.pushTableData = res.rows;
});
} else {
this.$message.warning("企业名称查询失败");
}
});
//
//
this.searchBox_left_text = {
src: require("@/assets/companyFile/camera03.png"),
img_text: "视频监控设备",
btnList: [
{ value: 1, name: "公共区域", type: "1" },
{ value: 2, name: "地下车库", type: "1" },
{ value: 3, name: "全景监控", type: "1" },
{ value: 5, name: "人脸抓拍", type: "1" },
{ value: 6, name: "电梯监控", type: "1" },
{ value: 7, name: "人体测温", type: "1" },
{ value: 8, name: "车辆抓拍", type: "1" },
{ value: 9, name: "人脸门禁", type: "1" },
{ value: 4, name: "高空抛物", type: "1" },
],
company_types: [],
typesAll: "1",
};
//
this.searchBox_right_text = {
src: require("@/assets/companyFile/intelligence02.png"),
img_text: "智能感知设备",
btnList: [
{ value: 2, name: "车辆抓拍", type: "2" },
{ value: 1, name: "人脸抓拍", type: "2" },
{ value: 3, name: "门禁设备", type: "2" },
{ value: 4, name: "高抛抓拍", type: "2" },
{ value: 6, name: "全结构化", type: "2" },
{ value: 7, name: "智能烟感", type: "2" },
{ value: 8, name: "访客机", type: "2" },
{ value: 10, name: "多维设备", type: "2" },
{ value: 11, name: "WIFI设备", type: "2" },
],
company_types: [],
typesAll: "2",
};
},
methods: {
//
//
search_com() {
getAllData({
areaName: this.search_company === "" ? "宁波" : this.search_company,
})
.then((res) => {
searchCom() {
this.only_params = {
areaName: this.searchCompany,
};
getAllData(this.only_params).then((res) => {
//
this.company_tree_data = res.data;
console.log("this.company_tree_data", this.company_tree_data);
})
.catch((err) => {
console.log("err", err);
this.$message.warning("查询失败,请输入正确查询条件");
this.company_tree_data = ""; //
this.companyTreeData = res.data;
console.log("this.companyTreeData", this.companyTreeData);
});
},
handle_node_click(data) {
handleNodeClick(data) {
console.log("data123", data);
// List
//
// this.searchBox_right_text.company_types = [];
// this.searchBox_left_text.company_types = [];
//
this.searchBox_right_text.company_types = []; //
this.searchBox_left_text.company_types = [];
if (this.obtain_types === "" || this.obtain_types === "1") {
//
this.only_params = {
pageSize: 5,
pageSize: 4,
pageNum: 1,
companyId: data.subAreaCode, //
// deviceVideoSubType: "1,2,3,4,5,6,7,8,9",
company_id: data.subAreaCode, //
deviceVideoSubTypes: "1,2,3,4,5,6,7,8,9",
};
this.$refs.searchBox.clear_search_list();
getVideoList(this.only_params).then((res) => {
console.log("resVideoList", res.rows);
this.push_table_data = res;
this.push_data_to_table(this.push_table_data,this.only_params,true);
// res.row
this.pushTableData = res.rows;
});
} else if (this.obtain_types === "2") {
//
this.only_params = {
pageSize: 4,
pageNum: 1,
company_id: data.subAreaCode, //
devicePerceptionSubTypes: "1,2,3,4,6,7,8,10,11",
};
getPerceptionList(this.only_params).then((res) => {
if (res.code === 200) {
console.log("resVideoList", res.rows);
// res.row
this.pushTableData = res.rows;
}
});
}
},
push_data_to_table(data,params,flag) {
this.$refs.equipmentTable.obtain_table_data(data,params,flag);
clearList(num) {
console.log("num", num);
if (num === "1") {
this.searchBox_right_text.company_types = [];
} else if (num === "2") {
this.searchBox_left_text.company_types = [];
}
},
backTypes(num) {
console.log("num0000", num);
this.obtain_types = num;
},
},
};
</script>
<style lang="less" scoped>
<style lang="less" scoped>
/* card统一样式 */
.el-card.box-card.is-always-shadow {
border: 0px;
height: 88.5vh; /* 控制card布局高度,用于适配 */
height: calc(100vh - 116px); /* 控制card布局高度,用于适配 */
position: relative;
background: url("~@/assets/companyFile/22136.png") no-repeat !important;
background-size: 100% 100% !important;
}
/* card统一样式 */
/deep/.el-card__header {
@ -165,23 +252,33 @@ export default {
}
}
}
.cardBody {
.main {
height: 100%;
.el-card.box-card.is-always-shadow {
background: url("~@/assets/companyFile/22136.png") no-repeat !important;
background-size: 100% 100% !important;
border: 0px;
}
.cardBody {
width: 100%;
display: flex;
justify-content: space-between;
.left_tree {
width: 20vw;
height: 78vh;
border: 0.1px solid #485f6c;
background: linear-gradient(#314241, #1b2929, #121e1d);
.left_search {
height: 80vh;
/* 左侧 */
.cardBodyLeft {
width: 25%;
height: 75vh;
background: rgba(23, 36, 36, 0.4);
border: 0.5px solid #485f6c;
border-radius: 4px;
.cardBodyLeft_search {
display: flex;
margin-top: 5%;
margin-left: 5%;
width: 90%;
height: 40px;
.left_search_input ::v-deep {
.cardBodyLeft_search_input ::v-deep {
/* 查询框 */
width: 87%;
width: 90%;
.el-input__inner {
border-radius: 4px 0px 0px 4px;
background: #3c4b4a;
@ -193,8 +290,8 @@ export default {
border-color: #1b3736;
}
}
.left_search_button {
width: 13%;
.cardBodyLeft_search_button {
width: 10%;
height: 100%;
border-radius: 0px 4px 4px 0px;
background: #0e3936;
@ -206,8 +303,8 @@ export default {
padding: 12% 0;
}
}
.left_search_button:focus,
.left_search_button:hover {
.cardBodyLeft_search_button:focus,
.cardBodyLeft_search_button:hover {
/* 放大镜点击特效 */
background: #126a58;
}
@ -223,16 +320,14 @@ export default {
overflow: auto;
// box-shadow: 5px 5px 10px #126a58;
border-radius: 4px;
// background: #293738;
background: rgba(0, 0, 0, 0);
border: 0.1px solid #485f6c;
background: #293738;
color: #fff !important;
/deep/.el-tree-node__content {
height: 50px;
}
.el-tree-node__label.node-label {
display: flex;
font-size: 16px;
font-size: 18px;
}
/* 去掉树形数据前面的三角形 */
/deep/.el-icon-caret-right:before {
@ -302,15 +397,44 @@ export default {
}
}
}
.right {
width: 64vw;
height: 78vh;
// border: 0.1px solid #485f6c;
.right_table {
margin-top: 1vh;
width: 64vw;
height: 52vh;
// border: 0.1px solid #485f6c;
/* 竖分割线 */
.el-divider.el-divider--vertical {
opacity: 0;
margin-left: 13px;
height: 100%;
}
/* 右侧 */
.cardBodyRight {
p {
margin-left: 10px;
height: 18px;
color: #fff;
font-size: 18px;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
}
width: 74%;
height: 75vh;
border-radius: 4px;
background: rgba(31, 45, 49, 0.4);
border: 0.5px solid #485f6c;
.cardBodyRight_search {
display: flex;
justify-content: space-evenly;
width: 63vw;
height: 20vh;
.video {
width: 48%;
height: 100%;
background: #3b5153;
border-radius: 4px;
}
.intelligence {
width: 48%;
height: 100%;
background: #3b5153;
border-radius: 4px;
}
}
}
}
}

Loading…
Cancel
Save