From 90959702ee4c232d05098e84000d08111a8eb84e Mon Sep 17 00:00:00 2001
From: gexinzhineng/gxzn27 <1348660141@qq.com>
Date: Tue, 28 Mar 2023 13:41:56 +0800
Subject: [PATCH] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E8=AE=B0=E5=BD=95=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=EF=BC=8C=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=20=E7=BC=96=E8=BE=91?=
=?UTF-8?q?=E5=8F=82=E6=95=B0=E9=94=AE=E5=90=8D=EF=BC=8C=E9=94=AE=E4=B8=8D?=
=?UTF-8?q?=E8=83=BD=E4=BF=AE=E6=94=B9=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=97=B6?=
=?UTF-8?q?=E5=8F=AA=E8=AF=BB=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=97=B6=E6=AD=A3?=
=?UTF-8?q?=E5=B8=B8=20=E7=A7=9F=E6=88=B7=E5=A5=97=E9=A4=90=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E5=A4=87=E6=B3=A8=E5=8F=8A=E6=90=9C=E7=B4=A2=E6=9D=A1?=
=?UTF-8?q?=E4=BB=B6=E6=98=BE=E7=A4=BA=EF=BC=88=E5=90=8Cvue2=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/bpm/form/formEditor.vue | 8 +-
src/views/bpm/model/index.vue | 8 +-
src/views/infra/config/config.data.ts | 90 +++++
src/views/infra/config/form.vue | 131 -------
src/views/infra/config/index.vue | 352 +++++++++---------
src/views/system/mail/log/log.data.ts | 3 +-
.../tenantPackage/tenantPackage.data.ts | 2 +-
7 files changed, 269 insertions(+), 325 deletions(-)
create mode 100644 src/views/infra/config/config.data.ts
delete mode 100644 src/views/infra/config/form.vue
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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
- 新增
-
-
- 导出
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
-
-
- 删除
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ row.visible ? '是' : '否' }}
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+ {{ row.visible ? '是' : '否' }}
+
+
+
+
+
+
+
+
+
+
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',