|
|
@@ -30,10 +30,13 @@
|
|
|
</view>
|
|
|
<view class="irrMode__content">
|
|
|
<view class="irrMode__content-header">
|
|
|
- <view class="irrMode__content-header-list" v-if="runTitle">
|
|
|
+ <view class="irrMode__content-header-list">
|
|
|
<view class="irrMode__content-header-title">
|
|
|
- <image class="header-item-icon" :src="rain" />
|
|
|
- {{ runTitle }}
|
|
|
+ <view class="irrMode__content-header-container">
|
|
|
+ <image class="header-item-icon" :src="rain" />
|
|
|
+ <text style="color:#333;font-size: 24rpx;margin-left: 10rpx">当前灌溉区域:</text>{{ runTitle }}
|
|
|
+ </view>
|
|
|
+ <view class="timer-text">{{ timer }}分</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="irrMode__content-item">
|
|
|
@@ -50,13 +53,13 @@
|
|
|
<view class="item-text">停止</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
<view class="irr-run-list">
|
|
|
<text v-for="(item, index) in selectAreaList" :key="index">
|
|
|
{{ item.group_name }}
|
|
|
<text v-if="index != selectAreaList.length - 1">、</text>
|
|
|
</text>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<Base :dataList="dataList" />
|
|
|
<facilitystate
|
|
|
@@ -149,7 +152,8 @@ export default {
|
|
|
workStatus: -1,
|
|
|
clearIrr: {},
|
|
|
selectAreaList: [],
|
|
|
- runTitle: '',
|
|
|
+ runTitle: '--',
|
|
|
+ timer:'--'
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
|
@@ -186,10 +190,36 @@ export default {
|
|
|
this.ws.close();
|
|
|
},
|
|
|
methods: {
|
|
|
+ isHaveTime(childrenList) {
|
|
|
+ let time = 0;
|
|
|
+ let currentKey = '';
|
|
|
+ let currentItem = {};
|
|
|
+ for (let i = 0; i < this.selectAreaList.length; i++) {
|
|
|
+ for (let key in this.selectAreaList[i]) {
|
|
|
+ if (key.includes(':Status')) {
|
|
|
+ currentKey = key;
|
|
|
+ currentItem = this.selectAreaList[i];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let i = 0; i < childrenList.length; i++) {
|
|
|
+ const item = childrenList[i];
|
|
|
+ if (item.sfCode === currentKey) {
|
|
|
+ for (let key in currentItem) {
|
|
|
+ if (key.includes(':PartTim')) {
|
|
|
+ time = currentItem[key];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return time;
|
|
|
+ },
|
|
|
isAutoRun(childrenList) {
|
|
|
for (let i = 0; i < childrenList.length; i++) {
|
|
|
const item = childrenList[i];
|
|
|
- if (item.value === 1) {
|
|
|
+ if (item.value == 1) {
|
|
|
return true
|
|
|
}
|
|
|
}
|
|
|
@@ -438,15 +468,18 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- this.runTitle = '';
|
|
|
+ this.runTitle = '--';
|
|
|
+ this.timer = '--';
|
|
|
if(this.runStatus == '1'){
|
|
|
- this.irrigatedAreaList.forEach((item) => {
|
|
|
- if (this.isAutoRun(item.childrenList)) {
|
|
|
- this.runTitle += item.sfDisplayname;
|
|
|
- }
|
|
|
- });
|
|
|
+ this.irrigatedAreaList.forEach((item) => {
|
|
|
+ if (this.isAutoRun(item.childrenList)) {
|
|
|
+ this.runTitle = item.sfDisplayname || item.sfName;
|
|
|
+ this.timer = this.isHaveTime(item.childrenList);
|
|
|
+ }
|
|
|
+ });
|
|
|
}else{
|
|
|
- this.runTitle = '';
|
|
|
+ this.runTitle = '--';
|
|
|
+ this.timer = '--';
|
|
|
}
|
|
|
},
|
|
|
async getdeviceSfStatus() {
|
|
|
@@ -485,10 +518,10 @@ uni-page-body {
|
|
|
.irrMode{
|
|
|
margin-top: 30rpx;
|
|
|
border-radius: 32rpx 32rpx 0 0;
|
|
|
- background: linear-gradient(180deg, #edfbfb 0%, #d2f2ed 100%);
|
|
|
margin-bottom: 30rpx;
|
|
|
padding: 32rpx;
|
|
|
border: 3rpx solid #FFF;
|
|
|
+ background: linear-gradient(180deg, #D3F3F2 0%, #FFF 41.06%);
|
|
|
.irrMode__header{
|
|
|
display: flex;
|
|
|
width:320rpx;
|
|
|
@@ -522,7 +555,7 @@ uni-page-body {
|
|
|
.irrMode__content{
|
|
|
margin-top: 24rpx;
|
|
|
border-radius: 16rpx;
|
|
|
- padding: 16rpx;
|
|
|
+ padding: 2rpx;
|
|
|
background: linear-gradient(180deg, #FFF 0%, #F5F6FA 100%);
|
|
|
.irrMode__content-header{
|
|
|
width: calc(100% - 32rpx);
|
|
|
@@ -543,11 +576,23 @@ uni-page-body {
|
|
|
font-weight: 500;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ width: 100%;
|
|
|
+ .irrMode__content-header-container{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
.header-item-icon{
|
|
|
width: 48rpx;
|
|
|
height: 48rpx;
|
|
|
}
|
|
|
+ .timer-text{
|
|
|
+ color: #0bbc58;
|
|
|
+ text-align: right;
|
|
|
+ font-family: "Source Han Sans CN VF";
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ }
|
|
|
}
|
|
|
.irrMode__content-header-desc{
|
|
|
color: #999999;
|