diff --git a/src/api/system/errorCode/index.ts b/src/api/system/errorCode/index.ts index 0e000794..65eabd3a 100644 --- a/src/api/system/errorCode/index.ts +++ b/src/api/system/errorCode/index.ts @@ -1,10 +1,10 @@ import request from '@/config/axios' export interface ErrorCodeVO { - id: number + id: number | undefined type: number applicationName: string - code: number + code: number | undefined message: string memo: string createTime: Date diff --git a/src/views/system/errorCode/errorCode.data.ts b/src/views/system/errorCode/errorCode.data.ts deleted file mode 100644 index 4736068b..00000000 --- a/src/views/system/errorCode/errorCode.data.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 - -// 表单校验 -export const rules = reactive({ - applicationName: [required], - code: [required], - message: [required] -}) - -// 新增 + 修改 -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '编号', - action: true, - columns: [ - { - title: '错误码类型', - field: 'type', - dictType: DICT_TYPE.SYSTEM_ERROR_CODE_TYPE, - dictClass: 'number', - isSearch: true - }, - { - title: '应用名', - field: 'applicationName', - isSearch: true - }, - { - title: '错误码编码', - field: 'code', - isSearch: true - }, - { - title: '错误码错误提示', - field: 'message', - isSearch: true - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/errorCode/form.vue b/src/views/system/errorCode/form.vue new file mode 100644 index 00000000..5e6a0bc8 --- /dev/null +++ b/src/views/system/errorCode/form.vue @@ -0,0 +1,114 @@ + + diff --git a/src/views/system/errorCode/index.vue b/src/views/system/errorCode/index.vue index 1ff3d103..8f7dac33 100644 --- a/src/views/system/errorCode/index.vue +++ b/src/views/system/errorCode/index.vue @@ -1,145 +1,216 @@ +