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
0685f966
Commit
0685f966
authored
Oct 29, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
ba35b1fc
e166fc1a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
470 additions
and
72 deletions
+470
-72
state.vue
components/page/state.vue
+1
-1
index.vue
pages/project/plan/index.vue
+22
-16
detail.vue
pages/project/project/detail.vue
+4
-3
recordTimeLine.vue
pages/project/record/recordTimeLine.vue
+353
-0
add.vue
pages/project/task/add.vue
+1
-1
detail.vue
pages/project/task/detail.vue
+78
-29
index.vue
pages/project/task/index.vue
+11
-22
No files found.
components/page/state.vue
View file @
0685f966
...
...
@@ -20,7 +20,7 @@
<Modal
v-model=
"modal"
title=
"生命周期"
width=
"
8
00"
width=
"
12
00"
footer-hide
:mask-closable=
"false"
>
...
...
pages/project/plan/index.vue
View file @
0685f966
...
...
@@ -146,6 +146,9 @@ export default {
align
:
"left"
,
high
:
true
,
code
:
"mes.project_plan.Type"
,
attr
:{
type
:
'icon'
}
},
{
key
:
"title"
,
...
...
@@ -162,14 +165,21 @@ export default {
high
:
true
,
code
:
"mes.project_plan.Status"
,
},
{
key
:
"startDate"
,
title
:
this
.
l
(
"startDate"
),
align
:
"left"
,
high
:
true
,
type
:
"date"
},
{
key
:
"endDate"
,
title
:
this
.
l
(
"endDate"
),
align
:
"left"
,
high
:
true
,
type
:
"date"
},
// {
// key: "startDate",
// title: this.l("startDate"),
// align: "left",
// high: true
// ,type:"date"
// },
// { key: "endDate", title: this.l("endDate"), align: "left", high: true,type:"date" },
{
key
:
"endDate"
,
title
:
"计划日期"
,
align
:
"left"
,
render
(
h
,
param
)
{
return
h
(
'DateRange'
,{
attrs
:{
value
:
param
.
row
}
})
},
},
// {
// key: "attachment",
// title: this.l("attachment"),
...
...
@@ -227,13 +237,6 @@ export default {
});
},
// rowclick(row,li){
// return {
// test(){
// alert(1);
// }
// }
// },
add
(
row
)
{
if
(
row
){
this
.
curId
=
row
.
id
;
...
...
@@ -268,7 +271,10 @@ export default {
console
.
warn
(
row
)
row
.
status
=
1
;
Api
.
sendtask
(
row
).
then
(
r
=>
{
Api
.
sendtask
({
id
:
row
.
id
,
status
:
1
,
}).
then
(
r
=>
{
if
(
r
.
success
){
this
.
$Message
.
info
(
"任务派发成功!"
);
this
.
search
();
...
...
pages/project/project/detail.vue
View file @
0685f966
...
...
@@ -56,9 +56,10 @@
</div>
<div
class=
"body-document"
>
<h4
v-text=
"title"
></h4>
<keep-alive>
<component
v-bind:is=
"detail"
:eid=
"eid"
:data=
"entity"
></component>
</keep-alive>
<!--
<keep-alive>
</keep-alive>
-->
</div>
</div>
</
template
>
...
...
pages/project/record/recordTimeLine.vue
0 → 100644
View file @
0685f966
<
template
>
<div>
<div
class=
"formBg"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
style=
"float:right"
>
<Button
type=
"primary"
@
click=
"add"
v-if=
"false"
>
新增记录
</Button>
</FormItem>
</Form>
</div>
<div>
<div
class=
"group"
>
<Row>
<Col
span=
"24"
>
<Timeline
v-if=
"recordList&&recordList.length>0"
>
<TimelineItem
v-for=
"(item,index) in recordList"
:key=
"index"
v-if=
"recordList&&recordList.length>0"
>
<p
class=
"content"
>
{{
item
.
creationTime
}}
</p>
<p
class=
"content"
>
操作员:
<User
:value=
"item.creatorUserId"
></User>
</p>
<p
class=
"content"
>
工时:
{{
item
.
workHour
}}
</p>
<p
class=
"content"
>
标题:
{{
item
.
title
}}
</p>
<p
class=
"pl10"
v-if=
"item.note"
><a
@
click=
"view(item.id)"
>
查看详细
</a></p>
<p
class=
"pl10"
v-if=
"item.attachment"
><a
@
click=
"viewFiles(item.attachment)"
>
查看附件
</a></p>
</TimelineItem>
</Timeline>
<p
class=
"content"
v-else
>
暂无数据
</p>
</Col>
</Row>
</div>
</div>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
<Modal
v-model=
"modalFiles"
title=
"查看附件"
width=
"800"
footer-hide
:mask-closable=
"false"
>
<FilesView
ref=
"refFile"
:parms=
"parms"
/>
</Modal>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
import
Search
from
'./search'
export
default
{
name
:
'list'
,
components
:
{
Search
},
head
:
{
title
:
"项目的工作记录"
,
author
:
"henq"
,
description
:
"project_plan_record 10/20/2020 2:55:13 PM"
,
},
props
:
{
eid
:
String
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"title"
,
value
:
null
}
},
modalFiles
:
false
,
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
''
,
columns
:
[{
key
:
"id"
,
title
:
this
.
$t
(
"id"
),
hide
:
true
,
align
:
"left"
,
high
:
true
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
high
:
true
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
high
:
true
},
{
key
:
"lastModificationTime"
,
title
:
this
.
l
(
"lastModificationTime"
),
align
:
"left"
,
high
:
true
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
(
"lastModifierUserId"
),
align
:
"left"
,
high
:
true
},
{
key
:
"isDeleted"
,
title
:
this
.
l
(
"isDeleted"
),
align
:
"left"
,
high
:
true
},
{
key
:
"deletionTime"
,
title
:
this
.
l
(
"deletionTime"
),
align
:
"left"
,
high
:
true
},
{
key
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
),
align
:
"left"
,
high
:
true
},
{
key
:
"projectId"
,
title
:
this
.
l
(
"projectId"
),
align
:
"left"
,
high
:
true
},
{
key
:
"planId"
,
title
:
this
.
l
(
"planId"
),
align
:
"left"
,
high
:
true
},
{
key
:
"workHour"
,
title
:
this
.
l
(
"workHour"
),
align
:
"left"
,
high
:
true
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"left"
,
high
:
true
,
code
:
'mes.project_plan_record.Status'
},
{
key
:
"title"
,
title
:
this
.
l
(
"title"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"note"
,
title
:
this
.
l
(
"note"
),
align
:
"left"
,
high
:
true
},
{
key
:
"attachment"
,
title
:
this
.
l
(
"attachment"
),
align
:
"left"
,
high
:
true
},
{
key
:
"taskId"
,
title
:
this
.
l
(
"taskId"
),
align
:
"left"
,
high
:
true
},
{
title
:
'操作'
,
key
:
'action'
,
width
:
140
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
"action"
},
[
h
(
'op'
,
{
attrs
:
{
oprate
:
'detail'
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
}
},
'查看'
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'delete'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
}
},
],
recordList
:
[],
parms
:
{
app
:
"taskRecord"
,
eid
:
null
,
name
:
""
,
field
:
""
,
},
listTitle
:
'所有'
,
listTime
:
'截止当前:'
+
this
.
$u
.
getToday
()
}
},
mounted
()
{
if
(
this
.
eid
!=
''
&&
this
.
eid
!=
null
)
{
this
.
load
(
this
.
eid
);
}
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:
{
load
(
v
)
{
//alert("aaa____" + v)
let
params
=
{
conditions
:
[{
fieldName
:
"taskId"
,
fieldValue
:
v
,
conditionalType
:
"Equal"
,
}],
sortBy
:
"creationTime"
,
isDesc
:
false
,
}
Api
.
list
(
params
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
recordList
=
r
.
result
}
})
},
ok
()
{
this
.
load
(
this
.
eid
)
this
.
modal
=
false
this
.
curId
=
''
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
add
()
{
this
.
curId
=
this
.
eid
;
this
.
title
=
"新增记录"
;
this
.
detail
=
()
=>
import
(
'./add'
)
this
.
modal
=
true
;
},
copy
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"克隆"
;
this
.
detail
=
()
=>
import
(
'./add'
)
this
.
modal
=
true
;
},
view
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
'./detail'
)
this
.
modal
=
true
;
},
edit
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
'./edit'
)
this
.
modal
=
true
;
},
remove
(
id
)
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
'删除成功'
)
}
})
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
},
viewFiles
(
val
)
{
this
.
parms
.
eid
=
val
;
this
.
modalFiles
=
true
;
},
l
(
key
)
{
let
vkey
=
"project_plan_record"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
''
&&
v
!=
null
)
{
this
.
load
(
v
);
}
}
}
}
</
script
>
<
style
lang=
"less"
>
.formBg {
padding-top: 10px;
background: #f5f5f5;
line-height: 30px;
}
.formBg .taskMenu .ivu-menu-horizontal {
background: #f5f5f5;
}
.group {
margin-top: 15px;
}
.group .ivu-row {
border: none
}
.time {
font-size: 14px;
font-weight: bold;
}
.content {
padding-left: 5px;
}
.boxBoder {
border: 2px solid #2db7f5;
border-radius: 5px;
padding: 10px 20px
}
.dividerpram {
background-color: #2db7f5;
height: 2px
}
</
style
>
pages/project/task/add.vue
View file @
0685f966
...
...
@@ -16,7 +16,7 @@
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"计划
开始结束时间
"
prop=
"date"
>
<FormItem
label=
"计划
起止日期
"
prop=
"date"
>
<DatePicker
type=
"datetimerange"
format=
"yyyy-MM-dd"
v-model=
"date"
placeholder=
"请选择时间范围"
@
on-change=
"changeFormat"
style=
"width: 300px"
></DatePicker>
</FormItem>
</Col>
...
...
pages/project/task/detail.vue
View file @
0685f966
<
template
>
<div
class=
"detail"
style=
"width:100%"
>
<div
class=
"detail"
style=
"width:100%;overflow:auto"
>
<div
style=
"width:80%; border-right:1px solid #ccc;padding-right:30px;float:left"
>
<Row
style=
"height:284px"
>
<Filed
:span=
"6
"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"6
"
:name=
"l('level')"
>
<Filed
:span=
"12
"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"12
"
:name=
"l('level')"
>
<state
code=
"project.task.level"
:value=
"entity.level"
type=
"text"
></state>
</Filed>
<Filed
:span=
"6
"
:name=
"l('status')"
>
<Filed
:span=
"12
"
:name=
"l('status')"
>
<state
code=
"project.task.status"
:value=
"entity.status"
type=
"text"
></state>
</Filed>
<Filed
:span=
"6
"
:name=
"l('userId')"
>
<Filed
:span=
"12
"
:name=
"l('userId')"
>
<User
:value=
"parseInt(entity.userId)"
></User>
</Filed>
<Filed
:span=
"12"
name=
"计划起止日期"
>
...
...
@@ -21,17 +22,25 @@
<Filed
:span=
"24"
:name=
"l('note')"
>
<div
style=
"height:200px"
v-html=
"entity.note"
class=
"tex_in10"
></div>
</Filed>
<Filed
:span=
"6
"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"6
"
:name=
"l('creatorUserId')"
>
<Filed
:span=
"12
"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12
"
:name=
"l('creatorUserId')"
>
<User
:value=
"entity.creatorUserId"
></User>
</Filed>
</Row>
<component
:is=
"detail"
:eid=
"curId"
v-if=
"false"
/>
</div>
<div
class=
"rightDiv"
:style=
"
{height:divHeight}">
<component
:is=
"detail"
:eid=
"curId"
/>
</div>
<FooterToolbar
class=
"ftball"
>
<div
class=
"tip"
><Button
type=
"primary"
@
click=
"updatepart(2)"
>
完成
</Button><Button
type=
"primary"
@
click=
"updatepart(3)"
>
冻结
</Button><Button
@
click=
"handleClose"
>
取消
</Button></div>
</FooterToolbar>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
import
ApiTask
from
'../task/api'
export
default
{
name
:
'Add'
,
data
()
{
...
...
@@ -45,6 +54,7 @@ export default {
startDate
:
""
,
endDate
:
""
,
},
divHeight
:
'200px'
,
rules
:
{
name
:
[{
required
:
true
,
...
...
@@ -64,10 +74,18 @@ export default {
props
:
{
eid
:
String
},
created
()
{
this
.
divHeight
=
window
.
innerHeight
-
150
+
'px'
},
mounted
()
{
if
(
this
.
eid
!=
''
&&
this
.
eid
!=
null
)
{
this
.
load
(
this
.
eid
);
}
window
.
onresize
=
()
=>
{
return
(()
=>
{
this
.
divHeight
=
window
.
innerHeight
-
150
+
'px'
})()
}
},
methods
:
{
load
(
v
)
{
...
...
@@ -84,11 +102,35 @@ export default {
endDate
:
r
.
result
.
plansToEndTime
,
},
this
.
$emit
(
'on-load'
)
//
this.curId = v
//this.detail = () => import('../record/index1
')
this
.
curId
=
v
this
.
detail
=
()
=>
import
(
'../record/recordTimeLine
'
)
})
},
updatepart
(
valStatus
)
{
let
params
=
{
id
:
this
.
eid
,
status
:
valStatus
}
if
(
valStatus
==
1
)
{
params
.
startDate
=
''
}
if
(
valStatus
==
2
)
{
params
.
endDate
=
''
}
ApiTask
.
updatepart
(
params
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'操作成功'
)
this
.
$emit
(
'on-ok'
)
}
else
{
this
.
$Message
.
error
(
'操作失败'
)
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'操作失败'
)
console
.
warn
(
err
)
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
...
...
@@ -112,4 +154,11 @@ export default {
text-indent
:
12px
;
text-align
:
inherit
!important
;
}
.rightDiv
{
width
:
18%
;
float
:
left
;
padding-left
:
50px
;
}
</
style
>
pages/project/task/index.vue
View file @
0685f966
...
...
@@ -145,7 +145,7 @@ export default {
oprate
:
'detail'
},
on
:
{
click
:
()
=>
this
.
viewRecord
(
params
.
row
.
id
)
click
:
()
=>
this
.
viewRecord
(
params
.
row
.
id
,
params
.
row
.
status
)
}
},
params
.
row
.
title
)
}
...
...
@@ -155,29 +155,15 @@ export default {
title
:
this
.
l
(
"level"
),
align
:
"center"
,
high
:
true
,
width
:
80
,
code
:
'project.task.level'
},
{
key
:
"projectTitle"
,
title
:
this
.
l
(
"projectTitle"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
key
:
"planTitle"
,
title
:
this
.
l
(
"planTitle"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
high
:
true
,
width
:
120
,
code
:
'project.task.status'
},
...
...
@@ -193,7 +179,7 @@ export default {
title
:
'计划起止日期'
,
align
:
"center"
,
high
:
true
,
width
:
4
00
,
width
:
2
00
,
render
:
(
h
,
params
)
=>
{
return
h
(
'TimeDifference'
,
{
props
:
{
...
...
@@ -211,7 +197,7 @@ export default {
title
:
'实际起止日期'
,
align
:
"center"
,
high
:
true
,
width
:
4
00
,
width
:
2
00
,
render
:
(
h
,
params
)
=>
{
return
h
(
'TimeDifference'
,
{
props
:
{
...
...
@@ -227,8 +213,9 @@ export default {
{
key
:
"workHour"
,
title
:
this
.
l
(
"workHour"
),
align
:
"
center
"
,
align
:
"
right
"
,
high
:
true
,
width
:
80
,
render
:
(
h
,
params
)
=>
{
return
h
(
'a'
,
{
attrs
:
{
...
...
@@ -257,8 +244,9 @@ export default {
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"
left
"
,
align
:
"
center
"
,
high
:
true
,
width
:
150
,
},
{
title
:
'操作'
,
...
...
@@ -472,8 +460,9 @@ export default {
onSelect
(
val
)
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
viewRecord
(
id
)
{
viewRecord
(
id
,
status
)
{
this
.
curId
=
id
;
this
.
tastkStatus
=
status
;
this
.
title
=
"查看记录"
;
this
.
fullScreen
=
true
;
this
.
detail
=
()
=>
import
(
'./detail'
)
...
...
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