Browse Source

fix:无数据异常处理

master
guoapeng 5 months ago
parent
commit
5fbe56091a
  1. 4
      src/views/graphite/components/HeatPosition.vue
  2. 1
      vite.config.ts

4
src/views/graphite/components/HeatPosition.vue

@ -47,7 +47,7 @@
</div>
<div class="flex items-center py-4 justify-between px-2">
<div class="temp_text">{{ trayInfo.heatAearStatus.temperature }}</div>
<div class="temp_text">{{ trayInfo.heatAearStatus?.temperature }}</div>
<button
:class="`btn-light text-sm px-4 text_choose ${trayInfo.isSelect ? 'text_color' : ''}`"
@click.stop="onSelectTray"
@ -146,7 +146,7 @@ watch(()=>trayInfo, (newVal:any) =>{
})
const reSet = (newVal:any) => {
let heatAreaData = {...newVal}
if(heatAreaData.heatAearStatus.trayStatus){
if(heatAreaData.heatAearStatus?.trayStatus){
if(heatAreaData.tubeList && heatAreaData.tubeList.length){
heatAreaData.tubeList.forEach((item:any) => {
item.backgroudColor = selectedBackgroundColor

1
vite.config.ts

@ -19,6 +19,7 @@ export default defineConfig({
proxy: {
"/api": {
target: "http://192.168.1.125:8080",
// target: "http://localhost:8080",
changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, ''),
},

Loading…
Cancel
Save