This commit is contained in:
jsy_zjg 2025-02-17 21:39:54 +08:00
parent 3b7c43092b
commit 18dc5d5795

View File

@ -40,47 +40,47 @@
<view class="grid">
<view>
<text class="text">诱虫灯</text>
<u-button type="success" :text="`${itemProperty.aw === '1'? '打开':'关闭'}`" :class="[itemProperty.aw === '1' ? 'bg-green':'bg-red']"
<u-button type="success" :text="`${itemProperty&&itemProperty.aw === '1'? '打开':'关闭'}`" :class="[itemProperty&&itemProperty.aw === '1' ? 'bg-green':'bg-red']"
@click="controlHeadSwitch(item,itemProperty.aw,'aw')" />
</view>
<view>
<text class="text">震动装置</text>
<u-button type="success" :text="`${itemProperty.sk === '1'? '打开':'关闭'}`" :class="[itemProperty.sk === '1' ? 'bg-green':'bg-red']"
<u-button type="success" :text="`${itemProperty&&itemProperty.sk === '1'? '打开':'关闭'}`" :class="[itemProperty&&itemProperty.sk === '1' ? 'bg-green':'bg-red']"
@click="controlHeadSwitch(item,itemProperty.sk,'sk')" />
</view>
<view>
<text class="text">虫雨挡板</text>
<u-button type="success" :text="`${itemProperty.rf === '1'? '打开':'关闭'}`" :class="[itemProperty.rf === '1' ? 'bg-green':'bg-red']"
<u-button type="success" :text="`${itemProperty&&itemProperty.rf === '1'? '打开':'关闭'}`" :class="[itemProperty&&itemProperty.rf === '1' ? 'bg-green':'bg-red']"
@click="controlHeadSwitch(item,itemProperty.rf,'rf')" />
</view>
<view>
<text class="text">补光灯</text>
<u-button type="success" :text="`${itemProperty.fl === '1'? '打开':'关闭'}`" :class="[itemProperty.fl === '1' ? 'bg-green':'bg-red']"
<u-button type="success" :text="`${itemProperty&&itemProperty.fl === '1'? '打开':'关闭'}`" :class="[itemProperty&&itemProperty.fl === '1' ? 'bg-green':'bg-red']"
@click="controlHeadSwitch(item,itemProperty.fl,'fl')" />
</view>
<view>
<text class="text">杀虫挡板</text>
<u-button type="success" :text="`${itemProperty.wf === '1'? '打开':'关闭'}`" :class="[itemProperty.wf === '1' ? 'bg-green':'bg-red']"
<u-button type="success" :text="`${itemProperty&&itemProperty.wf === '1'? '打开':'关闭'}`" :class="[itemProperty&&itemProperty.wf === '1' ? 'bg-green':'bg-red']"
@click="controlHeadSwitch(item,itemProperty.wf,'wf')" />
</view>
<view>
<text class="text">杀虫控制</text>
<u-button type="success" :text="`${itemProperty.itc === '1'? '打开':'关闭'}`" :class="[itemProperty.itc === '1' ? 'bg-green':'bg-red']"
<u-button type="success" :text="`${itemProperty&&itemProperty.itc === '1'? '打开':'关闭'}`" :class="[itemProperty&&itemProperty.itc === '1' ? 'bg-green':'bg-red']"
@click="controlHeadSwitch(item,itemProperty.itc,'itc')" />
</view>
<view>
<text class="text">烘干挡板</text>
<u-button type="success" :text="`${itemProperty.df === '1'? '打开':'关闭'}`" :class="[itemProperty.df === '1' ? 'bg-green':'bg-red']"
<u-button type="success" :text="`${itemProperty&&itemProperty.df === '1'? '打开':'关闭'}`" :class="[itemProperty&&itemProperty.df === '1' ? 'bg-green':'bg-red']"
@click="controlHeadSwitch(item,itemProperty.df,'df')" />
</view>
<view>
<text class="text">烘干控制</text>
<u-button type="success" :text="`${itemProperty.d === '1'? '打开':'关闭'}`" :class="[itemProperty.d === '1' ? 'bg-green':'bg-red']"
<u-button type="success" :text="`${itemProperty&&itemProperty.d === '1'? '打开':'关闭'}`" :class="[itemProperty&&itemProperty.d === '1' ? 'bg-green':'bg-red']"
@click="controlHeadSwitch(item,itemProperty.d,'d')" />
</view>
<view>
<text class="text">移虫装置</text>
<u-button type="success" :text="`${itemProperty.mw === '1'? '打开':'关闭'}`" :class="[itemProperty.mw === '1'? 'bg-green':'bg-red']"
<u-button type="success" :text="`${itemProperty&&itemProperty.mw === '1'? '打开':'关闭'}`" :class="[itemProperty&&itemProperty.mw === '1'? 'bg-green':'bg-red']"
@click="controlHeadSwitch(item,itemProperty.mw,'mw')" />
</view>
<view>
@ -90,7 +90,7 @@
</view>
</view>
<view class="rowheadstyle" v-if="itemProperty.aal!=null">
<view class="rowheadstyle" v-if="itemProperty&&itemProperty.aal!=null">
<u-button text="分析" size="large" type="primary" @click="analysis(item,itemProperty.aal)"></u-button>
</view>
<u-popup :show="showDeviceLog" mode="center">
@ -146,7 +146,7 @@
shape="square"></u-image></uni-col></uni-row>
</uni-col>
</uni-row>
<uni-row class="rowstyle">
<!-- <uni-row class="rowstyle">
<uni-col :span="24">
<uni-row class="col1"><uni-col :span="24">
<view class="text2">分析时间</view>
@ -155,7 +155,7 @@
<view class="text2">{{analysisTime}}</view>
</uni-col></uni-row>
</uni-col>
</uni-row>
</uni-row> -->
<view v-for="itemanalyse in analyseData" :key="itemanalyse.name">
<uni-row class="rowstyle">
<uni-col :span="24">