功能细节调整

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

View File

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

View File

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

View File

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