Merge branch 'develop' into single-develop
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 站点列表
|
||||
export function getSiteInfoList({siteName, startTime, endTime, pageSize, pageNum}) {
|
||||
return request({
|
||||
@ -39,6 +40,7 @@ export function addDevice(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 编辑设备
|
||||
export function updateDevice(data) {
|
||||
return request({
|
||||
@ -47,6 +49,7 @@ export function updateDevice(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备
|
||||
export function deleteService(id) {
|
||||
return request({
|
||||
@ -54,6 +57,7 @@ export function deleteService(id) {
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取上级设备id列表
|
||||
export function getParentDeviceId({siteId, deviceCategory}) {
|
||||
return request({
|
||||
@ -61,6 +65,7 @@ export function getParentDeviceId({siteId,deviceCategory}) {
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//获取所有设备
|
||||
export function getDeviceList(siteId) {
|
||||
return request({
|
||||
@ -70,10 +75,11 @@ export function getDeviceList(siteId) {
|
||||
}
|
||||
|
||||
//获取设备点位table
|
||||
export function getDevicePointList({siteId,deviceId,deviceCategory,parentId,pageNum,pageSize,dataPointName='',sortMethod,sortData,dataPoint,lower,upper,ipAddress,ipPort}) {
|
||||
export function getDevicePointList(data) {
|
||||
return request({
|
||||
url: `/ems/siteConfig/getDevicePointList?siteId=${siteId}&deviceId=${deviceId}&pageNum=${pageNum}&pageSize=${pageSize}&deviceCategory=${deviceCategory}&dataPointName=${dataPointName}&parentId=${parentId}&dataPoint=${dataPoint}&lower=${lower}&upper=${upper}&pageNum=${pageNum}&sortMethod=${sortMethod}&sortData=${sortData}&ipAddress=${ipAddress}&ipPort=${ipPort}`,
|
||||
url: `/ems/siteConfig/getDevicePointList`,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
@ -137,6 +143,7 @@ export function exportPointList(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 点位导入
|
||||
export function importPointList(data) {
|
||||
return request({
|
||||
@ -147,7 +154,6 @@ export function importPointList(data) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
//mqtt
|
||||
export function getMqttList({pageSize, pageNum, mqttTopic, topicName, siteId}) {
|
||||
return request({
|
||||
@ -155,12 +161,14 @@ export function getMqttList({pageSize,pageNum,mqttTopic,topicName,siteId}) {
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function getMqttDetail(id) {
|
||||
return request({
|
||||
url: `/ems/mqttConfig/${id}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function addMqtt(data) {
|
||||
return request({
|
||||
url: `/ems/mqttConfig`,
|
||||
@ -168,6 +176,7 @@ export function addMqtt(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function editMqtt(data) {
|
||||
return request({
|
||||
url: `/ems/mqttConfig`,
|
||||
@ -175,6 +184,7 @@ export function editMqtt(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteMqtt(id) {
|
||||
return request({
|
||||
url: `/ems/mqttConfig/${id}`,
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<el-table-column label="操作" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="$emit('pointDetail',scope.row,'point')" type="text" size="small">
|
||||
详细
|
||||
|
||||
@ -244,28 +244,6 @@ export default {
|
||||
this.show = true;
|
||||
this.getData()
|
||||
},
|
||||
getAlarmPointData(param){
|
||||
this.loading = true;
|
||||
getDevicePointList(param)
|
||||
.then((response) => {
|
||||
this.tableData = response?.rows || [];
|
||||
this.totalSize = response?.total || 0;
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getPointData(param){
|
||||
this.loading = true;
|
||||
getDevicePointList(param)
|
||||
.then((response) => {
|
||||
this.tableData = response?.rows || [];
|
||||
this.totalSize = response?.total || 0;
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
const {
|
||||
siteId,
|
||||
@ -298,10 +276,19 @@ export default {
|
||||
dataPoint,
|
||||
lower,
|
||||
upper,
|
||||
ipAddress:'',
|
||||
ipPort:'',
|
||||
// ipAddress: '',
|
||||
// ipPort: '',
|
||||
}
|
||||
this.dataType === 'point' ? this.getPointData(params) : this.getAlarmPointData(params)
|
||||
params.isAlarm = this.dataType === 'point' ? 0 : 1
|
||||
this.loading = true;
|
||||
getDevicePointList(params)
|
||||
.then((response) => {
|
||||
this.tableData = response?.rows || [];
|
||||
this.totalSize = response?.total || 0;
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user