From 66856ae05258d6066a9227c6a2836e6615049230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=92=B1=E5=93=A5=E4=B8=B6?= <385454831@qq.com> Date: Sun, 9 Apr 2023 12:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84VUE3=E3=80=90OA=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B-=E8=AF=B7=E5=81=87=E6=9F=A5=E8=AF=A2=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/oa/leave/create.vue | 143 ++++++++++----- src/views/bpm/oa/leave/detail.vue | 66 ++++--- src/views/bpm/oa/leave/index.vue | 262 +++++++++++++++++++++------ src/views/bpm/oa/leave/leave.data.ts | 91 ---------- 4 files changed, 337 insertions(+), 225 deletions(-) delete mode 100644 src/views/bpm/oa/leave/leave.data.ts diff --git a/src/views/bpm/oa/leave/create.vue b/src/views/bpm/oa/leave/create.vue index 9e99e814..dd932627 100644 --- a/src/views/bpm/oa/leave/create.vue +++ b/src/views/bpm/oa/leave/create.vue @@ -1,56 +1,107 @@ diff --git a/src/views/bpm/oa/leave/detail.vue b/src/views/bpm/oa/leave/detail.vue index e35de6e5..31e54de3 100644 --- a/src/views/bpm/oa/leave/detail.vue +++ b/src/views/bpm/oa/leave/detail.vue @@ -1,42 +1,40 @@ - diff --git a/src/views/bpm/oa/leave/index.vue b/src/views/bpm/oa/leave/index.vue index 22d86dfe..c6979f1a 100644 --- a/src/views/bpm/oa/leave/index.vue +++ b/src/views/bpm/oa/leave/index.vue @@ -1,83 +1,237 @@ + + + + + + + + + + + 搜索 + 重置 + 发起请假 + + + - diff --git a/src/views/bpm/oa/leave/leave.data.ts b/src/views/bpm/oa/leave/leave.data.ts deleted file mode 100644 index 5b6f2c52..00000000 --- a/src/views/bpm/oa/leave/leave.data.ts +++ /dev/null @@ -1,91 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -const { t } = useI18n() // 国际化 - -// 表单校验 -export const rules = reactive({ - startTime: [{ required: true, message: '开始时间不能为空', trigger: 'blur' }], - endTime: [{ required: true, message: '结束时间不能为空', trigger: 'blur' }], - type: [{ required: true, message: '请假类型不能为空', trigger: 'change' }] -}) - -// crudSchemas -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '申请编号', - action: true, - actionWidth: '260', - searchSpan: 8, - columns: [ - { - title: t('common.status'), - field: 'result', - dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, - dictClass: 'number', - isSearch: true, - isForm: false - }, - { - title: t('common.startTimeText'), - field: 'startTime', - formatter: 'formatDay', - table: { - width: 180 - }, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - form: { - component: 'DatePicker' - } - }, - { - title: t('common.endTimeText'), - field: 'endTime', - formatter: 'formatDay', - table: { - width: 180 - }, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - form: { - component: 'DatePicker' - } - }, - { - title: '请假类型', - field: 'type', - dictType: DICT_TYPE.BPM_OA_LEAVE_TYPE, - dictClass: 'number', - isSearch: true - }, - { - title: '原因', - field: 'reason', - isSearch: true, - componentProps: { - type: 'textarea', - rows: 4 - } - }, - { - title: '申请时间', - field: 'createTime', - formatter: 'formatDate', - table: { - width: 180 - }, - isSearch: true, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - }, - isForm: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas)