{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\components\\modle\\WaterRealDataModel.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\components\\modle\\WaterRealDataModel.vue","mtime":1687914898329},{"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\nimport req from '@/request.js'\nimport {\n\tTableMixin\n} from '@/mixins/tableMixin'\nimport equipmentManage from '@/api/device/equipmentManage.js'\nimport productManage from '@/api/device/productManage.js'\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\nexport default {\n\tname: 'RealTimeData',\n\tmixins: [TableMixin],\n\tprops: {\n\t\tparameter: {\n\t\t\ttype: Object,\n\t\t\tdefault: function() {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tproductParams: {},\n\t\t\tproductType: {},\n\t\t\trealData: [],\n\t\t\tproductTypelx: '',\n\t\t\tdataTypeList: [], //数据类型字典\n\t\t\tactionList: [], //动作标识字典\n\t\t\tstatusList: [], //成功状态字典\n\t\t\tquerys: [{\n\t\t\t\tgroup: 'main',\n\t\t\t\toperation: 'BETWEEN',\n\t\t\t\tparentGroup: '',\n\t\t\t\tproperty: 'b.coll_time_',\n\t\t\t\trelation: 'AND',\n\t\t\t\tvalue: ''\n\t\t\t}],\n\t\t\tsorter: [{\n\t\t\t\tdirection: 'DESC',\n\t\t\t\tproperty: 'collTime'\n\t\t\t}]\n\t\t}\n\t},\n\tcreated() {\n\t\tconsole.log(this.parameter)\n\t\tthis.dataTypeList = dictUtils.getDictItemsFromCache('sjlx')\n\t\tthis.actionList = dictUtils.getDictItemsFromCache('dzbs')\n\t\tthis.statusList = dictUtils.getDictItemsFromCache('cgzt')\n\t\tthis.getProduct()\n\t},\n\tmounted() {},\n\tmethods: {\n\t\thandleUpdate(row) {\n\t\t\tconsole.log(row);\n\t\t},\n\t\t// 重置\n\t\tclearQuerys() {\n\t\t\tthis.querys[0].value = ''\n\t\t},\n\t\tgetProduct() {\n\t\t\tproductManage.productInfoDetail(this.parameter.productId).then(res => {\n\t\t\t\tthis.productParams = res\n\t\t\t\tproductManage.productTypeDetail(this.productParams.typeId).then(res => {\n\t\t\t\t\tthis.productType = res\n\t\t\t\t\t// this.loadData()\n\t\t\t\t})\n\t\t\t})\n\t\t},\n\t\tloadData(page) {\n\t\t\tif (page) {\n\t\t\t\tthis.queryParam.pageBean.page = page\n\t\t\t}\n\t\t\tthis.loading = true\n\t\t\tthis.tableData = []\n\t\t\tthis.queryParam.querys = []\n\t\t\tthis.queryParam = Object.assign(this.queryParam, {\n\t\t\t\tsorter: this.sorter\n\t\t\t})\n\t\t\tif (this.querys[0].value) {\n\t\t\t\tthis.queryParam.querys.push(this.querys[0])\n\t\t\t}\n\t\t\tlet protal = window.context.portal\n\t\t\tlet requestData = {\n\t\t\t\turl: `${protal}/device/data/query?id=` + this.parameter.id,\n\t\t\t\tdata: this.queryParam,\n\t\t\t\tmethod: 'post'\n\t\t\t}\n\t\t\t// 根据设备id获取实时数据\n\t\t\treq\n\t\t\t\t.request(requestData)\n\t\t\t\t.then(res => {\n\t\t\t\t\tconsole.log(res)\n\t\t\t\t\tif (res.status) {\n\t\t\t\t\t\tthis.productTypelx = res.data.value.productType\n\t\t\t\t\t\tthis.tableData = res.data.value.data.rows\n\t\t\t\t\t\tthis.total = res.data.value.data.total\n\t\t\t\t\t\tthis.$set(this.tableData)\n\t\t\t\t\t\tthis.loading = false\n\t\t\t\t\t\tthis.tableData.forEach(item => {\n\t\t\t\t\t\t\tthis.dataTypeList.forEach(val => {\n\t\t\t\t\t\t\t\tif (item.dataType && item.dataType == val.value) {\n\t\t\t\t\t\t\t\t\titem['dataType'] = val.name\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tthis.actionList.forEach(val => {\n\t\t\t\t\t\t\t\tif (item.action && item.action == val.value) {\n\t\t\t\t\t\t\t\t\titem['action'] = val.name\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tthis.statusList.forEach(val => {\n\t\t\t\t\t\t\t\tif (item.status && item.status == val.value) {\n\t\t\t\t\t\t\t\t\titem['status'] = val.name\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(err => {\n\t\t\t\t\tconsole.log(err)\n\t\t\t\t})\n\t\t}\n\t}\n}\n",null]}