Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周远喜
mes-ui
Commits
592a838a
Commit
592a838a
authored
Jun 23, 2020
by
kangzhenfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料审批工作流
parent
9ad7b305
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
235 additions
and
34 deletions
+235
-34
process.vue
pages/handle/process.vue
+12
-34
processold.vue
pages/handle/processold.vue
+206
-0
shen.less
pages/handle/shen.less
+17
-0
No files found.
pages/handle/process.vue
View file @
592a838a
...
...
@@ -13,7 +13,6 @@
{{
item
.
name
}}
(
<state
code=
"workflow.form.audit.type"
:value=
"item.operation"
/>
)
<Icon
v-if=
"item.isFixed"
title=
"固定"
type=
"ios-lock"
/>
<span
class=
"auditedTime"
>
{{
item
.
auditedTime
}}
</span>
</p>
<div
class=
"content"
>
<div
class=
"records"
v-if=
"index==cur"
>
...
...
@@ -25,38 +24,15 @@
class=
"mr5"
/>
</div>
<div
v-else-if=
"index>cur"
>
<CheckboxGroup
v-model=
"immutData"
>
<span>
审批人:
</span>
<Checkbox
v-for=
"(item1, index1) in item.defaultUsers.immutable"
:key=
"index1"
:label=
"item1"
:disabled=
"item.isFixed"
>
<User
:value=
"item1"
style=
"margin-right:5px;"
/>
</Checkbox>
</CheckboxGroup>
</div>
<div
class=
"wait"
v-else
>
<span>
审批人:
</span>
<User
v-for=
"(item2, index2) in item.defaultUsers.immutable"
:key=
"index2"
:value=
"item2"
class=
"mr5"
/>
</div>
<div
style=
"width:98%"
v-if=
"com(item.records).length>0"
>
<Table
:columns=
"columns"
border
size=
"small"
width=
"90%"
:data=
"com(item.records)"
></Table>
<p>
<state
code=
"workflow.record.status"
:value=
"item.status"
type=
"text"
></state>
<!--
<User
v-for=
"(item2, index2) in item.defaultUsers.immutable"
:key=
"index2"
:value=
"item2"
class=
"mr5"
/>
-->
<!--
<span>
{{
item
}}
</span>
-->
<!--
<Table
:columns=
"columns"
border
size=
"small"
width=
"90%"
:data=
"com(item.records)"
></Table>
-->
<p
class=
"shen_row"
v-for=
"(item3, index3) in item.records"
:key=
"index3"
:value=
"item3"
>
<User
class=
"user_span"
:value=
"item3.operatorId"
/>
<span
class=
"plr"
>
{{
item3
.
operationTime
}}
</span>
<state
code=
"workflow.record.status"
:value=
"item3.status"
type=
"text"
></state>
<span
class=
"plr remark"
v-if=
"item3.remark"
></span>
<a
class=
"plr"
v-if=
"item3.contextData"
@
click=
"edit(item3)"
>
详情
</a>
<!--
<span>
{{
item3
.
contextData
}}
</span>
-->
</p>
</div>
</div>
...
...
@@ -78,6 +54,7 @@ export default {
processTitle
:
'审批流程'
,
currentNodeId
:
null
,
dataImmut
:
[],
creatRows
:
[],
cur
:
0
,
columns
:
[
{
...
...
@@ -151,8 +128,8 @@ export default {
Api
.
getdetail
({
Id
:
this
.
idVal
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
dataImmut
=
r
.
result
.
nodes
this
.
processTitle
=
r
.
result
.
schemaName
this
.
currentNodeId
=
r
.
result
.
currentNodeId
let
idUser
=
[]
r
.
result
.
nodes
.
map
((
u
,
i
)
=>
{
//查找当前节点索引
if
(
u
.
id
==
this
.
currentNodeId
)
{
...
...
@@ -167,6 +144,7 @@ export default {
// console.log("this.dataImmut[this.cur + 1]:",this.dataImmut[this.cur + 1],this.cur,this.dataImmut.length )
this
.
immutData
=
this
.
dataImmut
[
this
.
cur
+
1
].
defaultUsers
.
immutable
||
(
this
.
dataImmut
[
this
.
cur
+
1
].
defaultUsers
.
mutable
)
//审核人员bug
}
}
else
{
this
.
$Message
.
error
(
'加载失败'
)
}
...
...
@@ -193,7 +171,7 @@ export default {
com
(
items
)
{
if
(
items
)
return
items
.
filter
((
u
)
=>
{
return
[
2
,
3
,
5
,
6
].
indexOf
(
u
.
status
)
>
-
1
return
[
2
,
3
,
5
,
6
].
indexOf
(
u
.
status
)
>
-
1
})
else
return
[];
...
...
pages/handle/processold.vue
0 → 100644
View file @
592a838a
<
style
lang=
"less"
scope
>
@import "./shen.less";
</
style
>
<
template
>
<div
class=
"Design"
>
<h3>
{{
processTitle
}}
</h3>
<Divider
/>
<Timeline>
<TimelineItem
v-for=
"(item, index) in dataImmut"
:key=
"index"
>
<Badge
:count=
"index + 1"
slot=
"dot"
:type=
"type(index)"
></Badge>
<p
class=
"title"
>
<state
code=
"workflow.record.status"
:value=
"item.status"
type=
"tag"
/>
{{
item
.
name
}}
(
<state
code=
"workflow.form.audit.type"
:value=
"item.operation"
/>
)
<Icon
v-if=
"item.isFixed"
title=
"固定"
type=
"ios-lock"
/>
<!--
<span
class=
"auditedTime"
>
{{
item
.
auditedTime
}}
</span>
-->
</p>
<div
class=
"content"
>
<div
class=
"records"
v-if=
"index==cur"
>
<span>
审批人:
</span>
<User
v-for=
"(item3, index3) in item.records"
:key=
"index3"
:value=
"item3.operatorId"
class=
"mr5"
/>
</div>
<div
v-else-if=
"index>cur"
>
<CheckboxGroup
v-model=
"immutData"
>
<span>
审批人:
</span>
<Checkbox
v-for=
"(item1, index1) in item.defaultUsers.immutable"
:key=
"index1"
:label=
"item1"
:disabled=
"item.isFixed"
>
<User
:value=
"item1"
style=
"margin-right:5px;"
/>
</Checkbox>
</CheckboxGroup>
</div>
<div
class=
"wait"
v-else
>
<span>
审批人:
</span>
<User
v-for=
"(item2, index2) in item.defaultUsers.immutable"
:key=
"index2"
:value=
"item2"
class=
"mr5"
/>
</div>
<div
style=
"width:98%"
v-if=
"com(item.records).length>0"
>
<Table
:columns=
"columns"
border
size=
"small"
width=
"90%"
:data=
"com(item.records)"
></Table>
<p>
<state
code=
"workflow.record.status"
:value=
"item.status"
type=
"text"
></state>
<!--
<User
:value=
"item.operatorId"
class=
"mr5"
/>
-->
<span>
{{
item
.
auditedTime
}}
</span>
<!--
<span>
{{
item
}}
</span>
-->
</p>
</div>
</div>
</TimelineItem>
</Timeline>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'process'
,
components
:
{},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
data
()
{
return
{
currentUserId
:
0
,
processTitle
:
'审批流程'
,
currentNodeId
:
null
,
dataImmut
:
[],
cur
:
0
,
columns
:
[
{
key
:
'status'
,
title
:
'结果'
,
align
:
'left'
,
width
:
100
,
render
:
(
h
,
params
)
=>
{
return
h
(
'state'
,
{
attrs
:
{
value
:
params
.
row
.
status
,
code
:
'workflow.record.status'
}
})
}
},
{
key
:
'operatorId'
,
title
:
'操作人'
,
align
:
'left'
,
width
:
100
,
easy
:
true
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
'User'
,
{
attrs
:
{
value
:
params
.
row
.
operatorId
}
})
}
},
{
title
:
'时间'
,
key
:
'operationTime'
,
width
:
200
,
align
:
'center'
},
{
title
:
'备注'
,
key
:
'remark'
,
align
:
'center'
},
{
key
:
'contextData'
,
title
:
'详细'
,
width
:
100
,
align
:
'left'
,
render
:
(
h
,
params
)
=>
{
if
(
params
.
row
.
contextData
.
length
>
2
)
return
h
(
'a'
,
{
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
}
},
'详情'
)
return
h
(
'span'
,
''
)
}
}
],
dataMut
:
[],
immutData
:
[],
schemaId
:
''
}
},
props
:
{
idVal
:
{
type
:
String
,
default
:
''
}
},
created
()
{
this
.
currentUserId
=
this
.
$store
.
state
.
userInfo
.
userId
this
.
dataImmut
=
[]
this
.
dataMut
=
[]
Api
.
getdetail
({
Id
:
this
.
idVal
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
dataImmut
=
r
.
result
.
nodes
this
.
processTitle
=
r
.
result
.
schemaName
this
.
currentNodeId
=
r
.
result
.
currentNodeId
r
.
result
.
nodes
.
map
((
u
,
i
)
=>
{
//查找当前节点索引
if
(
u
.
id
==
this
.
currentNodeId
)
{
this
.
cur
=
i
};
// if(u.defaultUsers.mutable&&u.defaultUsers.mutable.length>0){
// u.defaultUsers.immutable=u.defaultUsers.immutable.concat(u.defaultUsers.mutable)
u
.
defaultUsers
.
immutable
=
u
.
defaultUsers
.
immutable
||
(
u
.
defaultUsers
.
mutable
)
//审核人员bug
// }
})
if
(
this
.
dataImmut
.
length
>
this
.
cur
+
1
)
{
// console.log("this.dataImmut[this.cur + 1]:",this.dataImmut[this.cur + 1],this.cur,this.dataImmut.length )
this
.
immutData
=
this
.
dataImmut
[
this
.
cur
+
1
].
defaultUsers
.
immutable
||
(
this
.
dataImmut
[
this
.
cur
+
1
].
defaultUsers
.
mutable
)
//审核人员bug
}
}
else
{
this
.
$Message
.
error
(
'加载失败'
)
}
})
},
methods
:
{
load
(
v
)
{},
type
(
i
)
{
if
(
i
<
this
.
cur
)
{
return
'primary'
}
else
if
(
i
==
this
.
cur
)
{
return
'info'
}
else
if
(
i
==
this
.
cur
+
1
)
{
return
'warning'
}
else
{
return
'normal'
}
},
edit
(
record
)
{
// alert(record.id)
this
.
$emit
(
'node-click'
,
record
)
console
.
log
(
record
)
},
com
(
items
)
{
if
(
items
)
return
items
.
filter
((
u
)
=>
{
return
[
2
,
3
,
5
,
6
].
indexOf
(
u
.
status
)
>
-
1
})
else
return
[];
},
l
(
key
)
{
key
=
'orderInfo'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
computed
:
{},
watch
:
{}
}
</
script
>
\ No newline at end of file
pages/handle/shen.less
View file @
592a838a
...
...
@@ -13,4 +13,21 @@
.ivu-timeline-item-head{
background-color: transparent;
}
.shen_row{
border-bottom: 1px solid #ccc;
line-height: 30px;
padding: 0 0 0 5px;
.user_span{
max-width: 150px;
width: 120px;
}
.plr{
padding: 0 20px;
}
.remark{
max-width: 1260px;
min-width: 100px;
}
}
}
\ 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