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
43dd63ed
Commit
43dd63ed
authored
Oct 28, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
task
parent
a5776103
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
400 deletions
+99
-400
add.vue
pages/project/task/add.vue
+4
-4
index.vue
pages/project/task/index.vue
+95
-396
No files found.
pages/project/task/add.vue
View file @
43dd63ed
...
...
@@ -53,8 +53,8 @@ export default {
userIds
:
""
,
userId
:
""
,
note
:
""
,
plan
StartD
ate
:
null
,
plan
EndD
ate
:
null
,
plan
startd
ate
:
null
,
plan
endd
ate
:
null
,
},
rules
:
{
name
:
[{
...
...
@@ -117,8 +117,8 @@ export default {
});
},
changeFormat
(
val
)
{
this
.
entity
.
plan
StartD
ate
=
val
[
0
];
this
.
entity
.
plan
EndD
ate
=
val
[
1
];
this
.
entity
.
plan
startd
ate
=
val
[
0
];
this
.
entity
.
plan
endd
ate
=
val
[
1
];
},
handleImg
(
e
)
{
console
.
warn
(
e
)
...
...
pages/project/task/index.vue
View file @
43dd63ed
...
...
@@ -54,8 +54,7 @@
</Tabs>
</div>
</FormItem>
<FormItem
prop=
"keys"
><Input
placeholder=
"请输入项目标题/计划名称/任务标题"
v-model=
"easySearch.keys.value"
v-width=
"240"
/>
</FormItem>
<FormItem
prop=
"keys"
><Input
placeholder=
"请输入项目标题/计划名称/任务标题"
v-model=
"easySearch.keys.value"
v-width=
"240"
/>
</FormItem>
<FormItem><Button
type=
"primary"
@
click=
"search"
>
查询
</Button></FormItem>
<!--
<FormItem>
...
...
@@ -83,8 +82,8 @@
</template>
<
script
>
import
Api
from
"./api"
;
import
Search
from
"./search"
;
import
Api
from
'./api'
import
Search
from
'./search'
export
default
{
name
:
'list'
,
components
:
{
...
...
@@ -199,8 +198,8 @@ export default {
return
h
(
'TimeDifference'
,
{
props
:
{
timeValue
:
{
startDate
:
params
.
row
.
plan
StartD
ate
,
endDate
:
params
.
row
.
plan
EndD
ate
,
startDate
:
params
.
row
.
plan
startd
ate
,
endDate
:
params
.
row
.
plan
endd
ate
,
},
work
:
1
}
...
...
@@ -383,124 +382,79 @@ export default {
this
.
modal
=
false
this
.
curId
=
0
;
},
projectId
:
{
op
:
"Equal"
,
value
:
""
,
},
planId
:
{
op
:
"In"
,
value
:
[],
search
()
{
this
.
easySearch
.
planId
.
value
=
this
.
planIdsCur
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
},
theme1
:
"light"
,
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
""
,
fullScreen
:
false
,
projectId
:
""
,
columns
:
[
// {
// key: "selection",
// type: "selection",
// width: 50,
// align: "center"
// },
{
key
:
"id"
,
title
:
this
.
$t
(
"id"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
add
()
{
this
.
curId
=
this
.
projectId
;
this
.
title
=
"新增"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
'./add'
)
this
.
modal
=
true
;
},
{
key
:
"title"
,
title
:
this
.
l
(
"title"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"a"
,
{
attrs
:
{
oprate
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
viewRecord
(
params
.
row
.
id
),
},
},
params
.
row
.
title
);
},
highSearch
()
{
this
.
curId
=
0
;
this
.
title
=
"高级搜索"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
'./search'
)
this
.
modal
=
true
;
},
{
key
:
"level"
,
t
itle
:
this
.
l
(
"level"
),
align
:
"center"
,
high
:
true
,
code
:
"project.task.level"
,
copy
(
id
)
{
this
.
curId
=
id
;
t
his
.
title
=
"克隆"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
'./add'
)
this
.
modal
=
true
;
},
{
key
:
"projectTitle"
,
title
:
this
.
l
(
"projectTitle"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
view
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"详情"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
'./detail'
)
this
.
modal
=
true
;
},
{
key
:
"planTitle"
,
title
:
this
.
l
(
"planTitle"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
edit
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"编辑"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
'./edit'
)
this
.
modal
=
true
;
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
high
:
true
,
code
:
"project.task.status"
,
remove
(
id
)
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
'删除成功'
)
}
})
},
{
key
:
"userId"
,
title
:
this
.
l
(
"userId"
),
align
:
"left"
,
high
:
true
,
type
:
"user"
,
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
},
{
key
:
"startDate"
,
title
:
this
.
l
(
"startDate"
),
align
:
"center"
,
high
:
true
,
onHide
()
{
// this.$Message.info("收起左侧树")
this
.
showMenu
=
false
;
},
{
key
:
"endDate"
,
title
:
this
.
l
(
"endDate"
),
align
:
"center"
,
high
:
true
,
showMenuFn
()
{
//this.$Message.info("展开左侧树")
this
.
showMenu
=
true
;
},
{
key
:
"workHour"
,
title
:
this
.
l
(
"workHour"
),
align
:
"center"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"a"
,
{
attrs
:
{
oprate
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
viewWork
(
params
.
row
.
id
),
},
},
params
.
row
.
workHour
);
},
productSearch
(
id
,
item
,
planIds
)
{
this
.
planId
=
item
.
selected
?
id
:
''
;
this
.
planIdsCur
=
item
.
selected
?
planIds
:
[]
let
where
=
{
planId
:
{
op
:
"In"
,
value
:
item
.
selected
?
planIds
:
[]
},
projectId
:
{
op
:
"Equal"
,
value
:
this
.
eid
},
};
this
.
$refs
.
grid
.
reload
(
where
);
},
updatepart
(
valId
,
valStatus
)
{
let
params
=
{
...
...
@@ -526,284 +480,46 @@ export default {
console
.
warn
(
err
)
})
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
onSelect
(
val
)
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
viewRecord
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"查看记录"
;
this
.
fullScreen
=
fals
e
;
this
.
fullScreen
=
tru
e
;
this
.
detail
=
()
=>
import
(
'./detail'
)
this
.
modal
=
true
;
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
200
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
,
},
[
h
(
"op"
,
{
attrs
:
{
icon
:
"md-arrow-dropright-circle"
,
type
:
"icon"
,
oprate
:
"edit"
,
title
:
params
.
row
.
status
==
0
?
"开始"
:
params
.
row
.
status
==
2
?
"继续"
:
""
,
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true
},
on
:
{
click
:
()
=>
this
.
updatepart
(
params
.
row
.
id
,
1
),
},
}),
// h('op', {
// attrs: {
// icon: "ios-pause",
// type: "icon",
// title: "暂停",
// //disable: params.row.status == 1 ? false : true
// },
// on: {
// click: () => this.updatepart(params.row.id, 2)
// }
// }),
h
(
"op"
,
{
attrs
:
{
icon
:
"ios-alarm"
,
type
:
"icon"
,
oprate
:
"edit"
,
title
:
"完成"
,
//disable: (params.row.status != 0 && params.row.status != 3) ? false : true
},
on
:
{
click
:
()
=>
this
.
updatepart
(
params
.
row
.
id
,
3
),
},
}),
h
(
"op"
,
{
attrs
:
{
icon
:
"md-add"
,
type
:
"icon"
,
oprate
:
"add"
,
title
:
"新增记录"
,
// disable: (params.row.status != 3 && params.row.status != 4) ? false : true
},
on
:
{
click
:
()
=>
this
.
addRecord
(
params
.
row
.
id
),
},
}),
h
(
"op"
,
{
attrs
:
{
icon
:
"md-create"
,
type
:
"icon"
,
oprate
:
"edit"
,
title
:
"修改"
,
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
),
},
}),
h
(
"op"
,
{
attrs
:
{
icon
:
"md-trash"
,
type
:
"icon"
,
title
:
"删除"
,
oprate
:
"delete"
,
// disable: (params.row.status == 0 || params.row.status == 3) ? false : true
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
),
},
}),
]
);
},
},
],
data1
:
[{
id
:
1
,
title
:
"测试title"
,
},
],
data
:
[],
planId
:
""
,
//当前计划Id
planIdsCur
:
[],
};
},
props
:
{
eid
:
String
,
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
viewWork
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"查看工时"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
'../record'
)
this
.
modal
=
true
;
},
created
(
)
{
if
(
this
.
eid
!=
""
)
{
this
.
projectId
=
this
.
eid
;
this
.
easySearch
.
projectId
.
value
=
this
.
eid
;
}
this
.
treeHeight
=
window
.
innerHeight
-
150
;
addRecord
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"新增记录"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
'../record/add'
)
this
.
modal
=
true
;
},
mounted
()
{
if
(
this
.
eid
!=
""
)
{
this
.
easySearch
.
projectId
.
value
=
this
.
eid
;
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
l
(
key
)
{
let
vkey
=
"project_task"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
""
)
{
this
.
eid
=
v
}
},
methods
:
{
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
easySearch
.
planId
.
value
=
this
.
planIdsCur
;
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
add
()
{
this
.
curId
=
this
.
projectId
;
this
.
title
=
"新增"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
highSearch
()
{
this
.
curId
=
0
;
this
.
title
=
"高级搜索"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
"./search"
);
this
.
modal
=
true
;
},
copy
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"克隆"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
view
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"详情"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
modal
=
true
;
},
edit
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"编辑"
;
this
.
fullScreen
=
false
;
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
;
},
onHide
()
{
// this.$Message.info("收起左侧树")
this
.
showMenu
=
false
;
},
showMenuFn
()
{
//this.$Message.info("展开左侧树")
this
.
showMenu
=
true
;
},
productSearch
(
id
,
item
,
planIds
)
{
this
.
planId
=
item
.
selected
?
id
:
""
;
this
.
planIdsCur
=
item
.
selected
?
planIds
:
[];
let
where
=
{
planId
:
{
op
:
"In"
,
value
:
item
.
selected
?
planIds
:
[],
},
projectId
:
{
op
:
"Equal"
,
value
:
this
.
eid
,
},
};
this
.
$refs
.
grid
.
reload
(
where
);
},
updatepart
(
valId
,
valStatus
)
{
let
params
=
{
id
:
valId
,
status
:
valStatus
,
};
Api
.
updatepart
(
params
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"操作成功"
);
}
else
{
this
.
$Message
.
error
(
"操作失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
console
.
warn
(
err
);
});
},
onSelect
(
val
)
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
viewRecord
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"查看记录"
;
this
.
fullScreen
=
true
;
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
modal
=
true
;
},
viewWork
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"查看工时"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
"../record"
);
this
.
modal
=
true
;
},
addRecord
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"新增记录"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
"../record/add"
);
this
.
modal
=
true
;
},
l
(
key
)
{
let
vkey
=
"project_task"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
""
)
{
this
.
eid
=
v
;
}
},
},
};
}
}
}
</
script
>
<
style
lang=
"less"
>
@import "../../../assets/css/custom.less";
.full {
margin-top: 0;
...
...
@@ -818,23 +534,6 @@ props: {
content: "\f33d";
}
}
.ivu-layout-sider {
background: @layout-content-bg-color;
margin-right: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
// height: 89vh;
overflow: auto;
}
.ivu-layout-content {
margin-left: 5px;
background: @right-bg;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
overflow: auto;
padding: 10px;
// height: 89vh;
}
}
.taskTab .ivu-tabs-bar {
...
...
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