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
4ca22c56
Commit
4ca22c56
authored
Oct 11, 2023
by
youjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/superman
parents
55bfa3eb
9da31480
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1070 additions
and
1149 deletions
+1070
-1149
TravelpassengerList.vue
...mponents/TravelManager/TravelList/TravelpassengerList.vue
+28
-77
ApprovalProcess.vue
src/components/administrative/ApprovalProcess.vue
+956
-949
TravelManager2.vue
...ts/newTravelmanager/TravelGroupControl/TravelManager2.vue
+0
-2
TravelManagerThree.vue
...ewTravelmanager/TravelGroupControl/TravelManagerThree.vue
+1
-5
index.vue
...ravelmanager/TravelGroupControl/UpgradedVersion/index.vue
+6
-3
tripmap.vue
...omponents/newTravelmanager/TravelGroupControl/tripmap.vue
+79
-111
travelDaysTrip.vue
...onents/newTravelmanager/travelLineTrip/travelDaysTrip.vue
+0
-2
No files found.
src/components/TravelManager/TravelList/TravelpassengerList.vue
View file @
4ca22c56
...
...
@@ -65,18 +65,19 @@
text-align
:
center
;
margin
:
10px
;
}
.PassengerList
.disClick
{
background-color
:
#d1d1d1
;
color
:
#fff
;
border
:
1px
solid
#d1d1d1
;
}
.PassengerList
.disClick
:hover
{
background-color
:
#d1d1d1
!important
;
cursor
:
default
!important
;
box-shadow
:
none
!important
;
}
</
style
>
<
template
>
...
...
@@ -99,7 +100,6 @@
</table>
</li>
<li>
<!--
<input
type=
"button"
class=
"normalBtn"
v-if=
"!allDIs"
value=
"分房表确认"
@
click=
"querenHotel(2)"
>
-->
<input
type=
"button"
class=
"normalBtn"
v-if=
"allDIs"
value=
"取消分房表确认"
@
click=
"querenHotel(0)"
>
<input
type=
"button"
class=
"normalBtn"
value=
"分房表下载"
@
click=
"exportExcel_singleRoom()"
>
<input
type=
"button"
class=
"normalBtn"
value=
"旅客名单下载"
@
click=
"exportExcel()"
>
...
...
@@ -148,12 +148,8 @@
</el-select>
</td>
<td>
<!--
<el-select
v-model=
"subItem.HouseType"
placeholder=
"请选择"
@
change=
"changeRmType(subItem, subIndex)"
v-if=
"subItem.IsLeaderOrder==1"
>
<el-option
:disabled=
"(subItem.HouseType == 1 && IsLeaderGuide == 1) || allDIs"
v-for=
"(hs, hsIndex) in HouseTypeList"
:key=
"hsIndex"
:label=
"hs.HouseName"
:value=
"hs.HouseType"
>
</el-option>
</el-select>
-->
<el-select
v-model=
"subItem.HouseType"
placeholder=
"请选择"
@
change=
"changeRmType1(subItem, subIndex,subItem.HouseType)"
v-if=
"subItem.IsLeaderOrder==1"
>
<el-select
v-model=
"subItem.HouseType"
placeholder=
"请选择"
@
change=
"changeRmType1(subItem, subIndex,subItem.HouseType)"
v-if=
"subItem.IsLeaderOrder==1"
>
<el-option
:disabled=
"(hs.disabled && IsLeaderGuide == 1) || allDIs"
v-for=
"(hs, hsIndex) in HouseTypeList"
:key=
"hsIndex"
:label=
"hs.HouseName"
:value=
"hs.HouseType"
>
</el-option>
...
...
@@ -189,7 +185,8 @@
</tr>
<tr
v-if=
"!allDIs"
style=
"height:50px; line-height:50px;"
>
<td
style=
"text-align:right"
colspan=
"23"
>
<input
type=
"button"
value=
"保存"
:class=
"
{'disClick':!isSubmit}" class="leader2Btn" @click="saveOPSetGuestHouse">
<input
type=
"button"
value=
"保存"
:class=
"
{'disClick':!isSubmit}" class="leader2Btn"
@click="saveOPSetGuestHouse">
</td>
</tr>
</tbody>
...
...
@@ -260,12 +257,12 @@
houseList
:
[],
HouseTypeList
:
[],
//领队才能选数据
LeaderHouseList
:[],
LeaderHouseList
:
[],
numberList
:
[],
dataList
:
[],
otherList
:
[],
//单机票和自由行列表
//只有两个项、
twoList
:[],
twoList
:
[],
allDIs
:
false
,
//验证重复提交
isSubmit
:
true
,
...
...
@@ -277,7 +274,7 @@
this
.
apipost
(
"travel_get_UpdateOpSureHouse"
,
{
TCID
:
this
.
TCID
,
OpSureHouse
:
OpSureHouse
OpSureHouse
:
OpSureHouse
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
...
...
@@ -291,11 +288,11 @@
);
},
// 修改类型1
changeRmType1
:
function
(
obj
,
index
,
type
)
{
if
(
type
==
1
||
type
==
6
)
{
this
.
HouseTypeList
.
forEach
((
x
,
index
)
=>
{
if
(
index
!=
0
&&
index
!=
5
)
{
x
.
disabled
=
true
changeRmType1
:
function
(
obj
,
index
,
type
)
{
if
(
type
==
1
||
type
==
6
)
{
this
.
HouseTypeList
.
forEach
((
x
,
index
)
=>
{
if
(
index
!=
0
&&
index
!=
5
)
{
x
.
disabled
=
true
}
})
}
...
...
@@ -309,7 +306,6 @@
list
=
list
.
sort
(
this
.
compare
)
this
.
dataList
=
list
;
},
// 修改类型
changeRmType
:
function
(
obj
,
index
)
{
let
list
=
this
.
dataList
;
...
...
@@ -387,26 +383,6 @@
}
return
str
;
},
//获取房间类型
getHouseTypeStr
(
HouseType
)
{
var
str
=
""
;
if
(
HouseType
==
1
)
{
str
=
"自然单间"
;
}
else
if
(
HouseType
==
2
)
{
str
=
"标准双人间"
;
}
else
if
(
HouseType
==
3
)
{
str
=
"大床房"
;
}
else
if
(
HouseType
==
4
)
{
str
=
"三人间"
;
}
else
if
(
HouseType
==
5
)
{
str
=
"拼凑双人间"
;
}
else
if
(
HouseType
==
6
)
{
str
=
"司导间"
;
}
else
{
str
=
"未分配"
;
}
return
str
;
},
getHouseTypeList
:
function
()
{
this
.
apipost
(
"travel_get_GetHouseType"
,
...
...
@@ -415,14 +391,14 @@
this
.
QueryMsg
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
HouseTypeList
=
res
.
data
.
data
;
this
.
LeaderHouseList
=
[];
this
.
twoList
=
[];
this
.
HouseTypeList
.
forEach
(
x
=>
{
x
.
disabled
=
false
;
if
(
x
.
HouseType
!=
6
)
{
this
.
LeaderHouseList
=
[];
this
.
twoList
=
[];
this
.
HouseTypeList
.
forEach
(
x
=>
{
x
.
disabled
=
false
;
if
(
x
.
HouseType
!=
6
)
{
this
.
LeaderHouseList
.
push
(
x
)
}
if
(
x
.
HouseType
==
1
||
x
.
HouseType
==
6
)
{
if
(
x
.
HouseType
==
1
||
x
.
HouseType
==
6
)
{
this
.
twoList
.
push
(
x
);
}
})
...
...
@@ -431,30 +407,6 @@
err
=>
{}
);
},
setDataList
:
function
(
list
)
{
var
Diningmap
=
{},
Diningdest
=
[];
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
var
ai
=
list
[
i
];
if
(
!
Diningmap
[
ai
.
HouseNo
])
{
Diningdest
.
push
({
HouseType
:
ai
.
HouseType
,
HouseNo
:
ai
.
HouseNo
,
data
:
[
ai
]
});
Diningmap
[
ai
.
HouseNo
]
=
ai
;
}
else
{
for
(
var
j
=
0
;
j
<
Diningdest
.
length
;
j
++
)
{
var
dj
=
Diningdest
[
j
];
if
(
dj
.
HouseType
==
ai
.
HouseType
&&
dj
.
HouseNo
==
ai
.
HouseNo
)
{
dj
.
data
.
push
(
ai
);
break
;
}
}
}
}
this
.
QueryMsg
.
dataList
=
Diningdest
;
},
//获取数据
getList
()
{
this
.
QueryMsg
.
loading
=
true
;
...
...
@@ -513,27 +465,26 @@
TCID
:
this
.
msg
.
TCID
,
isGetTicket
:
1
,
//不查询机票
isGetZiYouXing
:
0
,
//查询自由行
isOnlyFenFang
:
1
,
//只查询已分房的
isOnlyFenFang
:
1
,
//只查询已分房的
};
var
fileName
=
"旅客名单.xls"
;
if
(
this
.
QueryMsg
.
TeamInfoData
!=
null
)
{
fileName
=
"【"
+
this
.
QueryMsg
.
TeamInfoData
[
0
].
TCNUM
+
"】分房表["
+
this
.
getCurrentTime
()
+
"].xls"
;
"【"
+
this
.
QueryMsg
.
TeamInfoData
[
0
].
TCNUM
+
"】分房表["
+
this
.
getCurrentTime
()
+
"].xls"
;
}
this
.
GetLocalFile
(
"travel_get_GetTravelRoomExport"
,
msg
,
fileName
,
res
=>
{
this
.
QueryMsg
.
loading
=
false
;
});
},
getCurrentTime
()
{
getCurrentTime
()
{
var
date
=
new
Date
();
var
year
=
date
.
getFullYear
();
var
month
=
date
.
getMonth
()
+
1
;
var
month
=
date
.
getMonth
()
+
1
;
var
day
=
date
.
getDate
();
var
hour
=
date
.
getHours
();
var
minute
=
date
.
getMinutes
();
var
second
=
date
.
getSeconds
();
return
year
+
'_'
+
month
+
'_'
+
day
+
'_'
+
hour
+
'_'
+
minute
+
'_'
+
second
;
return
year
+
'_'
+
month
+
'_'
+
day
+
'_'
+
hour
+
'_'
+
minute
+
'_'
+
second
;
},
//获取团期信息
getTeamInfo
()
{
...
...
src/components/administrative/ApprovalProcess.vue
View file @
4ca22c56
...
...
@@ -23,7 +23,7 @@
<div
class=
"approval_layer_info"
v-if=
"approvalType==2"
>
<div
class=
"normalMember"
>
<ul>
<li
v-for=
"item in showMember"
>
{{
item
.
DepartmentName
}}
</li>
<!-- @click="mySetCheckedKeys(item.DepartmentId)"--
>
<li
v-for=
"item in showMember"
>
{{
item
.
DepartmentName
}}
</li
>
</ul>
</div>
<input
type=
"button"
class=
"normalBtn"
@
click=
"getMember(),mySetCheckedKeys(-1)"
value=
"添加成员"
/>
...
...
@@ -48,7 +48,6 @@
</el-radio-group>
</div>
</div>
</div>
<div
class=
"approval_page_layer_bottom"
>
<input
type=
"button"
class=
"hollowFixedBtn"
value=
"取消"
@
click=
"closeLayer"
/>
...
...
@@ -57,19 +56,22 @@
</div>
</div>
</div>
<input
type=
"button"
class=
"hollowFixedBtn approval_back_btn"
value=
"返回"
@
click=
"goback"
/>
<input
type=
"button"
class=
"hollowFixedBtn approval_back_btn"
value=
"返回"
@
click=
"goback"
/>
<div
class=
"approval_page_content"
v-loading=
"loading"
>
<p
style=
"text-align: center; border-bottom:1px solid #f1f1f1; padding: 15px 0 10px 0;font-size: 16px;"
>
{{
TemplateTypeName
}}
流程设置
</p>
<p
style=
"text-align: center; border-bottom:1px solid #f1f1f1; padding: 15px 0 10px 0;font-size: 16px;"
>
{{
TemplateTypeName
}}
流程设置
</p>
<div
class=
"approval_page_title"
>
默认审批流程
</div>
<div
class=
"approval_person_content"
>
<span
class=
"approval_span_type"
>
默认审批人
</span>
<div
class=
"approval_person_list fl"
>
<div
class=
"approval_process_item"
draggable=
"true"
v-for=
"(item,index) in myAuditList"
@
click=
"getItemValue(item,index)"
>
<div
class=
"approval_process_item"
draggable=
"true"
v-for=
"(item,index) in myAuditList"
@
click=
"getItemValue(item,index)"
>
<span
style=
"position: relative;"
@
mouseenter=
"itemIndex=index"
@
mouseleave=
"itemIndex='-1'"
>
<i
class=
"iconfont icon-user11"
></i>
{{
item
.
AuditDescription
}}
<b
class=
"bnotice"
v-if=
"item.AuditWay!=1"
>
(
{{
item
.
AuditWay
==
"2"
?
'会签'
:
'或签'
}}
)
</b>
<em
v-if=
'index==itemIndex'
class=
"iconfont icon-guanbi approval_process_item_delete"
@
click
.
stop=
'deleteItem(item.Sort)'
></em>
<em
v-if=
'index==itemIndex'
class=
"iconfont icon-guanbi approval_process_item_delete"
@
click
.
stop=
'deleteItem(item.Sort)'
></em>
</span>
<i
class=
"iconfont icon-jiantouyou"
></i>
</div>
...
...
@@ -83,10 +85,11 @@
<span
style=
"position: relative;"
@
mouseenter=
"itemIndex1=index"
@
mouseleave=
"itemIndex1='-1'"
>
<i
class=
"iconfont icon-user11"
></i>
{{
item
.
EmName
}}
<em
v-if=
'index==itemIndex1'
@
click=
"deleteUser(item.EmployeeId)"
class=
"iconfont icon-guanbi approval_process_item_delete"
></em>
<em
v-if=
'index==itemIndex1'
@
click=
"deleteUser(item.EmployeeId)"
class=
"iconfont icon-guanbi approval_process_item_delete"
></em>
</span>
</div>
<input
type=
"button"
class=
"hollowFixedBtn"
value=
"添加"
@
click=
'addAuditUser'
/>
<input
type=
"button"
class=
"hollowFixedBtn"
value=
"添加"
@
click=
'addAuditUser'
/>
</div>
</div>
...
...
@@ -99,7 +102,8 @@
<div>
<div
class=
"processOtherDiv"
v-for=
"(item,index) in otherList"
@
click=
"goUrl('updateProcessDesign',item.Id)"
>
<p
style=
"background: #f1f1f1; padding: 10px 30px;"
>
{{
item
.
Description
}}
<span
class=
"fr processOtherdelSpan"
style=
"margin-left: 10px;"
@
click
.
stop=
"deleteOtherProcess(item.Id)"
>
删除
</span>
<span
class=
"fr processOtherdelSpan"
style=
"margin-left: 10px;"
@
click
.
stop=
"deleteOtherProcess(item.Id)"
>
删除
</span>
<span
class=
"fr processOtherdelSpan"
>
修改
</span>
</p>
<div
style=
"padding: 0 30px;"
>
...
...
@@ -134,14 +138,8 @@
<p
style=
"margin: 0 0 10px 0;"
>
选择:
<el-input
class=
'w200'
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
>
</el-input>
</p>
<el-tree
class=
'ApprovalProcessBg'
:data=
"memberList"
show-checkbox
:filter-node-method=
"filterNode"
ref=
"tree"
:props=
"defaultProps"
:render-after-expand=
"false"
node-key=
"DepartmentId"
@
check-change=
"handleNodeChange"
>
<el-tree
class=
'ApprovalProcessBg'
:data=
"memberList"
show-checkbox
:filter-node-method=
"filterNode"
ref=
"tree"
:props=
"defaultProps"
:render-after-expand=
"false"
node-key=
"DepartmentId"
@
check-change=
"handleNodeChange"
>
</el-tree>
</div>
<div
class=
"fl"
>
...
...
@@ -163,14 +161,8 @@
<p
style=
"margin: 0 0 10px 0;"
>
选择岗位:
<el-input
class=
'w200'
placeholder=
"输入关键字进行过滤"
v-model=
"filterText1"
>
</el-input>
</p>
<el-tree
class=
'ApprovalProcessBg'
:data=
"roleList"
ref=
"treeRole"
show-checkbox
:filter-node-method=
"filterNode1"
:props=
"defaultProps1"
@
check-change=
"checkedRole"
>
<el-tree
class=
'ApprovalProcessBg'
:data=
"roleList"
ref=
"treeRole"
show-checkbox
:filter-node-method=
"filterNode1"
:props=
"defaultProps1"
@
check-change=
"checkedRole"
>
</el-tree>
</div>
<div
class=
"fl"
>
...
...
@@ -192,14 +184,8 @@
<p
style=
"margin: 0 0 10px 0;"
>
选择抄送人:
<el-input
class=
'w200'
placeholder=
"输入关键字进行过滤"
v-model=
"filterText2"
>
</el-input>
</p>
<el-tree
class=
'ApprovalProcessBg'
:data=
"userList"
show-checkbox
:filter-node-method=
"filterNode2"
ref=
"treeUser"
:props=
"defaultProps2"
:render-after-expand=
"false"
node-key=
"DepartmentId"
<el-tree
class=
'ApprovalProcessBg'
:data=
"userList"
show-checkbox
:filter-node-method=
"filterNode2"
ref=
"treeUser"
:props=
"defaultProps2"
:render-after-expand=
"false"
node-key=
"DepartmentId"
@
check-change=
"handleNodeChange1"
>
</el-tree>
</div>
...
...
@@ -216,8 +202,6 @@
<button
class=
"normalBtn"
type=
"primary"
@
click=
"saveAuditUser"
>
确定
</button>
</div>
</el-dialog>
</div>
</
template
>
...
...
@@ -225,9 +209,9 @@
export
default
{
data
()
{
return
{
filterText
:
""
,
filterText1
:
""
,
filterText2
:
""
,
filterText
:
""
,
filterText1
:
""
,
filterText2
:
""
,
defaultProps
:
{
children
:
'ChildList'
,
label
:
'DepartmentName'
,
...
...
@@ -266,56 +250,56 @@
label
:
'第6级主管'
},
],
TemplateType
:
''
,
addBtn
:
true
,
loading
:
true
,
TemplateType
:
''
,
addBtn
:
true
,
loading
:
true
,
dialogTitle
:
''
,
outerVisible
:
false
,
outerVisible1
:
false
,
outerVisible2
:
false
,
outerVisible
:
false
,
outerVisible1
:
false
,
outerVisible2
:
false
,
itemIndex
:
-
1
,
itemIndex1
:
-
1
,
approvalType
:
1
,
showlayer
:
false
,
isTransition
:
false
,
updateItem
:
[],
updateItemIndex
:
-
1
,
//修改节点
TemplateId
:
''
,
addMsg
:
{
Id
:
''
,
TemplateId
:
''
,
AuditList
:
[],
AuditUserList
:
[],
ConditionSortList
:[],
Sort
:
''
,
updateItem
:
[],
updateItemIndex
:
-
1
,
//修改节点
TemplateId
:
''
,
addMsg
:
{
Id
:
''
,
TemplateId
:
''
,
AuditList
:
[],
AuditUserList
:
[],
ConditionSortList
:
[],
Sort
:
''
,
},
zgObj
:
{
AuditDescription
:
''
,
RoleOrInitiator
:
'1'
,
AuditType
:
''
,
AuditUserList
:
[],
AuditWay
:
2
,
AuditWay
:
2
,
Sort
:
''
,
},
tempChosenId
:
-
1
,
//返回数据
TemplateTypeName
:
''
,
TemplateTypeName
:
''
,
myAuditList
:
[],
myAuditUserList
:
[],
myAuditUserList1
:
[],
myAuditUserList1
:
[],
memberList
:
[],
sysUserKeys
:
[],
userList
:
[],
sysUserKeys
:
[],
userList
:
[],
roleList
:
[],
checkedMember
:
[],
showMember
:
[],
showRole
:
[],
showRole
:
[],
memberSetCheckedKeys
:
[],
memberSetCheckedUserKeys
:
[],
memberSetCheckedUserKeys
:
[],
normalMember
:
[],
otherList
:
[],
otherListSpr
:
[],
otherListCsr
:
[],
otherList
:
[],
otherListSpr
:
[],
otherListCsr
:
[],
}
},
watch
:
{
...
...
@@ -342,96 +326,100 @@
if
(
!
value
)
return
true
;
return
data
.
DepartmentName
.
indexOf
(
value
)
!==
-
1
;
},
deleteOtherProcess
(
id
)
{
deleteOtherProcess
(
id
)
{
this
.
$confirm
(
'是否删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipost
(
'WorkFlow_post_DelOtherCondition'
,{
ConditionId
:
id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
apipost
(
'WorkFlow_post_DelOtherCondition'
,
{
ConditionId
:
id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'删除成功!'
);
this
.
getOtherList
()
}
},
err
=>
{})
},
err
=>
{})
}).
catch
(()
=>
{
this
.
$message
.
info
(
'已取消删除!'
);
});
},
addAppPerson
()
{
this
.
approvalType
=
1
;
this
.
addBtn
=
true
;
addAppPerson
()
{
this
.
approvalType
=
1
;
this
.
addBtn
=
true
;
this
.
showLayer
();
},
deleteUser
(
id
)
{
if
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
id
)
!=-
1
)
{
deleteUser
(
id
)
{
if
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
id
)
!=
-
1
)
{
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
id
),
1
)
}
if
(
this
.
myAuditUserList
.
findIndex
(
item
=>
item
.
EmployeeId
===
id
)
!=-
1
)
{
if
(
this
.
myAuditUserList
.
findIndex
(
item
=>
item
.
EmployeeId
===
id
)
!=
-
1
)
{
this
.
myAuditUserList
.
splice
(
this
.
myAuditUserList
.
findIndex
(
item
=>
item
.
EmployeeId
===
id
),
1
)
}
if
(
this
.
myAuditUserList1
.
findIndex
(
item
=>
item
.
EmployeeId
===
id
)
!=-
1
)
{
if
(
this
.
myAuditUserList1
.
findIndex
(
item
=>
item
.
EmployeeId
===
id
)
!=
-
1
)
{
this
.
myAuditUserList1
.
splice
(
this
.
myAuditUserList1
.
findIndex
(
item
=>
item
.
EmployeeId
===
id
),
1
)
}
},
addAuditUser
()
{
let
_arr
=
this
.
sysUserKeys
.
concat
(
this
.
memberSetCheckedUserKeys
)
addAuditUser
()
{
let
_arr
=
this
.
sysUserKeys
.
concat
(
this
.
memberSetCheckedUserKeys
)
this
.
dialogTitle
=
'选择人员'
;
this
.
outerVisible2
=
true
;
let
_this
=
this
;
this
.
outerVisible2
=
true
;
let
_this
=
this
;
this
.
apipost
(
'WorkFlow_get_GetDepartMentEmployee'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
userList
=
res
.
data
.
data
_this
.
$refs
.
treeUser
.
setCheckedKeys
(
_arr
);
}
},
err
=>
{})
},
saveAuditUser
()
{
if
(
this
.
myAuditUserList1
.
length
<=
10
)
{
this
.
myAuditUserList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
myAuditUserList1
))
saveAuditUser
()
{
if
(
this
.
myAuditUserList1
.
length
<=
10
)
{
this
.
myAuditUserList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
myAuditUserList1
))
this
.
outerVisible2
=
false
}
else
{
}
else
{
this
.
$message
.
error
(
'人数不能超过10人'
)
return
false
;
}
},
clearValue
(
value
)
{
if
(
value
==
'1'
)
{
this
.
zgObj
.
RoleOrInitiator
=
'1'
clearValue
(
value
)
{
if
(
value
==
'1'
)
{
this
.
zgObj
.
RoleOrInitiator
=
'1'
}
if
(
value
==
'2'
)
{
this
.
showMember
=
[];
this
.
memberSetCheckedKeys
=
[];
if
(
value
==
'2'
)
{
this
.
showMember
=
[];
this
.
memberSetCheckedKeys
=
[];
}
if
(
value
==
'3'
)
{
this
.
showRole
=
[]
this
.
zgObj
.
AuditWay
=
2
if
(
value
==
'3'
)
{
this
.
showRole
=
[]
this
.
zgObj
.
AuditWay
=
2
}
},
getList
()
{
this
.
apipost
(
'WorkFlow_get_GetDefaultCondition'
,
{
TemplateId
:
this
.
TemplateId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
loading
=
false
this
.
addMsg
.
Id
=
res
.
data
.
data
.
Id
this
.
myAuditList
=
res
.
data
.
data
.
AuditList
==
null
?[]:
res
.
data
.
data
.
AuditList
this
.
myAuditUserList
=
res
.
data
.
data
.
AuditUserList
==
null
?[]:
res
.
data
.
data
.
AuditUserList
this
.
apipost
(
'WorkFlow_get_GetDefaultCondition'
,
{
TemplateId
:
this
.
TemplateId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
loading
=
false
this
.
addMsg
.
Id
=
res
.
data
.
data
.
Id
this
.
myAuditList
=
res
.
data
.
data
.
AuditList
==
null
?
[]
:
res
.
data
.
data
.
AuditList
this
.
myAuditUserList
=
res
.
data
.
data
.
AuditUserList
==
null
?
[]
:
res
.
data
.
data
.
AuditUserList
this
.
myAuditUserList1
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
myAuditUserList
))
this
.
myAuditUserList1
.
forEach
(
item
=>
{
this
.
myAuditUserList1
.
forEach
(
item
=>
{
this
.
sysUserKeys
.
push
(
item
.
EmployeeId
)
})
this
.
TemplateTypeName
=
res
.
data
.
data
.
TemplateTypeName
this
.
TemplateType
=
res
.
data
.
data
.
TemplateType
;
this
.
TemplateTypeName
=
res
.
data
.
data
.
TemplateTypeName
this
.
TemplateType
=
res
.
data
.
data
.
TemplateType
;
}
else
{}
},
error
=>
{})
},
getOtherList
(){
this
.
apipost
(
'WorkFlow_get_GetOtherConditionList'
,
{
TemplateId
:
this
.
TemplateId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
otherList
=
res
.
data
.
data
this
.
otherListSpr
=
res
.
data
.
data
.
AuditList
getOtherList
()
{
this
.
apipost
(
'WorkFlow_get_GetOtherConditionList'
,
{
TemplateId
:
this
.
TemplateId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
otherList
=
res
.
data
.
data
this
.
otherListSpr
=
res
.
data
.
data
.
AuditList
}
else
{}
},
error
=>
{})
},
...
...
@@ -451,15 +439,15 @@
},
handleNodeChange1
(
data
,
checked
)
{
data
.
IsCheck
=
checked
;
if
(
data
.
Type
==
2
&&
data
.
IsCheck
)
{
//是员工且选中
if
(
data
.
Type
==
2
&&
data
.
IsCheck
)
{
//是员工且选中
let
isExsit
=
false
this
.
myAuditUserList1
.
forEach
(
x
=>
{
if
(
x
.
EmployeeId
==
data
.
DepartmentId
)
{
if
(
x
.
EmployeeId
==
data
.
DepartmentId
)
{
isExsit
=
true
return
false
}
})
if
(
!
isExsit
)
{
if
(
!
isExsit
)
{
this
.
myAuditUserList1
.
push
({
EmName
:
data
.
DepartmentName
,
EmployeeId
:
data
.
DepartmentId
,
...
...
@@ -467,71 +455,76 @@
})
this
.
memberSetCheckedUserKeys
.
push
(
data
.
DepartmentId
)
}
}
else
if
(
data
.
Type
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
myAuditUserList1
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
DepartmentId
)
!=
-
1
)
{
this
.
myAuditUserList1
.
splice
(
this
.
myAuditUserList1
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
DepartmentId
),
1
)
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
),
1
)
if
(
this
.
myAuditUserList1
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
ParentId
)
!=
-
1
)
{
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
ParentId
),
1
)
}
else
if
(
data
.
Type
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
myAuditUserList1
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
DepartmentId
)
!=
-
1
)
{
this
.
myAuditUserList1
.
splice
(
this
.
myAuditUserList1
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
DepartmentId
),
1
)
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
),
1
)
if
(
this
.
myAuditUserList1
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
ParentId
)
!=
-
1
)
{
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
ParentId
),
1
)
}
}
}
if
(
data
.
Type
!=
2
&&
data
.
IsCheck
)
{
if
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
)
==
-
1
)
{
if
(
data
.
Type
!=
2
&&
data
.
IsCheck
)
{
if
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
)
==
-
1
)
{
this
.
memberSetCheckedUserKeys
.
push
(
data
.
DepartmentId
)
}
}
else
if
(
data
.
Type
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
)
!=
-
1
)
{
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
),
1
)
if
(
this
.
myAuditUserList1
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
ParentId
)
!=
-
1
)
{
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
ParentId
),
1
)
}
else
if
(
data
.
Type
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
)
!=
-
1
)
{
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
),
1
)
if
(
this
.
myAuditUserList1
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
ParentId
)
!=
-
1
)
{
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
ParentId
),
1
)
}
}
}
},
handleNodeChange
(
data
,
checked
)
{
data
.
IsCheck
=
checked
;
if
(
data
.
Type
==
2
&&
data
.
IsCheck
)
{
//是员工且选中
if
(
data
.
Type
==
2
&&
data
.
IsCheck
)
{
//是员工且选中
let
isExsit
=
false
this
.
showMember
.
forEach
(
x
=>
{
if
(
x
.
DepartmentId
==
data
.
DepartmentId
)
{
if
(
x
.
DepartmentId
==
data
.
DepartmentId
)
{
isExsit
=
true
return
false
}
})
if
(
!
isExsit
)
{
if
(
!
isExsit
)
{
this
.
showMember
.
push
({
DepartmentName
:
data
.
DepartmentName
,
DepartmentId
:
data
.
DepartmentId
})
this
.
memberSetCheckedKeys
.
push
(
data
.
DepartmentId
)
}
}
else
if
(
data
.
Type
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DepartmentId
===
data
.
DepartmentId
)
!=
-
1
)
{
}
else
if
(
data
.
Type
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DepartmentId
===
data
.
DepartmentId
)
!=
-
1
)
{
this
.
showMember
.
splice
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DepartmentId
===
data
.
DepartmentId
),
1
)
this
.
memberSetCheckedKeys
.
splice
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
),
1
)
if
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DepartmentId
===
data
.
ParentId
)
!=
-
1
)
{
if
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DepartmentId
===
data
.
ParentId
)
!=
-
1
)
{
this
.
memberSetCheckedKeys
.
splice
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
ParentId
),
1
)
}
}
}
if
(
data
.
Type
!=
2
&&
data
.
IsCheck
)
{
if
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
)
==
-
1
)
{
if
(
data
.
Type
!=
2
&&
data
.
IsCheck
)
{
if
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
)
==
-
1
)
{
this
.
memberSetCheckedKeys
.
push
(
data
.
DepartmentId
)
}
}
else
if
(
data
.
Type
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
)
!=
-
1
)
{
}
else
if
(
data
.
Type
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
)
!=
-
1
)
{
this
.
memberSetCheckedKeys
.
splice
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
),
1
)
if
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DepartmentId
===
data
.
ParentId
)
!=
-
1
)
{
if
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DepartmentId
===
data
.
ParentId
)
!=
-
1
)
{
this
.
memberSetCheckedKeys
.
splice
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
ParentId
),
1
)
}
}
}
},
mySetCheckedKeys
(
id
)
{
if
(
this
.
memberSetCheckedKeys
.
length
==
0
)
if
(
this
.
memberSetCheckedKeys
.
length
==
0
)
return
if
(
id
==
-
1
)
{
if
(
id
==
-
1
)
{
this
.
$refs
.
tree
.
setCheckedKeys
(
this
.
memberSetCheckedKeys
)
return
}
...
...
@@ -539,34 +532,36 @@
this
.
memberSetCheckedKeys
.
splice
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
id
),
1
)
this
.
$refs
.
tree
.
setCheckedKeys
(
this
.
memberSetCheckedKeys
);
},
mySetCheckedUsersKeys
()
{
mySetCheckedUsersKeys
()
{
},
checkedRole
(
data
,
checked
)
{
checkedRole
(
data
,
checked
)
{
data
.
IsCheck
=
checked
;
if
(
data
.
Disabled
==
false
&&
data
.
IsCheck
){
this
.
showRole
=
[];
this
.
showRole
.
push
({
DepartmentName
:
data
.
DepartmentName
,
Id
:
data
.
DepartmentId
})
if
(
data
.
Disabled
==
false
&&
data
.
IsCheck
)
{
this
.
showRole
=
[];
this
.
showRole
.
push
({
DepartmentName
:
data
.
DepartmentName
,
Id
:
data
.
DepartmentId
})
}
},
deleteItem
(
sort
)
{
this
.
myAuditList
.
splice
(
this
.
myAuditList
.
findIndex
(
item
=>
item
.
Sort
===
sort
),
1
)
},
getItemValue
(
obj
,
index
)
{
this
.
addBtn
=
false
;
this
.
updateItemIndex
=
index
;
this
.
updateItem
=
obj
;
getItemValue
(
obj
,
index
)
{
this
.
addBtn
=
false
;
this
.
updateItemIndex
=
index
;
this
.
updateItem
=
obj
;
this
.
showLayer
();
this
.
approvalType
=
obj
.
AuditType
;
if
(
obj
.
AuditType
==
1
)
{
this
.
zgObj
.
RoleOrInitiator
=
obj
.
RoleOrInitiator
.
toString
();
}
if
(
obj
.
AuditType
==
2
)
{
this
.
showMember
=
[];
this
.
memberSetCheckedKeys
=
[];
this
.
zgObj
.
AuditWay
=
obj
.
AuditWay
;
obj
.
AuditUserList
.
forEach
((
item
,
index
)
=>
{
this
.
approvalType
=
obj
.
AuditType
;
if
(
obj
.
AuditType
==
1
)
{
this
.
zgObj
.
RoleOrInitiator
=
obj
.
RoleOrInitiator
.
toString
();
}
if
(
obj
.
AuditType
==
2
)
{
this
.
showMember
=
[];
this
.
memberSetCheckedKeys
=
[];
this
.
zgObj
.
AuditWay
=
obj
.
AuditWay
;
obj
.
AuditUserList
.
forEach
((
item
,
index
)
=>
{
this
.
showMember
.
push
({
DepartmentName
:
item
.
EmName
,
DepartmentId
:
item
.
EmployeeId
...
...
@@ -574,24 +569,25 @@
this
.
memberSetCheckedKeys
.
push
(
item
.
EmployeeId
)
})
}
if
(
obj
.
AuditType
==
3
){
this
.
zgObj
.
AuditWay
=
obj
.
AuditWay
;
this
.
showRole
=
[];
this
.
showRole
.
push
({
DepartmentName
:
obj
.
AuditDescription
})
if
(
obj
.
AuditType
==
3
)
{
this
.
zgObj
.
AuditWay
=
obj
.
AuditWay
;
this
.
showRole
=
[];
this
.
showRole
.
push
({
DepartmentName
:
obj
.
AuditDescription
})
}
},
saveUpdateNode
()
{
saveUpdateNode
()
{
let
zg
=
{}
if
(
this
.
approvalType
==
1
)
{
if
(
this
.
approvalType
==
1
)
{
zg
.
AuditType
=
1
;
zg
.
AuditWay
=
1
;
zg
.
AuditUserList
=
[],
zg
.
AuditUserList
=
[],
zg
.
Sort
=
this
.
myAuditList
.
length
+
1
;
zg
.
RoleOrInitiator
=
this
.
zgObj
.
RoleOrInitiator
let
obj
=
{}
if
(
this
.
tempChosenId
!=
-
1
)
{
if
(
this
.
tempChosenId
!=
-
1
)
{
obj
=
this
.
zgList
.
find
((
item
)
=>
{
return
item
.
value
===
this
.
tempChosenId
;
})
...
...
@@ -599,22 +595,22 @@
}
else
{
zg
.
AuditDescription
=
'直接主管'
}
this
.
myAuditList
[
this
.
updateItemIndex
]
=
zg
;
this
.
myAuditList
[
this
.
updateItemIndex
]
=
zg
;
}
if
(
this
.
approvalType
==
2
)
{
//指定成员
if
(
this
.
approvalType
==
2
)
{
//指定成员
let
Au
=
this
.
showMember
;
let
Auu
=
[];
Au
.
forEach
((
item
,
index
)
=>
{
Auu
.
push
({
EmployeeId
:
item
.
DepartmentId
,
EmName
:
item
.
DepartmentName
,
EmName
:
item
.
DepartmentName
,
Sort
:
index
})
})
if
(
Auu
.
length
==
1
)
{
if
(
Auu
.
length
==
1
)
{
zg
.
AuditWay
=
1
zg
.
AuditDescription
=
Auu
[
0
].
EmName
}
else
if
(
Auu
.
length
>
1
)
{
}
else
if
(
Auu
.
length
>
1
)
{
zg
.
AuditWay
=
this
.
zgObj
.
AuditWay
;
zg
.
AuditDescription
=
'指定'
+
this
.
showMember
.
length
+
'人'
}
...
...
@@ -622,35 +618,33 @@
zg
.
RoleOrInitiator
=
'-1'
;
zg
.
Sort
=
this
.
myAuditList
.
length
+
1
;
zg
.
AuditUserList
=
Auu
;
if
(
Auu
.
length
==
0
)
{
if
(
Auu
.
length
==
0
)
{
this
.
$message
.
error
(
"成员不能为空"
)
return
}
else
if
(
Auu
.
length
>
10
)
{
}
else
if
(
Auu
.
length
>
10
)
{
this
.
$message
.
error
(
"人数不能超过10人!"
)
return
}
this
.
myAuditList
[
this
.
updateItemIndex
]
=
zg
;
this
.
myAuditList
[
this
.
updateItemIndex
]
=
zg
;
}
if
(
this
.
approvalType
==
3
)
{
//岗位
zg
.
AuditType
=
3
;
if
(
this
.
approvalType
==
3
)
{
//岗位
zg
.
AuditType
=
3
;
zg
.
AuditWay
=
this
.
zgObj
.
AuditWay
;
zg
.
Sort
=
this
.
myAuditList
.
length
+
1
;
zg
.
AuditUserList
=
''
;
if
(
this
.
showRole
.
length
==
0
)
{
zg
.
AuditUserList
=
''
;
if
(
this
.
showRole
.
length
==
0
)
{
this
.
$message
.
error
(
"请选择岗位"
)
return
}
else
{
zg
.
RoleOrInitiator
=
this
.
showRole
[
0
].
Id
;
zg
.
AuditDescription
=
this
.
showRole
[
0
].
DepartmentName
;
}
else
{
zg
.
RoleOrInitiator
=
this
.
showRole
[
0
].
Id
;
zg
.
AuditDescription
=
this
.
showRole
[
0
].
DepartmentName
;
}
this
.
myAuditList
[
this
.
updateItemIndex
]
=
zg
;
this
.
myAuditList
[
this
.
updateItemIndex
]
=
zg
;
}
this
.
closeLayer
()
},
deleteRole
()
{
this
.
showRole
=
[];
deleteRole
()
{
this
.
showRole
=
[];
},
changeValue
(
value
)
{
this
.
tempChosenId
=
value
...
...
@@ -658,15 +652,15 @@
addNode
()
{
//data>>AuditList>>AuditType 核人类型 1主管(指定一级) 2 指定成员 3角色
let
zg
=
{}
if
(
this
.
approvalType
==
1
)
//主管
if
(
this
.
approvalType
==
1
)
//主管
{
zg
.
AuditType
=
1
;
zg
.
AuditWay
=
1
;
zg
.
AuditUserList
=
[],
zg
.
AuditUserList
=
[],
zg
.
Sort
=
this
.
myAuditList
.
length
+
1
;
zg
.
RoleOrInitiator
=
this
.
zgObj
.
RoleOrInitiator
let
obj
=
{}
if
(
this
.
tempChosenId
!=
-
1
)
{
if
(
this
.
tempChosenId
!=
-
1
)
{
obj
=
this
.
zgList
.
find
((
item
)
=>
{
return
item
.
value
===
this
.
tempChosenId
;
})
...
...
@@ -676,20 +670,20 @@
}
this
.
myAuditList
.
push
(
zg
);
}
if
(
this
.
approvalType
==
2
)
{
//指定成员
if
(
this
.
approvalType
==
2
)
{
//指定成员
let
Au
=
this
.
showMember
;
let
Auu
=
[];
Au
.
forEach
((
item
,
index
)
=>
{
Auu
.
push
({
EmployeeId
:
item
.
DepartmentId
,
EmName
:
item
.
DepartmentName
,
EmName
:
item
.
DepartmentName
,
Sort
:
index
})
})
if
(
Auu
.
length
==
1
)
{
if
(
Auu
.
length
==
1
)
{
zg
.
AuditWay
=
1
zg
.
AuditDescription
=
Auu
[
0
].
EmName
}
else
if
(
Auu
.
length
>
1
)
{
}
else
if
(
Auu
.
length
>
1
)
{
zg
.
AuditWay
=
this
.
zgObj
.
AuditWay
;
zg
.
AuditDescription
=
'指定'
+
this
.
showMember
.
length
+
'人'
}
...
...
@@ -697,11 +691,10 @@
zg
.
RoleOrInitiator
=
'-1'
;
zg
.
Sort
=
this
.
myAuditList
.
length
+
1
;
zg
.
AuditUserList
=
Auu
;
if
(
Auu
.
length
==
0
)
{
if
(
Auu
.
length
==
0
)
{
this
.
$message
.
error
(
"成员不能为空"
)
return
}
else
if
(
Auu
.
length
>
10
)
{
}
else
if
(
Auu
.
length
>
10
)
{
this
.
$message
.
error
(
"人数不能超过10人!"
)
return
}
...
...
@@ -709,18 +702,17 @@
this
.
myAuditList
.
push
(
zg
);
}
if
(
this
.
approvalType
==
3
)
{
//岗位
zg
.
AuditType
=
3
;
if
(
this
.
approvalType
==
3
)
{
//岗位
zg
.
AuditType
=
3
;
zg
.
AuditWay
=
this
.
zgObj
.
AuditWay
;
zg
.
Sort
=
this
.
myAuditList
.
length
+
1
;
zg
.
AuditUserList
=
''
;
if
(
this
.
showRole
.
length
==
0
)
{
zg
.
AuditUserList
=
''
;
if
(
this
.
showRole
.
length
==
0
)
{
this
.
$message
.
error
(
"请选择部门"
)
return
}
else
{
zg
.
RoleOrInitiator
=
this
.
showRole
[
0
].
Id
;
zg
.
AuditDescription
=
this
.
showRole
[
0
].
DepartmentName
;
}
else
{
zg
.
RoleOrInitiator
=
this
.
showRole
[
0
].
Id
;
zg
.
AuditDescription
=
this
.
showRole
[
0
].
DepartmentName
;
}
this
.
myAuditList
.
push
(
zg
);
}
...
...
@@ -732,29 +724,39 @@
},
closeLayer
()
{
let
_this
=
this
;
setTimeout
(
function
()
{
setTimeout
(
function
()
{
_this
.
showlayer
=
false
;
},
300
)
this
.
isTransition
=
false
;
},
saveApproval
()
{
this
.
addMsg
.
AuditList
=
this
.
myAuditList
;
this
.
addMsg
.
AuditUserList
=
this
.
myAuditUserList
;
this
.
ConditionSortList
=
[],
this
.
addMsg
.
Sort
=
0
,
this
.
loading
=
true
;
this
.
apipost
(
'WorkFlow_post_SetDefaultCondition'
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
loading
=
false
;
saveApproval
()
{
this
.
addMsg
.
AuditList
=
this
.
myAuditList
;
this
.
addMsg
.
AuditUserList
=
this
.
myAuditUserList
;
this
.
ConditionSortList
=
[],
this
.
addMsg
.
Sort
=
0
,
this
.
loading
=
true
;
this
.
apipost
(
'WorkFlow_post_SetDefaultCondition'
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
loading
=
false
;
this
.
$message
.
success
(
"操作成功!"
)
}
},
err
=>
{})
},
err
=>
{})
},
goUrl
(
path
,
id
)
{
this
.
$router
.
push
({
name
:
path
,
query
:{
"id"
:
id
}
})
goUrl
(
path
,
id
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
{
"id"
:
id
}
})
},
goback
(){
this
.
$router
.
push
({
name
:
'Approval'
,
query
:{
"Bid"
:
this
.
$route
.
query
.
Bid
}});
goback
()
{
this
.
$router
.
push
({
name
:
'Approval'
,
query
:
{
"Bid"
:
this
.
$route
.
query
.
Bid
}
});
}
},
mounted
()
{
...
...
@@ -764,22 +766,26 @@
}
}
</
script
>
<
style
>
.processOtherdelSpan
{
.processOtherdelSpan
{
color
:
#E95252
;
}
.processOtherdelSpan
:hover
{
.processOtherdelSpan
:hover
{
text-decoration
:
underline
;
}
.processOtherDiv
{
.processOtherDiv
{
font-size
:
12px
;
min-height
:
80px
;
border
:
1px
solid
#D2D2D2
;
border
:
1px
solid
#D2D2D2
;
margin-top
:
20px
;
cursor
:
pointer
;
}
.showMemberIcon
{
float
:
right
;
font-size
:
20px
;
...
...
@@ -831,7 +837,7 @@
}
.approval_page_content
i
{
color
:
#999
!important
;
color
:
#999
!important
;
}
.approval_page_layer_bottom
{
...
...
@@ -953,4 +959,5 @@
padding-left
:
20px
;
overflow
:
hidden
;
}
</
style
>
src/components/newTravelmanager/TravelGroupControl/TravelManager2.vue
View file @
4ca22c56
...
...
@@ -824,8 +824,6 @@
this
.
PostConfig
.
TripColor
=
tempData
.
LineTripColor
;
this
.
FeatureData
.
TripColor
=
tempData
.
LineTripColor
;
}
console
.
log
(
" this.PostConfig"
,
this
.
PostConfig
)
console
.
log
(
" this.FeatureData"
,
this
.
FeatureData
)
this
.
FeatureData
.
LtName
=
tempData
.
LtName
;
this
.
FeatureData
.
DayList
=
tempData
.
DayList
;
...
...
src/components/newTravelmanager/TravelGroupControl/TravelManagerThree.vue
View file @
4ca22c56
...
...
@@ -76,7 +76,7 @@
</div>
</div>
<Tripmap
v-if=
"ShowMap"
:PostConfig=
"PostConfig"
:ConfigId=
"ConfigId"
@
Cancel=
"ShowMap=false"
@
Success=
"getMapImgSuccess()"
@
saveMsg=
"
SaveData(1)"
></Tripmap>
@
saveMsg=
"ShowMap=false,
SaveData(1)"
></Tripmap>
</div>
<TravelNotice
:class=
"
{'showOther':TeamType==3}" ref="TravelNotice" id="fourAnchor" @headCallBack="getNotice"
:subArray="NoticeParameters" :NoticeData="NoticeData" v-bind:PostConfig="PostConfig"
...
...
@@ -299,10 +299,6 @@
};
},
methods
:
{
getMapImgSuccess
(
path
)
{
this
.
PostConfig
.
MapUrl
=
path
this
.
ShowMap
=
false
},
/*获取行程特色内容对象*/
getFeature
(
featureObj
)
{
this
.
PostFeature
=
featureObj
;
...
...
src/components/newTravelmanager/TravelGroupControl/UpgradedVersion/index.vue
View file @
4ca22c56
...
...
@@ -109,6 +109,7 @@
],
homeBg3
:
"https://imgfile.oytour.com/Static/NewTripFeature/homeBg3.jpg"
,
homeBg1
:
"https://imgfile.oytour.com/Static/NewTripFeature/homeBg1.jpg"
,
homeBgOz1
:
"https://imgfile.oytour.com/Static/NewTripFeature/homebgoz.jpg"
,
//欧洲线默认图
homeBg2
:
"http://imgfile.oytour.com/Static/NewTripFeature/homeBg2.jpg"
,
dinner1
:
"http://imgfile.oytour.com/Static/NewTripFeature/dinner1.jpg"
,
dinner2
:
"http://imgfile.oytour.com/Static/NewTripFeature/dinner2.jpg"
,
...
...
@@ -292,13 +293,14 @@
},
//介绍页数据
getIntroduceData
(
tripObj
,
newObj
)
{
newObj
.
ImgList
=
[
{
var
imgObj
=
{
url
:
this
.
homeBg1
,
x
:
0
,
y
:
0
,
}
];
}
if
(
this
.
FeatureData
&&
this
.
FeatureData
.
LineShortName
&&
this
.
FeatureData
.
LineShortName
.
indexOf
(
'欧洲'
)
>
-
1
)
{
newObj
.
MainName
=
"欧洲旅行家"
;
imgObj
.
url
=
this
.
homeBgOz1
;
newObj
.
MainName
=
"欧洲旅行专家"
;
newObj
.
SubName
=
'‹印象欧洲› 欧洲旅行家'
;
newObj
.
MainDesc
=
"坚持以高端旅游服务广大客户群体!我们坚信旅游是美好的体验!带您体验欧洲的四季之美,印象欧洲不断思索旅游本质,坚持旅游质量,对于旅游的专业与服务有着深刻认知!我们的用心,您一定会看的见!选择印象欧洲,会是你前往欧洲最好的选择,您一定会认同并期待您的参与,这也是我们由衷的期盼!“旅游”不是舟车劳顿的代名词~提供高档旅游产品,印象之旅有其独到的见解与坚持,这就是各位选择旅游的真正定义!来吧~如果你还在犹豫不知道该选择什么样的欧洲产品,相信印象之旅是你最棒的选择!最后并祝各位有个愉快的旅游假期!"
...
...
@@ -308,6 +310,7 @@
newObj
.
MainDesc
=
"坚持以高端旅游服务广大客户群体!我们坚信旅游是美好的体验!带您体验日本的四季之美,赏花.赏枫.赏雪并且享受怀石料理,泡露天温泉,遨游日本的秀丽山海美景!印象日本不断思索旅游本质,坚持旅游质量,对于旅游的专业与服务有着深刻体认!我们的用心,您一定会看的见!选择印象日本,会是你前往日本最好的选择,您一定会认同并期待您的参与,这也是我们由衷的期盼!“旅遊”不是舟車勞頓的代名詞~提供高档旅游产品,印象之旅有其独到的见解与坚持,这就是各位选择旅游的真正定义!来吧~如果你还在犹豫不知道该选择什么样的日本产品,相信印象之旅对是你最棒的选择!最后并祝各位有个愉快的旅游假期!"
;
}
newObj
.
ImgList
=
[
imgObj
];
},
//详情页数据
getDetailsData
(
tripObj
,
newObj
)
{
...
...
src/components/newTravelmanager/TravelGroupControl/tripmap.vue
View file @
4ca22c56
<
template
>
<div
class=
"tripmap-form marginT20"
v-if=
"PostConfig"
>
<div
class=
"tripmap-Search"
v-loading=
"
set
Loading"
>
<div
class=
"tripmap-Search"
v-loading=
"
page
Loading"
>
<div
style=
"display: flex;align-items: start; justify-content: space-between;"
>
<div
style=
"display: flex;flex-wrap: wrap; flex-grow: 1;"
>
<div
v-for=
"(x, index) in TripMapList"
:key=
"index"
class=
"row-aic"
>
...
...
@@ -8,9 +8,8 @@
filterable
>
<el-option
v-for=
"(item, i) in x.NationList"
:label=
"item.Name"
:value=
"item.ID"
:key=
"i"
></el-option>
</el-select>
<!-- class="Ht_hotelSelect" -->
<el-select
style=
"min-width: 300px;max-width: 600px;margin-left: 5px;margin-right: 5px;"
size=
"mini"
placeholder=
"选择城市"
v-model=
"x.CityListIds"
multiple
filterable
@
change=
"
get
CityListIds(x, index)"
>
placeholder=
"选择城市"
v-model=
"x.CityListIds"
multiple
filterable
@
change=
"
change
CityListIds(x, index)"
>
<el-option
v-for=
"(item, i) in x.CityListAll"
:label=
"item.Name"
:value=
"item.ID"
:key=
"i"
>
</el-option>
</el-select>
...
...
@@ -18,22 +17,16 @@
@
change=
"getColorStr"
></el-color-picker>
<div
style=
"margin-left: 5px; font-size: 23px;cursor: pointer;"
>
<i
v-if=
"TripMapList.length - 1 == index"
class=
"el-icon-circle-plus"
style=
"color: #E95252;"
@
click=
"
alterCit
y(x, index, 1)"
></i>
@
click=
"
operateCountr
y(x, index, 1)"
></i>
<i
v-if=
"index != 0"
class=
"el-icon-delete-solid"
style=
"color: gray;"
@
click=
"
alterCit
y(x, index, 0)"
></i>
@
click=
"
operateCountr
y(x, index, 0)"
></i>
</div>
</div>
</div>
<div
class=
"row-aic"
style=
"flex-shrink: 0;"
>
<div>
<span
class=
"MapImgButtom CancelMapImg"
@
click=
"Cancel"
>
取消
</span>
</div>
<div
style=
"margin-left: 20px;"
>
<span
class=
"MapImgButtom setMapImg"
@
click=
"SavePositionStr"
>
保存坐标
</span>
</div>
<div
style=
"margin-left: 20px;"
>
<span
class=
"MapImgButtom setMapImg"
@
click=
"(setLoading = true), getResultImg()"
>
生成图片
</span>
</div>
<el-button
type=
"danger"
key=
"BtnClose"
@
click=
"Cancel"
>
关闭
</el-button>
<el-button
type=
"primary"
key=
"BtnCreateImg"
:disabled=
"setLoading"
@
click=
"getResultImg()"
>
{{
btnStr
}}
</el-button>
</div>
</div>
</div>
...
...
@@ -55,13 +48,8 @@
props
:
[
"PostConfig"
,
"ConfigId"
],
data
()
{
return
{
layerIds
:
[],
sourceIds
:
[],
setLoading
:
false
,
imageUrl
:
""
,
deviceMarkers
:
[],
loadingCity
:
false
,
loading
:
false
,
pageLoading
:
false
,
TripColor
:
""
,
NationList
:
[],
searchNation
:
{
...
...
@@ -125,7 +113,8 @@
"fill-opacity"
:
0.5
},
paintRbBgList
:
[],
paintHgBgList
:
[]
paintHgBgList
:
[],
btnStr
:
'生成图片'
};
},
watch
:
{
...
...
@@ -135,9 +124,24 @@
this
.
TripMapList
.
forEach
(
x
=>
{
x
.
CityList
.
forEach
(
y
=>
{
this
.
citiesData
.
forEach
(
z
=>
{
if
(
y
.
MName
==
z
.
name
&&
y
.
Lng
)
{
if
(
y
.
MName
==
z
.
name
)
{
if
(
y
.
Lat
&&
y
.
Lng
)
{
z
.
Lng
=
y
.
Lng
;
z
.
Lat
=
y
.
Lat
;
}
else
{
//使用系统中的经纬度
var
tempCity
=
x
.
CityListAll
.
find
((
cItem
)
=>
{
return
cItem
.
ID
===
y
.
MId
;
})
if
(
tempCity
&&
tempCity
.
Lng
&&
tempCity
.
Lat
)
{
z
.
Lng
=
tempCity
.
Lng
;
z
.
Lat
=
tempCity
.
Lat
;
z
.
latitude
=
Number
(
tempCity
.
Lat
);
z
.
longitude
=
Number
(
tempCity
.
Lng
);
}
}
y
.
Lat
=
z
.
Lat
;
y
.
Lng
=
z
.
Lng
;
}
});
});
...
...
@@ -175,9 +179,7 @@
CityListAll
:
this
.
CityListAll
,
CityListIds
:
[
4
,
6
],
NationList
:
this
.
NationList
,
ColorStr
:
this
.
PostConfig
.
TripColor
?
this
.
PostConfig
.
TripColor
:
"#409eff"
,
ColorStr
:
this
.
PostConfig
.
TripColor
?
this
.
PostConfig
.
TripColor
:
"#409eff"
,
ConfigId
:
this
.
ConfigId
,
Id
:
0
,
MId
:
2
,
...
...
@@ -210,7 +212,6 @@
this
.
setPaintRbBgList
()
this
.
initMap
()
},
methods
:
{
// 初始化地图
initMap
()
{
...
...
@@ -228,13 +229,12 @@
});
this
.
map
.
addSource
(
"word-source-japan"
,
{
type
:
"geojson"
,
data
:
worldGeoJSONJapan
,
//"http://imgfile.oytour.com/MapData/japan_.geojson"
data
:
worldGeoJSONJapan
,
});
this
.
map
.
addSource
(
"word-source-Korea"
,
{
type
:
"geojson"
,
data
:
worldGeoJSONKorea
,
});
if
(
this
.
TripMapList
&&
this
.
TripMapList
.
length
>
0
&&
...
...
@@ -263,7 +263,6 @@
console
.
log
(
type
,
"1初始化---- 2数据更新"
);
// 显示国家
this
.
addCountryFillRange
();
// 获取坐标信息
await
this
.
calcCitiesGeoInfoHandler
();
// 可见范围
...
...
@@ -283,15 +282,12 @@
this
.
createLineHandler
();
//连线
await
this
.
addCountriesMaker
();
//标记国家
}
//this.addDocumentEventListener();
},
// 组装数据
//组装数据
UpdateDatas
()
{
let
listCity
=
[];
let
listCountries
=
[];
this
.
listCity
=
[];
// this.countriesData = [];
this
.
pois
=
""
;
this
.
TripMapList
.
forEach
(
x
=>
{
let
obj
=
{
...
...
@@ -332,9 +328,24 @@
this
.
TripMapList
.
forEach
(
x
=>
{
x
.
CityList
.
forEach
(
y
=>
{
this
.
citiesData
.
forEach
(
z
=>
{
if
(
y
.
MName
==
z
.
name
&&
y
.
Lng
)
{
if
(
y
.
MName
==
z
.
name
)
{
if
(
y
.
Lat
&&
y
.
Lng
)
{
z
.
Lng
=
y
.
Lng
;
z
.
Lat
=
y
.
Lat
;
}
else
{
//使用系统中的经纬度
var
tempCity
=
x
.
CityListAll
.
find
((
cItem
)
=>
{
return
cItem
.
ID
===
y
.
MId
;
})
if
(
tempCity
&&
tempCity
.
Lng
&&
tempCity
.
Lat
)
{
z
.
Lng
=
tempCity
.
Lng
;
z
.
Lat
=
tempCity
.
Lat
;
z
.
latitude
=
Number
(
tempCity
.
Lat
);
z
.
longitude
=
Number
(
tempCity
.
Lng
);
}
}
y
.
Lat
=
z
.
Lat
;
y
.
Lng
=
z
.
Lng
;
}
});
});
...
...
@@ -390,71 +401,49 @@
});
});
},
// 保存标记坐标
SavePositionStr
()
{
this
.
PostConfig
.
TripMapList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
TripMapList
));
this
.
$emit
(
'saveMsg'
)
// this.TripMapList.forEach(x => {
// x.CityList.forEach(y => {
// this.citiesData.forEach(z => {
// if (y.MName == z.name) {
// y.Lng = z.Lng;
// y.Lat = z.Lat;
// }
// });
// });
// this.countriesData.forEach(y => {
// if (x.MName == y.name) {
// x.Lng = y.Lng;
// x.Lat = y.Lat;
// }
// });
// });
},
// 导出地图片
getResultImg
()
{
this
.
btnStr
=
"生成中.."
;
this
.
setLoading
=
true
;
this
.
pageLoading
=
true
;
let
that
=
this
;
var
postJson
=
{
ConfigId
:
this
.
ConfigId
};
this
.
imageUrl
=
this
.
map
.
getCanvas
().
toDataURL
(
"image/png"
);
let
mapCanvas
=
document
.
querySelector
(
".mapboxgl-canvas"
);
// mapCanvas.style.display = "none";
html2Canvas
(
document
.
getElementById
(
"trip_map"
)).
then
(
function
(
canvas
)
{
var
image
=
document
.
createElement
(
"a"
);
//image.href = canvas.toDataURL("image/jpeg").replace("image/jpeg", "image/octet-stream");
var
trip_map_obj
=
document
.
getElementById
(
"trip_map"
);
html2Canvas
(
trip_map_obj
).
then
(
function
(
canvas
)
{
var
image
=
document
.
createElement
(
"a"
);
image
.
href
=
canvas
.
toDataURL
(
"image/png"
);
let
blob
=
that
.
base64ToBlob
(
image
.
href
);
let
newArr
=
[];
newArr
.
push
(
blob
);
var
path
=
`/Upload/Temporary`
;
that
.
uploadSelfBlob
(
path
,
newArr
,
postJson
,
x
=>
{
that
.
pageLoading
=
false
;
that
.
btnStr
=
"生成图片"
;
if
(
x
.
data
.
StatusCode
==
1
)
{
that
.
SavePositionStr
()
that
.
setLoading
=
false
;
let
allPath
=
that
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
;
that
.
PostConfig
.
Mapurl
=
allPath
;
that
.
$emit
(
"Success"
,
allPath
);
//调用父页面保存方法
that
.
PostConfig
.
TripMapList
=
JSON
.
parse
(
JSON
.
stringify
(
that
.
TripMapList
));
that
.
$emit
(
'saveMsg'
);
}
else
{
that
.
setLoading
=
false
;
}
});
return
;
image
.
download
=
"map.png"
;
image
.
click
();
});
},
//关闭地图弹窗
Cancel
()
{
this
.
$emit
(
"Cancel"
);
},
// 获取国家
async
getAddress
(
Type
)
{
this
.
loading
=
true
;
await
this
.
apipost
(
"dict_get_Destination_GetCityExtList"
,
this
.
searchNation
,
res
=>
{
this
.
loading
=
false
;
if
(
Type
==
1
)
{
this
.
NationList
=
res
.
data
.
data
;
this
.
NationList
.
forEach
(
x
=>
{
...
...
@@ -464,17 +453,16 @@
this
.
TripMapList
.
forEach
(
x
=>
{
x
.
NationList
=
res
.
data
.
data
;
});
this
.
$forceUpdate
();
}
},
err
=>
{}
);
},
//
添加、删除
alterCit
y
(
x
,
index
,
type
)
{
//
添加、删除国家(type=1,新增,0-删除)
operateCountr
y
(
x
,
index
,
type
)
{
let
obj
=
{
CityList
:
[],
CityListAll
:
[],
CityListAll
:
[],
//国家城市下来列表
CityListIds
:
[],
NationList
:
x
.
NationList
,
ColorStr
:
x
.
ColorStr
,
...
...
@@ -498,10 +486,13 @@
if
(
type
)
{
this
.
TripMapList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
obj
)));
}
else
{
let
MId
=
this
.
countriesData
[
index
].
MId
;
var
currentCountry
=
this
.
countriesData
[
index
];
if
(
currentCountry
)
{
let
MId
=
currentCountry
.
MId
;
this
.
ClearSource
(
'curve-layer-'
+
MId
,
1
)
this
.
ClearSource
(
'curve-source-'
+
MId
,
2
)
this
.
ClearSource
(
'world-layer-'
+
MId
,
1
)
}
this
.
TripMapList
.
splice
(
index
,
1
);
this
.
PostConfig
.
TripMapList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
TripMapList
));
}
...
...
@@ -509,8 +500,8 @@
getColorStr
()
{
this
.
PostConfig
.
TripMapList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
TripMapList
));
},
//
城市ids
get
CityListIds
(
x
,
index
)
{
//
选择城市或移除城市
change
CityListIds
(
x
,
index
)
{
x
.
CityList
=
[];
let
obj
=
{
CityList
:
[],
...
...
@@ -546,8 +537,7 @@
this
.
$forceUpdate
();
this
.
PostConfig
.
TripMapList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
TripMapList
));
},
// 查询城市
//查询国家下面的城市
SearchCity
(
MId
,
x
,
index
)
{
if
(
x
)
{
x
.
NationList
.
forEach
(
item
=>
{
...
...
@@ -556,14 +546,11 @@
}
});
}
this
.
loadingCity
=
true
;
this
.
apipost
(
"dict_get_Destination_GetCountryCityList"
,
{
QCountry
:
MId
},
res
=>
{
this
.
loadingCity
=
false
;
this
.
CityList
=
res
.
data
.
data
;
this
.
CityList
.
forEach
(
x
=>
{
x
.
ID
=
Number
(
x
.
ID
);
...
...
@@ -579,7 +566,6 @@
let
obj
=
[
[
"=="
,
[
"get"
,
"name"
],
x
.
MName
],
this
.
getRandomColor
(),
]
})
}
});
...
...
@@ -600,11 +586,8 @@
this
.
countriesData
.
forEach
((
x
,
i
)
=>
{
if
(
x
.
MName
==
"中国"
)
x
.
name
=
"中华人民共和国"
;
if
(
x
.
MName
==
"韩国"
)
x
.
name
=
"大韩民国"
;
x
.
CityListAll
.
forEach
(
y
=>
{
})
let
source
var
paintBgObj
let
source
;
var
paintBgObj
;
if
(
x
.
MId
!=
651
&&
x
.
MId
!=
891
)
{
source
=
"word-source"
}
else
{
...
...
@@ -654,7 +637,6 @@
paint
:
paintBgObj
})
}
});
},
clearCitiesMarkersHandler
()
{
...
...
@@ -666,7 +648,6 @@
}
},
addMarker
()
{
// let markerColor = calculateComplementaryColor("#71adeb");
this
.
citiesData
.
forEach
((
item
,
i
)
=>
{
var
marker
=
new
mapboxgl
.
Marker
({
color
:
"#d73b33"
,
...
...
@@ -697,6 +678,7 @@
marker
.
setLngLat
([
item
.
longitude
,
item
.
latitude
]);
}
marker
.
addTo
(
this
.
map
);
marker
.
on
(
"dragend"
,
function
()
{
let
currentMarkerLngLat
=
marker
.
getLngLat
();
console
.
log
(
currentMarkerLngLat
,
'------currentMarkerLngLat'
)
...
...
@@ -704,7 +686,6 @@
that
.
citiesData
[
i
].
Lat
=
currentMarkerLngLat
.
lat
;
that
.
setCitiesPosition
()
});
this
.
deviceMarkers
.
push
(
marker
);
},
async
getCoordinates
(
x
)
{
...
...
@@ -712,11 +693,9 @@
const
response
=
await
fetch
(
`https://api.mapbox.com/geocoding/v5/mapbox.places/
${
x
.
PMName
}
/
${
x
.
MName
}
.json?types=place&access_token=pk.eyJ1IjoiYWxleDkwMTIiLCJhIjoiY2xtOGw4NHdkMGFndTNjcnFkeWZncGc2dyJ9.lVrAdPHE0Dg5zoWFidfj4Q`
);
if
(
!
response
.
ok
)
{
throw
new
Error
(
"网络请求失败"
);
}
const
data
=
await
response
.
json
();
if
(
data
.
features
.
length
>
0
)
{
const
[
longitude
,
latitude
]
=
data
.
features
[
0
].
center
;
...
...
@@ -745,7 +724,6 @@
);
},
createLineHandler
()
{
// let poilines = this.pois.split(",");
let
that
=
this
this
.
listCity
.
forEach
((
p
,
i
)
=>
{
if
(
i
<
this
.
listCity
.
length
-
1
)
{
...
...
@@ -785,7 +763,6 @@
paint
:
{
"line-color"
:
[
"rgba"
,
0
,
0
,
0
,
0.3
],
"line-width"
:
1.5
//'line-dasharray': [2, 4],
}
});
}
...
...
@@ -794,7 +771,6 @@
});
},
calculateBezierControlPoint
(
start
,
end
)
{
//const controlPoint1 = [start[0] + 0.3, start[1] + 0.2];
const
controlPoint1
=
[
start
[
0
]
>
end
[
0
]
?
start
[
0
]
-
0.1
:
start
[
0
]
+
0.1
,
start
[
1
]
>
end
[
1
]
?
end
[
1
]
+
0.1
:
end
[
1
]
-
0.1
...
...
@@ -813,10 +789,8 @@
end
[
0
],
end
[
1
]
);
const
numberOfPoints
=
100
;
const
bezierCoordinates
=
[];
for
(
let
i
=
0
;
i
<=
numberOfPoints
;
i
++
)
{
const
t
=
i
/
numberOfPoints
;
const
point
=
bezier
.
get
(
t
);
...
...
@@ -848,7 +822,6 @@
let
drift
=
parseInt
(
e
.
target
.
parentNode
.
getAttribute
(
"data-x-drift"
)
);
console
.
log
(
drift
);
if
(
arrow
==
"top"
)
{
marker
.
setOffset
([
0
,
-
25
]);
}
else
if
(
arrow
==
"bottom"
)
{
...
...
@@ -908,26 +881,22 @@
})
);
},
//获取国家地址
async
getCountryCoordinates
(
countryName
)
{
let
result
=
[];
try
{
const
response
=
await
fetch
(
`https://api.mapbox.com/geocoding/v5/mapbox.places/
${
countryName
}
.json?types=country&access_token=pk.eyJ1IjoiYWxleDkwMTIiLCJhIjoiY2xtOGw4NHdkMGFndTNjcnFkeWZncGc2dyJ9.lVrAdPHE0Dg5zoWFidfj4Q`
);
if
(
response
.
ok
)
{
const
data
=
await
response
.
json
();
if
(
data
.
features
.
length
>
0
)
{
const
countryInfo
=
data
.
features
.
find
(
x
=>
x
.
id
.
startsWith
(
"country."
)
);
// const bbox = countryInfo.bbox;
// const topCenterLatitude = bbox[3] + (bbox[1] - bbox[3]) / 2;
// const topCenterLongitude = bbox[0] + (bbox[2] - bbox[0]) / 2;
// result = [topCenterLongitude, topCenterLatitude];
const
[
longitude
,
latitude
]
=
countryInfo
.
center
;
result
=
[
longitude
,
latitude
];
}
else
{}
}
}
}
catch
(
error
)
{}
return
result
;
...
...
@@ -950,7 +919,6 @@
}
#trip_map
{
/* position: absolute; */
position
:
fixed
;
top
:
0
;
bottom
:
0
;
...
...
src/components/newTravelmanager/travelLineTrip/travelDaysTrip.vue
View file @
4ca22c56
...
...
@@ -591,7 +591,6 @@
//选中的景点
'ChooseScenicArray'
:
{
handler
:
function
(
val
,
oldVal
)
{
console
.
log
(
"this.ChooseScenicArray"
,
this
.
ChooseScenicArray
)
//新增
this
.
ChooseScenicArray
.
forEach
(
x
=>
{
let
isExist
=
false
;
...
...
@@ -604,7 +603,6 @@
let
scenic
=
this
.
$tripUtils
.
scenicObj
();
this
.
QScenicList
.
forEach
(
s
=>
{
if
(
s
.
ID
===
x
)
{
console
.
log
(
"scenic22"
,
s
);
scenic
.
Description
=
s
.
Feature
;
scenic
.
CouponsId
=
x
;
scenic
.
CouponsName
=
s
.
Name
;
...
...
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