|
@@ -8,6 +8,12 @@ import { getDeviceParams } from '@/api';
|
|
|
|
|
|
import type { DeviceParamGroup, DeviceParamItem, OptionItem } from '@/types';
|
|
|
|
|
|
+interface Props {
|
|
|
+ devId: number;
|
|
|
+}
|
|
|
+
|
|
|
+const props = defineProps<Props>();
|
|
|
+
|
|
|
const { visible, showView, hideView } = useViewVisible();
|
|
|
const { isLoading, handleRequest } = useRequest();
|
|
|
const allParamGroups = ref<DeviceParamGroup[]>([]);
|
|
@@ -38,7 +44,7 @@ watch(visible, () => {
|
|
|
|
|
|
const getAllParamGroups = () => {
|
|
|
handleRequest(async () => {
|
|
|
- const data = await getDeviceParams(51, false);
|
|
|
+ const data = await getDeviceParams(props.devId, false);
|
|
|
allParamGroups.value = data;
|
|
|
|
|
|
if (data.length) {
|
|
@@ -72,6 +78,7 @@ defineExpose({
|
|
|
:footer="null"
|
|
|
:after-close="handleClose"
|
|
|
>
|
|
|
+ <AEmpty v-show="!groupList.length" />
|
|
|
<ASpin class="center-loading" :spinning="isLoading" />
|
|
|
<ATabs class="hide-tabs-border" v-model:active-key="activeGroup">
|
|
|
<ATabPane v-for="item in groupList" :key="item.value" :tab="item.label" />
|
|
@@ -115,6 +122,10 @@ defineExpose({
|
|
|
flex-direction: column;
|
|
|
height: calc(100% - 32px);
|
|
|
}
|
|
|
+
|
|
|
+ .ant-empty {
|
|
|
+ margin-top: 150px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|
|
|
|