Commit 82032d57 authored by liuyuping's avatar liuyuping

'2021-11-9'

parent 08902c49
This diff is collapsed.
......@@ -37,6 +37,10 @@
<div v-if="hidePartBaseInfo">
<el-row class="text">
<el-col :span="12">尾矿库监测</el-col>
<el-col class="text_look" :span="12"><span @click="onTextLook(1, 'jyl')">查看</span></el-col>
</el-row>
<!-- <el-row class="text">
<el-col :span="12">降雨量</el-col>
<el-col class="text_look" :span="12"><span @click="onTextLook(1, 'jyl')">查看</span></el-col>
</el-row>
......@@ -69,7 +73,7 @@
<el-row class="text">
<el-col :span="12">内部位移倾斜</el-col>
<el-col class="text_look" :span="12"><span @click="onTextLook(9, 'nbwyqx')">查看</span></el-col>
</el-row>
</el-row> -->
</div>
<!-- <el-row class="text">
......
......@@ -121,6 +121,7 @@ export default {
obj: item,
})
}
console.log(this.listText, 'this.listText')
})
this.$store.commit('SET_deptData', res.content)
......@@ -177,9 +178,7 @@ export default {
}
}
/* for (let i of this.listText) {
i.is = false
} */
},
},
}
......
......@@ -14,23 +14,44 @@
<el-button type="primary" @click="core">查询</el-button>
<el-button type="primary" @click="onVisual">可视化</el-button>
</div> -->
<el-table :data="tableData" style="width: 100%" height="55vh">
<el-table-column prop="company" label="企业站点">
<template>
<span>{{ companyName }}</span>
</template>
</el-table-column>
<el-table-column prop="location" label="采集站"></el-table-column>
<el-table-column prop="item" label="检测项"></el-table-column>
<el-table-column prop="value" label="数据值">
<template slot-scope="scope">
{{scope.row.value.trim() !== void 0 ? scope.row.value.trim() +' '+ (itemUnit[scope.row.item.trim()] || '') : ''}}
</template>
</el-table-column>
<el-table-column prop="deviceid" label="设备标识"></el-table-column>
<el-table-column prop="insertTime" label="采集时间"></el-table-column>
</el-table>
<el-pagination layout="prev, pager, next" :total="total" @current-change="handleCurrentChange"></el-pagination>
<div class="tools-wrapper">
<div class="device-wrapper">
<span>设备标识:&nbsp;&nbsp;</span>
<el-select>
<el-option label="400中段风速" value="400中段风速"></el-option>
<el-option label="2 5 0 进风巷 风速" value="2 5 0 进风巷 风速"></el-option>
<el-option label="3 0 0 进风巷 风速" value="3 0 0 进风巷 风速"></el-option>
<el-option label="7 1线温度" value="7 1线温度"></el-option>
<el-option label="71二氧化碳" value="71二氧化碳"></el-option>
</el-select>
<el-button type="success" size="medium">查询</el-button>
</div>
<div class="switch-wrapper">
<el-button type="primary" size="medium" @click.stop="clickToSwitchTable">切换</el-button>
</div>
</div>
<div v-show="switchTable">
<el-table :data="tableData" style="width: 100%" height="55vh">
<el-table-column prop="company" label="企业站点">
<template>
<span>{{ companyName }}</span>
</template>
</el-table-column>
<el-table-column prop="location" label="采集站"></el-table-column>
<el-table-column prop="item" label="检测项"></el-table-column>
<el-table-column prop="value" label="数据值">
<template slot-scope="scope">
{{scope.row.value.trim() !== void 0 ? scope.row.value.trim() +' '+ (itemUnit[scope.row.item.trim()] || '') : ''}}
</template>
</el-table-column>
<el-table-column prop="deviceid" label="设备标识"></el-table-column>
<el-table-column prop="insertTime" label="采集时间"></el-table-column>
</el-table>
<el-pagination layout="prev, pager, next" :total="total" @current-change="handleCurrentChange"></el-pagination>
</div>
<div v-show="!switchTable" id="enterStatistics" style="width: 100%; height: 55vh">
</div>
</el-dialog>
</template>
......@@ -49,6 +70,10 @@ export default {
page: 0,
companyName: '',
itemUnit:getValueUnit(),
// 设备标识
deviceIds: [],
// 切换
switchTable: true
}
},
......@@ -91,6 +116,35 @@ export default {
this.page = e - 1
this.core()
},
clickToSwitchTable() {
// 切换图标
this.switchTable = !this.switchTable
if (this.switchTable === false) {
this.$nextTick(() => {
// 画图表
console.log(echarts, '有echarts吗')
const mychart = echarts.init(document.getElementById('enterStatistics'))
mychart.clear()
const option = {
xAxis: {
type: 'category',
data: ['19:17', '20:20', '20:40', '21:30', '21:45', '21:50', '21:55', '22:00', '22:11']
},
yAxis: {
type: 'value'
},
series: [
{
data: [150, 230, 224, 118, 110, 55, 280, 360, 780],
type: 'line'
}
]
}
mychart.setOption(option)
})
}
}
},
computed: {
......@@ -131,4 +185,16 @@ export default {
}
}
}
.tools-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
.device-wrapper {
margin-left: 40px;
}
.switch-wrapper {
margin-right: 40px;
}
margin-bottom: 10px;
}
</style>
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment