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
|
loading.value = true
|
||||||
const res = await savePluginData(
|
const res = await savePluginData(
|
||||||
'device',
|
'device',
|
||||||
props.accessId!,
|
props.pluginId!,
|
||||||
route.params.id as string,
|
route.params.id as string,
|
||||||
checkKey.value
|
checkKey.value
|
||||||
).catch(() => ({ success: false }))
|
).catch(() => ({ success: false }))
|
||||||
|
@ -71,7 +71,7 @@ const handleCancel = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getCheckedKeys = () => {
|
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) {
|
if (res.success) {
|
||||||
checkKey.value = res.result?.externalId || ''
|
checkKey.value = res.result?.externalId || ''
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,10 +229,17 @@ const table = reactive({
|
||||||
paging: false,
|
paging: false,
|
||||||
};
|
};
|
||||||
const resp: any = await getMenuTree_api(params);
|
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];
|
const lastItem = menuArr[menuArr.length - 1];
|
||||||
|
console.log(lastItem, 'lastItem');
|
||||||
//个人中心排序为9999需要做过滤特殊处理
|
//个人中心排序为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 {
|
return {
|
||||||
code: resp.message,
|
code: resp.message,
|
||||||
|
@ -251,7 +258,9 @@ const table = reactive({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
addChildren: (row: any) => {
|
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(
|
router.push(
|
||||||
`/system/Menu/detail/:id?pid=${row.id}&basePath=${
|
`/system/Menu/detail/:id?pid=${row.id}&basePath=${
|
||||||
row.url || ''
|
row.url || ''
|
||||||
|
|
Loading…
Reference in New Issue