diff --git a/src/views/deviceManage/listDevice.vue b/src/views/deviceManage/listDevice.vue index e8ce6a8..545a949 100644 --- a/src/views/deviceManage/listDevice.vue +++ b/src/views/deviceManage/listDevice.vue @@ -15,7 +15,7 @@ :value="item.value"/> - + @@ -27,6 +27,15 @@ :value="item.value"/> + + + @@ -103,16 +112,18 @@ import DeptSelect from '@/components/DeptSelect/index' import InfoWell from '@/views/wellManage/infoWell' import { notContainConcentrator } from '@/utils/permission' +import AreaSelectTree from "@/components/AreaSelect/areaSelectTree"; export default { name: 'ListDevice', - components: { DeptSelect, DownloadTemplate, editDevice, detailDevice, selectTree, InfoWell }, + components: {AreaSelectTree, DeptSelect, DownloadTemplate, editDevice, detailDevice, selectTree, InfoWell }, data() { return { listQuery: { keywords: '', deviceType: '', isOnline: '', + areaId: '', offset: 1, limit: 20, sort: 'id', @@ -197,16 +208,21 @@ wellShow: false } }, - mounted() { + created(){ this.fetchDeviceType()// 获取设备列表 + }, + mounted() { if (!notContainConcentrator()) { this.columns.splice(-1, 1) } // 如果参数中有井编号,则将查询条件填入,否则正常 - if (this.$route.query && this.$route.query.wellCode && this.$route.query.wellCode !== '') { + if (this.$route.query && this.$route.query.wellCode) { this.listQuery.keywords = this.$route.query.wellCode this.fetchData(true) - } else { + } else if(this.$route.query && this.$route.query.deviceType){ + this.listQuery.deviceType = this.$route.query.deviceType + this.fetchData(true) + }else { this.fetchData()// 获取数据 } },