Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
753a32ae
authored
Oct 08, 2024
by
GoldenZqqq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 流程模型页面布局重构
parent
4b2785bd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
62 deletions
+49
-62
src/views/bpm/model/index.vue
+49
-62
src/views/bpm/model/index_old.vue
+0
-0
No files found.
src/views/bpm/model/index.vue
View file @
753a32ae
<
template
>
<doc-alert
title=
"流程设计器(BPMN)"
url=
"https://doc.iocoder.cn/bpm/model-designer-dingding/"
/>
<doc-alert
title=
"流程设计器(钉钉、飞书)"
url=
"https://doc.iocoder.cn/bpm/model-designer-bpmn/"
/>
<doc-alert
title=
"选择审批人、发起人自选"
url=
"https://doc.iocoder.cn/bpm/assignee/"
/>
<doc-alert
title=
"会签、或签、依次审批"
url=
"https://doc.iocoder.cn/bpm/multi-instance/"
/>
<ContentWrap>
<div
class=
"flex justify-between pl-20px items-center"
>
<h3>
表单管理
</h3>
<!-- 搜索工作栏 -->
<el-form
class=
"-mb-15p
x"
class=
"-mb-15px fle
x"
:model=
"queryParams"
ref=
"queryFormRef"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
label=
"流程标识"
prop=
"key
"
>
<el-form-item
align=
"right"
prop=
"key"
class=
"ml-auto
"
>
<el-input
v-model=
"queryParams.key"
placeholder=
"请输入流程标识"
clearable
@
keyup
.
enter=
"handleQuery"
class=
"!w-240px"
/>
</el-form-item>
<el-form-item
label=
"流程名称"
prop=
"name"
>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入流程名称"
placeholder=
"搜索流程"
clearable
@
keyup
.
enter=
"handleQuery"
class=
"!w-240px"
/>
</el-form-item>
<el-form-item
label=
"流程分类"
prop=
"category"
>
<el-select
v-model=
"queryParams.category"
placeholder=
"请选择流程分类"
clearable
class=
"!w-240px"
>
<el-option
v-for=
"category in categoryList"
:key=
"category.code"
:label=
"category.name"
:value=
"category.code"
/>
</el-select>
<template
#
prefix
>
<Icon
icon=
"ep:search"
class=
"mx-10px"
/>
</
template
>
</el-input>
</el-form-item>
<el-form-item>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<el-button
type=
"primary"
plain
@
click=
"openForm('create')"
v-hasPermi=
"['bpm:model:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新建
<el-button
type=
"primary"
@
click=
"openForm('create')"
v-hasPermi=
"['bpm:model:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新建流程
</el-button>
</el-form-item>
<el-form-item>
<el-button
type=
"info"
plain
>
<Icon
icon=
"ep:setting"
/>
</el-button>
</el-form-item>
</el-form>
</ContentWrap
>
</div
>
<!-- 列表 -->
<ContentWrap>
<el-divider
/>
<!-- 分类卡片组 -->
<div
class=
"px-30px"
>
<ContentWrap
v-for=
"(list, title) in categoryGroup"
:key=
"title"
>
<h3
class=
"ml-20px"
>
{{ title }}
</h3>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"流程名称"
align=
"center"
prop=
"name"
min-width=
"200"
/>
<el-table-column
label=
"流程图标"
align=
"center"
prop=
"icon"
min-width=
"100"
>
<el-table-column
label=
"流程名"
align=
"center"
prop=
"name"
min-width=
"200"
>
<
template
#
default=
"scope"
>
<el-image
:src=
"scope.row.icon"
class=
"h-32px w-32px"
/>
<div
class=
"flex items-center justify-center"
>
<el-image
:src=
"scope.row.icon"
class=
"h-32px w-32px mr-10px rounded"
/>
{{
scope
.
row
.
name
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"可见范围"
align=
"center"
prop=
"startUserIds"
min-width=
"100"
>
...
...
@@ -167,7 +146,11 @@
<el-dropdown
class=
"!align-middle ml-5px"
@
command=
"(command) => handleCommand(command, scope.row)"
v-hasPermi=
"['bpm:process-definition:query', 'bpm:model:update', 'bpm:model:delete']"
v-hasPermi=
"[
'bpm:process-definition:query',
'bpm:model:update',
'bpm:model:delete'
]"
>
<el-button
type=
"primary"
link
>
更多
</el-button>
<template
#
dropdown
>
...
...
@@ -199,13 +182,8 @@
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total=
"total"
v-model:page=
"queryParams.pageNo"
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</ContentWrap>
</div>
</ContentWrap>
<!-- 表单弹窗:添加/修改流程 -->
...
...
@@ -227,6 +205,7 @@ import { CategoryApi } from '@/api/bpm/category'
import
{
BpmModelType
}
from
'@/utils/constants'
import
{
checkPermi
}
from
'@/utils/permission'
import
{
useUserStoreWithOut
}
from
'@/store/modules/user'
import
{
groupBy
}
from
'lodash-es'
defineOptions
({
name
:
'BpmModel'
})
...
...
@@ -236,8 +215,6 @@ const { push } = useRouter() // 路由
const
userStore
=
useUserStoreWithOut
()
// 用户信息缓存
const
loading
=
ref
(
true
)
// 列表的加载中
const
total
=
ref
(
0
)
// 列表的总页数
const
list
=
ref
([])
// 列表的数据
const
queryParams
=
reactive
({
pageNo
:
1
,
pageSize
:
10
,
...
...
@@ -247,14 +224,15 @@ const queryParams = reactive({
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
categoryList
=
ref
([])
// 流程分类列表
const
categoryGroup
=
ref
({})
// 按照category分组的数据
/** 查询列表 */
const
getList
=
async
()
=>
{
loading
.
value
=
true
try
{
// TODO 芋艿:这里需要一个不分页查全部的流程模型接口
const
data
=
await
ModelApi
.
getModelPage
(
queryParams
)
list
.
value
=
data
.
list
total
.
value
=
data
.
total
categoryGroup
.
value
=
groupBy
(
data
.
list
,
'categoryName'
)
}
finally
{
loading
.
value
=
false
}
...
...
@@ -402,3 +380,12 @@ onMounted(async () => {
categoryList
.
value
=
await
CategoryApi
.
getCategorySimpleList
()
})
</
script
>
<
style
lang=
"scss"
scoped
>
:deep
(
.el-form--inline
.el-form-item
)
{
margin-right
:
10px
;
}
:deep
(
.el-divider--horizontal
)
{
margin-top
:
10px
;
}
</
style
>
src/views/bpm/model/index_old.vue
0 → 100644
View file @
753a32ae
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment