Merge pull request 'fix : 细节优化' (#300) from dengjie into dev

Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/300
This commit is contained in:
2024-03-04 09:08:14 +00:00
2 changed files with 9 additions and 4 deletions

View File

@@ -7,12 +7,11 @@
<div class="loading" v-if="loading===0"></div> <div class="loading" v-if="loading===0"></div>
{{ loading === 0 ? '加载中...' : '暂无数据~' }} {{ loading === 0 ? '加载中...' : '暂无数据~' }}
</div> </div>
<div v-else class="info-list"> <div v-else class="info-list" @click="handleOpenChart">
<gas-info-item <gas-info-item
v-for="item in badGasList" v-for="item in badGasList"
:key="item.equipmentId" :key="item.equipmentId"
:gasInfo="item" :gasInfo="item"
@click="handleOpenChart"
/> />
</div> </div>
<div class="digital-tunnel"> <div class="digital-tunnel">

View File

@@ -15,8 +15,8 @@
<div class="left-top-icon"></div> <div class="left-top-icon"></div>
<div class="right-top-icon"></div> <div class="right-top-icon"></div>
<div class="loading-block" v-if="showLoading"> <div class="loading-block" v-if="showLoading">
<div class="loading"></div> <div class="loading" v-if="loadingText==='加载中...'"></div>
<span>加载中...</span> <span>{{ loadingText }}</span>
</div> </div>
<div class="chat-dialog" v-else> <div class="chat-dialog" v-else>
<div id="container"></div> <div id="container"></div>
@@ -51,6 +51,7 @@ const props = defineProps({
winData: Array, winData: Array,
loading: Number, loading: Number,
}); });
const loadingText = ref('加载中...')
const chooseDayRef = ref(); const chooseDayRef = ref();
const chooseMonthRef = ref(); const chooseMonthRef = ref();
const windSort = ref(1) const windSort = ref(1)
@@ -89,8 +90,13 @@ const getWindInfo = (equipmentId, type = 'day', time = '') => {
nextTick(() => { nextTick(() => {
initChart(res.data.dates, res.data.values) initChart(res.data.dates, res.data.values)
}) })
}else {
loadingText.value = res.msg
} }
}) })
nextTick(() => {
loadingText.value = '加载中...'
})
} }
const handleOpenChart = (item) => { const handleOpenChart = (item) => {