feat : 对接用电量/省电量数据及新增用电量echarts图表模块
This commit is contained in:
@@ -23,8 +23,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"
|
||||
@@ -51,8 +51,8 @@ const props = defineProps({
|
||||
winData: Array,
|
||||
loading: Number,
|
||||
});
|
||||
const dayValue = ref('');
|
||||
const monthValue = ref('');
|
||||
const chooseDayRef = ref();
|
||||
const chooseMonthRef = ref();
|
||||
const windSort = ref(1)
|
||||
const windSortId = ref(1)
|
||||
const timeList = ref(["年", "月", "日"]);
|
||||
@@ -75,11 +75,9 @@ watch(() => props.winData, (now) => {
|
||||
getScreenInfo(now.windPressureSensorList)
|
||||
}, {deep: true});
|
||||
const daySelect = (val) => {
|
||||
dayValue.value = val
|
||||
getWindInfo(windSortId.value, 'day', val)
|
||||
}
|
||||
const monthSelect = (val) => {
|
||||
monthValue.value = val
|
||||
getWindInfo(windSortId.value, 'month', val)
|
||||
}
|
||||
const getWindInfo = (equipmentId, type = 'day', time = '') => {
|
||||
@@ -97,6 +95,14 @@ const getWindInfo = (equipmentId, type = 'day', time = '') => {
|
||||
|
||||
const handleOpenChart = (item) => {
|
||||
selectTimeButton.value = 2
|
||||
nextTick(()=>{
|
||||
if(chooseMonthRef.value){
|
||||
chooseMonthRef.value.clearData()
|
||||
}
|
||||
if(chooseDayRef.value){
|
||||
chooseDayRef.value.clearData()
|
||||
}
|
||||
})
|
||||
getWindInfo(item.equipmentId)
|
||||
windSort.value = item.equipmentName
|
||||
windSortId.value = item.equipmentId
|
||||
@@ -112,8 +118,6 @@ const changeDate = (index) => {
|
||||
}
|
||||
}
|
||||
const timeSelect = (index) => {
|
||||
dayValue.value = ''
|
||||
monthValue.value = ''
|
||||
getWindInfo(windSortId.value, changeDate(index))
|
||||
};
|
||||
const getScreenInfo = (now) => {
|
||||
|
||||
Reference in New Issue
Block a user