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
db766895
Commit
db766895
authored
Feb 10, 2023
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地区设置优化功能开发
parent
fa43d232
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1044 additions
and
3 deletions
+1044
-3
WebSiteArea.vue
src/components/WebSet/WebSiteArea.vue
+137
-3
areaSelect.vue
src/pubComponents/areaSelect.vue
+90
-0
uploadImg.vue
src/pubComponents/uploadImg.vue
+817
-0
No files found.
src/components/WebSet/WebSiteArea.vue
View file @
db766895
...
...
@@ -7,7 +7,26 @@
color
:
#409eff
;
text-decoration
:
underline
}
.addlist
{
position
:
absolute
;
right
:
158px
;
top
:
6px
;
cursor
:
pointer
;
color
:
#E95252
;
width
:
30px
;
height
:
30px
;
display
:
inline-block
;
text-align
:
center
;
line-height
:
30px
;
border-radius
:
50%
;
font-size
:
22px
;
}
.relative
{
position
:
relative
;
}
.flex
{
display
:
flex
;
}
</
style
>
<
template
>
<!--契约管理-->
...
...
@@ -16,9 +35,22 @@
<ul>
<li>
<label>
名称
</label>
<el-input
v-model=
"msg.Name"
:placeholder=
"$t('system.ph_in')"
@
keyup
.
native
.
enter=
"getData"
class=
"w210"
>
<el-input
v-model=
"msg.
Category
Name"
:placeholder=
"$t('system.ph_in')"
@
keyup
.
native
.
enter=
"getData"
class=
"w210"
>
</el-input>
</li>
<li>
<label>
层级
</label>
<el-select
v-model=
"msg.Level"
placeholder=
"请选择"
>
<el-option
label=
"请选择"
:value=
"0"
></el-option>
<el-option
label=
"洲"
:value=
"1"
></el-option>
<el-option
label=
"国家"
:value=
"2"
></el-option>
<el-option
label=
"地区/省市"
:value=
"3"
></el-option>
</el-select>
</li>
<li>
<label>
启用状态
</label>
<el-switch
v-model=
"msg.Enable"
></el-switch>
</li>
<li>
<input
type=
"button"
class=
"hollowFixedBtn"
:value=
"$t('pub.searchBtn')"
@
click=
"resetPageIndex(),getData()"
/>
...
...
@@ -52,7 +84,7 @@
</el-pagination>
</div>
<el-dialog
title=
"地区设置"
:visible
.
sync=
"outerVisible"
center
width=
"
4
00px"
>
<el-dialog
title=
"地区设置"
:visible
.
sync=
"outerVisible"
center
width=
"
10
00px"
>
<el-form
:model=
"addMsg"
ref=
"addMsg"
label-width=
"120px"
>
<el-row>
<el-col
:span=
"24"
>
...
...
@@ -76,6 +108,46 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"目的地信息"
>
<div
class=
"relative"
>
<div>
目的地信息
</div>
<i
class=
"el-icon-circle-plus addlist"
@
click=
"clickArea(0, 1)"
></i>
</div>
<div
class=
"relative"
v-for=
"(item, index) in addMsg.areaList"
:key=
"index"
>
<span>
{{item.Name}}
</span>
<i
class=
"el-icon-delete addlist"
@
click=
"clickArea(index)"
></i>
</div>
</el-form-item>
<el-form-item
label=
"介绍"
>
<el-input
v-model=
"addMsg.Introduction"
/>
</el-form-item>
<el-form-item
label=
"时区"
>
<el-input
v-model=
"addMsg.TimeZones"
/>
</el-form-item>
<el-form-item
label=
"币种"
>
<el-select
filterable
v-model=
'addMsg.CurrencyId'
placeholder=
"选择币种"
class=
" _border_b_1"
>
<el-option
v-for=
'item in coinGetList'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"电压"
>
<el-input
v-model=
"addMsg.Voltage"
/>
</el-form-item>
<el-form-item
label=
"最佳旅行时间"
>
<div
class=
"relative"
v-for=
"(item, index) in addMsg.BestTravelTimeList"
:key=
"index"
>
<div
class=
"flex"
><span>
月份说明
</span><el-input
style=
"width: 220px"
v-model=
"item.Month"
/></div>
<div
class=
flex
><span>
理由说明
</span><el-input
style=
"width: 620px"
v-model=
"item.Description"
/></div>
<i
v-if=
"index == 0"
class=
"el-icon-circle-plus addlist"
@
click=
"clickTime(index, 1)"
></i>
<i
v-else
class=
"el-icon-delete addlist"
@
click=
"clickTime(index)"
></i>
</div>
</el-form-item>
<el-form-item
label=
"图片"
>
<!-- <el-input v-model="addMsg.ImageList" /> -->
<uploadImg
ref=
"uploadImg"
></uploadImg>
</el-form-item>
</el-col>
</el-row>
</el-form>
...
...
@@ -84,13 +156,33 @@
<button
class=
"hollowFixedBtn"
@
click=
"outerVisible = false"
>
{{$t('pub.cancelBtn')}}
</button>
</div>
</el-dialog>
<el-dialog
title=
"选择目的地"
:visible
.
sync=
"areaVisible"
@
close=
"addArea"
center
width=
"600px"
>
<area-select
@
change=
"changeSelectArea"
></area-select>
</el-dialog>
</div>
</template>
<
script
>
import
AreaSelect
from
'../../pubComponents/areaSelect'
import
uploadImg
from
'../../pubComponents/uploadImg'
export
default
{
components
:
{
AreaSelect
,
uploadImg
},
data
()
{
return
{
//币种下拉
coinGetList
:[],
areaVisible
:
false
,
loading
:
false
,
areaItem
:{
ID
:
''
,
Name
:
''
},
timeItem
:
{
Month
:
''
,
Description
:
''
},
msg
:
{
Name
:
''
,
//名称
pageSize
:
15
,
...
...
@@ -106,12 +198,18 @@
Level
:
0
,
//等级
ParentId
:
0
,
//父节点编号
AreaName
:
''
,
//名称
BestTravelTimeList
:
[{
Month
:
''
,
Description
:
''
}],
areaList
:
[],
},
AreaList
:
[],
//地区列表
}
},
mounted
()
{
this
.
getData
();
this
.
financeinfo_post_GetList
()
},
methods
:
{
getAreaList
()
{
...
...
@@ -209,6 +307,9 @@
},
//新增、修改广告
submitForm
(
addMsg
)
{
const
imageList
=
this
.
$refs
.
uploadImg
.
ImageList
console
.
log
(
'submitForm'
,
this
.
addMsg
,
imageList
)
this
.
addMsg
.
ImageList
=
imageList
this
.
apipost
(
"ws_post_SetArea"
,
this
.
addMsg
,
res
=>
{
...
...
@@ -224,6 +325,39 @@
err
=>
{}
);
},
//获取币种
financeinfo_post_GetList
(){
this
.
apipost
(
'financeinfo_post_GetList'
,{
Name
:
''
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
coinGetList
=
res
.
data
.
data
;
}
},
err
=>
{})
},
clickArea
(
index
,
type
)
{
if
(
type
)
{
this
.
areaVisible
=
true
}
else
{
this
.
addMsg
.
areaList
.
splice
(
index
,
1
)
}
},
clickTime
(
index
,
type
)
{
if
(
type
)
{
this
.
addMsg
.
BestTravelTimeList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
timeItem
)))
}
else
{
this
.
addMsg
.
BestTravelTimeList
.
splice
(
index
,
1
)
}
},
addArea
()
{
if
(
this
.
areaInfo
)
{
this
.
addMsg
.
areaList
.
push
(
this
.
areaInfo
)
}
console
.
log
(
'addArea'
,
this
.
areaInfo
,
this
.
addMsg
)
this
.
areaInfo
=
null
},
changeSelectArea
(
area
)
{
console
.
log
(
'changeSelectArea'
,
area
)
this
.
areaInfo
=
area
}
}
}
...
...
src/pubComponents/areaSelect.vue
0 → 100644
View file @
db766895
<
template
>
<div>
<el-select
placeholder=
"国家"
filterable
v-model=
"addMsg.Country"
class=
'multiple_input w100'
@
change=
"GetSubAreaList(addMsg.Country, 1), addMsg.Province = '', addMsg.City = '', addMsg.District = ''"
>
<el-option
v-for=
"childItem in CountryList"
:key=
"childItem.ID"
:label=
"childItem.Name"
:value=
"childItem.ID"
>
</el-option>
</el-select>
<el-select
placeholder=
"省"
filterable
class=
'multiple_input w100'
v-model=
"addMsg.Province"
@
change=
"GetSubAreaList(addMsg.Province, 2), addMsg.City = '', addMsg.District = ''"
>
<el-option
v-for=
"childItem in ProvinceList"
:key=
"childItem.ID"
:label=
"childItem.Name"
:value=
"childItem.ID"
>
</el-option>
</el-select>
<el-select
placeholder=
"市"
filterable
@
change=
"emitChange(addMsg.City, 3)"
class=
'multiple_input w100'
v-model=
"addMsg.City"
>
<el-option
v-for=
"childItem in CityList"
:key=
"childItem.ID"
:label=
"childItem.Name"
:value=
"childItem.ID"
>
</el-option>
</el-select>
</div>
</
template
>
<
style
scoped
>
</
style
>
<
script
>
export
default
{
data
()
{
return
{
addMsg
:
{},
CountryList
:
[],
ProvinceList
:
[],
CityList
:
[],
district
:
[],
}
},
mounted
()
{
this
.
GetCounrty
();
},
methods
:
{
//获取国家
GetCounrty
()
{
this
.
apipost
(
"dict_post_Destination_GetCountry"
,
{},
res
=>
{
this
.
CountryList
=
res
.
data
.
data
;
},
err
=>
{
}
);
},
//获取省份和城市
GetSubAreaList
(
ID
,
type
)
{
let
msg
=
{
Id
:
ID
};
if
(
this
.
addMsg
.
Country
!=
0
)
{
this
.
apipost
(
"dict_post_Destination_GetChildList"
,
msg
,
res
=>
{
if
(
type
==
1
)
{
this
.
ProvinceList
=
res
.
data
.
data
;
this
.
CityList
=
[];
this
.
district
=
[];
}
else
if
(
type
==
2
)
{
this
.
CityList
=
res
.
data
.
data
;
this
.
district
=
[];
}
else
if
(
type
==
3
)
{
this
.
district
=
res
.
data
.
data
;
}
},
err
=>
{
}
);
}
this
.
emitChange
(
ID
,
type
)
},
emitChange
(
ID
,
type
)
{
let
info
if
(
type
===
1
)
{
info
=
this
.
CountryList
.
find
(
item
=>
item
.
ID
===
ID
)
}
else
if
(
type
===
2
)
{
info
=
this
.
ProvinceList
.
find
(
item
=>
item
.
ID
===
ID
)
}
else
{
info
=
this
.
CityList
.
find
(
item
=>
item
.
ID
===
ID
)
}
this
.
$emit
(
'change'
,
info
)
}
}
}
</
script
>
\ No newline at end of file
src/pubComponents/uploadImg.vue
0 → 100644
View file @
db766895
This diff is collapsed.
Click to expand it.
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