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
0a34ae3f
Commit
0a34ae3f
authored
Mar 02, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0ca98590
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
307 additions
and
290 deletions
+307
-290
tripUtils.js
src/assets/utils/tripUtils.js
+7
-1
dinnerTrip_Direct.vue
...Travelmanager/oldTravelGroupControl/dinnerTrip_Direct.vue
+4
-0
hotelTrip_Direct.vue
...wTravelmanager/oldTravelGroupControl/hotelTrip_Direct.vue
+1
-0
scienTrip_Direct.vue
...wTravelmanager/oldTravelGroupControl/scienTrip_Direct.vue
+3
-8
trifficTrip.vue
...ts/newTravelmanager/oldTravelGroupControl/trifficTrip.vue
+292
-281
No files found.
src/assets/utils/tripUtils.js
View file @
0a34ae3f
...
...
@@ -355,6 +355,7 @@ var tripUtils = {
TrafficType
:
2
,
//交通类型,默认为专车
TrafficContent
:
""
,
//交通详情
TrafficImage
:
""
,
//交通图片
}
};
},
...
...
@@ -369,7 +370,9 @@ var tripUtils = {
//出发城市名称
StartCityName
:
""
,
//到达城市名称
ArrivalCityName
:
""
ArrivalCityName
:
""
,
StartTime
:
""
,
//出发时间
EndTime
:
""
,
//到达时间
};
},
//行程-景点对象
...
...
@@ -405,6 +408,7 @@ var tripUtils = {
TrafficType
:
2
,
//交通类型(1-飞机,2-专车,3-地铁,4-步行)
TrafficContent
:
""
,
//交通内容
TrafficImage
:
""
,
//交通图片
TimeStr
:
""
,
//时间字符串备注
};
},
//行程-酒店对象
...
...
@@ -435,6 +439,7 @@ var tripUtils = {
//酒店类型
HotelType
:
0
,
MD5Sign
:
""
,
TimeStr
:
""
,
//时间字符串备注
};
},
//行程-餐饮对象
...
...
@@ -463,6 +468,7 @@ var tripUtils = {
QCity
:
''
,
BreakfastUseType
:
2
,
MD5Sign
:
""
,
TimeStr
:
""
,
//时间字符串备注
};
},
//行程-自由活动对象
...
...
src/components/newTravelmanager/oldTravelGroupControl/dinnerTrip_Direct.vue
View file @
0a34ae3f
...
...
@@ -37,6 +37,10 @@
</el-select>
</el-form-item>
</span>
<span
class=
"comTravelLeft"
>
时间
</span>
<span>
<el-input
v-model=
"subItemObj.childItem.TimeStr"
placeholder=
"时间信息"
style=
"width:80px"
></el-input>
</span>
</div>
<div
class=
"TDmealTime"
>
<label
class=
"TDhotelDiner"
>
{{
$t
(
'sm.yongcanshiduan'
)
}}
</label>
...
...
src/components/newTravelmanager/oldTravelGroupControl/hotelTrip_Direct.vue
View file @
0a34ae3f
...
...
@@ -51,6 +51,7 @@
:checked=
"subItemObj.childItem.IsSameLevel===CheckedVaule"
:true-label=
"CheckedVaule"
:false-label=
"UnCheckedVaule"
border
size=
"mini"
>
{{
$t
(
'sm.tongjijiudian'
)
}}
</el-checkbox>
</span>
<span
class=
"comTravelLeft"
>
{{
$t
(
'sm.fangxingxz'
)
}}
</span>
<span>
<el-select
:disabled=
"isOpenGroup"
class=
'w160'
:placeholder=
"$t('pub.pleaseSel')"
filterable
...
...
src/components/newTravelmanager/oldTravelGroupControl/scienTrip_Direct.vue
View file @
0a34ae3f
...
...
@@ -46,15 +46,10 @@
</el-select>
</el-form-item>
</span>
<
!--
<span
class=
"comTravelLeft"
>
门票
</span>
<
span
class=
"comTravelLeft"
>
时间
</span>
<span>
<el-select
:disabled=
"isOpenGroup"
class=
'w160'
filterable
:placeholder=
"$t('pub.pleaseSel')"
v-model=
"subItemObj.childItem.CouponsTicketId"
@
visible-change=
"getTicketList($event)"
@
change=
"changeTicketList()"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'DefaultSelectValue'
></el-option>
<el-option
v-for=
"item in QTicketList"
:label=
'item.TicketName'
:value=
'item.Id'
:key=
'item.Id'
>
</el-option>
</el-select>
</span>
-->
<el-input
v-model=
"subItemObj.childItem.TimeStr"
placeholder=
"时间信息"
style=
"width:80px"
></el-input>
</span>
</div>
<div
class=
"TDRightPlan"
>
<label
class=
"comTravelLeft"
>
{{
$t
(
'scen.sc_etTime'
)
}}
</label>
...
...
src/components/newTravelmanager/oldTravelGroupControl/trifficTrip.vue
View file @
0a34ae3f
...
...
@@ -15,7 +15,8 @@
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('system.table_delete')"
placement=
"top-start"
>
<i
class=
"iconfont icon-xingzhuang"
@
click=
"removeTrifficTrip(subItemObj.childItem.DayNum,subIndex)"
></i>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('sm.xiayi')"
placement=
"top-start"
v-if=
"subIndex!=subTotalIndex-1"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('sm.xiayi')"
placement=
"top-start"
v-if=
"subIndex!=subTotalIndex-1"
>
<i
class=
"iconfont icon-xiayi1"
@
click=
"MoveItem(subItemObj.childItem.DayNum,subIndex,1)"
></i>
</el-tooltip>
</div>
...
...
@@ -23,21 +24,26 @@
<div
class=
"TDLeftPlan"
>
<span
v-for=
"(subTraffic,subTrafficIndex) in subItemObj.childItem.SubTraffic"
>
<span
v-if=
"subTrafficIndex==0"
>
<el-form-item
:prop=
"'DayList.'+index+'.dayArray.'+subIndex+'.childItem.SubTraffic.'+subTrafficIndex+'.StartCityId'"
<el-form-item
:prop=
"'DayList.'+index+'.dayArray.'+subIndex+'.childItem.SubTraffic.'+subTrafficIndex+'.StartCityId'"
:rules=
"trifficTripRules.StartCityId"
>
<el-select
:disabled=
"isOpenGroup"
class=
'w120'
:placeholder=
"$t('pub.pleaseSel')"
filterable
v-model=
"subTraffic.StartCityId"
@
visible-change=
"GetDepartList1($event)"
@
change=
"changeGetDepartList(subTraffic.StartCityId)"
>
<el-select
:disabled=
"isOpenGroup"
class=
'w120'
:placeholder=
"$t('pub.pleaseSel')"
filterable
v-model=
"subTraffic.StartCityId"
@
visible-change=
"GetDepartList1($event)"
@
change=
"changeGetDepartList(subTraffic.StartCityId)"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'DefaultSelectValue'
></el-option>
<el-option
v-for=
"item in DepartList1"
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
</el-form-item>
<el-input
v-model=
"subTraffic.StartTime"
placeholder=
"出发时间"
style=
"width:80px"
></el-input>
</span>
<!--显示交通类型-->
<span
class=
"TDArrivalType"
>
<el-form-item
:prop=
"'DayList.'+index+'.dayArray.'+subIndex+'.childItem.SubTraffic.'+subTrafficIndex+'.ArrivalType'"
<el-form-item
:prop=
"'DayList.'+index+'.dayArray.'+subIndex+'.childItem.SubTraffic.'+subTrafficIndex+'.ArrivalType'"
:rules=
"trifficTripRules.ArrivalType"
>
<el-select
:disabled=
"isOpenGroup"
:placeholder=
"$t('pub.pleaseSel')"
v-model=
"subTraffic.ArrivalType"
>
<el-select
:disabled=
"isOpenGroup"
:placeholder=
"$t('pub.pleaseSel')"
v-model=
"subTraffic.ArrivalType"
>
<el-option
v-for=
"item in ArrivalTypeArray"
:value=
'item.ID'
:key=
'item.ID'
>
<i
:class=
"item.ClassStr"
></i>
</el-option>
...
...
@@ -49,10 +55,13 @@
<i
v-if=
"subTraffic.ArrivalType==4"
class=
"iconfont icon-huoche huoche"
></i>
</span>
<span>
<el-form-item
:prop=
"'DayList.'+index+'.dayArray.'+subIndex+'.childItem.SubTraffic.'+subTrafficIndex+'.ArrivalCityId'"
<el-input
v-model=
"subTraffic.EndTime"
placeholder=
"到达时间"
style=
"width:80px"
></el-input>
<el-form-item
:prop=
"'DayList.'+index+'.dayArray.'+subIndex+'.childItem.SubTraffic.'+subTrafficIndex+'.ArrivalCityId'"
:rules=
"trifficTripRules.ArrivalCityId"
>
<el-select
:disabled=
"isOpenGroup"
class=
'w120'
:placeholder=
"$t('pub.pleaseSel')"
filterable
v-model=
"subTraffic.ArrivalCityId"
@
visible-change=
"GetArrivalList1($event)"
@
change=
"changeArrivalCity(subTraffic.ArrivalCityId)"
>
<el-select
:disabled=
"isOpenGroup"
class=
'w120'
:placeholder=
"$t('pub.pleaseSel')"
filterable
v-model=
"subTraffic.ArrivalCityId"
@
visible-change=
"GetArrivalList1($event)"
@
change=
"changeArrivalCity(subTraffic.ArrivalCityId)"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'DefaultSelectValue'
></el-option>
<el-option
v-for=
"item in ArriveList1"
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
...
...
@@ -63,35 +72,42 @@
<!--增加交通计划-->
<span
v-if=
"!isOpenGroup"
class=
"addTrafficPlan"
@
click=
"addTrafficPlan(subItemObj)"
>
+
</span>
<!--减少交通计划-->
<span
v-if=
"subItemObj.childItem.SubTraffic.length>1&&!isOpenGroup"
class=
"addTrafficPlan"
@
click=
"minusTrafficPlan(subItemObj)"
>
-
</span>
<span
v-if=
"subItemObj.childItem.SubTraffic.length>1&&!isOpenGroup"
class=
"addTrafficPlan"
@
click=
"minusTrafficPlan(subItemObj)"
>
-
</span>
</div>
</div>
<div
class=
"useCar"
>
<el-checkbox
v-model=
"subItemObj.childItem.IsUseBus"
:checked=
"subItemObj.childItem.IsUseBus===CheckedVaule"
:true-label=
"CheckedVaule"
:false-label=
"UnCheckedVaule"
border
size=
"mini"
>
{{
$t
(
'sm.yongche'
)
}}
</el-checkbox>
:true-label=
"CheckedVaule"
:false-label=
"UnCheckedVaule"
border
size=
"mini"
>
{{
$t
(
'sm.yongche'
)
}}
</el-checkbox>
</div>
</div>
<div
class=
"TDplanList TDRightPlan"
v-if=
'subItemObj.childItem.IsUseBus===CheckedVaule'
>
<div
class=
"useCarPlan"
><label>
{{
$t
(
'sm.yongchejihua'
)
}}
</label>
<span
v-if=
"index==0"
:class=
"
{'ListCked':subItemObj.childItem.AirportPickUp==1}" @click="changeAirportType(1)">
{{
AirPickUp
}}
</span>
<span
v-if=
"index==DayList.length-1"
:class=
"
{'ListCked':subItemObj.childItem.AirportPickUp==2}" @click="changeAirportType(2)">
{{
AirSend
}}
</span>
<span
v-if=
"index==0"
:class=
"
{'ListCked':subItemObj.childItem.AirportPickUp==1}"
@click="changeAirportType(1)">
{{
AirPickUp
}}
</span>
<span
v-if=
"index==DayList.length-1"
:class=
"
{'ListCked':subItemObj.childItem.AirportPickUp==2}"
@click="changeAirportType(2)">
{{
AirSend
}}
</span>
</div>
<div
class=
"clearfix"
>
<div
v-if=
"!isOpenGroup"
class=
"useTypeDiv"
v-for=
"useTypeItem in UseTypeArray"
:key=
"useTypeItem.subCode"
>
<span
:class=
"
{'ListCked':subItemObj.childItem.UseType==useTypeItem.Id}" @click="UseTypeClick( subItemObj.childItem,useTypeItem.Id)">
{{
useTypeItem
.
Name
}}
</span>
<span
:class=
"
{'ListCked':subItemObj.childItem.UseType==useTypeItem.Id}"
@click="UseTypeClick( subItemObj.childItem,useTypeItem.Id)">
{{
useTypeItem
.
Name
}}
</span>
</div>
<div
v-if=
"isOpenGroup"
class=
"useTypeDiv"
v-for=
"useTypeItem in UseTypeArray"
:key=
"useTypeItem.subCode"
>
<span
:class=
"
{'ListCked':subItemObj.childItem.UseType==useTypeItem.Id}">
{{
useTypeItem
.
Name
}}
</span>
</div>
<div>
<el-input
:disabled=
"isOpenGroup"
class=
"w135"
v-model=
"subItemObj.childItem.UseTime"
@
keyup
.
native=
"checkInteger(subItemObj.childItem,'UseTime')"
:placeholder=
"$t('sm.shuruyongchexiaoshi')"
></el-input>
<el-input
:disabled=
"isOpenGroup"
class=
"w135"
v-model=
"subItemObj.childItem.UseTime"
@
keyup
.
native=
"checkInteger(subItemObj.childItem,'UseTime')"
:placeholder=
"$t('sm.shuruyongchexiaoshi')"
>
</el-input>
</div>
</div>
</div>
<div
class=
"TP_edit"
>
<my-edit
v-on:edit-value=
"subItemObj.childItem.Description = arguments[0]"
v-bind:editValue=
"subItemObj.childItem.Description"
v-bind:toolbarShow=
"toolbar"
v-bind:referenceList=
"DefaultList"
></my-edit>
<my-edit
v-on:edit-value=
"subItemObj.childItem.Description = arguments[0]"
v-bind:editValue=
"subItemObj.childItem.Description"
v-bind:toolbarShow=
"toolbar"
v-bind:referenceList=
"DefaultList"
></my-edit>
</div>
</div>
<div
class=
"read"
v-if=
"!isShowEdit"
>
...
...
@@ -108,7 +124,8 @@
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('system.table_delete')"
placement=
"top-start"
>
<i
class=
"iconfont icon-xingzhuang"
@
click=
"removeTrifficTrip(subItemObj.childItem.DayNum,subIndex)"
></i>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('sm.xiayi')"
placement=
"top-start"
v-if=
"subIndex!=subTotalIndex-1"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('sm.xiayi')"
placement=
"top-start"
v-if=
"subIndex!=subTotalIndex-1"
>
<i
class=
"iconfont icon-xiayi1"
@
click=
"MoveItem(subItemObj.childItem.DayNum,subIndex,1)"
></i>
</el-tooltip>
</div>
...
...
@@ -127,26 +144,26 @@
</span>
<!--最后一天的交通城市-->
<span
v-if=
"index==DayList.length-1 && subTrafficIndex==subItemObj.childItem.SubTraffic.length-1 "
>
{{
subTraffic
.
ArrivalCityName
}}
{{
subTraffic
.
ArrivalCityName
}}
</span>
<!--中转城市-->
<span
v-else-if=
"subTrafficIndex!=subItemObj.childItem.SubTraffic.length-1"
>
{{
subTraffic
.
ArrivalCityName
}}
{{
subTraffic
.
ArrivalCityName
}}
</span>
<span
v-else
>
{{
subTraffic
.
ArrivalCityName
}}
{{
subTraffic
.
ArrivalCityName
}}
</span>
</span>
</div>
<div
class=
"use"
>
<span
class=
"none"
v-if=
'subItemObj.childItem.IsUseBus===CheckedVaule'
>
{{
$t
(
'sm.yongchejihua'
)
}}
<span
v-if=
"subItemObj.childItem.AirportPickUp==1"
>
{{
$t
(
'sm.jieji'
)
}}
</span>
<span
v-if=
"subItemObj.childItem.AirportPickUp==2"
>
{{
$t
(
'sm.songji'
)
}}
</span>
<span
v-if=
"subItemObj.childItem.UseType==1"
>
{{
$t
(
'pub.allday'
)
}}
</span>
<span
v-if=
"subItemObj.childItem.UseType==2"
>
{{
$t
(
'sm.bantian'
)
}}
</span>
<span>
{{
subItemObj
.
childItem
.
UseTime
}}
</span>
<span>
小时
</span>
{{
$t
(
'sm.yongchejihua'
)
}}
<span
v-if=
"subItemObj.childItem.AirportPickUp==1"
>
{{
$t
(
'sm.jieji'
)
}}
</span>
<span
v-if=
"subItemObj.childItem.AirportPickUp==2"
>
{{
$t
(
'sm.songji'
)
}}
</span>
<span
v-if=
"subItemObj.childItem.UseType==1"
>
{{
$t
(
'pub.allday'
)
}}
</span>
<span
v-if=
"subItemObj.childItem.UseType==2"
>
{{
$t
(
'sm.bantian'
)
}}
</span>
<span>
{{
subItemObj
.
childItem
.
UseTime
}}
</span>
<span>
小时
</span>
</span>
<span
class=
"none"
v-else
>
{{
$t
(
'sm.buyongche'
)
}}
</span>
</div>
...
...
@@ -158,284 +175,278 @@
</div>
</
template
>
<
script
>
import
MyEdit
from
"../../EditTemplate.vue"
;
export
default
{
props
:
[
"subItemObj"
,
"index"
,
"DayList"
,
"DefaultList"
,
"subIndex"
,
"QueryData"
,
"isOpenGroup"
,
"subTotalIndex"
,
"AllCityList"
,
//所有的城市数据
"TimeTypeList"
,
"UseTypeArray"
,
"AirPickUp"
,
"AirSend"
],
data
()
{
var
StartCityIdValidate
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
0
)
{
callback
(
new
Error
(
this
.
$t
(
'sm.qingxuanzchufacity'
)));
}
else
{
callback
();
}
};
var
ArrivalTypeValidate
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
0
)
{
callback
(
new
Error
(
this
.
$t
(
'sm.qingxuanzjiaotongType'
)));
}
else
{
callback
();
}
};
var
ArrivalCityIdValidate
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
0
)
{
callback
(
new
Error
(
this
.
$t
(
'system.ph_arrivalCity'
)));
}
else
{
callback
();
}
};
return
{
//下拉框默认值
DefaultSelectValue
:
0
,
//编辑器选项
toolbar
:
{
clean
:
false
,
//加粗
font
:
false
,
//字体
narrative
:
true
//叙述,
},
//交通类型数组
ArrivalTypeArray
:
[
{
ID
:
1
,
ClassStr
:
"iconfont icon-feiji"
},
//飞机
{
ID
:
2
,
ClassStr
:
"iconfont icon-dabaxiaoba"
},
//汽车
{
ID
:
3
,
ClassStr
:
"iconfont icon-lunchuan"
},
//轮船
{
ID
:
4
,
ClassStr
:
"iconfont icon-huoche"
}
//火车
],
//选中用车
CheckedVaule
:
1
,
//不用车
UnCheckedVaule
:
0
,
//是否显示编辑框
isShowEdit
:
true
,
//text框placeholder
placeholder
:
this
.
$t
(
'sm.qsrjiaotonginfo'
),
//交通验证
trifficTripRules
:
{
StartCityId
:
[
import
MyEdit
from
"../../EditTemplate.vue"
;
export
default
{
props
:
[
"subItemObj"
,
"index"
,
"DayList"
,
"DefaultList"
,
"subIndex"
,
"QueryData"
,
"isOpenGroup"
,
"subTotalIndex"
,
"AllCityList"
,
//所有的城市数据
"TimeTypeList"
,
"UseTypeArray"
,
"AirPickUp"
,
"AirSend"
],
data
()
{
var
StartCityIdValidate
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
0
)
{
callback
(
new
Error
(
this
.
$t
(
'sm.qingxuanzchufacity'
)));
}
else
{
callback
();
}
};
var
ArrivalTypeValidate
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
0
)
{
callback
(
new
Error
(
this
.
$t
(
'sm.qingxuanzjiaotongType'
)));
}
else
{
callback
();
}
};
var
ArrivalCityIdValidate
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
0
)
{
callback
(
new
Error
(
this
.
$t
(
'system.ph_arrivalCity'
)));
}
else
{
callback
();
}
};
return
{
//下拉框默认值
DefaultSelectValue
:
0
,
//编辑器选项
toolbar
:
{
clean
:
false
,
//加粗
font
:
false
,
//字体
narrative
:
true
//叙述,
},
//交通类型数组
ArrivalTypeArray
:
[{
ID
:
1
,
ClassStr
:
"iconfont icon-feiji"
},
//飞机
{
ID
:
2
,
ClassStr
:
"iconfont icon-dabaxiaoba"
},
//汽车
{
ID
:
3
,
ClassStr
:
"iconfont icon-lunchuan"
},
//轮船
{
ID
:
4
,
ClassStr
:
"iconfont icon-huoche"
}
//火车
],
//选中用车
CheckedVaule
:
1
,
//不用车
UnCheckedVaule
:
0
,
//是否显示编辑框
isShowEdit
:
true
,
//text框placeholder
placeholder
:
this
.
$t
(
'sm.qsrjiaotonginfo'
),
//交通验证
trifficTripRules
:
{
StartCityId
:
[{
validator
:
StartCityIdValidate
,
trigger
:
"change"
}
],
ArrivalType
:
[
{
}],
ArrivalType
:
[{
validator
:
ArrivalTypeValidate
,
trigger
:
"change"
}
],
ArrivalCityId
:
[
{
}],
ArrivalCityId
:
[{
validator
:
ArrivalCityIdValidate
,
trigger
:
"change"
}
]
},
//出发城市列表1
DepartList1
:
[],
//到达城市列表1
ArriveList1
:
[]
};
},
components
:
{
"my-edit"
:
MyEdit
},
methods
:
{
//出发城市1
GetDepartList1
(
event
)
{
if
(
event
)
{
this
.
DepartList1
=
this
.
AllCityList
;
}
}]
},
//出发城市列表1
DepartList1
:
[],
//到达城市列表1
ArriveList1
:
[]
};
},
//到达城市
GetArrivalList1
(
event
)
{
if
(
event
)
{
this
.
ArriveList1
=
this
.
AllCityList
;
}
components
:
{
"my-edit"
:
MyEdit
},
//到达城市改变
changeArrivalCity
(
val
)
{
this
.
DayList
.
forEach
((
item
,
qIndex
)
=>
{
if
(
this
.
index
==
qIndex
)
{
//删除多余的项
item
.
dayArray
.
forEach
((
subItem
,
childIndex
)
=>
{
if
(
childIndex
>
this
.
subIndex
)
{
//查询数组
var
qArray
=
this
.
$tripUtils
.
GetCityIdArray
(
this
.
DayList
,
qIndex
,
this
.
DayList
[
this
.
index
].
dayArray
.
length
,
true
);
subItem
.
childItem
.
QCity
=
qArray
.
join
(
","
);
}
});
methods
:
{
//出发城市1
GetDepartList1
(
event
)
{
if
(
event
)
{
this
.
DepartList1
=
this
.
AllCityList
;
}
});
var
that
=
this
;
if
(
val
!=
0
)
{
//获取当前选中的对象
let
obj
=
{};
obj
=
that
.
AllCityList
.
find
(
item
=>
{
return
item
.
ID
===
val
;
//筛选出匹配数据
},
//到达城市
GetArrivalList1
(
event
)
{
if
(
event
)
{
this
.
ArriveList1
=
this
.
AllCityList
;
}
},
//到达城市改变
changeArrivalCity
(
val
)
{
this
.
DayList
.
forEach
((
item
,
qIndex
)
=>
{
if
(
this
.
index
==
qIndex
)
{
//删除多余的项
item
.
dayArray
.
forEach
((
subItem
,
childIndex
)
=>
{
if
(
childIndex
>
this
.
subIndex
)
{
//查询数组
var
qArray
=
this
.
$tripUtils
.
GetCityIdArray
(
this
.
DayList
,
qIndex
,
this
.
DayList
[
this
.
index
].
dayArray
.
length
,
true
);
subItem
.
childItem
.
QCity
=
qArray
.
join
(
","
);
}
});
}
});
if
(
obj
!=
undefined
)
{
that
.
subItemObj
.
childItem
.
SubTraffic
.
forEach
((
x
,
index
)
=>
{
if
(
x
.
ArrivalCityId
==
val
)
{
x
.
ArrivalCityName
=
obj
.
Name
;
}
if
(
index
!=
0
)
{
that
.
subItemObj
.
childItem
.
SubTraffic
[
index
].
StartCityName
=
that
.
subItemObj
.
childItem
.
SubTraffic
[
index
-
1
].
ArrivalCityName
;
that
.
subItemObj
.
childItem
.
SubTraffic
[
index
].
StartCityId
=
that
.
subItemObj
.
childItem
.
SubTraffic
[
index
-
1
].
ArrivalCityId
;
}
var
that
=
this
;
if
(
val
!=
0
)
{
//获取当前选中的对象
let
obj
=
{};
obj
=
that
.
AllCityList
.
find
(
item
=>
{
return
item
.
ID
===
val
;
//筛选出匹配数据
});
if
(
obj
!=
undefined
)
{
that
.
subItemObj
.
childItem
.
SubTraffic
.
forEach
((
x
,
index
)
=>
{
if
(
x
.
ArrivalCityId
==
val
)
{
x
.
ArrivalCityName
=
obj
.
Name
;
}
if
(
index
!=
0
)
{
that
.
subItemObj
.
childItem
.
SubTraffic
[
index
].
StartCityName
=
that
.
subItemObj
.
childItem
.
SubTraffic
[
index
-
1
].
ArrivalCityName
;
that
.
subItemObj
.
childItem
.
SubTraffic
[
index
].
StartCityId
=
that
.
subItemObj
.
childItem
.
SubTraffic
[
index
-
1
].
ArrivalCityId
;
}
});
}
}
}
},
//出发城市改变
changeGetDepartList
(
val
)
{
var
that
=
this
;
if
(
val
!=
0
)
{
//获取当前选中的对象
let
obj
=
{};
obj
=
that
.
AllCityList
.
find
(
item
=>
{
return
item
.
ID
===
val
;
//筛选出匹配数据
});
if
(
obj
!=
undefined
)
{
that
.
subItemObj
.
childItem
.
SubTraffic
.
forEach
(
x
=>
{
if
(
x
.
StartCityId
==
val
)
{
x
.
StartCityName
=
obj
.
Name
;
}
},
//出发城市改变
changeGetDepartList
(
val
)
{
var
that
=
this
;
if
(
val
!=
0
)
{
//获取当前选中的对象
let
obj
=
{};
obj
=
that
.
AllCityList
.
find
(
item
=>
{
return
item
.
ID
===
val
;
//筛选出匹配数据
});
if
(
obj
!=
undefined
)
{
that
.
subItemObj
.
childItem
.
SubTraffic
.
forEach
(
x
=>
{
if
(
x
.
StartCityId
==
val
)
{
x
.
StartCityName
=
obj
.
Name
;
}
});
}
}
}
},
getCityNameById
(
id
)
{
let
name
=
""
;
this
.
AllCityList
.
forEach
(
x
=>
{
if
(
x
.
ID
==
id
)
{
name
=
x
.
Name
;
return
false
;
},
getCityNameById
(
id
)
{
let
name
=
""
;
this
.
AllCityList
.
forEach
(
x
=>
{
if
(
x
.
ID
==
id
)
{
name
=
x
.
Name
;
return
false
;
}
});
return
name
;
},
changeAirportType
(
t
)
{
if
(
t
==
this
.
subItemObj
.
childItem
.
AirportPickUp
)
{
this
.
subItemObj
.
childItem
.
AirportPickUp
=
0
;
}
else
{
this
.
subItemObj
.
childItem
.
AirportPickUp
=
t
;
}
});
return
name
;
},
changeAirportType
(
t
)
{
if
(
t
==
this
.
subItemObj
.
childItem
.
AirportPickUp
)
{
this
.
subItemObj
.
childItem
.
AirportPickUp
=
0
;
}
else
{
this
.
subItemObj
.
childItem
.
AirportPickUp
=
t
;
}
},
//用车类型点击事件
UseTypeClick
(
item
,
value
)
{
item
.
UseType
=
value
;
},
//点击添加交通计划
addTrafficPlan
(
item
)
{
item
.
childItem
.
SubTraffic
.
push
(
this
.
$tripUtils
.
subTrafficObj
());
},
//减去交通计划
minusTrafficPlan
(
item
)
{
if
(
item
.
childItem
.
SubTraffic
.
length
>
1
)
{
item
.
childItem
.
SubTraffic
.
splice
(
item
.
childItem
.
SubTraffic
.
length
-
1
,
1
);
}
},
//删除交通
removeTrifficTrip
(
dayNum
,
subIndex
)
{
this
.
$parent
.
$parent
.
commonRemove
(
dayNum
,
subIndex
);
},
//上移下移
MoveItem
(
dayNum
,
subIndex
,
IsUp
)
{
this
.
$parent
.
$parent
.
MoveItem
(
dayNum
,
subIndex
,
IsUp
);
},
//初始化数据
initData
()
{
if
(
this
.
subItemObj
.
childItem
.
ID
>
0
)
{
if
(
this
.
subItemObj
.
childItem
.
SubTraffic
!=
null
&&
this
.
subItemObj
.
childItem
.
SubTraffic
.
length
>
0
)
{
},
//用车类型点击事件
UseTypeClick
(
item
,
value
)
{
item
.
UseType
=
value
;
},
//点击添加交通计划
addTrafficPlan
(
item
)
{
item
.
childItem
.
SubTraffic
.
push
(
this
.
$tripUtils
.
subTrafficObj
());
},
//减去交通计划
minusTrafficPlan
(
item
)
{
if
(
item
.
childItem
.
SubTraffic
.
length
>
1
)
{
item
.
childItem
.
SubTraffic
.
splice
(
item
.
childItem
.
SubTraffic
.
length
-
1
,
1
);
}
},
//删除交通
removeTrifficTrip
(
dayNum
,
subIndex
)
{
this
.
$parent
.
$parent
.
commonRemove
(
dayNum
,
subIndex
);
},
//上移下移
MoveItem
(
dayNum
,
subIndex
,
IsUp
)
{
this
.
$parent
.
$parent
.
MoveItem
(
dayNum
,
subIndex
,
IsUp
);
},
//初始化数据
initData
()
{
if
(
this
.
subItemObj
.
childItem
.
ID
>
0
)
{
if
(
this
.
subItemObj
.
childItem
.
SubTraffic
!=
null
&&
this
.
subItemObj
.
childItem
.
SubTraffic
.
length
>
0
)
{
this
.
subItemObj
.
childItem
.
SubTraffic
.
forEach
(
item
=>
{
this
.
DepartList1
.
push
({
ID
:
item
.
StartCityId
,
Name
:
item
.
StartCityName
});
this
.
ArriveList1
.
push
({
ID
:
item
.
ArrivalCityId
,
Name
:
item
.
ArrivalCityName
});
});
}
}
else
{
this
.
subItemObj
.
childItem
.
SubTraffic
.
forEach
(
item
=>
{
this
.
DepartList1
.
push
({
ID
:
item
.
StartCityId
,
Name
:
item
.
StartCityName
});
this
.
ArriveList1
.
push
({
ID
:
item
.
ArrivalCityId
,
Name
:
item
.
ArrivalCityName
Name
:
this
.
getCityNameById
(
item
.
StartCityId
)
});
});
}
}
else
{
this
.
subItemObj
.
childItem
.
SubTraffic
.
forEach
(
item
=>
{
this
.
DepartList1
.
push
({
ID
:
item
.
StartCityId
,
Name
:
this
.
getCityNameById
(
item
.
StartCityId
)
});
});
}
}
},
mounted
()
{
this
.
initData
();
},
created
()
{},
watch
:
{
//监听参数
subItemObj
:
{
handler
:
function
(
val
,
oldVal
)
{
//获取当前到达城市
var
subArray
=
this
.
subItemObj
.
childItem
.
SubTraffic
;
if
(
subArray
.
length
>
0
)
{
var
tempCityId
=
0
;
if
(
subArray
.
length
>
1
)
{
for
(
var
i
=
0
;
i
<
subArray
.
length
;
i
++
)
{
if
(
subArray
[
i
].
ArrivalCityId
!=
undefined
)
{
tempCityId
=
subArray
[
i
].
ArrivalCityId
;
if
(
i
>
0
)
{
subArray
[
i
].
StartCityId
=
subArray
[
i
-
1
].
ArrivalCityId
;
}
,
mounted
()
{
this
.
initData
();
},
created
()
{
},
watch
:
{
//监听参数
subItemObj
:
{
handler
:
function
(
val
,
oldVal
)
{
//获取当前到达城市
var
subArray
=
this
.
subItemObj
.
childItem
.
SubTraffic
;
if
(
subArray
.
length
>
0
)
{
var
tempCityId
=
0
;
if
(
subArray
.
length
>
1
)
{
for
(
var
i
=
0
;
i
<
subArray
.
length
;
i
++
)
{
if
(
subArray
[
i
].
ArrivalCityId
!=
undefined
)
{
tempCityId
=
subArray
[
i
].
ArrivalCityId
;
if
(
i
>
0
)
{
subArray
[
i
].
StartCityId
=
subArray
[
i
-
1
].
ArrivalCityId
;
}
}
}
}
else
{
if
(
subArray
[
0
].
ArrivalCityId
!=
undefined
)
{
tempCityId
=
subArray
[
0
].
ArrivalCityId
;
}
}
}
else
{
if
(
subArray
[
0
].
ArrivalCityId
!=
undefined
)
{
tempCityId
=
subArray
[
0
].
ArrivalCityId
;
}
this
.
subItemObj
.
childItem
.
CityId
=
tempCityId
;
}
this
.
subItemObj
.
childItem
.
CityId
=
tempCityId
;
}
},
deep
:
true
},
deep
:
true
}
}
}
};
}
;
</
script
>
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