{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\components\\monitorPage.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\components\\monitorPage.vue","mtime":1687169259491},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport {\n\tmapState\n} from 'vuex'\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\nimport equipmentManage from '@/api/device/equipmentManage.js'\nimport VideoFacilities from '@/api/device/VideoFacilities.js'\n\nimport req from '@/request.js'\nimport {\n\tTableMixin\n} from '@/mixins/tableMixin'\nimport videoFormDialog from '@/views/Device/deviceManage/components/videoFormDialog'\nexport default {\n\tname: 'VideoFacilities',\n\tcomponents: {\n\t\tvideoFormDialog\n\t},\n\tmixins: [TableMixin],\n\tdata() {\n\t\treturn {\n\t\t\t//携带参数\n\t\t\tuploadData: {\n\t\t\t\tcatalogCode: ''\n\t\t\t},\n\t\t\treviseDat: '',\n\t\t\treviseVisible: false,\n\t\t\treviseStart: '',\n\t\t\tcatalogs: [], //视频目录\n\t\t\tloading: false,\n\t\t\tfullId: '', //目录树编码\n\t\t\tcatalogCode: '', //目录编码\n\t\t\tcatalogPlatform: '',\n\t\t\tmultipleSelection: [], // 复选框\n\t\t\tparams: {\n\t\t\t\tname: '',\n\t\t\t\tcatalogCode: '',\n\t\t\t\tstatus: '',\n\t\t\t\tzoneCode: ''\n\t\t\t},\n\t\t\tquerys: [{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'LIKE',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'r.name_',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t},\n\t\t\t\t// {\n\t\t\t\t// group: 'main',\n\t\t\t\t// operation: 'RIGHT_LIKE',\n\t\t\t\t// parentGroup: '',\n\t\t\t\t// property: 'z.full_id_',\n\t\t\t\t// relation: 'AND',\n\t\t\t\t// value: ''\n\t\t\t\t// },\n\t\t\t\t{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'EQUAL',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'r.catalog_code_',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'EQUAL',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'e.important_',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t}\n\t\t\t],\n\t\t\tregionIndexCode: '',\n\t\t\ttotal: 0,\n\t\t\ttableData: [],\n\t\t\tvideoTree: [],\n\t\t\tdefaultProps: {\n\t\t\t\tvalue: 'code',\n\t\t\t\tlabel: 'name'\n\t\t\t},\n\t\t\tdata: [],\n\t\t\tfilterText: '',\n\t\t\tshow: false,\n\t\t\trules: {\n\t\t\t\tname: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入区域名称',\n\t\t\t\t\ttrigger: 'change'\n\t\t\t\t}],\n\t\t\t\tcode: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入区域编码',\n\t\t\t\t\ttrigger: 'change'\n\t\t\t\t}]\n\t\t\t},\n\t\t\ttitles: '',\n\t\t\tarea: {\n\t\t\t\tcode: '',\n\t\t\t\tname: ''\n\t\t\t},\n\t\t\tpArea: null,\n\t\t\tactiveCollapseDia: '1',\n\t\t\tshowTreeNode: false,\n\t\t\turl: {\n\t\t\t\tdelete: '/biz/catalog/base/point/'\n\t\t\t},\n\t\t\tsbztList: [],\n\t\t\tmonitor:{}\n\t\t}\n\t},\n\n\twatch: {\n\t\tfilterText(val) {\n\t\t\tthis.$refs.tree.filter(val)\n\t\t}\n\t},\n\t//获取token\n\tcomputed: mapState({\n\t\theader: state => {\n\t\t\treturn {\n\t\t\t\tAuthorization: `Bearer ${state.login.currentUser.token}`\n\t\t\t}\n\t\t}\n\t}),\n\tcreated() {\n\t\t//在created里面区获取actionUrl\n\t\tthis.monitor = JSON.parse(localStorage.getItem('monitor'))\n\t\tthis.actionUrl = window.context.portal\n\t\tthis.sbztList = dictUtils.getDictItemsFromCache('sbzt')\n\n\t\t// this.getTreeDict()\n\t},\n\n\tmethods: {\n\t\tgoBack(){\n\t\t\tthis.$router.push({\n\t\t\t\tpath:'DeviceAnalysis'\n\t\t\t})\n\t\t},\n\t\thandleDbClick(val) {\n\t\t\tconsole.log(val)\n\t\t\tthis.$refs.formModal.editBasic(val)\n\t\t},\n\t\t//上传成功\n\t\thandleAvatarSuccess(res, file) {\n\t\t\t//提示\n\t\t\tthis.$notify({\n\t\t\t\ttype: 'success',\n\t\t\t\tmessage: this.$t('domestic.success'),\n\t\t\t\tduration: 2000\n\t\t\t})\n\t\t\tthis.loadData() //调用用页面查询接口,刷新数据\n\t\t},\n\t\t//上传失败\n\t\thandleAvatarError(err, file, fileList) {\n\t\t\t//提示\n\t\t\tthis.$notify({\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: this.$t('domestic.failure'),\n\t\t\t\tduration: 2000\n\t\t\t})\n\t\t},\n\t\t//数据导入\n\t\timportData() {},\n\t\t//数据导出\n\t\texportData() {\n\t\t\tlet exportParam = {\n\t\t\t\t...this.queryParam\n\t\t\t}\n\t\t\texportParam.pageBean = {\n\t\t\t\tpage: 1,\n\t\t\t\tpageSize: -1\n\t\t\t}\n\t\t\tconsole.log(exportParam)\n\t\t\tequipmentManage.exportPointBase(exportParam, res => {})\n\t\t\t// this.loadData()\n\t\t},\n\t\t//\n\t\thandleClose() {\n\t\t\tthis.reviseVisible = false\n\t\t},\n\t\t//\n\t\trevise(val) {\n\t\t\tthis.reviseVisible = true\n\t\t\tthis.reviseDat = val\n\t\t},\n\t\treviseBtn() {\n\t\t\t// console.log(this.reviseDat)\n\t\t\tequipmentManage.updateStatus({\n\t\t\t\t\tid: this.reviseDat.id,\n\t\t\t\t\tproductCode: 'video',\n\t\t\t\t\tstatus: this.reviseStart\n\t\t\t\t},\n\t\t\t\tres => {\n\t\t\t\t\tthis.loadData()\n\t\t\t\t\tthis.reviseVisible = false\n\t\t\t\t\t// if (res.state) {\n\t\t\t\t\t// this.$message({\n\t\t\t\t\t// message: res.message,\n\t\t\t\t\t// type: 'success'\n\t\t\t\t\t// })\n\t\t\t\t\t// this.loadData()\n\t\t\t\t\t// this.reviseVisible = false\n\t\t\t\t\t// }\n\t\t\t\t}\n\t\t\t)\n\t\t},\n\t\tequipment(val) {\n\t\t\tconsole.log(val)\n\t\t\tlet importantData = 0\n\t\t\tif (val.important == 1 && val.important) {\n\t\t\t\timportantData = 0\n\t\t\t} else {\n\t\t\t\timportantData = 1\n\t\t\t}\n\t\t\tequipmentManage.updateImportantPoint({\n\t\t\t\t\tid: val.id,\n\t\t\t\t\timportant: importantData\n\t\t\t\t},\n\t\t\t\tres => {\n\t\t\t\t\t// console.log(res)\n\t\t\t\t\tif (res.state) {\n\t\t\t\t\t\tthis.$message({\n\t\t\t\t\t\t\tmessage: res.message,\n\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t})\n\t\t\t\t\t\tthis.loadData()\n\t\t\t\t\t\t// this.reviseVisible = false\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t)\n\t\t},\n\t\thandleDeleteSite(row) {\n\t\t\tVideoFacilities.deleteVideoSite(row.id, res => {\n\t\t\t\tif (res.state) {\n\t\t\t\t\tthis.$message.success('删除成功')\n\t\t\t\t\tthis.loadData()\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tselectable(row) {\n\t\t\tif (row.dataType == 2) {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\t\thandleAdd() {\n\t\t\tif (!this.regionIndexCode) {\n\t\t\t\tthis.$message.warning('请选择新增视频点位所属区域!')\n\t\t\t\treturn\n\t\t\t} else {\n\t\t\t\tlet pData = {\n\t\t\t\t\tcatalogCode: this.catalogCode,\n\t\t\t\t\tplatform: this.catalogPlatform,\n\t\t\t\t\tzoneCode: this.regionIndexCode\n\t\t\t\t}\n\t\t\t\tthis.$refs.formModal.add(pData)\n\t\t\t}\n\t\t},\n\t\treload() {},\n\t\thandleCloseDia() {\n\t\t\tthis.showTreeNode = false\n\t\t\tthis.area = {\n\t\t\t\tcode: '',\n\t\t\t\tname: ''\n\t\t\t}\n\t\t\tthis.pArea = null\n\t\t},\n\t\thandleSaveDia() {\n\t\t\tthis.$refs.formInfo.validate(valid => {\n\t\t\t\tif (valid) {\n\t\t\t\t\tlet API = VideoFacilities.updateVideoArea\n\t\t\t\t\tif (this.titles == '新增') {\n\t\t\t\t\t\tthis.area.baseCode = this.pArea.baseCode\n\t\t\t\t\t\tthis.area.parentId = this.pArea.id\n\t\t\t\t\t\tthis.area.platform = this.pArea.platform\n\t\t\t\t\t\tAPI = VideoFacilities.addVideoArea\n\t\t\t\t\t}\n\t\t\t\t\tconsole.log(this.area)\n\t\t\t\t\tAPI(this.area, res => {\n\t\t\t\t\t\tif (res.state) {\n\t\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t\tmessage: this.titles + '视频区域成功!',\n\t\t\t\t\t\t\t\tduration: 2000\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tthis.getTree()\n\t\t\t\t\t\t\tthis.handleCloseDia()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\t\tmessage: res.message,\n\t\t\t\t\t\t\t\tduration: 2000,\n\t\t\t\t\t\t\t\toffset: 80\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tappend(data, type) {\n\t\t\tconsole.log(data, type, 'data, type')\n\t\t\tthis.activeCollapseDia = '1'\n\t\t\tthis.titles = '新增'\n\t\t\tthis.showTreeNode = true\n\t\t\tthis.pArea = data\n\t\t},\n\t\tupDateinfo(data, type) {\n\t\t\tthis.titles = '修改'\n\t\t\tthis.area = data\n\t\t\tthis.showTreeNode = true\n\t\t},\n\t\t// 删除视频目录\n\t\tremove(data) {\n\t\t\tthis.$confirm('确定删除选中数据?', '提示', {\n\t\t\t\t\tconfirmButtonText: '确 定',\n\t\t\t\t\tcancelButtonText: '取 消',\n\t\t\t\t\ttype: 'warning'\n\t\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tVideoFacilities.deleteVideoArea(data.id, res => {\n\t\t\t\t\t\tif (res.state) {\n\t\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t\tmessage: '删除成功',\n\t\t\t\t\t\t\t\tduration: 2000\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tthis.getTree()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\t\tmessage: res.message,\n\t\t\t\t\t\t\t\tduration: 2000,\n\t\t\t\t\t\t\t\toffset: 80\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t\t.catch(() => {})\n\t\t},\n\n\t\t// 获取目录\n\t\tgetTreeDict() {\n\t\t\tVideoFacilities.getVideoF({}, res => {\n\t\t\t\tthis.catalogs = res.value\n\t\t\t\tthis.catalogCode = this.catalogs[0].code\n\t\t\t\tthis.catalogPlatform = this.catalogs[0].platform\n\t\t\t\tthis.getTree()\n\t\t\t})\n\t\t},\n\t\t// 获取目录树\n\t\tgetTree() {\n\t\t\tlet query = {\n\t\t\t\tzoneCode: this.catalogCode\n\t\t\t}\n\t\t\tVideoFacilities.getVideoTree(query, res => {\n\t\t\t\tthis.videoTree = res.value\n\t\t\t\tthis.fullId = this.videoTree.length ? this.videoTree[0].fullId : ''\n\t\t\t\tif (this.videoTree.length) {\n\t\t\t\t\tthis.loadData()\n\t\t\t\t} else {\n\t\t\t\t\tthis.videoTree[0] = {\n\t\t\t\t\t\tname: '--',\n\t\t\t\t\t\tid: '-1',\n\t\t\t\t\t\tdataType: 1,\n\t\t\t\t\t\tbaseCode: this.catalogCode,\n\t\t\t\t\t\tplatform: this.catalogPlatform\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\t// 切换目录\n\t\tchangeCatalog(val) {\n\t\t\tthis.$refs.multipleSelection.clearSelection() //切换,选中就归零\n\t\t\tif (val) {\n\t\t\t\tthis.catalogCode = val\n\t\t\t\tthis.catalogPlatform = val\n\t\t\t\tlet platform = this.catalogs.filter(item => item.code == val)[0]\n\t\t\t\t\t.platform\n\t\t\t\tthis.catalogPlatform = platform\n\t\t\t\tthis.getTree()\n\t\t\t} else {\n\t\t\t\tthis.catalogCode = ''\n\t\t\t\tthis.catalogPlatform = ''\n\t\t\t\tthis.videoTree = []\n\t\t\t\tthis.$set(this.videoTree, this.videoTree, res.value)\n\t\t\t}\n\t\t},\n\t\thandleUpdate(val) {\n\t\t\tVideoFacilities.getDetails(val.code, res => {\n\t\t\t\tif (res) {\n\t\t\t\t\tlet path = this.$route.path\n\t\t\t\t\tif (path.indexOf('frontPlat') !== -1) {\n\t\t\t\t\t\tthis.$router.push({\n\t\t\t\t\t\t\tname: 'VideoDetails',\n\t\t\t\t\t\t\tquery: res\n\t\t\t\t\t\t})\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.$router.push({\n\t\t\t\t\t\t\tname: 'VideoDetailsLink',\n\t\t\t\t\t\t\tquery: res\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tchangeNode(data) {\n\t\t\tconsole.log(data);\n\t\t\tif (data) {\n\t\t\t\tthis.regionIndexCode = data.code\n\t\t\t\tthis.fullId = data.fullId\n\t\t\t\tthis.params.zoneCode = data.code\n\t\t\t\t//如果点击树,选中状态归0\n\t\t\t\tthis.$refs.multipleSelection.clearSelection()\n\t\t\t\tthis.loadData()\n\t\t\t}\n\t\t},\n\t\tloadData() {\n\t\t\tthis.loading = false\n\t\t\tthis.tableData = []\n\t\t\tthis.queryParam.querys = []\n\t\t\tthis.queryParam.params = this.params\n\t\t\tthis.uploadData.catalogCode = this.catalogCode\n\t\t\t\n\t\t\tVideoFacilities.getList(this.queryParam, res => {\n\t\t\t\tif (res) {\n\t\t\t\t\tthis.tableData = res.rows\n\t\t\t\t\tthis.total = res.total\n\t\t\t\t\tthis.loading = false\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\t//同步数据\n\t\tsynchroTree() {\n\t\t\tVideoFacilities.asycCataLog(res => {\n\t\t\t\tif (res.state) {\n\t\t\t\t\tif (res.state) {\n\t\t\t\t\t\tthis.$message.success('目录同步成功')\n\t\t\t\t\t\tthis.getTreeDict()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.$message.error('同步失败')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tsynchro(node, data) {\n\t\t\tVideoFacilities.asycCataLogZone({\n\t\t\t\ttreeCode: this.catalogCode\n\t\t\t}, res => {\n\t\t\t\tif (res.state) {\n\t\t\t\t\tthis.$message.success('区域同步成功')\n\t\t\t\t\tthis.getTreen()\n\t\t\t\t} else {\n\t\t\t\t\tthis.$message.error('同步失败')\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tonClickSynch() {\n\t\t\tVideoFacilities.getSynch({}, res => {\n\t\t\t\tif (res.state) {\n\t\t\t\t\tthis.$message.success('同步成功')\n\t\t\t\t} else {\n\t\t\t\t\tthis.$message.error('同步失败')\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tfilterNode(value, data) {\n\t\t\tif (!value) return true\n\t\t\treturn data.name.indexOf(value) !== -1\n\t\t},\n\t\thandleSizeChange(val) {\n\t\t\tthis.queryParam.pageBean.pageSize = val\n\t\t\tthis.loadData()\n\t\t},\n\t\thandleCurrentChange(val) {\n\t\t\tthis.queryParam.pageBean.page = val\n\t\t\tthis.loadData()\n\t\t},\n\t\t// handleSelectionChange(val) {\n\t\t// this.multipleSelection = val.map((item) => {\n\t\t// return item.id\n\t\t// })\n\t\t// },\n\t\t// // 指定一个key标识这一行的数据\n\t\tgetRowKey(row) {\n\t\t\treturn row.id\n\t\t},\n\t\t// // 点击查询\n\t\tonClickSearch() {\n\t\t\tthis.queryParam.pageBean.page = 1\n\t\t\tthis.loadData()\n\t\t}\n\t}\n}\n",null]}