fix: 设备映射传值网关id->插件id
* fix: bug#28724 【菜单管理】【/2.1/2.2】菜单管理新增菜单时,排序需优化(默认为10000开始) * fix: 设备映射传值网关id->插件id
This commit is contained in:
parent
2e2ec80979
commit
57096169c6
|
@ -53,7 +53,7 @@ const handleOk = async () => {
|
|||
loading.value = true
|
||||
const res = await savePluginData(
|
||||
'device',
|
||||
props.accessId!,
|
||||
props.pluginId!,
|
||||
route.params.id as string,
|
||||
checkKey.value
|
||||
).catch(() => ({ success: false }))
|
||||
|
@ -71,7 +71,7 @@ const handleCancel = () => {
|
|||
}
|
||||
|
||||
const getCheckedKeys = () => {
|
||||
getPluginData( 'device', props.accessId!, route.params.id as string,).then(res => {
|
||||
getPluginData( 'device', props.pluginId!, route.params.id as string,).then(res => {
|
||||
if (res.success) {
|
||||
checkKey.value = res.result?.externalId || ''
|
||||
}
|
||||
|
|
|
@ -229,10 +229,17 @@ const table = reactive({
|
|||
paging: false,
|
||||
};
|
||||
const resp: any = await getMenuTree_api(params);
|
||||
const menuArr = resp.result.filter((i:any)=>i.code!=='account-center')
|
||||
const menuArr = resp.result.filter(
|
||||
(i: any) => i.code !== 'account-center',
|
||||
);
|
||||
const lastItem = menuArr[menuArr.length - 1];
|
||||
console.log(lastItem, 'lastItem');
|
||||
//个人中心排序为9999需要做过滤特殊处理
|
||||
table.total = lastItem ? lastItem.sortIndex + 1 === 9999 ? 10000 : lastItem.sortIndex + 1 : 1;
|
||||
table.total = lastItem
|
||||
? lastItem.sortIndex + 1 === 9999
|
||||
? 10000
|
||||
: lastItem.sortIndex + 1
|
||||
: 1;
|
||||
|
||||
return {
|
||||
code: resp.message,
|
||||
|
@ -251,7 +258,9 @@ const table = reactive({
|
|||
};
|
||||
},
|
||||
addChildren: (row: any) => {
|
||||
const sortIndex = row?.children?.length || 0;
|
||||
const sortIndex = row?.children.sort((a: any, b: any) => {
|
||||
return b.sortIndex - a.sortIndex;
|
||||
})[0].sortIndex;
|
||||
router.push(
|
||||
`/system/Menu/detail/:id?pid=${row.id}&basePath=${
|
||||
row.url || ''
|
||||
|
|
Loading…
Reference in New Issue