diff --git a/apps/web-antd/src/components/table-action/table-action.vue b/apps/web-antd/src/components/table-action/table-action.vue index 438e6e6..4ca0590 100644 --- a/apps/web-antd/src/components/table-action/table-action.vue +++ b/apps/web-antd/src/components/table-action/table-action.vue @@ -171,11 +171,13 @@ const handleMenuClick = (e: any) => {
{{ action.text }} @@ -184,11 +186,13 @@ const handleMenuClick = (e: any) => { - - diff --git a/apps/web-antd/src/views/thingmodelinfo/deviceThingModelManagement/schema.ts b/apps/web-antd/src/views/thingmodelinfo/deviceThingModelManagement/schema.ts index 25251f7..787c1d5 100644 --- a/apps/web-antd/src/views/thingmodelinfo/deviceThingModelManagement/schema.ts +++ b/apps/web-antd/src/views/thingmodelinfo/deviceThingModelManagement/schema.ts @@ -116,7 +116,7 @@ export const tableSchema = computed(() => [ minWidth: 120, showOverflow: 'tooltip', formatter: ({ cellValue }: { cellValue: any }) => { - const map: Record = { + const map: Record = { 1: 'CTWing', 2: 'OneNET', }; @@ -152,7 +152,7 @@ export const tableSchema = computed(() => [ { field: 'action', title: $t('common.action'), - width: 360, + width: 160, fixed: 'right', slots: { default: 'action' }, }, @@ -164,18 +164,22 @@ export const addDeviceThingModelFormSchema = computed(() => [ component: 'Input', fieldName: 'deviceModelName', label: '设备端物模型名称', - rules: z - .preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), + rules: z.preprocess( + (v) => (v == null ? '' : v), + z.string().min(1, $t('common.required')), + ), componentProps: { - placeholder: $t('common.pleaseInput') + '设备端物模型名称', + placeholder: `${$t('common.pleaseInput')}设备端物模型名称`, }, }, { component: 'ApiSelect', fieldName: 'ioTPlatform', label: $t('abp.deviceInfos.ioTPlatform'), - rules: z - .preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), + rules: z.preprocess( + (v) => (v == null ? '' : v), + z.string().min(1, $t('common.required')), + ), componentProps: { api: getCommonGetSelectList, params: { @@ -208,8 +212,10 @@ export const addDeviceThingModelFormSchema = computed(() => [ component: 'ApiSelect', fieldName: 'ioTPlatformProductId', label: $t('common.BelongingProductName'), - rules: z - .preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), + rules: z.preprocess( + (v) => (v == null ? '' : v), + z.string().min(1, $t('common.required')), + ), componentProps: (formValues: any) => { const platform = formValues?.ioTPlatform; @@ -254,10 +260,12 @@ export const addDeviceThingModelFormSchema = computed(() => [ component: 'Input', fieldName: 'scriptName', label: '脚本函数名称', - rules: z - .preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), + rules: z.preprocess( + (v) => (v == null ? '' : v), + z.string().min(1, $t('common.required')), + ), componentProps: { - placeholder: $t('common.pleaseInput') + '脚本函数名称', + placeholder: `${$t('common.pleaseInput')}脚本函数名称`, }, }, { @@ -277,18 +285,22 @@ export const editDeviceThingModelFormSchema = computed(() => [ component: 'Input', fieldName: 'deviceModelName', label: '设备端物模型名称', - rules: z - .preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), + rules: z.preprocess( + (v) => (v == null ? '' : v), + z.string().min(1, $t('common.required')), + ), componentProps: { - placeholder: $t('common.pleaseInput') + '设备端物模型名称', + placeholder: `${$t('common.pleaseInput')}设备端物模型名称`, }, }, { component: 'ApiSelect', fieldName: 'ioTPlatform', label: $t('abp.deviceInfos.ioTPlatform'), - rules: z - .preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), + rules: z.preprocess( + (v) => (v == null ? '' : v), + z.string().min(1, $t('common.required')), + ), componentProps: { api: getCommonGetSelectList, params: { @@ -322,8 +334,10 @@ export const editDeviceThingModelFormSchema = computed(() => [ component: 'ApiSelect', fieldName: 'ioTPlatformProductId', label: $t('common.BelongingProductName'), - rules: z - .preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), + rules: z.preprocess( + (v) => (v == null ? '' : v), + z.string().min(1, $t('common.required')), + ), componentProps: (formValues: any) => { const platform = formValues?.ioTPlatform; @@ -369,10 +383,12 @@ export const editDeviceThingModelFormSchema = computed(() => [ component: 'Input', fieldName: 'scriptName', label: '脚本函数名称', - rules: z - .preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), + rules: z.preprocess( + (v) => (v == null ? '' : v), + z.string().min(1, $t('common.required')), + ), componentProps: { - placeholder: $t('common.pleaseInput') + '脚本函数名称', + placeholder: `${$t('common.pleaseInput')}脚本函数名称`, }, }, { @@ -385,5 +401,3 @@ export const editDeviceThingModelFormSchema = computed(() => [ }, }, ]); - -