Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weiqiao-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
金民
weiqiao-vue
Commits
a2a01f2c
Commit
a2a01f2c
authored
Feb 27, 2026
by
胡鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不合格品处理增加审批流程发起 查看
parent
99dd1c39
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
275 additions
and
16 deletions
+275
-16
xjrsoft-vue3/src/api/workflow/design.ts
+0
-0
xjrsoft-vue3/src/components/CreateCodeStep/src/components/PickTemplateFlow.vue
+1
-1
xjrsoft-vue3/src/views/workflow/task/FlowLaunch.vue
+1
-1
xjrsoft-vue3/src/views/workflow/task/components/LookProcess.vue
+11
-9
xjrsoft-vue3/src/views/zlgl/bhgpcl/components/config.ts
+1
-1
xjrsoft-vue3/src/views/zlgl/bhgpcl/index.vue
+261
-4
No files found.
xjrsoft-vue3/src/api/workflow/design.ts
View file @
a2a01f2c
xjrsoft-vue3/src/components/CreateCodeStep/src/components/PickTemplateFlow.vue
View file @
a2a01f2c
...
...
@@ -123,7 +123,7 @@
};
let
res
=
await
getDesignPage
(
params
);
page
.
total
=
res
.
total
;
template
.
list
=
res
.
list
;
//
template.list = res.list;
}
catch
(
error
)
{}
}
function
submit
()
{
...
...
xjrsoft-vue3/src/views/workflow/task/FlowLaunch.vue
View file @
a2a01f2c
...
...
@@ -169,7 +169,7 @@
try
{
let
res
=
await
getDesignPage
(
searchParams
);
data
.
pagination
.
total
=
res
.
total
;
data
.
list
=
res
.
list
;
//
data.list = res.list;
}
catch
(
error
)
{}
}
...
...
xjrsoft-vue3/src/views/workflow/task/components/LookProcess.vue
View file @
a2a01f2c
...
...
@@ -60,17 +60,19 @@
}
});
async
function
look
()
{
if
(
props
.
processId
)
{
showLoading
.
value
=
false
;
visible
.
value
=
true
;
}
else
{
showLoading
.
value
=
false
;
notification
.
open
({
type
:
'error'
,
message
:
t
(
'查看'
),
description
:
t
(
'请选择一个流程进行查看'
),
});
}
// if (props.processId) {
// showLoading.value = false;
// visible.value = true;
// } else {
// showLoading.value = false;
// notification.open({
// type: 'error',
// message: t('查看'),
// description: t('请选择一个流程进行查看'),
// });
// }
}
function
close
()
{
visible
.
value
=
false
;
...
...
xjrsoft-vue3/src/views/zlgl/bhgpcl/components/config.ts
View file @
a2a01f2c
...
...
@@ -150,7 +150,7 @@ export const columns: BasicColumn[] = [
{
resizable
:
true
,
dataIndex
:
'lydjlx'
,
title
:
'来源单据'
,
title
:
'来源单据
111
'
,
componentType
:
'input'
,
fixed
:
false
,
...
...
xjrsoft-vue3/src/views/zlgl/bhgpcl/index.vue
View file @
a2a01f2c
...
...
@@ -28,11 +28,36 @@
<template
v-if=
"column.dataIndex === 'action'"
>
<div
style=
"display: flex; align-items: center;"
>
<!-- 其他按钮使用TableAction组件 -->
<TableAction
:actions=
"getLessActions(record)"
:dropDownActions=
"getMoreActions(record)"
/>
<!-- 单独渲染流程按钮 -->
<template
v-if=
"!record.taskId"
>
<a-button
type=
"text"
size=
"small"
style=
"margin-left: 8px;color: #1c8dff; "
@
click=
"openFlowLaunchModal(record.id)"
>
<template
#
icon
><Icon
style=
"color: #1c8dff;"
:icon=
"'ant-design:rocket-outlined'"
/></
template
>
发起流程
</a-button>
</template>
<
template
v-else
>
<a-button
type=
"text"
size=
"small"
style=
"margin-left: 8px;color: #1c8dff;"
@
click=
"viewProcess(record)"
>
<template
#
icon
><Icon
style=
"color: #1c8dff;"
:icon=
"'ant-design:eye-outlined'"
/></
template
>
查看流程
</a-button>
</template>
</div>
</template>
<
template
v-else-if=
"column.dataIndex && column?.listStyle"
>
...
...
@@ -84,13 +109,72 @@
@
success=
"handleExportSuccess"
/>
<!-- 流程发起对话框 -->
<a-modal
v-model:visible=
"visibleFlowLaunchModal"
title=
"流程模板列表"
width=
"80%"
:bodyStyle=
"{ height: '620px', padding: '0' }"
:footer=
"null"
@
cancel=
"visibleFlowLaunchModal = false"
>
<a-spin
:spinning=
"loading"
tip=
"发起流程中..."
style=
"min-height: 500px;"
>
<PageLayout
:title=
"'流程模板列表'"
:searchConfig=
"searchConfig"
@
search=
"searchFlowTemplate"
@
scroll-height=
"scrollHeight"
>
<
template
#
search
>
</
template
>
<
template
#
right
>
<div
v-if=
"flowLaunchData.list.length > 0"
style=
"height: 550px;padding: 10px;"
class=
"list-page-box relative"
>
<div
class=
"flex flex-wrap my-10px overflow-y-auto"
style=
"height: calc(100% - 62px); align-content: baseline"
>
<TemplateCard
v-for=
"(item, index) in flowLaunchData.list"
:key=
"index"
:item=
"item"
:width=
"'calc((100% - 39px) / 4)'"
@
click=
"launchProcess(item.id)"
/>
</div>
<div
class=
"page-box"
>
<a-pagination
v-model:current=
"flowLaunchData.pagination.current"
:total=
"flowLaunchData.pagination.total"
v-model:pageSize=
"flowLaunchData.pagination.pageSize"
:showSizeChanger=
"true"
:showQuickJumper=
"true"
:show-total=
"(total) => `共 $
{total} 条数据`"
@change="handleFlowTemplatePageChange"
/>
</div>
</div>
<div
v-else
>
<EmptyBox
/>
</div>
</
template
>
</PageLayout>
</a-spin>
</a-modal>
<!-- 查看流程组件 -->
<LookProcess
v-if=
"visibleLookProcess"
:visible=
"visibleLookProcess"
:taskId=
"taskIdProcess"
@
close=
"visibleLookProcess = false"
/>
</ResizePageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
provide
,
Ref
,
onMounted
,
createVNode
,
import
{
ref
,
computed
,
provide
,
Ref
,
onMounted
,
createVNode
,
reactive
}
from
'vue'
;
import
{
Modal
}
from
'ant-design-vue'
;
...
...
@@ -134,12 +218,161 @@
import
{
moneyChineseData
,
camelCaseString
,
}
from
'/@/utils/event/design'
;
import
{
FormSchema
}
from
'/@/components/Form/src/types/form'
;
import
LookProcess
from
'/@/views/workflow/task/components/LookProcess.vue'
;
import
TemplateCard
from
'/@bpmn/components/card/TemplateCard.vue'
;
import
{
EmptyBox
}
from
'/@/components/ModalPanel/index'
;
import
{
getDesignPage
}
from
'/@/api/workflow/design'
;
import
{
WorkflowPageModel
}
from
'/@/api/workflow/model'
;
import
{
PageLayout
}
from
'/@/components/ModalPanel'
;
import
userTableScrollHeight
from
'/@/hooks/setting/userTableScrollHeight'
;
import
{
getAppEnvConfig
}
from
'/@/utils/env'
;
import
{
getToken
}
from
'/@/utils/auth'
;
const
listSpliceNum
=
ref
(
3
);
//操作列最先展示几个
const
listSpliceNum
=
ref
(
4
);
//操作列最先展示几个
const
visibleFlowLaunchModal
=
ref
(
false
);
const
{
scrollHeight
}
=
userTableScrollHeight
();
const
fromId
=
ref
(
''
);
const
loading
=
ref
(
false
);
// 查看流程相关变量
const
visibleLookProcess
=
ref
(
false
);
const
taskIdProcess
=
ref
(
''
);
const
processIdProcess
=
ref
(
''
);
// 流程模板数据
const
flowLaunchData
=
reactive
({
list
:
[]
as
WorkflowPageModel
[],
pagination
:
{
current
:
1
,
total
:
0
,
pageSize
:
20
,
},
});
// 搜索配置
const
searchConfig
=
[
{
field
:
'code'
,
label
:
'模板编码'
,
type
:
'input'
,
},
{
field
:
'name'
,
label
:
'模板名称'
,
type
:
'input'
,
},
];
// 打开流程发起对话框
function
openFlowLaunchModal
(
id
)
{
fromId
.
value
=
id
;
visibleFlowLaunchModal
.
value
=
true
;
// 初始化数据
flowLaunchData
.
pagination
.
current
=
1
;
flowLaunchData
.
pagination
.
total
=
0
;
getFlowTemplateList
();
}
// 获取流程模板列表
async
function
getFlowTemplateList
(
params
?:
any
)
{
const
searchParams
=
{
...{
limit
:
flowLaunchData
.
pagination
.
current
,
size
:
flowLaunchData
.
pagination
.
pageSize
,
},
...
params
,
...{
enabledMark
:
1
},
// 流程发起list 需要隐藏 禁用的模板[enabledMark=1]
};
try
{
let
res
=
await
getDesignPage
(
searchParams
);
flowLaunchData
.
list
=
res
.
list
;
flowLaunchData
.
pagination
.
total
=
res
.
total
;
}
catch
(
error
)
{
console
.
error
(
'获取流程模板列表失败:'
,
error
);
}
}
// 搜索流程模板
function
searchFlowTemplate
(
params
:
any
)
{
flowLaunchData
.
pagination
.
current
=
1
;
getFlowTemplateList
(
params
);
}
// 分页变化
function
handleFlowTemplatePageChange
(
page
:
number
,
pageSize
:
number
)
{
flowLaunchData
.
pagination
.
current
=
page
;
flowLaunchData
.
pagination
.
pageSize
=
pageSize
;
getFlowTemplateList
();
}
// 发起流程
function
launchProcess
(
schemaId
:
string
)
{
Modal
.
confirm
({
title
:
'提示信息'
,
icon
:
createVNode
(
ExclamationCircleOutlined
),
content
:
'是否确认发起流程?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onOk
()
{
// 开始加载
loading
.
value
=
true
;
// 调用接口发起流程
fetch
(
getAppEnvConfig
().
VITE_GLOB_API_URL
+
'/zlgl/bhgpcl/launchProcess'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json'
,
'Authorization'
:
`Bearer
${
getToken
()}
`
},
body
:
JSON
.
stringify
({
type
:
1
,
schemaId
:
schemaId
,
fromId
:
fromId
.
value
})
})
.
then
(
response
=>
response
.
json
())
.
then
(
data
=>
{
// 结束加载
loading
.
value
=
false
;
if
(
data
.
code
==
0
)
{
notification
.
success
({
message
:
'提示'
,
description
:
'流程发起成功!'
,
});
visibleFlowLaunchModal
.
value
=
false
;
// 刷新不合格品列表数据
reload
();
}
else
{
notification
.
error
({
message
:
'提示'
,
description
:
data
.
msg
||
'流程发起失败'
,
});
}
})
.
catch
(
error
=>
{
// 结束加载
loading
.
value
=
false
;
console
.
error
(
'流程发起失败:'
,
error
);
notification
.
error
({
message
:
'提示'
,
description
:
'流程发起失败,请稍后重试'
,
});
});
},
onCancel
()
{},
});
}
// 查看流程
function
viewProcess
(
record
)
{
visibleLookProcess
.
value
=
true
;
taskIdProcess
.
value
=
record
.
taskId
;
}
...
...
@@ -234,7 +467,7 @@
striped
:
false
,
actionColumn
:
{
width
:
195
,
width
:
320
,
title
:
'操作'
,
dataIndex
:
'action'
,
slots
:
{
customRender
:
'action'
},
...
...
@@ -443,6 +676,7 @@
}
}
});
return
actionsList
;
}
...
...
@@ -496,4 +730,26 @@
}
}
/* 流程模板列表样式 */
.list-page-box
{
height
:
calc
(
100%
-
62px
);
}
.page-box
{
height
:
52px
;
border-top
:
1px
solid
rgb
(
238
238
238
/
93%
);
text-align
:
right
;
padding
:
10px
16px
;
background
:
#fff
;
position
:
absolute
;
right
:
0
;
bottom
:
0
;
left
:
0
;
border-radius
:
16px
;
}
.my-10px
{
margin
:
10px
0
;
}
</
style
>
\ No newline at end of file
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