|
@@ -36,10 +36,10 @@
|
|
import { useDrawer } from '/@/components/Drawer';
|
|
import { useDrawer } from '/@/components/Drawer';
|
|
import MenuDrawer from './MenuDrawer.vue';
|
|
import MenuDrawer from './MenuDrawer.vue';
|
|
import DataRuleList from './DataRuleList.vue';
|
|
import DataRuleList from './DataRuleList.vue';
|
|
- import { columns,searchFormSchema } from './menu.data';
|
|
|
|
|
|
+ import { columns, searchFormSchema } from './menu.data';
|
|
import { list, deleteMenu, batchDeleteMenu } from './menu.api';
|
|
import { list, deleteMenu, batchDeleteMenu } from './menu.api';
|
|
- import { useDefIndexStore } from "@/store/modules/defIndex";
|
|
|
|
- import { useI18n } from "/@/hooks/web/useI18n";
|
|
|
|
|
|
+ import { useDefIndexStore } from '@/store/modules/defIndex';
|
|
|
|
+ import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
|
|
|
const checkedKeys = ref<Array<string | number>>([]);
|
|
const checkedKeys = ref<Array<string | number>>([]);
|
|
const showFooter = ref(true);
|
|
const showFooter = ref(true);
|
|
@@ -48,18 +48,18 @@
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
|
|
|
|
// 自定义菜单名称列渲染
|
|
// 自定义菜单名称列渲染
|
|
- columns[0].customRender = function ({text, record}) {
|
|
|
|
- const isDefIndex = checkDefIndex(record)
|
|
|
|
|
|
+ columns[0].customRender = function ({ text, record }) {
|
|
|
|
+ const isDefIndex = checkDefIndex(record);
|
|
if (isDefIndex) {
|
|
if (isDefIndex) {
|
|
- text += '(默认首页)'
|
|
|
|
|
|
+ text += '(默认首页)';
|
|
}
|
|
}
|
|
// update-begin--author:liaozhiyang---date:20240306---for:【QQYUN-8379】菜单管理页菜单国际化
|
|
// update-begin--author:liaozhiyang---date:20240306---for:【QQYUN-8379】菜单管理页菜单国际化
|
|
if (text.includes("t('") && t) {
|
|
if (text.includes("t('") && t) {
|
|
return new Function('t', `return ${text}`)(t);
|
|
return new Function('t', `return ${text}`)(t);
|
|
}
|
|
}
|
|
// update-end--author:liaozhiyang---date:20240306---for:【QQYUN-8379】菜单管理页菜单国际化
|
|
// update-end--author:liaozhiyang---date:20240306---for:【QQYUN-8379】菜单管理页菜单国际化
|
|
- return text
|
|
|
|
- }
|
|
|
|
|
|
+ return text;
|
|
|
|
+ };
|
|
|
|
|
|
// 列表页面公共参数、方法
|
|
// 列表页面公共参数、方法
|
|
const { prefixCls, tableContext } = useListPage({
|
|
const { prefixCls, tableContext } = useListPage({
|
|
@@ -189,11 +189,11 @@
|
|
|
|
|
|
// --------------- begin 默认首页配置 ------------
|
|
// --------------- begin 默认首页配置 ------------
|
|
|
|
|
|
- const defIndexStore = useDefIndexStore()
|
|
|
|
|
|
+ const defIndexStore = useDefIndexStore();
|
|
|
|
|
|
// 设置默认主页
|
|
// 设置默认主页
|
|
async function handleSetDefIndex(record: Recordable) {
|
|
async function handleSetDefIndex(record: Recordable) {
|
|
- defIndexStore.update(record.url, record.component, record.route)
|
|
|
|
|
|
+ defIndexStore.update(record.url, record.component, record.route);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -201,7 +201,7 @@
|
|
* @param record
|
|
* @param record
|
|
*/
|
|
*/
|
|
function checkDefIndex(record: Recordable) {
|
|
function checkDefIndex(record: Recordable) {
|
|
- return defIndexStore.check(record.url)
|
|
|
|
|
|
+ return defIndexStore.check(record.url);
|
|
}
|
|
}
|
|
|
|
|
|
// 重新加载默认首页配置
|
|
// 重新加载默认首页配置
|
|
@@ -209,11 +209,11 @@
|
|
try {
|
|
try {
|
|
defIndexStore.query();
|
|
defIndexStore.query();
|
|
} catch (e) {
|
|
} catch (e) {
|
|
- console.error(e)
|
|
|
|
|
|
+ console.error(e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- reloadDefIndex()
|
|
|
|
|
|
+ reloadDefIndex();
|
|
|
|
|
|
// --------------- end 默认首页配置 ------------
|
|
// --------------- end 默认首页配置 ------------
|
|
|
|
|