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
a7db2c73
Commit
a7db2c73
authored
Aug 06, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车型封面图
parent
16e92f89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
1 deletion
+71
-1
oneTourModal.vue
src/views/tourManage/modal/oneTourModal.vue
+3
-0
index.vue
src/views/vehicleType/index.vue
+33
-1
oneType.vue
src/views/vehicleType/modal/oneType.vue
+35
-0
No files found.
src/views/tourManage/modal/oneTourModal.vue
View file @
a7db2c73
...
@@ -366,6 +366,9 @@ import ElRow from "element-ui/packages/row/src/row";
...
@@ -366,6 +366,9 @@ import ElRow from "element-ui/packages/row/src/row";
},
},
},
},
methods
:
{
methods
:
{
/**
* 封面图
* */
uploadProcess
(
event
,
file
,
fileList
)
{
uploadProcess
(
event
,
file
,
fileList
)
{
this
.
imgFlag
=
true
;
this
.
imgFlag
=
true
;
console
.
log
(
event
.
percent
);
console
.
log
(
event
.
percent
);
...
...
src/views/vehicleType/index.vue
View file @
a7db2c73
...
@@ -74,10 +74,14 @@
...
@@ -74,10 +74,14 @@
<span>
{{
scope
.
row
.
leasableQuantity
}}
</span>
<span>
{{
scope
.
row
.
leasableQuantity
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
width=
"
1
00"
label=
"操作"
fixed=
"right"
>
<el-table-column
align=
"center"
width=
"
2
00"
label=
"操作"
fixed=
"right"
>
<
template
scope=
"scope"
>
<
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
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUpdate(scope.row)"
>
{{
vehicleTypeList_btn_edit
?
'编辑'
:
'查看'
}}
</el-button>
</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>
<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:red;"
size=
"small"
@
click=
"deleteHandler(scope.row)"
v-if=
"vehicleTypeList_btn_del"
>
删除
</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
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -121,6 +125,7 @@
...
@@ -121,6 +125,7 @@
delVehicleModel
,
delVehicleModel
,
getLabelList
,
getLabelList
,
getLabelByParentId
,
getLabelByParentId
,
upStatusChange
}
from
'api/vehicleType'
;
}
from
'api/vehicleType'
;
import
Element1
from
"../admin/menu/components/element"
;
import
Element1
from
"../admin/menu/components/element"
;
...
@@ -198,6 +203,33 @@
...
@@ -198,6 +203,33 @@
this
.
oneRow
=
{};
this
.
oneRow
=
{};
this
.
oneTypeDialogVisible
=
true
;
this
.
oneTypeDialogVisible
=
true
;
},
},
/**
* 上架、下架 参数 id status 1-上架;0-下架 post
*/
upStatus
(
row
){
let
params
=
{
id
:
row
.
id
,
status
:
row
.
status
==
1
?
0
:
1
};
upStatusChange
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
},
/**
/**
* 删除
* 删除
* */
* */
...
...
src/views/vehicleType/modal/oneType.vue
View file @
a7db2c73
...
@@ -134,6 +134,21 @@
...
@@ -134,6 +134,21 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<el-form-item
label=
"封面图"
>
<el-upload
class=
"upload-demo"
:headers=
"getHeaderWithToken"
:action=
"BASE_API+'/api/universal/file/app/unauth/admin/upload'"
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:on-progress=
"uploadProcess"
list-type=
"picture"
>
<div
slot=
"tip"
class=
"el-upload__tip"
>
<span
style=
"color: red;"
>
建议尺寸:320*228px
</span></div>
<el-progress
v-show=
"imgFlag == true"
type=
"circle"
:percentage=
"percent"
style=
"margin-top: 20px"
></el-progress>
<img
v-if=
"$utils.isString(form.coverPic) && !$utils.isEmpty(form.coverPic) && !imgFlag"
:src=
"form.coverPic"
style=
"width:300px;max-height:300px;"
>
<i
v-else-if=
"!imgFlag"
class=
"el-icon-plus avatar-uploader-icon"
style=
"lineHeight:100px;width:300px;height: 100px;border: 1px dashed #ccc;"
></i>
</el-upload>
</el-form-item>
<el-form-item
label=
"轮播图"
:style=
"
{display:'block'}">
<el-form-item
label=
"轮播图"
:style=
"
{display:'block'}">
<el-upload
<el-upload
class=
"upload-demo"
class=
"upload-demo"
...
@@ -242,6 +257,8 @@ import UE from '../../modal/Ueditor';//百度ue富文本
...
@@ -242,6 +257,8 @@ import UE from '../../modal/Ueditor';//百度ue富文本
data
()
{
data
()
{
return
{
return
{
BASE_API
:
process
.
env
.
BASE_API
,
BASE_API
:
process
.
env
.
BASE_API
,
percent
:
0
,
//上传进度
imgFlag
:
false
,
config
:
{
config
:
{
initialFrameWidth
:
null
,
initialFrameWidth
:
null
,
initialFrameHeight
:
350
initialFrameHeight
:
350
...
@@ -404,6 +421,22 @@ import UE from '../../modal/Ueditor';//百度ue富文本
...
@@ -404,6 +421,22 @@ import UE from '../../modal/Ueditor';//百度ue富文本
}
}
});
});
},
},
/**
* 封面图上传进度
* */
uploadProcess
(
event
,
file
,
fileList
)
{
this
.
imgFlag
=
true
;
console
.
log
(
event
.
percent
);
this
.
percent
=
Math
.
floor
(
event
.
percent
);
},
/**
* 封面图上传
* **/
handleAvatarSuccess
(
res
,
file
){
this
.
percent
=
0
;
this
.
imgFlag
=
false
;
this
.
form
.
cover_pic
=
res
.
data
;
},
/**
/**
* 创建
* 创建
* */
* */
...
@@ -417,6 +450,7 @@ import UE from '../../modal/Ueditor';//百度ue富文本
...
@@ -417,6 +450,7 @@ import UE from '../../modal/Ueditor';//百度ue富文本
modelsDetails
:
this
.
form
.
modelsDetails
,
//房车详情
modelsDetails
:
this
.
form
.
modelsDetails
,
//房车详情
modelParam
:
JSON
.
stringify
(
this
.
form
.
modelParam
),
//房车参数
modelParam
:
JSON
.
stringify
(
this
.
form
.
modelParam
),
//房车参数
picture
:
this
.
form
.
picture
,
//轮播图
picture
:
this
.
form
.
picture
,
//轮播图
coverPic
:
this
.
form
.
coverPic
,
//封面图
price
:
this
.
form
.
price
,
//租车价格
price
:
this
.
form
.
price
,
//租车价格
deposit
:
this
.
form
.
deposit
,
//总押金
deposit
:
this
.
form
.
deposit
,
//总押金
vioDeposit
:
this
.
form
.
vioDeposit
,
vioDeposit
:
this
.
form
.
vioDeposit
,
...
@@ -463,6 +497,7 @@ import UE from '../../modal/Ueditor';//百度ue富文本
...
@@ -463,6 +497,7 @@ import UE from '../../modal/Ueditor';//百度ue富文本
modelParam
:
JSON
.
stringify
(
this
.
form
.
modelParam
),
//房车参数
modelParam
:
JSON
.
stringify
(
this
.
form
.
modelParam
),
//房车参数
picture
:
this
.
form
.
picture
,
//轮播图
picture
:
this
.
form
.
picture
,
//轮播图
price
:
this
.
form
.
price
,
//租车价格
price
:
this
.
form
.
price
,
//租车价格
coverPic
:
this
.
form
.
coverPic
,
//封面图
deposit
:
this
.
form
.
deposit
,
//总押金
deposit
:
this
.
form
.
deposit
,
//总押金
vioDeposit
:
this
.
form
.
vioDeposit
,
vioDeposit
:
this
.
form
.
vioDeposit
,
hotSign
:
this
.
form
.
hotSign
,
//热门车型
hotSign
:
this
.
form
.
hotSign
,
//热门车型
...
...
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