邓洁 : 用电量弹窗及样式修改
This commit is contained in:
@@ -4,30 +4,40 @@
|
||||
<div class="info-list">
|
||||
<gas-info-item v-for="item in badGasList" :key="item.equipmentId" :gasInfo="item" @click="handleOpenChart"/>
|
||||
</div>
|
||||
<el-dialog v-model="isVisited" title="有害气体监控数据" width="1996px" :modal="false">
|
||||
<div class="left-icon"></div>
|
||||
<div class="right-icon"></div>
|
||||
<div id="container" ref="chart"></div>
|
||||
<div class="time-select">
|
||||
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div class="digital-tunnel">
|
||||
<el-dialog v-model="isVisited" title="有害气体监控数据" width="1365px" :modal="false">
|
||||
<div class="left-top-icon"></div>
|
||||
<div class="right-top-icon"></div>
|
||||
<div id="container"></div>
|
||||
<div class="time-select">
|
||||
<time-range-btn
|
||||
:buttonList="timeList"
|
||||
v-model="selectTimeButton"
|
||||
@select="timeSelect"
|
||||
width="124px"
|
||||
/>
|
||||
</div>
|
||||
<div class="left-bottom-icon"></div>
|
||||
<div class="right-bottom-icon"></div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import GasInfoItem from "./childComps/GasInfoItem.vue";
|
||||
import * as echarts from 'echarts';
|
||||
import TimeRangeBtn from "@/components/timeRangeBtn/index.vue"
|
||||
|
||||
const props = defineProps({
|
||||
list: Array,
|
||||
badGasData: Array
|
||||
});
|
||||
const timeList = ref(["年", "月", "日"]);
|
||||
const selectTimeButton = ref(0);
|
||||
const isVisited = ref(false);
|
||||
const badGasList = ref([])
|
||||
const chart = ref();
|
||||
let myEcharts = reactive({});
|
||||
// const option = reactive()
|
||||
|
||||
watch(() => props.list, (now) => {
|
||||
badGasList.value.forEach(item => {
|
||||
@@ -42,7 +52,16 @@ watch(() => props.list, (now) => {
|
||||
watch(() => props.badGasData, (now) => {
|
||||
getBadGasInfo(now.sensorList)
|
||||
}, {deep: true});
|
||||
|
||||
const timeSelect = (index) => {
|
||||
console.log('选择时间', index)
|
||||
if(index===0){
|
||||
console.log('--年')
|
||||
}else if(index===1){
|
||||
console.log('--月')
|
||||
}else if(index===2){
|
||||
console.log('--日')
|
||||
}
|
||||
};
|
||||
const getBadGasInfo = (now) => {
|
||||
let windPressureObj = {}
|
||||
let windPressureArr = []
|
||||
@@ -70,7 +89,6 @@ const handleOpenChart = () => {
|
||||
nextTick(() => {
|
||||
initChart()
|
||||
})
|
||||
// initChart()
|
||||
}
|
||||
/**
|
||||
* 初始化echarts实例方法
|
||||
@@ -79,24 +97,24 @@ const initChart = () => {
|
||||
//3.初始化container容器
|
||||
myEcharts = echarts.init(document.getElementById('container'));
|
||||
//5.传入数据
|
||||
let option={
|
||||
let option = {
|
||||
//图例
|
||||
legend: {
|
||||
left: 0,
|
||||
textStyle:{
|
||||
color:'#FFFFFF',
|
||||
fontSize:28
|
||||
textStyle: {
|
||||
color: '#FFFFFF',
|
||||
fontSize: 28
|
||||
},
|
||||
// itemWidth: 20,
|
||||
// itemHeight: 20
|
||||
},
|
||||
//离容器四侧的距离
|
||||
grid: {
|
||||
left: 45, // 左边距
|
||||
// right: 60, // 右边距
|
||||
top: 60, // 顶边距
|
||||
bottom: 40, // 底边距
|
||||
// containLabel: true,
|
||||
left: 0, // 左边距
|
||||
right: 0, // 右边距
|
||||
top: 80, // 顶边距
|
||||
bottom: 0, // 底边距
|
||||
containLabel: true,
|
||||
},
|
||||
//提示框组件
|
||||
tooltip: {
|
||||
@@ -110,7 +128,7 @@ const initChart = () => {
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
fontSize: 24,
|
||||
color:'#D6F1FA'
|
||||
color: '#D6F1FA'
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -120,7 +138,7 @@ const initChart = () => {
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
fontSize: 24,
|
||||
color:'#D6F1FA'
|
||||
color: '#D6F1FA'
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -131,9 +149,9 @@ const initChart = () => {
|
||||
data: [5, 9, 10, 7, 8, 15, 12],
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbolSize:24,
|
||||
lineStyle:{
|
||||
width:5
|
||||
symbolSize: 24,
|
||||
lineStyle: {
|
||||
width: 5
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -141,9 +159,9 @@ const initChart = () => {
|
||||
data: [8, 15, 5, 9, 10, 7, 12],
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbolSize:24,
|
||||
lineStyle:{
|
||||
width:5
|
||||
symbolSize: 24,
|
||||
lineStyle: {
|
||||
width: 5
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -151,9 +169,9 @@ const initChart = () => {
|
||||
data: [5, 15, 1, 9, 10, 7, 8],
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbolSize:24,
|
||||
lineStyle:{
|
||||
width:5
|
||||
symbolSize: 24,
|
||||
lineStyle: {
|
||||
width: 5
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -161,9 +179,9 @@ const initChart = () => {
|
||||
data: [8, 15, 12, 5, 9, 2, 7],
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbolSize:24,
|
||||
lineStyle:{
|
||||
width:5
|
||||
symbolSize: 24,
|
||||
lineStyle: {
|
||||
width: 5
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -171,9 +189,9 @@ const initChart = () => {
|
||||
data: [2, 9, 10, 15, 12, 7, 8,],
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbolSize:24,
|
||||
lineStyle:{
|
||||
width:5
|
||||
symbolSize: 24,
|
||||
lineStyle: {
|
||||
width: 5
|
||||
}
|
||||
},
|
||||
]
|
||||
@@ -188,37 +206,6 @@ const initChart = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
#container {
|
||||
box-sizing: border-box;
|
||||
height: 754px;
|
||||
width: 1996px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
:deep(.el-dialog) {
|
||||
border: 2px solid #0F82AF;
|
||||
background: rgba(6, 34, 71, 0.78);
|
||||
border-radius: 20px;
|
||||
padding: 47px 30px;
|
||||
box-sizing: border-box;
|
||||
margin: 588px auto 0 auto;
|
||||
|
||||
.el-dialog__header {
|
||||
padding: 0;
|
||||
//display: none;
|
||||
.el-dialog__title {
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
color: #D6F1FA;
|
||||
}
|
||||
|
||||
.el-dialog__close {
|
||||
color: #05FEFF;
|
||||
font-size: 35px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#bad-gas-info {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
@@ -228,34 +215,7 @@ const initChart = () => {
|
||||
right: 72px;
|
||||
background-image: url(@/assets/images/badGasInfo/bg.png);
|
||||
|
||||
.left-icon {
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
left: -3px;
|
||||
width: 41px;
|
||||
height: 41px;
|
||||
background-image: url(@/assets/images/badGasInfo/sp_jz.png);
|
||||
}
|
||||
|
||||
.right-icon {
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
right: -3px;
|
||||
width: 41px;
|
||||
height: 41px;
|
||||
background-image: url(@/assets/images/badGasInfo/sp_jz.png);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.time-select{
|
||||
position: absolute;
|
||||
top: 47px;
|
||||
right: 119px;
|
||||
//display: flex;
|
||||
width: 204px;
|
||||
height: 68px;
|
||||
border-radius: 10px;
|
||||
border: 2px solid #0F82AF;
|
||||
}
|
||||
.title {
|
||||
width: 128px;
|
||||
height: 45px;
|
||||
|
||||
Reference in New Issue
Block a user