wx-program
pangdundun 2024-03-16 16:32:55 +08:00
parent 25c8590dee
commit 5c67aa38c5
42 changed files with 122 additions and 66 deletions

View File

@ -58,14 +58,14 @@
</view>
</view>
<view class="bottom">
<view class="btn-1" :class="inputData['30'] == 1 || inputData['30'] == 3 ? 'in' : 'out'">
<image v-if="inputData['30'] == 1 || inputData['30'] == 3" src="../../static/in-sel.png"
<view class="btn-1" :class="left1Act[1] == 1 ? 'in' : 'out'">
<image v-if="left1Act[1] == 1" src="../../static/in-sel.png"
mode=""></image>
<image v-else src="../../static/in.png" mode=""></image>
<text>进水泵</text>
</view>
<view class="btn-2" :class="inputData['30'] == 2 || inputData['30'] == 3 ? 'in' : 'out'">
<image v-if="inputData['30'] == 2 || inputData['30'] == 3" src="../../static/out-sel.png"
<view class="btn-2" :class="left1Act[0] == 1 ? 'in' : 'out'">
<image v-if="left1Act[0] == 1" src="../../static/out-sel.png"
mode=""></image>
<image v-else src="../../static/out.png" mode=""></image>
<text>配肥泵</text>
@ -74,9 +74,11 @@
</view>
<view class="signal">
<view :class="right2Index.indexOf(index) != -1?'item_act':'item'" v-for="(item,index) in rightList2"
:key="index">
{{item}}
<view class="">
<view :class="right2Index.indexOf(index) != -1?'item_act':'item'" v-for="(item,index) in rightList2.slice(0, 4)" :key="index">{{item}}</view>
</view>
<view class="">
<view :class="right2Index.indexOf(index + 4) != -1?'item_act':'item'" v-for="(item,index) in rightList2.slice(4, 8)" :key="index">{{item}}</view>
</view>
</view>
@ -222,7 +224,7 @@
centerBottom: [],
right2Index: [],
openType: '',
left1Act: -1,
left1Act: [0,0],
topActive: 0,
indexs: 1,
@ -439,21 +441,24 @@
this.openType = this.getType29(typeNumber)
this.dataInfo2_list[3].timer = this.getType29(typeNumber)
var statusIndex = 8
let list=[]
for (var j = 0; j < statusIndex; j++) {
if (Number(number[number.length - 1 - j])) {
if (j == 0) {
this.right2Index.push(1)
list.push(1)
} else if (j == 1) {
this.right2Index.push(0)
list.push(0)
} else {
this.right2Index.push(j)
list.push(j)
}
}
}
this.right2Index = list
},
//
getData30() {
// var number = this.padString(this.inputData['30'].toString(2), 2)
var number = this.padString(this.inputData['30'].toString(2), 2)
this.left1Act = number
// if (this.inputData['30'].bit0 == 1) {
// this.left1Act = 1
// } else if (this.inputData['30'].bit1 == 1) {
@ -461,6 +466,17 @@
// } else {
// this.left1Act = 3
// }
// if (Number(number[0])) {
// this.left1Act = 1
// }
// if (Number(number[1])) {
// this.left1Act = 0
// }
// if (Number(number[0])&&Number(number[1])) {
// this.left1Act = 3
// }else {
// this.left1Act = -1
// }
},
changeData10(code, el) {
@ -892,12 +908,20 @@
border-radius: 20rpx;
margin-top: 15rpx;
display: flex;
flex-wrap: wrap;
align-content: space-between;
flex-direction: column;
align-items: center;
justify-content: space-between;
white-space: nowrap;
box-sizing: border-box;
padding: 20rpx 30rpx;
>view{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.item {
width: 140rpx;
height: 60rpx;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1557,7 +1557,7 @@ function initData(vueOptions, context) {
try {
data = data.call(context); // 支持 Vue.prototype 上挂的数据
} catch (e) {
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
}
}
@ -8934,7 +8934,7 @@ function type(obj) {
function flushCallbacks$1(vm) {
if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
var mpInstance = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
@ -8955,14 +8955,14 @@ function nextTick$1(vm, cb) {
//1.nextTick 之前 已 setData 且 setData 还未回调完成
//2.nextTick 之前存在 render watcher
if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:nextVueTick');
}
return nextTick(cb, vm)
}else{
if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance$1 = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
']:nextMPTick');
@ -9058,7 +9058,7 @@ var patch = function(oldVnode, vnode) {
});
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
if (Object.keys(diffData).length) {
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
']差量更新',
JSON.stringify(diffData));
@ -12674,7 +12674,7 @@ function _extends() {
var formatRegExp = /%[sdj%]/g;
var warning = function warning() {}; // don't print warning message when in production env or node runtime
if (typeof process !== 'undefined' && Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
if (typeof process !== 'undefined' && Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
warning = function warning(type, errors) {
if (typeof console !== 'undefined' && console.warn) {
if (errors.every(function (e) {

View File

@ -143,7 +143,7 @@ var render = function () {
var m1 = _vm.countData100(_vm.inputData["8"])
var m2 = _vm.countData100(_vm.inputData["7"])
var m3 = _vm.countData100(_vm.inputData["9"])
var l1 = _vm.__map(_vm.rightList2, function (item, index) {
var l1 = _vm.__map(_vm.rightList2.slice(0, 4), function (item, index) {
var $orig = _vm.__get_orig(item)
var g1 = _vm.right2Index.indexOf(index)
return {
@ -151,6 +151,14 @@ var render = function () {
g1: g1,
}
})
var l2 = _vm.__map(_vm.rightList2.slice(4, 8), function (item, index) {
var $orig = _vm.__get_orig(item)
var g2 = _vm.right2Index.indexOf(index + 4)
return {
$orig: $orig,
g2: g2,
}
})
_vm.$mp.data = Object.assign(
{},
{
@ -161,6 +169,7 @@ var render = function () {
m2: m2,
m3: m3,
l1: l1,
l2: l2,
},
}
)
@ -368,6 +377,8 @@ var _methods;
//
//
//
//
//
var _default = {
data: function data() {
return {
@ -413,7 +424,7 @@ var _default = {
centerBottom: [],
right2Index: [],
openType: '',
left1Act: -1,
left1Act: [0, 0],
topActive: 0,
indexs: 1,
inputData1: [],
@ -607,21 +618,24 @@ var _default = {
this.openType = this.getType29(typeNumber);
this.dataInfo2_list[3].timer = this.getType29(typeNumber);
var statusIndex = 8;
var list = [];
for (var j = 0; j < statusIndex; j++) {
if (Number(number[number.length - 1 - j])) {
if (j == 0) {
this.right2Index.push(1);
list.push(1);
} else if (j == 1) {
this.right2Index.push(0);
list.push(0);
} else {
this.right2Index.push(j);
list.push(j);
}
}
}
this.right2Index = list;
},
//进水泵和出水泵状态
getData30: function getData30() {
// var number = this.padString(this.inputData['30'].toString(2), 2)
var number = this.padString(this.inputData['30'].toString(2), 2);
this.left1Act = number;
// if (this.inputData['30'].bit0 == 1) {
// this.left1Act = 1
// } else if (this.inputData['30'].bit1 == 1) {
@ -629,6 +643,17 @@ var _default = {
// } else {
// this.left1Act = 3
// }
// if (Number(number[0])) {
// this.left1Act = 1
// }
// if (Number(number[1])) {
// this.left1Act = 0
// }
// if (Number(number[0])&&Number(number[1])) {
// this.left1Act = 3
// }else {
// this.left1Act = -1
// }
},
changeData10: function changeData10(code, el) {
var data = el.target.value * 10;

File diff suppressed because one or more lines are too long

View File

@ -229,12 +229,19 @@
border-radius: 20rpx;
margin-top: 15rpx;
display: flex;
flex-wrap: wrap;
align-content: space-between;
flex-direction: column;
align-items: center;
justify-content: space-between;
white-space: nowrap;
box-sizing: border-box;
padding: 20rpx 30rpx;
}
.fertilizer_machine .content .signal > view.data-v-04917a06 {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.fertilizer_machine .content .signal .item.data-v-04917a06 {
width: 140rpx;
height: 60rpx;