fix: bug#17573【设备】插件设备进行映射时,传参ID错误,传入了设备接入网关ID,应该为插件ID

This commit is contained in:
leiqiaochu 2024-10-31 11:52:22 +08:00
parent 0ced59c084
commit 2e2ec80979
2 changed files with 18 additions and 15 deletions

View File

@ -53,7 +53,7 @@ const handleOk = async () => {
loading.value = true
const res = await savePluginData(
'device',
props.pluginId!,
props.accessId!,
route.params.id as string,
checkKey.value
).catch(() => ({ success: false }))
@ -71,7 +71,7 @@ const handleCancel = () => {
}
const getCheckedKeys = () => {
getPluginData( 'device', props.pluginId!, route.params.id as string,).then(res => {
getPluginData( 'device', props.accessId!, route.params.id as string,).then(res => {
if (res.success) {
checkKey.value = res.result?.externalId || ''
}

View File

@ -181,9 +181,10 @@ const queryInkingDevices = (data: string[]) => {
return;
}
const res = await getInkingDevices(data,props.accessId);
const res = await getInkingDevices(data, props.accessId);
if (res) {
disabledKeys.value = res.result?.map((item) => item.externalId) || [];
disabledKeys.value =
res.result?.map((item) => item.externalId) || [];
}
resolve(true);
@ -250,9 +251,11 @@ const init = async () => {
const resp = await getCommandsByAccess(props.accessId);
if (resp.success && resp.result?.length) {
//
const item = resp.result.find(item => item.id === 'QueryDevicePage');
const item = resp.result.find(
(item) => item.id === 'QueryDevicePage',
);
if (item) {
showPage.value = true
showPage.value = true;
columns.value = item.expands?.terms?.map((t) => ({
title: t.name,
dataIndex: t.id,