From 2d3227c5bcbe8e48b3ee7c093dd661c5205c7cd5 Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Wed, 1 Mar 2023 14:51:26 +0800 Subject: [PATCH 1/7] =?UTF-8?q?1=E3=80=81=E5=8F=91=E8=B5=B7=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E9=A1=B5=E9=9D=A2=20=E6=B5=81=E7=A8=8B=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=202=E3=80=81?= =?UTF-8?q?=E9=82=AE=E7=AE=B1=E6=A0=A1=E9=AA=8C=E7=BB=9F=E4=B8=80=203?= =?UTF-8?q?=E3=80=81=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=BC=96=E5=8F=B7=E6=8D=A2=E6=88=90id?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=88=E4=B9=8B=E5=89=8D=E6=98=AF=E5=BA=8F?= =?UTF-8?q?=E5=8F=B7=EF=BC=8Cvue2=E7=89=88=E6=9C=AC=E4=B8=BAid=EF=BC=8C?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AF=B4=E5=AE=B9=E6=98=93=E5=92=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=A1=BA=E5=BA=8F=E6=90=9E=E6=B7=B7=EF=BC=89=204?= =?UTF-8?q?=E3=80=81bpmnjs=E6=B5=81=E8=BD=AC=E6=9D=A1=E4=BB=B6=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=87=AA=E5=8A=A8=E4=BF=9D=E5=AD=98=E5=9B=9E=E6=98=BE?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../package/penal/flow-condition/FlowCondition.vue | 14 ++++++++------ src/views/bpm/processInstance/create.vue | 5 +++++ src/views/bpm/processInstance/process.create.ts | 7 ++++++- src/views/system/dept/dept.data.ts | 10 +++++++++- src/views/system/mail/account/account.data.ts | 12 +++++++++++- src/views/system/role/role.data.ts | 13 ++++++++++--- 6 files changed, 49 insertions(+), 12 deletions(-) diff --git a/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue b/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue index ee4512e7..ae1d1567 100644 --- a/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue +++ b/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue @@ -79,7 +79,7 @@ const resetFlowCondition = () => { if ( bpmnElementSourceRef.value && bpmnElementSourceRef.value.default && - bpmnElementSourceRef.value.default.id === this.bpmnElement.id + bpmnElementSourceRef.value.default.id === bpmnElement.value.id ) { // 默认 flowConditionForm.value = { type: 'default' } @@ -175,11 +175,13 @@ onBeforeUnmount(() => { watch( () => props.businessObject, (val) => { - if (val) { - nextTick(() => { - resetFlowCondition() - }) - } + console.log(val, 'val') + nextTick(() => { + resetFlowCondition() + }) + }, + { + immediate: true } ) diff --git a/src/views/bpm/processInstance/create.vue b/src/views/bpm/processInstance/create.vue index c0542b22..084c085c 100644 --- a/src/views/bpm/processInstance/create.vue +++ b/src/views/bpm/processInstance/create.vue @@ -3,6 +3,10 @@
+ + @@ -56,6 +60,7 @@ import * as DefinitionApi from '@/api/bpm/definition' import * as ProcessInstanceApi from '@/api/bpm/processInstance' import { setConfAndFields2 } from '@/utils/formCreate' import { ApiAttrs } from '@form-create/element-ui/types/config' +import { DICT_TYPE } from '@/utils/dict' const router = useRouter() // 路由 const message = useMessage() // 消息 diff --git a/src/views/bpm/processInstance/process.create.ts b/src/views/bpm/processInstance/process.create.ts index b2282406..7516c0b4 100644 --- a/src/views/bpm/processInstance/process.create.ts +++ b/src/views/bpm/processInstance/process.create.ts @@ -14,7 +14,12 @@ const crudSchemas = reactive({ title: '流程分类', field: 'category', dictType: DICT_TYPE.BPM_MODEL_CATEGORY, - dictClass: 'number' + dictClass: 'number', + table: { + slots: { + default: 'category_default' + } + } }, { title: '流程版本', diff --git a/src/views/system/dept/dept.data.ts b/src/views/system/dept/dept.data.ts index 5e3d0761..c6945841 100644 --- a/src/views/system/dept/dept.data.ts +++ b/src/views/system/dept/dept.data.ts @@ -6,7 +6,15 @@ const { t } = useI18n() // 国际化 export const rules = reactive({ name: [required], sort: [required], - email: [required], + // email: [required], + email: [ + { required: true, message: t('profile.rules.mail'), trigger: 'blur' }, + { + type: 'email', + message: t('profile.rules.truemail'), + trigger: ['blur', 'change'] + } + ], phone: [ { len: 11, diff --git a/src/views/system/mail/account/account.data.ts b/src/views/system/mail/account/account.data.ts index a2e29f85..bd05ce4f 100644 --- a/src/views/system/mail/account/account.data.ts +++ b/src/views/system/mail/account/account.data.ts @@ -1,8 +1,18 @@ import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' +const { t } = useI18n() // 国际化 + // 表单校验 export const rules = reactive({ - mail: [required], + // mail: [required], + mail: [ + { required: true, message: t('profile.rules.mail'), trigger: 'blur' }, + { + type: 'email', + message: t('profile.rules.truemail'), + trigger: ['blur', 'change'] + } + ], username: [required], password: [required], host: [required], diff --git a/src/views/system/role/role.data.ts b/src/views/system/role/role.data.ts index fef2ec47..d55b5e21 100644 --- a/src/views/system/role/role.data.ts +++ b/src/views/system/role/role.data.ts @@ -9,12 +9,19 @@ export const rules = reactive({ }) // CrudSchema const crudSchemas = reactive({ - primaryKey: 'id', - primaryTitle: '角色编号', - primaryType: 'seq', + // primaryKey: 'id', + // primaryTitle: '角色编号', + // primaryType: 'seq', action: true, actionWidth: '400px', columns: [ + { + title: '角色编号', + field: 'id', + table: { + width: 200 + } + }, { title: '角色名称', field: 'name', From 60691df3a6df0abb948130e97dd7fbdc50e3c25d Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Thu, 2 Mar 2023 11:26:28 +0800 Subject: [PATCH 2/7] =?UTF-8?q?bpmnjs=E6=B5=81=E7=A8=8B=E5=9B=BE=20?= =?UTF-8?q?=E6=B5=81=E8=BD=AC=E6=9D=A1=E4=BB=B6=E5=88=87=E6=8D=A2=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../package/penal/flow-condition/FlowCondition.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue b/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue index ae1d1567..833a14c2 100644 --- a/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue +++ b/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue @@ -79,7 +79,8 @@ const resetFlowCondition = () => { if ( bpmnElementSourceRef.value && bpmnElementSourceRef.value.default && - bpmnElementSourceRef.value.default.id === bpmnElement.value.id + bpmnElementSourceRef.value.default.id === bpmnElement.value.id && + flowConditionForm.value.type == 'default' ) { // 默认 flowConditionForm.value = { type: 'default' } From 3156606c9027e043ee28c8cc4f13b44fe6b44f68 Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Thu, 2 Mar 2023 15:34:14 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=E9=9C=80=E8=A6=81=E5=A1=AB?= =?UTF-8?q?=E5=86=99=E6=89=8B=E6=9C=BA=E5=8F=B7=EF=BC=88=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E5=88=9B=E5=BB=BA=E9=9C=80=E8=A6=81=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E7=84=B6=E4=BC=9A=E6=8A=A5=E9=94=99=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/index.vue | 39 +++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index d125112d..bccab852 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -386,24 +386,31 @@ const handleDetail = async (rowId: number) => { // 提交按钮 const submitForm = async () => { - loading.value = true // 提交请求 - try { - const data = unref(formRef)?.formModel as UserApi.UserVO - if (actionType.value === 'create') { - await UserApi.createUserApi(data) - message.success(t('common.createSuccess')) - } else { - await UserApi.updateUserApi(data) - message.success(t('common.updateSuccess')) + const elForm = unref(formRef)?.getElFormRef() + if (!elForm) return + elForm.validate(async (valid) => { + if (valid) { + try { + const data = unref(formRef)?.formModel as UserApi.UserVO + if (actionType.value === 'create') { + await UserApi.createUserApi(data) + loading.value = true + message.success(t('common.createSuccess')) + } else { + await UserApi.updateUserApi(data) + loading.value = true + message.success(t('common.updateSuccess')) + } + dialogVisible.value = false + } finally { + // unref(formRef)?.setSchema(allSchemas.formSchema) + // 刷新列表 + await reload() + loading.value = false + } } - dialogVisible.value = false - } finally { - // unref(formRef)?.setSchema(allSchemas.formSchema) - // 刷新列表 - await reload() - loading.value = false - } + }) } // 改变用户状态操作 const handleStatusChange = async (row: UserApi.UserVO) => { From 9e66efdc508d6ba582fdff01a51967e8d827c07c Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Thu, 2 Mar 2023 15:57:40 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/user.data.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/system/user/user.data.ts b/src/views/system/user/user.data.ts index 12c777fc..7648faf2 100644 --- a/src/views/system/user/user.data.ts +++ b/src/views/system/user/user.data.ts @@ -5,6 +5,7 @@ const { t } = useI18n() export const rules = reactive({ username: [required], nickname: [required], + password: [required], email: [ { required: true, message: t('profile.rules.mail'), trigger: 'blur' }, { From 31505ae35bb6b55347f5832d8333d8e9466b102c Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Thu, 2 Mar 2023 16:08:21 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E5=AF=BC=E8=87=B4=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E6=8A=A5=E9=94=99bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/user.data.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/system/user/user.data.ts b/src/views/system/user/user.data.ts index 7648faf2..eb20b999 100644 --- a/src/views/system/user/user.data.ts +++ b/src/views/system/user/user.data.ts @@ -6,6 +6,7 @@ export const rules = reactive({ username: [required], nickname: [required], password: [required], + deptId: [required], email: [ { required: true, message: t('profile.rules.mail'), trigger: 'blur' }, { From c5cb59f4ba25e67928d0e31af4ac287fa4c93fc6 Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Thu, 2 Mar 2023 16:46:39 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=86=E9=85=8D?= =?UTF-8?q?=E8=A7=84=E5=88=99=E9=A1=B5=E9=9D=A2vxe=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=A0=8F=E6=98=BE=E7=A4=BA=E9=9A=90=E8=97=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/taskAssignRule/index.vue | 12 ++++++++++-- src/views/bpm/taskAssignRule/taskAssignRule.data.ts | 8 ++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/views/bpm/taskAssignRule/index.vue b/src/views/bpm/taskAssignRule/index.vue index e6e4b88f..012e6f68 100644 --- a/src/views/bpm/taskAssignRule/index.vue +++ b/src/views/bpm/taskAssignRule/index.vue @@ -1,7 +1,7 @@