fix: lint
This commit is contained in:
@@ -76,7 +76,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '接收的用户',
|
label: '接收的用户',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleUserList(),
|
api: getSimpleUserList,
|
||||||
labelField: 'nickname',
|
labelField: 'nickname',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
@@ -124,7 +124,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
componentProps: getRangePickerDefaultProps(),
|
componentProps: {
|
||||||
|
...getRangePickerDefaultProps(),
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '告警配置',
|
label: '告警配置',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleAlertConfigList(),
|
api: getSimpleAlertConfigList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择告警配置',
|
placeholder: '请选择告警配置',
|
||||||
@@ -40,7 +40,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '产品',
|
label: '产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleProductList(),
|
api: getSimpleProductList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -53,7 +53,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '设备',
|
label: '设备',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleDeviceList(),
|
api: getSimpleDeviceList,
|
||||||
labelField: 'deviceName',
|
labelField: 'deviceName',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择设备',
|
placeholder: '请选择设备',
|
||||||
@@ -75,7 +75,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
componentProps: getRangePickerDefaultProps(),
|
componentProps: {
|
||||||
|
...getRangePickerDefaultProps(),
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '产品',
|
label: '产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleProductList(),
|
api: getSimpleProductList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -89,7 +89,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '设备分组',
|
label: '设备分组',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleDeviceGroupList(),
|
api: getSimpleDeviceGroupList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
@@ -156,7 +156,7 @@ export function useGroupFormSchema(): VbenFormSchema[] {
|
|||||||
label: '设备分组',
|
label: '设备分组',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleDeviceGroupList(),
|
api: getSimpleDeviceGroupList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
@@ -199,7 +199,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '产品',
|
label: '产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleProductList(),
|
api: getSimpleProductList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -249,7 +249,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '设备分组',
|
label: '设备分组',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleDeviceGroupList(),
|
api: getSimpleDeviceGroupList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择设备分组',
|
placeholder: '请选择设备分组',
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '父级分组',
|
label: '父级分组',
|
||||||
component: 'ApiTreeSelect',
|
component: 'ApiTreeSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleDeviceGroupList(),
|
api: getSimpleDeviceGroupList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择父级分组',
|
placeholder: '请选择父级分组',
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '所属产品',
|
label: '所属产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleProductList(),
|
api: getSimpleProductList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -85,7 +85,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '产品',
|
label: '产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleProductList(),
|
api: getSimpleProductList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -96,7 +96,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
componentProps: getRangePickerDefaultProps(),
|
componentProps: {
|
||||||
|
...getRangePickerDefaultProps(),
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '所属产品',
|
label: '所属产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleProductList(),
|
api: getSimpleProductList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -86,7 +86,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '产品',
|
label: '产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleProductList(),
|
api: getSimpleProductList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -97,7 +97,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
componentProps: getRangePickerDefaultProps(),
|
componentProps: {
|
||||||
|
...getRangePickerDefaultProps(),
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { IoTOtaFirmwareApi } from '#/api/iot/ota/firmware';
|
import type { IoTOtaFirmwareApi } from '#/api/iot/ota/firmware';
|
||||||
|
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
|
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
@@ -39,7 +40,6 @@ function handleEdit(row: IoTOtaFirmwareApi.Firmware) {
|
|||||||
formModalApi.setData({ type: 'update', id: row.id }).open();
|
formModalApi.setData({ type: 'update', id: row.id }).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** 删除固件 */
|
/** 删除固件 */
|
||||||
async function handleDelete(row: IoTOtaFirmwareApi.Firmware) {
|
async function handleDelete(row: IoTOtaFirmwareApi.Firmware) {
|
||||||
const hideLoading = message.loading({
|
const hideLoading = message.loading({
|
||||||
@@ -117,19 +117,25 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
|
|
||||||
<!-- 固件文件列 -->
|
<!-- 固件文件列 -->
|
||||||
<template #fileUrl="{ row }">
|
<template #fileUrl="{ row }">
|
||||||
<div v-if="row.fileUrl" class="inline-flex items-center gap-1.5 align-middle leading-none">
|
<div
|
||||||
<IconifyIcon icon="ant-design:download-outlined" class="shrink-0 text-base align-middle text-primary" />
|
v-if="row.fileUrl"
|
||||||
<a
|
class="inline-flex items-center gap-1.5 align-middle leading-none"
|
||||||
:href="row.fileUrl"
|
>
|
||||||
target="_blank"
|
<IconifyIcon
|
||||||
download
|
icon="ant-design:download-outlined"
|
||||||
class="text-primary cursor-pointer hover:underline align-middle"
|
class="text-primary shrink-0 align-middle text-base"
|
||||||
>
|
/>
|
||||||
下载固件
|
<a
|
||||||
</a>
|
:href="row.fileUrl"
|
||||||
</div>
|
target="_blank"
|
||||||
<span v-else class="text-gray-400">无文件</span>
|
download
|
||||||
</template>
|
class="text-primary cursor-pointer align-middle hover:underline"
|
||||||
|
>
|
||||||
|
下载固件
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span v-else class="text-gray-400">无文件</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- 操作列 -->
|
<!-- 操作列 -->
|
||||||
<template #actions="{ row }">
|
<template #actions="{ row }">
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '父级分类',
|
label: '父级分类',
|
||||||
component: 'ApiTreeSelect',
|
component: 'ApiTreeSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleProductCategoryList(),
|
api: getSimpleProductCategoryList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择父级分类',
|
placeholder: '请选择父级分类',
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export function useFormSchema(formApi?: any): VbenFormSchema[] {
|
|||||||
label: '产品分类',
|
label: '产品分类',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleProductCategoryList(),
|
api: getSimpleProductCategoryList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品分类',
|
placeholder: '请选择产品分类',
|
||||||
@@ -246,7 +246,7 @@ export function useBasicFormSchema(formApi?: any): VbenFormSchema[] {
|
|||||||
label: '产品分类',
|
label: '产品分类',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleProductCategoryList(),
|
api: getSimpleProductCategoryList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品分类',
|
placeholder: '请选择产品分类',
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '产品',
|
label: '产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleProductList(),
|
api: getSimpleProductList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -45,7 +45,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
componentProps: getRangePickerDefaultProps(),
|
componentProps: {
|
||||||
|
...getRangePickerDefaultProps(),
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
componentProps: getRangePickerDefaultProps(),
|
componentProps: {
|
||||||
|
...getRangePickerDefaultProps(),
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
componentProps: getRangePickerDefaultProps(),
|
componentProps: {
|
||||||
|
...getRangePickerDefaultProps(),
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
componentProps: getRangePickerDefaultProps(),
|
componentProps: {
|
||||||
|
...getRangePickerDefaultProps(),
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,9 @@ async function handleClose(row: MallRewardActivityApi.RewardActivity) {
|
|||||||
|
|
||||||
async function handleDelete(row: MallRewardActivityApi.RewardActivity) {
|
async function handleDelete(row: MallRewardActivityApi.RewardActivity) {
|
||||||
await deleteRewardActivity(row.id!);
|
await deleteRewardActivity(row.id!);
|
||||||
message.success($t('common.delSuccess'));
|
message.success({
|
||||||
|
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
||||||
|
});
|
||||||
handleRefresh();
|
handleRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user