diff --git a/src/views/device/Instance/Detail/Info/components/InklingModal/index.vue b/src/views/device/Instance/Detail/Info/components/InklingModal/index.vue index ae243cd0..45862242 100644 --- a/src/views/device/Instance/Detail/Info/components/InklingModal/index.vue +++ b/src/views/device/Instance/Detail/Info/components/InklingModal/index.vue @@ -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 || '' } diff --git a/src/views/system/Menu/index.vue b/src/views/system/Menu/index.vue index 7d4487f3..3f090588 100644 --- a/src/views/system/Menu/index.vue +++ b/src/views/system/Menu/index.vue @@ -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 || ''