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
d4d68161
Commit
d4d68161
authored
Apr 20, 2019
by
daywrite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目管理之项目清单标签
parent
4aaae7a1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
623 additions
and
0 deletions
+623
-0
index.ejs
index.ejs
+6
-0
api.js
src/api.js
+2
-0
task.js
src/apis/task.js
+5
-0
app.scss
src/assets/css/app.scss
+1
-0
task-app.scss
src/assets/css/task-app.scss
+30
-0
taskHome.vue
src/components/task_list/taskHome.vue
+305
-0
taskItem.vue
src/components/task_list/taskItem.vue
+204
-0
taskPagenation.vue
src/components/task_list/taskPagenation.vue
+55
-0
route.js
src/route.js
+7
-0
task.js
src/routes/task.js
+8
-0
No files found.
index.ejs
View file @
d4d68161
...
...
@@ -31,6 +31,12 @@
"title"
:
"费用报销"
,
"appName"
:
'reimbursement'
,
"url"
:
"/reimbursementHome"
},
{
"icon"
:
"fa-home"
,
"isRouteShow"
:
1
,
"title"
:
"项目管理"
,
"appName"
:
'task'
,
"url"
:
"/taskHome"
}],
homePage
:
{
appName
:
'reimbursement'
,
...
...
src/api.js
View file @
d4d68161
import
ScheduleApi
from
'./apis/schedule.js'
import
ReimburrsementApi
from
'./apis/reimbursement.js'
import
TaskApi
from
'./apis/task.js'
const
API_HOST
=
process
.
env
.
API_HOST
const
API_PORT
=
process
.
env
.
API_PORT
...
...
@@ -26,6 +27,7 @@ const option = {
let
apis
=
{}
apis
=
Object
.
assign
(
apis
,
ScheduleApi
)
apis
=
Object
.
assign
(
apis
,
ReimburrsementApi
)
apis
=
Object
.
assign
(
apis
,
TaskApi
)
export
default
{
option
,
...
...
src/apis/task.js
0 → 100644
View file @
d4d68161
export
default
{
getTaskFilter
:
{
url
:
'/vue/task/get-filter'
}
}
src/assets/css/app.scss
View file @
d4d68161
@import
'./schedule-app.scss'
;
@import
'./reim-app.scss'
;
@import
'./task-app.scss'
src/assets/css/task-app.scss
0 → 100644
View file @
d4d68161
.task-app
{
.el-radio-button__inner
,
.el-radio-button
:last-child
.el-radio-button__inner
,
.el-radio-button
:first-child
.el-radio-button__inner
{
border-left
:
1px
solid
#DCDFE6
;
margin
:
0
2px
0
0
;
border-radius
:
3px
;
}
.el-radio-button__inner
:hover
{
color
:
#333
;
background-color
:
#e6e6e6
;
border-color
:
#adadad
;
}
.el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
{
color
:
#fff
;
background-color
:
#17a2b8
;
border-color
:
#17a2b8
;
box-shadow
:
0
0
0
0
#17a2b8
;
}
.el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
:hover
{
color
:
#333
;
background-color
:
#d4d4d4
;
border-color
:
#8c8c8c
;
}
.ec-page-wrapper
.el-form-item__label
{
color
:
white
;
}
.mb10
{
margin-bottom
:
10px
;
}
}
src/components/task_list/taskHome.vue
0 → 100644
View file @
d4d68161
<
template
>
<section>
<div
class=
"content"
>
<search-header
ref=
"searchHeader"
:title=
"'项目清单'"
:search-key=
"'ClientSearch'"
:add-title=
"'新建项目清单'"
@
update:headerSearch=
"search => searchKeyword(search)"
@
update:headerAdd=
"() => addSch()"
>
</search-header>
<search-form
ref=
"clientForm"
:filter=
"filter"
@
update:clientList=
"form =>
{ updateForm(form) }">
</search-form>
<div
class=
"page-body-content"
>
<div
class=
"mb10"
>
<singleRadioTool
:form-item=
"taskType"
:options-list=
"navArray"
@
update:item=
"val =>
{ reimTypeChange(val) }">
</singleRadioTool>
</div>
<TaskItem
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=
"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>
</TaskItem>
<Pagenation
@
update:pager=
"pager =>
{updatePage(pager)}"
:total="result.pagenation.totalcount">
</Pagenation>
<leave-message
v-click-outside=
"lmClose"
ref=
"leaveMessage"
:lmTemplate=
"lmTemplate"
:type=
"20"
>
</leave-message>
</div>
</div>
<ReimModal
ref=
"reimModal"
>
<!-- v-click-outside="scheduleClose" -->
</ReimModal>
</section>
</
template
>
<
script
>
import
SearchHeader
from
'../common/searchHeader'
import
SearchForm
from
'../common/SearchForm'
import
TaskItem
from
'./taskItem'
import
ReimModal
from
'../reimbursement/reimbursementModal'
import
Pagenation
from
'./taskPagenation'
import
clickOutside
from
'@/lib/bind'
import
singleRadioTool
from
'../common/singleRadioTool'
import
SetParams
from
'../common/setParams'
import
{
requestAPI
,
api
}
from
'@/lib/commonMixin'
export
default
{
name
:
'reimbursementHome'
,
mixins
:
[
SetParams
],
components
:
{
SearchHeader
,
SearchForm
,
TaskItem
,
ReimModal
,
Pagenation
,
singleRadioTool
},
directives
:
{
clickOutside
},
data
()
{
return
{
lmTemplate
:
[
{
name
:
'报销类型'
,
value
:
'type.name'
,
default
:
''
},
{
name
:
'费用金额'
,
value
:
'amount'
},
{
name
:
'报销状态'
,
value
:
'status_display'
},
{
name
:
'发生时间'
,
value
:
'occurrence_at'
},
{
name
:
'费用说明'
,
value
:
'description'
},
{
name
:
'费用类型'
,
value
:
'costType.name'
},
{
name
:
'录入人'
,
value
:
'createdBy.name'
}
],
filter
:
[],
taskType
:
'list'
,
navArray
:
[{
'key'
:
'list'
,
'name'
:
'项目清单'
},
{
'key'
:
'group_list'
,
'name'
:
'项目列表'
}],
form
:
{
'ClientSearch[keyword]'
:
''
},
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
()
{
this
.
getFilter
()
},
_reload
()
{
let
params
=
this
.
setParams
({
...
this
.
form
,
page
:
this
.
pagenation
.
thispage
},
{})
this
.
getList
(
params
)
},
reimTypeChange
(
val
)
{
let
params
=
this
.
setParams
({
...
this
.
form
,
page
:
this
.
pagenation
.
thispage
},
{
navCount
:
this
.
reimType
})
this
.
getList
(
params
)
},
timeSearchForm
(
search
)
{
let
params
=
this
.
setParams
({
...
this
.
form
,
page
:
this
.
pagenation
.
thispage
},
search
)
this
.
getList
(
params
)
},
searchKeyword
(
search
)
{
let
params
=
this
.
setParams
({
...
this
.
form
,
page
:
this
.
pagenation
.
thispage
},
search
)
this
.
getList
(
params
)
},
updateForm
(
search
)
{
let
params
=
this
.
setParams
({
...
this
.
form
,
page
:
this
.
pagenation
.
thispage
},
search
)
this
.
getList
(
params
)
},
updatePage
(
pager
)
{
let
ret
=
this
.
setParams
({
...
this
.
form
,
page
:
this
.
pagenation
.
thispage
},
{
page
:
pager
.
thispage
})
this
.
getList
(
ret
)
},
getFilter
()
{
requestAPI
(
api
.
getTaskFilter
).
then
(
res
=>
{
this
.
filter
=
res
})
},
leaveMessageSch
(
item
)
{
this
.
$refs
.
leaveMessage
.
btnShow
(
item
)
},
lmClose
()
{
this
.
$refs
.
leaveMessage
&&
this
.
$refs
.
leaveMessage
.
btnClose
()
},
scheduleClose
()
{
this
.
$refs
.
reimModal
&&
this
.
$refs
.
reimModal
.
handleClose
()
},
addSch
()
{
this
.
$refs
.
reimModal
.
show
()
},
editSch
(
item
)
{
this
.
$refs
.
reimModal
.
show
(
item
)
},
deleteSch
(
id
)
{
this
.
$confirm
(
'删除该待办事项?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
requestAPI
(
api
.
deleteReim
,
{
id
})
.
then
((
res
)
=>
{
this
.
_reload
()
this
.
$message
.
success
(
'删除成功'
)
})
}).
catch
(()
=>
{
this
.
$message
.
info
(
'取消删除'
)
})
},
getList
(
params
)
{
requestAPI
(
api
.
getReimList
,
params
).
then
((
res
)
=>
{
const
{
list
=
[],
countArr
=
[],
navCount
=
[],
pagenation
=
{},
thisUser
=
{}
}
=
res
this
.
result
.
list
=
list
this
.
result
.
countArr
=
countArr
this
.
result
.
navCount
=
navCount
// this.reimType = navCount[0].key
this
.
result
.
pagenation
=
pagenation
this
.
result
.
thisUser
=
thisUser
})
}
}
}
</
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/components/task_list/taskItem.vue
0 → 100644
View file @
d4d68161
<
template
>
<section
class=
"obear-schedule-item"
>
<el-row
class=
"obear-schedule-row"
>
<el-col
:span=
"4"
:xs=
"24"
class=
"obear-schedule-left"
:style=
"
{background: item.bgcolor}">
<el-row
:gutter=
"10"
>
<el-col
:span=
"24"
>
<el-checkbox
v-model=
"checked"
>
<span>
普通 123
</span>
</el-checkbox>
</el-col>
<el-col
:span=
"24"
>
<span>
剩余时间 超时
</span>
</el-col>
</el-row>
</el-col>
<el-col
:span=
"20"
:xs=
"24"
class=
"obear-schedule-right"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"6"
:xs=
"24"
>
<span>
负责人:
</span>
<span>
<img
class=
"user-avatar rounded-circle"
:src=
"item.icon"
>
{{
item
.
name
}}
</span>
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
<span>
项目列表:
</span><span
class=
"collightBlue"
>
{{
item
.
project
.
name
}}
</span>
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
<span>
客户名称:
</span><span
class=
"collightBlue"
>
{{
item
.
client
.
name
}}
</span>
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
<span>
状态:
</span><span
class=
"obear-schedule-right__content"
:style=
"
{'border-color': item.bgcolor, color: item.bgcolor}">
{{
item
.
status_display
}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"10"
>
<el-col
:span=
"6"
:xs=
"24"
>
<span
class=
"obear-schedule-right__content"
>
截至日期
</span><span>
:
{{
item
.
description
}}
</span>
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
<span
class=
"obear-schedule-right__content"
>
完成时间
</span><span>
:
{{
item
.
description
}}
</span>
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
<slot
name=
"opearate"
>
</slot>
</el-col>
</el-row>
</el-col>
</el-row>
</section>
</
template
>
<
script
>
export
default
{
name
:
'taskItem'
,
props
:
{
item
:
Object
},
data
()
{
return
{
}
},
computed
:
{
},
mounted
()
{
},
methods
:
{
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.colRed
{
color
:
red
;
border
:
1px
solid
red
;
}
.colGreen
{
color
:
green
;
border
:
1px
solid
green
;
}
.colWhite
{
color
:
white
;
}
.collightBlue
{
color
:
#649FD7
;
}
.colBlue
{
color
:
#0056b3
;
}
.rounded-circle
{
border-radius
:
50%
!
important
;
}
.user-avatar
{
width
:
16px
;
max-width
:
16px
;
height
:
16px
;
max-height
:
16px
;
}
@include
c
(
'schedule-item'
)
{
margin-bottom
:
10px
;
font-size
:
12px
;
}
@include
c
(
'schedule-item:first-child'
)
{
.obear-schedule-left
{
border-radius
:
5px
0
0
0
;
}
}
@include
c
(
'schedule-row'
)
{
// min-height:100px;
background-color
:white
;
display
:
flex
;
flex-wrap
:
wrap
;
}
@include
c
(
'schedule-left'
)
{
background-color
:
#EB7567
;
color
:
white
;
min-height
:
100%
;
padding
:
10px
15px
6px
;
>
.el-row
{
>
.el-col
{
margin-bottom
:
4px
;
}
}
.el-row
div
:first-child
,
.el-row
div
:first-child
a
{
color
:
white
;
}
span
{
display
:
inline-block
;
// padding-left: 5px;
}
i
{
display
:inline-block
;
padding-right
:
5px
;
}
img
{
display
:inline-block
;
margin-right
:
3px
;
}
@include
e
(
'private'
)
{
display
:
inline-block
;
padding-left
:
5px
;
border-radius
:
5px
;
border
:
1px
solid
white
;
width
:
35px
;
height
:
17px
;
}
}
@include
c
(
'schedule-right'
)
{
height
:
100%
;
padding
:
10px
15px
6px
;
>
.el-row
{
>
.el-col
{
margin-bottom
:
4px
;
.el-button
{
margin
:
0
2px
;
padding
:
7px
;
}
.date-time
{
color
:
#649FD7
;
}
}
}
.badge
{
border-radius
:
2px
;
color
:
#333744
;
background
:
#ffffff
;
vertical-align
:
baseline
;
display
:
inline
;
padding
:
2px
6px
;
}
span
.badge-unread
{
&
:hover
{
border-color
:
#de321d
}
color
:
#fff
;
background-color
:
#e54c3a
;
border-color
:
#a32516
}
y
:
flex
;
@include
e
(
'item'
)
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-around
;
padding
:
5px
0
5px
5px
;
flex
:
1
;
}
@include
e
(
'status'
)
{
color
:
red
;
}
@include
e
(
'content'
)
{
display
:
inline-block
;
border
:
1px
solid
#dc3545
;
border-radius
:
5px
;
height
:
20px
;
padding
:
0
5px
0
5px
;
color
:
#dc3545
;
}
}
</
style
>
src/components/task_list/taskPagenation.vue
0 → 100644
View file @
d4d68161
<
template
>
<section
class=
"pull-right"
>
<el-pagination
v-if=
"total > 0"
class=
"mb20 mt20"
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pager.thispage"
:page-sizes=
"[10, 20, 40, 60, 80, 100]"
:page-size=
"pager.pagesize"
layout=
"total, prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
</section>
</
template
>
<
script
>
export
default
{
props
:
{
total
:
{
type
:
Number
,
default
:
0
}
},
data
()
{
return
{
pager
:
{
thispage
:
1
,
pagesize
:
20
,
totalcount
:
0
}
}
},
created
()
{
this
.
$emit
(
'update:pager'
,
this
.
pager
)
},
methods
:
{
handleSizeChange
(
val
)
{
this
.
pager
.
thispage
=
1
this
.
pager
.
pagesize
=
val
this
.
pager
.
totalcount
=
this
.
total
this
.
$emit
(
'update:pager'
,
this
.
pager
)
},
handleCurrentChange
(
val
)
{
this
.
pager
.
thispage
=
val
this
.
pager
.
totalcount
=
this
.
total
this
.
$emit
(
'update:pager'
,
this
.
pager
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/route.js
View file @
d4d68161
...
...
@@ -2,13 +2,17 @@ import portal from 'vis-portal'
import
ScheduleRoute
from
'./routes/schedule'
import
ReimbursementRoute
from
'./routes/reimbursement'
import
TaskRoute
from
'./routes/task'
let
routes
=
[]
let
reimRoutes
=
[]
let
taskRoutes
=
[]
const
appName
=
'schedule'
routes
=
[].
concat
(
ScheduleRoute
)
reimRoutes
=
[].
concat
(
ReimbursementRoute
)
taskRoutes
=
[].
concat
(
TaskRoute
)
let
RouterInit
=
()
=>
{
portal
.
createApp
(
appName
,
{},
app
=>
{
...
...
@@ -17,6 +21,9 @@ let RouterInit = () => {
portal
.
createApp
(
'reimbursement'
,
{},
app
=>
{
app
.
mapRoute
(
reimRoutes
)
})
portal
.
createApp
(
'task'
,
{},
app
=>
{
app
.
mapRoute
(
taskRoutes
)
})
// portal.createApp('client', {}, app => {
// app.mapRoute([
// {
...
...
src/routes/task.js
0 → 100644
View file @
d4d68161
import
TaskHome
from
'../components/task_list/taskHome'
const
routes
=
[{
path
:
'/taskHome'
,
name
:
'taskHome'
,
component
:
TaskHome
}]
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