{"remainingRequest":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\Normal\\DeviceManagement\\monitorDevice.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\Normal\\DeviceManagement\\monitorDevice.vue","mtime":1712171298892},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _toConsumableArray from \"D:/jenkins/workspace/sfz-lh-fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { dragController } from '@/assets/js/dragController';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport routerManagement from '@/api/BasicDataManagement/tollStationManagement.js';\nimport device from '@/api/DeviceManagement/device.js';\nimport player from '@/views/Normal/components/videoPlayerHK.vue';\nimport utils from '@/utils.js';\nexport default {\n name: 'monitorDevice',\n components: {\n player: player\n },\n mixins: [TableMixin],\n data: function data() {\n return {\n treeLevel: '1',\n treeLoading: false,\n treeTollStationId: '',\n treeTollStationName: '',\n tollStation: null,\n // 当前收费站信息\n sreachTree: '',\n currentTreeId: '',\n dialog: {\n title: '',\n isRoot: false,\n visible: false\n },\n videoDialog: false,\n dialogForm: {},\n rules: {\n positionName: {\n required: true,\n message: '请输入位置名称',\n trigger: 'blur'\n },\n positionCode: {\n required: true,\n message: '请输入位置编码',\n trigger: 'blur'\n }\n },\n treeData: [// {\n // label: '一级 1',\n // id: 1,\n // children: [],\n // },\n ],\n defaultProps: {\n children: 'children',\n label: 'positionName'\n },\n searchForm: {},\n roadOptions: [],\n // 路段数据\n tollStationOptions: [],\n // 收费站数据\n loading: false,\n tableLoading: false,\n tableData: [],\n defaultQuerys: [{\n group: 'main',\n operation: 'IN',\n parentGroup: '',\n property: 'position_id_',\n relation: 'AND',\n value: ''\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'type',\n relation: 'AND',\n value: '1'\n }],\n params: {\n pageBean: {\n page: 1,\n pageSize: 50,\n total: 0\n },\n querys: [],\n sorter: [{\n direction: 'ASC',\n property: 'sn_'\n }, {\n direction: 'ASC',\n property: 'name'\n }]\n },\n activeVideoData: null,\n activeTreeData: null,\n sortData: {} // 变动的sort数据集\n\n };\n },\n watch: {\n sreachTree: function sreachTree(val) {\n this.$refs.tree.filter(val);\n }\n },\n computed: {\n SearchPanel: function SearchPanel() {\n return {\n '--searchPanel': this.searchPanel + 'px'\n };\n }\n },\n mounted: function mounted() {\n dragController();\n this.loadTollStation();\n this.loadRoad();\n },\n methods: {\n handleSaveSort: function handleSaveSort() {\n var _this = this;\n\n this.$confirm(this.$t('确定保存设备排序号?'), this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'warning'\n }).then(function () {\n device.saveSort(_this.sortData).then(function (res) {\n console.log(res);\n\n if (res.data.state) {\n _this.$message({\n message: '保存排序号成功',\n type: 'success'\n });\n }\n }).finally(function () {\n _this.loadData(1);\n });\n });\n },\n handleChangeSort: function handleChangeSort(item) {\n var levelKey;\n\n if (this.activeTreeData.level == 1) {\n if (this.activeTreeData.positionName == '收费站') {\n levelKey = '10';\n } else if (this.activeTreeData.positionName == '服务区') {\n levelKey = '20';\n } else if (this.activeTreeData.positionName == '路段监控') {\n levelKey = '30';\n }\n\n this.sortData[item.id] = levelKey + item.sn;\n }\n },\n handleModal: function handleModal(row) {\n this.$router.push({\n path: '/platLayout/devicePosition',\n query: {\n id: row.id\n }\n });\n },\n loadTree: function loadTree() {\n var _this2 = this;\n\n this.treeLoading = true;\n this.treeData = [];\n var data = this.qs.stringify({\n stationId: this.treeTollStationId\n });\n device.queryPositionTree(data).then(function (res) {\n _this2.treeLoading = false;\n _this2.treeData = res.value || [];\n\n if (_this2.treeData.length) {\n _this2.activeTreeData = _this2.treeData[0];\n _this2.treeLevel = _this2.treeData[0].level;\n _this2.currentTreeId = _this2.treeData[0].id;\n _this2.defaultQuerys[0].value = _this2.currentTreeId;\n\n _this2.$nextTick(function () {\n if (_this2.$refs.tree) _this2.$refs.tree.setCurrentKey(_this2.currentTreeId);\n });\n }\n\n _this2.loadData();\n });\n },\n //获取数据\n loadData: function loadData(page) {\n var _this$params$querys,\n _this3 = this;\n\n if (page) this.params.pageBean.page = page;\n this.tableLoading = true;\n\n (_this$params$querys = this.params.querys).push.apply(_this$params$querys, _toConsumableArray(this.defaultQuerys));\n\n this.sortData = {};\n device.queryDeviceList(this.params).then(function (res) {\n _this3.tableLoading = false;\n var data = res.value;\n\n if (data.rows && data.rows.length) {\n data.rows.forEach(function (item) {\n if (item.sn && item.sn.length >= 3) {\n item.sn = item.sn.slice(2);\n }\n });\n }\n\n _this3.tableData = data.rows || [];\n\n if (data.page) {\n _this3.params.pageBean = {\n page: data.page,\n pageSize: data.pageSize,\n total: data.total\n };\n }\n\n _this3.params.querys = [];\n });\n },\n handleSearch: function handleSearch() {\n var _this$params$querys2;\n\n var querys = [];\n\n for (var key in this.searchForm) {\n querys.push({\n group: 'main',\n operation: key == 'name' || key == 'code' ? 'LIKE' : 'EQUAL',\n parentGroup: '',\n property: key,\n relation: 'AND',\n value: this.searchForm[key]\n });\n }\n\n (_this$params$querys2 = this.params.querys).push.apply(_this$params$querys2, querys);\n\n this.loadData(1);\n },\n // 路段数据\n loadRoad: function loadRoad() {\n var _this4 = this;\n\n var params = {\n pageBean: {\n page: 1,\n pageSize: -1\n }\n };\n routerManagement.queryRoad(params).then(function (res) {\n _this4.roadOptions = res.rows || [];\n });\n },\n // 收费站\n loadTollStation: function loadTollStation() {\n var _this5 = this;\n\n var params = {\n pageBean: {\n page: 1,\n pageSize: -1\n }\n };\n routerManagement.queryTollStation(params).then(function (res) {\n var data = res.data;\n _this5.tollStationOptions = data.rows || [];\n _this5.treeTollStationId = _this5.tollStationOptions[0].id;\n _this5.treeTollStationName = _this5.tollStationOptions[0].name;\n\n if (_this5.treeTollStationId) {\n _this5.loadTree();\n\n _this5.tollStation = _this5.tollStationOptions[0];\n }\n });\n },\n changeTollStation: function changeTollStation(val) {\n var options = utils.deepClone(this.tollStationOptions);\n var target = options.filter(function (item) {\n return item.id = val;\n })[0];\n this.treeTollStationId = val;\n this.treeTollStationName = target.name;\n\n if (this.treeTollStationId) {\n this.loadTree();\n this.tollStation = target;\n }\n },\n filterNode: function filterNode(value, data) {\n if (!value) return true;\n return data.positionName.indexOf(value) !== -1;\n },\n handleAddType: function handleAddType() {\n this.dialog.title = '新增位置分类';\n this.dialog.isRoot = true;\n this.dialog.visible = true;\n },\n handleCascaderChange: function handleCascaderChange(val) {},\n handleNodeClick: function handleNodeClick(obj, node, tree) {\n this.activeTreeData = obj;\n this.treeLevel = obj.level;\n this.currentTreeId = obj.id;\n this.defaultQuerys[0].value = this.currentTreeId;\n this.loadData(1);\n },\n handleDialogClose: function handleDialogClose() {\n this.dialogForm = {};\n this.dialog.title = '';\n this.dialog.isRoot = false;\n this.dialog.visible = false;\n },\n handleAddNode: function handleAddNode(node, data) {\n this.dialogForm.parentId = data.id;\n this.dialog.title = '新增位置分类';\n this.dialog.isRoot = false;\n this.dialog.visible = true;\n },\n handleEditNode: function handleEditNode(node, data) {\n this.dialogForm = data;\n this.dialog.title = '编辑位置分类';\n this.dialog.isRoot = !this.dialogForm.parentId ? true : false;\n this.dialog.visible = true;\n },\n handleDelNode: function handleDelNode(node, data) {\n var _this6 = this;\n\n this.$confirm(\"\\u786E\\u5B9A\\u5220\\u9664\\u9009\\u4E2D\".concat(data.positionName, \"\\u5417\\uFF1F\"), this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'warning'\n }).then(function () {\n device.delPosition(data.id).then(function (res) {\n _this6.loadTree();\n\n if (res.state) {\n _this6.$message({\n message: '删除成功',\n type: 'success'\n });\n }\n });\n });\n },\n handleSaveType: function handleSaveType() {\n var _this7 = this;\n\n this.$refs.form.validate(function (valid) {\n if (valid) {\n _this7.dialogForm.tollStationId = _this7.treeTollStationId;\n _this7.dialogForm.tollStationName = _this7.treeTollStationName;\n var API = device.addPosition;\n if (_this7.dialogForm.id) API = device.updatePosition;\n API(_this7.dialogForm).then(function (res) {\n if (res.state) {\n _this7.loadTree();\n\n _this7.handleDialogClose();\n } else {\n _this7.$message(res.massage);\n }\n });\n }\n });\n },\n //添加\n handleAdd: function handleAdd() {\n this.$router.push({\n path: '/platLayout/editVideo',\n query: {\n treeTollStationId: this.treeTollStationId,\n positionId: this.currentTreeId\n }\n });\n },\n // 编辑\n handleEdit: function handleEdit(rows) {\n this.$router.push({\n path: '/platLayout/editVideo',\n query: {\n id: rows.id\n }\n });\n },\n handleDelete: function handleDelete() {\n var _this8 = this;\n\n this.$confirm(this.$t('common.sureDelete'), this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'warning'\n }).then(function () {\n device.batchDelete(_this8.deleteIds).then(function (res) {\n _this8.loadData(1);\n\n if (res.data.state) {\n _this8.$message({\n message: '删除成功',\n type: 'success'\n });\n }\n });\n });\n },\n handlePlay: function handlePlay(row) {\n var _this9 = this;\n\n this.activeVideoData = row;\n this.videoDialog = true;\n this.$nextTick(function () {\n if (row.cameraCode) {\n _this9.$refs.player.getVideoURL(row.cameraCode);\n }\n });\n },\n handleVideoDialogClose: function handleVideoDialogClose() {\n var _this10 = this;\n\n this.$nextTick(function () {\n _this10.$refs.player.stopPlay();\n });\n this.videoDialog = false;\n }\n }\n};",null]}