{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Mobile\\Manage\\MobileTroubleshooting.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Mobile\\Manage\\MobileTroubleshooting.vue","mtime":1687169259491},{"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\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 value: '',\r\n active: '1',\r\n activeIds: [],\r\n activeIndex: 0,\r\n policeList: [],\r\n treeData: [],\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 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 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.jxcspqList = dictUtils.getDictItemsFromCache('jxcspq') //九小场所片区\r\n this.jxcspqList = this.jxcspqList.map(item => {\r\n return {text: item.name, value: item.value}\r\n })\r\n this.jxcspqList[0] = {\r\n text: '请选择',\r\n value: ''\r\n }\r\n this.zddwjbList = dictUtils.getDictItemsFromCache('zddwjb') //重点单位级别\r\n this.zddwjbList = this.zddwjbList.map(item => {\r\n return {text: item.name, value: item.value}\r\n })\r\n this.zddwjbList[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.getProducts()\r\n this.getDevice()\r\n this.getTreen()\r\n },\r\n methods: {\r\n onSearch() {\r\n // this.$router.push({\r\n // name: 'MobileSearchIndividual',\r\n // query: {title: '排查单位'}\r\n // })\r\n },\r\n // 获取产品信息\r\n loadData(id) {\r\n let queryParam = {\r\n pageBean: {},\r\n querys: []\r\n }\r\n queryParam.pageBean = {\r\n page: 1,\r\n pageSize: -1\r\n }\r\n queryParam.querys = [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'typeId',\r\n relation: 'AND',\r\n value: id\r\n }\r\n ]\r\n productManage.productInfo(queryParam).then(res => {\r\n console.log(res)\r\n // this.total = res.total\r\n this.columns = res.rows.map(item => {\r\n return {\r\n value: item.id,\r\n text: item.name\r\n }\r\n })\r\n this.columns[0] = {\r\n text: '请选择',\r\n value: ''\r\n }\r\n })\r\n },\r\n onNavClick(val) {\r\n console.log(val)\r\n this.loadData(val.id)\r\n },\r\n // 产品组织树查询\r\n getTreen() {\r\n productManage.productType().then(res => {\r\n res.value.map(item => {\r\n item.children = item.children.map(items => {\r\n return {\r\n children: [],\r\n id: items.id,\r\n text: items.name\r\n }\r\n })\r\n })\r\n this.getTreenData = res.value\r\n this.treeData = res.value.map(item => {\r\n return {\r\n children: item.children,\r\n id: 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 handleDetail(item) {\r\n this.$router.push({\r\n name: 'MobileTroubleshootingDetail',\r\n query: {id: item}\r\n })\r\n },\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.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\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 }\r\n}\r\n",null]}