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
9c23cb70
Commit
9c23cb70
authored
Nov 06, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车型列表添加App显示按钮
parent
65760088
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
2 deletions
+58
-2
vehicleType.js
src/api/vehicleType.js
+11
-0
index.vue
src/views/vehicleType/index.vue
+47
-2
No files found.
src/api/vehicleType.js
View file @
9c23cb70
...
...
@@ -132,6 +132,17 @@ export function updateVehicleModel(params) {
});
}
/**
* App是否展示
* @param {Object} params
*/
export
function
updateAppShow
(
params
)
{
return
fetch
({
url
:
'/vehicle/vehicleModel/bg/updateAppShow'
,
method
:
'post'
,
data
:
params
});
}
/*
* 新建一条车型数据
* */
...
...
src/views/vehicleType/index.vue
View file @
9c23cb70
...
...
@@ -84,10 +84,12 @@
<
template
scope=
"scope"
>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUpdate(scope.row)"
>
{{
vehicleTypeList_btn_edit
?
'编辑'
:
'查看'
}}
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
style=
"color: #6ce26c;"
v-if=
"scope.row.status==2|| scope.row.status==0"
@
click=
"upStatus(scope.row)"
>
上架
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
style=
"color: #6ce26c;"
v-if=
"scope.row.status==2|| scope.row.status==0"
@
click=
"upStatus(scope.row)"
>
上架
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
style=
"color: #1d90e6"
v-if=
"scope.row.status==1"
@
click=
"upStatus(scope.row)"
>
下架
</el-button>
<el-button
class=
"el-button el-button--text el-button--small"
style=
"color:#1d90e6;"
size=
"small"
@
click=
"handlerAppShow(scope.row)"
v-if=
"scope.row.appShow==1"
>
APP展示
</el-button>
<el-button
class=
"el-button el-button--text el-button--small"
style=
"color:#1d90e6;"
size=
"small"
@
click=
"handlerAppShow(scope.row)"
v-if=
"scope.row.appShow==0"
>
APP不展示
</el-button>
<el-button
class=
"el-button el-button--text el-button--small"
style=
"color:red;"
size=
"small"
@
click=
"deleteHandler(scope.row)"
v-if=
"vehicleTypeList_btn_del"
>
删除
</el-button>
</
template
>
</el-table-column>
...
...
@@ -150,7 +152,8 @@
getLabelList
,
getLabelByParentId
,
upStatusChange
,
updateVehicleModel
updateVehicleModel
,
updateAppShow
}
from
'api/vehicleType'
;
import
Element1
from
"../admin/menu/components/element"
;
...
...
@@ -257,6 +260,48 @@
});
}
});
},
/**
* 是否在App展示
* @param {Object} row
*/
handlerAppShow
(
row
)
{
var
text
=
""
;
if
(
row
.
appShow
==
0
)
{
text
=
"确定设置为在App展示吗?"
;
}
else
{
text
=
"确定设置为不在App展示吗?"
;
}
var
status
=
row
.
appShow
==
0
?
1
:
0
;
var
param
=
{
"id"
:
row
.
id
,
"appShow"
:
status
}
this
.
$confirm
(
text
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
updateAppShow
(
param
).
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
});
}
});
})
},
/**
* 删除
...
...
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