{"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\\AlarmDevice.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Mobile\\Device\\AlarmDevice.vue","mtime":1687946823200},{"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\r\nimport dangerousDevice from '@/api/device/dangerousDevice.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\nexport default {\r\n name: 'MobileDevice',\r\n data() {\r\n return {\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: 'warn.DEVICE_TYPE_',\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: 'handleStatus',\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: 'handleStatus',\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: 'warn.DEVICE_TYPE_',\r\n relation: 'AND',\r\n value: '1'\r\n }\r\n ],\r\n page: 1,\r\n startPicker: false,\r\n statusData: {name: '', value: ''},\r\n title: '我的设备',\r\n currentUser: {},\r\n params: {\r\n trainingDate: ''\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 statusList: [\r\n {text: '危险源设备', value: '3'},\r\n {text: '积水设备', value: '2'},\r\n {text: '标识牌设备', value: '1'},\r\n {text: '防暴路障', value: '4'}\r\n ],\r\n handleStatusList: [], //处理状态字典\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 created() {\r\n this.handleStatusList = dictUtils.getDictItemsFromCache('clzt')\r\n this.handleStatusList = this.handleStatusList.map(item => {\r\n return {text: item.name, value: item.value}\r\n })\r\n this.handleStatusList[0] = {\r\n text: '请选择',\r\n value: ''\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.onLoad()\r\n this.getTreen()\r\n },\r\n methods: {\r\n onNavClick(val) {\r\n console.log(val)\r\n this.treeChildrenData = this.treeData[val].childrens\r\n // this.loadData(val.id)\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 items.children = items.children.map(v => {\r\n return {\r\n id: v.id,\r\n text: v.name\r\n }\r\n })\r\n return {\r\n children: items.children,\r\n id: 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 childrens: item.children,\r\n id: item.id,\r\n text: item.name\r\n }\r\n })\r\n this.treeChildrenData = this.treeData[0].childrens\r\n console.log(this.treeData, this.treeChildrenData)\r\n // this.$set(this.treeData)\r\n })\r\n },\r\n // 跳转设备详情\r\n handleDetail(item) {\r\n // this.$router.push({name: 'AlarmData', query: {id: item.id}})\r\n },\r\n onCancel() {\r\n this.showPicker = false\r\n },\r\n onLoad() {\r\n // console.log(9999999)\r\n // // this.page = -1\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.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.sorter = [\r\n {\r\n direction: 'DESC',\r\n property: 'warnTime'\r\n }\r\n ]\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 if (this.querys[2].value) {\r\n this.queryParam.querys.push(this.querys[2])\r\n }\r\n if (this.querys[3].value) {\r\n this.queryParam.querys.push(this.querys[3])\r\n }\r\n dangerousDevice.loadInfo(this.queryParam, res => {\r\n console.log(res, 'res')\r\n this.loading = false\r\n res.rows.forEach(item => {\r\n this.handleStatusList.forEach(val => {\r\n if (item.handleStatus == val.value) {\r\n item['handleStatus'] = val.text\r\n }\r\n })\r\n })\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 }\r\n}\r\n",null]}