|
|
@@ -61,17 +61,18 @@
|
|
|
<view class="control_item">
|
|
|
<image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
|
<view class="control_item_detail">
|
|
|
- <view class="control_item_left" @click="subTemperatureTime()">-</view>
|
|
|
<view class="control_item_center">
|
|
|
<view style="position: absolute">
|
|
|
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeTemperatureTime()" v-model="temperatureTime"></u-input>
|
|
|
+ <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="leftJianyaoTime"></u-input>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
|
|
|
- <view class="control_item_right" style="left: 70%;" @click="addTemperatureTime()">+</view>
|
|
|
+ <view class="control_item_right" style="left:75%;top:10rpx" @click="showBaozhuangDlg(3)">
|
|
|
+ <uni-icons type="gear-filled" size="20"></uni-icons>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="control_item_title">
|
|
|
- 时间设置
|
|
|
+ 文火时间倒计时
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -227,7 +228,7 @@
|
|
|
</view>
|
|
|
|
|
|
<u-popup :show="popDlg" @close="closePop" mode="center" bgColor="transparent" :closeable="true">
|
|
|
- <view style="position: relative;width: 400rpx;background: none">
|
|
|
+ <view style="position: relative;width: 500rpx;height:300rpx;background: none">
|
|
|
<view class="control_item" style="width: 100%" v-if="fengbianDlgShow">
|
|
|
<image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
|
<view class="control_item_detail">
|
|
|
@@ -235,7 +236,7 @@
|
|
|
<view class="control_item_center">
|
|
|
<u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeEdegTemperature" v-model="setEdegTemperature"></u-input>
|
|
|
</view>
|
|
|
- <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
|
|
|
+ <view class="control_item_center_unit" :style="unitFixedStyle1">℃</view>
|
|
|
<view class="control_item_right" @click="addEdegTemperature(1)">+</view>
|
|
|
</view>
|
|
|
<view class="control_item_title">
|
|
|
@@ -250,13 +251,28 @@
|
|
|
<view class="control_item_center">
|
|
|
<u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeSealingTemperature" v-model="setSealingTemperature"></u-input>
|
|
|
</view>
|
|
|
- <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
|
|
|
+ <view class="control_item_center_unit" :style="unitFixedStyle1">℃</view>
|
|
|
<view class="control_item_right" @click="addSealingTemperature(1)">+</view>
|
|
|
</view>
|
|
|
<view class="control_item_title">
|
|
|
封口温度设置
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <view class="control_item" style="width: 100%" v-if="wenhuoTimeDlgShow">
|
|
|
+ <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
|
+ <view class="control_item_detail">
|
|
|
+ <view class="control_item_left" @click="subTemperatureTime()">-</view>
|
|
|
+ <view class="control_item_center">
|
|
|
+ <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeTemperatureTime()" v-model="temperatureTime"></u-input>
|
|
|
+ </view>
|
|
|
+ <view class="control_item_center_unit" :style="unitFixedStyle1">℃</view>
|
|
|
+ <view class="control_item_right" @click="addTemperatureTime()">+</view>
|
|
|
+ </view>
|
|
|
+ <view class="control_item_title">
|
|
|
+ 文火时间
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
|
|
|
@@ -331,7 +347,7 @@
|
|
|
<image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
|
<view class="control_item_detail">
|
|
|
<view class="control_item_center">
|
|
|
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" :value="leftAppointmentTime"></u-input>
|
|
|
+ <u-input customStyle="width:150rpx;border:0px;padding:0px" disabledColor="white" :value="leftAppointmentTime"></u-input>
|
|
|
</view>
|
|
|
<view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
|
|
|
</view>
|
|
|
@@ -348,11 +364,20 @@
|
|
|
<view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
|
|
|
<view class="control_item" style="width: 100%">
|
|
|
<image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
|
- <view class="control_item_detail" style="width: 100%; padding: 40rpx;">
|
|
|
+ <view class="control_item_detail" style="width: 100%; padding: 40rpx;margin-bottom:10rpx;">
|
|
|
<u-line-progress :percentage="step" activeColor="#50ACFF"></u-line-progress>
|
|
|
</view>
|
|
|
- <view class="control_item_title">
|
|
|
- 正在煎药,请稍等
|
|
|
+ <view class="control_item_title" v-if="leftAppointmentTime>0">
|
|
|
+ 预约煎药中,倒计时{{leftAppointmentTime}}分钟
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="control_item_title" v-else>
|
|
|
+ <view v-if="leftJianyaoTime>0">
|
|
|
+ 正在熬制,请稍等
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ 煎药完成
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="control_item" style="width: 100%">
|
|
|
@@ -372,12 +397,12 @@
|
|
|
<image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
|
<view class="control_item_detail">
|
|
|
<view class="control_item_center">
|
|
|
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" :value="hightTemperature"></u-input>
|
|
|
+ <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" :value="leftJianyaoTime"></u-input>
|
|
|
</view>
|
|
|
<view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
|
|
|
</view>
|
|
|
<view class="control_item_title">
|
|
|
- 高温时间
|
|
|
+ 文火倒计时
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- <view>-->
|
|
|
@@ -536,9 +561,12 @@ export default {
|
|
|
{id:1,text:"微压循环"},
|
|
|
{id:2,text:"常温二煎的一煎"},
|
|
|
{id:3,text:"常温二煎的二煎"},
|
|
|
+ {id:3,text:"密闭微压"},
|
|
|
+ {id:3,text:"常温常压"},
|
|
|
]],
|
|
|
showModelPicker:false,
|
|
|
unitFixedStyle:"",
|
|
|
+ unitFixedStyle1:"",
|
|
|
planTime:10,
|
|
|
setSealingTemperature:160,
|
|
|
setEdegTemperature:160,
|
|
|
@@ -546,7 +574,7 @@ export default {
|
|
|
edegTemperature:0,
|
|
|
hightTemperature:0,
|
|
|
currentTemperature:0,
|
|
|
- temperatureTime:0,
|
|
|
+ temperatureTime:1,
|
|
|
temperature:0,
|
|
|
packageNumber:0,
|
|
|
packageVolume:50,
|
|
|
@@ -615,6 +643,7 @@ export default {
|
|
|
popDlg:false,
|
|
|
fengbianDlgShow:false,
|
|
|
fengkouDlgShow:false,
|
|
|
+ wenhuoTimeDlgShow:false,
|
|
|
planPopDlg:false,
|
|
|
planIngPopDlg:false,
|
|
|
maxWidth:320,
|
|
|
@@ -624,6 +653,7 @@ export default {
|
|
|
step:0,
|
|
|
yuyueIngPop:false,
|
|
|
firmware:{},
|
|
|
+ jianyaoPopClose:true,
|
|
|
}
|
|
|
},
|
|
|
onLoad: function(opt) {
|
|
|
@@ -738,15 +768,17 @@ export default {
|
|
|
console.log(windowWidth, windowHeight, statusBarHeight);
|
|
|
if(windowWidth<=350){
|
|
|
self.unitFixedStyle = ";padding-top:6px;left: 28vw;";
|
|
|
+ self.unitFixedStyle1 = ";padding-top:6px;left: 28vw;";
|
|
|
}else if(windowWidth>=360){
|
|
|
- self.unitFixedStyle = ";padding-top:3px;";
|
|
|
-
|
|
|
+ self.unitFixedStyle = ";padding-top:10rpx;";
|
|
|
+ self.unitFixedStyle1 = ";padding-top:10rpx;left: 32vw;";
|
|
|
}
|
|
|
self.maxWidth = windowWidth;
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
closePlanIngPop(){
|
|
|
+ this.jianyaoPopClose = false;
|
|
|
this.planIngPopDlg = false;
|
|
|
},
|
|
|
closePlanPop(){
|
|
|
@@ -756,14 +788,17 @@ export default {
|
|
|
this.popDlg = true;
|
|
|
if(type == 1){
|
|
|
this.fengbianDlgShow = true;
|
|
|
- }else{
|
|
|
+ }else if(type == 2){
|
|
|
this.fengkouDlgShow = true;
|
|
|
+ }else if(type == 3){
|
|
|
+ this.wenhuoTimeDlgShow = true;
|
|
|
}
|
|
|
},
|
|
|
closePop(){
|
|
|
this.popDlg = false;
|
|
|
this.fengbianDlgShow = false;
|
|
|
this.fengkouDlgShow = false;
|
|
|
+ this.wenhuoTimeDlgShow = false;
|
|
|
},
|
|
|
changeTab(item){
|
|
|
let summary = this.summary;
|
|
|
@@ -894,29 +929,40 @@ export default {
|
|
|
obj.id = "AppointmentTime";
|
|
|
obj.shadow = 0;
|
|
|
arr.push(obj);
|
|
|
+ let self = this;
|
|
|
+ self.kongzhiJianyao(false,arr);
|
|
|
this.mqttPublish(2,this.deviceInfo,arr,true);
|
|
|
this.closeYuyueIngPop();
|
|
|
+
|
|
|
},
|
|
|
toPlan(){
|
|
|
if(!this.jianyaoOpen()){
|
|
|
this.$modal.showToast('煎药机已经关机')
|
|
|
return;
|
|
|
}
|
|
|
- if(this.jianyaoIng()){
|
|
|
- this.$modal.showToast('正在煎药')
|
|
|
- return;
|
|
|
- }
|
|
|
if(this.leftAppointmentTime>0){
|
|
|
this.yuyueIngPop = true;
|
|
|
}else{
|
|
|
+ if(this.jianyaoIng()){
|
|
|
+ this.$modal.showToast('正在煎药')
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.planPopDlg = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
calcuStep(){
|
|
|
+ if(this.leftAppointmentTime>0){
|
|
|
+ this.step = 0;
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ if(this.leftJianyaoTime == 0){
|
|
|
+ this.step = 100;
|
|
|
+ return ;
|
|
|
+ }
|
|
|
let currentTemperature = this.currentTemperature;
|
|
|
- let hightTemperature = this.hightTemperature;//设置的高温时间
|
|
|
+ let hightTemperature = this.temperatureTime-this.leftJianyaoTime;//设置的高温时间
|
|
|
let targetTemperature =100;// this.temperature;
|
|
|
let targetTemperatureTime = this.temperatureTime;//倒计时
|
|
|
if(targetTemperature>100){
|
|
|
@@ -925,7 +971,7 @@ export default {
|
|
|
let step = 0;
|
|
|
if(currentTemperature<100){
|
|
|
let tem = currentTemperature/200*100;
|
|
|
- step = tem.toFixed(2);
|
|
|
+ step = tem;
|
|
|
}else{
|
|
|
step = 50;
|
|
|
let rate = hightTemperature/targetTemperatureTime;
|
|
|
@@ -951,6 +997,7 @@ export default {
|
|
|
obj.id = "AppointmentTime";
|
|
|
obj.shadow = this.planTime;
|
|
|
arr.push(obj);
|
|
|
+ this.kongzhiJianyao(true,arr);
|
|
|
this.mqttPublish(2,this.deviceInfo,arr,true);
|
|
|
}
|
|
|
this.$modal.showToast('预约成功')
|
|
|
@@ -1107,6 +1154,9 @@ export default {
|
|
|
subTemperatureTime(){
|
|
|
console.log("减少煎药时间")
|
|
|
this.temperatureTime--;
|
|
|
+ if(this.temperatureTime<=0){
|
|
|
+ this.temperatureTime = 1;
|
|
|
+ }
|
|
|
this.changeTemperatureTime()
|
|
|
},
|
|
|
addTemperature(){
|
|
|
@@ -1217,6 +1267,23 @@ export default {
|
|
|
arr.push(obj);
|
|
|
this.mqttPublish(2,this.deviceInfo,arr,true)
|
|
|
},
|
|
|
+ kongzhiJianyao(flag,arr){//不判断煎药状态
|
|
|
+ let obj = {};
|
|
|
+ if(!this.decoctControlOnOffStatus){
|
|
|
+ this.notifyError("请先开机后再进行操作")
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ obj.id = "DecoctingSwitch";
|
|
|
+ if(flag){
|
|
|
+ obj.shadow = 1;
|
|
|
+ console.log("煎药状态打开")
|
|
|
+ this.checkJianyao();
|
|
|
+ }else{
|
|
|
+ obj.shadow = 0;
|
|
|
+ console.log("煎药状态关闭")
|
|
|
+ }
|
|
|
+ arr.push(obj);
|
|
|
+ },
|
|
|
stopDecoctControlChange(){
|
|
|
let obj = {};
|
|
|
let arr = [];
|
|
|
@@ -1237,6 +1304,10 @@ export default {
|
|
|
console.log("煎药状态关闭")
|
|
|
}
|
|
|
arr.push(obj);
|
|
|
+ let obj2 = {};
|
|
|
+ obj2.id = "AppointmentTime";
|
|
|
+ obj2.shadow = 0;
|
|
|
+ arr.push(obj2);
|
|
|
this.mqttPublish(2,this.deviceInfo,arr,true)
|
|
|
},
|
|
|
decoctControlOnOffChange(){
|
|
|
@@ -1650,7 +1721,7 @@ export default {
|
|
|
self.temperature = value;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ this.setPropValue(id,"SlowfireTiem","leftJianyaoTime",value,0)
|
|
|
this.setPropValue(id,"HighTempTime","hightTemperature",value,0)
|
|
|
this.setPropValue(id,"CurrentTemp","currentTemperature",value,0)
|
|
|
this.setPropValue(id,"CalibrationTemp","jiaozhunTemp",value,0)
|
|
|
@@ -1855,18 +1926,24 @@ export default {
|
|
|
}
|
|
|
this.parseEnumList();
|
|
|
this.checkJianyao();
|
|
|
+ if(this.planIngPopDlg){
|
|
|
+ this.calcuStep();
|
|
|
+ }
|
|
|
}
|
|
|
this.$forceUpdate();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
checkJianyao(){
|
|
|
- let self = this;
|
|
|
- setTimeout(function(){
|
|
|
- if(self.decoctControlStatus){
|
|
|
- self.showJianyao();
|
|
|
- }
|
|
|
- },1000);
|
|
|
+ // if(!this.jianyaoPopClose){
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // let self = this;
|
|
|
+ // setTimeout(function(){
|
|
|
+ // if(self.decoctControlStatus){
|
|
|
+ // self.showJianyao();
|
|
|
+ // }
|
|
|
+ // },1000);
|
|
|
},
|
|
|
exchangeData(msgId,obj){
|
|
|
if(msgId === "TempSetting"){
|
|
|
@@ -1984,7 +2061,7 @@ export default {
|
|
|
|
|
|
if(this.firstTab){
|
|
|
let isKaijiKey = false;
|
|
|
- if(modelList.length == 1){
|
|
|
+ if(modelList.length >0){
|
|
|
let modelData = modelList[0];
|
|
|
let curKeyId = modelData.id;
|
|
|
if(!this.decoctControlOnOffStatus){
|
|
|
@@ -2007,7 +2084,7 @@ export default {
|
|
|
}
|
|
|
}else{
|
|
|
let isKaijiKey = false;
|
|
|
- if(modelList.length == 1){
|
|
|
+ if(modelList.length >0){
|
|
|
let modelData = modelList[0];
|
|
|
let curKeyId = modelData.id;
|
|
|
if(!this.packageControlOnOffStatus){
|
|
|
@@ -2261,7 +2338,7 @@ uni-col{
|
|
|
.prop-item-right{
|
|
|
position: absolute;
|
|
|
right:10rpx;
|
|
|
- top:10rpx;
|
|
|
+ top:5rpx;
|
|
|
}
|
|
|
input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{
|
|
|
color:#666;
|
|
|
@@ -2463,14 +2540,14 @@ input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{
|
|
|
}
|
|
|
.control_item_detail{
|
|
|
position: relative;
|
|
|
- top:25rpx;
|
|
|
+ top:22rpx;
|
|
|
}
|
|
|
.control_item_left{
|
|
|
position:absolute;;
|
|
|
- left:25%;
|
|
|
+ left:22%;
|
|
|
font-size: 55px;
|
|
|
z-index: 999;
|
|
|
- top:-34rpx
|
|
|
+ top:-30rpx
|
|
|
|
|
|
}
|
|
|
.control_item_center{
|