Merge branch 'develop' into single-develop
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 站点列表
|
||||
export function getSiteInfoList({siteName,startTime, endTime,pageSize,pageNum}) {
|
||||
export function getSiteInfoList({siteName, startTime, endTime, pageSize, pageNum}) {
|
||||
return request({
|
||||
url: `/ems/siteConfig/getSiteInfoList?siteName=${siteName}&startTime=${startTime}&endTime=${endTime}&pageSize=${pageSize}&pageNum=${pageNum}`,
|
||||
method: 'get'
|
||||
@ -8,7 +9,7 @@ export function getSiteInfoList({siteName,startTime, endTime,pageSize,pageNum})
|
||||
}
|
||||
|
||||
// 设备列表
|
||||
export function getDeviceInfoList({siteId,pageSize,pageNum}) {
|
||||
export function getDeviceInfoList({siteId, pageSize, pageNum}) {
|
||||
return request({
|
||||
url: `/ems/siteConfig/getDeviceInfoList?siteId=${siteId}&pageSize=${pageSize}&pageNum=${pageNum}`,
|
||||
method: 'get'
|
||||
@ -39,6 +40,7 @@ export function addDevice(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 编辑设备
|
||||
export function updateDevice(data) {
|
||||
return request({
|
||||
@ -47,20 +49,23 @@ export function updateDevice(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备
|
||||
export function deleteService(id) {
|
||||
return request({
|
||||
url: `/ems/siteConfig/deleteService/`+id,
|
||||
url: `/ems/siteConfig/deleteService/` + id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取上级设备id列表
|
||||
export function getParentDeviceId({siteId,deviceCategory}) {
|
||||
export function getParentDeviceId({siteId, deviceCategory}) {
|
||||
return request({
|
||||
url: `/ems/siteConfig/getParentDeviceId?siteId=${siteId}&deviceCategory=${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
|
||||
})
|
||||
}
|
||||
|
||||
@ -122,7 +128,7 @@ export function getProtectPlan(id) {
|
||||
|
||||
//设备保护详情列表
|
||||
//http://localhost:8089/ems/protectPlan/list?pageSize=10&pageNum=1&faultName=总压&siteId=021_DDS_01
|
||||
export function protectPlanList({siteId, faultName,pageSize,pageNum}) {
|
||||
export function protectPlanList({siteId, faultName, pageSize, pageNum}) {
|
||||
return request({
|
||||
url: `/ems/protectPlan/list?siteId=${siteId}&faultName=${faultName}&pageSize=${pageSize}&pageNum=${pageNum}`,
|
||||
method: 'get',
|
||||
@ -137,6 +143,7 @@ export function exportPointList(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 点位导入
|
||||
export function importPointList(data) {
|
||||
return request({
|
||||
@ -147,20 +154,21 @@ export function importPointList(data) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
//mqtt
|
||||
export function getMqttList({pageSize,pageNum,mqttTopic,topicName,siteId}) {
|
||||
export function getMqttList({pageSize, pageNum, mqttTopic, topicName, siteId}) {
|
||||
return request({
|
||||
url: `/ems/mqttConfig/list?pageSize=${pageSize}&pageNum=${pageNum}&mqttTopic=${mqttTopic}&topicName=${topicName}&siteId=${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}`,
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
stripe
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="deviceId" label="单体编号"> </el-table-column>
|
||||
<el-table-column prop="clusterDeviceId" label="簇号"> </el-table-column>
|
||||
<el-table-column prop="deviceId" label="单体编号"></el-table-column>
|
||||
<el-table-column prop="clusterDeviceId" label="簇号"></el-table-column>
|
||||
<el-table-column prop="voltage" label="电压 (V)">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -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">
|
||||
详细
|
||||
@ -118,7 +118,7 @@ export default {
|
||||
methods: {
|
||||
//查看表格行图表
|
||||
chartDetail(row, dataType = "") {
|
||||
this.$emit("chart", { ...row, dataType });
|
||||
this.$emit("chart", {...row, dataType});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@ -30,14 +30,14 @@
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="modbus ip">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="form.ipAddress"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请输入ip"-->
|
||||
<!-- style="width: 150px"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="modbus ip">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="form.ipAddress"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请输入ip"-->
|
||||
<!-- style="width: 150px"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<br>
|
||||
<el-form-item label="最小值">
|
||||
<el-input
|
||||
@ -55,14 +55,14 @@
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="modbus 端口">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="form.ipPort"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请输入端口"-->
|
||||
<!-- style="width: 150px"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="modbus 端口">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="form.ipPort"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请输入端口"-->
|
||||
<!-- style="width: 150px"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item style="margin-left: 20px">
|
||||
<el-button type="primary" @click="search">搜索</el-button>
|
||||
</el-form-item>
|
||||
@ -77,18 +77,18 @@
|
||||
:default-sort="defaultSort"
|
||||
@sort-change="handleSortChange"
|
||||
>
|
||||
<el-table-column label="数据点位" prop="dataPoint"> </el-table-column>
|
||||
<el-table-column label="数据点位" prop="dataPoint"></el-table-column>
|
||||
<el-table-column
|
||||
label="数据点位名称"
|
||||
prop="pointName"
|
||||
></el-table-column>
|
||||
<!-- <el-table-column label="modbus地址">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{-->
|
||||
<!-- `${scope.row.ipAddress || ""} ${scope.row.ipPort || ""}`-->
|
||||
<!-- }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="modbus地址">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{-->
|
||||
<!-- `${scope.row.ipAddress || ""} ${scope.row.ipPort || ""}`-->
|
||||
<!-- }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="寄存器地址" prop="寄存器地址"></el-table-column>
|
||||
<el-table-column
|
||||
label="最新值"
|
||||
@ -127,15 +127,15 @@
|
||||
>
|
||||
</el-pagination>
|
||||
</el-dialog>
|
||||
<point-chart ref="pointChart" :site-id="siteId" />
|
||||
<point-chart ref="pointChart" :site-id="siteId"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getDevicePointList } from "@/api/ems/site";
|
||||
import {getDevicePointList} from "@/api/ems/site";
|
||||
import pointChart from "@/views/ems/dzjk/sbjk/PointChart.vue";
|
||||
|
||||
export default {
|
||||
components: { pointChart },
|
||||
components: {pointChart},
|
||||
watch: {
|
||||
show(val) {
|
||||
if (!val) {
|
||||
@ -169,10 +169,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
// 默认排序
|
||||
defaultSort: { prop: "updateTime", order: "descending" },
|
||||
defaultSort: {prop: "updateTime", order: "descending"},
|
||||
show: false,
|
||||
loading: false,
|
||||
dataType:'',//展示的数据类型 point点位/alarmPoint报警点位
|
||||
dataType: '',//展示的数据类型 point点位/alarmPoint报警点位
|
||||
form: {
|
||||
sortData: "updateTime", //最新值升序不传或者asc、降序desc)
|
||||
sortMethod: "desc", //升序不传或者asc、降序desc)
|
||||
@ -194,9 +194,9 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
showChart({ pointName }) {
|
||||
showChart({pointName}) {
|
||||
if (pointName) {
|
||||
const { deviceCategory, deviceId } = this;
|
||||
const {deviceCategory, deviceId} = this;
|
||||
if (this.isDtdc)
|
||||
this.$refs.pointChart.showChart({
|
||||
pointName,
|
||||
@ -235,7 +235,7 @@ export default {
|
||||
this.getData()
|
||||
});
|
||||
},
|
||||
showTable({ deviceCategory, siteId, deviceId, parentId = "" },dataType) {
|
||||
showTable({deviceCategory, siteId, deviceId, parentId = ""}, dataType) {
|
||||
this.dataType = dataType;
|
||||
this.deviceCategory = deviceCategory;
|
||||
this.siteId = siteId;
|
||||
@ -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