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
1e12c2e8
Commit
1e12c2e8
authored
Sep 19, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
# Conflicts: # src/views/vehicleType/modal/oneType.vue
parents
0e988e2b
197f1733
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2221 additions
and
2056 deletions
+2221
-2056
oneCampsiteModal.vue
src/views/campsiteManage/modal/oneCampsiteModal.vue
+637
-579
oneTourModal.vue
src/views/tourManage/modal/oneTourModal.vue
+939
-877
oneType.vue
src/views/vehicleType/modal/oneType.vue
+32
-35
oneCampsiteModal.vue
src/views/xxOfficialWebsite/modal/oneCampsiteModal.vue
+613
-565
No files found.
src/views/campsiteManage/modal/oneCampsiteModal.vue
View file @
1e12c2e8
...
...
@@ -6,14 +6,16 @@
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"营地名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
placeholder=
"请输入营地名称"
@
blur=
"checkName()"
></el-input><span
v-if=
"isExist"
style=
"color:red;"
>
标签名已存在
</span>
<el-input
v-model=
"form.name"
placeholder=
"请输入营地名称"
@
blur=
"checkName()"
></el-input>
<span
v-if=
"isExist"
style=
"color:red;"
>
标签名已存在
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"营地地址"
prop=
"addressStr"
>
<el-input
v-model=
"form.addressStr"
readonly
placeholder=
"请输入营地地址"
:on-icon-click=
"selectDestination"
icon=
"edit"
></el-input>
<el-input
v-model=
"form.addressStr"
readonly
placeholder=
"请输入营地地址"
:on-icon-click=
"selectDestination"
icon=
"edit"
></el-input>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -41,7 +43,9 @@
<el-form-item
label=
"营地类型"
prop=
"approvers"
>
<span
v-for=
"item in form.campsiteTagListVos"
:key=
"item.id"
style=
"border: 1px solid #ccc; padding: 5px 10px;border-radius: 5px;margin-right: 10px;"
>
{{
item
.
name
}}
</span>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"edit"
@
click=
"editLable(form.campsiteTagListVos)"
>
编辑
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"edit"
@
click=
"editLable(form.campsiteTagListVos)"
>
编辑
</el-button>
</el-form-item>
<el-row>
<el-col
:span=
"4"
>
...
...
@@ -60,14 +64,37 @@
:on-success=
"handleAvatarSuccess"
list-type=
"picture"
>
<div
slot=
"tip"
class=
"el-upload__tip"
><span
style=
"color: red;"
>
建议尺寸:485*485px
</span></div>
<img
v-if=
"$utils.isString(form.logo) && !$utils.isEmpty(form.logo)"
:src=
"form.logo"
style=
"width:300px;max-height:300px;"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
style=
"lineHeight:100px;width:300px;height: 100px;border: 1px dashed #ccc;"
></i>
<img
v-if=
"$utils.isString(form.logo) && !$utils.isEmpty(form.logo)"
:src=
"form.logo"
style=
"width:300px;max-height:300px;"
>
<i
v-else
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-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"alt"
>
<el-input
v-model=
"form.alt"
type=
"text"
placeholder=
"请输入描述"
></el-input>
<el-input
v-model=
"form.alt"
type=
"text"
placeholder=
"请输入替代文本"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"img-title"
>
<el-input
v-model=
"form.imgTitle"
type=
"text"
placeholder=
"请输入图片title"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"img-keyword"
>
<el-input
v-model=
"form.imgKeyword"
type=
"text"
placeholder=
"请输入图片关键字"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"img-desc"
>
<el-input
v-model=
"form.imgDesc"
type=
"text"
placeholder=
"请输入图片描述"
></el-input>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -80,10 +107,13 @@
:on-success=
"handlePosterSuccess"
:on-progress=
"uploadPosterProcess"
list-type=
"picture"
>
<div
slot=
"tip"
class=
"el-upload__tip"
>
<span
style=
"color: red;"
>
建议尺寸:485*485px
</span></div>
<el-progress
v-show=
"imgPosterFlag == true"
type=
"circle"
:percentage=
"percent_poster"
style=
"margin-top: 20px"
></el-progress>
<img
v-if=
"$utils.isString(form.posterBackground) && !$utils.isEmpty(form.posterBackground)&& !imgPosterFlag"
:src=
"form.posterBackground"
style=
"width:300px;max-height:300px;"
>
<i
v-else-if=
"!imgPosterFlag"
class=
"el-icon-plus avatar-uploader-icon"
style=
"lineHeight:100px;width:300px;height: 100px;border: 1px dashed #ccc;"
></i>
<div
slot=
"tip"
class=
"el-upload__tip"
><span
style=
"color: red;"
>
建议尺寸:485*485px
</span></div>
<el-progress
v-show=
"imgPosterFlag == true"
type=
"circle"
:percentage=
"percent_poster"
style=
"margin-top: 20px"
></el-progress>
<img
v-if=
"$utils.isString(form.posterBackground) && !$utils.isEmpty(form.posterBackground)&& !imgPosterFlag"
:src=
"form.posterBackground"
style=
"width:300px;max-height:300px;"
>
<i
v-else-if=
"!imgPosterFlag"
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'}" prop="carouse">
...
...
@@ -103,13 +133,15 @@
<el-tab-pane
label=
"营地详情"
name=
"first"
>
<!--
<Editor
v-if=
"activeName2=='first'"
@
input=
"handelContentIncrease"
:value=
"form.content"
:myQuillEditor=
"'myQuillEditorContent'"
:activeName2=
"activeName2"
></Editor>
-->
<div
class=
"editor-container"
v-if=
"activeName2=='first'"
>
<UE
:editorId=
"activeName2"
:defaultMsg=
"form.content"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
<UE
:editorId=
"activeName2"
:defaultMsg=
"form.content"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
</div>
</el-tab-pane>
<el-tab-pane
label=
"配套&收费"
name=
"second"
>
<!--
<Editor
v-if=
"activeName2=='second'"
@
input=
"handelIntroduceIncrease"
:value=
"form.configure"
:myQuillEditor=
"'myQuillEditorIntroduce'"
:activeName2=
"activeName2"
></Editor>
-->
<div
class=
"editor-container"
v-if=
"activeName2=='second'"
>
<UE
:editorId=
"activeName2"
:defaultMsg=
"form.configure"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
<UE
:editorId=
"activeName2"
:defaultMsg=
"form.configure"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
</div>
</el-tab-pane>
</el-tabs>
...
...
@@ -117,36 +149,43 @@
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
v-if=
"title=='创建' && !isCreate && campsiteshop_btn_update"
@
click=
"create('form')"
>
确 定
</el-button>
<el-button
type=
"primary"
v-if=
"title=='编辑' && !isCreate && campsiteshop_btn_update"
@
click=
"update('form')"
>
确 定
</el-button>
<el-button
type=
"primary"
v-if=
"title=='创建' && !isCreate && campsiteshop_btn_update"
@
click=
"create('form')"
>
确 定
</el-button>
<el-button
type=
"primary"
v-if=
"title=='编辑' && !isCreate && campsiteshop_btn_update"
@
click=
"update('form')"
>
确 定
</el-button>
</div>
<!--编辑营地地址-->
<campsiteModal
v-if=
"showCampsiteVisible && campsiteshop_btn_update"
:obj=
"campsiteObj"
v-on:campsiteEvent =
"campsiteEvent"
></campsiteModal>
<campsiteModal
v-if=
"showCampsiteVisible && campsiteshop_btn_update"
:obj=
"campsiteObj"
v-on:campsiteEvent=
"campsiteEvent"
></campsiteModal>
<!--编辑营地标签-->
<campsiteLabelModal
v-if=
"editLableVisible && campsiteshop_btn_update"
:allLabelList=
"allLabelList"
:checkList=
"checkList"
v-on:tourLabelEvent =
"tourLabelEvent"
></campsiteLabelModal>
<campsiteLabelModal
v-if=
"editLableVisible && campsiteshop_btn_update"
:allLabelList=
"allLabelList"
:checkList=
"checkList"
v-on:tourLabelEvent=
"tourLabelEvent"
></campsiteLabelModal>
</div>
</
template
>
<
style
>
textarea
{
textarea
{
display
:
none
;
}
.info
{
.info
{
border-radius
:
10px
;
line-height
:
20px
;
padding
:
10px
;
margin
:
10px
;
background-color
:
#ffffff
;
}
.el-upload-list
{
.el-upload-list
{
display
:
flex
;
width
:
100px
;
}
.el-upload-list
li
{
.el-upload-list
li
{
margin-left
:
10px
;
}
</
style
>
<
script
>
// import Editor from "../../modal/editorTool";//富文本
// import Editor from "../../modal/editorTool";//富文本
import
UE
from
'../../modal/Ueditor'
;
//百度ue富文本
import
campsiteLabelModal
from
"../../tourManage/modal/tourLabelModal"
;
//标签
import
campsiteModal
from
"./campsiteModal"
;
//营地地址
...
...
@@ -168,6 +207,7 @@
getToken
}
from
'../../../utils/auth'
;
import
{
mapGetters
}
from
'vuex'
;
export
default
{
props
:
[
"oneRow"
,
"title"
,
"campsiteshop_btn_update"
],
name
:
'upkeepDialog'
,
...
...
@@ -191,24 +231,27 @@
}
};
return
{
imgPosterFlag
:
false
,
percent_poster
:
0
,
imgPosterFlag
:
false
,
percent_poster
:
0
,
BASE_API
:
process
.
env
.
BASE_API
,
defaultMsg
:
'这里是UE测试'
,
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
350
},
isExist
:
false
,
//名称是否已存在
isExist
:
false
,
//名称是否已存在
campsiteObj
:
{},
//营地地址
departureList
:
[],
//出发地列表
departureObj
:
{
name
:
""
},
//出发地
departureObj
:
{
name
:
""
},
//出发地
pathway
:
[],
//途径地
isCreate
:
false
,
//是否点击了创建-确定
fileList2
:
[],
fileList2
:
[],
activeName2
:
''
,
//行程亮点
form
:
{
alt
:
''
,
alt
:
''
,
imgTitle
:
undefined
,
imgKeyword
:
undefined
,
imgDesc
:
undefined
,
id
:
undefined
,
name
:
undefined
,
//营地名称
hot
:
0
,
//营地热度
...
...
@@ -223,40 +266,46 @@
longitude
:
undefined
,
content
:
''
,
//营地详情
concat
:
""
,
//联系人
logo
:
undefined
,
//封面图
logo
:
undefined
,
//封面图
configure
:
''
,
//配套&收费
campsiteTagListVos
:
[],
//营地类型
carouse
:
[],
//banner轮播
posterBackground
:
''
,
//海报背景
carouse
:
[],
//banner轮播
posterBackground
:
''
,
//海报背景
},
showCampsiteVisible
:
false
,
//编辑营地地址
rules
:
{
name
:
{
name
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入营地名称'
,
trigger
:
'blur'
},
servicePhone
:
{
servicePhone
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入客服电话'
,
trigger
:
'blur'
},
phone
:{
validator
:
checkPhone
,
trigger
:
'blur'
,
required
:
true
},
concat
:{
phone
:
{
//validator: checkPhone,
type
:
'string'
,
trigger
:
'blur'
,
message
:
'请输入联系电话'
,
required
:
true
},
concat
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入联系人'
,
trigger
:
'blur'
},
addressStr
:
{
addressStr
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入营地地址'
,
}
},
checkList
:
[],
//已选中的标签
checkList
:
[],
//已选中的标签
allCompanies
:
{},
allCompaniesArr
:
[],
oneTourDialogVisible
:
false
,
...
...
@@ -268,15 +317,15 @@
this
.
getAllLabelList
();
},
watch
:
{
oneTourDialogVisible
(
newValue
,
oldValue
)
{
if
(
!
newValue
)
{
oneTourDialogVisible
(
newValue
,
oldValue
)
{
if
(
!
newValue
)
{
this
.
cleanForm
();
}
},
},
mounted
()
{
this
.
cleanForm
();
if
(
this
.
title
==
"编辑"
)
{
if
(
this
.
title
==
"编辑"
)
{
let
row
=
this
.
oneRow
;
this
.
getOne
(
row
.
id
);
}
else
{
...
...
@@ -293,15 +342,15 @@
/**
* 判断标签名是否已存在
* */
checkName
()
{
checkName
()
{
this
.
form
.
name
=
(
this
.
form
.
name
).
trim
();
if
(
!
this
.
form
.
name
)
{
if
(
!
this
.
form
.
name
)
{
return
;
}
let
params
=
{
name
:
this
.
form
.
name
};
if
(
this
.
title
==
"编辑"
)
{
if
(
this
.
title
==
"编辑"
)
{
params
.
id
=
this
.
form
.
id
;
}
existCampsiteShop
(
params
).
then
(
response
=>
{
...
...
@@ -323,14 +372,14 @@
/**
* 编辑营地标签
* */
editLable
(
list
)
{
editLable
(
list
)
{
console
.
log
(
list
);
this
.
editLableVisible
=
true
;
},
/**
* 创建
* */
create
(
formName
)
{
create
(
formName
)
{
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
...
...
@@ -367,8 +416,11 @@
address
:
this
.
campsiteObj
.
address
,
//详细地址
latitude
:
this
.
campsiteObj
.
latitude
,
longitude
:
this
.
campsiteObj
.
longitude
,
posterBackground
:
this
.
form
.
posterBackground
,
//海报背景
alt
:
this
.
form
.
alt
posterBackground
:
this
.
form
.
posterBackground
,
//海报背景
alt
:
this
.
form
.
alt
,
imgTitle
:
this
.
form
.
imgTitle
,
imgKeyword
:
this
.
form
.
imgKeyword
,
imgDesc
:
this
.
form
.
imgDesc
};
console
.
log
(
params
);
this
.
isExistCampsiteShop
(
"create"
,
params
);
...
...
@@ -380,26 +432,26 @@
/**
* 判断营地名称是否已存在
* */
isExistCampsiteShop
(
type
,
datas
)
{
if
(
!
this
.
form
.
name
)
{
isExistCampsiteShop
(
type
,
datas
)
{
if
(
!
this
.
form
.
name
)
{
return
;
}
let
params
=
{
name
:
this
.
form
.
name
};
if
(
type
==
'update'
)
{
//编辑
if
(
type
==
'update'
)
{
//编辑
params
.
id
=
this
.
form
.
id
;
}
existCampsiteShop
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
isExist
=
response
.
data
;
if
(
response
.
data
)
{
if
(
response
.
data
)
{
this
.
isCreate
=
false
;
}
if
(
!
response
.
data
&&
type
==
"update"
)
{
//编辑
if
(
!
response
.
data
&&
type
==
"update"
)
{
//编辑
this
.
toUpdate
(
datas
);
}
if
(
!
response
.
data
&&
type
==
"create"
)
{
if
(
!
response
.
data
&&
type
==
"create"
)
{
//创建
this
.
toCreate
(
datas
);
}
...
...
@@ -416,7 +468,7 @@
/**
* 编辑
* */
update
(
formName
)
{
update
(
formName
)
{
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
...
...
@@ -455,8 +507,11 @@
address
:
this
.
campsiteObj
.
address
,
//详细地址
latitude
:
this
.
campsiteObj
.
latitude
,
longitude
:
this
.
campsiteObj
.
longitude
,
posterBackground
:
this
.
form
.
posterBackground
,
//海报背景
alt
:
this
.
form
.
alt
,
posterBackground
:
this
.
form
.
posterBackground
,
//海报背景
alt
:
this
.
form
.
alt
,
imgTitle
:
this
.
form
.
imgTitle
,
imgKeyword
:
this
.
form
.
imgKeyword
,
imgDesc
:
this
.
form
.
imgDesc
};
console
.
log
(
params
);
this
.
isExistCampsiteShop
(
"update"
,
params
);
...
...
@@ -468,7 +523,7 @@
/**
* 更新
* */
toUpdate
(
params
)
{
toUpdate
(
params
)
{
editCampsiteShop
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
...
...
@@ -491,7 +546,7 @@
/**
* 创建
* */
toCreate
(
params
)
{
toCreate
(
params
)
{
editCampsiteShop
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
...
...
@@ -523,9 +578,9 @@
/**
* 关闭营地地址弹框
* */
campsiteEvent
(
obj
)
{
campsiteEvent
(
obj
)
{
this
.
showCampsiteVisible
=
false
;
if
(
obj
)
{
if
(
obj
)
{
this
.
campsiteObj
=
obj
;
let
provinceObj
=
getRegionByCodes
([
obj
.
province
]);
let
cityObj
=
getRegionByCodes
([
obj
.
city
]);
...
...
@@ -538,25 +593,25 @@
/**
* 编辑营地地址
* */
selectDestination
()
{
selectDestination
()
{
let
that
=
this
;
this
.
campsiteObj
.
showTitle
=
"营地地址编辑"
;
this
.
campsiteObj
.
eventName
=
'campsiteEvent'
;
this
.
campsiteObj
.
eventName
=
'campsiteEvent'
;
this
.
campsiteObj
.
keyword
=
this
.
campsiteObj
.
address
;
this
.
showCampsiteVisible
=
true
;
},
/**
* 关闭营地标签弹框
* */
tourLabelEvent
(
obj
)
{
tourLabelEvent
(
obj
)
{
let
that
=
this
;
this
.
editLableVisible
=
false
;
let
arr
=
[];
let
ckeckList
=
[];
if
(
obj
)
{
this
.
allLabelList
.
map
(
function
(
item
)
{
obj
.
map
(
function
(
b
)
{
if
(
item
.
name
==
b
)
{
if
(
obj
)
{
this
.
allLabelList
.
map
(
function
(
item
)
{
obj
.
map
(
function
(
b
)
{
if
(
item
.
name
==
b
)
{
arr
.
push
(
item
);
ckeckList
.
push
(
b
);
}
...
...
@@ -570,7 +625,7 @@
/**
* 获取一条营地
* */
getOne
(
id
)
{
getOne
(
id
)
{
let
that
=
this
;
getOneCampsiteShop
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
...
...
@@ -585,9 +640,9 @@
};
response
.
data
.
addressStr
=
this
.
campsiteObj
.
provinceName
+
this
.
campsiteObj
.
cityName
+
this
.
campsiteObj
.
address
;
let
arr
=
[];
that
.
allLabelList
.
map
(
function
(
b
)
{
response
.
data
.
campsiteTagListVos
.
map
(
function
(
item
)
{
if
(
item
.
id
==
b
.
id
)
{
that
.
allLabelList
.
map
(
function
(
b
)
{
response
.
data
.
campsiteTagListVos
.
map
(
function
(
item
)
{
if
(
item
.
id
==
b
.
id
)
{
arr
.
push
(
item
.
name
);
}
});
...
...
@@ -617,18 +672,18 @@
/**
* 配套&收费 富文本
* */
handelIntroduceIncrease
(
step
)
{
handelIntroduceIncrease
(
step
)
{
this
.
form
.
configure
=
step
;
},
/**
* 富文本 营地详情
* */
editorReadyEvent
(
instance
)
{
editorReadyEvent
(
instance
)
{
let
t
=
this
;
instance
.
addListener
(
'contentChange'
,
()
=>
{
if
(
t
.
activeName2
==
"first"
)
{
if
(
t
.
activeName2
==
"first"
)
{
t
.
form
.
content
=
instance
.
getContent
();
}
else
if
(
t
.
activeName2
==
"second"
)
{
}
else
if
(
t
.
activeName2
==
"second"
)
{
t
.
form
.
configure
=
instance
.
getContent
();
}
});
...
...
@@ -636,17 +691,17 @@
/**
* 删除banner
* */
handleRemove
(
file
,
fileList
)
{
handleRemove
(
file
,
fileList
)
{
let
list
=
[];
fileList
.
map
(
function
(
item
)
{
if
(
item
.
url
!=
file
.
url
)
{
fileList
.
map
(
function
(
item
)
{
if
(
item
.
url
!=
file
.
url
)
{
list
.
push
(
item
);
}
});
this
.
fileList2
=
list
;
let
arr
=
[];
this
.
form
.
carouse
.
map
(
function
(
item
)
{
if
(
item
.
imgUrl
!=
file
.
url
)
{
this
.
form
.
carouse
.
map
(
function
(
item
)
{
if
(
item
.
imgUrl
!=
file
.
url
)
{
arr
.
push
(
item
);
}
});
...
...
@@ -655,20 +710,20 @@
/**
* 封面图上传
* **/
handleAvatarSuccess
(
res
,
file
)
{
handleAvatarSuccess
(
res
,
file
)
{
this
.
form
.
logo
=
res
.
data
;
},
/**
* banner上传
* */
handleBannerSuccess
(
res
,
file
)
{
this
.
fileList2
.
push
({
url
:
res
.
data
});
this
.
form
.
carouse
.
push
({
imgUrl
:
res
.
data
});
handleBannerSuccess
(
res
,
file
)
{
this
.
fileList2
.
push
({
url
:
res
.
data
});
this
.
form
.
carouse
.
push
({
imgUrl
:
res
.
data
});
},
/**
* 海报背景上传
* **/
handlePosterSuccess
(
res
,
file
)
{
handlePosterSuccess
(
res
,
file
)
{
this
.
percent_poster
=
0
;
this
.
imgPosterFlag
=
false
;
this
.
form
.
posterBackground
=
res
.
data
;
...
...
@@ -685,9 +740,9 @@
* 清空旅游弹框数据
*/
cleanForm
()
{
this
.
campsiteObj
=
{
name
:
""
};
//营地地址
this
.
fileList2
=
[];
this
.
activeName2
=
''
;
//营地详情
this
.
campsiteObj
=
{
name
:
""
};
//营地地址
this
.
fileList2
=
[];
this
.
activeName2
=
''
;
//营地详情
this
.
form
=
{
id
:
undefined
,
name
:
undefined
,
//营地名称
...
...
@@ -703,14 +758,17 @@
longitude
:
undefined
,
content
:
''
,
//营地详情
concat
:
""
,
//联系人
logo
:
undefined
,
//封面图
logo
:
undefined
,
//封面图
configure
:
''
,
//配套&收费
campsiteTagListVos
:
[],
//营地类型
carouse
:[],
//banner轮播
posterBackground
:
''
,
alt
:
''
,
carouse
:
[],
//banner轮播
posterBackground
:
''
,
alt
:
''
,
imgTitle
:
undefined
,
imgKeyword
:
undefined
,
imgDesc
:
undefined
};
this
.
showCampsiteVisible
=
false
;
//编辑营地地址
this
.
showCampsiteVisible
=
false
;
//编辑营地地址
}
}
}
...
...
src/views/tourManage/modal/oneTourModal.vue
View file @
1e12c2e8
...
...
@@ -57,9 +57,12 @@
<el-row>
<!--
<el-col
:span=
"24"
>
-->
<el-form-item
label=
"出发地"
>
<el-input
style=
"display: inline-block;margin-right: 10px;width: 240px;"
v-model=
"item.name"
v-for=
"item in departureList"
<el-input
style=
"display: inline-block;margin-right: 10px;width: 240px;"
v-model=
"item.name"
v-for=
"item in departureList"
:key=
"item.id"
readonly
placeholder=
"请输入内容"
></el-input>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"edit"
@
click=
"editDeparture(departureList)"
>
编辑
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"edit"
@
click=
"editDeparture(departureList)"
>
编辑
</el-button>
<!--
<el-autocomplete-->
<!--v-for="item in departureList"-->
<!--:key="item.id"-->
...
...
@@ -76,7 +79,8 @@
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"目的地"
>
<el-input
v-model=
"destinationObj.address"
readonly
placeholder=
"请选择目的地"
:on-icon-click=
"selectDestination"
icon=
"edit"
></el-input>
<el-input
v-model=
"destinationObj.address"
readonly
placeholder=
"请选择目的地"
:on-icon-click=
"selectDestination"
icon=
"edit"
></el-input>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -86,8 +90,11 @@
<!--
<el-input
v-for=
"item in pathway"
style=
"display: inline-block;margin-right: 10px;width: 240px;"
--
>
<!--:key="item.id" v-model="item.name" readonly placeholder="请选择途径地" :data-rowId="item.id" :on-icon-click="selectPathway" icon="edit">
</el-input>
-->
<el-button
v-for=
"item in pathway"
:key=
"item.id"
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
@
click=
"editPathway(item)"
>
{{
item
.
name
}}
<i
class=
"el-icon-edit el-icon--right"
></i></el-button>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"plus"
@
click=
"addPathway()"
>
添加
</el-button>
:key=
"item.id"
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
@
click=
"editPathway(item)"
>
{{
item
.
name
}}
<i
class=
"el-icon-edit el-icon--right"
></i></el-button>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"plus"
@
click=
"addPathway()"
>
添加
</el-button>
</el-form-item>
<!--
</el-col>
-->
</el-row>
...
...
@@ -95,9 +102,13 @@
<el-form-item
prop=
"operator"
label=
"活动日期"
>
<!--tourDepartTimeVo-->
<el-button
v-for=
"item in form.tourDepartTimeVo"
disabled
:key=
"item.id"
class=
"el-button el-button--default"
type=
"button"
>
{{
item
.
startTime
}}
~
{{
item
.
endTime
}}
</el-button>
:key=
"item.id"
class=
"el-button el-button--default"
type=
"button"
>
{{
item
.
startTime
}}
~
{{
item
.
endTime
}}
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"edit"
@
click=
"editTime()"
>
编辑
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"edit"
@
click=
"editTime()"
>
编辑
</el-button>
<!--
<el-input
v-model=
"form.operator"
placeholder=
"请选择活动日期"
></el-input>
-->
</el-form-item>
</el-row>
...
...
@@ -108,7 +119,9 @@
<!--
<el-checkbox
v-for=
"item in allLabelList"
--
>
<!--:key="item.id" :label="item.name">
</el-checkbox>
-->
<!--
</el-checkbox-group>
-->
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"edit"
@
click=
"editLable(form.tagDTOS)"
>
编辑
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"edit"
@
click=
"editLable(form.tagDTOS)"
>
编辑
</el-button>
</el-form-item>
<el-row>
<el-col
:span=
"4"
>
...
...
@@ -142,16 +155,40 @@
: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.cover) && !$utils.isEmpty(form.cover) && !imgFlag"
:src=
"form.cover"
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>
<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.cover) && !$utils.isEmpty(form.cover) && !imgFlag"
:src=
"form.cover"
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-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"alt"
>
<el-input
v-model=
"form.alt"
type=
"text"
placeholder=
"请输入描述"
></el-input>
<el-input
v-model=
"form.alt"
type=
"text"
placeholder=
"请输入替代文本"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"img-title"
>
<el-input
v-model=
"form.imgTitle"
type=
"text"
placeholder=
"请输入图片title"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"img-keyword"
>
<el-input
v-model=
"form.imgKeyword"
type=
"text"
placeholder=
"请输入图片关键字"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"img-desc"
>
<el-input
v-model=
"form.imgDesc"
type=
"text"
placeholder=
"请输入图片描述"
></el-input>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -164,10 +201,13 @@
:on-success=
"handlePosterSuccess"
:on-progress=
"uploadPosterProcess"
list-type=
"picture"
>
<div
slot=
"tip"
class=
"el-upload__tip"
>
<span
style=
"color: red;"
>
建议尺寸:320*228px
</span></div>
<el-progress
v-show=
"imgPosterFlag == true"
type=
"circle"
:percentage=
"percent_poster"
style=
"margin-top: 20px"
></el-progress>
<img
v-if=
"$utils.isString(form.posterBackground) && !$utils.isEmpty(form.posterBackground)&& !imgPosterFlag"
:src=
"form.posterBackground"
style=
"width:300px;max-height:300px;"
>
<i
v-else-if=
"!imgPosterFlag"
class=
"el-icon-plus avatar-uploader-icon"
style=
"lineHeight:100px;width:300px;height: 100px;border: 1px dashed #ccc;"
></i>
<div
slot=
"tip"
class=
"el-upload__tip"
><span
style=
"color: red;"
>
建议尺寸:320*228px
</span></div>
<el-progress
v-show=
"imgPosterFlag == true"
type=
"circle"
:percentage=
"percent_poster"
style=
"margin-top: 20px"
></el-progress>
<img
v-if=
"$utils.isString(form.posterBackground) && !$utils.isEmpty(form.posterBackground)&& !imgPosterFlag"
:src=
"form.posterBackground"
style=
"width:300px;max-height:300px;"
>
<i
v-else-if=
"!imgPosterFlag"
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'}">
...
...
@@ -186,19 +226,22 @@
<el-tabs
v-model=
"activeName2"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"行程亮点"
name=
"first"
>
<div
class=
"editor-container"
v-if=
"activeName2=='first'"
>
<UE
:editorId=
"activeName2"
:defaultMsg=
"form.content"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
<UE
:editorId=
"activeName2"
:defaultMsg=
"form.content"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
</div>
<!--
<Editor
v-if=
"activeName2=='first'"
@
input=
"handelContentIncrease"
:value=
"form.content"
:myQuillEditor=
"'myQuillEditorContent'"
:activeName2=
"activeName2"
></Editor>
-->
</el-tab-pane>
<el-tab-pane
label=
"行程介绍"
name=
"second"
>
<div
class=
"editor-container"
v-if=
"activeName2=='second'"
>
<UE
:editorId=
"activeName2"
:defaultMsg=
"form.introduce"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
<UE
:editorId=
"activeName2"
:defaultMsg=
"form.introduce"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
</div>
<!--
<Editor
v-if=
"activeName2=='second'"
@
input=
"handelIntroduceIncrease"
:value=
"form.introduce"
:myQuillEditor=
"'myQuillEditorIntroduce'"
:activeName2=
"activeName2"
></Editor>
-->
</el-tab-pane>
<el-tab-pane
label=
"费用说明"
name=
"third"
>
<div
class=
"editor-container"
v-if=
"activeName2=='third'"
>
<UE
:editorId=
"activeName2"
:defaultMsg=
"form.explain"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
<UE
:editorId=
"activeName2"
:defaultMsg=
"form.explain"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
</div>
<!--
<Editor
v-if=
"activeName2=='third'"
@
input=
"handelExplainIncrease"
:value=
"form.explain"
:myQuillEditor=
"'myQuillEditorExplain'"
:activeName2=
"activeName2"
></Editor>
-->
</el-tab-pane>
...
...
@@ -210,32 +253,38 @@
<el-button
type=
"primary"
v-if=
"title=='编辑' && !isCreate&&good_btn_update"
@
click=
"update('form')"
>
确 定
</el-button>
</div>
<!--编辑出发地-->
<departureModal
v-if=
"editDepartureVisible"
:list=
"departureList"
v-on:departureEvent =
"departureEvent"
></departureModal>
<departureModal
v-if=
"editDepartureVisible"
:list=
"departureList"
v-on:departureEvent=
"departureEvent"
></departureModal>
<!--编辑目的地-->
<destination
v-if=
"showDestinationVisible"
:obj=
"destinationObj"
v-on:destinationEvent =
"destinationEvent"
></destination>
<destination
v-if=
"showDestinationVisible"
:obj=
"destinationObj"
v-on:destinationEvent=
"destinationEvent"
></destination>
<!--编辑途径地-->
<destination
v-if=
"showPathWayVisible"
:obj=
"onePathObj"
v-on:pathWayEvent
=
"pathWayEvent"
></destination>
<destination
v-if=
"showPathWayVisible"
:obj=
"onePathObj"
v-on:pathWayEvent
=
"pathWayEvent"
></destination>
<!--编辑活动时间-->
<tourTime
v-if=
"showTimeVisible"
:list=
"form.tourDepartTimeVo"
:number=
"form.number"
v-on:tourDepartTimeEvent =
"tourDepartTimeEvent"
></tourTime>
<tourTime
v-if=
"showTimeVisible"
:list=
"form.tourDepartTimeVo"
:number=
"form.number"
v-on:tourDepartTimeEvent=
"tourDepartTimeEvent"
></tourTime>
<!--编辑旅游标签-->
<tourLabelModal
v-if=
"editLableVisible"
:allLabelList=
"allLabelList"
:checkList=
"checkList"
v-on:tourLabelEvent =
"tourLabelEvent"
></tourLabelModal>
<tourLabelModal
v-if=
"editLableVisible"
:allLabelList=
"allLabelList"
:checkList=
"checkList"
v-on:tourLabelEvent=
"tourLabelEvent"
></tourLabelModal>
</div>
</
template
>
<
style
>
textarea
{
textarea
{
display
:
none
;
}
.el-upload-list
{
.el-upload-list
{
display
:
flex
;
width
:
100px
;
}
.el-upload-list
li
{
.el-upload-list
li
{
margin-left
:
10px
;
}
</
style
>
<
script
>
// import Editor from "../../modal/editorTool";//富文本
import
UE
from
'../../modal/Ueditor'
;
//百度ue富文本
// import Editor from "../../modal/editorTool";//富文本
import
UE
from
'../../modal/Ueditor'
;
//百度ue富文本
import
Destination
from
"./destinationModal"
;
//目的地弹框
import
tourTime
from
"./tourTime"
;
//活动时间
import
tourLabelModal
from
"./tourLabelModal"
;
//旅游标签
...
...
@@ -264,9 +313,10 @@ import UE from '../../modal/Ueditor';//百度ue富文本
getTourTagList
,
getAllTourTag
}
from
'api/tourManage'
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
export
default
{
props
:
[
"oneTourRow"
,
"title"
,
"good_btn_update"
],
props
:
[
"oneTourRow"
,
"title"
,
"good_btn_update"
],
name
:
'upkeepDialog'
,
components
:
{
// Editor,
...
...
@@ -279,8 +329,8 @@ import ElRow from "element-ui/packages/row/src/row";
},
data
()
{
return
{
imgPosterFlag
:
false
,
percent_poster
:
0
,
imgPosterFlag
:
false
,
percent_poster
:
0
,
BASE_API
:
process
.
env
.
BASE_API
,
config
:
{
initialFrameWidth
:
null
,
...
...
@@ -288,21 +338,24 @@ import ElRow from "element-ui/packages/row/src/row";
},
percent
:
0
,
//上传进度
imgFlag
:
false
,
onePathObj
:
{
name
:
""
},
//待编辑的途径地
destinationObj
:
{},
//目的地
onePathObj
:
{
name
:
""
},
//待编辑的途径地
destinationObj
:
{},
//目的地
departureList
:
[],
//出发地列表
departureObj
:
{
name
:
""
},
//出发地
departureObj
:
{
name
:
""
},
//出发地
pathway
:
[],
//途径地
isCreate
:
false
,
//是否点击了创建-确定
fileList2
:
[],
fileList2
:
[],
activeName2
:
''
,
//行程亮点
form
:
{
alt
:
undefined
,
alt
:
undefined
,
imgTitle
:
undefined
,
imgKeyword
:
undefined
,
imgDesc
:
undefined
,
childPrice
:
undefined
,
//儿童价
isOutside
:
"0"
,
tourDepartVo
:
undefined
,
//type:0出发地 1途径地 2目的地
isOutside
:
"0"
,
tourDepartVo
:
undefined
,
//type:0出发地 1途径地 2目的地
content
:
""
,
//行程亮点
cover
:
undefined
,
//封面图
cover
:
undefined
,
//封面图
describe
:
undefined
,
//描述
introduce
:
""
,
//行程介绍
crtTime
:
undefined
,
...
...
@@ -319,8 +372,8 @@ import ElRow from "element-ui/packages/row/src/row";
viewCount
:
undefined
,
//浏览量
isMember
:
"0"
,
//是否是会员商品
tagDTOS
:
[],
//旅行标签
bannerDTOS
:
[],
//banner轮播
posterBackground
:
''
,
//海报背景
bannerDTOS
:
[],
//banner轮播
posterBackground
:
''
,
//海报背景
},
showDestinationVisible
:
false
,
//编辑目的地
showPathWayVisible
:
false
,
//编辑途径地
...
...
@@ -345,7 +398,7 @@ import ElRow from "element-ui/packages/row/src/row";
message
:
'请输入库存'
}
},
checkList
:
[],
//已选中的标签
checkList
:
[],
//已选中的标签
allCompanies
:
{},
allCompaniesArr
:
[],
oneTourDialogVisible
:
false
,
...
...
@@ -367,18 +420,18 @@ import ElRow from "element-ui/packages/row/src/row";
this
.
getAllLabelList
();
},
watch
:
{
oneTourDialogVisible
(
newValue
,
oldValue
)
{
if
(
!
newValue
)
{
oneTourDialogVisible
(
newValue
,
oldValue
)
{
if
(
!
newValue
)
{
this
.
cleanForm
();
}
},
},
mounted
()
{
this
.
cleanForm
();
if
(
this
.
title
==
"编辑"
)
{
if
(
this
.
title
==
"编辑"
)
{
let
row
=
this
.
oneTourRow
;
this
.
getOneGoods
(
row
.
id
);
}
else
{
}
else
{
this
.
activeName2
=
"first"
;
}
this
.
oneTourDialogVisible
=
true
;
...
...
@@ -400,7 +453,7 @@ import ElRow from "element-ui/packages/row/src/row";
handleClick
(
tab
,
event
)
{
console
.
log
(
tab
,
event
);
},
getWeek
(
week
,
name
)
{
getWeek
(
week
,
name
)
{
let
weekStr
=
""
;
switch
(
week
)
{
case
0
:
...
...
@@ -430,16 +483,16 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 编辑出发地
* */
editDeparture
(
list
)
{
editDeparture
(
list
)
{
console
.
log
(
list
);
this
.
editDepartureVisible
=
true
;
},
/**
* 关闭出发地弹框
* */
departureEvent
(
obj
)
{
departureEvent
(
obj
)
{
this
.
editDepartureVisible
=
false
;
if
(
obj
)
{
if
(
obj
)
{
this
.
departureList
=
obj
;
console
.
log
(
obj
);
}
...
...
@@ -447,21 +500,21 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 编辑旅游标签
* */
editLable
(
list
)
{
editLable
(
list
)
{
console
.
log
(
list
);
this
.
editLableVisible
=
true
;
},
/**
* 创建
* */
create
(
formName
)
{
create
(
formName
)
{
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
//旅游标签
let
tagDTOS
=
[];
this
.
form
.
tagDTOS
.
map
(
function
(
item
)
{
if
(
item
.
tagId
)
{
this
.
form
.
tagDTOS
.
map
(
function
(
item
)
{
if
(
item
.
tagId
)
{
tagDTOS
.
push
({
tagId
:
item
.
tagId
});
}
else
{
tagDTOS
.
push
({
tagId
:
item
.
id
});
...
...
@@ -469,20 +522,20 @@ import ElRow from "element-ui/packages/row/src/row";
});
let
siteDTOS
=
[];
//出发地
this
.
departureList
.
map
(
function
(
item
)
{
let
pp
=
item
.
province
?
item
.
province
:
item
.
addrProvince
;
let
c
=
item
.
addrCity
?
item
.
addrCity
:
item
.
city
;
let
provinceObj
=
pp
?
getRegionByCodes
([
pp
]):
[{
name
:
""
}];
let
cityObj
=
c
?
getRegionByCodes
([
c
]):[{
name
:
""
}];
this
.
departureList
.
map
(
function
(
item
)
{
let
pp
=
item
.
province
?
item
.
province
:
item
.
addrProvince
;
let
c
=
item
.
addrCity
?
item
.
addrCity
:
item
.
city
;
let
provinceObj
=
pp
?
getRegionByCodes
([
pp
])
:
[{
name
:
""
}];
let
cityObj
=
c
?
getRegionByCodes
([
c
])
:
[{
name
:
""
}];
let
p
=
{
name
:
item
.
name
,
departTime
:
item
.
departTime
?
item
.
departTime
:
0
,
address
:
item
.
addrDetail
?
item
.
addrDetail
:
item
.
address
,
departTime
:
item
.
departTime
?
item
.
departTime
:
0
,
address
:
item
.
addrDetail
?
item
.
addrDetail
:
item
.
address
,
companyId
:
item
.
companyId
,
province
:
item
.
addrProvince
?
item
.
addrProvince
:
item
.
province
,
provinceName
:
provinceObj
[
0
].
name
,
province
:
item
.
addrProvince
?
item
.
addrProvince
:
item
.
province
,
provinceName
:
provinceObj
[
0
].
name
,
cityName
:
cityObj
[
0
].
name
,
city
:
item
.
addrCity
?
item
.
addrCity
:
item
.
city
,
city
:
item
.
addrCity
?
item
.
addrCity
:
item
.
city
,
longitude
:
item
.
longitude
,
latitude
:
item
.
latitude
,
type
:
0
,
...
...
@@ -490,7 +543,7 @@ import ElRow from "element-ui/packages/row/src/row";
};
siteDTOS
.
push
(
p
);
});
if
(
this
.
departureList
.
length
<=
0
)
{
if
(
this
.
departureList
.
length
<=
0
)
{
this
.
$notify
({
title
:
'警告'
,
message
:
'请选择出发地'
,
...
...
@@ -500,19 +553,19 @@ import ElRow from "element-ui/packages/row/src/row";
return
;
}
//途径地
this
.
pathway
.
map
(
function
(
item
)
{
let
provinceObj
=
item
.
province
?
getRegionByCodes
([
item
.
province
]):
[{
name
:
""
}];
let
cityObj
=
item
.
city
?
getRegionByCodes
([
item
.
city
]):[{
name
:
""
}];
this
.
pathway
.
map
(
function
(
item
)
{
let
provinceObj
=
item
.
province
?
getRegionByCodes
([
item
.
province
])
:
[{
name
:
""
}];
let
cityObj
=
item
.
city
?
getRegionByCodes
([
item
.
city
])
:
[{
name
:
""
}];
// let provinceObj = getRegionByCodes([item.province]);
// let cityObj = getRegionByCodes([item.city]);
let
p
=
{
name
:
item
.
name
,
address
:
item
.
addrDetail
?
item
.
addrDetail
:
item
.
address
,
address
:
item
.
addrDetail
?
item
.
addrDetail
:
item
.
address
,
// companyId: item.id,
province
:
item
.
addrProvince
?
item
.
addrProvince
:
item
.
province
,
provinceName
:
provinceObj
[
0
].
name
,
province
:
item
.
addrProvince
?
item
.
addrProvince
:
item
.
province
,
provinceName
:
provinceObj
[
0
].
name
,
cityName
:
cityObj
[
0
].
name
,
city
:
item
.
addrCity
?
item
.
addrCity
:
item
.
city
,
city
:
item
.
addrCity
?
item
.
addrCity
:
item
.
city
,
longitude
:
item
.
longitude
,
latitude
:
item
.
latitude
,
type
:
1
,
...
...
@@ -522,7 +575,7 @@ import ElRow from "element-ui/packages/row/src/row";
});
//destinationObj目的地
let
destinationObj
=
this
.
destinationObj
;
if
(
!
destinationObj
.
name
)
{
if
(
!
destinationObj
.
name
)
{
this
.
$notify
({
title
:
'警告'
,
message
:
'请选择目的地'
,
...
...
@@ -531,15 +584,15 @@ import ElRow from "element-ui/packages/row/src/row";
});
return
;
}
let
provinceObj
=
destinationObj
.
province
?
getRegionByCodes
([
destinationObj
.
province
]):[{
name
:
""
}];
let
cityObj
=
destinationObj
.
city
?
getRegionByCodes
([
destinationObj
.
city
]):[{
name
:
""
}];
let
provinceObj
=
destinationObj
.
province
?
getRegionByCodes
([
destinationObj
.
province
])
:
[{
name
:
""
}];
let
cityObj
=
destinationObj
.
city
?
getRegionByCodes
([
destinationObj
.
city
])
:
[{
name
:
""
}];
let
p
=
{
name
:
destinationObj
.
name
,
address
:
destinationObj
.
addrDetail
?
destinationObj
.
addrDetail
:
destinationObj
.
address
,
province
:
destinationObj
.
addrProvince
?
destinationObj
.
addrProvince
:
destinationObj
.
province
,
provinceName
:
provinceObj
[
0
].
name
,
address
:
destinationObj
.
addrDetail
?
destinationObj
.
addrDetail
:
destinationObj
.
address
,
province
:
destinationObj
.
addrProvince
?
destinationObj
.
addrProvince
:
destinationObj
.
province
,
provinceName
:
provinceObj
[
0
].
name
,
cityName
:
cityObj
[
0
].
name
,
city
:
destinationObj
.
addrCity
?
destinationObj
.
addrCity
:
destinationObj
.
city
,
city
:
destinationObj
.
addrCity
?
destinationObj
.
addrCity
:
destinationObj
.
city
,
longitude
:
destinationObj
.
longitude
,
latitude
:
destinationObj
.
latitude
,
type
:
2
...
...
@@ -568,8 +621,11 @@ import ElRow from "element-ui/packages/row/src/row";
siteDTOS
:
siteDTOS
,
//出发地type=0,途径地type=1,目的地type=2
priceDTOS
:
this
.
form
.
tourDepartTimeVo
,
//活动日期
tagDTOS
:
tagDTOS
,
//旅游标签
posterBackground
:
this
.
form
.
posterBackground
,
//海报背景
posterBackground
:
this
.
form
.
posterBackground
,
//海报背景
alt
:
this
.
form
.
alt
,
//seo 标签优化
imgTitle
:
this
.
form
.
imgTitle
,
imgKeyword
:
this
.
form
.
imgKeyword
,
imgDesc
:
this
.
form
.
imgDesc
};
console
.
log
(
params
);
goodsEdit
(
params
).
then
(
response
=>
{
...
...
@@ -599,14 +655,14 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 编辑
* */
update
(
formName
)
{
update
(
formName
)
{
//旅游标签
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
let
tagDTOS
=
[];
this
.
form
.
tagDTOS
.
map
(
function
(
item
)
{
if
(
item
.
tagId
)
{
this
.
form
.
tagDTOS
.
map
(
function
(
item
)
{
if
(
item
.
tagId
)
{
tagDTOS
.
push
({
tagId
:
item
.
tagId
});
}
else
{
tagDTOS
.
push
({
tagId
:
item
.
id
});
...
...
@@ -614,21 +670,21 @@ import ElRow from "element-ui/packages/row/src/row";
});
let
siteDTOS
=
[];
//出发地
this
.
departureList
.
map
(
function
(
item
)
{
let
pp
=
item
.
province
?
item
.
province
:
item
.
addrProvince
;
let
c
=
item
.
addrCity
?
item
.
addrCity
:
item
.
city
;
let
provinceObj
=
pp
?
getRegionByCodes
([
pp
]):
[{
name
:
""
}];
let
cityObj
=
c
?
getRegionByCodes
([
c
]):[{
name
:
""
}];
this
.
departureList
.
map
(
function
(
item
)
{
let
pp
=
item
.
province
?
item
.
province
:
item
.
addrProvince
;
let
c
=
item
.
addrCity
?
item
.
addrCity
:
item
.
city
;
let
provinceObj
=
pp
?
getRegionByCodes
([
pp
])
:
[{
name
:
""
}];
let
cityObj
=
c
?
getRegionByCodes
([
c
])
:
[{
name
:
""
}];
let
p
=
{
id
:
item
.
id
,
name
:
item
.
name
,
departTime
:
item
.
departTime
?
item
.
departTime
:
0
,
address
:
item
.
addrDetail
?
item
.
addrDetail
:
item
.
address
,
departTime
:
item
.
departTime
?
item
.
departTime
:
0
,
address
:
item
.
addrDetail
?
item
.
addrDetail
:
item
.
address
,
companyId
:
item
.
companyId
,
province
:
item
.
addrProvince
?
item
.
addrProvince
:
item
.
province
,
provinceName
:
provinceObj
[
0
].
name
,
province
:
item
.
addrProvince
?
item
.
addrProvince
:
item
.
province
,
provinceName
:
provinceObj
[
0
].
name
,
cityName
:
cityObj
[
0
].
name
,
city
:
item
.
addrCity
?
item
.
addrCity
:
item
.
city
,
city
:
item
.
addrCity
?
item
.
addrCity
:
item
.
city
,
longitude
:
item
.
longitude
,
latitude
:
item
.
latitude
,
type
:
0
,
...
...
@@ -636,7 +692,7 @@ import ElRow from "element-ui/packages/row/src/row";
};
siteDTOS
.
push
(
p
);
});
if
(
this
.
departureList
.
length
<=
0
)
{
if
(
this
.
departureList
.
length
<=
0
)
{
this
.
$notify
({
title
:
'警告'
,
message
:
'请选择出发地'
,
...
...
@@ -646,18 +702,18 @@ import ElRow from "element-ui/packages/row/src/row";
return
;
}
//途径地
this
.
pathway
.
map
(
function
(
item
)
{
let
provinceObj
=
item
.
province
?
getRegionByCodes
([
item
.
province
]):
[{
name
:
""
}];
let
cityObj
=
item
.
city
?
getRegionByCodes
([
item
.
city
]):[{
name
:
""
}];
this
.
pathway
.
map
(
function
(
item
)
{
let
provinceObj
=
item
.
province
?
getRegionByCodes
([
item
.
province
])
:
[{
name
:
""
}];
let
cityObj
=
item
.
city
?
getRegionByCodes
([
item
.
city
])
:
[{
name
:
""
}];
let
p
=
{
id
:
item
.
id
,
name
:
item
.
name
,
address
:
item
.
addrDetail
?
item
.
addrDetail
:
item
.
address
,
address
:
item
.
addrDetail
?
item
.
addrDetail
:
item
.
address
,
// companyId: item.id,
province
:
item
.
addrProvince
?
item
.
addrProvince
:
item
.
province
,
province
:
item
.
addrProvince
?
item
.
addrProvince
:
item
.
province
,
provinceName
:
provinceObj
[
0
].
name
,
cityName
:
cityObj
[
0
].
name
,
city
:
item
.
addrCity
?
item
.
addrCity
:
item
.
city
,
city
:
item
.
addrCity
?
item
.
addrCity
:
item
.
city
,
longitude
:
item
.
longitude
,
latitude
:
item
.
latitude
,
type
:
1
,
...
...
@@ -667,7 +723,7 @@ import ElRow from "element-ui/packages/row/src/row";
});
//destinationObj目的地
let
destinationObj
=
this
.
destinationObj
;
if
(
!
destinationObj
.
name
)
{
if
(
!
destinationObj
.
name
)
{
this
.
$notify
({
title
:
'警告'
,
message
:
'请选择目的地'
,
...
...
@@ -676,16 +732,16 @@ import ElRow from "element-ui/packages/row/src/row";
});
return
;
}
let
provinceObj
=
destinationObj
.
province
?
getRegionByCodes
([
destinationObj
.
province
]):[{
name
:
""
}];
let
cityObj
=
destinationObj
.
city
?
getRegionByCodes
([
destinationObj
.
city
]):[{
name
:
""
}];
let
provinceObj
=
destinationObj
.
province
?
getRegionByCodes
([
destinationObj
.
province
])
:
[{
name
:
""
}];
let
cityObj
=
destinationObj
.
city
?
getRegionByCodes
([
destinationObj
.
city
])
:
[{
name
:
""
}];
let
p
=
{
id
:
destinationObj
.
id
,
name
:
destinationObj
.
name
,
address
:
destinationObj
.
addrDetail
?
destinationObj
.
addrDetail
:
destinationObj
.
address
,
province
:
destinationObj
.
addrProvince
?
destinationObj
.
addrProvince
:
destinationObj
.
province
,
address
:
destinationObj
.
addrDetail
?
destinationObj
.
addrDetail
:
destinationObj
.
address
,
province
:
destinationObj
.
addrProvince
?
destinationObj
.
addrProvince
:
destinationObj
.
province
,
provinceName
:
provinceObj
[
0
].
name
,
cityName
:
cityObj
[
0
].
name
,
city
:
destinationObj
.
addrCity
?
destinationObj
.
addrCity
:
destinationObj
.
city
,
city
:
destinationObj
.
addrCity
?
destinationObj
.
addrCity
:
destinationObj
.
city
,
longitude
:
destinationObj
.
longitude
,
latitude
:
destinationObj
.
latitude
,
type
:
2
...
...
@@ -714,8 +770,11 @@ import ElRow from "element-ui/packages/row/src/row";
siteDTOS
:
siteDTOS
,
//出发地type=0,途径地type=1,目的地type=2
priceDTOS
:
this
.
form
.
tourDepartTimeVo
,
//活动日期
tagDTOS
:
tagDTOS
,
//旅游标签
posterBackground
:
this
.
form
.
posterBackground
,
//海报背景
alt
:
this
.
form
.
alt
,
//seo 标签优化
posterBackground
:
this
.
form
.
posterBackground
,
//海报背景
alt
:
this
.
form
.
alt
,
//seo 标签优化
imgTitle
:
this
.
form
.
imgTitle
,
imgKeyword
:
this
.
form
.
imgKeyword
,
imgDesc
:
this
.
form
.
imgDesc
};
console
.
log
(
params
);
this
.
isCreate
=
true
;
...
...
@@ -756,9 +815,9 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 关闭目的地弹框
* */
destinationEvent
(
obj
)
{
destinationEvent
(
obj
)
{
this
.
showDestinationVisible
=
false
;
if
(
obj
)
{
if
(
obj
)
{
this
.
destinationObj
=
obj
;
console
.
log
(
obj
);
}
...
...
@@ -766,20 +825,20 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 选择目的地
* */
selectDestination
()
{
selectDestination
()
{
let
that
=
this
;
this
.
destinationObj
.
showTitle
=
"目的地编辑"
;
this
.
destinationObj
.
headTitle
=
"目的地名称"
;
this
.
destinationObj
.
eventName
=
'destinationEvent'
;
this
.
destinationObj
.
eventName
=
'destinationEvent'
;
this
.
destinationObj
.
keyword
=
this
.
destinationObj
.
address
;
this
.
showDestinationVisible
=
true
;
},
/**
* 关闭活动日期
* */
tourDepartTimeEvent
(
params
)
{
tourDepartTimeEvent
(
params
)
{
this
.
showTimeVisible
=
false
;
if
(
params
)
{
if
(
params
)
{
this
.
form
.
number
=
params
.
num
;
this
.
form
.
tourDepartTimeVo
=
params
.
priceDTOS
;
console
.
log
(
params
);
...
...
@@ -788,11 +847,11 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 关闭途径地弹框
* */
pathWayEvent
(
obj
)
{
pathWayEvent
(
obj
)
{
this
.
showPathWayVisible
=
false
;
if
(
obj
)
{
if
(
obj
.
showTitle
==
"途径地编辑"
)
{
if
(
obj
.
method
==
"delete"
)
{
if
(
obj
)
{
if
(
obj
.
showTitle
==
"途径地编辑"
)
{
if
(
obj
.
method
==
"delete"
)
{
//删除当前路径
this
.
pathway
.
splice
(
obj
,
1
);
}
else
{
...
...
@@ -807,7 +866,7 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 编辑一条途径地数据
* */
selectPathway
(
obj
)
{
selectPathway
(
obj
)
{
let
that
=
this
;
console
.
log
(
obj
);
this
.
onePathObj
=
obj
;
...
...
@@ -817,15 +876,15 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 关闭旅游标签弹框
* */
tourLabelEvent
(
obj
)
{
tourLabelEvent
(
obj
)
{
let
that
=
this
;
this
.
editLableVisible
=
false
;
let
arr
=
[];
let
ckeckList
=
[];
if
(
obj
)
{
this
.
allLabelList
.
map
(
function
(
item
)
{
obj
.
map
(
function
(
b
)
{
if
(
item
.
name
==
b
)
{
if
(
obj
)
{
this
.
allLabelList
.
map
(
function
(
item
)
{
obj
.
map
(
function
(
b
)
{
if
(
item
.
name
==
b
)
{
arr
.
push
(
item
);
ckeckList
.
push
(
b
);
}
...
...
@@ -839,7 +898,7 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 编辑一条途径地
**/
editPathway
(
item
)
{
editPathway
(
item
)
{
this
.
onePathObj
=
item
;
this
.
onePathObj
.
showTitle
=
"途径地编辑"
;
//弹框名称
this
.
onePathObj
.
headTitle
=
"途径地名称"
;
...
...
@@ -850,16 +909,16 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 添加途径地
* */
addPathway
()
{
addPathway
()
{
let
that
=
this
;
this
.
onePathObj
=
{
showTitle
:
"途径地添加"
,
//弹框名称
headTitle
:
"途径地名称"
,
name
:
undefined
,
//地址名称
keyword
:
"东莞市"
,
//根据关键词查找经纬度
address
:
undefined
,
//详细地址
keyword
:
"东莞市"
,
//根据关键词查找经纬度
address
:
undefined
,
//详细地址
longitude
:
113.758993
,
latitude
:
23.031565
,
latitude
:
23.031565
,
eventName
:
"pathWayEvent"
};
this
.
showPathWayVisible
=
true
;
...
...
@@ -867,38 +926,38 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 添加时间
* */
editTime
()
{
editTime
()
{
this
.
showTimeVisible
=
true
;
},
/**
* 获取一条旅游路线
* */
getOneGoods
(
id
)
{
getOneGoods
(
id
)
{
let
params
=
{
id
:
id
};
let
that
=
this
;
getOneGoodsById
(
params
).
then
(
response
=>
{
that
.
pathway
=
[];
response
.
data
.
tourDepartVo
.
map
(
function
(
item
)
{
if
(
item
.
type
==
0
)
{
response
.
data
.
tourDepartVo
.
map
(
function
(
item
)
{
if
(
item
.
type
==
0
)
{
//出发地
that
.
departureList
.
push
(
item
);
}
if
(
item
.
type
==
2
&&
that
.
destinationObj
.
name
==
""
)
{
if
(
item
.
type
==
2
&&
that
.
destinationObj
.
name
==
""
)
{
//目的地
that
.
destinationObj
=
item
;
}
if
(
item
.
type
==
1
)
{
if
(
item
.
type
==
1
)
{
//途径地
that
.
pathway
.
push
(
item
);
}
});
let
arr
=
[];
this
.
form
=
response
.
data
;
this
.
allLabelList
.
map
(
function
(
b
)
{
response
.
data
.
tagDTOS
.
map
(
function
(
item
)
{
if
(
item
.
tagId
==
b
.
id
)
{
this
.
allLabelList
.
map
(
function
(
b
)
{
response
.
data
.
tagDTOS
.
map
(
function
(
item
)
{
if
(
item
.
tagId
==
b
.
id
)
{
arr
.
push
(
item
.
name
);
}
});
...
...
@@ -907,22 +966,22 @@ import ElRow from "element-ui/packages/row/src/row";
//轮播
let
fileList2
=
[];
response
.
data
.
bannerDTOS
.
map
(
function
(
item
)
{
response
.
data
.
bannerDTOS
.
map
(
function
(
item
)
{
let
p
=
{
url
:
item
.
cover
};
fileList2
.
push
(
p
);
});
this
.
fileList2
=
fileList2
;
this
.
form
.
isMember
=
this
.
form
.
isMember
+
""
;
this
.
form
.
recommend
=
this
.
form
.
recommend
+
""
;
this
.
form
.
isOutside
=
this
.
form
.
isOutside
+
""
;
this
.
form
.
isMember
=
this
.
form
.
isMember
+
""
;
this
.
form
.
recommend
=
this
.
form
.
recommend
+
""
;
this
.
form
.
isOutside
=
this
.
form
.
isOutside
+
""
;
this
.
activeName2
=
"first"
;
})
},
querySearch
(
queryString
,
cb
)
{
let
selectArry
=
[];
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
});
...
...
@@ -950,14 +1009,14 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 富文本 旅游
* */
editorReadyEvent
(
instance
)
{
editorReadyEvent
(
instance
)
{
let
t
=
this
;
instance
.
addListener
(
'contentChange'
,
()
=>
{
if
(
t
.
activeName2
==
"first"
)
{
if
(
t
.
activeName2
==
"first"
)
{
t
.
form
.
content
=
instance
.
getContent
();
}
else
if
(
t
.
activeName2
==
"second"
)
{
}
else
if
(
t
.
activeName2
==
"second"
)
{
t
.
form
.
introduce
=
instance
.
getContent
();
}
else
if
(
t
.
activeName2
==
"third"
)
{
}
else
if
(
t
.
activeName2
==
"third"
)
{
t
.
form
.
explain
=
instance
.
getContent
();
}
});
...
...
@@ -984,17 +1043,17 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 删除banner
* */
handleRemove
(
file
,
fileList
)
{
handleRemove
(
file
,
fileList
)
{
let
list
=
[];
fileList
.
map
(
function
(
item
)
{
if
(
item
.
url
!=
file
.
url
)
{
fileList
.
map
(
function
(
item
)
{
if
(
item
.
url
!=
file
.
url
)
{
list
.
push
(
item
);
}
});
this
.
fileList2
=
list
;
let
arr
=
[];
this
.
form
.
bannerDTOS
.
map
(
function
(
item
)
{
if
(
item
.
cover
!=
file
.
url
)
{
this
.
form
.
bannerDTOS
.
map
(
function
(
item
)
{
if
(
item
.
cover
!=
file
.
url
)
{
arr
.
push
(
item
);
}
});
...
...
@@ -1003,7 +1062,7 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 封面图上传
* **/
handleAvatarSuccess
(
res
,
file
)
{
handleAvatarSuccess
(
res
,
file
)
{
this
.
percent
=
0
;
this
.
imgFlag
=
false
;
this
.
form
.
cover
=
res
.
data
;
...
...
@@ -1011,7 +1070,7 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 海报背景上传
* **/
handlePosterSuccess
(
res
,
file
)
{
handlePosterSuccess
(
res
,
file
)
{
this
.
percent_poster
=
0
;
this
.
imgPosterFlag
=
false
;
this
.
form
.
posterBackground
=
res
.
data
;
...
...
@@ -1027,27 +1086,27 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* banner上传
* */
handleBannerSuccess
(
res
,
file
)
{
this
.
fileList2
.
push
({
url
:
res
.
data
});
this
.
form
.
bannerDTOS
.
push
({
cover
:
res
.
data
});
handleBannerSuccess
(
res
,
file
)
{
this
.
fileList2
.
push
({
url
:
res
.
data
});
this
.
form
.
bannerDTOS
.
push
({
cover
:
res
.
data
});
},
/**
* 清空旅游弹框数据
*/
cleanForm
()
{
this
.
onePathObj
=
{
name
:
""
};
//待编辑的途径地
this
.
destinationObj
=
{
name
:
""
},
//目的地
this
.
departureList
=
[],
//出发地列表
this
.
departureObj
=
{
name
:
""
},
//出发地
this
.
pathway
=
[],
//途径地
this
.
fileList2
=
[],
this
.
activeName2
=
''
,
//行程亮点
this
.
form
=
{
this
.
destinationObj
=
{
name
:
""
},
//目的地
this
.
departureList
=
[],
//出发地列表
this
.
departureObj
=
{
name
:
""
},
//出发地
this
.
pathway
=
[],
//途径地
this
.
fileList2
=
[],
this
.
activeName2
=
''
,
//行程亮点
this
.
form
=
{
isOutside
:
"0"
,
//省内、省外
childPrice
:
undefined
,
//儿童价
tourDepartVo
:
undefined
,
//type:0出发地 1途径地 2目的地
tourDepartVo
:
undefined
,
//type:0出发地 1途径地 2目的地
content
:
""
,
//行程亮点
cover
:
undefined
,
//封面图
cover
:
undefined
,
//封面图
describe
:
undefined
,
//描述
introduce
:
""
,
//行程介绍
crtTime
:
undefined
,
...
...
@@ -1064,14 +1123,17 @@ import ElRow from "element-ui/packages/row/src/row";
viewCount
:
undefined
,
//浏览量
isMember
:
"0"
,
//是否是会员商品0不启用,1启用
tagDTOS
:
[],
//旅行标签
bannerDTOS
:[],
//banner轮播
tourDepartTimeVo
:[],
//活动时间
posterBackground
:
''
,
//海报背景
alt
:
''
,
bannerDTOS
:
[],
//banner轮播
tourDepartTimeVo
:
[],
//活动时间
posterBackground
:
''
,
//海报背景
alt
:
''
,
imgTitle
:
undefined
,
imgKeyword
:
undefined
,
imgDesc
:
undefined
},
this
.
showDestinationVisible
=
false
,
//编辑目的地
this
.
showPathWayVisible
=
false
,
//编辑途径地
this
.
showTimeVisible
=
false
;
//编辑时间
this
.
showDestinationVisible
=
false
,
//编辑目的地
this
.
showPathWayVisible
=
false
,
//编辑途径地
this
.
showTimeVisible
=
false
;
//编辑时间
this
.
activeName2
=
""
;
}
}
...
...
src/views/vehicleType/modal/oneType.vue
View file @
1e12c2e8
...
...
@@ -7,7 +7,7 @@
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"车型名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
placeholder=
"请输入车型名称"
></el-input>
<el-input
v-model=
"form.name"
placeholder=
"请输入车型名称"
></el-input>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -96,8 +96,10 @@
<el-row>
<el-col
:span=
"8"
v-for=
"(item, index) in labelList"
:key=
"item.id"
>
<el-form-item>
<span
style=
"width: 150px;text-align:right;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;padding-right: 10px;"
>
{{
item
.
parent
.
name
}}
</span>
<el-input
v-model=
"item.selectChild"
readonly
icon=
"edit"
@
click=
"editConfig(item)"
style=
"width: 70%;"
></el-input>
<span
style=
"width: 150px;text-align:right;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;padding-right: 10px;"
>
{{
item
.
parent
.
name
}}
</span>
<el-input
v-model=
"item.selectChild"
readonly
icon=
"edit"
@
click=
"editConfig(item)"
style=
"width: 70%;"
></el-input>
<!--
<el-select
v-model=
"item.childNameLists"
style=
"width: 80%"
v-if=
"item.parent.isMore==1"
multiple
placeholder=
"请选择"
@
change =
"selectItem"
>
-->
<!--
<el-option-->
<!--v-for="iitem in item.children"-->
...
...
@@ -134,7 +136,9 @@
</el-row>
<el-form-item
label=
"房车参数"
>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"plus"
@
click=
"addModelParam()"
>
添加
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"plus"
@
click=
"addModelParam()"
>
添加
</el-button>
<el-col
v-for=
"(item, index) in form.modelParam"
:key=
"index"
>
<el-form-item
label=
"参数名称"
style=
"margin: 10px 5px;"
>
<el-input
style=
"width: 30%;"
v-model=
"item.key"
></el-input>
...
...
@@ -924,11 +928,4 @@ import UE from '../../modal/Ueditor';//百度ue富文本
border-bottom
:
1px
solid
#999
;
padding
:
3px
;
}
.cx
{
margin-top
:
0px
;
margin-bottom
:
0px
;
height
:
180px
;
}
</
style
>
src/views/xxOfficialWebsite/modal/oneCampsiteModal.vue
View file @
1e12c2e8
<
template
>
<!-- 营地:创建、编辑 -->
<div
class
=
"activity"
>
<div
class
=
"activity"
>
<h4>
{{
title
}}
</h4>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
label-width=
"90px"
>
<el-row>
...
...
@@ -26,14 +26,37 @@
:on-success=
"handleAvatarSuccess"
list-type=
"picture"
>
<div
slot=
"tip"
class=
"el-upload__tip"
><span
style=
"color: red;"
>
建议尺寸:485*485px
</span></div>
<img
v-if=
"$utils.isString(form.banner) && !$utils.isEmpty(form.banner)"
:src=
"form.banner"
style=
"width:300px;max-height:300px;"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
style=
"lineHeight:100px;width:300px;height: 100px;border: 1px dashed #ccc;"
></i>
<img
v-if=
"$utils.isString(form.banner) && !$utils.isEmpty(form.banner)"
:src=
"form.banner"
style=
"width:300px;max-height:300px;"
>
<i
v-else
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-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"alt"
>
<el-input
v-model=
"form.alt"
type=
"text"
placeholder=
"请输入描述"
></el-input>
<el-input
v-model=
"form.alt"
type=
"text"
placeholder=
"请输入替代文本"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"img-title"
>
<el-input
v-model=
"form.imgTitle"
type=
"text"
placeholder=
"请输入图片title"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"img-keyword"
>
<el-input
v-model=
"form.imgKeyword"
type=
"text"
placeholder=
"请输入图片关键字"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"img-desc"
>
<el-input
v-model=
"form.imgDesc"
type=
"text"
placeholder=
"请输入图片描述"
></el-input>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -47,19 +70,22 @@
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"开始时间"
prop=
"startTime"
>
<el-date-picker
v-model=
"form.startTime"
type=
"datetime"
:editable=
"true"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期"
></el-date-picker>
<el-date-picker
v-model=
"form.startTime"
type=
"datetime"
:editable=
"true"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期"
></el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"结束时间"
prop=
"endTime"
>
<el-date-picker
v-model=
"form.endTime"
type=
"datetime"
:editable=
"true"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期"
></el-date-picker>
<el-date-picker
v-model=
"form.endTime"
type=
"datetime"
:editable=
"true"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"报名时间"
prop=
"regCloseTime"
>
<el-date-picker
v-model=
"form.regCloseTime"
type=
"datetime"
:editable=
"true"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期"
></el-date-picker>
<el-date-picker
v-model=
"form.regCloseTime"
type=
"datetime"
:editable=
"true"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -80,7 +106,8 @@
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"活动地址"
prop=
"address"
>
<el-input
v-model=
"form.addressStr"
readonly
placeholder=
"请输入活动地址"
:on-icon-click=
"selectDestination"
icon=
"edit"
></el-input>
<el-input
v-model=
"form.addressStr"
readonly
placeholder=
"请输入活动地址"
:on-icon-click=
"selectDestination"
icon=
"edit"
></el-input>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -100,7 +127,8 @@
<el-tab-pane
label=
"活动图文内容"
name=
"first"
>
<!--
<Editor
v-if=
"activeName2=='first'"
@
input=
"handelContentIncrease"
:value=
"form.content"
:myQuillEditor=
"'myQuillEditorContent'"
:activeName2=
"activeName2"
></Editor>
-->
<div
class=
"editor-container"
v-if=
"activeName2=='first'"
>
<UE
:editorId=
"activeName2"
:defaultMsg=
"form.content"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
<UE
:editorId=
"activeName2"
:defaultMsg=
"form.content"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
</div>
</el-tab-pane>
</el-tabs>
...
...
@@ -108,36 +136,43 @@
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
v-if=
"title=='创建' && !isCreate && campsiteshop_btn_update"
@
click=
"create('form')"
>
确 定
</el-button>
<el-button
type=
"primary"
v-if=
"title=='编辑' && !isCreate && campsiteshop_btn_update"
@
click=
"update('form')"
>
确 定
</el-button>
<el-button
type=
"primary"
v-if=
"title=='创建' && !isCreate && campsiteshop_btn_update"
@
click=
"create('form')"
>
确 定
</el-button>
<el-button
type=
"primary"
v-if=
"title=='编辑' && !isCreate && campsiteshop_btn_update"
@
click=
"update('form')"
>
确 定
</el-button>
</div>
<!--编辑营地地址-->
<campsiteModal
v-if=
"showCampsiteVisible && campsiteshop_btn_update"
:obj=
"campsiteObj"
v-on:campsiteEvent =
"campsiteEvent"
></campsiteModal>
<campsiteModal
v-if=
"showCampsiteVisible && campsiteshop_btn_update"
:obj=
"campsiteObj"
v-on:campsiteEvent=
"campsiteEvent"
></campsiteModal>
<!--编辑营地标签-->
<campsiteLabelModal
v-if=
"editLableVisible && campsiteshop_btn_update"
:allLabelList=
"allLabelList"
:checkList=
"checkList"
v-on:tourLabelEvent =
"tourLabelEvent"
></campsiteLabelModal>
<campsiteLabelModal
v-if=
"editLableVisible && campsiteshop_btn_update"
:allLabelList=
"allLabelList"
:checkList=
"checkList"
v-on:tourLabelEvent=
"tourLabelEvent"
></campsiteLabelModal>
</div>
</
template
>
<
style
>
textarea
{
textarea
{
display
:
none
;
}
.info
{
.info
{
border-radius
:
10px
;
line-height
:
20px
;
padding
:
10px
;
margin
:
10px
;
background-color
:
#ffffff
;
}
.el-upload-list
{
.el-upload-list
{
display
:
flex
;
width
:
100px
;
}
.el-upload-list
li
{
.el-upload-list
li
{
margin-left
:
10px
;
}
</
style
>
<
script
>
// import Editor from "../../modal/editorTool";//富文本
// import Editor from "../../modal/editorTool";//富文本
import
UE
from
'../../modal/Ueditor'
;
//百度ue富文本
import
campsiteLabelModal
from
"../../tourManage/modal/tourLabelModal"
;
//标签
import
campsiteModal
from
"./campsiteModal"
;
//营地地址
...
...
@@ -162,6 +197,7 @@
getToken
}
from
'../../../utils/auth'
;
import
{
mapGetters
}
from
'vuex'
;
export
default
{
props
:
[
"oneRow"
,
"title"
,
"campsiteshop_btn_update"
],
name
:
'upkeepDialog'
,
...
...
@@ -185,24 +221,27 @@
}
};
return
{
imgPosterFlag
:
false
,
percent_poster
:
0
,
imgPosterFlag
:
false
,
percent_poster
:
0
,
BASE_API
:
process
.
env
.
BASE_API
,
defaultMsg
:
'这里是UE测试'
,
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
350
},
isExist
:
false
,
//名称是否已存在
isExist
:
false
,
//名称是否已存在
campsiteObj
:
{},
//营地地址
departureList
:
[],
//出发地列表
departureObj
:
{
name
:
""
},
//出发地
departureObj
:
{
name
:
""
},
//出发地
pathway
:
[],
//途径地
isCreate
:
false
,
//是否点击了创建-确定
fileList2
:
[],
fileList2
:
[],
activeName2
:
''
,
//行程亮点
form
:
{
alt
:
undefined
,
alt
:
undefined
,
imgTitle
:
undefined
,
imgKeyword
:
undefined
,
imgDesc
:
undefined
,
id
:
undefined
,
title
:
undefined
,
//营地名称
subtitle
:
undefined
,
//营地热度
...
...
@@ -213,63 +252,63 @@
province
:
undefined
,
//市编号
cityName
:
undefined
,
//市名称
cityCode
:
undefined
,
//详细地址
city
:
undefined
,
townCode
:
undefined
,
town
:
undefined
,
address
:
undefined
,
city
:
undefined
,
townCode
:
undefined
,
town
:
undefined
,
address
:
undefined
,
latitude
:
undefined
,
longitude
:
undefined
,
limitNum
:
0
,
isShow
:
0
,
isOpenReg
:
0
,
isDel
:
0
,
isPublish
:
0
,
isHomePage
:
0
,
crtUser
:
undefined
,
crtName
:
undefined
,
crtTime
:
undefined
,
actDesc
:
undefined
,
willNum
:
undefined
,
location
:
0
,
rank
:
0
,
type
:
undefined
,
banner
:
undefined
,
limitNum
:
0
,
isShow
:
0
,
isOpenReg
:
0
,
isDel
:
0
,
isPublish
:
0
,
isHomePage
:
0
,
crtUser
:
undefined
,
crtName
:
undefined
,
crtTime
:
undefined
,
actDesc
:
undefined
,
willNum
:
undefined
,
location
:
0
,
rank
:
0
,
type
:
undefined
,
banner
:
undefined
,
content
:
''
,
//营地详情
concat
:
""
,
//联系人
logo
:
undefined
,
//封面图
logo
:
undefined
,
//封面图
configure
:
''
,
//配套&收费
campsiteTagListVos
:
[],
//营地类型
carouse
:
[],
//banner轮播
posterBackground
:
''
,
//海报背景
carouse
:
[],
//banner轮播
posterBackground
:
''
,
//海报背景
},
showCampsiteVisible
:
false
,
//编辑营地地址
rules
:
{
name
:
{
name
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入营地名称'
,
trigger
:
'blur'
},
servicePhone
:
{
servicePhone
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入客服电话'
,
trigger
:
'blur'
},
phone
:{
validator
:
checkPhone
,
trigger
:
'blur'
,
required
:
true
},
concat
:
{
phone
:
{
validator
:
checkPhone
,
trigger
:
'blur'
,
required
:
true
},
concat
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入联系人'
,
trigger
:
'blur'
},
addressStr
:
{
addressStr
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入活动地址'
,
}
},
checkList
:
[],
//已选中的标签
checkList
:
[],
//已选中的标签
allCompanies
:
{},
allCompaniesArr
:
[],
oneTourDialogVisible
:
false
,
...
...
@@ -280,15 +319,15 @@
created
()
{
},
watch
:
{
oneTourDialogVisible
(
newValue
,
oldValue
)
{
if
(
!
newValue
)
{
oneTourDialogVisible
(
newValue
,
oldValue
)
{
if
(
!
newValue
)
{
this
.
cleanForm
();
}
},
},
mounted
()
{
this
.
cleanForm
();
if
(
this
.
title
==
"编辑"
)
{
if
(
this
.
title
==
"编辑"
)
{
let
row
=
this
.
oneRow
;
this
.
getOne
(
row
.
id
);
}
else
{
...
...
@@ -312,17 +351,17 @@
/**
* 编辑营地标签
* */
editLable
(
list
)
{
editLable
(
list
)
{
console
.
log
(
list
);
this
.
editLableVisible
=
true
;
},
isExistCampsiteShop
(
type
,
datas
)
{
isExistCampsiteShop
(
type
,
datas
)
{
console
.
log
(
datas
)
if
(
type
==
"update"
)
{
//编辑
if
(
type
==
"update"
)
{
//编辑
this
.
toUpdate
(
datas
);
}
if
(
type
==
"create"
)
{
if
(
type
==
"create"
)
{
//创建
this
.
toCreate
(
datas
);
}
...
...
@@ -330,21 +369,24 @@ isExistCampsiteShop(type, datas){
/**
* 创建
* */
create
(
formName
)
{
create
(
formName
)
{
const
set
=
this
.
$refs
;
if
(
this
.
form
.
startTime
&&
(
typeof
this
.
form
.
startTime
==
"object"
))
{
if
(
this
.
form
.
startTime
&&
(
typeof
this
.
form
.
startTime
==
"object"
))
{
this
.
form
.
startTime
=
this
.
form
.
startTime
.
getTime
();
}
if
(
this
.
form
.
endTime
&&
(
typeof
this
.
form
.
endTime
==
"object"
))
{
if
(
this
.
form
.
endTime
&&
(
typeof
this
.
form
.
endTime
==
"object"
))
{
this
.
form
.
endTime
=
this
.
form
.
endTime
.
getTime
();
}
if
(
this
.
form
.
regCloseTime
&&
(
typeof
this
.
form
.
regCloseTime
==
"object"
))
{
if
(
this
.
form
.
regCloseTime
&&
(
typeof
this
.
form
.
regCloseTime
==
"object"
))
{
this
.
form
.
regCloseTime
=
this
.
form
.
regCloseTime
.
getTime
();
}
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
let
params
=
{
alt
:
this
.
form
.
alt
,
alt
:
this
.
form
.
alt
,
imgTitle
:
this
.
form
.
imgTitle
,
imgKeyword
:
this
.
form
.
imgKeyword
,
imgDesc
:
this
.
form
.
imgDesc
,
id
:
this
.
form
.
id
,
title
:
this
.
form
.
title
,
//营地名称
subtitle
:
this
.
form
.
subtitle
,
//营地热度
...
...
@@ -355,27 +397,27 @@ create(formName){
province
:
this
.
campsiteObj
.
provinceName
,
//市编号
cityName
:
this
.
campsiteObj
.
cityName
,
//市名称
cityCode
:
this
.
campsiteObj
.
city
,
//详细地址
city
:
this
.
campsiteObj
.
cityName
,
townCode
:
this
.
campsiteObj
.
townCode
,
town
:
this
.
campsiteObj
.
town
,
address
:
this
.
campsiteObj
.
address
,
city
:
this
.
campsiteObj
.
cityName
,
townCode
:
this
.
campsiteObj
.
townCode
,
town
:
this
.
campsiteObj
.
town
,
address
:
this
.
campsiteObj
.
address
,
latitude
:
this
.
campsiteObj
.
latitude
,
longitude
:
this
.
campsiteObj
.
longitude
,
limitNum
:
this
.
form
.
limitNum
,
isShow
:
this
.
form
.
isShow
,
isOpenReg
:
this
.
form
.
isOpenReg
,
isDel
:
this
.
form
.
isDel
,
isHomePage
:
this
.
form
.
isHomePage
,
isHomePage
:
this
.
form
.
isHomePage
,
crtUser
:
this
.
form
.
crtUser
,
crtName
:
this
.
form
.
crtName
,
crtTime
:
this
.
form
.
crtTime
,
actDesc
:
this
.
form
.
actDesc
,
banner
:
this
.
form
.
banner
,
willNum
:
this
.
form
.
willNum
,
location
:
this
.
form
.
location
,
rank
:
this
.
form
.
rank
,
type
:
this
.
form
.
type
,
limitNum
:
this
.
form
.
limitNum
,
isShow
:
this
.
form
.
isShow
,
isOpenReg
:
this
.
form
.
isOpenReg
,
isDel
:
this
.
form
.
isDel
,
isHomePage
:
this
.
form
.
isHomePage
,
isHomePage
:
this
.
form
.
isHomePage
,
crtUser
:
this
.
form
.
crtUser
,
crtName
:
this
.
form
.
crtName
,
crtTime
:
this
.
form
.
crtTime
,
actDesc
:
this
.
form
.
actDesc
,
banner
:
this
.
form
.
banner
,
willNum
:
this
.
form
.
willNum
,
location
:
this
.
form
.
location
,
rank
:
this
.
form
.
rank
,
type
:
this
.
form
.
type
,
content
:
this
.
form
.
content
,
//营地详情
};
console
.
log
(
params
);
...
...
@@ -384,27 +426,30 @@ create(formName){
return
;
}
});
},
},
/**
* 编辑
* */
update
(
formName
)
{
update
(
formName
)
{
const
set
=
this
.
$refs
;
if
(
this
.
form
.
startTime
&&
(
typeof
this
.
form
.
startTime
==
"object"
))
{
if
(
this
.
form
.
startTime
&&
(
typeof
this
.
form
.
startTime
==
"object"
))
{
this
.
form
.
startTime
=
this
.
form
.
startTime
.
getTime
();
}
if
(
this
.
form
.
endTime
&&
(
typeof
this
.
form
.
endTime
==
"object"
))
{
if
(
this
.
form
.
endTime
&&
(
typeof
this
.
form
.
endTime
==
"object"
))
{
this
.
form
.
endTime
=
this
.
form
.
endTime
.
getTime
();
}
if
(
this
.
form
.
regCloseTime
&&
(
typeof
this
.
form
.
regCloseTime
==
"object"
))
{
if
(
this
.
form
.
regCloseTime
&&
(
typeof
this
.
form
.
regCloseTime
==
"object"
))
{
this
.
form
.
regCloseTime
=
this
.
form
.
regCloseTime
.
getTime
();
}
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
isCreate
=
true
;
let
params
=
{
alt
:
this
.
form
.
alt
,
alt
:
this
.
form
.
alt
,
imgTitle
:
this
.
form
.
imgTitle
,
imgKeyword
:
this
.
form
.
imgKeyword
,
imgDesc
:
this
.
form
.
imgDesc
,
id
:
this
.
form
.
id
,
title
:
this
.
form
.
title
,
//营地名称
subtitle
:
this
.
form
.
subtitle
,
//营地热度
...
...
@@ -415,27 +460,27 @@ create(formName){
province
:
this
.
campsiteObj
.
provinceName
,
//市编号
cityName
:
this
.
campsiteObj
.
cityName
,
//市名称
cityCode
:
this
.
campsiteObj
.
city
,
//详细地址
city
:
this
.
campsiteObj
.
cityName
,
townCode
:
this
.
campsiteObj
.
townCode
,
town
:
this
.
campsiteObj
.
town
,
address
:
this
.
campsiteObj
.
address
,
city
:
this
.
campsiteObj
.
cityName
,
townCode
:
this
.
campsiteObj
.
townCode
,
town
:
this
.
campsiteObj
.
town
,
address
:
this
.
campsiteObj
.
address
,
latitude
:
this
.
campsiteObj
.
latitude
,
longitude
:
this
.
campsiteObj
.
longitude
,
limitNum
:
this
.
form
.
limitNum
,
isShow
:
this
.
form
.
isShow
,
banner
:
this
.
form
.
banner
,
isOpenReg
:
this
.
form
.
isOpenReg
,
isDel
:
this
.
form
.
isDel
,
isHomePage
:
this
.
form
.
isHomePage
,
isHomePage
:
this
.
form
.
isHomePage
,
crtUser
:
this
.
form
.
crtUser
,
crtName
:
this
.
form
.
crtName
,
crtTime
:
this
.
form
.
crtTime
,
actDesc
:
this
.
form
.
actDesc
,
willNum
:
this
.
form
.
willNum
,
location
:
this
.
form
.
location
,
rank
:
this
.
form
.
rank
,
type
:
this
.
form
.
type
,
limitNum
:
this
.
form
.
limitNum
,
isShow
:
this
.
form
.
isShow
,
banner
:
this
.
form
.
banner
,
isOpenReg
:
this
.
form
.
isOpenReg
,
isDel
:
this
.
form
.
isDel
,
isHomePage
:
this
.
form
.
isHomePage
,
isHomePage
:
this
.
form
.
isHomePage
,
crtUser
:
this
.
form
.
crtUser
,
crtName
:
this
.
form
.
crtName
,
crtTime
:
this
.
form
.
crtTime
,
actDesc
:
this
.
form
.
actDesc
,
willNum
:
this
.
form
.
willNum
,
location
:
this
.
form
.
location
,
rank
:
this
.
form
.
rank
,
type
:
this
.
form
.
type
,
content
:
this
.
form
.
content
,
//营地详情
};
this
.
isExistCampsiteShop
(
"update"
,
params
);
...
...
@@ -447,7 +492,7 @@ create(formName){
/**
* 更新
* */
toUpdate
(
params
)
{
toUpdate
(
params
)
{
console
.
log
(
"............修改"
)
editActivity
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
...
...
@@ -471,7 +516,7 @@ create(formName){
/**
* 创建
* */
toCreate
(
params
)
{
toCreate
(
params
)
{
editActivity
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
...
...
@@ -494,9 +539,9 @@ create(formName){
/**
* 关闭营地地址弹框
* */
campsiteEvent
(
obj
)
{
campsiteEvent
(
obj
)
{
this
.
showCampsiteVisible
=
false
;
if
(
obj
)
{
if
(
obj
)
{
this
.
campsiteObj
=
obj
;
console
.
log
(
obj
)
let
provinceObj
=
getRegionByCodes
([
obj
.
province
]);
...
...
@@ -513,18 +558,18 @@ create(formName){
/**
* 编辑营地地址
* */
selectDestination
()
{
selectDestination
()
{
let
that
=
this
;
console
.
log
(
this
.
campsiteObj
)
this
.
campsiteObj
.
showTitle
=
"活动地址编辑"
;
this
.
campsiteObj
.
eventName
=
'campsiteEvent'
;
this
.
campsiteObj
.
eventName
=
'campsiteEvent'
;
this
.
campsiteObj
.
keyword
=
this
.
campsiteObj
.
address
;
this
.
showCampsiteVisible
=
true
;
},
/**
* 获取一条营地
* */
getOne
(
id
)
{
getOne
(
id
)
{
let
that
=
this
;
getOneActivityShop
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
...
...
@@ -536,8 +581,8 @@ create(formName){
cityName
:
response
.
data
.
city
,
latitude
:
response
.
data
.
latitude
,
longitude
:
response
.
data
.
longitude
,
townCode
:
response
.
data
.
townCode
,
town
:
response
.
data
.
town
townCode
:
response
.
data
.
townCode
,
town
:
response
.
data
.
town
};
response
.
data
.
addressStr
=
this
.
campsiteObj
.
provinceName
+
this
.
campsiteObj
.
cityName
+
this
.
campsiteObj
.
town
+
this
.
campsiteObj
.
address
;
})
...
...
@@ -552,18 +597,18 @@ create(formName){
/**
* 配套&收费 富文本
* */
handelIntroduceIncrease
(
step
)
{
handelIntroduceIncrease
(
step
)
{
this
.
form
.
configure
=
step
;
},
/**
* 富文本 营地详情
* */
editorReadyEvent
(
instance
)
{
editorReadyEvent
(
instance
)
{
let
t
=
this
;
instance
.
addListener
(
'contentChange'
,
()
=>
{
if
(
t
.
activeName2
==
"first"
)
{
if
(
t
.
activeName2
==
"first"
)
{
t
.
form
.
content
=
instance
.
getContent
();
}
else
if
(
t
.
activeName2
==
"second"
)
{
}
else
if
(
t
.
activeName2
==
"second"
)
{
t
.
form
.
actDesc
=
instance
.
getContent
();
}
});
...
...
@@ -571,7 +616,7 @@ create(formName){
/**
* 封面图上传
* **/
handleAvatarSuccess
(
res
,
file
)
{
handleAvatarSuccess
(
res
,
file
)
{
console
.
log
(
res
.
data
)
this
.
form
.
banner
=
res
.
data
;
},
...
...
@@ -580,11 +625,14 @@ create(formName){
* 清空旅游弹框数据
*/
cleanForm
()
{
this
.
campsiteObj
=
{
name
:
""
};
//营地地址
this
.
fileList2
=
[];
this
.
activeName2
=
''
;
//营地详情
this
.
campsiteObj
=
{
name
:
""
};
//营地地址
this
.
fileList2
=
[];
this
.
activeName2
=
''
;
//营地详情
this
.
form
=
{
alt
:
undefined
,
alt
:
undefined
,
imgTitle
:
undefined
,
imgKeyword
:
undefined
,
imgDesc
:
undefined
,
id
:
undefined
,
title
:
undefined
,
//营地名称
subtitle
:
undefined
,
//营地热度
...
...
@@ -595,36 +643,36 @@ create(formName){
province
:
undefined
,
//市编号
cityName
:
undefined
,
//市名称
cityCode
:
undefined
,
//详细地址
city
:
undefined
,
townCode
:
undefined
,
town
:
undefined
,
address
:
undefined
,
city
:
undefined
,
townCode
:
undefined
,
town
:
undefined
,
address
:
undefined
,
latitude
:
undefined
,
longitude
:
undefined
,
limitNum
:
0
,
isShow
:
0
,
isOpenReg
:
0
,
isDel
:
0
,
banner
:
undefined
,
isPublish
:
0
,
isHomePage
:
0
,
crtUser
:
undefined
,
crtName
:
undefined
,
crtTime
:
undefined
,
actDesc
:
undefined
,
willNum
:
undefined
,
location
:
0
,
rank
:
undefined
,
type
:
undefined
,
limitNum
:
0
,
isShow
:
0
,
isOpenReg
:
0
,
isDel
:
0
,
banner
:
undefined
,
isPublish
:
0
,
isHomePage
:
0
,
crtUser
:
undefined
,
crtName
:
undefined
,
crtTime
:
undefined
,
actDesc
:
undefined
,
willNum
:
undefined
,
location
:
0
,
rank
:
undefined
,
type
:
undefined
,
content
:
''
,
//营地详情
concat
:
""
,
//联系人
logo
:
undefined
,
//封面图
logo
:
undefined
,
//封面图
configure
:
''
,
//配套&收费
campsiteTagListVos
:
[],
//营地类型
carouse
:
[],
//banner轮播
posterBackground
:
''
,
//海报背景
carouse
:
[],
//banner轮播
posterBackground
:
''
,
//海报背景
};
this
.
showCampsiteVisible
=
false
;
//编辑营地地址
this
.
showCampsiteVisible
=
false
;
//编辑营地地址
}
}
}
...
...
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