删除无用方法和css

feasure
lld 2026-02-25 13:18:41 +08:00
parent 1732901bf9
commit 0ecae4ec9e
1 changed files with 44 additions and 65 deletions

View File

@ -135,6 +135,36 @@
</view>
</view>
</uni-popup>
<uni-popup ref="inputDialog" mode="center">
<!-- 新增修改运行时间的弹窗 -->
<view class="modal-container">
<view class="modal-title">{{ `${selectedText} - ${currentCard.name}】设置` }}</view>
<view class="modal-input-wrap">
<text class="modal-label">当前时间</text>
<text class="modal-current">{{ currentCardTime > 0 ? `${currentCardTime}` : '未设置' }}</text>
</view>
<view class="modal-input-wrap">
<text class="modal-label">修改后时间</text>
<input
class="modal-input"
type="number"
v-model.number="newLimitTime"
/>
<!-- <uni-number-box v-model="newLimitTime" />-->
<text class="modal-unit"></text>
</view>
<view class="modal-input-wrap">
<text class="modal-label">别名设置</text>
<uni-easyinput style="width: 100px" v-model="remark" placeholder="不填展示默认备注"/>
</view>
<view class="modal-btn-wrap">
<button class="modal-btn cancel" @click="close"></button>
<button class="modal-btn confirm" @click="confirmModifyTime"></button>
</view>
</view>
</uni-popup>
</view>
</template>
@ -303,16 +333,20 @@ export default {
},
methods: {
//
change(e) {
this.current =e.detail.current
},
//
switchTab(e) {
this.current=e.index
},
//
confirmTemp(event) {
this.result = event[0]['label']
console.info(`选择温度:${event[0]['label']}`)
},
//
refresh() {
this.termList = {
"jm1": [],
@ -324,24 +358,7 @@ export default {
this.getSwiperHeight(); //
});
},
openDataModal(sensorCard) {
if ((store.getters && store.getters.name !== 'admin')
&& this.$auth.hasRole("test")) {
return;
}
this.sensorCard = sensorCard;
this.remark = this.dtu_remark[sensorCard.key] || sensorCard.label;
},
// 湿
isEffectiveValue(value) {
return this.testNumber(value);
},
testNumber(data) {
const reg = /^-?\d+(\.\d+)?$/;
return reg.test(String(data).trim());
},
//
//
openTimeModal(card) {
if ((store.getters && store.getters.name !== 'admin')
&& this.$auth.hasRole("test")) {
@ -353,7 +370,7 @@ export default {
this.remark = this.dtu_remark[card.type] || card.name;
this.$refs.inputDialog.open()
},
//
//
handleCardClick(status, type) {
const funcMsg = "该功能用来开启或暂停设备,按钮亮为开启,按钮暗为暂停设备"
if ((store.getters && store.getters.name !== 'admin')
@ -414,6 +431,7 @@ export default {
}
})
},
//
close() {
this.$refs.inputDialog.close()
},
@ -490,7 +508,7 @@ export default {
: await addLimit(limitTimes);
if (limitRes.code === 200) {
isAllSuccess = true;
this.getAgriByImei();
this.$emit("getAgriLimit")
}
}
@ -523,23 +541,14 @@ export default {
}
});
},
getAgriByImei() {
getAgriByImei(this.imei).then(response => {
if (response.code === 200) {
if (!response.data) {
return;
}
this.limitTimes = response.data;
}
})
},
//
updateSwiperHeight() {
if (this.termList[this.term[this.current]].length>4) {
// param-setting add-term
this.swiperHeight = this.swiperHeight + 160;
}
},
//
getSwiperHeight() {
this.swiperHeight = 800;
var length = this.termList[this.term[this.current]].length-4;
@ -547,6 +556,7 @@ export default {
this.swiperHeight = this.swiperHeight + 160*length ;
}
},
//
addTerm() {
var tempList = this.termList[this.term[this.current]];
if (tempList.length >= this.maxTermLength) {
@ -572,6 +582,7 @@ export default {
// value/
return `${value}${unit}`;
},
//
onDeleteItem(event, id) {
const currentKey = this.term[this.current];
const tempList = this.termList[currentKey];
@ -593,13 +604,14 @@ export default {
});
});
},
//
changeTime(timeTag, timeIndex) {
this.timeTag = timeTag;
this.timeIndex = timeIndex;
this.selectTime = true;
},
//
confirmTime(time) {
console.info(this.termList[this.term[this.current]])
this.termList[this.term[this.current]][this.timeIndex][this.timeTag] = `${time.hour}:${time.minute}`
},
}
@ -691,26 +703,6 @@ export default {
padding-bottom: 15rpx;
}
.text {
width: 50rpx;
margin: 10rpx 10rpx 8rpx 0;
padding: 0;
height: 70rpx;
line-height: 70rpx;
text-align: center;
font-size: 26rpx;
box-shadow: 0 2rpx 8rpx #bfbec1
}
.tempStyle, .humiStyle {
display: inline-block;
font-size: 12px;
}
.text:first-child {
margin-left: 10rpx;
}
.uni-view {
-webkit-flex: 1;
flex: 1;
@ -721,19 +713,6 @@ export default {
align-items: center;
}
.data {
font-size: 13px;
display: inline-block;
line-height: 23px;
color: #3a3a3a;
}
.data:nth-child(even) {
font-size: 12px;
margin-top: 3px;
color: #9c9c9c;
}
/deep/ .uni-section-header__slot-right {
color: green;
}