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
55179ae6
Commit
55179ae6
authored
Mar 21, 2019
by
huai.li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
留言更新数据绑定
parent
b4de2c0e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
132 additions
and
73 deletions
+132
-73
schedule.js
src/apis/schedule.js
+15
-0
leaveMessage.vue
src/components/common/leaveMessage.vue
+71
-69
scheduleHome.vue
src/components/schedule_list/scheduleHome.vue
+46
-4
No files found.
src/apis/schedule.js
View file @
55179ae6
...
@@ -27,5 +27,20 @@ export default {
...
@@ -27,5 +27,20 @@ export default {
// 删除待办事项
// 删除待办事项
deleteSchedule
:
{
deleteSchedule
:
{
url
:
'/vue/schedule/delete'
+
urlEnd
url
:
'/vue/schedule/delete'
+
urlEnd
},
// 留言
getCommentList
:
{
url
:
'/vue/comment/list'
+
urlEnd
},
// 留言新建
saveNewComment
:
{
url
:
'/vue/comment/save-new'
+
urlEnd
},
// 留言删除
deleteComment
:
{
url
:
'/vue/comment/delete'
+
urlEnd
}
}
}
}
src/components/common/leaveMessage.vue
View file @
55179ae6
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
class=
"content"
>
<div
class=
"content"
>
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<i
class=
"fa fa-angle-double-right"
@
click
.
prevent=
"is
Show
"
></i>
<i
class=
"fa fa-angle-double-right"
@
click
.
prevent=
"is
Close
"
></i>
</el-col>
</el-col>
<el-col
:span=
"24"
class=
"lm-content-leaveMessage"
>
<el-col
:span=
"24"
class=
"lm-content-leaveMessage"
>
<span>
留言
</span>
<span>
留言
</span>
...
@@ -15,48 +15,16 @@
...
@@ -15,48 +15,16 @@
<div
class=
"titleBox"
>
<div
class=
"titleBox"
>
<div
class=
"commentText"
>
<div
class=
"commentText"
>
<div
class=
"date sub-text"
>
<div
class=
"date sub-text"
>
<el-row
:gutter=
"20"
>
<el-row
:gutter=
"20"
v-for=
"(item, index) in lmTemplate"
>
<el-col
:span=
"6"
><span>
客户名称:
</span></el-col>
<el-col
:span=
"6"
><span>
{{
item
.
name
}}
:
</span></el-col>
<el-col
:span=
"18"
><span>
北京爱思泰尔技术开发有限责任公司
</span></el-col>
<el-col
:span=
"18"
><span>
{{
model
[
item
.
value
]
?
model
[
item
.
value
]
:
item
.
default
}}
</span></el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
><span>
内容:
</span></el-col>
<el-col
:span=
"18"
><span>
北京爱思泰尔技术开发有限责任公司
</span></el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
><span>
待办时间:
</span></el-col>
<el-col
:span=
"18"
><span>
北京爱思泰尔技术开发有限责任公司
</span></el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
><span>
状态:
</span></el-col>
<el-col
:span=
"18"
><span>
北京爱思泰尔技术开发有限责任公司
</span></el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
><span>
开始时间:
</span></el-col>
<el-col
:span=
"18"
><span>
北京爱思泰尔技术开发有限责任公司
</span></el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
><span>
结束时间:
</span></el-col>
<el-col
:span=
"18"
><span>
北京爱思泰尔技术开发有限责任公司
</span></el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
><span>
重复:
</span></el-col>
<el-col
:span=
"18"
><span>
北京爱思泰尔技术开发有限责任公司
</span></el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
><span>
负责人:
</span></el-col>
<el-col
:span=
"18"
><span>
北京爱思泰尔技术开发有限责任公司
</span></el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
><span>
创建时间:
</span></el-col>
<el-col
:span=
"18"
><span>
北京爱思泰尔技术开发有限责任公司
</span></el-col>
</el-row>
</el-row>
</div>
</div>
<form
class=
"form-inline form-comment"
role=
"form"
>
<form
class=
"form-inline form-comment"
role=
"form"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"form-control form-control-sm comment-input"
placeholder=
""
>
<input
type=
"text"
v-model=
"sendText"
class=
"form-control form-control-sm comment-input"
placeholder=
""
>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<el-button
size=
"mini"
>
发送
</el-button>
<el-button
size=
"mini"
@
click
.
prevent=
"send"
>
发送
</el-button>
</span>
</span>
</div>
</div>
</form>
</form>
...
@@ -64,13 +32,13 @@
...
@@ -64,13 +32,13 @@
</div>
</div>
<div
class=
"actionBox"
>
<div
class=
"actionBox"
>
<ul
class=
"commentList"
>
<ul
class=
"commentList"
>
<li>
<li
v-for=
"item in result.list"
>
<div
class=
"commenterImage"
>
<div
class=
"commenterImage"
>
<img
/>
<img
/>
</div>
</div>
<div
class=
"commentText"
>
<div
class=
"commentText"
>
<div
class=
"comment-title"
>
<div
class=
"comment-title"
>
曹永生 2019-03-19 18:26:02
{{
item
.
created_by
}}
{{
item
.
created_at
}}
<a
href=
"#"
class=
"addcomment"
>
<a
href=
"#"
class=
"addcomment"
>
<i
class=
"fa fa-fw fa-commenting-o pull-right"
></i>
<i
class=
"fa fa-fw fa-commenting-o pull-right"
></i>
</a>
</a>
...
@@ -79,46 +47,30 @@
...
@@ -79,46 +47,30 @@
</a>
</a>
</div>
</div>
<div
class=
"date sub-text"
>
<div
class=
"date sub-text"
>
1
{{
item
.
description
}}
<form
class=
"form-inline form-comment"
role=
"form"
>
<form
class=
"form-inline form-comment"
role=
"form"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"form-control form-control-sm comment-input"
placeholder=
""
>
<input
type=
"text"
class=
"form-control form-control-sm comment-input"
placeholder=
""
>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<el-button
size=
"mini"
>
回复
</el-button>
<el-button
size=
"mini"
@
click
.
prevent=
"send"
>
回复
</el-button>
</span>
</span>
</div>
</div>
</form>
</form>
</div>
</div>
<ul>
<ul>
<li>
<li
v-for=
"sItem in item.comments"
>
<div
class=
"commenterImage"
>
<div
class=
"commenterImage"
>
<img
/>
<img
/>
</div>
</div>
<div
class=
"commentText"
>
<div
class=
"commentText"
>
<div
class=
"comment-title"
>
<div
class=
"comment-title"
>
曹永生 2019-03-19 18:26:02
{{
sItem
.
created_by
}}
{{
sItem
.
created_at
}}
<a
href=
"#"
class=
"addcomment"
>
<a
href=
"#"
class=
"addcomment"
>
<i
class=
"fa fa-fw fa-commenting-o pull-right"
></i>
<i
class=
"fa fa-fw fa-commenting-o pull-right"
></i>
</a>
</a>
</div>
</div>
<div
class=
"date sub-text"
>
<div
class=
"date sub-text"
>
1
{{
sItem
.
description
}}
</div>
</div>
</li>
<li>
<div
class=
"commenterImage"
>
<img
/>
</div>
<div
class=
"commentText"
>
<div
class=
"comment-title"
>
曹永生 2019-03-19 18:26:02
<a
href=
"#"
class=
"addcomment"
>
<i
class=
"fa fa-fw fa-commenting-o pull-right"
></i>
</a>
</div>
<div
class=
"date sub-text"
>
1
</div>
</div>
</div>
</div>
</li>
</li>
...
@@ -134,18 +86,67 @@
...
@@ -134,18 +86,67 @@
</transition>
</transition>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
import
{
requestWithJsonAPI
,
api
}
from
'@/lib/commonMixin'
export
default
{
data
()
{
data
()
{
return
{
return
{
is
:
false
is
:
false
,
sendText
:
''
,
model
:
{},
result
:
{}
}
}
},
},
props
:
{
lmTemplate
:
Array
},
mounted
()
{
},
methods
:
{
methods
:
{
isShow
()
{
isClose
()
{
this
.
is
=
!
this
.
is
this
.
is
=
false
},
isShow
(
item
)
{
this
.
is
=
true
this
.
model
=
Object
.
assign
({},
item
)
if
(
this
.
is
)
{
this
.
init
()
}
}
},
send
()
{
requestWithJsonAPI
(
api
.
saveNewComment
)
.
then
((
res
)
=>
{
console
.
log
(
res
)
})
},
del
()
{
requestWithJsonAPI
(
api
.
deleteComment
)
.
then
((
res
)
=>
{
console
.
log
(
res
)
})
},
init
()
{
let
params
=
{
object_type
:
9
,
object_id
:
7578
}
}
requestWithJsonAPI
(
api
.
getCommentList
,
params
)
.
then
((
res
)
=>
{
this
.
result
=
res
console
.
log
(
res
)
})
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.pull-right
{
.pull-right
{
...
@@ -243,7 +244,8 @@
...
@@ -243,7 +244,8 @@
position
:
fixed
;
position
:
fixed
;
top
:
100px
;
top
:
100px
;
right
:
0
;
right
:
0
;
height
:
100%
;
bottom
:
0
;
// height: 100%;
width
:
60%
;
width
:
60%
;
background-color
:
#333744
;
background-color
:
#333744
;
color
:
white
;
color
:
white
;
...
...
src/components/schedule_list/scheduleHome.vue
View file @
55179ae6
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
:item=
"item"
:item=
"item"
:key=
"item.id"
>
:key=
"item.id"
>
<span
slot=
"opearate"
class=
"obear-opearate-button"
>
<span
slot=
"opearate"
class=
"obear-opearate-button"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"leaveMessageSch"
><i
class=
"fa fa-commenting"
></i>
留言
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"leaveMessageSch
(item)
"
><i
class=
"fa fa-commenting"
></i>
留言
</el-button>
<el-button
type=
"primary"
size=
"mini"
><i
class=
"fa fa-calendar-check-o"
></i>
汇报
</el-button>
<el-button
type=
"primary"
size=
"mini"
><i
class=
"fa fa-calendar-check-o"
></i>
汇报
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"editSch(item)"
><i
class=
"fa fa-edit animated"
></i>
编辑
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"editSch(item)"
><i
class=
"fa fa-edit animated"
></i>
编辑
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"deleteSch(item.id)"
><i
class=
"fa fa-trash-o animated-hove"
></i>
删除
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"deleteSch(item.id)"
><i
class=
"fa fa-trash-o animated-hove"
></i>
删除
</el-button>
...
@@ -30,7 +30,10 @@
...
@@ -30,7 +30,10 @@
:pager
.
sync=
"result.pagenation"
:pager
.
sync=
"result.pagenation"
:total=
"result.pagenation.totalcount"
>
:total=
"result.pagenation.totalcount"
>
</Pagenation>
</Pagenation>
<leave-message
ref=
"leaveMessage"
></leave-message>
<leave-message
ref=
"leaveMessage"
:lmTemplate=
"lmTemplate"
>
</leave-message>
</div>
</div>
</div>
</div>
<ScheduleModal
ref=
"scheduleModal"
></ScheduleModal>
<ScheduleModal
ref=
"scheduleModal"
></ScheduleModal>
...
@@ -62,6 +65,45 @@ export default {
...
@@ -62,6 +65,45 @@ export default {
data
()
{
data
()
{
return
{
return
{
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
:
'repeatSchedule'
},
{
name
:
'负责人'
,
value
:
'repeatSchedule'
},
{
name
:
'创建时间'
,
value
:
'created_at'
}
],
filter
:
[],
filter
:
[],
result
:
{
result
:
{
list
:
[],
list
:
[],
...
@@ -104,8 +146,8 @@ export default {
...
@@ -104,8 +146,8 @@ export default {
})
})
},
},
leaveMessageSch
()
{
leaveMessageSch
(
item
)
{
this
.
$refs
.
leaveMessage
.
isShow
()
this
.
$refs
.
leaveMessage
.
isShow
(
item
)
},
},
addSch
()
{
addSch
()
{
...
...
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