diff --git a/src/views/dataManage/deviceData/listGasdectorData.vue b/src/views/dataManage/deviceData/listGasdectorData.vue index f16815e..df5f681 100644 --- a/src/views/dataManage/deviceData/listGasdectorData.vue +++ b/src/views/dataManage/deviceData/listGasdectorData.vue @@ -86,11 +86,14 @@ { text: '设备编号', value: 'devcode', align: 'center' }, { text: '点位编号', value: 'wellCode', align: 'center' }, { text: '设备类型', value: 'deviceTypeName', align: 'center' }, - { text: '可燃气体浓度(%LEL)', value: 'gasSampleValue', align: 'center', filter: true }, - { text: '电量(%)', value: 'batteryValue', width: 80, align: 'center', checkCell: true }, - // {text: '状态描述',value: 'descn', align: 'center'}, + { text: '燃气浓度(%LEL)', value: 'strength', align: 'center' }, { text: '权属单位', value: 'deptName', align: 'center' }, { text: '上传时间', value: 'uptime', width: 170, align: 'center' } + // { text: '描述', value: 'descn', align: 'center' }, + // { text: '记录时间', value: 'logtime', align: 'center' }, + // { text: '信号与干扰加噪声比', value: 'pci', align: 'center', filter: true }, + // { text: '物理小区标识', value: 'sinr', align: 'center' }, + // { text: '参考信号接收功率', value: 'rsrp', width: 80, align: 'center', checkCell: true }, ], // 显示列 list: [], // 列表数据 total: 0, // 数据总数 diff --git a/src/views/dataManage/deviceData/listGasdectorData.vue b/src/views/dataManage/deviceData/listGasdectorData.vue index f16815e..df5f681 100644 --- a/src/views/dataManage/deviceData/listGasdectorData.vue +++ b/src/views/dataManage/deviceData/listGasdectorData.vue @@ -86,11 +86,14 @@ { text: '设备编号', value: 'devcode', align: 'center' }, { text: '点位编号', value: 'wellCode', align: 'center' }, { text: '设备类型', value: 'deviceTypeName', align: 'center' }, - { text: '可燃气体浓度(%LEL)', value: 'gasSampleValue', align: 'center', filter: true }, - { text: '电量(%)', value: 'batteryValue', width: 80, align: 'center', checkCell: true }, - // {text: '状态描述',value: 'descn', align: 'center'}, + { text: '燃气浓度(%LEL)', value: 'strength', align: 'center' }, { text: '权属单位', value: 'deptName', align: 'center' }, { text: '上传时间', value: 'uptime', width: 170, align: 'center' } + // { text: '描述', value: 'descn', align: 'center' }, + // { text: '记录时间', value: 'logtime', align: 'center' }, + // { text: '信号与干扰加噪声比', value: 'pci', align: 'center', filter: true }, + // { text: '物理小区标识', value: 'sinr', align: 'center' }, + // { text: '参考信号接收功率', value: 'rsrp', width: 80, align: 'center', checkCell: true }, ], // 显示列 list: [], // 列表数据 total: 0, // 数据总数 diff --git a/src/views/zhangqiu/api/zq.js b/src/views/zhangqiu/api/zq.js new file mode 100644 index 0000000..f1ddcd7 --- /dev/null +++ b/src/views/zhangqiu/api/zq.js @@ -0,0 +1,51 @@ +import request from '@/utils/request' +import axios from 'axios' + + + +// export function getDevice(params){ +// return request({ +// url: 'http://60.208.121.150:5002/whale/eye/installed-device', +// method: 'get', +// params +// }) +// } + +export function getDevice(params) { + return new Promise((resolve, reject) => { + axios + .post(`http://60.208.121.150:5002/whale/eye/installed-device`, params) + .then((res) => { + resolve(res) + }) + .catch((err) => { + reject(err) + }) + }) +} + +export function getAlarm(params) { + return new Promise((resolve, reject) => { + axios + .post(`http://60.208.121.150:5002/whale/eye/alarm-rate`, params) + .then((res) => { + resolve(res) + }) + .catch((err) => { + reject(err) + }) + }) +} + +export function getOperation(params) { + return new Promise((resolve, reject) => { + axios + .post(`http://60.208.121.150:5002/whale/eye/operational-status`, params) + .then((res) => { + resolve(res) + }) + .catch((err) => { + reject(err) + }) + }) +} diff --git a/src/views/dataManage/deviceData/listGasdectorData.vue b/src/views/dataManage/deviceData/listGasdectorData.vue index f16815e..df5f681 100644 --- a/src/views/dataManage/deviceData/listGasdectorData.vue +++ b/src/views/dataManage/deviceData/listGasdectorData.vue @@ -86,11 +86,14 @@ { text: '设备编号', value: 'devcode', align: 'center' }, { text: '点位编号', value: 'wellCode', align: 'center' }, { text: '设备类型', value: 'deviceTypeName', align: 'center' }, - { text: '可燃气体浓度(%LEL)', value: 'gasSampleValue', align: 'center', filter: true }, - { text: '电量(%)', value: 'batteryValue', width: 80, align: 'center', checkCell: true }, - // {text: '状态描述',value: 'descn', align: 'center'}, + { text: '燃气浓度(%LEL)', value: 'strength', align: 'center' }, { text: '权属单位', value: 'deptName', align: 'center' }, { text: '上传时间', value: 'uptime', width: 170, align: 'center' } + // { text: '描述', value: 'descn', align: 'center' }, + // { text: '记录时间', value: 'logtime', align: 'center' }, + // { text: '信号与干扰加噪声比', value: 'pci', align: 'center', filter: true }, + // { text: '物理小区标识', value: 'sinr', align: 'center' }, + // { text: '参考信号接收功率', value: 'rsrp', width: 80, align: 'center', checkCell: true }, ], // 显示列 list: [], // 列表数据 total: 0, // 数据总数 diff --git a/src/views/zhangqiu/api/zq.js b/src/views/zhangqiu/api/zq.js new file mode 100644 index 0000000..f1ddcd7 --- /dev/null +++ b/src/views/zhangqiu/api/zq.js @@ -0,0 +1,51 @@ +import request from '@/utils/request' +import axios from 'axios' + + + +// export function getDevice(params){ +// return request({ +// url: 'http://60.208.121.150:5002/whale/eye/installed-device', +// method: 'get', +// params +// }) +// } + +export function getDevice(params) { + return new Promise((resolve, reject) => { + axios + .post(`http://60.208.121.150:5002/whale/eye/installed-device`, params) + .then((res) => { + resolve(res) + }) + .catch((err) => { + reject(err) + }) + }) +} + +export function getAlarm(params) { + return new Promise((resolve, reject) => { + axios + .post(`http://60.208.121.150:5002/whale/eye/alarm-rate`, params) + .then((res) => { + resolve(res) + }) + .catch((err) => { + reject(err) + }) + }) +} + +export function getOperation(params) { + return new Promise((resolve, reject) => { + axios + .post(`http://60.208.121.150:5002/whale/eye/operational-status`, params) + .then((res) => { + resolve(res) + }) + .catch((err) => { + reject(err) + }) + }) +} diff --git a/src/views/zhangqiu/components/deviceAlarmSum/deviceAlarmSum.vue b/src/views/zhangqiu/components/deviceAlarmSum/deviceAlarmSum.vue index 8149bfd..7868dc7 100644 --- a/src/views/zhangqiu/components/deviceAlarmSum/deviceAlarmSum.vue +++ b/src/views/zhangqiu/components/deviceAlarmSum/deviceAlarmSum.vue @@ -23,6 +23,7 @@ import progressBar from '@/views/zhangqiu/components/progressBar.vue' import ProgressBar from '@/views/zhangqiu/components/progressBar.vue' import showItem from '@/views/zhangqiu/components/showItem.vue' +import { getAlarm } from "@/views/zhangqiu/api/zq.js" export default { name: 'DeviceAlarmSum', components: {showItem, ProgressBar, progressBar }, @@ -30,7 +31,7 @@ return { deviceAlarm: [ { - title: '井盖测试仪', + title: '井盖状态监测仪', context: '', }, { @@ -38,7 +39,7 @@ context: '', }, { - title: '可燃气体监测', + title: '可燃气体监测仪', context: '', }, { @@ -49,23 +50,33 @@ } }, created() { - this.getWellPercent() - this.getGasPercent() - this.getGasdectorPercent() - this.getTubePercent() + // this.getWellPercent() + // this.getGasPercent() + // this.getGasdectorPercent() + // this.getTubePercent() + this.getAlarmList() }, methods: { - getWellPercent() { - this.deviceAlarm[0].context = '10' - }, - getGasPercent() { - this.deviceAlarm[1].context = '70' - }, - getGasdectorPercent() { - this.deviceAlarm[2].context = '50' - }, - getTubePercent() { - this.deviceAlarm[3].context = '45' + // getWellPercent() { + // this.deviceAlarm[0].context = '10' + // }, + // getGasPercent() { + // this.deviceAlarm[1].context = '70' + // }, + // getGasdectorPercent() { + // this.deviceAlarm[2].context = '50' + // }, + // getTubePercent() { + // this.deviceAlarm[3].context = '45' + // } + getAlarmList() { + getAlarm().then(response => { + console.log(response) + this.deviceAlarm[0].context = parseFloat(response.data[0].rate).toFixed(3).substring(0, parseFloat(response.data[0].rate).toFixed(3).length - 1) + this.deviceAlarm[1].context = parseFloat(response.data[1].rate).toFixed(3).substring(0, parseFloat(response.data[1].rate).toFixed(3).length - 1) + this.deviceAlarm[2].context = parseFloat(response.data[2].rate).toFixed(3).substring(0, parseFloat(response.data[2].rate).toFixed(3).length - 1) + this.deviceAlarm[3].context = parseFloat(response.data[3].rate).toFixed(3).substring(0, parseFloat(response.data[3].rate).toFixed(3).length - 1) + }) } } } diff --git a/src/views/dataManage/deviceData/listGasdectorData.vue b/src/views/dataManage/deviceData/listGasdectorData.vue index f16815e..df5f681 100644 --- a/src/views/dataManage/deviceData/listGasdectorData.vue +++ b/src/views/dataManage/deviceData/listGasdectorData.vue @@ -86,11 +86,14 @@ { text: '设备编号', value: 'devcode', align: 'center' }, { text: '点位编号', value: 'wellCode', align: 'center' }, { text: '设备类型', value: 'deviceTypeName', align: 'center' }, - { text: '可燃气体浓度(%LEL)', value: 'gasSampleValue', align: 'center', filter: true }, - { text: '电量(%)', value: 'batteryValue', width: 80, align: 'center', checkCell: true }, - // {text: '状态描述',value: 'descn', align: 'center'}, + { text: '燃气浓度(%LEL)', value: 'strength', align: 'center' }, { text: '权属单位', value: 'deptName', align: 'center' }, { text: '上传时间', value: 'uptime', width: 170, align: 'center' } + // { text: '描述', value: 'descn', align: 'center' }, + // { text: '记录时间', value: 'logtime', align: 'center' }, + // { text: '信号与干扰加噪声比', value: 'pci', align: 'center', filter: true }, + // { text: '物理小区标识', value: 'sinr', align: 'center' }, + // { text: '参考信号接收功率', value: 'rsrp', width: 80, align: 'center', checkCell: true }, ], // 显示列 list: [], // 列表数据 total: 0, // 数据总数 diff --git a/src/views/zhangqiu/api/zq.js b/src/views/zhangqiu/api/zq.js new file mode 100644 index 0000000..f1ddcd7 --- /dev/null +++ b/src/views/zhangqiu/api/zq.js @@ -0,0 +1,51 @@ +import request from '@/utils/request' +import axios from 'axios' + + + +// export function getDevice(params){ +// return request({ +// url: 'http://60.208.121.150:5002/whale/eye/installed-device', +// method: 'get', +// params +// }) +// } + +export function getDevice(params) { + return new Promise((resolve, reject) => { + axios + .post(`http://60.208.121.150:5002/whale/eye/installed-device`, params) + .then((res) => { + resolve(res) + }) + .catch((err) => { + reject(err) + }) + }) +} + +export function getAlarm(params) { + return new Promise((resolve, reject) => { + axios + .post(`http://60.208.121.150:5002/whale/eye/alarm-rate`, params) + .then((res) => { + resolve(res) + }) + .catch((err) => { + reject(err) + }) + }) +} + +export function getOperation(params) { + return new Promise((resolve, reject) => { + axios + .post(`http://60.208.121.150:5002/whale/eye/operational-status`, params) + .then((res) => { + resolve(res) + }) + .catch((err) => { + reject(err) + }) + }) +} diff --git a/src/views/zhangqiu/components/deviceAlarmSum/deviceAlarmSum.vue b/src/views/zhangqiu/components/deviceAlarmSum/deviceAlarmSum.vue index 8149bfd..7868dc7 100644 --- a/src/views/zhangqiu/components/deviceAlarmSum/deviceAlarmSum.vue +++ b/src/views/zhangqiu/components/deviceAlarmSum/deviceAlarmSum.vue @@ -23,6 +23,7 @@ import progressBar from '@/views/zhangqiu/components/progressBar.vue' import ProgressBar from '@/views/zhangqiu/components/progressBar.vue' import showItem from '@/views/zhangqiu/components/showItem.vue' +import { getAlarm } from "@/views/zhangqiu/api/zq.js" export default { name: 'DeviceAlarmSum', components: {showItem, ProgressBar, progressBar }, @@ -30,7 +31,7 @@ return { deviceAlarm: [ { - title: '井盖测试仪', + title: '井盖状态监测仪', context: '', }, { @@ -38,7 +39,7 @@ context: '', }, { - title: '可燃气体监测', + title: '可燃气体监测仪', context: '', }, { @@ -49,23 +50,33 @@ } }, created() { - this.getWellPercent() - this.getGasPercent() - this.getGasdectorPercent() - this.getTubePercent() + // this.getWellPercent() + // this.getGasPercent() + // this.getGasdectorPercent() + // this.getTubePercent() + this.getAlarmList() }, methods: { - getWellPercent() { - this.deviceAlarm[0].context = '10' - }, - getGasPercent() { - this.deviceAlarm[1].context = '70' - }, - getGasdectorPercent() { - this.deviceAlarm[2].context = '50' - }, - getTubePercent() { - this.deviceAlarm[3].context = '45' + // getWellPercent() { + // this.deviceAlarm[0].context = '10' + // }, + // getGasPercent() { + // this.deviceAlarm[1].context = '70' + // }, + // getGasdectorPercent() { + // this.deviceAlarm[2].context = '50' + // }, + // getTubePercent() { + // this.deviceAlarm[3].context = '45' + // } + getAlarmList() { + getAlarm().then(response => { + console.log(response) + this.deviceAlarm[0].context = parseFloat(response.data[0].rate).toFixed(3).substring(0, parseFloat(response.data[0].rate).toFixed(3).length - 1) + this.deviceAlarm[1].context = parseFloat(response.data[1].rate).toFixed(3).substring(0, parseFloat(response.data[1].rate).toFixed(3).length - 1) + this.deviceAlarm[2].context = parseFloat(response.data[2].rate).toFixed(3).substring(0, parseFloat(response.data[2].rate).toFixed(3).length - 1) + this.deviceAlarm[3].context = parseFloat(response.data[3].rate).toFixed(3).substring(0, parseFloat(response.data[3].rate).toFixed(3).length - 1) + }) } } } diff --git a/src/views/zhangqiu/components/deviceInstalled/deviceInstalled.vue b/src/views/zhangqiu/components/deviceInstalled/deviceInstalled.vue index c9c1618..b639417 100644 --- a/src/views/zhangqiu/components/deviceInstalled/deviceInstalled.vue +++ b/src/views/zhangqiu/components/deviceInstalled/deviceInstalled.vue @@ -15,10 +15,10 @@