| | |
| | | |
| | | // 记录摄像机所属的父节点名称 |
| | | public cameraParents: object |
| | | // 记录所有的子节点 |
| | | public childNodes: Array<object> |
| | | |
| | | constructor() { |
| | | this.openeds = [true, true, false] |
| | |
| | | this.clusterId = "" |
| | | this.devId = "" |
| | | this.cameraParents = {} |
| | | this.childNodes = [] |
| | | } |
| | | |
| | | setVideoArr(index: number, value: object, vue: any): void { |
| | |
| | | } else { |
| | | if (n.type != "MENU") { |
| | | this.cameraParents[n.id] = parentName |
| | | this.childNodes.push(n) |
| | | } |
| | | } |
| | | }) |
| | |
| | | |
| | | async fetchTreeData() { |
| | | this.cameraParents = {} |
| | | this.childNodes = [] |
| | | |
| | | if (this.openeds[0]) { |
| | | await this.fetchLocalTree() |
| | | } |
| | |
| | | </el-tooltip> |
| | | </div> |
| | | |
| | | <!-- 导出设备 --> |
| | | <div class="tree-edit export-btn" v-show="!TreeDataPool.readonly"> |
| | | <el-tooltip content="导出设备" placement="bottom" popper-class="atooltip"> |
| | | <download-excel |
| | | class="export-excel-wrapper" |
| | | :data="TreeDataPool.childNodes" |
| | | :fields="json_fields" |
| | | :name="'摄像机列表.xlsx'" |
| | | > |
| | | <!-- 上面可以自定义自己的样式,还可以引用其他组件button --> |
| | | <!-- <el-button type="primary" size="small">导出EXCEL</el-button> --> |
| | | <!-- <div class="btnArea"> |
| | | <div class="button light"> |
| | | <span class="iconfont"></span> |
| | | 导出数据 |
| | | </div> |
| | | </div> --> |
| | | <span class="iconfont" style="font-size: 16px"></span> |
| | | </download-excel> |
| | | </el-tooltip> |
| | | </div> |
| | | |
| | | <!-- 树操作锁 --> |
| | | <div class="tree-edit tree-lock" v-show="showLock"> |
| | | <button @click="lockSwitch"> |
| | |
| | | importAreaId: "", |
| | | menuLoading: false, |
| | | clusterName: "", |
| | | cluster: "" |
| | | cluster: "", |
| | | json_fields: { |
| | | 部门: { |
| | | field: "id", |
| | | //自定义回调函数 |
| | | callback: (value) => { |
| | | let org = "" |
| | | if (this.TreeDataPool.cameraParents.hasOwnProperty(value)) { |
| | | org = this.TreeDataPool.cameraParents[value] |
| | | } |
| | | return org |
| | | } |
| | | }, |
| | | // 告警标记: "", |
| | | // 整改描述: "", |
| | | 摄像机通道号: "rtsp", |
| | | 摄像机ID: "id", |
| | | 摄像机名称: "name", |
| | | 开启分析: { |
| | | field: "isAI", |
| | | //自定义回调函数 |
| | | callback: (value) => { |
| | | return value ? "是" : "否" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.TreeDataPool.localCurrentPage = current |
| | | }, |
| | | |
| | | exportCameras() { |
| | | console.log(this.TreeDataPool.treeData) |
| | | }, |
| | | importCameras(area) { |
| | | this.importAreaId = area |
| | | this.$refs["import-btn"].click() |
| | |
| | | color: #000; |
| | | } |
| | | } |
| | | .area-add { |
| | | right: 62px; |
| | | } |
| | | .camera-add { |
| | | right: 36px; |
| | | } |
| | | |
| | | .closeIcon, |
| | | .openIcon { |
| | |
| | | margin-right: 6px; |
| | | } |
| | | |
| | | .import-btn { |
| | | right: 10px; |
| | | .area-add { |
| | | right: 85px; |
| | | } |
| | | |
| | | .camera-add { |
| | | right: 60px; |
| | | } |
| | | |
| | | .import-btn { |
| | | right: 35px; |
| | | } |
| | | |
| | | .export-btn { |
| | | right: 10px; |
| | | transform: rotate(90deg); |
| | | } |
| | | |
| | | .tree-font { |
| | | font-family: PingFangSC-Medium; |
| | | font-size: 14px; |