{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\VideoFacilities.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\VideoFacilities.vue","mtime":1691463999649},{"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//\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//\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//\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//\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\r\nimport {mapState} from 'vuex'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport equipmentManage from '@/api/device/equipmentManage.js'\r\nimport VideoFacilities from '@/api/device/VideoFacilities.js'\r\nimport {dragControllerDiv} from '@/mixins/dragControllerDiv'\r\nimport videoMonitor from '@/api/videoMonitorapi.js'\r\nimport req from '@/request.js'\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nimport videoFormDialog from '@/views/Device/deviceManage/components/videoFormDialog'\r\nexport default {\r\n name: 'VideoFacilities',\r\n components: {\r\n videoFormDialog,\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n //携带参数\r\n uploadData: {\r\n catalogCode: '',\r\n },\r\n reviseDat: '',\r\n reviseVisible: false,\r\n reviseStart: '',\r\n catalogs: [], //视频目录\r\n loading: false,\r\n fullId: '', //目录树编码\r\n catalogCode: '', //目录编码\r\n catalogPlatform: '',\r\n multipleSelection: [], // 复选框\r\n params: {\r\n name: '',\r\n catalogCode: '',\r\n status: '',\r\n zoneCode: '',\r\n },\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'r.name_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n // {\r\n // group: 'main',\r\n // operation: 'RIGHT_LIKE',\r\n // parentGroup: '',\r\n // property: 'z.full_id_',\r\n // relation: 'AND',\r\n // value: ''\r\n // },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'r.catalog_code_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'e.important_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n ],\r\n regionIndexCode: '',\r\n total: 0,\r\n tableData: [],\r\n videoTree: [],\r\n defaultProps: {\r\n value: 'code',\r\n label: 'name',\r\n },\r\n data: [],\r\n filterText: '',\r\n show: false,\r\n rules: {\r\n name: [\r\n {\r\n required: true,\r\n message: '请输入区域名称',\r\n trigger: 'change',\r\n },\r\n ],\r\n code: [\r\n {\r\n required: true,\r\n message: '请输入区域编码',\r\n trigger: 'change',\r\n },\r\n ],\r\n },\r\n titles: '',\r\n area: {\r\n code: '',\r\n name: '',\r\n },\r\n pArea: null,\r\n activeCollapseDia: '1',\r\n showTreeNode: false,\r\n url: {\r\n delete: '/biz/catalog/base/point/',\r\n },\r\n sbztList: [],\r\n\r\n treeKey: '',\r\n options: [],\r\n spdwztList: [],\r\n spdwssptList: [],\r\n }\r\n },\r\n\r\n watch: {\r\n filterText(val) {\r\n this.$refs.tree.filter(val)\r\n },\r\n },\r\n mounted() {\r\n dragControllerDiv()\r\n },\r\n //获取token\r\n computed: mapState({\r\n header: (state) => {\r\n return {\r\n Authorization: `Bearer ${state.login.currentUser.token}`,\r\n }\r\n },\r\n }),\r\n created() {\r\n //在created里面区获取actionUrl\r\n this.actionUrl = window.context.portal\r\n this.sbztList = dictUtils.getDictItemsFromCache('sbzt')\r\n this.spdwztList = dictUtils.getDictItemsFromCache('spdwzt')\r\n this.spdwssptList = dictUtils.getDictItemsFromCache('spdwsspt')\r\n\r\n this.getBusinessTreen()\r\n },\r\n\r\n methods: {\r\n changeVedeoF(val) {\r\n if (val) {\r\n this.treeKey = val\r\n this.catalogCode = val\r\n this.query = {\r\n zoneCode: this.treeKey,\r\n }\r\n this.getTree()\r\n // this.query = {\r\n // \tzoneCode: val,\r\n // }\r\n // videoMonitor.getVideoTreeSite(this.query, (res) => {\r\n // \tthis.data = res.value\r\n // })\r\n // let obj = this.options.find((item) => item.code == val)\r\n // if (obj && obj.platform) {\r\n // \tthis.platform = obj.platform\r\n // }\r\n } else {\r\n this.data = []\r\n this.$set(this.data, this.data, res.value)\r\n }\r\n },\r\n getBusinessTreen() {\r\n videoMonitor.getVideoF({}, (res) => {\r\n this.options = res.value\r\n this.treeKey = this.options[0].code\r\n this.catalogCode = this.options[0].code\r\n this.query = {\r\n zoneCode: this.treeKey,\r\n }\r\n this.getTree()\r\n // videoMonitor.getVideoTreeSite(this.query, (res) => {\r\n // \tthis.data = res.value\r\n // \tthis.queryParam.params.treeKey = this.data[0].code\r\n // })\r\n // videoMonitor.getVideoTree(this.query, (res) => {\r\n // this.data = res.value\r\n // // console.log(this.videoTree,666)\r\n // this.queryParam.params.treeKey = this.data[0].code\r\n // })\r\n })\r\n },\r\n handleDbClick(val) {\r\n console.log(val)\r\n this.$refs.formModal.editBasic(val)\r\n },\r\n //上传成功\r\n handleAvatarSuccess(res, file) {\r\n //提示\r\n this.$notify({\r\n type: 'success',\r\n message: this.$t('domestic.success'),\r\n duration: 2000,\r\n })\r\n this.loadData() //调用用页面查询接口,刷新数据\r\n },\r\n //上传失败\r\n handleAvatarError(err, file, fileList) {\r\n //提示\r\n this.$notify({\r\n type: 'error',\r\n message: this.$t('domestic.failure'),\r\n duration: 2000,\r\n })\r\n },\r\n //数据导入\r\n importData() {},\r\n //数据导出\r\n exportData() {\r\n let exportParam = {\r\n ...this.queryParam,\r\n }\r\n exportParam.pageBean = {\r\n page: 1,\r\n pageSize: -1,\r\n }\r\n console.log(exportParam)\r\n equipmentManage.exportPointBase(exportParam, (res) => {})\r\n // this.loadData()\r\n },\r\n //\r\n handleClose() {\r\n this.reviseVisible = false\r\n },\r\n //\r\n revise(val) {\r\n this.reviseVisible = true\r\n this.reviseDat = val\r\n },\r\n reviseBtn() {\r\n // console.log(this.reviseDat)\r\n equipmentManage.updateStatus(\r\n {\r\n id: this.reviseDat.id,\r\n productCode: 'video',\r\n status: this.reviseStart,\r\n },\r\n (res) => {\r\n this.loadData()\r\n this.reviseVisible = false\r\n // if (res.state) {\r\n // this.$message({\r\n // message: res.message,\r\n // type: 'success'\r\n // })\r\n // this.loadData()\r\n // this.reviseVisible = false\r\n // }\r\n }\r\n )\r\n },\r\n equipment(val) {\r\n console.log(val)\r\n let importantData = 0\r\n if (val.important == 1 && val.important) {\r\n importantData = 0\r\n } else {\r\n importantData = 1\r\n }\r\n equipmentManage.updateImportantPoint(\r\n {\r\n id: val.id,\r\n important: importantData,\r\n },\r\n (res) => {\r\n // console.log(res)\r\n if (res.state) {\r\n this.$message({\r\n message: res.message,\r\n type: 'success',\r\n })\r\n this.loadData()\r\n // this.reviseVisible = false\r\n }\r\n }\r\n )\r\n },\r\n handleDeleteSite(row) {\r\n VideoFacilities.deleteVideoSite(row.id, (res) => {\r\n if (res.state) {\r\n this.$message.success('删除成功')\r\n this.loadData()\r\n }\r\n })\r\n },\r\n selectable(row) {\r\n if (row.dataType == 2) {\r\n return true\r\n } else {\r\n return false\r\n }\r\n },\r\n handleAdd() {\r\n if (!this.regionIndexCode) {\r\n this.$message.warning('请选择新增视频点位所属区域!')\r\n return\r\n } else {\r\n let pData = {\r\n catalogCode: this.catalogCode,\r\n platform: this.catalogPlatform,\r\n zoneCode: this.regionIndexCode,\r\n }\r\n this.$refs.formModal.add(pData)\r\n }\r\n },\r\n reload() {},\r\n handleCloseDia() {\r\n this.showTreeNode = false\r\n this.area = {\r\n code: '',\r\n name: '',\r\n }\r\n this.pArea = null\r\n },\r\n handleSaveDia() {\r\n this.$refs.formInfo.validate((valid) => {\r\n if (valid) {\r\n let API = VideoFacilities.updateVideoArea\r\n if (this.titles == '新增') {\r\n this.area.baseCode = this.pArea.baseCode\r\n this.area.parentId = this.pArea.id\r\n this.area.platform = this.pArea.platform\r\n API = VideoFacilities.addVideoArea\r\n }\r\n console.log(this.area)\r\n API(this.area, (res) => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: this.titles + '视频区域成功!',\r\n duration: 2000,\r\n })\r\n this.getTree()\r\n this.handleCloseDia()\r\n } else {\r\n this.$notify({\r\n type: 'error',\r\n message: res.message,\r\n duration: 2000,\r\n offset: 80,\r\n })\r\n }\r\n })\r\n }\r\n })\r\n },\r\n append(data, type) {\r\n console.log(data, type, 'data, type')\r\n this.activeCollapseDia = '1'\r\n this.titles = '新增'\r\n this.showTreeNode = true\r\n this.pArea = data\r\n },\r\n upDateinfo(data, type) {\r\n this.titles = '修改'\r\n this.area = data\r\n this.showTreeNode = true\r\n },\r\n // 删除视频目录\r\n remove(data) {\r\n this.$confirm('确定删除选中数据?', '提示', {\r\n confirmButtonText: '确 定',\r\n cancelButtonText: '取 消',\r\n type: 'warning',\r\n })\r\n .then(() => {\r\n VideoFacilities.deleteVideoArea(data.id, (res) => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '删除成功',\r\n duration: 2000,\r\n })\r\n this.getTree()\r\n } else {\r\n this.$notify({\r\n type: 'error',\r\n message: res.message,\r\n duration: 2000,\r\n offset: 80,\r\n })\r\n }\r\n })\r\n })\r\n .catch(() => {})\r\n },\r\n renderContent(h, {node, data, store}) {\r\n return (\r\n {\r\n this.show = true\r\n }}\r\n on-mouseout={() => {\r\n this.show = false\r\n }}\r\n >\r\n \r\n {data.name}\r\n \r\n \r\n \r\n this.append(data, 'son')}\r\n >\r\n 新增\r\n \r\n this.upDateinfo(data, '')}\r\n >\r\n 修改\r\n \r\n this.remove(data)}\r\n >\r\n 删除\r\n \r\n \r\n \r\n \r\n \r\n )\r\n },\r\n // 获取目录\r\n getTreeDict() {\r\n VideoFacilities.getVideoF({}, (res) => {\r\n this.catalogs = res.value\r\n this.catalogCode = this.catalogs[0].code\r\n this.catalogPlatform = this.catalogs[0].platform\r\n this.getTree()\r\n })\r\n },\r\n // 获取目录树\r\n getTree() {\r\n let query = {\r\n zoneCode: this.catalogCode,\r\n }\r\n VideoFacilities.getVideoTree(query, (res) => {\r\n this.videoTree = res.value\r\n this.fullId = this.videoTree.length\r\n ? this.videoTree[0].fullId\r\n : ''\r\n if (this.videoTree.length) {\r\n this.loadData()\r\n } else {\r\n this.videoTree = []\r\n }\r\n })\r\n },\r\n // 切换目录\r\n changeCatalog(val) {\r\n this.$refs.multipleSelection.clearSelection() //切换,选中就归零\r\n if (val) {\r\n this.catalogCode = val\r\n this.catalogPlatform = val\r\n let platform = this.catalogs.filter(\r\n (item) => item.code == val\r\n )[0].platform\r\n this.catalogPlatform = platform\r\n this.getTree()\r\n } else {\r\n this.catalogCode = ''\r\n this.catalogPlatform = ''\r\n this.videoTree = []\r\n this.$set(this.videoTree, this.videoTree, res.value)\r\n }\r\n },\r\n handleUpdate(val) {\r\n VideoFacilities.getDetails(val.code, (res) => {\r\n if (res) {\r\n let path = this.$route.path\r\n if (path.indexOf('frontPlat') !== -1) {\r\n this.$router.push({\r\n name: 'VideoDetails',\r\n query: res,\r\n })\r\n } else {\r\n this.$router.push({\r\n name: 'VideoDetailsLink',\r\n query: res,\r\n })\r\n }\r\n }\r\n })\r\n },\r\n changeNode(data) {\r\n console.log(data)\r\n if (data) {\r\n this.regionIndexCode = data.code\r\n this.fullId = data.fullId\r\n this.params.zoneCode = data.code\r\n //如果点击树,选中状态归0\r\n this.$refs.multipleSelection.clearSelection()\r\n this.loadData()\r\n }\r\n },\r\n loadData() {\r\n this.loading = false\r\n this.tableData = []\r\n this.queryParam.querys = []\r\n // this.querys[1].value = this.fullId\r\n // this.querys[1].value = this.catalogCode\r\n this.queryParam.params = this.params\r\n this.uploadData.catalogCode = this.catalogCode\r\n // if (this.querys[0].value) {\r\n // \tthis.queryParam.querys.push(this.querys[0])\r\n // }\r\n // if (this.querys[1].value) {\r\n // \tthis.queryParam.querys.push(this.querys[1])\r\n // }\r\n // if (this.querys[2].value) {\r\n // \tthis.queryParam.querys.push(this.querys[2])\r\n // }\r\n VideoFacilities.getList(this.queryParam, (res) => {\r\n console.log(res, 999)\r\n if (res) {\r\n this.tableData = res.rows\r\n this.tableData.forEach((item) => {\r\n this.spdwssptList.forEach((val) => {\r\n if (item.platform == val.value) {\r\n item['platformName'] = val.name\r\n }\r\n })\r\n })\r\n this.total = res.total\r\n this.loading = false\r\n // 归空\r\n // this.querys[1].value = ''\r\n // this.querys[2].value = ''\r\n }\r\n })\r\n },\r\n //同步数据\r\n synchroTree() {\r\n VideoFacilities.asycCataLog((res) => {\r\n if (res.state) {\r\n if (res.state) {\r\n this.$message.success('目录同步成功')\r\n this.getTreeDict()\r\n } else {\r\n this.$message.error('同步失败')\r\n }\r\n }\r\n })\r\n },\r\n synchro(node, data) {\r\n VideoFacilities.asycCataLogZone(\r\n {\r\n treeCode: this.catalogCode,\r\n },\r\n (res) => {\r\n if (res.state) {\r\n this.$message.success('区域同步成功')\r\n this.getTreen()\r\n } else {\r\n this.$message.error('同步失败')\r\n }\r\n }\r\n )\r\n },\r\n onClickSynch() {\r\n VideoFacilities.getSynch({}, (res) => {\r\n if (res.state) {\r\n this.$message.success('同步成功')\r\n } else {\r\n this.$message.error('同步失败')\r\n }\r\n })\r\n },\r\n filterNode(value, data) {\r\n if (!value) return true\r\n return data.name.indexOf(value) !== -1\r\n },\r\n handleSizeChange(val) {\r\n this.queryParam.pageBean.pageSize = val\r\n this.loadData()\r\n },\r\n handleCurrentChange(val) {\r\n this.queryParam.pageBean.page = val\r\n this.loadData()\r\n },\r\n // handleSelectionChange(val) {\r\n // this.multipleSelection = val.map((item) => {\r\n // return item.id\r\n // })\r\n // },\r\n // // 指定一个key标识这一行的数据\r\n getRowKey(row) {\r\n return row.id\r\n },\r\n // // 点击查询\r\n onClickSearch() {\r\n this.queryParam.pageBean.page = 1\r\n this.loadData()\r\n },\r\n },\r\n}\r\n",null]}