fix: lint

This commit is contained in:
xingyu4j
2025-10-23 09:51:25 +08:00
parent 806caf8b48
commit 7ae3ac66fc
14 changed files with 74 additions and 42 deletions

View File

@@ -76,7 +76,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '接收的用户',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleUserList(),
api: getSimpleUserList,
labelField: 'nickname',
valueField: 'id',
mode: 'multiple',
@@ -124,7 +124,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
fieldName: 'createTime',
label: '创建时间',
component: 'RangePicker',
componentProps: getRangePickerDefaultProps(),
componentProps: {
...getRangePickerDefaultProps(),
allowClear: true,
},
},
];
}

View File

@@ -17,7 +17,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '告警配置',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleAlertConfigList(),
api: getSimpleAlertConfigList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择告警配置',
@@ -40,7 +40,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '产品',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleProductList(),
api: getSimpleProductList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择产品',
@@ -53,7 +53,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '设备',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleDeviceList(),
api: getSimpleDeviceList,
labelField: 'deviceName',
valueField: 'id',
placeholder: '请选择设备',
@@ -75,7 +75,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
fieldName: 'createTime',
label: '创建时间',
component: 'RangePicker',
componentProps: getRangePickerDefaultProps(),
componentProps: {
...getRangePickerDefaultProps(),
allowClear: true,
},
},
];
}

View File

@@ -28,7 +28,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '产品',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleProductList(),
api: getSimpleProductList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择产品',
@@ -89,7 +89,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '设备分组',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleDeviceGroupList(),
api: getSimpleDeviceGroupList,
labelField: 'name',
valueField: 'id',
mode: 'multiple',
@@ -156,7 +156,7 @@ export function useGroupFormSchema(): VbenFormSchema[] {
label: '设备分组',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleDeviceGroupList(),
api: getSimpleDeviceGroupList,
labelField: 'name',
valueField: 'id',
mode: 'multiple',
@@ -199,7 +199,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '产品',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleProductList(),
api: getSimpleProductList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择产品',
@@ -249,7 +249,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '设备分组',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleDeviceGroupList(),
api: getSimpleDeviceGroupList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择设备分组',

View File

@@ -34,7 +34,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '父级分组',
component: 'ApiTreeSelect',
componentProps: {
api: () => getSimpleDeviceGroupList(),
api: getSimpleDeviceGroupList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择父级分组',

View File

@@ -29,7 +29,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '所属产品',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleProductList(),
api: getSimpleProductList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择产品',
@@ -85,7 +85,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '产品',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleProductList(),
api: getSimpleProductList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择产品',
@@ -96,7 +96,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
fieldName: 'createTime',
label: '创建时间',
component: 'RangePicker',
componentProps: getRangePickerDefaultProps(),
componentProps: {
...getRangePickerDefaultProps(),
allowClear: true,
},
},
];
}

View File

@@ -29,7 +29,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '所属产品',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleProductList(),
api: getSimpleProductList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择产品',
@@ -86,7 +86,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '产品',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleProductList(),
api: getSimpleProductList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择产品',
@@ -97,7 +97,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
fieldName: 'createTime',
label: '创建时间',
component: 'RangePicker',
componentProps: getRangePickerDefaultProps(),
componentProps: {
...getRangePickerDefaultProps(),
allowClear: true,
},
},
];
}

View File

@@ -2,9 +2,10 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { IoTOtaFirmwareApi } from '#/api/iot/ota/firmware';
import { useRouter } from 'vue-router';
import { Page, useVbenModal } from '@vben/common-ui';
import { IconifyIcon } from '@vben/icons';
import { useRouter } from 'vue-router';
import { message } from 'ant-design-vue';
@@ -39,7 +40,6 @@ function handleEdit(row: IoTOtaFirmwareApi.Firmware) {
formModalApi.setData({ type: 'update', id: row.id }).open();
}
/** 删除固件 */
async function handleDelete(row: IoTOtaFirmwareApi.Firmware) {
const hideLoading = message.loading({
@@ -117,19 +117,25 @@ const [Grid, gridApi] = useVbenVxeGrid({
<!-- 固件文件列 -->
<template #fileUrl="{ row }">
<div v-if="row.fileUrl" class="inline-flex items-center gap-1.5 align-middle leading-none">
<IconifyIcon icon="ant-design:download-outlined" class="shrink-0 text-base align-middle text-primary" />
<a
:href="row.fileUrl"
target="_blank"
download
class="text-primary cursor-pointer hover:underline align-middle"
>
下载固件
</a>
</div>
<span v-else class="text-gray-400">无文件</span>
</template>
<div
v-if="row.fileUrl"
class="inline-flex items-center gap-1.5 align-middle leading-none"
>
<IconifyIcon
icon="ant-design:download-outlined"
class="text-primary shrink-0 align-middle text-base"
/>
<a
:href="row.fileUrl"
target="_blank"
download
class="text-primary cursor-pointer align-middle hover:underline"
>
下载固件
</a>
</div>
<span v-else class="text-gray-400">无文件</span>
</template>
<!-- 操作列 -->
<template #actions="{ row }">

View File

@@ -34,7 +34,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '父级分类',
component: 'ApiTreeSelect',
componentProps: {
api: () => getSimpleProductCategoryList(),
api: getSimpleProductCategoryList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择父级分类',

View File

@@ -93,7 +93,7 @@ export function useFormSchema(formApi?: any): VbenFormSchema[] {
label: '产品分类',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleProductCategoryList(),
api: getSimpleProductCategoryList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择产品分类',
@@ -246,7 +246,7 @@ export function useBasicFormSchema(formApi?: any): VbenFormSchema[] {
label: '产品分类',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleProductCategoryList(),
api: getSimpleProductCategoryList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择产品分类',

View File

@@ -24,7 +24,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '产品',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleProductList(),
api: getSimpleProductList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择产品',
@@ -45,7 +45,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
fieldName: 'createTime',
label: '创建时间',
component: 'RangePicker',
componentProps: getRangePickerDefaultProps(),
componentProps: {
...getRangePickerDefaultProps(),
allowClear: true,
},
},
];
}

View File

@@ -32,7 +32,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
fieldName: 'createTime',
label: '创建时间',
component: 'RangePicker',
componentProps: getRangePickerDefaultProps(),
componentProps: {
...getRangePickerDefaultProps(),
allowClear: true,
},
},
];
}

View File

@@ -42,7 +42,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
fieldName: 'createTime',
label: '创建时间',
component: 'RangePicker',
componentProps: getRangePickerDefaultProps(),
componentProps: {
...getRangePickerDefaultProps(),
allowClear: true,
},
},
];
}

View File

@@ -77,7 +77,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
fieldName: 'createTime',
label: '创建时间',
component: 'RangePicker',
componentProps: getRangePickerDefaultProps(),
componentProps: {
...getRangePickerDefaultProps(),
allowClear: true,
},
},
];
}

View File

@@ -53,7 +53,9 @@ async function handleClose(row: MallRewardActivityApi.RewardActivity) {
async function handleDelete(row: MallRewardActivityApi.RewardActivity) {
await deleteRewardActivity(row.id!);
message.success($t('common.delSuccess'));
message.success({
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
});
handleRefresh();
}