diff --git a/src/views/bpm/form/formEditor.vue b/src/views/bpm/form/formEditor.vue index 1070739e..989ea56e 100644 --- a/src/views/bpm/form/formEditor.vue +++ b/src/views/bpm/form/formEditor.vue @@ -12,9 +12,11 @@
-
-            {{ formValue }}
-          
+
+ + {{ formValue }} + +
diff --git a/src/views/bpm/model/index.vue b/src/views/bpm/model/index.vue index 01a97d3f..25136e13 100644 --- a/src/views/bpm/model/index.vue +++ b/src/views/bpm/model/index.vue @@ -146,8 +146,8 @@ style="width: 100%" > @@ -434,9 +434,9 @@ const handleUpdate = async (rowId: number) => { // 设置数据 saveForm.value = await ModelApi.getModelApi(rowId) if (saveForm.value.category == null) { - saveForm.value.category = 1 + saveForm.value.category = '1' } else { - saveForm.value.category = Number(saveForm.value.category) + saveForm.value.category = saveForm.value.category } } diff --git a/src/views/infra/config/config.data.ts b/src/views/infra/config/config.data.ts new file mode 100644 index 00000000..41acfa15 --- /dev/null +++ b/src/views/infra/config/config.data.ts @@ -0,0 +1,90 @@ +import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' +const { t } = useI18n() // 国际化 + +// 表单校验 +export const rules = reactive({ + category: [required], + name: [required], + key: [required], + value: [required] +}) + +// CrudSchema +const crudSchemas = reactive({ + primaryKey: 'id', + primaryType: null, + action: true, + columns: [ + { + title: '参数分类', + field: 'category' + }, + { + title: '参数名称', + field: 'name', + isSearch: true + }, + { + title: '参数键名', + field: 'key', + isSearch: true + }, + { + title: '参数键值', + field: 'value' + }, + { + title: '系统内置', + field: 'type', + dictType: DICT_TYPE.INFRA_CONFIG_TYPE, + dictClass: 'number', + isSearch: true + }, + { + title: '是否可见', + field: 'visible', + table: { + slots: { + default: 'visible_default' + } + }, + form: { + component: 'RadioButton', + componentProps: { + options: [ + { label: '是', value: true }, + { label: '否', value: false } + ] + } + } + }, + { + title: t('form.remark'), + field: 'remark', + isTable: false, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + rows: 4 + }, + colProps: { + span: 24 + } + } + }, + { + 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/infra/config/form.vue b/src/views/infra/config/form.vue deleted file mode 100644 index 30e2f4d9..00000000 --- a/src/views/infra/config/form.vue +++ /dev/null @@ -1,131 +0,0 @@ - - diff --git a/src/views/infra/config/index.vue b/src/views/infra/config/index.vue index e75b09da..b2bc8a8b 100644 --- a/src/views/infra/config/index.vue +++ b/src/views/infra/config/index.vue @@ -1,203 +1,185 @@ diff --git a/src/views/system/mail/log/log.data.ts b/src/views/system/mail/log/log.data.ts index d389bce5..f01cb549 100644 --- a/src/views/system/mail/log/log.data.ts +++ b/src/views/system/mail/log/log.data.ts @@ -114,7 +114,8 @@ const crudSchemas = reactive({ { title: '创建时间', field: 'createTime', - isTable: false + isTable: false, + formatter: 'formatDate' } ] }) diff --git a/src/views/system/tenantPackage/tenantPackage.data.ts b/src/views/system/tenantPackage/tenantPackage.data.ts index 47db56d4..d57dee29 100644 --- a/src/views/system/tenantPackage/tenantPackage.data.ts +++ b/src/views/system/tenantPackage/tenantPackage.data.ts @@ -43,7 +43,7 @@ const crudSchemas = reactive({ { title: t('form.remark'), field: 'remark', - isTable: false, + isTable: true, isSearch: true, form: { component: 'Input',