{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Mobile\\Device\\MobileDevice.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Mobile\\Device\\MobileDevice.vue","mtime":1687687213858},{"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\r\nimport equipmentManage from '@/api/device/equipmentManage.js'\r\nimport productManage from '@/api/device/productManage.js'\r\nimport req from '@/request.js'\r\nimport resourceManage from '@/api/device/resourceManage.js'\r\nimport equipmentIndex from '@/api/device/equipmentIndex.js'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport navBar from '../components/navBar.vue'\r\nexport default {\r\n components: {\r\n navBar\r\n },\r\n name: 'MobileDevice',\r\n data() {\r\n return {\r\n treeDataIds: '',\r\n regionMast: 1,\r\n regionChildren: [],\r\n regionId: '',\r\n regionChildrenIndex: 0,\r\n regionTreeData: [],\r\n siftActive: '',\r\n popupShow: false,\r\n activeIds: '',\r\n activeChildrenIndex: 0,\r\n activeIndex: 0,\r\n policeList: [],\r\n treeData: [],\r\n treeChildrenData: [],\r\n queryParam: {\r\n pageBean: ''\r\n },\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'product_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: 'status',\r\n relation: 'AND',\r\n value: ''\r\n }\r\n ],\r\n page: 1,\r\n startPicker: false,\r\n statusList: [\r\n {text: '所有', value: ''},\r\n {text: '正常', value: '1'},\r\n {text: '故障', value: '2'},\r\n {text: '报警', value: '3'}\r\n ],\r\n statusData: {name: '', value: ''},\r\n title: '设备查询',\r\n currentUser: {},\r\n params: {\r\n name: '',\r\n productId: '', //产品\r\n status: '', //状态\r\n important: '', //重点设备\r\n areaId: '' //区域\r\n },\r\n previewUrl:\r\n window.context.portal + '/file/onlinePreviewController/v1/getFileById_', //图标预览\r\n columns: [], //产品列表\r\n startColumns: [],\r\n product: {\r\n name: '',\r\n id: ''\r\n },\r\n showPicker: false,\r\n deviceData: [],\r\n loading: false,\r\n finished: true,\r\n refreshing: false\r\n }\r\n },\r\n mounted() {\r\n this.currentUser = JSON.parse(sessionStorage.getItem('currentUser'))\r\n this.deviceStatus = dictUtils.getDictItemsFromCache('sbzt')\r\n // this.getProducts()\r\n this.getDevice()\r\n this.getTreen()\r\n this.getAreaTree()\r\n },\r\n methods: {\r\n //返回\r\n reviseShowBack() {\r\n this.params.areaId = ''\r\n this.params.important = ''\r\n this.params.name = ''\r\n this.popupShow = false\r\n },\r\n //\r\n activeClick(item) {\r\n // console.log(item)\r\n if (item.children) {\r\n this.regionChildren = item.children\r\n } else {\r\n this.regionChildren = [\r\n {\r\n name: item.text,\r\n id: item.value\r\n }\r\n ]\r\n }\r\n this.regionMast = 2\r\n this.popupShow = true\r\n },\r\n //\r\n getAreaTree() {\r\n equipmentManage.loadAreaTree(\r\n {\r\n id: '0'\r\n },\r\n res => {\r\n console.log(res)\r\n res.value.map(item => {\r\n item.children = item.children.map(v => {\r\n return {\r\n text: v.name,\r\n value: v.id,\r\n children: v.children\r\n }\r\n })\r\n })\r\n this.regionTreeData = res.value.map(item => {\r\n return {\r\n text: item.name,\r\n value: item.id,\r\n children: item.children\r\n }\r\n }) // this.formatData(res.rows)\r\n this.$set(this.regionTreeData)\r\n }\r\n )\r\n },\r\n //重置\r\n resetBtn() {\r\n this.params.areaId = ''\r\n this.params.productId = ''\r\n this.params.name = ''\r\n this.params.important = ''\r\n this.page = 1\r\n this.deviceData = []\r\n this.getDevice()\r\n this.popupShow = false\r\n },\r\n //弹出框按钮\r\n confirmBtn() {\r\n this.page = 1\r\n this.deviceData = []\r\n this.getDevice()\r\n this.popupShow = false\r\n },\r\n //搜索\r\n seoBtn(v) {\r\n this.regionMast = 1\r\n // this.siftActive = '0'\r\n this.popupShow = true\r\n },\r\n // //重点单位\r\n // focusBtn() {\r\n // this.siftActive = '1'\r\n // this.popupShow = true\r\n // },\r\n //\r\n onClickLeft() {\r\n this.$router.push({name: 'MobileDeviceNav'})\r\n },\r\n //\r\n onNavClick(item) {\r\n console.log(item)\r\n if (item.children) {\r\n this.treeChildrenData = item.children\r\n } else {\r\n this.treeChildrenData = [\r\n {\r\n name: item.text,\r\n id: item.value\r\n }\r\n ]\r\n }\r\n this.regionMast = 3\r\n this.popupShow = true\r\n },\r\n onTtemClick(val) {\r\n this.page = 1\r\n this.params.productId = this.activeIds\r\n this.deviceData = []\r\n this.getDevice()\r\n\r\n this.$refs.item.toggle()\r\n // console.log(this.activeIds)\r\n },\r\n // 产品组织树查询\r\n getTreen() {\r\n productManage.getProductTree().then(res => {\r\n console.log(res)\r\n res.value.map(item => {\r\n item.children = item.children.map(items => {\r\n return {\r\n children: items.children,\r\n value: items.id,\r\n text: items.name\r\n }\r\n })\r\n })\r\n this.treeData = res.value.map(item => {\r\n return {\r\n children: item.children,\r\n value: item.id,\r\n text: item.name\r\n }\r\n })\r\n console.log(this.treeData)\r\n // this.$set(this.treeData)\r\n })\r\n },\r\n // 跳转实时\r\n realBtn(item) {\r\n this.$router.push({name: 'RealtimeData', query: {id: item.id}})\r\n },\r\n // 跳转告警\r\n alarmBtn(item) {\r\n this.$router.push({name: 'AlarmData', query: {item: item}})\r\n },\r\n // 跳转设备详情\r\n handleDetail(item) {\r\n this.$router.push({name: 'DeviceDetail', query: {id: item.id}})\r\n },\r\n // startConfirm(data) {\r\n // this.statusData.name = data.name\r\n // // this.statusData.value = data.value\r\n // this.querys[1].value = data.value\r\n // this.startPicker = false\r\n // this.deviceData = []\r\n // this.page = 1\r\n // this.getDevice()\r\n // },\r\n // onConfirm(data) {\r\n // console.log(data)\r\n // this.product.name = data.name\r\n // // this.product.id = data.id\r\n // this.querys[0].value = data.id\r\n // this.showPicker = false\r\n // this.deviceData = []\r\n // this.page = 1\r\n // this.getDevice()\r\n // },\r\n onCancel() {\r\n this.showPicker = false\r\n },\r\n onLoad() {\r\n // // this.loading = true\r\n // // this.getDevice()\r\n setTimeout(() => {\r\n this.loading = true\r\n this.getDevice()\r\n }, 500)\r\n },\r\n onRefresh() {\r\n setTimeout(() => {\r\n this.page = 1\r\n this.refreshing = true\r\n this.deviceData = []\r\n this.getDevice()\r\n }, 500)\r\n },\r\n teamChange(v) {\r\n this.page = 1\r\n // this.pageNo = 1\r\n this.deviceData = []\r\n this.getDevice()\r\n },\r\n orgChange(v) {\r\n this.page = 1\r\n this.deviceData = []\r\n this.getDevice()\r\n },\r\n getDevice() {\r\n this.finished = false\r\n this.queryParam.pageBean = {pageSize: 10, page: this.page}\r\n // this.loading = true\r\n this.queryParam.params = this.params\r\n this.queryParam.querys = []\r\n // if (this.querys[0].value) {\r\n // this.queryParam.querys.push(this.querys[0])\r\n // }\r\n // if (this.querys[1].value) {\r\n // this.queryParam.querys.push(this.querys[1])\r\n // }\r\n resourceManage.loadDevice(this.queryParam, res => {\r\n console.log(res, 'res')\r\n this.loading = false\r\n this.deviceData = this.deviceData.concat(res.rows)\r\n console.log(this.deviceData)\r\n this.page++\r\n // 如果加载完毕,显示没有更多了\r\n if (res.rows.length === 0) {\r\n this.finished = true\r\n }\r\n setTimeout(() => {\r\n //code\r\n this.refreshing = false\r\n }, 1000)\r\n })\r\n }\r\n // getProducts() {\r\n // let url = window.context.portal + '/device/product/info/findAll'\r\n // req.post(url, {}).then(res => {\r\n // if (res.status == 200) {\r\n // console.log(res)\r\n // this.columns = res.data.map(item => {\r\n // return {\r\n // text: item.name,\r\n // value: item.id\r\n // }\r\n // })\r\n // this.columns[0] = {\r\n // text: '请选择',\r\n // value: ''\r\n // }\r\n // }\r\n // })\r\n // }\r\n }\r\n}\r\n",null]}