Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform-ui
Commits
5c5109fd
Commit
5c5109fd
authored
Jun 25, 2019
by
lixy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/master' into base-modify
车辆信息管理删除
parents
e3a14ed7
c1ca7162
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
0 deletions
+50
-0
index.js
src/api/vehicle/vehicleInfo/index.js
+10
-0
index.vue
src/views/vehicle/vehicleInfo/index.vue
+40
-0
No files found.
src/api/vehicle/vehicleInfo/index.js
View file @
5c5109fd
...
...
@@ -24,6 +24,16 @@ export function addObj(obj) {
});
}
/*
* 删除一条车辆数据
* */
export
function
delObj
(
id
)
{
return
fetch
({
url
:
'/vehicle/vehicleInfo/del/'
+
id
,
method
:
'delete'
});
}
export
function
book
(
param
)
{
return
fetch
({
url
:
'/vehicle/vehicleInfo/book/4employee'
,
...
...
src/views/vehicle/vehicleInfo/index.vue
View file @
5c5109fd
...
...
@@ -328,6 +328,19 @@
</el-button>
<el-button
size=
"small"
type=
"success"
@
click=
"handleBookInfo(scope.row)"
>
预订信息
</el-button>
<el-button
size=
"small"
type=
"success"
@
click=
"handleDepartureLog(scope.row)"
>
出车记录
</el-button>
<el-popover
ref=
"popover5"
placement=
"top"
width=
"160"
v-model=
"scope.row.visible2"
>
<p>
确定删除吗?
</p>
<div
style=
"text-align: right; margin: 0"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"scope.row.visible2 = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"deleteHandler(scope.row)"
>
确定
</el-button>
</div>
</el-popover>
<el-button
type=
"danger"
size=
"small"
v-popover:popover5
>
删除
</el-button>
</
template
>
</el-table-column>
...
...
@@ -1757,6 +1770,9 @@
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
.
data
)
&&
this
.
$utils
.
isInteger
(
response
.
data
.
totalCount
))
{
listRs
=
response
.
data
.
data
;
totalCountRs
=
response
.
data
.
totalCount
;
listRs
.
map
(
function
(
item
){
item
.
visible2
=
false
;
});
}
this
.
listLoading
=
false
;
this
.
list
=
listRs
;
...
...
@@ -1984,6 +2000,30 @@
}
});
},
/**
* 删除
* */
deleteHandler
(
row
)
{
delObj
(
row
.
id
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'删除成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
bannerDialogVisible
=
false
;
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'删除失败'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
},
resetTemp
()
{
this
.
form
=
{
status
:
undefined
,
...
...
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