增加一键复制卷膜配置
parent
835a054a8c
commit
5ed27eef4f
|
|
@ -55,11 +55,15 @@
|
|||
:key="key">
|
||||
<view >
|
||||
<view class="param-setting">
|
||||
<view class="temp-dialog" @click="showSelect=true">参考温度:{{ termList[current]['config'].refTemp }}
|
||||
<uni-icons type="down"/>
|
||||
<tn-button padding="0 20rpx" :plain="true" margin="10rpx 10rpx" @click="showSelect=true">
|
||||
参考温度:{{ termList[current]['config'].refTemp }}
|
||||
<uni-icons class="temp-dialog" type="down"/>
|
||||
</tn-button>
|
||||
<view @click="openParamDialog" class="param-dialog">
|
||||
<tn-button padding="0 20rpx" :plain="true" margin="10rpx 10rpx" >
|
||||
参数设置弹窗
|
||||
</tn-button>
|
||||
</view>
|
||||
<!-- <button class="cu-btn line-cyan round shadow" @click="showSelect=true">参考温度:{{ result }}</button>-->
|
||||
<text @click="openParamDialog" class="param-dialog">参数设置弹窗</text>
|
||||
</view>
|
||||
<!-- F8F7F8-->
|
||||
<view class="term-content">
|
||||
|
|
@ -105,7 +109,12 @@
|
|||
</uni-swipe-action-item>
|
||||
</uni-swipe-action>
|
||||
</view>
|
||||
|
||||
<view class="copy-term" v-if="termList[key]['terms'].length > 0">
|
||||
<tn-button @click="copyTerm"
|
||||
:shadow="true" width="100%" height="100rpx"
|
||||
backgroundColor="#01BEFF" fontColor="#FFFFFF"
|
||||
margin="10rpx 0">一键同步卷膜所有配置</tn-button>
|
||||
</view>
|
||||
<view class="add-term">
|
||||
<uni-icons color="var(--cyan)" type="plus" size="40" @click="addTerm"/>
|
||||
<text @click="addTerm">添加条件</text>
|
||||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue