Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Chatopera OpenSource
/
ferry_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
45d723ce
authored
Sep 01, 2020
by
YuleiLan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加主动处理
parent
473f8d9a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
111 additions
and
18 deletions
src/api/process/work-order.js
src/components/wfd/components/DetailPanel/HandleNodeDetail.vue
src/components/wfd/components/DetailPanel/UserTaskDetail.vue
src/components/wfd/locales/zh-CN.js
src/store/getters.js
src/store/modules/user.js
src/views/process/list/handle.vue
src/api/process/work-order.js
View file @
45d723ce
...
...
@@ -62,3 +62,12 @@ export function urgeWorkOrder(params) {
params
})
}
// 主动接单
export
function
activeOrder
(
data
,
workOrderId
)
{
return
request
({
url
:
`/api/v1/work-order/active-order/
${
workOrderId
}
`
,
method
:
'put'
,
data
})
}
src/components/wfd/components/DetailPanel/HandleNodeDetail.vue
View file @
45d723ce
...
...
@@ -41,7 +41,7 @@
:value=
"model.assignValue"
:multiple=
"true"
:filterable=
"true"
@
change=
"(e) =>
onChange('assignValue', e)
"
@
change=
"(e) =>
{ onChange('assignValue', e); getPersons(e) }
"
>
<el-option
v-for=
"user in users"
:key=
"user.userId"
:label=
"user.nickName===''?user.username:user.nickName"
:value=
"user.userId"
/>
</el-select>
...
...
@@ -55,7 +55,7 @@
:disabled=
"readOnly"
:multiple=
"true"
:filterable=
"true"
@
change=
"(e) =>
onChange('assignValue', e)
"
@
change=
"(e) =>
{ onChange('assignValue', e); getPersons(e) }
"
>
<el-option
v-for=
"group in groups"
:key=
"group.id"
:label=
"group.nickname===''?group.name:group.nickname"
:value=
"group.id"
/>
</el-select>
...
...
@@ -69,7 +69,7 @@
:disabled=
"readOnly"
:multiple=
"true"
:filterable=
"true"
@
change=
"(e) =>
onChange('assignValue', e)
"
@
change=
"(e) =>
{ onChange('assignValue', e); getPersons(e) }
"
>
<el-option
v-for=
"department in departments"
...
...
@@ -88,17 +88,32 @@
:disabled=
"readOnly"
:multiple=
"true"
:filterable=
"true"
@
change=
"(e) =>
onChange('assignValue', e)
"
@
change=
"(e) =>
{ onChange('assignValue', e); getPersons(e) }
"
>
<el-option
v-for=
"(item, index) in variableOptions"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
<div
class=
"panelRow"
>
<el-checkbox
:disabled=
"readOnly"
:disabled=
"
model.assignValue===undefined||
model.assignValue===null||
model.assignValue.length
<
=
1
||
model
.
activeOrder
||
readOnly
"
:value=
"!!model.isCounterSign"
@
change=
"(value) => onChange('isCounterSign', value)"
>
{{
i18n
[
'handleNode.counterSign'
]
}}
</el-checkbox>
<el-checkbox
:disabled=
"
model.assignValue===undefined||
model.assignValue===null||
model.assignValue.length
<
=
1
||
model
.
isCounterSign
||
readOnly
"
:value=
"!!model.activeOrder"
@
change=
"(value) => onChange('activeOrder', value)"
>
{{
i18n
[
'handleNode.activeOrder'
]
}}
</el-checkbox>
<!--
<el-checkbox
@
change=
"(value) => onChange('isEndorsement', value)"
:disabled=
"readOnly"
:value=
"!!model.isEndorsement"
>
{{
i18n
[
'handleNode.endorsement'
]
}}
</el-checkbox>
...
...
@@ -174,6 +189,14 @@ export default {
label
:
'创建者负责人'
}]
}
},
methods
:
{
getPersons
(
e
)
{
if
(
e
===
undefined
||
e
===
null
||
e
.
length
<=
1
)
{
this
.
onChange
(
'activeOrder'
,
false
)
this
.
onChange
(
'isCounterSign'
,
false
)
}
}
}
}
</
script
>
src/components/wfd/components/DetailPanel/UserTaskDetail.vue
View file @
45d723ce
...
...
@@ -41,7 +41,7 @@
:value=
"model.assignValue"
:multiple=
"true"
:filterable=
"true"
@
change=
"(e) =>
onChange('assignValue', e)
"
@
change=
"(e) =>
{ onChange('assignValue', e); getPersons(e) }
"
>
<el-option
v-for=
"user in users"
:key=
"user.userId"
:label=
"user.nickName===''?user.username:user.nickName"
:value=
"user.userId"
/>
</el-select>
...
...
@@ -55,12 +55,12 @@
:disabled=
"readOnly"
:multiple=
"true"
:filterable=
"true"
@
change=
"(e) =>
onChange('assignValue', e)
"
@
change=
"(e) =>
{ onChange('assignValue', e); getPersons(e) }
"
>
<el-option
v-for=
"group in groups"
:key=
"group.id"
:label=
"group.nickname===''?group.name:group.nickname"
:value=
"group.id"
/>
</el-select>
</div>
-->
<div
v-else-if=
"model.assignType === 'department'"
class=
"panelRow"
>
<
!--
<
div
v-else-if=
"model.assignType === 'department'"
class=
"panelRow"
>
<div><span
style=
"color: red"
>
*
</span>
{{
i18n
[
'userTask.assignType.department.title'
]
}}
:
</div>
<el-select
style=
"width:90%; font-size:12px"
...
...
@@ -69,11 +69,11 @@
:disabled=
"readOnly"
:multiple=
"true"
:filterable=
"true"
@
change=
"(e) =>
onChange('assignValue', e)
"
@
change=
"(e) =>
{ onChange('assignValue', e); getPersons(e) }
"
>
<el-option
v-for=
"department in departments"
:key=
"department.id"
:label=
"department.name===''?department.nickname:department.name"
:value=
"department.id"
/>
</el-select>
</div>
</div>
-->
<div
v-else-if=
"model.assignType === 'variable'"
class=
"panelRow"
>
<div><span
style=
"color: red"
>
*
</span>
{{
i18n
[
'userTask.assignType.variable.title'
]
}}
:
</div>
<el-select
...
...
@@ -82,17 +82,32 @@
:placeholder=
"i18n['userTask.assignType.variable.placeholder']"
:disabled=
"readOnly"
:multiple=
"true"
@
change=
"(e) =>
onChange('assignValue', e)
"
@
change=
"(e) =>
{ onChange('assignValue', e); getPersons(e) }
"
>
<el-option
v-for=
"(item, index) in variableOptions"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
<div
class=
"panelRow"
>
<el-checkbox
:disabled=
"readOnly"
:value=
"!!model.isCounterSign"
:disabled=
"
model.assignValue===undefined||
model.assignValue===null||
model.assignValue.length
<
=
1
||
model
.
activeOrder
||
readOnly
"
:value=
"model.isCounterSign"
@
change=
"(value) => onChange('isCounterSign', value)"
>
{{
i18n
[
'userTask.counterSign'
]
}}
</el-checkbox>
<el-checkbox
:disabled=
"
model.assignValue===undefined||
model.assignValue===null||
model.assignValue.length
<
=
1
||
model
.
isCounterSign
||
readOnly
"
:value=
"model.activeOrder"
@
change=
"(value) => onChange('activeOrder', value)"
>
{{
i18n
[
'userTask.activeOrder'
]
}}
</el-checkbox>
<!--
<el-checkbox
@
change=
"(value) => onChange('isEndorsement', value)"
:disabled=
"readOnly"
:value=
"!!model.isEndorsement"
>
{{
i18n
[
'userTask.endorsement'
]
}}
</el-checkbox>
-->
...
...
@@ -165,6 +180,14 @@ export default {
label
:
'创建者负责人'
}]
}
},
methods
:
{
getPersons
(
e
)
{
if
(
e
===
undefined
||
e
===
null
||
e
.
length
<=
1
)
{
this
.
onChange
(
'activeOrder'
,
false
)
this
.
onChange
(
'isCounterSign'
,
false
)
}
}
}
}
</
script
>
src/components/wfd/locales/zh-CN.js
View file @
45d723ce
...
...
@@ -21,6 +21,7 @@ export default {
'userTask.dueDate'
:
'到期时间'
,
'userTask.dueDate.placeholder'
:
'请选择日期'
,
'userTask.counterSign'
:
'会签'
,
'userTask.activeOrder'
:
'主动接单'
,
'userTask.endorsement'
:
'加签'
,
'conventional'
:
'常规节点'
,
'handleNode'
:
'处理节点'
,
...
...
@@ -44,7 +45,7 @@ export default {
'handleNode.dueDate.placeholder'
:
'请选择日期'
,
'handleNode.counterSign'
:
'会签'
,
'handleNode.endorsement'
:
'加签'
,
'handleNode.
task
Order'
:
'主动接单'
,
'handleNode.
active
Order'
:
'主动接单'
,
'scriptTask'
:
'任务节点'
,
'scriptTask.script'
:
'脚本'
,
'javaTask'
:
'自定义类节点'
,
...
...
src/store/getters.js
View file @
45d723ce
...
...
@@ -7,6 +7,7 @@ const getters = {
token
:
state
=>
state
.
user
.
token
,
avatar
:
state
=>
state
.
user
.
avatar
,
name
:
state
=>
state
.
user
.
name
,
userId
:
state
=>
state
.
user
.
userId
,
introduction
:
state
=>
state
.
user
.
introduction
,
roles
:
state
=>
state
.
user
.
roles
,
permisaction
:
state
=>
state
.
user
.
permisaction
,
...
...
src/store/modules/user.js
View file @
45d723ce
...
...
@@ -22,6 +22,9 @@ const mutations = {
SET_NAME
:
(
state
,
name
)
=>
{
state
.
name
=
name
},
SET_USERID
:
(
state
,
userId
)
=>
{
state
.
userId
=
userId
},
SET_AVATAR
:
(
state
,
avatar
)
=>
{
if
(
avatar
.
indexOf
(
'http'
)
!==
-
1
)
{
state
.
avatar
=
avatar
...
...
@@ -62,7 +65,7 @@ const actions = {
resolve
()
}
const
{
roles
,
name
,
avatar
,
introduction
,
permissions
}
=
response
.
data
const
{
userId
,
roles
,
name
,
avatar
,
introduction
,
permissions
}
=
response
.
data
// roles must be a non-empty array
if
(
!
roles
||
roles
.
length
<=
0
)
{
...
...
@@ -71,6 +74,7 @@ const actions = {
commit
(
'SET_PERMISSIONS'
,
permissions
)
commit
(
'SET_ROLES'
,
roles
)
commit
(
'SET_NAME'
,
name
)
commit
(
'SET_USERID'
,
userId
)
commit
(
'SET_AVATAR'
,
avatar
)
commit
(
'SET_INTRODUCTION'
,
introduction
)
resolve
(
response
)
...
...
src/views/process/list/handle.vue
View file @
45d723ce
...
...
@@ -89,6 +89,11 @@
/>
</div>
<div
class=
"text item"
style=
"text-align: center;margin-top:18px"
>
<div
v-if=
"
!nodeStepList[activeIndex].activeOrder ||
processStructureValue.workOrder.state.length <= 1"
>
<
template
v-for=
"(item, index) in processStructureValue.edges"
>
<el-button
v-if=
"item.source===nodeStepList[activeIndex].id && processStructureValue.workOrder.is_end===0"
...
...
@@ -100,6 +105,16 @@
</el-button>
</
template
>
</div>
<div
v-else
>
<el-button
v-permisaction=
"['process:list:handle:active']"
type=
"primary"
@
click=
"activeOrderActive"
>
主动接单
</el-button>
</div>
</div>
</div>
</el-card>
...
...
@@ -149,10 +164,13 @@ Vue.component(GenerateForm.name, GenerateForm)
import
{
processStructure
,
handleWorkOrder
handleWorkOrder
,
activeOrder
}
from
'@/api/process/work-order'
import
{
listUser
}
from
'@/api/system/sysuser'
import
{
mapGetters
}
from
'vuex'
export
default
{
data
()
{
return
{
...
...
@@ -190,6 +208,11 @@ export default {
}
}
},
computed
:
{
...
mapGetters
([
'userId'
])
},
created
()
{
this
.
getProcessNodeList
()
},
...
...
@@ -201,7 +224,6 @@ export default {
}).
then
(
response
=>
{
this
.
processStructureValue
=
response
.
data
this
.
circulationHistoryList
=
this
.
processStructureValue
.
circulationHistory
// 获取当前展示节点列表
this
.
nodeStepList
=
[]
for
(
var
i
=
0
;
i
<
this
.
processStructureValue
.
nodes
.
length
;
i
++
)
{
...
...
@@ -234,7 +256,6 @@ export default {
for
(
var
tplDataIndex
in
this
.
tpls
)
{
this
.
tpls
[
tplDataIndex
].
tplValue
=
values
[
tplDataIndex
]
}
console
.
log
(
this
.
tpls
)
handleWorkOrder
({
tasks
:
this
.
processStructureValue
.
process
.
task
,
source_state
:
this
.
processStructureValue
.
workOrder
.
current_state
,
...
...
@@ -258,6 +279,17 @@ export default {
if
(
this
.
processStructureValue
.
workOrder
.
is_end
===
1
)
{
this
.
alertMessage
=
'当前工单已结束。'
}
},
activeOrderActive
()
{
var
jsonData
=
[{
id
:
this
.
nodeStepList
[
this
.
activeIndex
].
id
,
label
:
this
.
nodeStepList
[
this
.
activeIndex
].
label
,
process_method
:
'person'
,
processor
:
[
this
.
userId
]
}]
activeOrder
(
jsonData
,
this
.
$route
.
query
.
workOrderId
).
then
(
response
=>
{
this
.
getProcessNodeList
()
})
}
}
}
...
...
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