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