From 2d85f11f82a27c4ef09780565e06e6ad3e73538e Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 19 Jan 2023 16:49:57 +0800 Subject: [PATCH] =?UTF-8?q?bpm=EF=BC=9A=E6=B5=81=E7=A8=8B=E5=88=97?= =?UTF-8?q?=E8=A1=A8=20100%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/bpm/form/form.data.ts | 76 ++--- .../src/views/bpm/form/index.vue | 263 ++++++++---------- 2 files changed, 148 insertions(+), 191 deletions(-) diff --git a/yudao-ui-admin-vue3/src/views/bpm/form/form.data.ts b/yudao-ui-admin-vue3/src/views/bpm/form/form.data.ts index 8e2ed896c..a07a56596 100644 --- a/yudao-ui-admin-vue3/src/views/bpm/form/form.data.ts +++ b/yudao-ui-admin-vue3/src/views/bpm/form/form.data.ts @@ -1,4 +1,5 @@ -import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas' +import { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' + const { t } = useI18n() // 国际化 // 表单校验 @@ -7,52 +8,33 @@ export const rules = reactive({ }) // CrudSchema -const crudSchemas = reactive([ - { - label: t('common.index'), - field: 'id', - type: 'index', - form: { - show: false +const crudSchemas = reactive({ + primaryKey: 'id', + primaryType: 'seq', + primaryTitle: '表单编号', + action: true, + columns: [ + { + title: '表单名', + field: 'name', + isSearch: true }, - detail: { - show: false - } - }, - { - label: '表单名', - field: 'name', - search: { - show: true - } - }, - { - label: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number' - }, - { - label: '备注', - field: 'remark' - }, - { - label: t('common.createTime'), - field: 'createTime', - form: { - show: false - } - }, - { - label: t('table.action'), - field: 'action', - width: '240px', - form: { - show: false + { + title: t('common.status'), + field: 'status', + dictType: DICT_TYPE.COMMON_STATUS, + dictClass: 'number' }, - detail: { - show: false + { + title: '备注', + field: 'remark' + }, + { + title: t('common.createTime'), + field: 'createTime', + formatter: 'formatDate', + isForm: false } - } -]) -export const { allSchemas } = useCrudSchemas(crudSchemas) + ] +}) +export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/yudao-ui-admin-vue3/src/views/bpm/form/index.vue b/yudao-ui-admin-vue3/src/views/bpm/form/index.vue index eff394704..068b60b1f 100644 --- a/yudao-ui-admin-vue3/src/views/bpm/form/index.vue +++ b/yudao-ui-admin-vue3/src/views/bpm/form/index.vue @@ -1,165 +1,140 @@ - - -