修改接口

dev
夜笙歌 1 year ago
parent 84ff613e36
commit e8441ac890

@ -17,15 +17,6 @@ export function selectDevicesByMonitorUnitId(query=0,data=0) {
data:query
})
}
// 右
export function selectLatestDataByDeviceMode(query) {
return request({
// baseURL:'/monitoring-api',
url: '/business/monitorPlatform/selectLatestDataByDeviceMode',
method: 'post',
data:query
})
}
// 中上
export function getMonitorById(query=0) {
return request({

@ -84,7 +84,6 @@
import {
treeList,
selectDevicesByMonitorUnitId,
selectLatestDataByDeviceMode,
getMonitorById
} from '@/api/board/equipment'
@ -147,7 +146,6 @@ export default {
if (!e.children?.length > 0) {
this.monitorUnitId = e.id
this.getDevice(e.id)
this.getRightDevice(e.id)
this.setMonitorById(e)
this.show = true
if (typeof getDeviceInterval === 'number') {
@ -164,14 +162,6 @@ export default {
this.controlList = data.control
this.acquisitionList = data.acquisition
},
async getRightDevice(e) {
const data = await selectLatestDataByDeviceMode({
"sceneId": this.$store.getters.sceneId,
"deviceModeId": 1,
"offset": 0,
"limit": 1
})
},
async setMonitorById(e) {
const {data} = await getMonitorById(e.id)
this.MonitorInfo = data

@ -2,7 +2,7 @@
<div class="container">
<div class="centerImg"></div>
<div class="leftMenu">
<div v-for="i in deviceList" class="item" @click="getRightData(i)">
<div v-for="(i,k) in deviceList" class="item" @click="getRightData(i)" :key="k">
<span>{{ i.deviceModeName }}</span>
</div>
</div>
@ -23,13 +23,14 @@
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit"></el-button>
<el-button @click="onSubmit"></el-button>
<el-button type="primary" @click="()=>{}"></el-button>
<el-button @click="()=>{}"></el-button>
</el-form-item>
</el-form>
</div>
<div :style="{height:maxHeight+'px'}" class="table">
<el-table
v-loading="loading"
v-if='tableShow'
:cell-style="setStyle"
:data="tableData"
@ -93,6 +94,7 @@ export default {
},
data() {
return {
loading:false,
tableShow: false,
form: {
data1: '',
@ -115,6 +117,7 @@ export default {
},
methods: {
async getRightData(e){
this.loading = true
await this.setSelectLatestDataByDeviceMode({
"sceneId": this.$store.getters.sceneId,
"deviceModeId": e.deviceModeId,
@ -122,6 +125,7 @@ export default {
"offset": this.offset,
"limit": 10
})
this.loading = false
},
async getData() {
await this.setDeviceModesBySceneId()

@ -198,9 +198,11 @@ export default {
chart2Option: {
color: ["#22acfd", "#22fe97", "#f9e728", "#ff922b", "#ed1814"],
legend: {
type:'scroll',
orient: "vertical",
x: "right",
y: "center",
width:'100px',
textStyle: {
color: '#fff'
}

Loading…
Cancel
Save