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
4bc79c38
authored
Oct 17, 2024
by
GoldenZqqq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 空流程分类展示新建按钮、回显分类逻辑
parent
708e12b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletions
+26
-1
src/views/bpm/model/CategoryDraggableModel.vue
+19
-0
src/views/bpm/model/ModelForm.vue
+7
-1
No files found.
src/views/bpm/model/CategoryDraggableModel.vue
View file @
4bc79c38
...
...
@@ -23,6 +23,16 @@
<Icon
icon=
"fa:sort-amount-desc"
class=
"mr-5px"
/>
排序
</el-button>
<el-button
v-else
link
type=
"info"
class=
"mr-20px"
@
click
.
stop=
"handleAddModel('create')"
>
<Icon
icon=
"fa:plus"
class=
"mr-5px"
/>
新建
</el-button>
<el-dropdown
@
command=
"(command) => handleCategoryCommand(command)"
placement=
"bottom"
...
...
@@ -228,9 +238,12 @@
</div>
</
template
>
</Dialog>
<!-- 表单弹窗:添加流程模型 -->
<ModelForm
:categoryId=
"categoryInfo.code"
ref=
"modelFormRef"
@
success=
"emit('success')"
/>
</template>
<
script
lang=
"ts"
setup
>
import
ModelForm
from
'./ModelForm.vue'
import
{
CategoryApi
}
from
'@/api/bpm/category'
import
Sortable
from
'sortablejs'
import
{
propTypes
}
from
'@/utils/propTypes'
...
...
@@ -480,6 +493,12 @@ const handleDeleteGroup = async () => {
}
catch
{}
}
// 添加流程模型弹窗
const
modelFormRef
=
ref
()
const
handleAddModel
=
(
type
:
string
)
=>
{
modelFormRef
.
value
.
open
(
type
)
}
watch
(()
=>
props
.
categoryInfo
.
modelList
,
updateTableData
,
{
immediate
:
true
})
watch
(
()
=>
props
.
isCategorySorting
,
...
...
src/views/bpm/model/ModelForm.vue
View file @
4bc79c38
...
...
@@ -155,6 +155,7 @@
</Dialog>
</template>
<
script
lang=
"ts"
setup
>
import
{
propTypes
}
from
'@/utils/propTypes'
import
{
DICT_TYPE
,
getBoolDictOptions
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
ElMessageBox
}
from
'element-plus'
import
*
as
ModelApi
from
'@/api/bpm/model'
...
...
@@ -170,7 +171,9 @@ defineOptions({ name: 'ModelForm' })
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
const
userStore
=
useUserStoreWithOut
()
// 用户信息缓存
const
props
=
defineProps
({
categoryId
:
propTypes
.
number
})
const
dialogVisible
=
ref
(
false
)
// 弹窗的是否展示
const
dialogTitle
=
ref
(
''
)
// 弹窗的标题
const
formLoading
=
ref
(
false
)
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
...
...
@@ -232,6 +235,9 @@ const open = async (type: string, id?: string) => {
categoryList
.
value
=
await
CategoryApi
.
getCategorySimpleList
()
// 查询用户列表
userList
.
value
=
await
UserApi
.
getSimpleUserList
()
if
(
props
.
categoryId
)
{
formData
.
value
.
category
=
props
.
categoryId
}
}
defineExpose
({
open
})
// 提供 open 方法,用于打开弹窗
...
...
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