diff --git a/src/components/Table/src/hooks/useRender.ts b/src/components/Table/src/hooks/useRender.ts
index 85d04903..4fdb080a 100644
--- a/src/components/Table/src/hooks/useRender.ts
+++ b/src/components/Table/src/hooks/useRender.ts
@@ -50,6 +50,9 @@ export const useRender = {
}
},
renderDict: (text, type, dictType?) => {
+ if (!text) {
+ return ''
+ }
if (type) {
return h(DictTag, {
type: type,
diff --git a/src/views/bpm/model/ModelModal.vue b/src/views/bpm/model/ModelModal.vue
new file mode 100644
index 00000000..7c8bc647
--- /dev/null
+++ b/src/views/bpm/model/ModelModal.vue
@@ -0,0 +1,49 @@
+
+
+
+
+
+
diff --git a/src/views/bpm/model/index.vue b/src/views/bpm/model/index.vue
index 3b64cfc4..644f4cf8 100644
--- a/src/views/bpm/model/index.vue
+++ b/src/views/bpm/model/index.vue
@@ -1,3 +1,75 @@
- 开发中
+
+
+
+
+ {{ t('action.create') }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/bpm/model/model.data.ts b/src/views/bpm/model/model.data.ts
new file mode 100644
index 00000000..31daccab
--- /dev/null
+++ b/src/views/bpm/model/model.data.ts
@@ -0,0 +1,102 @@
+import { BasicColumn, FormSchema, useRender } from '@/components/Table'
+import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
+
+export const columns: BasicColumn[] = [
+ {
+ title: '编号',
+ dataIndex: 'id',
+ width: 100
+ },
+ {
+ title: '流程标识',
+ dataIndex: 'key',
+ width: 180
+ },
+ {
+ title: '流程名称',
+ dataIndex: 'name',
+ width: 200
+ },
+ {
+ title: '流程分类',
+ dataIndex: 'category',
+ width: 180,
+ customRender: ({ text }) => {
+ return useRender.renderDict(text, DICT_TYPE.BPM_MODEL_CATEGORY, 'string')
+ }
+ },
+ {
+ title: '表单信息',
+ dataIndex: 'formType',
+ width: 200
+ },
+ {
+ title: '创建时间',
+ dataIndex: 'createTime',
+ width: 180,
+ customRender: ({ text }) => {
+ return useRender.renderDate(text)
+ }
+ }
+]
+
+export const searchFormSchema: FormSchema[] = [
+ {
+ label: '流程标识',
+ field: 'key',
+ component: 'Input',
+ colProps: { span: 8 }
+ },
+ {
+ label: '流程名称',
+ field: 'name',
+ component: 'Input',
+ colProps: { span: 8 }
+ },
+ {
+ label: '流程分类',
+ field: 'category',
+ component: 'Select',
+ componentProps: {
+ options: getIntDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY)
+ },
+ colProps: { span: 8 }
+ }
+]
+
+export const formSchema: FormSchema[] = [
+ {
+ label: '编号',
+ field: 'id',
+ show: false,
+ component: 'Input'
+ },
+ {
+ label: '流程标识',
+ field: 'key',
+ required: true,
+ component: 'Input',
+ dynamicDisabled: ({ values }) => !!values.id
+ },
+ {
+ label: '流程名称',
+ field: 'name',
+ required: true,
+ component: 'Input',
+ dynamicDisabled: ({ values }) => !!values.id
+ },
+ {
+ label: '流程分类',
+ field: 'category',
+ component: 'Select',
+ dynamicDisabled: ({ values }) => !!values.id,
+ componentProps: {
+ options: getIntDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY)
+ }
+ },
+ {
+ label: '流程描述',
+ field: 'description',
+ component: 'InputTextArea'
+ }
+]