修复
This commit is contained in:
@@ -63,7 +63,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '关联场景联动规则',
|
label: '关联场景联动规则',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getSimpleRuleSceneList(),
|
api: getSimpleRuleSceneList,
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import type { IoTOtaFirmwareApi } from '#/api/iot/ota/firmware';
|
|||||||
|
|
||||||
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';
|
||||||
|
|
||||||
@@ -16,6 +17,8 @@ import { useGridColumns, useGridFormSchema } from './data';
|
|||||||
|
|
||||||
defineOptions({ name: 'IoTOtaFirmware' });
|
defineOptions({ name: 'IoTOtaFirmware' });
|
||||||
|
|
||||||
|
const { push } = useRouter();
|
||||||
|
|
||||||
const [FormModal, formModalApi] = useVbenModal({
|
const [FormModal, formModalApi] = useVbenModal({
|
||||||
connectedComponent: Form,
|
connectedComponent: Form,
|
||||||
destroyOnClose: true,
|
destroyOnClose: true,
|
||||||
@@ -54,6 +57,11 @@ async function handleDelete(row: IoTOtaFirmwareApi.Firmware) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 查看固件详情 */
|
||||||
|
function handleDetail(row: IoTOtaFirmwareApi.Firmware) {
|
||||||
|
push({ name: 'IoTOtaFirmwareDetail', params: { id: row.id } });
|
||||||
|
}
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
formOptions: {
|
formOptions: {
|
||||||
schema: useGridFormSchema(),
|
schema: useGridFormSchema(),
|
||||||
@@ -131,7 +139,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
label: $t('common.detail'),
|
label: $t('common.detail'),
|
||||||
type: 'link',
|
type: 'link',
|
||||||
icon: ACTION_ICON.VIEW,
|
icon: ACTION_ICON.VIEW,
|
||||||
onClick: () => $router.push({ name: 'IoTOtaFirmwareDetail', params: { id: row.id } }),
|
onClick: handleDetail.bind(null, row),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: $t('common.edit'),
|
label: $t('common.edit'),
|
||||||
|
|||||||
Reference in New Issue
Block a user