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
d7fe72f4
Commit
d7fe72f4
authored
Mar 15, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
团控代码优化
parent
4e1cf046
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
42 deletions
+4
-42
TravelConfig.vue
...ents/newTravelmanager/TravelGroupControl/TravelConfig.vue
+1
-1
TravelManager2.vue
...ts/newTravelmanager/TravelGroupControl/TravelManager2.vue
+2
-3
travelFeature2.vue
...lmanager/TravelGroupControl/TravelTemp/travelFeature2.vue
+0
-5
travelFeature3.vue
...lmanager/TravelGroupControl/TravelTemp/travelFeature3.vue
+1
-33
No files found.
src/components/newTravelmanager/TravelGroupControl/TravelConfig.vue
View file @
d7fe72f4
...
...
@@ -151,7 +151,7 @@
<div
class=
"Travel_ImgList clearfix"
>
<div
class=
"TFimgList"
v-for=
"(item,index) in PostConfig.fileList"
:key=
"item.subCode"
>
<img
v-if=
"!item.Url"
src=
"../../../assets/img/bg_c3@3x.png"
>
<img
v-else
:src=
"item.Url"
>
<img
v-else
:src=
"
item.Url"
>
<div
class=
"TFIMGzhe"
>
<div
class=
"TFreupload"
@
click=
"updateTFimg(index)"
>
<el-upload
:file-list=
"PostConfig.fileList"
:http-request=
"reUpload"
:multiple=
"true"
...
...
src/components/newTravelmanager/TravelGroupControl/TravelManager2.vue
View file @
d7fe72f4
...
...
@@ -209,9 +209,9 @@
this
.
FeatureData
.
FeatureHtmlJson
.
d
&&
this
.
FeatureData
.
FeatureHtmlJson
.
d
.
length
>
0
)
{
//
console.log("to do something");
//
to do something
}
else
{
//
this.$set(this.FeatureData, "DayList", data);
//this.$set(this.FeatureData, "DayList", data);
this
.
$refs
.
TravelFeature
.
setNewDate
(
data
);
}
},
...
...
@@ -589,7 +589,6 @@
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
tempData
=
res
.
data
.
data
;
console
.
log
(
"tempData"
,
tempData
);
if
(
tempData
.
Feature
!=
null
)
{
this
.
FeatureData
.
ID
=
tempData
.
Feature
.
ID
;
this
.
FeatureData
.
ConfigId
=
tempData
.
Feature
.
ConfigId
;
...
...
src/components/newTravelmanager/TravelGroupControl/TravelTemp/travelFeature2.vue
View file @
d7fe72f4
...
...
@@ -1666,11 +1666,6 @@
watch
:{
data
:{
handler
:
function
(
val
,
oldVal
)
{
// console.log(val.DayList.length);
// console.log(oldVal.DayList.length);
// if (val && (val.DayList.length !== oldVal.DayList.length)) {
// console.log('ssss')
// }
},
deep
:
true
}
...
...
src/components/newTravelmanager/TravelGroupControl/TravelTemp/travelFeature3.vue
View file @
d7fe72f4
...
...
@@ -1170,7 +1170,6 @@
},
methods
:
{
DataComparison
:
function
()
{
// 数据对比
console
.
log
(
"DataComparison"
)
let
newVal
=
this
.
newVal
;
let
newRestaurantObj
=
{
title
:{
...
...
@@ -1201,14 +1200,9 @@
deleteRestaurantHistory
=
[];
//json 历史数据 jsonDelete 历史删除数据
let
json
=
this
.
FeatureData
.
FeatureHtmlJson
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
FeatureData
.
FeatureHtmlJson
))
:
''
;
console
.
log
(
json
)
let
jsonDelete
=
this
.
FeatureData
.
FeatureHtmlJsonDelete
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
FeatureData
.
FeatureHtmlJsonDelete
))
:
''
;
// console.log("json",json)
// console.log("jsonDelete",jsonDelete)
// 历史数据组装
// console.log("json",json)
if
(
JSON
.
stringify
(
json
)
!==
'{}'
&&
json
&&
json
.
hotelObj
.
list
&&
json
.
hotelObj
.
list
.
length
>
0
&&
this
.
theFirstTime
)
{
// console.log("json.travelFeature2",json)
this
.
jsonTravelFeature2
=
json
;
newHtelObj
=
json
.
hotelObj
;
newViewSpotObj
=
json
.
viewSpotObj
;
...
...
@@ -1238,9 +1232,6 @@
})
newRestaurantObj
=
restaurantObj
;
}
// console.log('1newViewSpotObj',newViewSpotObj)
// console.log('1restaurantObj',newRestaurantObj)
// console.log('1newHtelObj',newHtelObj)
// 获取并组装历史删除数据
if
(
jsonDelete
&&
jsonDelete
.
length
>
0
)
{
jsonDelete
.
forEach
(
x
=>
{
...
...
@@ -1264,23 +1255,18 @@
newViewSpotObj
.
list
.
push
(...
viewSpotObj
);
}
// 对比景点 newViewSpotObj this.viewSpotObj.list
let
DalateView
=
travelFeatureTwo
.
getArrDifference
(
newViewSpotObj
.
list
,
this
.
viewSpotObj
.
list
);
if
(
deleteViewSpotHistory
.
length
>
0
)
{
DalateView
.
push
(...
deleteViewSpotHistory
)
}
// console.log("newViewSpotObj.list",newViewSpotObj.list)
let
VSobj
=
{};
console
.
log
(
this
.
viewSpotObj
.
list
)
let
ov
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewSpotObj
))
ov
.
list
.
push
(...
newViewSpotObj
.
list
)
// newViewSpotObj.list.push(...this.viewSpotObj.list) //1-24 因为保存后特色已更改的刷新后变为上一次保存结果,所以调换顺序进行测试
ov
.
list
=
ov
.
list
.
reduce
(
function
(
item
,
next
)
{
//根据MD5Sign数组对象去重
VSobj
[
next
.
MD5Sign
]
?
''
:
VSobj
[
next
.
MD5Sign
]
=
true
&&
item
.
push
(
next
);
return
item
;
},
[]);
// console.log("newViewSpotObj.list",newViewSpotObj.list)
DalateView
.
forEach
((
x
,
index
)
=>
{
// 根据MD5Sign过滤删除数据
ov
.
list
.
filter
((
val
,
vIndex
)
=>
{
if
(
x
.
MD5Sign
===
val
.
MD5Sign
)
...
...
@@ -1298,7 +1284,6 @@
let
HTobj
=
{};
let
hv
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
hotelObj
))
hv
.
list
.
push
(...
newHtelObj
.
list
)
// newHtelObj.list.push(...this.hotelObj.list)
hv
.
list
=
hv
.
list
.
reduce
(
function
(
item
,
next
)
{
//数组对象去重
HTobj
[
next
.
MD5Sign
]
?
''
:
HTobj
[
next
.
MD5Sign
]
=
true
&&
item
.
push
(
next
);
return
item
;
...
...
@@ -1320,8 +1305,6 @@
let
RTobj
=
{};
let
rv
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
restaurantObj
))
rv
.
list
.
push
(...
newRestaurantObj
.
list
)
console
.
log
(
"rvrvrvrvrv"
,
rv
.
list
)
// newRestaurantObj.list.push(...this.restaurantObj.list)
rv
.
list
=
rv
.
list
.
reduce
(
function
(
item
,
next
)
{
//数组对象去重
RTobj
[
next
.
MD5Sign
]
?
''
:
RTobj
[
next
.
MD5Sign
]
=
true
&&
item
.
push
(
next
);
return
item
;
...
...
@@ -1332,9 +1315,7 @@
rv
.
list
.
splice
(
vIndex
,
1
)
})
})
// console.log('2newViewSpotObj',newViewSpotObj)
// console.log('2restaurantObj',newRestaurantObj)
// console.log('2newHtelObj',newHtelObj)
// 餐饮对比结束
this
.
hotelObj
.
list
=
hv
.
list
;
this
.
viewSpotObj
.
list
=
ov
.
list
;
...
...
@@ -1344,7 +1325,6 @@
this
.
pageCount
(
'restaurant'
);
this
.
Refresh
=
false
;
this
.
RenderingOk
=
false
;
// console.log(this.viewSpotObj.list)
this
.
$forceUpdate
()
},
UpDateInfo
:
function
()
{
// 防止组件改动一直渲染数据造成卡顿 添加点击更新视图
...
...
@@ -1363,9 +1343,6 @@
let
dataList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
FeatureData
));
let
deleteDataList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
FeatureData
.
FeatureHtmlJsonDelete
));
this
.
deleteArray
=
!
deleteDataList
?
[]
:
deleteDataList
;
// console.log("this.deleteArray", this.deleteArray)
// console.log("dataList",dataList,!this.$route.query.configId,dataList.switch4or5)
// console.log("this.$route.query.configId && this.FeatureData.FeatureType
<
4
",this.$route.query.configId && this.FeatureData.FeatureType<4) || (this.$route.query.configId && this.FeatureData.FeatureType<4)
if
(
!
this
.
$route
.
query
.
configId
||
(
this
.
$route
.
query
.
configId
&&
dataList
.
switch4or5
)
||
(
this
.
$route
.
query
.
configId
&&
this
.
FeatureData
.
lastFeatureType
)){
for
(
let
i
=
0
;
i
<
dataList
.
DayList
.
length
;
i
++
)
{
//组装数据
let
restaurantObj
=
travelFeatureTwo
.
DinnerInit
(
i
,
dataList
.
DayList
)
// 餐饮
...
...
@@ -1421,7 +1398,6 @@
}
}
let
json
=
this
.
FeatureData
.
FeatureHtmlJson
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
FeatureData
.
FeatureHtmlJson
))
:
''
;
// console.log("
jsonjsonjson
",json)
this
.
hotelObj
.
title
=
json
.
hotelObj
?
json
.
hotelObj
.
title
:
this
.
hotelObj
.
title
;
this
.
restaurantObj
.
title
=
json
.
restaurantObj
?
json
.
restaurantObj
.
title
:
this
.
restaurantObj
.
title
;
this
.
viewSpotObj
.
title
=
json
.
viewSpotObj
?
json
.
viewSpotObj
.
title
:
this
.
viewSpotObj
.
title
;
...
...
@@ -1868,7 +1844,6 @@
},
// 版块删除
bolckToDelete
:
function
(
name
,
index1
,
index2
)
{
console.log(name, index1)
let
blockList
=
[];
if
(
name
===
'hotel'
)
{
blockList
=
this
.
hotelObj
.
list
...
...
@@ -1877,10 +1852,8 @@
}
else
if
(
name
===
'restaurant'
)
{
blockList
=
this
.
restaurantObj
.
list
}
console.log(blockList)
this
.
imgTopReset
(
name
,
index1
,
index2
);
this
.
deleteArray
.
push
(
blockList
[
index1
]);
console.log("
删除
",blockList[index1])
blockList
.
splice
(
index1
,
1
);
this
.
pageCount
(
name
)
},
...
...
@@ -1896,7 +1869,6 @@
basicData
:
travelFeature2
,
deleteArray
:
this
.
deleteArray
}
console.log(obj)
return
obj
;
},
// 设置编辑状态
...
...
@@ -1924,17 +1896,13 @@
watch
:{
FeatureData
:{
handler
:
function
(
val
,
oldVal
)
{
console.log('2019年2月12日10:53:11',oldVal)
console.log('2019年2月12日10:53:22',val)
if
(
this
.
ReadOnly
)
return
;
if
(
val
&&
this
.
oldVal
!=
null
)
{
// console.log("
watch_if_FeatureData
",11111)
this
.
newVal
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
this
.
Refresh
=
true
;
this
.
theFirstTime
=
false
return
}
else
{
// console.log("
watch_else_FeatureData
",333)
this
.
oldVal
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
FeatureData
));
this
.
init
()
}
...
...
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