Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
ferry_web
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
0
Merge Requests
0
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
jianan
ferry_web
Commits
b9ac1211
Commit
b9ac1211
authored
Jul 17, 2020
by
YuleiLan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加处理工单。
parent
0ab0fc2e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
773 additions
and
28 deletions
+773
-28
src/views/process/list/all.vue
+4
-6
src/views/process/list/handle.vue
+193
-10
src/views/process/list/my-create.vue
+192
-4
src/views/process/list/related.vue
+192
-4
src/views/process/list/upcoming.vue
+192
-4
No files found.
src/views/process/list/all.vue
View file @
b9ac1211
...
...
@@ -18,7 +18,7 @@
</el-form>
<el-table
v-loading=
"loading"
border
:data=
"ticketList"
@
selection-change=
"handleSelectionChange"
>
<
el-table-column
type=
"selection"
width=
"55"
align=
"center"
/
>
<
!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
--
>
<el-table-column
label=
"ID"
prop=
"id"
width=
"120"
/>
<el-table-column
label=
"标题"
prop=
"title"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"当前状态"
:show-overflow-tooltip=
"true"
>
...
...
@@ -78,7 +78,7 @@
</el-form-item>
<el-form-item
label=
"用户"
prop=
"user_id"
>
<el-select
v-model=
"ruleForm.user_id"
placeholder=
"选择用户"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in users"
:key=
"index"
:label=
"item.nick
name"
:value=
"item.i
d"
/>
<el-option
v-for=
"(item, index) in users"
:key=
"index"
:label=
"item.nick
Name"
:value=
"item.userI
d"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"备注"
>
...
...
@@ -145,7 +145,6 @@ export default {
this
.
listQuery
.
per_page
=
this
.
queryParams
.
pageSize
this
.
listQuery
.
classify
=
4
workOrderList
(
this
.
listQuery
).
then
(
response
=>
{
console
.
log
(
response
)
this
.
ticketList
=
response
.
data
.
data
this
.
queryParams
.
pageIndex
=
response
.
data
.
page
this
.
queryParams
.
pageSize
=
response
.
data
.
per_page
...
...
@@ -157,7 +156,6 @@ export default {
this
.
$router
.
push
({
name
:
'ProcessListHandle'
,
query
:
{
workOrderId
:
row
.
id
,
processId
:
row
.
process
}})
},
handleUnity
(
row
)
{
console
.
log
(
row
)
this
.
$confirm
(
'此操作将会结束该工单, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -166,7 +164,7 @@ export default {
unityWorkOrder
({
work_oroder_id
:
row
.
id
}).
then
(
response
=>
{
if
(
response
.
code
===
1000
00
)
{
if
(
response
.
code
===
2
00
)
{
this
.
getList
()
}
})
...
...
@@ -195,7 +193,7 @@ export default {
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
inversionWorkOrder
(
this
.
ruleForm
).
then
(
response
=>
{
if
(
response
.
code
===
1000
00
)
{
if
(
response
.
code
===
2
00
)
{
this
.
getList
()
this
.
dialogVisible
=
false
}
...
...
src/views/process/list/handle.vue
View file @
b9ac1211
<
template
>
<div>
this is handle ticket.
<div
class=
"app-container"
>
<el-card
class=
"box-card"
>
<div
class=
"text item"
>
<el-steps
:active=
"activeIndex"
finish-status=
"success"
>
<template
v-for=
"(item, index) in nodeStepList"
>
<el-step
v-if=
"item.isHideNode === false ||
item.isHideNode === undefined ||
item.isHideNode == null ||
item.id === processStructureValue.workOrder.current_state"
:key=
"index"
:title=
"item.label"
/>
</
template
>
</el-steps>
</div>
</el-card>
<el-alert
v-if=
"activeIndex !== nodeStepList.length && processStructureValue.workOrder.is_end===1"
style=
"margin-top: 15px"
:title=
"alertMessage"
type=
"error"
:closable=
"false"
/>
<el-card
class=
"box-card"
style=
"margin-top: 15px"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
公共信息
</span>
</div>
<div
class=
"text item"
>
<el-form
label-width=
"100px"
>
<el-form-item
label=
"标题: "
style=
"margin-bottom: 0"
>
<span>
{{ workOrderTitle }}
</span>
</el-form-item>
</el-form>
</div>
</el-card>
<el-card
class=
"box-card"
style=
"margin-top: 15px"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
表单信息
</span>
</div>
<div
class=
"text item"
>
<fm-generate-form
v-for=
"(tplItem, tplIndex) in processStructureValue.tpls"
:key=
"tplIndex"
:ref=
"'generateForm-'+tplItem.id"
:remote=
"remoteFunc"
:value=
"tplItem.form_data"
:data=
"tplItem.form_structure"
/>
</div>
<div
v-if=
"processStructureValue.userAuthority"
>
<hr
style=
"background-color: #d9d9d9; border:0; height:1px;"
>
<div
class=
"text item"
style=
"text-align: center;margin-top:18px"
>
<
template
v-for=
"(item, index) in processStructureValue.edges"
>
<el-button
v-if=
"item.source===nodeStepList[activeIndex].id && processStructureValue.workOrder.is_end===0"
:key=
"index"
type=
"primary"
@
click=
"submitAction(item)"
>
{{
item
.
label
}}
</el-button>
</
template
>
</div>
</div>
</el-card>
<el-card
class=
"box-card"
style=
"margin-top: 15px"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
工单流转历史
</span>
</div>
<div
class=
"text item"
>
<el-table
:data=
"circulationHistoryList"
border
style=
"width: 100%"
>
<el-table-column
prop=
"state"
label=
"节点"
/>
<el-table-column
prop=
"circulation"
label=
"流转"
/>
<el-table-column
prop=
"processor"
label=
"处理人"
/>
<el-table-column
prop=
"create_time"
label=
"处理时间"
/>
<el-table-column
prop=
"remarks"
label=
"备注"
/>
</el-table>
</div>
</el-card>
</div>
</template>
<
script
>
export
default
{
components
:
{
import
Vue
from
'vue'
import
{
GenerateForm
}
from
'@/components/VueFormMaking'
import
'form-making/dist/FormMaking.css'
Vue
.
component
(
GenerateForm
.
name
,
GenerateForm
)
},
import
{
processStructure
,
handleWorkOrder
}
from
'@/api/process/work-order'
import
{
listUser
}
from
'@/api/system/sysuser'
export
default
{
data
()
{
return
{
alertMessage
:
''
,
nodeStepList
:
[],
circulationHistoryList
:
[],
workOrderTitle
:
''
,
activeIndex
:
0
,
processStructureValue
:
{},
ruleForm
:
{
title
:
''
,
process
:
''
,
classify
:
''
,
state_id
:
''
,
state
:
''
,
source_state
:
''
,
processor
:
''
,
process_method
:
''
,
tpls
:
[],
tasks
:
[]
},
remoteFunc
:
{
// 获取用户列表
getUserListFunc
(
resolve
)
{
listUser
({
pageSize
:
999999
}).
then
(
response
=>
{
const
options
=
response
.
data
.
list
resolve
(
options
)
})
}
}
}
},
created
()
{
this
.
getProcessNodeList
()
},
methods
:
{
getProcessNodeList
()
{
processStructure
({
processId
:
this
.
$route
.
query
.
processId
,
workOrderId
:
this
.
$route
.
query
.
workOrderId
}).
then
(
response
=>
{
this
.
processStructureValue
=
response
.
data
this
.
workOrderTitle
=
this
.
processStructureValue
.
workOrder
.
title
this
.
circulationHistoryList
=
this
.
processStructureValue
.
circulationHistory
// 获取当前展示节点列表
for
(
var
i
=
0
;
i
<
this
.
processStructureValue
.
nodes
.
length
;
i
++
)
{
if
(
this
.
processStructureValue
.
nodes
[
i
].
id
===
this
.
processStructureValue
.
workOrder
.
current_state
)
{
this
.
nodeStepList
.
push
(
this
.
processStructureValue
.
nodes
[
i
])
this
.
activeIndex
=
this
.
nodeStepList
.
length
-
1
if
(
i
===
this
.
processStructureValue
.
nodes
.
length
-
2
)
{
this
.
activeIndex
=
i
+
1
}
}
else
if
(
!
this
.
processStructureValue
.
nodes
[
i
].
isHideNode
)
{
// 非隐藏节点
this
.
nodeStepList
.
push
(
this
.
processStructureValue
.
nodes
[
i
])
}
}
this
.
getAlertMessage
()
})
},
submitAction
(
item
)
{
handleWorkOrder
({
tasks
:
this
.
processStructureValue
.
process
.
task
,
source_state
:
this
.
processStructureValue
.
workOrder
.
current_state
,
target_state
:
item
.
target
,
circulation
:
item
.
label
,
flow_properties
:
item
.
flowProperties
===
undefined
?
2
:
parseInt
(
item
.
flowProperties
),
work_order_id
:
parseInt
(
this
.
$route
.
query
.
workOrderId
)
}).
then
(
response
=>
{
if
(
response
.
code
===
100000
)
{
// this.$router.push({ name: 'upcoming' })
window
.
location
.
reload
()
}
})
},
// 获取提示消息
getAlertMessage
()
{
if
(
this
.
processStructureValue
.
workOrder
.
is_end
===
1
)
{
this
.
alertMessage
=
'当前工单已结束。'
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/process/list/my-create.vue
View file @
b9ac1211
<
template
>
<div>
this is my create.
<div
class=
"app-container"
>
<el-card
class=
"box-card"
>
<el-form
ref=
"listQuery"
:model=
"listQuery"
:inline=
"true"
>
<el-form-item
label=
"工单标题"
>
<el-input
v-model=
"listQuery.title"
placeholder=
"请输入工单标题"
clearable
size=
"small"
style=
"width: 240px"
@
keyup
.
enter
.
native=
"getList"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"small"
@
click=
"getList"
>
搜索
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
border
:data=
"ticketList"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<el-table-column
label=
"ID"
prop=
"id"
width=
"120"
/>
<el-table-column
label=
"标题"
prop=
"title"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"当前状态"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
state
[
0
].
label
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"当前处理人"
prop=
"principals"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"是否结束"
:show-overflow-tooltip=
"true"
width=
"80"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.is_end===0"
size=
"mini"
type=
"success"
>
否
</el-tag>
<el-tag
v-else
size=
"mini"
type=
"danger"
>
是
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"create_time"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
create_time
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleView(scope.row)"
>
查看
</el-button>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-position"
@
click=
"handleInversion(scope.row)"
>
转交
</el-button>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-switch-button"
@
click=
"handleUnity(scope.row)"
>
结单
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-dialog
title=
"转交工单"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<el-form
ref=
"ruleForm"
:model=
"ruleForm"
:rules=
"rules"
label-width=
"60px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"节点"
prop=
"node_id"
>
<el-select
v-model=
"ruleForm.node_id"
placeholder=
"选择节点"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in nodeList"
:key=
"index"
:label=
"item.label"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"用户"
prop=
"user_id"
>
<el-select
v-model=
"ruleForm.user_id"
placeholder=
"选择用户"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in users"
:key=
"index"
:label=
"item.nickName"
:value=
"item.userId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"ruleForm.remarks"
type=
"textarea"
size=
"small"
/>
</el-form-item>
<el-form-item
style=
"text-align: right"
>
<el-button
type=
"primary"
@
click=
"submitForm('ruleForm')"
>
提交
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
关闭
</el-button>
</el-form-item>
</el-form>
</el-dialog>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageIndex"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-card>
</div>
</template>
<
script
>
import
{
workOrderList
,
unityWorkOrder
,
inversionWorkOrder
}
from
'@/api/process/work-order'
import
{
listUser
}
from
'@/api/system/sysuser'
export
default
{
data
()
{
return
{
users
:
[],
nodeList
:
[],
dialogVisible
:
false
,
queryParams
:
{},
total
:
0
,
loading
:
false
,
ticketList
:
[],
listQuery
:
{
page
:
1
,
per_page
:
10
},
ruleForm
:
{
work_order_id
:
''
,
node_id
:
''
,
user_id
:
''
,
remarks
:
''
},
rules
:
{
node_id
:
[
{
required
:
true
,
message
:
'请选择节点'
,
trigger
:
'change'
}
],
user_id
:
[
{
required
:
true
,
message
:
'请选择用户'
,
trigger
:
'change'
}
]
}
}
},
created
()
{
this
.
getList
()
},
methods
:
{
getList
()
{
this
.
loading
=
true
this
.
listQuery
.
page
=
this
.
queryParams
.
pageIndex
this
.
listQuery
.
per_page
=
this
.
queryParams
.
pageSize
this
.
listQuery
.
classify
=
2
workOrderList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
ticketList
=
response
.
data
.
data
this
.
queryParams
.
pageIndex
=
response
.
data
.
page
this
.
queryParams
.
pageSize
=
response
.
data
.
per_page
this
.
total
=
response
.
data
.
total_count
this
.
loading
=
false
})
},
handleView
(
row
)
{
this
.
$router
.
push
({
name
:
'ProcessListHandle'
,
query
:
{
workOrderId
:
row
.
id
,
processId
:
row
.
process
}})
},
handleUnity
(
row
)
{
this
.
$confirm
(
'此操作将会结束该工单, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
unityWorkOrder
({
work_oroder_id
:
row
.
id
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
getList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
})
})
},
handleInversion
(
row
)
{
this
.
dialogVisible
=
true
this
.
ruleForm
.
work_order_id
=
row
.
id
this
.
nodeList
=
row
.
state
if
(
this
.
nodeList
.
length
===
1
)
{
this
.
ruleForm
.
node_id
=
this
.
nodeList
[
0
].
id
}
listUser
({
pageSize
:
999999
}).
then
(
response
=>
{
this
.
users
=
response
.
data
.
list
})
},
handleSelectionChange
()
{},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
inversionWorkOrder
(
this
.
ruleForm
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
getList
()
this
.
dialogVisible
=
false
}
})
}
})
}
}
}
</
script
>
...
...
src/views/process/list/related.vue
View file @
b9ac1211
<
template
>
<div>
this is related.
<div
class=
"app-container"
>
<el-card
class=
"box-card"
>
<el-form
ref=
"listQuery"
:model=
"listQuery"
:inline=
"true"
>
<el-form-item
label=
"工单标题"
>
<el-input
v-model=
"listQuery.title"
placeholder=
"请输入工单标题"
clearable
size=
"small"
style=
"width: 240px"
@
keyup
.
enter
.
native=
"getList"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"small"
@
click=
"getList"
>
搜索
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
border
:data=
"ticketList"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<el-table-column
label=
"ID"
prop=
"id"
width=
"120"
/>
<el-table-column
label=
"标题"
prop=
"title"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"当前状态"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
state
[
0
].
label
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"当前处理人"
prop=
"principals"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"是否结束"
:show-overflow-tooltip=
"true"
width=
"80"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.is_end===0"
size=
"mini"
type=
"success"
>
否
</el-tag>
<el-tag
v-else
size=
"mini"
type=
"danger"
>
是
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"create_time"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
create_time
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleView(scope.row)"
>
查看
</el-button>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-position"
@
click=
"handleInversion(scope.row)"
>
转交
</el-button>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-switch-button"
@
click=
"handleUnity(scope.row)"
>
结单
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-dialog
title=
"转交工单"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<el-form
ref=
"ruleForm"
:model=
"ruleForm"
:rules=
"rules"
label-width=
"60px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"节点"
prop=
"node_id"
>
<el-select
v-model=
"ruleForm.node_id"
placeholder=
"选择节点"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in nodeList"
:key=
"index"
:label=
"item.label"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"用户"
prop=
"user_id"
>
<el-select
v-model=
"ruleForm.user_id"
placeholder=
"选择用户"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in users"
:key=
"index"
:label=
"item.nickName"
:value=
"item.userId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"ruleForm.remarks"
type=
"textarea"
size=
"small"
/>
</el-form-item>
<el-form-item
style=
"text-align: right"
>
<el-button
type=
"primary"
@
click=
"submitForm('ruleForm')"
>
提交
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
关闭
</el-button>
</el-form-item>
</el-form>
</el-dialog>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageIndex"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-card>
</div>
</template>
<
script
>
import
{
workOrderList
,
unityWorkOrder
,
inversionWorkOrder
}
from
'@/api/process/work-order'
import
{
listUser
}
from
'@/api/system/sysuser'
export
default
{
data
()
{
return
{
users
:
[],
nodeList
:
[],
dialogVisible
:
false
,
queryParams
:
{},
total
:
0
,
loading
:
false
,
ticketList
:
[],
listQuery
:
{
page
:
1
,
per_page
:
10
},
ruleForm
:
{
work_order_id
:
''
,
node_id
:
''
,
user_id
:
''
,
remarks
:
''
},
rules
:
{
node_id
:
[
{
required
:
true
,
message
:
'请选择节点'
,
trigger
:
'change'
}
],
user_id
:
[
{
required
:
true
,
message
:
'请选择用户'
,
trigger
:
'change'
}
]
}
}
},
created
()
{
this
.
getList
()
},
methods
:
{
getList
()
{
this
.
loading
=
true
this
.
listQuery
.
page
=
this
.
queryParams
.
pageIndex
this
.
listQuery
.
per_page
=
this
.
queryParams
.
pageSize
this
.
listQuery
.
classify
=
3
workOrderList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
ticketList
=
response
.
data
.
data
this
.
queryParams
.
pageIndex
=
response
.
data
.
page
this
.
queryParams
.
pageSize
=
response
.
data
.
per_page
this
.
total
=
response
.
data
.
total_count
this
.
loading
=
false
})
},
handleView
(
row
)
{
this
.
$router
.
push
({
name
:
'ProcessListHandle'
,
query
:
{
workOrderId
:
row
.
id
,
processId
:
row
.
process
}})
},
handleUnity
(
row
)
{
this
.
$confirm
(
'此操作将会结束该工单, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
unityWorkOrder
({
work_oroder_id
:
row
.
id
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
getList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
})
})
},
handleInversion
(
row
)
{
this
.
dialogVisible
=
true
this
.
ruleForm
.
work_order_id
=
row
.
id
this
.
nodeList
=
row
.
state
if
(
this
.
nodeList
.
length
===
1
)
{
this
.
ruleForm
.
node_id
=
this
.
nodeList
[
0
].
id
}
listUser
({
pageSize
:
999999
}).
then
(
response
=>
{
this
.
users
=
response
.
data
.
list
})
},
handleSelectionChange
()
{},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
inversionWorkOrder
(
this
.
ruleForm
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
getList
()
this
.
dialogVisible
=
false
}
})
}
})
}
}
}
</
script
>
...
...
src/views/process/list/upcoming.vue
View file @
b9ac1211
<
template
>
<div>
this is upcoming.
<div
class=
"app-container"
>
<el-card
class=
"box-card"
>
<el-form
ref=
"listQuery"
:model=
"listQuery"
:inline=
"true"
>
<el-form-item
label=
"工单标题"
>
<el-input
v-model=
"listQuery.title"
placeholder=
"请输入工单标题"
clearable
size=
"small"
style=
"width: 240px"
@
keyup
.
enter
.
native=
"getList"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"small"
@
click=
"getList"
>
搜索
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
border
:data=
"ticketList"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<el-table-column
label=
"ID"
prop=
"id"
width=
"120"
/>
<el-table-column
label=
"标题"
prop=
"title"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"当前状态"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
state
[
0
].
label
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"当前处理人"
prop=
"principals"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"是否结束"
:show-overflow-tooltip=
"true"
width=
"80"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.is_end===0"
size=
"mini"
type=
"success"
>
否
</el-tag>
<el-tag
v-else
size=
"mini"
type=
"danger"
>
是
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"create_time"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
create_time
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleView(scope.row)"
>
查看
</el-button>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-position"
@
click=
"handleInversion(scope.row)"
>
转交
</el-button>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-switch-button"
@
click=
"handleUnity(scope.row)"
>
结单
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-dialog
title=
"转交工单"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<el-form
ref=
"ruleForm"
:model=
"ruleForm"
:rules=
"rules"
label-width=
"60px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"节点"
prop=
"node_id"
>
<el-select
v-model=
"ruleForm.node_id"
placeholder=
"选择节点"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in nodeList"
:key=
"index"
:label=
"item.label"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"用户"
prop=
"user_id"
>
<el-select
v-model=
"ruleForm.user_id"
placeholder=
"选择用户"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in users"
:key=
"index"
:label=
"item.nickName"
:value=
"item.userId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"ruleForm.remarks"
type=
"textarea"
size=
"small"
/>
</el-form-item>
<el-form-item
style=
"text-align: right"
>
<el-button
type=
"primary"
@
click=
"submitForm('ruleForm')"
>
提交
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
关闭
</el-button>
</el-form-item>
</el-form>
</el-dialog>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageIndex"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-card>
</div>
</template>
<
script
>
import
{
workOrderList
,
unityWorkOrder
,
inversionWorkOrder
}
from
'@/api/process/work-order'
import
{
listUser
}
from
'@/api/system/sysuser'
export
default
{
data
()
{
return
{
users
:
[],
nodeList
:
[],
dialogVisible
:
false
,
queryParams
:
{},
total
:
0
,
loading
:
false
,
ticketList
:
[],
listQuery
:
{
page
:
1
,
per_page
:
10
},
ruleForm
:
{
work_order_id
:
''
,
node_id
:
''
,
user_id
:
''
,
remarks
:
''
},
rules
:
{
node_id
:
[
{
required
:
true
,
message
:
'请选择节点'
,
trigger
:
'change'
}
],
user_id
:
[
{
required
:
true
,
message
:
'请选择用户'
,
trigger
:
'change'
}
]
}
}
},
created
()
{
this
.
getList
()
},
methods
:
{
getList
()
{
this
.
loading
=
true
this
.
listQuery
.
page
=
this
.
queryParams
.
pageIndex
this
.
listQuery
.
per_page
=
this
.
queryParams
.
pageSize
this
.
listQuery
.
classify
=
1
workOrderList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
ticketList
=
response
.
data
.
data
this
.
queryParams
.
pageIndex
=
response
.
data
.
page
this
.
queryParams
.
pageSize
=
response
.
data
.
per_page
this
.
total
=
response
.
data
.
total_count
this
.
loading
=
false
})
},
handleView
(
row
)
{
this
.
$router
.
push
({
name
:
'ProcessListHandle'
,
query
:
{
workOrderId
:
row
.
id
,
processId
:
row
.
process
}})
},
handleUnity
(
row
)
{
this
.
$confirm
(
'此操作将会结束该工单, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
unityWorkOrder
({
work_oroder_id
:
row
.
id
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
getList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
})
})
},
handleInversion
(
row
)
{
this
.
dialogVisible
=
true
this
.
ruleForm
.
work_order_id
=
row
.
id
this
.
nodeList
=
row
.
state
if
(
this
.
nodeList
.
length
===
1
)
{
this
.
ruleForm
.
node_id
=
this
.
nodeList
[
0
].
id
}
listUser
({
pageSize
:
999999
}).
then
(
response
=>
{
this
.
users
=
response
.
data
.
list
})
},
handleSelectionChange
()
{},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
inversionWorkOrder
(
this
.
ruleForm
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
getList
()
this
.
dialogVisible
=
false
}
})
}
})
}
}
}
</
script
>
...
...
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