功能细节调整
This commit is contained in:
@ -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,
|
||||
|
@ -139,7 +139,7 @@
|
||||
// 获取图片列表
|
||||
callOtherApi() {
|
||||
let data = {
|
||||
deviceId: this.deviceID,
|
||||
businessId: this.deviceID,
|
||||
fileType: '1' //文件类型(1:操作说明,2:产品参数)
|
||||
}
|
||||
fileInfo(data).then((res) => {
|
||||
|
@ -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">
|
||||
@ -86,8 +86,8 @@
|
||||
// 如果是确认删除操作
|
||||
if (content.text === '确认删除') {
|
||||
let ids = item.id
|
||||
let data ={
|
||||
ids:item.id
|
||||
let data = {
|
||||
ids: item.id
|
||||
}
|
||||
deleteOperationVideo(ids).then((res) => {
|
||||
if (res.code == 200) {
|
||||
@ -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
|
||||
|
@ -139,7 +139,7 @@
|
||||
// 获取图片列表
|
||||
callOtherApi() {
|
||||
let data = {
|
||||
deviceId: this.deviceID,
|
||||
businessId: this.deviceID,
|
||||
fileType: '2' //文件类型(1:操作说明,2:产品参数)
|
||||
}
|
||||
fileInfo(data).then((res) => {
|
||||
|
Reference in New Issue
Block a user