Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bms-vue-obear
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
daywrite
bms-vue-obear
Commits
0f53b236
Commit
0f53b236
authored
Jun 09, 2019
by
daywrite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目列表
parent
56ac0bca
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
284 additions
and
6 deletions
+284
-6
groupView.vue
src/components/task_group_list/groupView.vue
+279
-0
document.js
src/routes/document.js
+1
-1
reimbursement.js
src/routes/reimbursement.js
+1
-1
task.js
src/routes/task.js
+3
-4
No files found.
src/components/task_group_list/groupView.vue
0 → 100644
View file @
0f53b236
<
template
>
<section>
<div
class=
"content"
>
<div>
<el-row
:gutter=
"10"
class=
"header-title"
>
<el-col
:span=
"12"
>
<h2>
客户名称:
{{
(
result
.
list
[
0
]
&&
result
.
list
[
0
].
client
&&
result
.
list
[
0
].
client
.
name
)
||
'未知'
}}
</h2>
</el-col>
</el-row>
</div>
<div
class=
"page-body-content"
>
<GroupItem
v-for=
"item in result.list"
:item=
"item"
:key=
"item.id"
>
<span
slot=
"opearate"
class=
"obear-opearate-button"
>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"leaveMessageSch(item)"
><span
class=
"badge"
v-if=
"item.commentCount.comment"
>
{{
item
.
commentCount
.
comment
?
item
.
commentCount
.
comment
:
''
}}
</span><i
class=
"fa fa-commenting"
></i>
留言
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"checkSch(item)"
:disabled=
"!item.can_complete"
><i
class=
"fa fa-fw fa-check"
></i>
完成
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"banSch(item)"
:disabled=
"!item.can_stop"
><i
class=
"fa fa-fw fa-ban"
></i>
中止
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"editSch(item)"
:disabled=
"!item.can_update"
><i
class=
"fa fa-edit animated"
></i>
编辑
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"deleteSch(item.id)"
:disabled=
"!item.can_delete"
><i
class=
"fa fa-trash-o animated-hove"
></i>
删除
</el-button>
</span>
</GroupItem>
<Pagenation
@
update:pager=
"pager =>
{updatePage(pager)}"
:total="result.pagenation.totalcount">
</Pagenation>
<leave-message
v-click-outside=
"lmClose"
ref=
"leaveMessage"
:lmTemplate=
"lmTemplate"
:type=
"102"
>
</leave-message>
</div>
</div>
<TaskGroupModal
ref=
"taskGroupModal"
>
<!-- v-click-outside="scheduleClose" -->
</TaskGroupModal>
</section>
</
template
>
<
script
>
import
GroupItem
from
'./groupItem'
import
TaskGroupModal
from
'../task_group/taskGroupModal'
import
Pagenation
from
'./groupPagenation'
import
clickOutside
from
'@/lib/bind'
import
{
requestAPI
,
api
}
from
'@/lib/commonMixin'
export
default
{
name
:
'taskGroupHome'
,
components
:
{
GroupItem
,
TaskGroupModal
,
Pagenation
},
directives
:
{
clickOutside
},
data
()
{
return
{
lmTemplate
:
[
{
name
:
'项目内容'
,
value
:
'title'
},
{
name
:
'负责人'
,
value
:
'headOf.name'
},
{
name
:
'状态'
,
value
:
'status_display'
},
{
name
:
'截止日期'
,
value
:
'target_completed_at'
},
{
name
:
'创建时间'
,
value
:
'created_at'
}
],
filter
:
[],
// groupType: 'all',
groupArray
:
[{
'key'
:
''
,
'name'
:
'全部'
},
{
'key'
:
'my'
,
'name'
:
'我参与的'
},
{
'key'
:
'head'
,
'name'
:
'我领导的'
}],
taskType
:
'group_list'
,
navArray
:
[{
'key'
:
'list'
,
'name'
:
'项目清单'
},
{
'key'
:
'group_list'
,
'name'
:
'项目列表'
}],
form
:
{
'ClientSearch[keyword]'
:
''
,
'TaskGroupSearch[filter]'
:
''
},
pagenation
:
{
thispage
:
1
,
pagesize
:
10
},
result
:
{
list
:
[],
countArr
:
[],
navCount
:
[],
pagenation
:
{
totalcount
:
1
,
thispage
:
1
,
pagesize
:
10
},
thisUser
:
{
id
:
''
,
name
:
''
,
sex
:
''
}
}
}
},
mounted
()
{
this
.
init
()
},
methods
:
{
init
()
{
let
id
=
this
.
id
=
this
.
$route
.
params
.
id
this
.
getList
({
id
,
page
:
this
.
pagenation
.
thispage
})
},
_reload
()
{
let
params
=
this
.
setParams
({
...
this
.
form
,
page
:
this
.
pagenation
.
thispage
},
{})
this
.
getList
(
params
)
},
updatePage
(
pager
)
{
let
ret
=
this
.
setParams
({
...
this
.
form
,
page
:
this
.
pagenation
.
thispage
},
{
page
:
pager
.
thispage
})
this
.
getList
(
ret
)
},
leaveMessageSch
(
item
)
{
this
.
$refs
.
leaveMessage
.
btnShow
(
item
)
},
lmClose
()
{
this
.
$refs
.
leaveMessage
&&
this
.
$refs
.
leaveMessage
.
btnClose
()
},
scheduleClose
()
{
this
.
$refs
.
taskGroupModal
&&
this
.
$refs
.
taskGroupModal
.
handleClose
()
},
addSch
()
{
this
.
$refs
.
taskGroupModal
.
show
()
},
editSch
(
item
)
{
this
.
$refs
.
taskGroupModal
.
show
(
item
)
},
checkSch
(
id
)
{
this
.
$confirm
(
'完成?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
requestAPI
(
api
.
closeTaskGroup
,
{
id
})
.
then
((
res
)
=>
{
this
.
_reload
()
this
.
$message
.
success
(
'删除成功'
)
})
}).
catch
(()
=>
{
this
.
$message
.
info
(
'取消删除'
)
})
},
banSch
(
id
)
{
this
.
$confirm
(
'中止?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
requestAPI
(
api
.
stopTaskGroup
,
{
id
})
.
then
((
res
)
=>
{
this
.
_reload
()
this
.
$message
.
success
(
'删除成功'
)
})
}).
catch
(()
=>
{
this
.
$message
.
info
(
'取消删除'
)
})
},
deleteSch
(
id
)
{
this
.
$confirm
(
'删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
requestAPI
(
api
.
deleteTaskGroup
,
{
id
})
.
then
((
res
)
=>
{
this
.
_reload
()
this
.
$message
.
success
(
'删除成功'
)
})
}).
catch
(()
=>
{
this
.
$message
.
info
(
'取消删除'
)
})
},
getList
(
params
)
{
requestAPI
(
api
.
getTaskGroupList
,
params
).
then
((
res
)
=>
{
const
{
list
=
[],
pagenation
=
{}
}
=
res
this
.
result
.
list
=
list
this
.
result
.
pagenation
=
pagenation
})
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
@include
c
(
'opearate-button'
)
{
>
.el-button
{
margin-right
:
0px
;
}
&
.btn-primary
.badge
{
color
:
#333744
;
background-color
:
#fff
;
}
&
.badge
{
position
:
relative
;
top
:
0px
;
left
:
-5px
;
display
:
inline-block
;
padding
:
0px
5px
;
font-size
:
12px
;
font-weight
:
700
;
line-height
:
1
;
text-align
:
center
;
white-space
:
nowrap
;
vertical-align
:
baseline
;
border-radius
:
.25rem
;
background
:
white
;
color
:
black
;
}
i
{
display
:
inline-block
;
padding-right
:
3px
;
}
}
</
style
>
src/routes/document.js
View file @
0f53b236
...
@@ -6,7 +6,7 @@ const routes = [{
...
@@ -6,7 +6,7 @@ const routes = [{
component
:
DocumentHome
component
:
DocumentHome
},
{
},
{
path
:
'/ofClient/:id'
,
path
:
'/ofClient/:id'
,
name
:
'
documentView
'
,
name
:
'
ofClient
'
,
component
:
DocumentView
component
:
DocumentView
}]
}]
export
default
routes
export
default
routes
src/routes/reimbursement.js
View file @
0f53b236
...
@@ -6,7 +6,7 @@ const routes = [{
...
@@ -6,7 +6,7 @@ const routes = [{
component
:
ReimbursementHome
component
:
ReimbursementHome
},
{
},
{
path
:
'/ofClient/:id'
,
path
:
'/ofClient/:id'
,
name
:
'
reimbursementView
'
,
name
:
'
ofClient
'
,
component
:
ReimbursementView
component
:
ReimbursementView
}]
}]
export
default
routes
export
default
routes
src/routes/task.js
View file @
0f53b236
import
TaskHome
from
'../components/task_list/taskHome'
import
TaskHome
from
'../components/task_list/taskHome'
import
GroupHome
from
'../components/task_group_list/groupHome'
import
GroupHome
from
'../components/task_group_list/groupHome'
import
ScheduleView
from
'../components/common/scheduleView'
import
GroupView
from
'../components/task_group_list/groupView'
const
routes
=
[{
const
routes
=
[{
path
:
'/task'
,
path
:
'/task'
,
name
:
'taskHome'
,
name
:
'taskHome'
,
...
@@ -12,7 +11,7 @@ const routes = [{
...
@@ -12,7 +11,7 @@ const routes = [{
component
:
GroupHome
component
:
GroupHome
},
{
},
{
path
:
'/ofClient/:id'
,
path
:
'/ofClient/:id'
,
name
:
'
scheduleView
'
,
name
:
'
ofClient
'
,
component
:
Schedule
View
component
:
Group
View
}]
}]
export
default
routes
export
default
routes
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