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
b2ba183e
authored
Feb 11, 2025
by
lizhixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 移除流程图标必填校验,当图标不存在时自动生成图标样式
parent
1cafde38
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
pnpm-lock.yaml
+0
-0
src/views/bpm/model/CategoryDraggableModel.vue
+21
-0
src/views/bpm/model/form/BasicInfo.vue
+1
-2
No files found.
pnpm-lock.yaml
View file @
b2ba183e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/views/bpm/model/CategoryDraggableModel.vue
View file @
b2ba183e
...
...
@@ -88,6 +88,9 @@
/>
</el-tooltip>
<el-image
v-if=
"row.icon"
:src=
"row.icon"
class=
"h-38px w-38px mr-10px rounded"
/>
<div
v-else
class=
"flow-icon"
>
<span
style=
"font-size: 12px; color: #fff"
>
{{
sliceName
(
row
.
name
)
}}
</span>
</div>
{{
row
.
name
}}
</div>
</
template
>
...
...
@@ -592,6 +595,13 @@ const openModelForm = async (type: string, id?: number) => {
}
}
// 处理显示的名称
const
sliceName
=
(
name
:
string
)
=>
{
if
(
name
.
length
>
2
)
{
return
name
.
slice
(
0
,
2
)
}
return
name
}
watchEffect
(()
=>
{
if
(
props
.
categoryInfo
?.
modelList
)
{
updateModeList
()
...
...
@@ -617,6 +627,17 @@ watchEffect(() => {
}
</
style
>
<
style
lang=
"scss"
scoped
>
.flow-icon
{
display
:
flex
;
width
:
38px
;
height
:
38px
;
margin-right
:
10px
;
background-color
:
var
(
--el-color-primary
);
border-radius
:
0.25rem
;
align-items
:
center
;
justify-content
:
center
;
}
.category-draggable-model
{
:deep(.el-table__cell)
{
overflow
:
hidden
;
...
...
src/views/bpm/model/form/BasicInfo.vue
View file @
b2ba183e
...
...
@@ -41,7 +41,7 @@
/>
</el-select>
</el-form-item>
<el-form-item
label=
"流程图标"
prop=
"icon"
class=
"mb-20px"
>
<el-form-item
label=
"流程图标"
class=
"mb-20px"
>
<UploadImg
v-model=
"modelData.icon"
:limit=
"1"
height=
"64px"
width=
"64px"
/>
</el-form-item>
<el-form-item
label=
"流程描述"
prop=
"description"
class=
"mb-20px"
>
...
...
@@ -155,7 +155,6 @@ const rules = {
name
:
[{
required
:
true
,
message
:
'流程名称不能为空'
,
trigger
:
'blur'
}],
key
:
[{
required
:
true
,
message
:
'流程标识不能为空'
,
trigger
:
'blur'
}],
category
:
[{
required
:
true
,
message
:
'流程分类不能为空'
,
trigger
:
'blur'
}],
icon
:
[{
required
:
true
,
message
:
'流程图标不能为空'
,
trigger
:
'blur'
}],
type
:
[{
required
:
true
,
message
:
'是否可见不能为空'
,
trigger
:
'blur'
}],
visible
:
[{
required
:
true
,
message
:
'是否可见不能为空'
,
trigger
:
'blur'
}],
managerUserIds
:
[{
required
:
true
,
message
:
'流程管理员不能为空'
,
trigger
:
'blur'
}]
...
...
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