fix 修复 代码生成菜单选项回显问题

This commit is contained in:
疯狂的狮子li 2023-04-20 18:45:29 +08:00
parent a0bcdf0cde
commit 61417032b7
2 changed files with 74 additions and 74 deletions

View File

@ -177,7 +177,6 @@ const close = () => {
if (tableId) {
//
const res = await getGenTable(tableId);
res.data.info.parentMenuId = Number(res.data.info.parentMenuId);
columns.value = res.data.rows;
info.value = res.data.info;
tables.value = res.data.tables;

View File

@ -226,7 +226,7 @@ import { listMenu } from '@/api/system/menu';
import { ComponentInternalInstance, PropType } from 'vue';
interface MenuOptionsType {
menuId: number;
menuId: number | string;
menuName: string;
children: MenuOptionsType[] | undefined;
}
@ -280,6 +280,7 @@ const setSubTableColumns = (value: string) => {
/** 查询菜单下拉树结构 */
const getMenuTreeselect = async () => {
const res = await listMenu();
res.data.forEach(m => m.menuId = m.menuId.toString());
const data = proxy?.handleTree<MenuOptionsType>(res.data, "menuId");
if (data) {
menuOptions.value = data