From 5ed27eef4f19a711c9680043fdaa0488ecf0d4df Mon Sep 17 00:00:00 2001 From: lld <15027638633@163.com> Date: Mon, 9 Mar 2026 23:01:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E9=94=AE=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E5=8D=B7=E8=86=9C=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/control/automatic.vue | 57 ++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/pages/home/control/automatic.vue b/pages/home/control/automatic.vue index 545f18c..33a0c84 100644 --- a/pages/home/control/automatic.vue +++ b/pages/home/control/automatic.vue @@ -55,11 +55,15 @@ :key="key"> - 参考温度:{{ termList[current]['config'].refTemp }} - + + 参考温度:{{ termList[current]['config'].refTemp }} + + + + + 参数设置弹窗 + - - 参数设置弹窗 @@ -105,7 +109,12 @@ - + + 一键同步卷膜所有配置 + 添加条件 @@ -783,7 +792,7 @@ export default { // --------------------共同逻辑------------------------------ // 添加条件更新窗口高度 updateSwiperHeight() { - if (this.termList[this.current]['terms'].length>3) { + if (this.termList[this.current]['terms'].length >= 3) { // 加上 param-setting 和 add-term 的高度,以及一些间距 this.swiperHeight = this.swiperHeight + 160; } @@ -791,11 +800,35 @@ export default { // 获取窗口高度 getSwiperHeight() { this.swiperHeight = 720; - var length = this.termList[this.current]['terms'].length-4; + var length = this.termList[this.current]['terms'].length-2; if (length>0) { this.swiperHeight = this.swiperHeight + 160*length ; } }, + // 一键复制卷膜所有配置到其他卷膜 + copyTerm() { + var temps = this.termList[this.current]['terms']; + var config = this.termList[this.current]['config']; + if (temps.length <= 0) return; + uni.showModal({ + title: '操作提示:', + content: '确定复制当前卷膜配置到其他卷膜?', + cancelText: '取消', + confirmText: '确定', + success: (res) => { + if (res.confirm) { + for (const [index,value] of this.filmRollerList.entries()) { + if (index === this.current) continue; + // this.termList[index]['terms'] = [ ...temps ]; + // this.termList[index]['config']= { ...config }; + this.termList[index]['terms'] = JSON.parse(JSON.stringify(temps)); + this.termList[index]['config']= JSON.parse(JSON.stringify(config)); + this.termList[index]['config'].roller = `jm${index+1}` + } + } + } + }) + }, // 添加条件方法 addTerm() { var temps = this.termList[this.current]['terms']; @@ -1302,18 +1335,22 @@ export default { //border-radius: 8px; //background-color: #fff; } +.copy-term { + margin: 0 10rpx; +} .param-setting { display: flex; align-items: center; font-size: 28rpx; color: #0a0a0a; - margin-top: 15rpx; + .tn-btn-class { + border-radius: 15rpx; + } .temp-dialog { - margin-left: 20rpx; + margin-left: 10rpx; } .param-dialog { margin-left: auto; /* 自动填充左侧空间,将按钮推到最右侧 */ - margin-right: 20rpx; } } .term-content {