Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
d85014ba
Commit
d85014ba
authored
May 20, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
109dc69f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
102 additions
and
9 deletions
+102
-9
HotelProductManage.vue
src/components/Hotel/HotelProductManage.vue
+102
-9
No files found.
src/components/Hotel/HotelProductManage.vue
View file @
d85014ba
...
...
@@ -139,6 +139,37 @@
padding-left
:
20px
;
}
.HotelAdd_ImgBtn
{
width
:
100px
;
height
:
100px
;
line-height
:
100px
;
color
:
#419efb
;
border
:
1px
solid
#e2e2e2
;
cursor
:
pointer
;
text-align
:
center
;
}
.hotl_ImgDiv
{
margin
:
0
20px
0
0
;
position
:
relative
;
display
:
inline-block
;
}
.hotelproduct
.colapp-image
{
background-size
:
cover
;
background-position
:
50%
;
width
:
100px
;
height
:
100px
;
border-radius
:
0
;
}
.hotelproduct
.delBtn
{
position
:
absolute
;
right
:
-8px
;
top
:
-8px
;
padding
:
4px
4px
!important
;
}
</
style
>
<
template
>
<div
class=
"flexOne hotelproduct"
>
...
...
@@ -199,6 +230,9 @@
<el-form-item
label=
"床型描述"
>
<el-input
class=
"w300"
type=
"textarea"
v-model=
"addMsg.BedDesc"
:rows=
"4"
maxlength=
"200"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('hotel.hotel_produceDes')"
prop=
"Description"
>
<el-input
class=
"w300"
type=
"textarea"
v-model=
"addMsg.Description"
></el-input>
</el-form-item>
<el-form-item
label=
"是否有窗"
>
<el-switch
v-model=
"addMsg.HasWindow"
:active-value=
"1"
:inactive-value=
"2"
>
</el-switch>
...
...
@@ -210,8 +244,25 @@
<el-form-item
label=
"免费取消时间"
v-if=
"addMsg.IsCancel==2"
>
<el-input
class=
"w300"
type=
"text"
v-model=
"addMsg.CancelTime"
maxlength=
"200"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('hotel.hotel_produceDes')"
prop=
"Description"
>
<el-input
class=
"w300"
type=
"textarea"
v-model=
"addMsg.Description"
></el-input>
<el-form-item
label=
"房型图"
>
<div
style=
"display:flex;flex-wrap:wrap;"
>
<div
style=
"display:inline-block;"
>
<div
class=
"hotl_ImgDiv"
v-for=
"(item,index) in addMsg.RoomImage"
:key=
"index"
>
<div
class=
"colapp-image"
:style=
"
{backgroundImage: 'url(' + item.Path + ')'}">
</div>
<el-button
@
click=
"delHotelImg(item,index)"
class=
"delBtn"
type=
"danger"
icon=
"el-icon-close"
circle
>
</el-button>
</div>
</div>
<el-upload
class=
"avatar-uploader"
action=
""
style=
"display:inline-block;"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
:http-request=
"UploadImage"
multiple
>
<div
class=
"HotelAdd_ImgBtn"
>
+ 添加图片
</div>
</el-upload>
</div>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -312,7 +363,8 @@
BedDesc
:
''
,
//床型描述
HasWindow
:
1
,
//是否有窗(1-有窗,2-无窗)
IsCancel
:
1
,
//'是否可免费取消(1-不可取消,2-可取消
CancelTime
:
''
//免费取消时间
CancelTime
:
''
,
//免费取消时间
RoomImage
:
[],
//房型图
},
//早餐类型下拉
BreakfastList
:
[{
...
...
@@ -324,6 +376,9 @@
},
{
Id
:
3
,
Name
:
'双早餐'
},
{
Id
:
4
,
Name
:
'无早餐'
}],
//床型下拉
BedTypeList
:
[{
...
...
@@ -355,6 +410,44 @@
};
},
methods
:
{
//上传酒店图片
UploadImage
(
file
)
{
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
fileName
=
file
.
file
.
name
;
var
path
=
"/Upload/DMC/"
;
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
var
str
=
x
.
data
.
FilePath
;
var
imgUrl
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
;
var
obj
=
{
TagName
:
''
,
Path
:
imgUrl
}
this
.
addMsg
.
RoomImage
.
push
(
obj
);
});
},
//删除房型图片
delHotelImg
(
item
,
index
)
{
if
(
item
.
ID
>
0
)
{
let
msg
=
{
Id
:
item
.
ID
,
PicId
:
item
.
Pic
}
this
.
$confirm
(
'是否删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipost
(
"hotel_post_RemoveHotelImage"
,
msg
,
res
=>
{
});
}).
catch
(()
=>
{
});
}
else
{
this
.
addMsg
.
RoomImage
.
splice
(
index
,
1
);
}
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
initData
();
...
...
@@ -467,12 +560,12 @@
Name
:
""
,
Description
:
""
,
ServiceNumber
:
""
,
BreakfastType
:
1
,
BedType
:
1
,
BedDesc
:
''
,
HasWindow
:
1
,
IsCancel
:
1
,
CancelTime
:
''
BreakfastType
:
1
,
BedType
:
1
,
BedDesc
:
''
,
HasWindow
:
1
,
IsCancel
:
1
,
CancelTime
:
''
};
this
.
addMsg
=
newMsg
;
},
...
...
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