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 01/17] =?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 @@
+
+
+
+
v{{ row.version }}
@@ -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 3e2b5e1887a123dbf597503dd866e0a8654f51fa Mon Sep 17 00:00:00 2001
From: chengyangwang <1223440313@qq.com>
Date: Wed, 1 Mar 2023 17:09:03 +0800
Subject: [PATCH 02/17] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Del-tree=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6setCheckedKeys=E8=AE=BE=E7=BD=AE=E4=B8=80=E6=97=A6?=
=?UTF-8?q?=E9=80=89=E4=B8=AD=E7=88=B6=E7=BA=A7=E5=AD=90=E7=BA=A7=E4=B9=9F?=
=?UTF-8?q?=E8=A2=AB=E9=80=89=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/tenantPackage/index.vue | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue
index a665b8af..f8b81171 100644
--- a/src/views/system/tenantPackage/index.vue
+++ b/src/views/system/tenantPackage/index.vue
@@ -125,7 +125,9 @@ const handleUpdate = async (rowId: number) => {
const res = await TenantPackageApi.getTenantPackageApi(rowId)
unref(formRef)?.setValues(res)
// 设置选中
- unref(treeRef)?.setCheckedKeys(res.menuIds)
+ res.menuIds?.forEach((item: any) => {
+ unref(treeRef)?.setChecked(item, true,false);
+ })
}
// 提交按钮
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 03/17] =?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 d461fed75c51c60d0bf3ea08c82f08cf44ee31f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E8=BF=AA=E7=94=9F?= <2046353594@qq.com>
Date: Thu, 2 Mar 2023 15:15:47 +0800
Subject: [PATCH 04/17] =?UTF-8?q?chore:=20=E8=A7=84=E8=8C=83=E4=B8=8D?=
=?UTF-8?q?=E7=AC=A6=E5=90=88eslint=E6=A0=A1=E9=AA=8C=E8=A7=84=E5=88=99?=
=?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
types/global.d.ts | 1 -
1 file changed, 1 deletion(-)
diff --git a/types/global.d.ts b/types/global.d.ts
index 3179c200..6f583ba7 100644
--- a/types/global.d.ts
+++ b/types/global.d.ts
@@ -1,4 +1,3 @@
-import type { CSSProperties } from 'vue'
declare global {
declare interface Fn {
(...arg: T[]): T
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 05/17] =?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 06/17] =?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 07/17] =?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 08/17] =?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 @@
-
+
@@ -145,11 +145,12 @@ import { listSimpleUserGroupsApi } from '@/api/bpm/userGroup'
import { listSimpleDeptApi } from '@/api/system/dept'
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import { handleTree, defaultProps } from '@/utils/tree'
-import { allSchemas, rules } from './taskAssignRule.data'
+import { allSchemas, rules, idShowActionClick } from './taskAssignRule.data'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
const { query } = useRoute()
+const xGrid = ref()
// ========== 列表相关 ==========
@@ -165,6 +166,8 @@ const taskAssignScriptDictDatas = getDictOptions(DICT_TYPE.BPM_TASK_ASSIGN_SCRIP
const modelId = query.modelId
// 流程定义的编号。如果 processDefinitionId 非空,则用于流程定义的查看,不支持配置
const processDefinitionId = query.processDefinitionId
+let isShow = idShowActionClick(modelId)
+
// 查询参数
const queryParams = reactive({
modelId: modelId,
@@ -346,5 +349,10 @@ onMounted(() => {
listSimpleUserGroupsApi().then((data) => {
userGroupOptions.value.push(...data)
})
+ if (!isShow) {
+ setTimeout(() => {
+ xGrid.value.Ref.hideColumn('actionbtns')
+ }, 100)
+ }
})
diff --git a/src/views/bpm/taskAssignRule/taskAssignRule.data.ts b/src/views/bpm/taskAssignRule/taskAssignRule.data.ts
index 1ced3425..cad74325 100644
--- a/src/views/bpm/taskAssignRule/taskAssignRule.data.ts
+++ b/src/views/bpm/taskAssignRule/taskAssignRule.data.ts
@@ -43,4 +43,12 @@ const crudSchemas = reactive({
}
]
})
+
+export const idShowActionClick = (modelId?: any) => {
+ if (modelId) {
+ return true
+ } else {
+ return false
+ }
+}
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
From 0b9022c8a5b26d368c44b0fe920fd51aa4f57dee Mon Sep 17 00:00:00 2001
From: chengyangwang <1223440313@qq.com>
Date: Fri, 3 Mar 2023 12:52:50 +0800
Subject: [PATCH 09/17] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Del-tree=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6setCheckedKeys=E8=AE=BE=E7=BD=AE=E4=B8=80=E6=97=A6?=
=?UTF-8?q?=E9=80=89=E4=B8=AD=E7=88=B6=E7=BA=A7=E5=AD=90=E7=BA=A7=E4=B9=9F?=
=?UTF-8?q?=E8=A2=AB=E9=80=89=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/role/index.vue | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index 72c602c1..b2f12af3 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -122,7 +122,6 @@
ref="treeRef"
node-key="id"
show-checkbox
- :default-checked-keys="defaultCheckedKeys"
:check-strictly="!checkStrictly"
:props="defaultProps"
:data="treeOptions"
@@ -245,7 +244,6 @@ const dialogScopeVisible = ref(false)
const dialogScopeTitle = ref('数据权限')
const actionScopeType = ref('')
const dataScopeDictDatas = ref()
-const defaultCheckedKeys = ref()
// 选项
const checkStrictly = ref(true)
const treeNodeAll = ref(false)
@@ -258,13 +256,17 @@ const handleScope = async (type: string, row: RoleApi.RoleVO) => {
dataScopeForm.id = row.id
dataScopeForm.name = row.name
dataScopeForm.code = row.code
+
+ actionScopeType.value = type
+ dialogScopeVisible.value = true
if (type === 'menu') {
const menuRes = await listSimpleMenusApi()
treeOptions.value = handleTree(menuRes)
const role = await PermissionApi.listRoleMenusApi(row.id)
if (role) {
- // treeRef.value!.setCheckedKeys(role as unknown as Array)
- defaultCheckedKeys.value = role
+ role?.forEach((item: any) => {
+ unref(treeRef)?.setChecked(item, true,false);
+ })
}
} else if (type === 'data') {
const deptRes = await listSimpleDeptApi()
@@ -272,12 +274,12 @@ const handleScope = async (type: string, row: RoleApi.RoleVO) => {
const role = await RoleApi.getRoleApi(row.id)
dataScopeForm.dataScope = role.dataScope
if (role.dataScopeDeptIds) {
- // treeRef.value!.setCheckedKeys(role.dataScopeDeptIds as unknown as Array, false)
- defaultCheckedKeys.value = role.dataScopeDeptIds
+ role.dataScopeDeptIds?.forEach((item: any) => {
+ unref(treeRef)?.setChecked(item, true,false);
+ })
}
}
- actionScopeType.value = type
- dialogScopeVisible.value = true
+
}
// 保存权限
const submitScope = async () => {
From f63bccd1fe08ec29810443acfe3eca20c56157da Mon Sep 17 00:00:00 2001
From: gexinzhineng/gxzn27 <1348660141@qq.com>
Date: Fri, 3 Mar 2023 15:27:52 +0800
Subject: [PATCH 10/17] =?UTF-8?q?=E6=9F=A5=E7=9C=8BOA=E8=AF=B7=E5=81=87?=
=?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=B5=81=E7=A8=8B=E8=AF=A6=E6=83=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/bpm/oa/leave/detail.vue | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/views/bpm/oa/leave/detail.vue b/src/views/bpm/oa/leave/detail.vue
index bb30d075..25ac9981 100644
--- a/src/views/bpm/oa/leave/detail.vue
+++ b/src/views/bpm/oa/leave/detail.vue
@@ -2,6 +2,7 @@
+ 返回
@@ -9,7 +10,8 @@
// 业务相关的 import
import * as LeaveApi from '@/api/bpm/leave'
import { allSchemas } from '@/views/bpm/oa/leave/leave.data'
-
+import { useRouter } from 'vue-router'
+const router = useRouter()
const { query } = useRoute() // 查询参数
const message = useMessage() // 消息弹窗
@@ -22,6 +24,10 @@ const formData = ref({
reason: undefined
})
+const routerReturn = () => {
+ router.back()
+}
+
onMounted(() => {
id.value = query.id
if (!id.value) {
From 7a5a08d9a2dfbafc58c7b373974db2abcbf41d69 Mon Sep 17 00:00:00 2001
From: gexinzhineng/gxzn27 <1348660141@qq.com>
Date: Sat, 4 Mar 2023 10:37:07 +0800
Subject: [PATCH 11/17] =?UTF-8?q?=E7=A7=9F=E6=88=B7=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A0=A1=E9=AA=8C=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/tenant/tenant.data.ts | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/views/system/tenant/tenant.data.ts b/src/views/system/tenant/tenant.data.ts
index 7e81138c..110bfbb3 100644
--- a/src/views/system/tenant/tenant.data.ts
+++ b/src/views/system/tenant/tenant.data.ts
@@ -27,6 +27,24 @@ export const rules = reactive({
contactMobile: [required],
accountCount: [required],
expireTime: [required],
+ username: [
+ required,
+ {
+ min: 4,
+ max: 30,
+ trigger: 'blur',
+ message: '用户名称长度为 4-30 个字符'
+ }
+ ],
+ password: [
+ required,
+ {
+ min: 4,
+ max: 16,
+ trigger: 'blur',
+ message: '密码长度为 4-16 位'
+ }
+ ],
domain: [required],
status: [required]
})
From cea7b41ae83353de1baf6bd91b4130432caaf290 Mon Sep 17 00:00:00 2001
From: gexinzhineng/gxzn27 <1348660141@qq.com>
Date: Sat, 4 Mar 2023 13:19:49 +0800
Subject: [PATCH 12/17] =?UTF-8?q?=E7=A7=9F=E6=88=B7=E5=92=8C=E8=A7=92?=
=?UTF-8?q?=E8=89=B2=E7=AE=A1=E7=90=86=E7=9A=84=E8=8F=9C=E5=8D=95=E6=9D=83?=
=?UTF-8?q?=E9=99=90=E4=B8=8D=E8=83=BD=E6=BB=9A=E5=8A=A8=20=E7=A7=9F?=
=?UTF-8?q?=E6=88=B7=E6=96=B0=E5=A2=9E=E8=8F=9C=E5=8D=95=E6=9D=83=E9=99=90?=
=?UTF-8?q?=E6=A0=A1=E9=AA=8C=E4=B8=8D=E9=80=9A=E8=BF=87=20=E8=A7=92?=
=?UTF-8?q?=E8=89=B2=E7=AE=A1=E7=90=86=E8=AF=A6=E6=83=85=E9=A1=B5=E4=B8=8D?=
=?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=AF=B9=E5=BA=94=E7=9A=84=E9=83=A8=E9=97=A8?=
=?UTF-8?q?=20XTable=E4=B8=AD=E4=B8=BB=E9=A2=98=E9=A2=9C=E8=89=B2=E4=B8=8D?=
=?UTF-8?q?=E8=B7=9F=E9=9A=8F=E9=A1=B9=E7=9B=AE=E4=B8=BB=E4=BD=93=E4=B8=80?=
=?UTF-8?q?=E8=B5=B7=E5=88=87=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/XTable/src/XTable.vue | 31 ++++++++++++++++---
.../tenantPackage/tenantPackage.data.ts | 7 ++++-
src/views/system/user/index.vue | 24 +++++++++++++-
3 files changed, 56 insertions(+), 6 deletions(-)
diff --git a/src/components/XTable/src/XTable.vue b/src/components/XTable/src/XTable.vue
index 34f91ce0..e5c503ec 100644
--- a/src/components/XTable/src/XTable.vue
+++ b/src/components/XTable/src/XTable.vue
@@ -12,7 +12,7 @@ import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign'
import { XTableProps } from './type'
import { isBoolean, isFunction } from '@/utils/is'
-
+import styleCss from './style/dark.scss'
import download from '@/utils/download'
const { t } = useI18n()
@@ -25,15 +25,38 @@ const prefixCls = getPrefixCls('x-vxe-table')
const attrs = useAttrs()
const emit = defineEmits(['register'])
-
+const removeStyles = () => {
+ var filename = 'cssTheme'
+ //移除引入的文件名
+ var targetelement = 'style'
+ var targetattr = 'id'
+ var allsuspects = document.getElementsByTagName(targetelement)
+ for (var i = allsuspects.length; i >= 0; i--) {
+ if (
+ allsuspects[i] &&
+ allsuspects[i].getAttribute(targetattr) != null &&
+ allsuspects[i].getAttribute(targetattr)?.indexOf(filename) != -1
+ ) {
+ console.log(allsuspects[i], 'node')
+ allsuspects[i].parentNode?.removeChild(allsuspects[i])
+ }
+ }
+}
+const reImport = () => {
+ var head = document.getElementsByTagName('head')[0]
+ var style = document.createElement('style')
+ style.innerText = styleCss
+ style.id = 'cssTheme'
+ head.appendChild(style)
+}
watch(
() => appStore.getIsDark,
() => {
if (appStore.getIsDark == true) {
- import('./style/dark.scss')
+ reImport()
}
if (appStore.getIsDark == false) {
- import('./style/light.scss')
+ removeStyles()
}
},
{ immediate: true }
diff --git a/src/views/system/tenantPackage/tenantPackage.data.ts b/src/views/system/tenantPackage/tenantPackage.data.ts
index e28ea842..de06c2cb 100644
--- a/src/views/system/tenantPackage/tenantPackage.data.ts
+++ b/src/views/system/tenantPackage/tenantPackage.data.ts
@@ -33,7 +33,12 @@ const crudSchemas = reactive({
{
title: '菜单权限',
field: 'menuIds',
- isTable: false
+ isTable: false,
+ form: {
+ colProps: {
+ span: 24
+ }
+ }
},
{
title: t('form.remark'),
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index bccab852..5568ca2a 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -159,7 +159,7 @@
:data="detailData"
>
- {{ row.dept?.name }}
+ {{ dataFormater(row.deptId) }}
@@ -332,6 +332,28 @@ const getPostOptions = async () => {
const res = await listSimplePostsApi()
postOptions.value.push(...res)
}
+const dataFormater = (val) => {
+ return deptFormater(deptOptions.value, val)
+}
+//部门回显
+const deptFormater = (ary, val: any) => {
+ var o = ''
+ if (ary && val) {
+ for (const v of ary) {
+ if (v.id == val) {
+ o = v.name
+ if (o) return o
+ } else if (v.children?.length) {
+ o = deptFormater(v.children, val)
+ if (o) return o
+ }
+ }
+ return o
+ } else {
+ return val
+ }
+}
+
// 设置标题
const setDialogTile = async (type: string) => {
dialogTitle.value = t('action.' + type)
From 3c6554c05834c7ba12e7cc9303cc9f93ce9d02fd Mon Sep 17 00:00:00 2001
From: gexinzhineng/gxzn27 <1348660141@qq.com>
Date: Sat, 4 Mar 2023 13:44:46 +0800
Subject: [PATCH 13/17] =?UTF-8?q?=E7=A7=9F=E6=88=B7=E5=92=8C=E8=A7=92?=
=?UTF-8?q?=E8=89=B2=E7=AE=A1=E7=90=86=E7=9A=84=E8=8F=9C=E5=8D=95=E6=9D=83?=
=?UTF-8?q?=E9=99=90=E4=B8=8D=E8=83=BD=E6=BB=9A=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/role/index.vue | 98 +++++++++++++-----------
src/views/system/tenantPackage/index.vue | 23 +++++-
2 files changed, 76 insertions(+), 45 deletions(-)
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index 72c602c1..97993f5f 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -99,37 +99,41 @@
-
-
-
- 父子联动(选中父节点,自动选择子节点):
-
- 全选/全不选:
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -245,26 +249,28 @@ const dialogScopeVisible = ref(false)
const dialogScopeTitle = ref('数据权限')
const actionScopeType = ref('')
const dataScopeDictDatas = ref()
-const defaultCheckedKeys = ref()
// 选项
-const checkStrictly = ref(true)
-const treeNodeAll = ref(false)
+const checkStrictly = ref(false)
+// const treeNodeAll = ref(false)
// 全选/全不选
-const handleCheckedTreeNodeAll = () => {
- treeRef.value!.setCheckedNodes(treeNodeAll.value ? treeOptions.value : [])
-}
+// const handleCheckedTreeNodeAll = () => {
+// treeRef.value!.setCheckedNodes(treeNodeAll.value ? treeOptions.value : [])
+// }
// 权限操作
const handleScope = async (type: string, row: RoleApi.RoleVO) => {
dataScopeForm.id = row.id
dataScopeForm.name = row.name
dataScopeForm.code = row.code
+ actionScopeType.value = type
+ dialogScopeVisible.value = true
if (type === 'menu') {
const menuRes = await listSimpleMenusApi()
treeOptions.value = handleTree(menuRes)
const role = await PermissionApi.listRoleMenusApi(row.id)
if (role) {
- // treeRef.value!.setCheckedKeys(role as unknown as Array)
- defaultCheckedKeys.value = role
+ role?.forEach((item: any) => {
+ unref(treeRef)?.setChecked(item, true, false)
+ })
}
} else if (type === 'data') {
const deptRes = await listSimpleDeptApi()
@@ -272,12 +278,11 @@ const handleScope = async (type: string, row: RoleApi.RoleVO) => {
const role = await RoleApi.getRoleApi(row.id)
dataScopeForm.dataScope = role.dataScope
if (role.dataScopeDeptIds) {
- // treeRef.value!.setCheckedKeys(role.dataScopeDeptIds as unknown as Array, false)
- defaultCheckedKeys.value = role.dataScopeDeptIds
+ role.dataScopeDeptIds?.forEach((item: any) => {
+ unref(treeRef)?.setChecked(item, true, false)
+ })
}
}
- actionScopeType.value = type
- dialogScopeVisible.value = true
}
// 保存权限
const submitScope = async () => {
@@ -312,3 +317,10 @@ onMounted(() => {
init()
})
+
diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue
index a665b8af..9222365b 100644
--- a/src/views/system/tenantPackage/index.vue
+++ b/src/views/system/tenantPackage/index.vue
@@ -25,7 +25,7 @@
ref="formRef"
>
-
+