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

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

View File

@ -143,7 +143,7 @@ var render = function () {
var m1 = _vm.countData100(_vm.inputData["8"]) var m1 = _vm.countData100(_vm.inputData["8"])
var m2 = _vm.countData100(_vm.inputData["7"]) var m2 = _vm.countData100(_vm.inputData["7"])
var m3 = _vm.countData100(_vm.inputData["9"]) 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 $orig = _vm.__get_orig(item)
var g1 = _vm.right2Index.indexOf(index) var g1 = _vm.right2Index.indexOf(index)
return { return {
@ -151,6 +151,14 @@ var render = function () {
g1: g1, 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( _vm.$mp.data = Object.assign(
{}, {},
{ {
@ -161,6 +169,7 @@ var render = function () {
m2: m2, m2: m2,
m3: m3, m3: m3,
l1: l1, l1: l1,
l2: l2,
}, },
} }
) )
@ -368,6 +377,8 @@ var _methods;
// //
// //
// //
//
//
var _default = { var _default = {
data: function data() { data: function data() {
return { return {
@ -413,7 +424,7 @@ var _default = {
centerBottom: [], centerBottom: [],
right2Index: [], right2Index: [],
openType: '', openType: '',
left1Act: -1, left1Act: [0, 0],
topActive: 0, topActive: 0,
indexs: 1, indexs: 1,
inputData1: [], inputData1: [],
@ -607,21 +618,24 @@ var _default = {
this.openType = this.getType29(typeNumber); this.openType = this.getType29(typeNumber);
this.dataInfo2_list[3].timer = this.getType29(typeNumber); this.dataInfo2_list[3].timer = this.getType29(typeNumber);
var statusIndex = 8; var statusIndex = 8;
var list = [];
for (var j = 0; j < statusIndex; j++) { for (var j = 0; j < statusIndex; j++) {
if (Number(number[number.length - 1 - j])) { if (Number(number[number.length - 1 - j])) {
if (j == 0) { if (j == 0) {
this.right2Index.push(1); list.push(1);
} else if (j == 1) { } else if (j == 1) {
this.right2Index.push(0); list.push(0);
} else { } else {
this.right2Index.push(j); list.push(j);
} }
} }
} }
this.right2Index = list;
}, },
//进水泵和出水泵状态 //进水泵和出水泵状态
getData30: function getData30() { 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) { // if (this.inputData['30'].bit0 == 1) {
// this.left1Act = 1 // this.left1Act = 1
// } else if (this.inputData['30'].bit1 == 1) { // } else if (this.inputData['30'].bit1 == 1) {
@ -629,6 +643,17 @@ var _default = {
// } else { // } else {
// this.left1Act = 3 // 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) { changeData10: function changeData10(code, el) {
var data = el.target.value * 10; 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; border-radius: 20rpx;
margin-top: 15rpx; margin-top: 15rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-direction: column;
align-content: space-between; align-items: center;
justify-content: space-between; justify-content: space-between;
white-space: nowrap;
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx 30rpx; 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 { .fertilizer_machine .content .signal .item.data-v-04917a06 {
width: 140rpx; width: 140rpx;
height: 60rpx; height: 60rpx;