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
8c437984
Commit
8c437984
authored
Apr 18, 2019
by
huai.li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加汇报功能
parent
8347f1ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
115 additions
and
2 deletions
+115
-2
schedule.js
src/apis/schedule.js
+4
-0
reportModal.vue
src/components/schedule/reportModal.vue
+100
-0
scheduleHome.vue
src/components/schedule_list/scheduleHome.vue
+11
-2
No files found.
src/apis/schedule.js
View file @
8c437984
...
@@ -43,5 +43,9 @@ export default {
...
@@ -43,5 +43,9 @@ export default {
// 留言删除
// 留言删除
deleteComment
:
{
deleteComment
:
{
url
:
'/vue/comment/delete'
url
:
'/vue/comment/delete'
},
fulfill
:
{
url
:
'/vue/schedule/fulfill'
}
}
}
}
src/components/schedule/reportModal.vue
0 → 100644
View file @
8c437984
<
template
>
<section>
<sidePopup
ref=
"reportSidePopup"
title=
"汇报"
:width=
"40"
>
<section
class=
"ec-page-wrapper"
style=
"overflow: hidden; padding-bottom: 0px;"
>
<el-form
label-width=
"120px"
ref=
"form"
:rules=
"rules"
:model=
"model"
class=
"ec-create-form"
>
<el-form-item
label=
"待办事项内容"
prop=
"schedule_title"
class=
"ec-clear-left ec-form-item-lg is-required"
>
{{
model
.
schedule_title
}}
</el-form-item>
<el-form-item
label=
"状态"
prop=
"is_complete"
class=
"ec-clear-left is-required"
>
<single-radio
:form-item=
"model.is_complete"
:options-list=
"is_public_array"
@
update:item=
"val =>
{model.is_complete = val}">
</single-radio>
</el-form-item>
<el-form-item
label=
"情况说明"
prop=
"complete_description"
class=
"ec-clear-left ec-form-item-lg is-required"
>
<el-input
class=
"ec-input-normal"
type=
"textarea"
:rows=
"2"
v-model
.
trim=
"model.complete_description"
>
</el-input>
</el-form-item>
</el-form>
</section>
<div
class=
"mt20"
style=
"margin-left: 150px;"
>
<el-button
type=
"cancel"
@
click
.
stop
.
prevent=
"handleClose"
size=
"mini"
>
取 消
</el-button>
<el-button
type=
"confirm"
@
click
.
stop
.
prevent=
"save"
size=
"mini"
>
确 定
</el-button>
</div>
</sidePopup>
</section>
</
template
>
<
script
>
import
{
requestAPI
,
api
}
from
'@/lib/commonMixin'
import
{
setModule
}
from
'@/lib/viewHelper'
import
singleRadio
from
'../common/singleRadio'
import
settingMixin
from
'../common/settingMixin'
export
default
{
mixins
:
[
settingMixin
],
components
:
{
singleRadio
},
data
()
{
return
{
diaVis
:
false
,
model
:
{
id
:
''
,
schedule_title
:
''
,
is_complete
:
'true'
,
complete_description
:
''
// 负责人
},
is_public_array
:
[
{
'name'
:
'已完成'
,
'key'
:
true
},
{
'name'
:
'未完成'
,
'key'
:
false
}
]
}
},
methods
:
{
show
(
model
)
{
this
.
model
.
id
=
model
.
id
this
.
model
.
schedule_title
=
model
.
schedule_title
this
.
$refs
.
reportSidePopup
.
show
()
},
handleClose
()
{
Object
.
keys
(
this
.
model
).
forEach
(
item
=>
{
this
.
model
[
item
]
=
''
})
this
.
model
[
'is_complete'
]
=
'true'
this
.
$refs
.
reportSidePopup
.
close
()
},
save
()
{
let
_params
=
Object
.
assign
({},
setModule
(
this
.
model
,
'Schedules'
))
delete
_params
[
'Schedules[schedule_title]'
]
requestAPI
(
Object
.
assign
(
api
.
fulfill
,
{
method
:
'POST'
}),
_params
)
.
then
((
res
)
=>
{
this
.
$refs
.
reportSidePopup
.
close
()
this
.
$message
.
success
(
'操作成功'
)
this
.
$parent
.
reload
()
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
src/components/schedule_list/scheduleHome.vue
View file @
8c437984
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
: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
.
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=
"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=
"
edi
tSch(item)"
:disabled=
"!item.can_report"
><i
class=
"fa fa-calendar-check-o"
></i>
汇报
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"
repor
tSch(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=
"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>
<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>
</span>
...
@@ -43,6 +43,9 @@
...
@@ -43,6 +43,9 @@
ref=
"scheduleModal"
ref=
"scheduleModal"
v-click-outside=
"scheduleClose"
>
v-click-outside=
"scheduleClose"
>
</ScheduleModal>
</ScheduleModal>
<ReportModal
ref=
"reportModal"
>
</ReportModal>
</section>
</section>
</
template
>
</
template
>
...
@@ -55,6 +58,7 @@ import LeaveMessage from '../common/leaveMessage'
...
@@ -55,6 +58,7 @@ import LeaveMessage from '../common/leaveMessage'
import
Pagenation
from
'./schedulePagenation'
import
Pagenation
from
'./schedulePagenation'
import
clickOutside
from
'@/lib/bind'
import
clickOutside
from
'@/lib/bind'
import
SetParams
from
'../common/setParams'
import
SetParams
from
'../common/setParams'
import
ReportModal
from
'../schedule/reportModal'
import
{
import
{
requestAPI
,
requestAPI
,
api
api
...
@@ -70,7 +74,8 @@ export default {
...
@@ -70,7 +74,8 @@ export default {
ScheduleItem
,
ScheduleItem
,
ScheduleModal
,
ScheduleModal
,
LeaveMessage
,
LeaveMessage
,
Pagenation
Pagenation
,
ReportModal
},
},
directives
:
{
directives
:
{
...
@@ -217,6 +222,10 @@ export default {
...
@@ -217,6 +222,10 @@ export default {
this
.
$refs
.
scheduleModal
.
show
(
item
)
this
.
$refs
.
scheduleModal
.
show
(
item
)
},
},
reportSch
(
item
)
{
this
.
$refs
.
reportModal
.
show
(
item
)
},
deleteSch
(
id
)
{
deleteSch
(
id
)
{
this
.
$confirm
(
'删除该待办事项?'
,
'提示'
,
{
this
.
$confirm
(
'删除该待办事项?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
...
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