功能细节调整

This commit is contained in:
fengerli
2025-07-16 09:42:51 +08:00
parent 4a4d7dbc73
commit f3a3778452
4 changed files with 26 additions and 9 deletions

View File

@ -61,7 +61,7 @@
</view>
<!-- 删除弹框 -->
<view class="agreement-mask" v-if="deleteShow" @click="closePopup('delete')">
<view class="agreement-popupC">
<view class="agreement-popupC" @click.stop>
<view class="popup-content">
<image src="/static/images/dell.png" mode="" class="svg"></image>
<uni-icon class="trash"></uni-icon>
@ -77,12 +77,13 @@
</view>
<!-- =========重命名============== -->
<view class="agreement-mask" v-if="RenameModel" @click="closePopup('rename')">
<view class="agreement-popupD">
<view class="agreement-popupD" @click.stop>
<view class="popup-content">
<view>
<view class="popup-flex">
<text>设备名称</text>
<input type="text" v-model="deviceName" placeholder="请输入设备名称" class="popup-input" />
<input type="text" v-model="deviceName" placeholder="请输入设备名称" class="popup-input"
@click.stop />
</view>
</view>
</view>
@ -166,8 +167,10 @@
closePopup(type) {
if (type === 'delete') {
this.deleteShow = false;
uni.showTabBar(); // 显示TabBar
} else if (type === 'rename') {
this.RenameModel = false;
uni.showTabBar(); // 显示TabBar
}
},
// tab导航切换栏
@ -265,10 +268,11 @@
},
// 右滑点击事件处理
handleSwipeClick(e, item, index) {
const {
content
} = e
console.log(e, 'eeeee');
console.log(item, 'eeeee');
switch (e.content.text) {
case '删除':
this.handleDeleteDevice(item, index)
@ -301,6 +305,8 @@
this.onIntall();
}, 500);
this.deleteShow = false
// 关闭所有滑动项
this.$refs.swipeAction.closeAll();
} else {
uni.showToast({
title: res.msg,
@ -334,6 +340,8 @@
}, 500);
this.RenameModel = false
this.deviceName = ''
// 关闭所有滑动项
this.$refs.swipeAction.closeAll();
} else {
uni.showToast({
title: res.msg,

View File

@ -139,7 +139,7 @@
// 获取图片列表
callOtherApi() {
let data = {
deviceId: this.deviceID,
businessId: this.deviceID,
fileType: '1' //文件类型(1:操作说明2:产品参数)
}
fileInfo(data).then((res) => {

View File

@ -4,7 +4,7 @@
<custom-navbar title="操作视频" :showBack="true" backgroundColor="#202020" color="#FFFFFF"></custom-navbar>
<view class="device-page" :style="{ paddingTop: navBarHeight + 'px' }">
<scroll-view scroll-y>
<uni-swipe-action>
<uni-swipe-action ref="swipeAction">
<block v-for="(item, index) in videoList" :key="index">
<uni-swipe-action-item :right-options="item.showConfirm ? confirmOptions : deleteOptions"
@click="handleSwipeClick($event, index,item)" class="content">
@ -96,6 +96,8 @@
icon: 'success'
});
this.getData()
// 关闭所有滑动项
this.$refs.swipeAction.closeAll();
} else {
uni.showToast({
title: res.msg,
@ -164,6 +166,13 @@
},
onShow() {
this.getData()
// 关闭所有滑动项
// 使用$nextTick确保组件已渲染
this.$nextTick(() => {
if (this.$refs.swipeAction) {
this.$refs.swipeAction.closeAll();
}
});
},
onLoad(options) {
this.deviceID = options.id

View File

@ -139,7 +139,7 @@
// 获取图片列表
callOtherApi() {
let data = {
deviceId: this.deviceID,
businessId: this.deviceID,
fileType: '2' //文件类型(1:操作说明2:产品参数)
}
fileInfo(data).then((res) => {