【更新】移动端菜单获取时判断可用状态再返回

This commit is contained in:
俞宝山
2025-12-21 14:53:58 +08:00
parent 01b21cc068
commit b0b8884504
2 changed files with 16 additions and 14 deletions

View File

@@ -67,7 +67,7 @@
import genPreview from './preview.vue'
import genBasicApi from '@/api/gen/genBasicApi'
const emit = defineEmits({ closed: null, successful: null })
const emit = defineEmits({ closed: null, successful: null })
const current = ref(0)
const recordData = ref()
const submitLoading = ref(false)
@@ -95,19 +95,19 @@
.catch(() => {})
current.value--
}
if (current.value === 2) {
configRef.value
.onSubmit(recordData.value)
.then((data) => {
// 配置保存成功后,通知父组件刷新列表
emit('successful', data)
current.value++
})
.catch((err) => {
message.warning(err)
})
current.value--
}
if (current.value === 2) {
configRef.value
.onSubmit(recordData.value)
.then((data) => {
// 配置保存成功后,通知父组件刷新列表
emit('successful', data)
current.value++
})
.catch((err) => {
message.warning(err)
})
current.value--
}
}
// 上一步
const prev = () => {

View File

@@ -33,6 +33,7 @@ import vip.xiaonuo.common.exception.CommonException;
import vip.xiaonuo.mobile.modular.resource.entity.MobileMenu;
import vip.xiaonuo.mobile.modular.resource.entity.MobileModule;
import vip.xiaonuo.mobile.modular.resource.enums.MobileResourceCategoryEnum;
import vip.xiaonuo.mobile.modular.resource.enums.MobileResourceMenuStatusEnum;
import vip.xiaonuo.mobile.modular.resource.mapper.MobileMenuMapper;
import vip.xiaonuo.mobile.modular.resource.param.menu.*;
import vip.xiaonuo.mobile.modular.resource.service.MobileMenuService;
@@ -296,6 +297,7 @@ public class MobileMenuServiceImpl extends ServiceImpl<MobileMenuMapper, MobileM
// 获取所有的菜单和模块列表,并按分类和排序码排序
List<MobileMenu> allModuleAndMenuAndSpaList = this.list(new LambdaQueryWrapper<MobileMenu>()
.in(MobileMenu::getCategory, MobileResourceCategoryEnum.MODULE.getValue(), MobileResourceCategoryEnum.MENU.getValue())
.eq(MobileMenu::getStatus, MobileResourceMenuStatusEnum.ENABLE.getValue())
.orderByAsc(CollectionUtil.newArrayList(MobileMenu::getCategory, MobileMenu::getSortCode)));
// 全部以菜单承载
List<MobileMenu> allModuleList = CollectionUtil.newArrayList();