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
ea0e104d
Commit
ea0e104d
authored
Mar 27, 2019
by
daywrite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改分页
parent
d6cc85ce
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
31 deletions
+32
-31
ajax.js
src/ajax.js
+1
-0
schedule.js
src/apis/schedule.js
+10
-12
scheduleHome.vue
src/components/schedule_list/scheduleHome.vue
+20
-18
schedulePagenation.vue
src/components/schedule_list/schedulePagenation.vue
+1
-1
No files found.
src/ajax.js
View file @
ea0e104d
...
@@ -51,6 +51,7 @@ let setUrlK = (o) => {
...
@@ -51,6 +51,7 @@ let setUrlK = (o) => {
export
function
requestAPI
(
option
,
data
)
{
export
function
requestAPI
(
option
,
data
)
{
let
_option
=
Object
.
assign
({},
option
)
let
_option
=
Object
.
assign
({},
option
)
if
(
dev
&&
data
&&
option
.
method
===
'GET'
)
{
if
(
dev
&&
data
&&
option
.
method
===
'GET'
)
{
_option
.
url
+=
'?duplextrans'
_option
.
url
+=
setUrlK
(
data
)
_option
.
url
+=
setUrlK
(
data
)
data
=
{}
data
=
{}
}
}
...
...
src/apis/schedule.js
View file @
ea0e104d
const
dev
=
process
.
env
.
NODE_ENV
===
'development'
let
urlEnd
=
dev
?
'?duplextrans'
:
''
export
default
{
export
default
{
getScheduleList
:
{
getScheduleList
:
{
url
:
'/vue/schedule/list'
+
urlEnd
url
:
'/vue/schedule/list'
},
},
// 获取查询条件
// 获取查询条件
getScheduleFilter
:
{
getScheduleFilter
:
{
url
:
'/vue/schedule/get-filter'
+
urlEnd
url
:
'/vue/schedule/get-filter'
},
},
// 新建待办事项获取下拉列表配置项
// 新建待办事项获取下拉列表配置项
getSaveNew
:
{
getSaveNew
:
{
url
:
'/vue/schedule/get-new'
+
urlEnd
url
:
'/vue/schedule/get-new'
},
},
// 搜索客户名称
// 搜索客户名称
getClientByName
:
{
getClientByName
:
{
url
:
'/vue/search/client-by-name'
+
urlEnd
url
:
'/vue/search/client-by-name'
},
},
// 保存待办事项
// 保存待办事项
saveNewSchedule
:
{
saveNewSchedule
:
{
url
:
'/vue/schedule/save-new'
+
urlEnd
url
:
'/vue/schedule/save-new'
},
},
saveEditSchedule
:
{
saveEditSchedule
:
{
url
:
'/vue/schedule/save-edit'
+
urlEnd
url
:
'/vue/schedule/save-edit'
},
},
// 删除待办事项
// 删除待办事项
deleteSchedule
:
{
deleteSchedule
:
{
url
:
'/vue/schedule/delete'
+
urlEnd
url
:
'/vue/schedule/delete'
},
},
// 留言
// 留言
getCommentList
:
{
getCommentList
:
{
url
:
'/vue/comment/list'
+
urlEnd
url
:
'/vue/comment/list'
},
},
// 留言新建
// 留言新建
saveNewComment
:
{
saveNewComment
:
{
url
:
'/vue/comment/save-new'
+
urlEnd
url
:
'/vue/comment/save-new'
},
},
// 留言删除
// 留言删除
deleteComment
:
{
deleteComment
:
{
url
:
'/vue/comment/delete'
+
urlEnd
url
:
'/vue/comment/delete'
}
}
}
}
src/components/schedule_list/scheduleHome.vue
View file @
ea0e104d
...
@@ -142,8 +142,8 @@ export default {
...
@@ -142,8 +142,8 @@ export default {
this
.
updateForm
(
search
)
this
.
updateForm
(
search
)
},
},
updateForm
(
form
)
{
updateForm
(
search
)
{
let
_form
=
Object
.
assign
({},
this
.
form
,
form
)
let
_form
=
Object
.
assign
({},
this
.
form
,
search
)
this
.
getScheduleList
(
_form
)
this
.
getScheduleList
(
_form
)
},
},
...
@@ -176,9 +176,9 @@ export default {
...
@@ -176,9 +176,9 @@ export default {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
requestAPI
(
api
.
deleteSchedule
)
requestAPI
(
api
.
deleteSchedule
,
{
id
}
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
$message
.
success
(
'删除成功'
)
})
})
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
$message
.
info
(
'取消删除'
)
this
.
$message
.
info
(
'取消删除'
)
...
@@ -186,8 +186,11 @@ export default {
...
@@ -186,8 +186,11 @@ export default {
},
},
getScheduleList
(
form
)
{
getScheduleList
(
form
)
{
requestAPI
(
api
.
getScheduleList
)
let
_page
=
this
.
result
.
pagenation
.
then
((
res
)
=>
{
requestAPI
(
api
.
getScheduleList
,
{
...
form
,
page
:
_page
.
thispage
}).
then
((
res
)
=>
{
const
{
const
{
list
=
[],
list
=
[],
pagenation
=
{},
pagenation
=
{},
...
@@ -196,7 +199,6 @@ export default {
...
@@ -196,7 +199,6 @@ export default {
this
.
result
.
list
=
list
this
.
result
.
list
=
list
this
.
result
.
pagenation
=
pagenation
this
.
result
.
pagenation
=
pagenation
this
.
result
.
pagenation
.
totalcount
=
120
this
.
result
.
thisUser
=
thisUser
this
.
result
.
thisUser
=
thisUser
})
})
}
}
...
...
src/components/schedule_list/schedulePagenation.vue
View file @
ea0e104d
...
@@ -45,7 +45,7 @@ export default {
...
@@ -45,7 +45,7 @@ export default {
// this.$parent.loadList()
// this.$parent.loadList()
},
},
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
pager
.
page
=
val
this
.
pager
.
this
page
=
val
this
.
pager
.
totalcount
=
this
.
total
this
.
pager
.
totalcount
=
this
.
total
this
.
$emit
(
'update:pager'
,
this
.
pager
)
this
.
$emit
(
'update:pager'
,
this
.
pager
)
// this.$parent.loadList()
// this.$parent.loadList()
...
...
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