feat : 对接用电量/省电量数据及新增用电量echarts图表模块
This commit is contained in:
@@ -97,8 +97,8 @@
|
||||
<div style="width: 1px;"></div>
|
||||
</div>
|
||||
<div class="time-select">
|
||||
<choose-time v-if="selectTimeButton===2" :time="dayValue" @select="daySelect"/>
|
||||
<choose-month v-if="selectTimeButton===1" :time="monthValue" @select="monthSelect"/>
|
||||
<choose-time v-if="selectTimeButton===2" ref="chooseDayRef" @select="daySelect"/>
|
||||
<choose-month v-if="selectTimeButton===1" ref="chooseMonthRef" @select="monthSelect"/>
|
||||
<time-range-btn
|
||||
:buttonList="timeList"
|
||||
v-model="selectTimeButton"
|
||||
@@ -128,8 +128,6 @@ import {ElMessage, ElMessageBox} from "element-plus";
|
||||
|
||||
const timeList = ref(["年", "月", "日"]);
|
||||
const selectTimeButton = ref(2);
|
||||
const dayValue = ref('');
|
||||
const monthValue = ref('');
|
||||
const props = defineProps({
|
||||
list: Array,
|
||||
tunnelId: Number,
|
||||
@@ -137,6 +135,8 @@ const props = defineProps({
|
||||
transducerData: Array,
|
||||
loading: Number,
|
||||
});
|
||||
const chooseDayRef = ref();
|
||||
const chooseMonthRef = ref();
|
||||
const socketData = ref()
|
||||
let Echarts_info1 = null;
|
||||
let fan01_option = reactive();
|
||||
@@ -203,13 +203,10 @@ watch(() => props.list, (now) => {
|
||||
handleOnMounted()
|
||||
}, {deep: true});
|
||||
const daySelect = (val) => {
|
||||
console.log('daySelect')
|
||||
dayValue.value = val
|
||||
getFanInfo(openEquipmentId.value, 'day',val)
|
||||
getFanInfo(openEquipmentId.value, 'day', val)
|
||||
}
|
||||
const monthSelect = (val) => {
|
||||
monthValue.value = val
|
||||
getFanInfo(openEquipmentId.value, 'month',val)
|
||||
getFanInfo(openEquipmentId.value, 'month', val)
|
||||
}
|
||||
const changeDate = (index) => {
|
||||
switch (index) {
|
||||
@@ -222,8 +219,6 @@ const changeDate = (index) => {
|
||||
}
|
||||
}
|
||||
const timeSelect = (index) => {
|
||||
dayValue.value = ''
|
||||
monthValue.value = ''
|
||||
getFanInfo(openEquipmentId.value, changeDate(index))
|
||||
};
|
||||
const packageData = (item, type, flag) => {
|
||||
@@ -319,6 +314,14 @@ const getFanInfo = (equipmentId, type = 'day', time = '') => {
|
||||
})
|
||||
}
|
||||
const handleOpenChart = (item) => {
|
||||
nextTick(()=>{
|
||||
if(chooseMonthRef.value){
|
||||
chooseMonthRef.value.clearData()
|
||||
}
|
||||
if(chooseDayRef.value){
|
||||
chooseDayRef.value.clearData()
|
||||
}
|
||||
})
|
||||
selectTimeButton.value = 2
|
||||
openEquipmentId.value = item.equipmentId
|
||||
getFanInfo(item.equipmentId, 'day')
|
||||
|
||||
Reference in New Issue
Block a user