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
3e620ed6
Commit
3e620ed6
authored
Apr 18, 2019
by
huai.li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点击客户信息跳转页面
parent
9bf7aab3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
236 additions
and
3 deletions
+236
-3
schedule.js
src/apis/schedule.js
+4
-0
scheduleItem.vue
src/components/common/scheduleItem.vue
+1
-1
scheduleView.vue
src/components/common/scheduleView.vue
+224
-0
reportModal.vue
src/components/schedule/reportModal.vue
+1
-0
scheduleModal.vue
src/components/schedule/scheduleModal.vue
+1
-1
schedule.js
src/routes/schedule.js
+5
-1
No files found.
src/apis/schedule.js
View file @
3e620ed6
...
...
@@ -47,5 +47,9 @@ export default {
fulfill
:
{
url
:
'/vue/schedule/fulfill'
},
getScheduleListByClient
:
{
url
:
'/vue/schedule/of-client'
}
}
src/components/common/scheduleItem.vue
View file @
3e620ed6
...
...
@@ -4,7 +4,7 @@
<el-col
:span=
"4"
:xs=
"24"
class=
"obear-schedule-left"
:style=
"
{background: item.bgcolor}">
<el-row
:gutter=
"10"
>
<el-col
:span=
"24"
>
<router-link
:to=
"
{
app: 'client', name: 'viewClient', params: {id: item.client_id}
}">
<router-link
:to=
"
{
path: '/scheduleView/' + item.client_id
}">
<i
class=
"fa fa-star"
aria-hidden=
"true"
></i>
{{
isNullClient
?
'客户名称(未设置)'
:
item
.
client
.
name
}}
</router-link>
</el-col>
...
...
src/components/common/scheduleView.vue
0 → 100644
View file @
3e620ed6
<
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
.
name
}}
</h2>
</el-col>
</el-row>
</div>
<div
class=
"page-body-content"
>
<client-nav
:trigger=
"addSchedule"
trigger-text=
"新建待办事项"
></client-nav>
<ScheduleItem
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=
"reportSch(item)"
:disabled=
"!item.can_report"
><i
class=
"fa fa-calendar-check-o"
></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>
</ScheduleItem>
<Pagenation
@
update:pager=
"pager =>
{updatePage(pager)}"
:total="result.pagenation.totalcount">
</Pagenation>
<leave-message
ref=
"leaveMessage"
:lmTemplate=
"lmTemplate"
:type=
"9"
>
</leave-message>
</div>
</div>
<ScheduleModal
ref=
"scheduleModal"
>
</ScheduleModal>
</section>
</
template
>
<
script
>
import
ScheduleModal
from
'../schedule/scheduleModal'
import
ScheduleItem
from
'./scheduleItem'
import
LeaveMessage
from
'./leaveMessage'
import
Pagenation
from
'../schedule_list/schedulePagenation'
import
{
requestAPI
,
api
}
from
'@/lib/commonMixin'
export
default
{
components
:
{
ScheduleModal
,
ScheduleItem
,
LeaveMessage
,
Pagenation
},
data
()
{
return
{
id
:
''
,
pagenation
:
{
thispage
:
1
,
pagesize
:
10
},
lmTemplate
:
[
{
name
:
'客户名称'
,
value
:
'client.name'
,
default
:
'未设置'
},
{
name
:
'内容'
,
value
:
'description'
},
{
name
:
'待办时间'
,
value
:
'schedule_week_display'
},
{
name
:
'状态'
,
value
:
'schedule_status_display'
},
{
name
:
'开始时间'
,
value
:
'start_at'
},
{
name
:
'结束时间'
,
value
:
'end_at'
},
{
name
:
'重复'
,
value
:
'repeat_type_display'
},
{
name
:
'负责人'
,
value
:
'scheduleCreator.name'
},
{
name
:
'创建时间'
,
value
:
'created_at'
}
],
result
:
{
list
:
[],
pagenation
:
{
totalcount
:
1
,
thispage
:
1
,
pagesize
:
10
},
thisUser
:
{
id
:
''
,
name
:
''
,
sex
:
''
}
}
}
},
created
()
{
this
.
init
()
},
methods
:
{
init
()
{
let
id
=
this
.
id
=
this
.
$route
.
params
.
id
this
.
getScheduleList
({
id
,
page
:
this
.
pagenation
.
thispage
})
},
reload
()
{
this
.
getScheduleList
({
id
:
this
.
id
})
},
updatePage
(
pager
)
{
let
ret
=
Object
.
assign
({},
{
id
:
this
.
id
,
page
:
this
.
pagenation
.
thispage
},
{
page
:
pager
.
thispage
})
this
.
getScheduleList
(
ret
)
},
getScheduleList
(
ret
)
{
requestAPI
(
api
.
getScheduleListByClient
,
ret
).
then
((
res
)
=>
{
const
{
list
=
[],
pagenation
=
{},
thisUser
=
{}
}
=
res
this
.
result
.
list
=
list
this
.
result
.
pagenation
=
pagenation
this
.
result
.
thisUser
=
thisUser
})
},
addSchedule
()
{
this
.
$refs
.
scheduleModal
.
show
()
},
leaveMessageSch
(
item
)
{
this
.
$refs
.
leaveMessage
.
isShow
(
item
)
},
editSch
(
item
)
{
this
.
$refs
.
scheduleModal
.
show
(
item
)
},
reportSch
(
item
)
{
this
.
$refs
.
reportModal
.
show
(
item
)
},
deleteSch
(
id
)
{
this
.
$confirm
(
'删除该待办事项?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
requestAPI
(
api
.
deleteSchedule
,
{
id
})
.
then
((
res
)
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
reload
()
})
}).
catch
(()
=>
{
this
.
$message
.
info
(
'取消删除'
)
})
}
}
}
</
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
:
#333744
;
}
i
{
display
:
inline-block
;
padding-right
:
3px
;
}
}
</
style
>
src/components/schedule/reportModal.vue
View file @
3e620ed6
...
...
@@ -48,6 +48,7 @@ export default {
data
()
{
return
{
rules
:
{},
diaVis
:
false
,
model
:
{
id
:
''
,
...
...
src/components/schedule/scheduleModal.vue
View file @
3e620ed6
...
...
@@ -66,8 +66,8 @@ export default {
requestAPI
(
Object
.
assign
(
_apiUrl
,
{
method
:
'POST'
}),
_params
)
.
then
((
res
)
=>
{
this
.
$refs
.
scheduleSidePopup
.
close
()
this
.
$parent
.
reload
()
this
.
$message
.
success
(
'操作成功'
)
this
.
$parent
.
reload
()
})
}
}
...
...
src/routes/schedule.js
View file @
3e620ed6
import
ScheduleHome
from
'../components/schedule_list/scheduleHome'
import
ScheduleView
from
'../components/common/scheduleView'
const
routes
=
[{
path
:
'/scheduleHome'
,
name
:
'scheduleHome'
,
component
:
ScheduleHome
},
{
path
:
'/scheduleView/:id'
,
name
:
'scheduleView'
,
component
:
ScheduleView
}]
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