Merge branch 'lichang' into lite

This commit is contained in:
TsMask
2025-03-13 11:51:40 +08:00
2 changed files with 6 additions and 3 deletions

View File

@@ -151,8 +151,11 @@ async function fnGetList(reload: boolean = false) {
if (!reload) { if (!reload) {
// 选择第一个 // 选择第一个
if (tableState.data.length > 0) { if (tableState.data.length > 0) {
const id = tableState.data[0].id; const item = tableState.data.find((item: any) => item.status === 1)
fnTableSelectedRowKeys([id]); if (item) {
const id = item.id;
fnTableSelectedRowKeys([id]);
}
} else { } else {
fnTableSelectedRowKeys(tableState.selectedRowKeys); fnTableSelectedRowKeys(tableState.selectedRowKeys);
} }

View File

@@ -838,7 +838,7 @@ onMounted(() => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
if (!res.data.rows.length) { if (!res.data.rows.length) {
message.warning({ message.warning({
content: '无可用的自定义指标,请先添加自定义指标', content: t('common.noData'),
duration: 2, duration: 2,
}); });
return false; return false;