Commit 471a0807 authored by youjie's avatar youjie
parents 480a52a7 8ddda635
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
</script> --> </script> -->
<!-- <script type="text/javascript" src="http://www.google.cn/maps/api/js?key=AIzaSyAZ5MIfzicStzKbIkbI3RcBBeZBjQFKsp0&libraries=geometry&language=zh_CN"></script> --> <!-- <script type="text/javascript" src="http://www.google.cn/maps/api/js?key=AIzaSyAZ5MIfzicStzKbIkbI3RcBBeZBjQFKsp0&libraries=geometry&language=zh_CN"></script> -->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=OV7BZ-ZT3HP-6W3DE-LKHM3-RSYRV-ULFZV"></script> <script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=OV7BZ-ZT3HP-6W3DE-LKHM3-RSYRV-ULFZV"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OBd2bhrqKUSbQGpniCZ996suti9YG7Bc"></script>
<script src="/static/UE/ueditor.config.js"></script> <script src="/static/UE/ueditor.config.js"></script>
<script src="/static/UE/ueditor.all.js"></script> <script src="/static/UE/ueditor.all.js"></script>
<script src="/static/UE/lang/zh-cn/zh-cn.js"></script> <script src="/static/UE/lang/zh-cn/zh-cn.js"></script>
......
...@@ -422,7 +422,8 @@ export const admin={ //行政 ...@@ -422,7 +422,8 @@ export const admin={ //行政
hotel_resourceType:'リソースタイプ',         hotel_resourceType:'リソースタイプ',        
hotel_dataReport:'データレポート',           hotel_dataReport:'データレポート',          
hotel_ReturnRoomNumber:'チエックアウト数',     hotel_ReturnRoomNumber:'チエックアウト数',    
hotel_zanwu:'暫く改訂レポート無',           hotel_zanwu:'暫く改訂レポート無',
hotel_type: '酒店类型',         
} }
export const leader = { export const leader = {
......
...@@ -468,6 +468,7 @@ export const admin={ //行政 ...@@ -468,6 +468,7 @@ export const admin={ //行政
hotel_dataReport:'資料包表', hotel_dataReport:'資料包表',
hotel_ReturnRoomNumber:'還房數量', hotel_ReturnRoomNumber:'還房數量',
hotel_zanwu:'暫無修改日誌', hotel_zanwu:'暫無修改日誌',
hotel_type: '酒店类型',
} }
export const leader = { export const leader = {
......
...@@ -470,6 +470,7 @@ export const admin={ //行政 ...@@ -470,6 +470,7 @@ export const admin={ //行政
hotel_dataReport:'数据报表', hotel_dataReport:'数据报表',
hotel_ReturnRoomNumber:'还房数量', hotel_ReturnRoomNumber:'还房数量',
hotel_zanwu:'暂无修改日志', hotel_zanwu:'暂无修改日志',
hotel_type: '酒店类型',
} }
export const leader = { export const leader = {
......
...@@ -105,6 +105,19 @@ ...@@ -105,6 +105,19 @@
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<span class="resource-lititle sheshi">{{$t('hotel.hotel_type')}}</span>
<div class="res-span">
<el-tree
:data="categoryTree"
:props="{label: 'CategoryName', children: 'SubList'}"
show-checkbox
node-key="Id"
ref="treeForm"
check-strictly
@check-change="handleNodeClick"
>
</el-tree>
</div>
</div> </div>
<div class="resource-imginfo"> <div class="resource-imginfo">
<div class="resourcerightTop"> <div class="resourcerightTop">
...@@ -290,6 +303,7 @@ ...@@ -290,6 +303,7 @@
export default { export default {
data() { data() {
return { return {
categoryTree: [],
imageOptions: { imageOptions: {
navbar: false, navbar: false,
title: false title: false
...@@ -523,6 +537,7 @@ ...@@ -523,6 +537,7 @@
this.addMsg.HotelImageList = this.HotelImageArray; this.addMsg.HotelImageList = this.HotelImageArray;
this.addMsg.DeleteImageList = this.DeleteImageArray; this.addMsg.DeleteImageList = this.DeleteImageArray;
this.addMsg.WebSiteCategoryIds = this.checkedId.join(',')
this.apipost( this.apipost(
"hotel_post_Set", "hotel_post_Set",
this.addMsg, this.addMsg,
...@@ -614,6 +629,42 @@ ...@@ -614,6 +629,42 @@
}); });
} }
}, },
initCategoryTree() {
var msg = {};
this.getDinnerList();
var _self = this;
this.apipost(
"ws_post_GetCategoryTreeList",
msg,
res => {
if (res.data.resultCode == 1) {
let categoryTree = res.data.data.filter(item => item.CategoryName === '住宿')
this.addParentId(categoryTree, [])
this.categoryTree = categoryTree
console.log('this.categoryTree', this.categoryTree)
} else {
_self.Error(res.data.message);
}
},
null
);
},
addParentId(tree, idArr) {
tree.forEach(item => {
item.ids = [...idArr, item.Id]
if(item.SubList && item.SubList.length) {
this.addParentId(item.SubList, item.ids)
}
})
},
handleNodeClick(data, checked, node) {
if(checked === true) {
console.log('data, checked, node', data, checked, node)
this.checkedId = data.ids;
this.$refs.treeForm.setCheckedKeys([data.Id]);
}
},
initHotelData() { initHotelData() {
var msg = { var msg = {
hotelID: this.hotelID hotelID: this.hotelID
...@@ -625,6 +676,8 @@ ...@@ -625,6 +676,8 @@
msg, msg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.checkedId = res.data.data.WebSiteCategoryIds
this.$refs.treeForm.setCheckedKeys([res.data.data.WebSiteCategoryIds.split(',').pop()]);
_self.addMsg = res.data.data; _self.addMsg = res.data.data;
if (_self.addMsg.Country > 0) { if (_self.addMsg.Country > 0) {
this.GetSubAreaList(_self.addMsg.Country, 1, 1); this.GetSubAreaList(_self.addMsg.Country, 1, 1);
...@@ -897,6 +950,7 @@ ...@@ -897,6 +950,7 @@
if (this.hotelID > 0) { if (this.hotelID > 0) {
this.initHotelData(); this.initHotelData();
} }
this.initCategoryTree()
} }
}; };
......
...@@ -35,6 +35,17 @@ ...@@ -35,6 +35,17 @@
.cover { .cover {
height: 30px; height: 30px;
} }
.justify-between {
justify-content: space-between;
}
</style>
<style lang="css" scoped>
#map {
width: 300px;
height: 180px;
margin-left: 20px;
border-radius: 4px;
}
</style> </style>
<template> <template>
<!--契约管理--> <!--契约管理-->
...@@ -66,7 +77,7 @@ ...@@ -66,7 +77,7 @@
<li> <li>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" <input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')"
@click="resetPageIndex(),getData()" /> @click="resetPageIndex(),getData()" />
<input type="button" class="normalBtn" @click="outerVisible=true,clearMsg()" value="新增地区" /> <input type="button" class="normalBtn" @click="outerVisible=true,clearMsg(),createMap()" value="新增地区" />
</li> </li>
</ul> </ul>
</div> </div>
...@@ -111,7 +122,7 @@ ...@@ -111,7 +122,7 @@
</el-pagination> </el-pagination>
</div> </div>
<el-dialog title="地区设置" :visible.sync="outerVisible" center width="1000px"> <el-dialog :close-on-click-modal="false" title="地区设置" :visible.sync="outerVisible" center width="1000px">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="120px"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="120px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
...@@ -151,6 +162,16 @@ ...@@ -151,6 +162,16 @@
</el-tag> </el-tag>
<i v-if="showAddArea" class="el-icon-circle-plus addIcon" style="margin-left: 10px" @click="clickArea(0, 1)"></i> <i v-if="showAddArea" class="el-icon-circle-plus addIcon" style="margin-left: 10px" @click="clickArea(0, 1)"></i>
</el-form-item> </el-form-item>
<el-form-item label="坐标" prop="LngLat">
<div class="flex justify-between">
<div>
<el-input type="text" v-model="addMsg.LngLat" @change="lngLatChange"/>
<div>请点击拾取坐标在新页面打开坐标拾取页面,将拾取的坐标复制到文本框内</div>
<!-- <iframe width="400" height="400" src="https://api.map.baidu.com/lbsapi/getpoint/"></iframe> -->
<el-button type="primary" @click="openBaiduMap">拾取坐标</el-button></div>
<div id="map"></div>
</div>
</el-form-item>
<el-form-item label="介绍" prop="Introduction"> <el-form-item label="介绍" prop="Introduction">
<el-input type="textarea" :rows="2" v-model="addMsg.Introduction" /> <el-input type="textarea" :rows="2" v-model="addMsg.Introduction" />
</el-form-item> </el-form-item>
...@@ -263,6 +284,7 @@ import uploadImg from '../../pubComponents/uploadImg' ...@@ -263,6 +284,7 @@ import uploadImg from '../../pubComponents/uploadImg'
outerVisible: false, outerVisible: false,
dataList: [], dataList: [],
addMsg: { addMsg: {
LngLat: '',
IsHot: false, IsHot: false,
Id: 0, //编号 Id: 0, //编号
Level: 0, //等级 Level: 0, //等级
...@@ -282,6 +304,56 @@ import uploadImg from '../../pubComponents/uploadImg' ...@@ -282,6 +304,56 @@ import uploadImg from '../../pubComponents/uploadImg'
this.financeinfo_post_GetList() this.financeinfo_post_GetList()
}, },
methods: { methods: {
lngLatChange() {
let lngLat = this.addMsg.LngLat.split(',')
console.log('addMsg.LngLat watcher', this.addMsg.LngLat, lngLat)
if(!lngLat[0] || !lngLat[1]) {
this.$message.error('坐标格式不对,请重新输入');
return
} else {
this.createMap(lngLat[0], lngLat[1])
let point = new BMapGL.Point(lngLat[0], lngLat[1]); // 创建点坐标
this.map.setCenter(point);
this.map.clearOverlays();
this.addMarker(lngLat[0], lngLat[1])
}
},
createMap(lng = 116.406775, lat = 39.916901) {
if (!BMapGL) {
return;
}
let map = new BMapGL.Map("map"); // 创建地图实例
this.map = map;
let pointA = new BMapGL.Point(lng, lat); // 创建点坐标
map.centerAndZoom(pointA, 12); // 初始化地图,设置中心点坐标和地图级别
if(this.addMsg.Lng) {
let point = new BMapGL.Point(this.addMsg.Lng, this.addMsg.Lat); // 创建点坐标
this.map.setCenter(point);
this.addMarker(this.addMsg.Lng, this.addMsg.Lat)
}
},
addMarker(lng, lat) {
let icon = require(`../../assets/img/marker.png`);
var myIcon = new BMapGL.Icon(icon, new BMapGL.Size(27, 32), {
// 指定定位位置。
// 当标注显示在地图上时,其所指向的地理位置距离图标左上
// 角各偏移10像素和25像素。您可以看到在本例中该位置即是
// 图标中央下端的尖角位置。
anchor: new BMapGL.Size(10, 25),
// 设置图片偏移。
// 当您需要从一幅较大的图片中截取某部分作为标注图标时,您
// 需要指定大图的偏移位置,此做法与css sprites技术类似。
// imageOffset: new BMapGL.Size(0, 0 - 25) // 设置图片偏移
});
let point = new BMapGL.Point(lng,lat); // 创建点坐标
// 创建标注对象并添加到地图
var marker = new BMapGL.Marker(point, { icon: myIcon });
this.map.addOverlay(marker);
},
openBaiduMap() {
window.open('https://api.map.baidu.com/lbsapi/getpoint/')
},
showImage(src) { showImage(src) {
this.$set(this.images, 0, src); this.$set(this.images, 0, src);
setTimeout(() => { setTimeout(() => {
...@@ -362,18 +434,24 @@ import uploadImg from '../../pubComponents/uploadImg' ...@@ -362,18 +434,24 @@ import uploadImg from '../../pubComponents/uploadImg'
this.apipost( this.apipost(
"ws_get_GetArea", { "ws_get_GetArea", {
Id: item.Id, Id: item.Id,
LeveL: item.Level,
}, },
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
var tempData = res.data.data; var tempData = res.data.data;
tempData.IsHot = tempData.IsHot === 1 tempData.IsHot = tempData.IsHot === 1
this.addMsg = tempData; this.addMsg = tempData;
this.$set(this.addMsg, "LngLat", res.data.data.Lng ? `${res.data.data.Lng},${res.data.data.Lat}` : '')
console.log('this.addMsg.LngLat', this.addMsg.LngLat)
if(!this.addMsg.BestTravelTimeList || !this.addMsg.BestTravelTimeList.length) { if(!this.addMsg.BestTravelTimeList || !this.addMsg.BestTravelTimeList.length) {
this.addMsg.BestTravelTimeList = [{ this.addMsg.BestTravelTimeList = [{
Month: '', Month: '',
Description: '' Description: ''
}] }]
} }
this.$nextTick(() => {
this.createMap()
})
this.areaLevelChange() this.areaLevelChange()
this.$refs.uploadImg.ImageList = tempData.ImageList || [] this.$refs.uploadImg.ImageList = tempData.ImageList || []
} else { } else {
...@@ -406,6 +484,7 @@ import uploadImg from '../../pubComponents/uploadImg' ...@@ -406,6 +484,7 @@ import uploadImg from '../../pubComponents/uploadImg'
//清空数据 //清空数据
clearMsg() { clearMsg() {
this.addMsg = { this.addMsg = {
LngLat: '',
IsHot: false, IsHot: false,
Id: 0, //编号 Id: 0, //编号
Level: 0, //等级 Level: 0, //等级
...@@ -439,9 +518,16 @@ import uploadImg from '../../pubComponents/uploadImg' ...@@ -439,9 +518,16 @@ import uploadImg from '../../pubComponents/uploadImg'
this.$message.error('请完善最佳旅行时间!'); this.$message.error('请完善最佳旅行时间!');
return return
} }
let lngLat = this.addMsg.LngLat.split(',')
if(this.addMsg.Level !== 1 && (!lngLat[0] || !lngLat[1])) {
this.$message.error('坐标不对,请重新输入');
return
}
this.addMsg.ImageList = imageList this.addMsg.ImageList = imageList
let params = {...this.addMsg} let params = {...this.addMsg}
params.IsHot = params.IsHot ? 1 : 2 params.IsHot = params.IsHot ? 1 : 2
params.Lng = lngLat[0]
params.Lat = lngLat[1]
this.apipost( this.apipost(
"ws_post_SetArea", params, "ws_post_SetArea", params,
res => { res => {
......
...@@ -119,6 +119,7 @@ export default { ...@@ -119,6 +119,7 @@ export default {
let crmUrl = ""; //crm API let crmUrl = ""; //crm API
let locationName = window.location.hostname; let locationName = window.location.hostname;
domainUrl = "http://192.168.10.128"; domainUrl = "http://192.168.10.128";
domainUrl = "http://192.168.10.11:8083" // 刘东电脑
// domainUrl = "http://192.168.10.123:8002"; // domainUrl = "http://192.168.10.123:8002";
// domainUrl = "http://reborn.oytour.com"; // domainUrl = "http://reborn.oytour.com";
let crmLocalFileStreamDownLoadUrl = ""; let crmLocalFileStreamDownLoadUrl = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment