|
@@ -101,161 +101,198 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- <!-- 机器详情表 -->
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 厕所实时使用情况 -->
|
|
<view class="">
|
|
<view class="">
|
|
- <view v-if="merchantList.length>1">
|
|
|
|
- <uni-collapse :accordion="true">
|
|
|
|
- <view class="titleFlag">
|
|
|
|
- <image class="img" src="../../static/img/red.png"></image>
|
|
|
|
- <font class="wenziT">红色代表机器报警</font>
|
|
|
|
- <image class="img" src="../../static/img/green.png"></image>
|
|
|
|
- <font class="wenziT">绿色代表机器正常</font>
|
|
|
|
|
|
+ <view class="titleFlag">
|
|
|
|
+ <image class="img" src="../../static/img/red.png"></image>
|
|
|
|
+ <font class="wenziT">红色正在使用</font>
|
|
|
|
+ <image class="img" src="../../static/img/green.png"></image>
|
|
|
|
+ <font class="wenziT">绿色空闲</font>
|
|
|
|
+ <image class="img" src="../../static/img/yellow.png"></image>
|
|
|
|
+ <font class="wenziT">黄色清洗中</font>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="td-right">
|
|
|
|
+ <view class="uni-list">
|
|
|
|
+ <view class="uni-list-cell">
|
|
|
|
+ <view class="uni-list-cell-left">
|
|
|
|
+ 当前选择
|
|
|
|
+ </view>
|
|
|
|
+ <view class="uni-list-cell-db">
|
|
|
|
+ <picker @change="changeEquipment" :value="index" :range="equipmentNameList">
|
|
|
|
+ <view class="uni-input">{{equipmentNameList[index]}}</view>
|
|
|
|
+ </picker>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <view class="titlelist" v-for="(merchant,index) in merchantList" :key="merchant.id">
|
|
|
|
- <uni-collapse-item :title="getMerchantTitle(merchant)" :open="index===0">
|
|
|
|
- <view style="padding: 20upx;background-color: aliceblue;">
|
|
|
|
- <view v-if="merchant.equipmentList.length==0" style="text-align: center;">暂无数据</view>
|
|
|
|
- <view v-if="merchant.equipmentList.length>0">
|
|
|
|
- <uni-collapse :show-animation="true">
|
|
|
|
- <view style="position: relative;" v-for="equipment in merchant.equipmentList" :key="equipment.id">
|
|
|
|
- <span class="status-css" :class="equipment.hasTodayAlarm===true?statusError : statusNormal"></span>
|
|
|
|
- <uni-collapse-item :title="getEquipmentTitle(equipment)">
|
|
|
|
- <view style="padding: 20upx;background-color: #F8F8F8;">
|
|
|
|
- <view class="swithBox" v-if="equipment.isSleep">
|
|
|
|
- <view class="swichFont">睡眠状态:机器已睡眠</view>
|
|
|
|
- <view class="switch">
|
|
|
|
- <switch style="transform:scale(0.65)" checked @change="change(equipment.id,0)" />
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="swithBox" v-else>
|
|
|
|
- <view class="swichFont">睡眠状态:未睡眠</view>
|
|
|
|
- <view class="switch">
|
|
|
|
- <switch style="transform:scale(0.65)" :checked="sleepChecked" @change="change(equipment.id,1)" />
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="single-poster" v-for="(box,num) in boxs" :key="num">
|
|
|
|
+ <view class="poster-wapper">
|
|
|
|
+ <image v-show="box.status==0" src="../../static/img/green.png" mode="" class="image"></image>
|
|
|
|
+ <image v-show="box.status==1" src="../../static/img/red.png" mode="" class="image"></image>
|
|
|
|
+ <image v-show="box.status==2" src="../../static/img/yellow.png" mode="" class="image"></image>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="box-name">
|
|
|
|
+ {{box.sn}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <!-- 机器详表 -->
|
|
|
|
+ <view class="">
|
|
|
|
+ <view v-if="merchantList.length>1">
|
|
|
|
+ <uni-collapse :accordion="true">
|
|
|
|
+ <view class="titleFlag">
|
|
|
|
+ <image class="img" src="../../static/img/red.png"></image>
|
|
|
|
+ <font class="wenziT">红色代表机器报警</font>
|
|
|
|
+ <image class="img" src="../../static/img/green.png"></image>
|
|
|
|
+ <font class="wenziT">绿色代表机器正常</font>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="titlelist" v-for="(merchant,index) in merchantList" :key="merchant.id">
|
|
|
|
+ <uni-collapse-item :title="getMerchantTitle(merchant)" :open="index===0">
|
|
|
|
+ <view style="padding: 20upx;background-color: aliceblue;">
|
|
|
|
+ <view v-if="merchant.equipmentList.length==0" style="text-align: center;">暂无数据</view>
|
|
|
|
+ <view v-if="merchant.equipmentList.length>0">
|
|
|
|
+ <uni-collapse :show-animation="true">
|
|
|
|
+ <view style="position: relative;" v-for="equipment in merchant.equipmentList" :key="equipment.id">
|
|
|
|
+ <span class="status-css" :class="equipment.hasTodayAlarm===true?statusError : statusNormal"></span>
|
|
|
|
+ <uni-collapse-item :title="getEquipmentTitle(equipment)">
|
|
|
|
+ <view style="padding: 20upx;background-color: #F8F8F8;">
|
|
|
|
+ <view class="swithBox" v-if="equipment.isSleep">
|
|
|
|
+ <view class="swichFont">睡眠状态:机器已睡眠</view>
|
|
|
|
+ <view class="switch">
|
|
|
|
+ <switch style="transform:scale(0.65)" checked @change="change(equipment.id,0)" />
|
|
</view>
|
|
</view>
|
|
- <view class="line1"></view>
|
|
|
|
- <view class="swithBox" v-if="equipment.eqeStatus==0">
|
|
|
|
- <view class="swichFont">关机:已关机</view>
|
|
|
|
- <view class="switch">
|
|
|
|
- <switch style="transform:scale(0.65)" checked @change="OnOff(equipment.id,1)" />
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="swithBox" v-else>
|
|
|
|
+ <view class="swichFont">睡眠状态:未睡眠</view>
|
|
|
|
+ <view class="switch">
|
|
|
|
+ <switch style="transform:scale(0.65)" :checked="sleepChecked" @change="change(equipment.id,1)" />
|
|
</view>
|
|
</view>
|
|
- <view class="swithBox" v-else>
|
|
|
|
- <view class="swichFont">关机:未关机</view>
|
|
|
|
- <view class="switch">
|
|
|
|
- <switch style="transform:scale(0.65)" :checked="onffChecked" @change="OnOff(equipment.id,0)" />
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="line1"></view>
|
|
|
|
+ <view class="swithBox" v-if="equipment.eqeStatus==0">
|
|
|
|
+ <view class="swichFont">关机:已关机</view>
|
|
|
|
+ <view class="switch">
|
|
|
|
+ <switch style="transform:scale(0.65)" checked @change="OnOff(equipment.id,1)" />
|
|
</view>
|
|
</view>
|
|
- <view class="line1"></view>
|
|
|
|
- <view><span>机器唯一码:</span><span>{{equipment.clientId}}</span></view>
|
|
|
|
- <!-- <view><span>所在地:</span><span>{{equipment.fullName?equipment.fullName:''}}</span></view> -->
|
|
|
|
- <view><span>清洁剂余量:</span><span>{{equipment.cleaner?equipment.cleaner:''}}</span></view>
|
|
|
|
- <view><span>消毒水余量:</span><span>{{equipment.disinfectant?equipment.disinfectant:''}}</span></view>
|
|
|
|
- <view><span>机器到期时间:</span><span>{{equipment.overdueDate?equipment.overdueDate:''}}</span></view>
|
|
|
|
- <view><span>机器剩余使用次数:</span><span>{{equipment.remaining?equipment.remaining:''}}</span></view>
|
|
|
|
- <view><span>机器温度:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span></view>
|
|
|
|
- <view><span>室内湿度:</span><span>{{equipment.cabinetHd?equipment.cabinetHd:''}}</span></view>
|
|
|
|
- <view><span>室内温度:</span><span>{{equipment.cabinetTm?equipment.cabinetTm:''}}</span></view>
|
|
|
|
- <view v-if="equipment.hasTodayAlarm">
|
|
|
|
- <view><span>报警内容:</span></view>
|
|
|
|
- <view v-for="(alarm,index) in equipment.alarmList" :key="index">
|
|
|
|
- <view><span class="baojing">{{alarm.occurrenceTime?alarm.occurrenceTime:''}} {{alarm.alarmContent}}</span></view>
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="swithBox" v-else>
|
|
|
|
+ <view class="swichFont">关机:未关机</view>
|
|
|
|
+ <view class="switch">
|
|
|
|
+ <switch style="transform:scale(0.65)" :checked="onffChecked" @change="OnOff(equipment.id,0)" />
|
|
</view>
|
|
</view>
|
|
- <view v-else>
|
|
|
|
- <view><span>报警内容:</span><span>{{equipment.occurrenceTime?equipment.occurrenceTime:''}}
|
|
|
|
- {{equipment.alarmContent}}</span></view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="line1"></view>
|
|
|
|
+ <view><span>机器唯一码:</span><span>{{equipment.clientId}}</span></view>
|
|
|
|
+ <!-- <view><span>所在地:</span><span>{{equipment.fullName?equipment.fullName:''}}</span></view> -->
|
|
|
|
+ <view><span>清洁剂余量:</span><span>{{equipment.cleaner?equipment.cleaner:''}}</span></view>
|
|
|
|
+ <view><span>消毒水余量:</span><span>{{equipment.disinfectant?equipment.disinfectant:''}}</span></view>
|
|
|
|
+ <view><span>机器到期时间:</span><span>{{equipment.overdueDate?equipment.overdueDate:''}}</span></view>
|
|
|
|
+ <view><span>机器剩余使用次数:</span><span>{{equipment.remaining?equipment.remaining:''}}</span></view>
|
|
|
|
+ <view><span>机器温度:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span></view>
|
|
|
|
+ <view><span>室内湿度:</span><span>{{equipment.cabinetHd?equipment.cabinetHd:''}}</span></view>
|
|
|
|
+ <view><span>室内温度:</span><span>{{equipment.cabinetTm?equipment.cabinetTm:''}}</span></view>
|
|
|
|
+ <view v-if="equipment.hasTodayAlarm">
|
|
|
|
+ <view><span>报警内容:</span></view>
|
|
|
|
+ <view v-for="(alarm,index) in equipment.alarmList" :key="index">
|
|
|
|
+ <view><span class="baojing">{{alarm.occurrenceTime?alarm.occurrenceTime:''}} {{alarm.alarmContent}}</span></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </uni-collapse-item>
|
|
|
|
- </view>
|
|
|
|
- </uni-collapse>
|
|
|
|
|
|
+ <view v-else>
|
|
|
|
+ <view><span>报警内容:</span><span>{{equipment.occurrenceTime?equipment.occurrenceTime:''}}
|
|
|
|
+ {{equipment.alarmContent}}</span></view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </uni-collapse-item>
|
|
|
|
+ </view>
|
|
|
|
+ </uni-collapse>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </uni-collapse-item>
|
|
|
|
+ </view>
|
|
|
|
+ </uni-collapse>
|
|
|
|
+ </view>
|
|
|
|
+ <view v-else>
|
|
|
|
+ <uni-collapse :show-animation="true">
|
|
|
|
+ <view class="titleFlag">
|
|
|
|
+ <image class="img" src="../../static/img/red.png"></image>
|
|
|
|
+ <font class="wenziT">{{$t('equipmentStatusList.red')}}</font>
|
|
|
|
+ <image class="img" src="../../static/img/green.png"></image>
|
|
|
|
+ <font class="wenziT">{{$t('equipmentStatusList.green')}}</font>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="titlelist" style="position: relative;" v-for="equipment in merchantList[0].equipmentList" :key="equipment.id">
|
|
|
|
+ <span class="status-css" :class="equipment.hasTodayAlarm===true?statusError : statusNormal"></span>
|
|
|
|
+ <uni-collapse-item :title="getEquipmentTitle(equipment)">
|
|
|
|
+ <!-- 睡眠 -->
|
|
|
|
+ <view style="padding: 20upx;background-color:#F8F8F8;">
|
|
|
|
+ <view class="swithBox" v-if="equipment.isSleep">
|
|
|
|
+ <view class="swichFont">{{$t('equipmentStatusList.sleep')}}</view>
|
|
|
|
+ <view class="switch">
|
|
|
|
+ <switch style="transform:scale(0.65)" checked @change="change(equipment.id,0)" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </uni-collapse-item>
|
|
|
|
- </view>
|
|
|
|
- </uni-collapse>
|
|
|
|
- </view>
|
|
|
|
- <view v-else>
|
|
|
|
- <uni-collapse :show-animation="true">
|
|
|
|
- <view class="titleFlag">
|
|
|
|
- <image class="img" src="../../static/img/red.png"></image>
|
|
|
|
- <font class="wenziT">{{$t('equipmentStatusList.red')}}</font>
|
|
|
|
- <image class="img" src="../../static/img/green.png"></image>
|
|
|
|
- <font class="wenziT">{{$t('equipmentStatusList.green')}}</font>
|
|
|
|
- </view>
|
|
|
|
- <view class="titlelist" style="position: relative;" v-for="equipment in merchantList[0].equipmentList" :key="equipment.id">
|
|
|
|
- <span class="status-css" :class="equipment.hasTodayAlarm===true?statusError : statusNormal"></span>
|
|
|
|
- <uni-collapse-item :title="getEquipmentTitle(equipment)">
|
|
|
|
- <!-- 睡眠 -->
|
|
|
|
- <view style="padding: 20upx;background-color:#F8F8F8;">
|
|
|
|
- <view class="swithBox" v-if="equipment.isSleep">
|
|
|
|
- <view class="swichFont">{{$t('equipmentStatusList.sleep')}}</view>
|
|
|
|
|
|
+ <view class="swithBox" v-else>
|
|
|
|
+ <view class="swichFont">{{$t('equipmentStatusList.unsleep')}}</view>
|
|
|
|
+ <view class="switch">
|
|
|
|
+ <switch style="transform:scale(0.65)" :checked="sleepChecked" @change="change(equipment.id,1)" />
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="line1"></view>
|
|
|
|
+ <!-- 关机 -->
|
|
|
|
+ <view class="" v-if="globalUser.open==0">
|
|
|
|
+ <view class="swithBox" v-if="equipment.eqeStatus==0">
|
|
|
|
+ <view class="swichFont">{{$t('equipmentStatusList.off')}}</view>
|
|
<view class="switch">
|
|
<view class="switch">
|
|
- <switch style="transform:scale(0.65)" checked @change="change(equipment.id,0)" />
|
|
|
|
|
|
+ <switch style="transform:scale(0.65)" checked @change="OnOff(equipment.id,1)" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="swithBox" v-else>
|
|
<view class="swithBox" v-else>
|
|
- <view class="swichFont">{{$t('equipmentStatusList.unsleep')}}</view>
|
|
|
|
|
|
+ <view class="swichFont">{{$t('equipmentStatusList.on')}}</view>
|
|
<view class="switch">
|
|
<view class="switch">
|
|
- <switch style="transform:scale(0.65)" :checked="sleepChecked" @change="change(equipment.id,1)" />
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="line1"></view>
|
|
|
|
- <!-- 关机 -->
|
|
|
|
- <view class="" v-if="globalUser.open==0">
|
|
|
|
- <view class="swithBox" v-if="equipment.eqeStatus==0">
|
|
|
|
- <view class="swichFont">{{$t('equipmentStatusList.off')}}</view>
|
|
|
|
- <view class="switch">
|
|
|
|
- <switch style="transform:scale(0.65)" checked @change="OnOff(equipment.id,1)" />
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="swithBox" v-else>
|
|
|
|
- <view class="swichFont">{{$t('equipmentStatusList.on')}}</view>
|
|
|
|
- <view class="switch">
|
|
|
|
- <switch style="transform:scale(0.65)" :checked="onffChecked" @change="OnOff(equipment.id,0)" />
|
|
|
|
- </view>
|
|
|
|
|
|
+ <switch style="transform:scale(0.65)" :checked="onffChecked" @change="OnOff(equipment.id,0)" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- <view class="line1"></view>
|
|
|
|
- <!-- 远程开门 -->
|
|
|
|
- <view class="opendoor"><span>{{$t('equipmentStatusList.door')}}:</span>
|
|
|
|
- <view class="">
|
|
|
|
- <button type="primary" @click="openDoor(equipment.id)" class="button">
|
|
|
|
- <p class="p">{{$t('equipmentStatusList.open')}}</p>
|
|
|
|
- </button>
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <view class="line1"></view>
|
|
|
|
+ <!-- 远程开门 -->
|
|
|
|
+ <view class="opendoor"><span>{{$t('equipmentStatusList.door')}}:</span>
|
|
|
|
+ <view class="">
|
|
|
|
+ <button type="primary" @click="openDoor(equipment.id)" class="button">
|
|
|
|
+ <p class="p">{{$t('equipmentStatusList.open')}}</p>
|
|
|
|
+ </button>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- <view><span>{{$t('equipmentStatusList.equipmentNo')}}:</span><span>{{equipment.clientId}}</span></view>
|
|
|
|
- <!-- <view><span>{{$t('equipmentStatusList.area')}}:</span><span>{{equipment.fullName?equipment.fullName:''}}</span></view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <view><span>{{$t('equipmentStatusList.equipmentNo')}}:</span><span>{{equipment.clientId}}</span></view>
|
|
|
|
+ <!-- <view><span>{{$t('equipmentStatusList.area')}}:</span><span>{{equipment.fullName?equipment.fullName:''}}</span></view>
|
|
-->
|
|
-->
|
|
- <view><span>清洁剂余量:</span><span>{{equipment.cleaner?equipment.cleaner:''}}</span></view>
|
|
|
|
- <view><span>消毒水余量:</span><span>{{equipment.disinfectant?equipment.disinfectant:''}}</span></view>
|
|
|
|
- <view><span>机器到期时间:</span><span>{{equipment.overdueDate?equipment.overdueDate:''}}</span></view>
|
|
|
|
- <view><span>机器剩余使用次数:</span><span>{{equipment.remaining?equipment.remaining:''}}</span></view>
|
|
|
|
- <view><span>{{$t('equipmentStatusList.temperature')}}:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span></view>
|
|
|
|
- <view><span>{{$t('equipmentStatusList.humidity')}}:</span><span>{{equipment.cabinetHd?equipment.cabinetHd:''}}</span></view>
|
|
|
|
- <view><span>{{$t('equipmentStatusList.equipmentTemperature')}}:</span><span>{{equipment.cabinetTm?equipment.cabinetTm:''}}</span></view>
|
|
|
|
- <view class="" v-if="equipment.hasTodayAlarm">
|
|
|
|
- <view><span>{{$t('equipmentStatusList.alarm')}}:</span></view>
|
|
|
|
- <view v-for="(alarm,index) in equipment.alarmList" :key="index">
|
|
|
|
- <view><span class="baojing">{{alarm.occurrenceTime?alarm.occurrenceTime:''}} {{alarm.alarmContent}}</span></view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="" v-else>
|
|
|
|
- <view><span>{{$t('equipmentStatusList.alarm')}}:</span><span>{{equipment.occurrenceTime?equipment.occurrenceTime:''}}
|
|
|
|
- {{equipment.alarmContent}}</span></view>
|
|
|
|
|
|
+ <view><span>清洁剂余量:</span><span>{{equipment.cleaner?equipment.cleaner:''}}</span></view>
|
|
|
|
+ <view><span>消毒水余量:</span><span>{{equipment.disinfectant?equipment.disinfectant:''}}</span></view>
|
|
|
|
+ <view><span>机器到期时间:</span><span>{{equipment.overdueDate?equipment.overdueDate:''}}</span></view>
|
|
|
|
+ <view><span>机器剩余使用次数:</span><span>{{equipment.remaining?equipment.remaining:''}}</span></view>
|
|
|
|
+ <view><span>{{$t('equipmentStatusList.temperature')}}:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span></view>
|
|
|
|
+ <view><span>{{$t('equipmentStatusList.humidity')}}:</span><span>{{equipment.cabinetHd?equipment.cabinetHd:''}}</span></view>
|
|
|
|
+ <view><span>{{$t('equipmentStatusList.equipmentTemperature')}}:</span><span>{{equipment.cabinetTm?equipment.cabinetTm:''}}</span></view>
|
|
|
|
+ <view class="" v-if="equipment.hasTodayAlarm">
|
|
|
|
+ <view><span>{{$t('equipmentStatusList.alarm')}}:</span></view>
|
|
|
|
+ <view v-for="(alarm,index) in equipment.alarmList" :key="index">
|
|
|
|
+ <view><span class="baojing">{{alarm.occurrenceTime?alarm.occurrenceTime:''}} {{alarm.alarmContent}}</span></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </uni-collapse-item>
|
|
|
|
- </view>
|
|
|
|
- </uni-collapse>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="" v-else>
|
|
|
|
+ <view><span>{{$t('equipmentStatusList.alarm')}}:</span><span>{{equipment.occurrenceTime?equipment.occurrenceTime:''}}
|
|
|
|
+ {{equipment.alarmContent}}</span></view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </uni-collapse-item>
|
|
|
|
+ </view>
|
|
|
|
+ </uni-collapse>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ </view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -284,7 +321,7 @@
|
|
uniCollapse,
|
|
uniCollapse,
|
|
uniCollapseItem,
|
|
uniCollapseItem,
|
|
uniList,
|
|
uniList,
|
|
- uniListItem,
|
|
|
|
|
|
+ uniListItem
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -300,11 +337,16 @@
|
|
yearRegularTimes: 0,
|
|
yearRegularTimes: 0,
|
|
today: '',
|
|
today: '',
|
|
week: '',
|
|
week: '',
|
|
-
|
|
|
|
|
|
+
|
|
globalUser: {},
|
|
globalUser: {},
|
|
merchantList: [{
|
|
merchantList: [{
|
|
equipmentList: []
|
|
equipmentList: []
|
|
}],
|
|
}],
|
|
|
|
+ index: 0,
|
|
|
|
+ equipmentName: null,
|
|
|
|
+ equipmentNameList: [],
|
|
|
|
+ boxs: [],
|
|
|
|
+ num:null,
|
|
extraIcon: {
|
|
extraIcon: {
|
|
color: '#4cd964',
|
|
color: '#4cd964',
|
|
size: '22',
|
|
size: '22',
|
|
@@ -316,12 +358,12 @@
|
|
onffChecked: null,
|
|
onffChecked: null,
|
|
time: null,
|
|
time: null,
|
|
timeAll: {
|
|
timeAll: {
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
// input: 0
|
|
// input: 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
computed: {
|
|
computed: {
|
|
...mapState(['loginUser']),
|
|
...mapState(['loginUser']),
|
|
pnameData: {
|
|
pnameData: {
|
|
@@ -341,7 +383,7 @@
|
|
var token = uni.getStorageSync("token");
|
|
var token = uni.getStorageSync("token");
|
|
if (token.toString().length > 1) {
|
|
if (token.toString().length > 1) {
|
|
this.init();
|
|
this.init();
|
|
-
|
|
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
uni.reLaunch({
|
|
uni.reLaunch({
|
|
url: '../Login/Login',
|
|
url: '../Login/Login',
|
|
@@ -375,7 +417,7 @@
|
|
this.equipmentStatus();
|
|
this.equipmentStatus();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...mapActions('chart', ['getStatistics', 'getMainStatistics', 'getMachineNum','getEquipmentListByUser']),
|
|
|
|
|
|
+ ...mapActions('chart', ['getStatistics', 'getMainStatistics', 'getMachineNum', 'getEquipmentListByUser']),
|
|
async init() {
|
|
async init() {
|
|
if (!this.pname) {
|
|
if (!this.pname) {
|
|
this.pname = this.loginUser.name;
|
|
this.pname = this.loginUser.name;
|
|
@@ -396,6 +438,12 @@
|
|
this.week = this.$t('mainStatistics.week' + date.getDay());
|
|
this.week = this.$t('mainStatistics.week' + date.getDay());
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ //改变机器
|
|
|
|
+ changeEquipment: function(e) {
|
|
|
|
+ this.index = e.target.value;
|
|
|
|
+ var list = uni.getStorageSync("listName");
|
|
|
|
+ this.getBoxs(list[e.target.value].id);
|
|
|
|
+ },
|
|
equipmentStatus() {
|
|
equipmentStatus() {
|
|
var id = uni.getStorageSync("globalUser").id;
|
|
var id = uni.getStorageSync("globalUser").id;
|
|
var token = uni.getStorageSync("token");
|
|
var token = uni.getStorageSync("token");
|
|
@@ -413,6 +461,22 @@
|
|
},
|
|
},
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ getBoxs(equipmentId) {
|
|
|
|
+ var token = uni.getStorageSync("token");
|
|
|
|
+ uni.request({
|
|
|
|
+ url: this.serverurl + '/TEquipment/getBoxs',
|
|
|
|
+ data: {
|
|
|
|
+ "equipmentId": equipmentId
|
|
|
|
+ },
|
|
|
|
+ header: {
|
|
|
|
+ 'token': token
|
|
|
|
+ },
|
|
|
|
+ method: "POST",
|
|
|
|
+ success: (res) => {
|
|
|
|
+ this.boxs = res.data.data;
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ },
|
|
getMainStatisticsData() {
|
|
getMainStatisticsData() {
|
|
const param = {};
|
|
const param = {};
|
|
if (this.adminId) { // 子组件,则拿传过来的参
|
|
if (this.adminId) { // 子组件,则拿传过来的参
|
|
@@ -454,44 +518,44 @@
|
|
.then(data => {
|
|
.then(data => {
|
|
for (let bean of data) {
|
|
for (let bean of data) {
|
|
if (bean['categorie'] === 'day') {
|
|
if (bean['categorie'] === 'day') {
|
|
- if(bean['randomTimes']!=null){
|
|
|
|
|
|
+ if (bean['randomTimes'] != null) {
|
|
this.dayRandomTimes = bean['randomTimes'];
|
|
this.dayRandomTimes = bean['randomTimes'];
|
|
}
|
|
}
|
|
- if(bean['regularTimes']!=null){
|
|
|
|
|
|
+ if (bean['regularTimes'] != null) {
|
|
this.dayRegularTimes = bean['regularTimes'];
|
|
this.dayRegularTimes = bean['regularTimes'];
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
if (bean['categorie'] === 'week') {
|
|
if (bean['categorie'] === 'week') {
|
|
- if(bean['randomTimes']!=null){
|
|
|
|
|
|
+ if (bean['randomTimes'] != null) {
|
|
this.weekRandomTimes = bean['randomTimes'];
|
|
this.weekRandomTimes = bean['randomTimes'];
|
|
}
|
|
}
|
|
- if(bean['regularTimes']!=null){
|
|
|
|
|
|
+ if (bean['regularTimes'] != null) {
|
|
this.weekRegularTimes = bean['regularTimes'];
|
|
this.weekRegularTimes = bean['regularTimes'];
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
if (bean['categorie'] === 'month') {
|
|
if (bean['categorie'] === 'month') {
|
|
- if(bean['randomTimes']!=null){
|
|
|
|
|
|
+ if (bean['randomTimes'] != null) {
|
|
this.monthRandomTimes = bean['randomTimes'];
|
|
this.monthRandomTimes = bean['randomTimes'];
|
|
}
|
|
}
|
|
- if(bean['regularTimes']!=null){
|
|
|
|
|
|
+ if (bean['regularTimes'] != null) {
|
|
this.monthRegularTimes = bean['regularTimes'];
|
|
this.monthRegularTimes = bean['regularTimes'];
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
if (bean['categorie'] === 'year') {
|
|
if (bean['categorie'] === 'year') {
|
|
- if(bean['randomTimes']!=null){
|
|
|
|
|
|
+ if (bean['randomTimes'] != null) {
|
|
this.yearRandomTimes = bean['randomTimes'];
|
|
this.yearRandomTimes = bean['randomTimes'];
|
|
}
|
|
}
|
|
- if(bean['regularTimes']!=null){
|
|
|
|
|
|
+ if (bean['regularTimes'] != null) {
|
|
this.yearRegularTimes = bean['regularTimes'];
|
|
this.yearRegularTimes = bean['regularTimes'];
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
uni.stopPullDownRefresh();
|
|
uni.stopPullDownRefresh();
|
|
@@ -509,14 +573,16 @@
|
|
.then(data => {
|
|
.then(data => {
|
|
this.merchantList = data;
|
|
this.merchantList = data;
|
|
var listName = data[0].equipmentList;
|
|
var listName = data[0].equipmentList;
|
|
|
|
+ var equipmentNameList = [];
|
|
|
|
+ for (var i = 0; i < listName.length; i++) {
|
|
|
|
+ equipmentNameList.push(listName[i].name);
|
|
|
|
+ if (i == 0) {
|
|
|
|
+ this.getBoxs(listName[i].id);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ this.equipmentNameList = equipmentNameList;
|
|
var times = new Map;
|
|
var times = new Map;
|
|
- // if (this.input == 1) {
|
|
|
|
- // for (var i = 0; i < listName.length; i++) {
|
|
|
|
- // var k = listName[i].id;
|
|
|
|
- // times.set(k, null);
|
|
|
|
- // }
|
|
|
|
- // this.timeAll = times;
|
|
|
|
- // }
|
|
|
|
var listId = data[0].id;
|
|
var listId = data[0].id;
|
|
if (listId != null && listId != '1') {
|
|
if (listId != null && listId != '1') {
|
|
uni.setStorageSync("listName", listName);
|
|
uni.setStorageSync("listName", listName);
|
|
@@ -560,8 +626,8 @@
|
|
"equipmentId": equipmentId
|
|
"equipmentId": equipmentId
|
|
},
|
|
},
|
|
method: "POST",
|
|
method: "POST",
|
|
- header:{
|
|
|
|
- 'token':token
|
|
|
|
|
|
+ header: {
|
|
|
|
+ 'token': token
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
var list = res.data.data;
|
|
var list = res.data.data;
|
|
@@ -577,8 +643,8 @@
|
|
content: that.$t('equipmentStatusList.tishi'),
|
|
content: that.$t('equipmentStatusList.tishi'),
|
|
success: function(res) {
|
|
success: function(res) {
|
|
that.getEquipmentListData();
|
|
that.getEquipmentListData();
|
|
- setTimeout(function () {
|
|
|
|
- that.network(id);
|
|
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ that.network(id);
|
|
}, 7000);
|
|
}, 7000);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -592,7 +658,7 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
});
|
|
});
|
|
} else if (res.cancel) {
|
|
} else if (res.cancel) {
|
|
@@ -613,8 +679,8 @@
|
|
"equipmentId": equipmentId
|
|
"equipmentId": equipmentId
|
|
},
|
|
},
|
|
method: "POST",
|
|
method: "POST",
|
|
- header:{
|
|
|
|
- 'token':token
|
|
|
|
|
|
+ header: {
|
|
|
|
+ 'token': token
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
// that.input = 2;
|
|
// that.input = 2;
|
|
@@ -630,8 +696,8 @@
|
|
content: that.$t('equipmentStatusList.tishi'),
|
|
content: that.$t('equipmentStatusList.tishi'),
|
|
success: function(res) {
|
|
success: function(res) {
|
|
that.getEquipmentListData();
|
|
that.getEquipmentListData();
|
|
- setTimeout(function () {
|
|
|
|
- that.network(id);
|
|
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ that.network(id);
|
|
}, 7000);
|
|
}, 7000);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -645,12 +711,12 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- network(id){
|
|
|
|
|
|
+ network(id) {
|
|
var token = uni.getStorageSync("token");
|
|
var token = uni.getStorageSync("token");
|
|
var equipmentId = id;
|
|
var equipmentId = id;
|
|
uni.request({
|
|
uni.request({
|
|
@@ -659,16 +725,16 @@
|
|
"equipmentId": id
|
|
"equipmentId": id
|
|
},
|
|
},
|
|
method: "POST",
|
|
method: "POST",
|
|
- header:{
|
|
|
|
- 'token':token
|
|
|
|
|
|
+ header: {
|
|
|
|
+ 'token': token
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
var data = res.data.data;
|
|
var data = res.data.data;
|
|
- if(data=='fail'){
|
|
|
|
|
|
+ if (data == 'fail') {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: this.$t('equipmentStatusList.network'),
|
|
|
|
- icon:'none',
|
|
|
|
- duration: 3000
|
|
|
|
|
|
+ title: this.$t('equipmentStatusList.network'),
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 3000
|
|
});
|
|
});
|
|
this.getEquipmentListData();
|
|
this.getEquipmentListData();
|
|
}
|
|
}
|
|
@@ -683,15 +749,15 @@
|
|
"equipmentId": id
|
|
"equipmentId": id
|
|
},
|
|
},
|
|
method: "POST",
|
|
method: "POST",
|
|
- header:{
|
|
|
|
- 'token':token
|
|
|
|
|
|
+ header: {
|
|
|
|
+ 'token': token
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: this.$t('equipmentStatusList.open'),
|
|
title: this.$t('equipmentStatusList.open'),
|
|
content: this.$t('equipmentStatusList.opensuccess'),
|
|
content: this.$t('equipmentStatusList.opensuccess'),
|
|
success: function(res) {
|
|
success: function(res) {
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -717,8 +783,8 @@
|
|
"equipmentId": equipmentId
|
|
"equipmentId": equipmentId
|
|
},
|
|
},
|
|
method: "POST",
|
|
method: "POST",
|
|
- header:{
|
|
|
|
- 'token':token
|
|
|
|
|
|
+ header: {
|
|
|
|
+ 'token': token
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
var list = res.data.data;
|
|
var list = res.data.data;
|
|
@@ -743,8 +809,8 @@
|
|
"equipmentId": equipmentId
|
|
"equipmentId": equipmentId
|
|
},
|
|
},
|
|
method: "POST",
|
|
method: "POST",
|
|
- header:{
|
|
|
|
- 'token':token
|
|
|
|
|
|
+ header: {
|
|
|
|
+ 'token': token
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
var list = res.data.data;
|
|
var list = res.data.data;
|
|
@@ -875,6 +941,7 @@
|
|
.fontLeft {
|
|
.fontLeft {
|
|
margin-right: 6upx;
|
|
margin-right: 6upx;
|
|
}
|
|
}
|
|
|
|
+
|
|
/* 参数表 */
|
|
/* 参数表 */
|
|
.status-css {
|
|
.status-css {
|
|
position: absolute;
|
|
position: absolute;
|
|
@@ -886,19 +953,19 @@
|
|
color: "#596D83";
|
|
color: "#596D83";
|
|
font-size: 12upx;
|
|
font-size: 12upx;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.status-error {
|
|
.status-error {
|
|
background-color: #dd524d
|
|
background-color: #dd524d
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.status-normal {
|
|
.status-normal {
|
|
background-color: #4cd964
|
|
background-color: #4cd964
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.baojing {
|
|
.baojing {
|
|
padding-left: 120upx;
|
|
padding-left: 120upx;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.titleFlag {
|
|
.titleFlag {
|
|
height: 56upx;
|
|
height: 56upx;
|
|
background-color: #F8F8F8;
|
|
background-color: #F8F8F8;
|
|
@@ -907,10 +974,10 @@
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.opendoor {
|
|
.opendoor {
|
|
/* #ifdef H5 */
|
|
/* #ifdef H5 */
|
|
-
|
|
|
|
|
|
+
|
|
/* #endif */
|
|
/* #endif */
|
|
padding-top: 10upx;
|
|
padding-top: 10upx;
|
|
padding-bottom: 10upx;
|
|
padding-bottom: 10upx;
|
|
@@ -918,22 +985,22 @@
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.button {
|
|
.button {
|
|
/* #ifdef H5 */
|
|
/* #ifdef H5 */
|
|
text-align: center;
|
|
text-align: center;
|
|
height: 50upx;
|
|
height: 50upx;
|
|
- weight:20upx ;
|
|
|
|
|
|
+ weight: 20upx;
|
|
/* #endif */
|
|
/* #endif */
|
|
padding-left: 15upx;
|
|
padding-left: 15upx;
|
|
/* padding-top: 2upx; */
|
|
/* padding-top: 2upx; */
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.p {
|
|
.p {
|
|
/* #ifdef H5 */
|
|
/* #ifdef H5 */
|
|
font-size: 28upx;
|
|
font-size: 28upx;
|
|
height: 50upx;
|
|
height: 50upx;
|
|
- weight:20upx ;
|
|
|
|
|
|
+ weight: 20upx;
|
|
transform: translateY(-14upx);
|
|
transform: translateY(-14upx);
|
|
/* text-align: center; */
|
|
/* text-align: center; */
|
|
/* #endif */
|
|
/* #endif */
|
|
@@ -941,45 +1008,72 @@
|
|
text-align: center;
|
|
text-align: center;
|
|
padding-left: 13upx;
|
|
padding-left: 13upx;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.img {
|
|
.img {
|
|
padding-top: 20upx;
|
|
padding-top: 20upx;
|
|
padding-left: 30upx;
|
|
padding-left: 30upx;
|
|
width: 15upx;
|
|
width: 15upx;
|
|
height: 15upx;
|
|
height: 15upx;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.wenziT {
|
|
.wenziT {
|
|
padding-top: 10upx;
|
|
padding-top: 10upx;
|
|
padding-left: 10upx;
|
|
padding-left: 10upx;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.titlelist {
|
|
.titlelist {
|
|
color: #363D44;
|
|
color: #363D44;
|
|
font-size: 16upx;
|
|
font-size: 16upx;
|
|
font-family: "PingFang-SC-Medium";
|
|
font-family: "PingFang-SC-Medium";
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.swithBox {
|
|
.swithBox {
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
padding-bottom: 15upx;
|
|
padding-bottom: 15upx;
|
|
padding-top: 5upx;
|
|
padding-top: 5upx;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.switch {
|
|
.switch {
|
|
width: 44upx;
|
|
width: 44upx;
|
|
height: 22upx;
|
|
height: 22upx;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.swichFont {
|
|
.swichFont {
|
|
width: 85%;
|
|
width: 85%;
|
|
padding-top: 12upx;
|
|
padding-top: 12upx;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.line1 {
|
|
.line1 {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 3upx;
|
|
height: 3upx;
|
|
background: #000000;
|
|
background: #000000;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .single-poster {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin-left: 20upx;
|
|
|
|
+ padding-top: 10upx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ /* height: 30upx; */
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .poster-wapper {
|
|
|
|
+ text-align: center;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ }
|
|
|
|
+ .image{
|
|
|
|
+ height: 30upx;
|
|
|
|
+ width: 30upx;
|
|
|
|
+ }
|
|
|
|
+ .box-name{
|
|
|
|
+ /* width: 200upx; */
|
|
|
|
+ /* margin-top: 10upx; */
|
|
|
|
+ font-size: 22upx;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|