From fee8245f4ed758fa42a0ef39ca7f65a7b4b59f3f Mon Sep 17 00:00:00 2001 From: dlarmor <121919810@qq.com> Date: Tue, 14 Mar 2023 11:45:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E8=AE=BE=E6=96=BD=20->=20=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E6=96=87=E4=BB=B6=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/infra/fileConfig/fileConfig.data.ts | 77 ---- src/views/infra/fileConfig/form.vue | 195 ++++++++ src/views/infra/fileConfig/index.vue | 433 +++++++----------- 3 files changed, 365 insertions(+), 340 deletions(-) delete mode 100644 src/views/infra/fileConfig/fileConfig.data.ts create mode 100644 src/views/infra/fileConfig/form.vue diff --git a/src/views/infra/fileConfig/fileConfig.data.ts b/src/views/infra/fileConfig/fileConfig.data.ts deleted file mode 100644 index d0f64869..00000000 --- a/src/views/infra/fileConfig/fileConfig.data.ts +++ /dev/null @@ -1,77 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 - -// 表单校验 -export const rules = reactive({ - name: [required], - storage: [required], - config: { - basePath: [required], - host: [required], - port: [required], - username: [required], - password: [required], - mode: [required], - endpoint: [required], - bucket: [required], - accessKey: [required], - accessSecret: [required], - domain: [required] - } -}) - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'seq', - primaryTitle: '配置编号', - action: true, - actionWidth: '400px', - columns: [ - { - title: '配置名', - field: 'name', - isSearch: true - }, - { - title: '存储器', - field: 'storage', - dictType: DICT_TYPE.INFRA_FILE_STORAGE, - dictClass: 'number', - isSearch: true - }, - { - title: '主配置', - field: 'master', - dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, - dictClass: 'boolean' - }, - { - title: t('form.remark'), - field: 'remark', - 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/fileConfig/form.vue b/src/views/infra/fileConfig/form.vue new file mode 100644 index 00000000..ee7bd238 --- /dev/null +++ b/src/views/infra/fileConfig/form.vue @@ -0,0 +1,195 @@ + + diff --git a/src/views/infra/fileConfig/index.vue b/src/views/infra/fileConfig/index.vue index 9d796a65..4416b094 100644 --- a/src/views/infra/fileConfig/index.vue +++ b/src/views/infra/fileConfig/index.vue @@ -1,294 +1,201 @@ -