Commit ce68ca22 authored by 黄奎's avatar 黄奎

临时提交

parent c997b6dc
import Vue from 'vue'
import axios from 'axios'
import md5 from 'js-md5'
// import {eventBus} from './eventBus'
import VueCoreVideoPlayer from 'vue-core-video-players'
import 'viewerjs/dist/viewer.css'
import user from './user'
import message from './message'
import product from './product'
import VueViewer from 'v-viewer'
// import VueCoreVideoPlayer from 'vue-core-video-player'
Vue.prototype.$EventBus = new Vue()
Vue.use(VueCoreVideoPlayer)
Vue.use(VueViewer)
Vue.prototype.$md5 = md5;
Vue.prototype.$message = message
Vue.prototype.$product = product
//域名管理对象
Vue.prototype.domainManager = function() {
let domainUrl = '';
domainUrl = "http://192.168.2.214:8082";
domainUrl = "http://127.0.0.1";
let domainNameUrl = this.GetDomain();
domainNameUrl = "http://tmb2b.oytour.com/"
if (domainNameUrl.indexOf('testerp.oytour') !== -1) {
domainUrl = "http://testapi.oytour.com";
} else if (domainNameUrl.indexOf('oytour') !== -1) {
// domainUrl = "http://reborn.oytour.com";
domainUrl = 'http://192.168.10.226:8015' //'http://192.168.10.226:8015' ''http://192.168.10.9:8083' '
//域名管理对象
Vue.prototype.domainManager = function () {
let domainUrl = 'http://192.168.5.214';
domainUrl = "http://192.168.5.46:8501";
var domainNameUrl = window.location.hostname;
if (domainNameUrl.indexOf('oytour') !== -1) {
domainUrl = 'http://reborn.oytour.com'
}
var obj = {
//主地址
DomainUrl: domainUrl,
//常用提交数据URL
PostUrl: domainUrl + "/api/common/post",
DomainUrl: domainUrl, //ERP接口地址
PostUrl: domainUrl + "/api/common/post", //常用提交数据URL
javaUrl: 'http://efficient.oytour.com'
};
return obj;
}
//获取当前域名
Vue.prototype.GetDomain = function() {
}
//获取当前域名
Vue.prototype.GetDomain = function () {
var domainNameUrl = window.location.hostname;
domainNameUrl = "www.oytour.com";
return domainNameUrl;
}
Vue.prototype.groupBy = function(array, f) {
Vue.prototype.groupBy = function (array, f) {
const groups = {};
array.forEach((item) => {
const group = JSON.stringify(f(item));
......@@ -58,7 +50,8 @@ Vue.prototype.groupBy = function(array, f) {
};
});
}
Vue.prototype.moneyFormat = function(num, decimal = 2, split = ',') {
Vue.prototype.moneyFormat = function (num, decimal = 2, split = ',') {
function thousandFormat(num) {
const len = num.length
return len <= 3 ? num : thousandFormat(num.substr(0, len - 3)) + split + num.substr(len - 3, 3)
......@@ -82,9 +75,9 @@ Vue.prototype.moneyFormat = function(num, decimal = 2, split = ',') {
} else {
return '--'
}
}
//HTTP提交数据
Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
}
//HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -122,10 +115,12 @@ Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
}
})
.then(res => {
if(res.data.resultCode === 10000) {
if (res.data.resultCode === 10000) {
this.$router.replace({
path: '/login',
query: {path: path}
query: {
path: path
}
});
return
}
......@@ -134,7 +129,7 @@ Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
}, faildCall)
}
Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -146,7 +141,7 @@ Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
var GroupId = 0;
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().token;
key = '' //this.getLocalStorage().secretKey;
key = '';
}
if (localStorage.groupinfo && localStorage.groupinfo != 'undefined') {
var groupJson = JSON.parse(localStorage.groupinfo);
......@@ -175,7 +170,7 @@ Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
//获取缓存
Vue.prototype.getLocalStorage = function() {
Vue.prototype.getLocalStorage = function () {
try {
var localStorageData = window.localStorage["b2bUser"];
if (localStorageData !== undefined && localStorageData != 'undefined') {
......@@ -190,7 +185,7 @@ Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
}
//向外跳转
Vue.prototype.OpenNewUrl = function(URL) {
Vue.prototype.OpenNewUrl = function (URL) {
if (URL && URL != '') {
if (URL.indexOf("https") != -1) {
var str = 'http://' + URL.substring(8);
......@@ -205,8 +200,8 @@ Vue.prototype.OpenNewUrl = function(URL) {
}
//公用跳转
Vue.prototype.CommonJump = function(path, obj, type = 'push') {
let p = typeof(path) == 'string' ? path : this.$product.genernalUrl(path)
Vue.prototype.CommonJump = function (path, obj, type = 'push') {
let p = typeof (path) == 'string' ? path : this.$product.genernalUrl(path)
if (type === 'blank') { // 新窗口打开
let routeUrl = this.$router.resolve({
path: p,
......@@ -225,8 +220,9 @@ Vue.prototype.CommonJump = function(path, obj, type = 'push') {
});
}
}
Vue.prototype.$user = user
Vue.prototype.createCalendar = function(dateStr) {
Vue.prototype.createCalendar = function (dateStr) {
var days = [];
var date;
if (dateStr) {
......@@ -279,9 +275,9 @@ Vue.prototype.createCalendar = function(dateStr) {
CurrentYear: currentYear,
CurrentWeek: currentWeek
};
}
//格式化日期
Vue.prototype.formatDate = function(year, month, day) {
}
//格式化日期
Vue.prototype.formatDate = function (year, month, day) {
var y = year;
var m = month;
if (m < 10) m = "0" + m;
......@@ -291,7 +287,7 @@ Vue.prototype.formatDate = function(year, month, day) {
}
//格式化日期二
Vue.prototype.formatDate2 = function(dateStr) {
Vue.prototype.formatDate2 = function (dateStr) {
var date = new Date(dateStr);
return {
CYear: date.getFullYear(),
......@@ -301,7 +297,7 @@ Vue.prototype.formatDate2 = function(dateStr) {
}
//添加月份
Vue.prototype.AddMonth = function(dateStr, month) {
Vue.prototype.AddMonth = function (dateStr, month) {
var v = new Date(dateStr);
if (v) {
var t = new Date(v.getFullYear(), v.getMonth(), v.getDate(), v.getHours(), v.getMinutes(), v.getSeconds(), v.getMilliseconds());
......@@ -314,10 +310,10 @@ Vue.prototype.AddMonth = function(dateStr, month) {
}
//获取URL中参数
Vue.prototype.getUrlKey = function(name, url) {
Vue.prototype.getUrlKey = function (name, url) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(url) || [, ""])[1].replace(/\+/g, '%20')) || null
}
Vue.prototype.GetHtml = function(str) {
Vue.prototype.GetHtml = function (str) {
if (str && str != "") {
return str.replace(/&lt;/g, '<').replace(/&gt;/g, '>')
.replace(/&amp;/g, '&').replace(/&quot;/g, '"').replace(/&apos;/g, "'");
......
......@@ -158,7 +158,7 @@
.category-btn {
width: 100px;
}
.mobile-logo{
.mobile-logo {
max-height: 35px;
max-width: 120px;
object-fit: contain;
......@@ -178,8 +178,9 @@
class="zk_toolbar flex justify-between"
:class="{ 'q-px-none': $q.platform.is.desktop }"
>
<div class="flex"><div class="f24" v-if="$q.platform.is.mobile && isHome" @click="handleShowDialog">
<i class="iconfont iconmore1" style="font-size: 24px;"></i>
<div class="flex">
<div class="f24" v-if="$q.platform.is.mobile && isHome" @click="handleShowDialog">
<i class="iconfont iconmore1" style="font-size: 24px"></i>
</div>
<img
:src="baseData.logo"
......@@ -189,12 +190,13 @@
filter: drop-shadow(0px 0px var(--q-color-primary));
"
class="q-mr-lg q-ml-sm"
:class="{'mobile-logo':$q.platform.is.mobile}"
:class="{ 'mobile-logo': $q.platform.is.mobile }"
@click="CommonJump('/index', {})"
/></div>
<!-- <div style="transform:scale(0.6,0.6)"> -->
/>
</div>
<!--HK 2024-11-22 去掉 搜索接口有调整-->
<searchSf2 v-if="!isHome" :plugData="plugData"></searchSf2>
<!-- </div> -->
<!-- pc -->
<div v-if="$q.platform.is.desktop">
<q-btn label="繁體中文" flat>
......@@ -215,11 +217,7 @@
unelevated
>
<template v-slot:label>
<img
class="avatar"
v-if="LoginUser.photo"
:src="LoginUser.photo"
/>
<img class="avatar" v-if="LoginUser.photo" :src="LoginUser.photo" />
<img class="avatar" v-else src="../../assets/img/avatar.png" />
<!-- <span>{{LoginUser.name || LoginUser.mailbox}}</span> -->
......@@ -229,7 +227,7 @@
<q-list class="text-grey-8" dense>
<q-item clickable v-close-popup to="/setUserInfo">
<q-item-section avatar>
<q-avatar icon="iconfont iconpeople1"/>
<q-avatar icon="iconfont iconpeople1" />
</q-item-section>
<q-item-section>
<q-item-label>個人信息</q-item-label>
......@@ -237,7 +235,7 @@
</q-item>
<q-item clickable v-close-popup to="/coupon">
<q-item-section avatar>
<q-avatar icon="iconfont iconqianbao"/>
<q-avatar icon="iconfont iconqianbao" />
</q-item-section>
<q-item-section>
<q-item-label>優惠券</q-item-label>
......@@ -245,7 +243,7 @@
</q-item>
<q-item clickable v-close-popup to="/order">
<q-item-section avatar>
<q-avatar icon="iconfont iconorder"/>
<q-avatar icon="iconfont iconorder" />
</q-item-section>
<q-item-section>
<q-item-label>訂單</q-item-label>
......@@ -254,7 +252,7 @@
<q-separator inset class="q-mx-lg" />
<q-item clickable v-close-popup to="/setUsersList">
<q-item-section avatar>
<q-avatar icon="iconfont iconpeople"/>
<q-avatar icon="iconfont iconpeople" />
</q-item-section>
<q-item-section>
<q-item-label>出行人信息管理</q-item-label>
......@@ -262,7 +260,7 @@
</q-item>
<q-item clickable v-close-popup to="/setAddress">
<q-item-section avatar>
<q-avatar icon="iconfont iconemail"/>
<q-avatar icon="iconfont iconemail" />
</q-item-section>
<q-item-section>
<q-item-label>管理邮寄地址</q-item-label>
......@@ -270,7 +268,7 @@
</q-item>
<q-item clickable v-close-popup to="/setInfo">
<q-item-section avatar>
<q-avatar icon="iconfont iconset"/>
<q-avatar icon="iconfont iconset" />
</q-item-section>
<q-item-section>
<q-item-label>賬戶設置</q-item-label>
......@@ -278,7 +276,7 @@
</q-item>
<q-item clickable v-close-popup @click="loginOut">
<q-item-section avatar>
<q-avatar icon="iconfont iconlog-in"/>
<q-avatar icon="iconfont iconlog-in" />
</q-item-section>
<q-item-section>
<q-item-label>登出</q-item-label>
......@@ -337,8 +335,15 @@
:baseData="baseData"
:dataList="dataList"
></city-category>
<popup @mousemove.prevent id="city-category" v-model="showDialog" mode="bottom" @close="handleDialogClose">
<city-category-mobile @close="showDialog = false"
<popup
@mousemove.prevent
id="city-category"
v-model="showDialog"
mode="bottom"
@close="handleDialogClose"
>
<city-category-mobile
@close="showDialog = false"
:baseData="baseData"
:dataList="dataList"
></city-category-mobile
......@@ -350,9 +355,9 @@
import popup from "../props/index";
import CityCategoryMobile from "./city-category-mobile.vue";
import cityCategory from "./city-category.vue";
import searchSf2 from '../search_sf/search-top.vue'
import searchSf2 from "../search_sf/search-top.vue";
export default {
components: { cityCategory, CityCategoryMobile, popup,searchSf2 },
components: { cityCategory, CityCategoryMobile, popup, searchSf2 },
props: {
baseData: {
type: Object,
......@@ -369,7 +374,7 @@ export default {
},
data() {
return {
plugData: {details: [], Title: ''},
plugData: { details: [], Title: "" },
showDialog: false,
searchDate: "",
searchEndDate: "",
......@@ -401,7 +406,7 @@ export default {
},
$route: {
handler: function (val, oldVal) {
console.log('val', val, oldVal)
console.log("val", val, oldVal);
this.isHome = val.path === "/" || val.path === "/index";
// this.isSearch = val.path === "/search";
},
......@@ -448,19 +453,18 @@ export default {
// this.getCategoryList();
},
methods: {
handler(event) {event.preventDefault();},
handler(event) {
event.preventDefault();
},
handleShowDialog() {
this.showDialog = true;
this.scrollTop = document.querySelector('body').scrollTop;
document.querySelector(
"body"
).style = `position: fixed; top: -${this.scrollTop}px`;
this.scrollTop = document.querySelector("body").scrollTop;
document.querySelector("body").style = `position: fixed; top: -${this.scrollTop}px`;
},
handleDialogClose() {
document.querySelector(
"body"
).style = '';},
document.querySelector("body").style = "";
},
avatarClick() {
if (this.LoginUser.token) {
this.CommonJump("/userCenter");
......
......@@ -40,7 +40,7 @@
standout
placeholder="蒐索關鍵字"
class="q-ma-md"
@blur="changeAddrSearchHandler"
@blur="handleSearchKey"
/>
<!-- <q-tree
ref="area"
......@@ -505,8 +505,6 @@ export default {
},
created() {
this.msg = this.qMsg;
// this.msg.teamType = [];
//this.initAreaList();
this.initGoods();
this.msg.priceRange = {
min: 1,
......@@ -524,11 +522,11 @@ export default {
mounted() {
let LineIdList = [];
if (this.msg.LineIds && this.msg.LineIds.length > 0) {
LineIdList = this.msg.LineIds.split(";");
LineIdList = this.msg.LineIds.split(",");
}
let SeriesIdList = [];
if (this.msg.SeriesIds && this.msg.SeriesIds.length > 0) {
SeriesIdList = this.msg.SeriesIds.split(";");
SeriesIdList = this.msg.SeriesIds.split(",");
}
if (
(LineIdList && LineIdList.length > 0) ||
......@@ -536,7 +534,12 @@ export default {
) {
let arr = [];
this.goodsType.forEach((x) => {
let lineIdIndex = LineIdList.findIndex((yId) => x.Id.slice(2) == yId);
var tempLineId = 0;
var tempLineIdArray = x.Id.split("|");
if (tempLineIdArray && tempLineIdArray.length == 2) {
tempLineId = tempLineIdArray[0];
}
let lineIdIndex = LineIdList.findIndex((yId) => tempLineId == yId);
if (lineIdIndex != -1) {
arr.push(x.Id);
}
......@@ -544,8 +547,12 @@ export default {
if (lineIdIndex != -1) {
arr.push(y.Id);
} else {
let seriesIdIndex = SeriesIdList.findIndex((yId) => y.Id.slice(2) == yId);
var tempLtId = 0;
var tempLtIdArray = y.Id.split("|");
if (tempLtIdArray && tempLtIdArray.length == 2) {
tempLtId = tempLtIdArray[0];
}
let seriesIdIndex = SeriesIdList.findIndex((yId) => tempLtId == yId);
if (seriesIdIndex != -1) {
arr.push(y.Id);
}
......@@ -556,15 +563,11 @@ export default {
}
},
methods: {
handleSelected(target) {
console.log("handleSelected", target);
},
handleTicked(target) {
this.msg.pageIndex = 1;
this.ticked = target;
this.goSearchHandler();
},
handleSearchKey(target) {
this.msg.pageIndex = 1;
this.goSearchHandler();
......@@ -635,11 +638,11 @@ export default {
let arr = [];
let LineIdList = [];
if (this.msg.LineIds && this.msg.LineIds.length > 0) {
LineIdList = this.msg.LineIds.split(";");
LineIdList = this.msg.LineIds.split(",");
}
let SeriesIdList = [];
if (this.msg.SeriesIds && this.msg.SeriesIds.length > 0) {
SeriesIdList = this.msg.SeriesIds.split(";");
SeriesIdList = this.msg.SeriesIds.split(",");
}
this.apipost(
"b2c_get_GetB2CQueryCondition",
......@@ -652,7 +655,13 @@ export default {
x.explsed = false;
x.isShow = true;
x.children = x.SubList;
let lineIdIndex = LineIdList.findIndex((yId) => x.Id.slice(2) == yId);
var tempLineId = 0;
var tempLineIdArray = x.Id.split("|");
if (tempLineIdArray && tempLineIdArray.length == 2) {
tempLineId = tempLineIdArray[0];
}
let lineIdIndex = LineIdList.findIndex((yId) => tempLineId == yId);
x.children.forEach((y) => {
y.checked = false;
y.explsed = false;
......@@ -661,9 +670,12 @@ export default {
arr.push(y.Id);
this.ticked.push(y.Id);
} else {
let seriesIdIndex = SeriesIdList.findIndex(
(yId) => y.Id.slice(2) == yId
);
var tempLtId = 0;
var tempLtIdArray = y.Id.split("|");
if (tempLtIdArray && tempLtIdArray.length == 2) {
tempLtId = tempLtIdArray[0];
}
let seriesIdIndex = SeriesIdList.findIndex((yId) => tempLtId == yId);
if (seriesIdIndex != -1) {
arr.push(y.Id);
this.ticked.push(y.Id);
......@@ -758,7 +770,6 @@ export default {
this.msg,
(res) => {
this.$q.loading.hide();
console.log("b2c_get_GetB2C2024TravelProductPage", res);
if (res.data.resultCode == 1) {
this.PageCount = res.data.data.pageCount;
this.TotalCount = res.data.data.count;
......
......@@ -79,16 +79,32 @@
elevated
transition-hide="scale"
class="showbox column"
>
<div class="q-px-sm q-pt-sm" v-if="historys.length>0">
<div class="q-px-sm q-pt-sm" v-if="historys.length > 0">
<div class="q-mb-sm text-weight-bold">歷史搜索</div>
<div class="row">
<div class="col overflow-hidden" style="height:36px">
<template v-for="(x,i) in historys">
<q-chip v-if="x" style="background:#f6f7f9;" @click="goSearchHandler(x)" clickable text-color="dark" class="cursor-pointer" :label="x" :key="i" /></template>
<div class="col overflow-hidden" style="height: 36px">
<template v-for="(x, i) in historys">
<q-chip
v-if="x"
style="background: #f6f7f9"
@click="goSearchHandler(x)"
clickable
text-color="dark"
class="cursor-pointer"
:label="x"
:key="i"
/></template>
</div>
<q-btn text-color="grey-6" icon="delete" class="q-py-none" dense size="sm" flat @click="clearHistorys">
<q-btn
text-color="grey-6"
icon="delete"
class="q-py-none"
dense
size="sm"
flat
@click="clearHistorys"
>
<q-tooltip class="bg-dark" co>清空歷史</q-tooltip>
</q-btn>
</div>
......@@ -96,58 +112,34 @@
<div class="text-weight-bold q-pa-sm">熱門目的地</div>
<q-separator />
<div class="flex flex-wrap">
<div class="hot-tag" @click="handleHotTagClick(item)" :class="{'hot-tag-select': setectHotTag === item.Id}" :key="item.Id" v-for="item in hotList">{{item.Name}}</div>
<div
class="hot-tag"
@click="handleHotTagClick(item)"
:class="{ 'hot-tag-select': setectHotTag === item.Id }"
:key="item.Id"
v-for="item in hotList"
>
{{ item.Name }}
</div>
</div>
</div>
</div>
<div class=" bg-white q-px-md" v-if="$q.screen.xs" @click="showPopupHandler">
<div class="bg-white q-px-md" v-if="$q.screen.xs" @click="showPopupHandler">
<i class="iconfont iconchazhao"></i>
<!-- <q-icon name="search" /> -->
<!-- <q-input
filled
v-model="searchKey"
class="bg-grey-1 q-mx-md"
:label="$t('search')"
readonly="readonly"
@click="showPopupHandler"
>
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input> -->
</div>
</div>
</div>
<popup
v-model="showPopup"
mode="top"
:safeAreaInsetBottom="true"
border-radius="5"
>
<popup v-model="showPopup" mode="top" :safeAreaInsetBottom="true" border-radius="5">
<div class="chosen-box">
<div class="title">搜尋行程</div>
<div class="chosen-tab">
<q-tabs
v-model="tab"
align="justify"
narrow-indicator
class="q-mb-md"
>
<q-tabs v-model="tab" align="justify" narrow-indicator class="q-mb-md">
<q-tab class="text-purple" name="dest" label="目的地" />
<q-tab class="text-teal" name="kw" label="關鍵字" />
</q-tabs>
<div v-show="tab == 'dest'">
<q-card flat class="rounded-borders q-py-md">
<div class="text-subtitle1 text-weight-bold q-mx-md">篩選目的地</div>
<!-- <q-input
v-model="searchAdd.name"
type="text"
standout
placeholder="搜尋目的地、景點、行程觀光或酒店名稱..."
class="q-ma-md"
@input="changeAddrSearchHandler"
/> -->
<q-tree
ref="area"
:nodes="areaList"
......@@ -163,46 +155,6 @@
no-results-label=" "
/>
</q-card>
<!-- <div class="q-mb-md">
<q-select
filled
v-model="chosenResult.fl"
:options="areas"
option-label="Name"
option-value="Name"
label="請選擇地區"
/>
</div>
<div class="q-mb-md" v-if="chosenResult.fl.SubList">
<q-select
filled
v-model="chosenResult.sl"
:options="chosenResult.fl.SubList"
option-label="Name"
option-value="Name"
label="請選擇地區"
/>
</div>
<div class="q-mb-md" v-if="chosenResult.sl.SubList">
<q-select
filled
v-model="chosenResult.tl"
:options="chosenResult.sl.SubList"
option-label="Name"
option-value="Name"
label="請選擇地區"
/>
</div>
<div class="q-mb-md" v-if="chosenResult.tl.SubList">
<q-select
filled
v-model="chosenResult.ful"
:options="chosenResult.tl.SubList"
option-label="Name"
option-value="Name"
label="請選擇地區"
/>
</div> -->
</div>
<div v-show="tab == 'kw'" class="q-mb-md">
<q-input
......@@ -290,7 +242,7 @@ export default {
return {
areaTicked: [],
areaList: [],
setectHotTag: '',
setectHotTag: "",
hotList: [],
slide: 0,
searchKey: "",
......@@ -315,7 +267,7 @@ export default {
crtAreaIndex: 0,
showPopup: false,
tab: "dest",
historys:[],
historys: [],
chosenResult: {
fl: "",
sl: "",
......@@ -325,16 +277,16 @@ export default {
RB_Group_Id: 0,
};
},
created() {
},
created() {},
mounted() {
console.log("getRoutePath", this.getRoutePath());
this.isSearch = this.$router.history.current.path === "/search";
this.initAreaList()
var jObj = JSON.parse(window.localStorage.getItem('baseifo'));
const hotList = this.getHotList(jObj.AreaList)
console.log('hotList mounted', jObj, hotList)
this.hotList = hotList
this.getHistory()
this.initAreaList();
var jObj = JSON.parse(window.localStorage.getItem("baseifo"));
const hotList = this.getHotList(jObj.AreaList);
this.hotList = hotList;
this.getHistory();
var newStartDate = new Date();
var newStartDateStr = this.formatDate(
newStartDate.getFullYear(),
......@@ -366,32 +318,27 @@ export default {
},
computed: {},
methods: {
handleAreaTicked(target) {
console.log("this.areaTicked", target, this.areaTicked)
// if(!this.areaTicked.length) {
// this.areaTicked = target
// } else if(this.areaTicked[0] === target[0]) {
// this.areaTicked = target[1] ? [target[1]] : []
// } else {
// this.areaTicked = target
// }
this.areaTicked = target
getRoutePath() {
let crPath = this.$router.currentRoute.path;
console.log("crPath", crPath);
return crPath;
},
handleAreaSelected(target) {
// console.log("this.handleAreaSelected", target);
handleAreaTicked(target) {
this.areaTicked = target;
},
handleAreaSelected(target) {},
initAreaList() {
let jObj = JSON.parse(window.localStorage.getItem("baseifo"));
let arr = [];
jObj.AreaList.forEach((x) => {
x.selectable = false
x.selectable = false;
x.children = x.SubList;
x.children.forEach((y) => {
y.checked = false;
y.explsed = false;
y.isShow = true;
if (y.SubList) {
y.selectable = false
y.selectable = false;
y.children = y.SubList;
y.children.forEach((z) => {
z.checked = false;
......@@ -406,7 +353,7 @@ export default {
},
getHotList(arr) {
let hotArr = [];
arr.forEach(item => {
arr.forEach((item) => {
if (item.SubList && item.SubList.length) {
hotArr = hotArr.concat(this.getHotList(item.SubList));
} else {
......@@ -417,31 +364,12 @@ export default {
});
return hotArr;
},
handleHotTagClick(item) {
this.setectHotTag = item.Id
// let val = item.Name
// if(val!='' && typeof val == 'string'){
// this.searchKey=val
// }
// this.historys=Array.from(new Set([this.searchKey].concat(this.historys)))
// localStorage['recent_search'] = JSON.stringify(this.historys)
this.CommonJump("/search", {
qsearchKey: this.searchKey,
qsearchDate: this.searchDate,
qsearchEndDate: this.searchEndDate,
areaId: item.Id
});
if(this.isSearch) {
window.location.reload()
}
},
//获取地区数据
getAera() {
let aMsg = { RB_Group_Id: this.RB_Group_Id };
this.apipost(
"ws_get_GetSearchArea",
{
RB_Group_Id: this.RB_Group_Id,
},
aMsg,
(res) => {
if (res.data.resultCode == 1) {
if (res.data.data) {
......@@ -452,8 +380,8 @@ export default {
(err) => {}
);
},
getHistory(){
this.historys =JSON.parse(localStorage['recent_search']??'[]')
getHistory() {
this.historys = JSON.parse(localStorage["recent_search"] ?? "[]");
},
showPopupHandler() {
this.showPopup = true;
......@@ -494,51 +422,51 @@ export default {
this.searchKey = name;
this.showSplitPannel = false;
},
handleHotTagClick(item) {
this.setectHotTag = item.Id;
this.CommonJump("/search", {
qsearchKey: this.searchKey,
qsearchDate: this.searchDate,
qsearchEndDate: this.searchEndDate,
areaId: item.Id,
});
if (this.isSearch) {
window.location.reload();
}
},
//跳转到搜索页面
goSearchHandler(val='') {
console.log('跳转到搜索页面', val)
if(val!='' && typeof val == 'string'){
this.searchKey=val
this.historys=Array.from(new Set([this.searchKey].concat(this.historys)))
localStorage['recent_search'] = JSON.stringify(this.historys)
goSearchHandler(val = "") {
if (val != "" && typeof val == "string") {
this.searchKey = val;
this.historys = Array.from(new Set([this.searchKey].concat(this.historys)));
localStorage["recent_search"] = JSON.stringify(this.historys);
}
this.CommonJump("/search", {
qsearchKey: this.searchKey,
areaIds: this.areaTicked.join(','),
areaIds: this.areaTicked.join(","),
qsearchDate: this.searchDate,
qsearchEndDate: this.searchEndDate,
});
this.showSplitPannel = false
if(this.isSearch) {
window.location.reload()
this.showSplitPannel = false;
if (this.isSearch) {
window.location.reload();
}
},
clearHistorys(){
this.historys =[]
localStorage['recent_search'] = JSON.stringify(this.historys)
}
clearHistorys() {
this.historys = [];
localStorage["recent_search"] = JSON.stringify(this.historys);
},
},
};
</script>
<style>
.banner-style9 {
/* margin-top: 0px; */
/* position: relative; */
/* overflow: hidden; */
border-radius: 5px;
}
.banner-style9 .search-content {
/* position: absolute; */
/* top: 0;
left: 0;
right: 0;
bottom: 0; */
z-index: 2;
/* transform: translate(-50%, -50%); */
/* margin-top: 40px; */
background: rgb(0, 0, 0, 0.1);
}
......@@ -668,20 +596,19 @@ export default {
<style scoped>
.hot-tag {
width: 141px;
height: 34px;
line-height: 34px;
padding-left: 8px;
border-radius: 8px;
margin: 12px 0 12px 12px;
cursor: pointer;
height: 34px;
line-height: 34px;
padding-left: 8px;
border-radius: 8px;
margin: 12px 0 12px 12px;
cursor: pointer;
}
.hot-tag-select {
background: #EE4454;
color: #fff;
background: #ee4454;
color: #fff;
}
</style>
<style lang="scss" scoped>
::v-deep .q-field__control {
height: 40px;
}
......@@ -698,6 +625,6 @@ color: #fff;
height: 40px;
}
::v-deep .q-field__label {
top: 13px
top: 13px;
}
</style>
......@@ -676,6 +676,7 @@ export default {
let arr = [];
let jObj = JSON.parse(window.localStorage.getItem("baseifo"));
jObj.CategoryList.forEach((x) => {
x.checked = false;
x.explsed = false;
x.isShow = true;
......
......@@ -684,7 +684,7 @@
}
</style>
<template>
<div class="SearchMain" :class="{'desktop-page':$q.platform.is.desktop}">
<div class="SearchMain" :class="{ 'desktop-page': $q.platform.is.desktop }">
<div class="SearchTop">
<div class="q-my-md" v-if="qMsg.searchKey">
<q-breadcrumbs>
......@@ -699,25 +699,26 @@
</div>
<div class="text-h6 text-left" v-if="qMsg.searchKey">
搜尋結果 “
<span class="text-primary">{{ qMsg.searchKey }}</span>
<span class="text-primary">{{ qMsg.searchKey }}</span
>
</div>
<!-- 电脑端 -->
<div class="row SearchContent q-mt-md" v-if="!$q.screen.xs && 1==0">
<div class="row SearchContent q-mt-md" v-if="!$q.screen.xs && 1 == 0">
<div class="search-filter-inner">
<div
class="search-item"
style="width:200px;cursor:pointer;"
@click="isShowDialog=true,goSearchHandler"
style="width: 200px; cursor: pointer"
@click="(isShowDialog = true), goSearchHandler"
>
<i class="iconfont iconchazhao"></i>
{{qMsg.searchKey}}
{{ qMsg.searchKey }}
</div>
<div class="search-item" @click="isShowDialog=true,goSearchHandler">
<div class="search-item" @click="(isShowDialog = true), goSearchHandler">
<i class="iconfont iconrili"></i>
{{qMsg.startDate}} ~ {{qMsg.endDate}}
{{ qMsg.startDate }} ~ {{ qMsg.endDate }}
</div>
<div class="search-item" style="margin-left:20px;">
<div class="search-item" style="margin-left: 20px">
<q-select
filled
v-model="sortNum"
......@@ -727,28 +728,36 @@
map-options
/>
</div>
<div class="search-item" style="margin-left:20px;">
<span style="display:inline-block;cursor:pointer;" @click="fullHeight = true">更多篩選條件</span>
<div class="search-item" style="margin-left: 20px">
<span
style="display: inline-block; cursor: pointer"
@click="fullHeight = true"
>更多篩選條件</span
>
</div>
</div>
<div
v-show="showSplitPannel"
id="sb"
style="z-index:999"
style="z-index: 999"
transition-show="fade"
elevated
transition-hide="scale"
class="showbox row"
>
<div style="width:180px;">
<q-scroll-area :thumb-style="thumbStyle" :bar-style="barStyle" style="height: 100%;">
<div style="width: 180px">
<q-scroll-area
:thumb-style="thumbStyle"
:bar-style="barStyle"
style="height: 100%"
>
<q-list>
<q-item
v-for="(x, i) in areas"
:key="i"
clickable
v-ripple
:active="crtAreaIndex==i"
:active="crtAreaIndex == i"
@click="clkAreaHandler(i)"
active-class="my-menu-link"
>
......@@ -761,24 +770,44 @@
</div>
<q-separator vertical />
<div class="col q-pa-md">
<q-scroll-area :thumb-style="thumbStyle" :bar-style="barStyle" style="height: 100%;">
<q-scroll-area
:thumb-style="thumbStyle"
:bar-style="barStyle"
style="height: 100%"
>
<template
v-if="areas[crtAreaIndex]&&areas[crtAreaIndex].SubList&&areas[crtAreaIndex].SubList.length>0"
v-if="
areas[crtAreaIndex] &&
areas[crtAreaIndex].SubList &&
areas[crtAreaIndex].SubList.length > 0
"
>
<div
class="area-box"
v-for="(x, i) in areas[crtAreaIndex].SubList"
:key="i"
>
<div class="area-box" v-for="(x, i) in areas[crtAreaIndex].SubList" :key="i">
<div class="q-mb-md">
<div class="h3" @click="chosenAreaHandler(x.Name)">{{x.Name}}</div>
<div class="h3" @click="chosenAreaHandler(x.Name)">{{ x.Name }}</div>
</div>
<template v-if="x&&x.SubList && x.SubList.length>0">
<div class="q-mb-sm row to-end" v-for="(y, yi) in x.SubList" :key="yi">
<div class="h4" @click="chosenAreaHandler(y.Name)">{{y.Name}}</div>
<template v-if="y&&y.SubList&&y.SubList.length>0">
<template v-if="x && x.SubList && x.SubList.length > 0">
<div
class="q-mb-sm row to-end"
v-for="(y, yi) in x.SubList"
:key="yi"
>
<div class="h4" @click="chosenAreaHandler(y.Name)">
{{ y.Name }}
</div>
<template v-if="y && y.SubList && y.SubList.length > 0">
<div
class="h5"
@click="chosenAreaHandler(z.Name)"
v-for="(z, zi) in y.SubList"
:key="zi"
>{{z.Name}}</div>
>
{{ z.Name }}
</div>
</template>
</div>
</template>
......@@ -817,11 +846,11 @@
</div>
</div> -->
<template v-if="ShowType==0">
<template v-if="ShowType == 0">
<!--豆腐格-->
<searchBlock :DataList="DataList" :qMsg="qMsg"></searchBlock>
</template>
<template v-else-if="ShowType==1">
<template v-else-if="ShowType == 1">
<div class="wl-section-block search-content">
<div class="search-filter-aside">
<div class="search-header">
......@@ -834,12 +863,12 @@
價格
<span class="clear-filter" @click="clearPrice()">清除篩選</span>
</div>
<div style="width:100%;height:57px;display:none"></div>
<div style="width: 100%; height: 57px; display: none"></div>
<div class="range-text">
<div class="min">
<q-input
class="full_price"
style="width:80%"
style="width: 80%"
placeholder="最低价"
v-model="qMsg.minPrice"
@input="changeData"
......@@ -850,7 +879,7 @@
<div class="max">
<q-input
class="full_price"
style="width:80%"
style="width: 80%"
placeholder="最高价"
v-model="qMsg.maxPrice"
@input="changeData"
......@@ -868,7 +897,7 @@
<q-checkbox
right-label
v-model="dayNum"
v-for="(item,index) in dayArray"
v-for="(item, index) in dayArray"
:label="item.text"
:key="index"
:val="item.id"
......@@ -896,7 +925,7 @@
<div class="q-gutter-sm">
<q-checkbox
v-model="WeekDay"
v-for="(item,index) in weekList"
v-for="(item, index) in weekList"
:val="item.value"
:label="item.label"
:key="index"
......@@ -914,7 +943,7 @@
<template v-else>
<kkday :qMsg="qMsg" @change="handlerSearchChange"></kkday>
</template>
<div v-if="DataList.length==0 && ShowType!=2" class="blank-block">
<div v-if="DataList.length == 0 && ShowType != 2" class="blank-block">
<i class="iconfont iconchazhao"></i>
<p>請嘗試其他關鍵字或篩選條件</p>
</div>
......@@ -923,11 +952,11 @@
<q-dialog v-model="fullHeight" full-height>
<q-card class="column full-height" style="width: 500px">
<div class="moreTiaojiao">更多篩選條件</div>
<div class="full_listDiv" style="padding-bottom:20px">
<div class="full_listDiv" style="padding-bottom: 20px">
<span>價格:</span>
<q-input
class="full_price"
style="width:30%;height:45px;"
style="width: 30%; height: 45px"
v-model="qMsg.minPrice"
@input="changeData"
filled
......@@ -935,7 +964,7 @@
/>
<q-input
class="full_price"
style="width:30%;height:45px;"
style="width: 30%; height: 45px"
v-model="qMsg.maxPrice"
@input="changeData"
filled
......@@ -948,7 +977,7 @@
<q-checkbox
right-label
v-model="dayNum"
v-for="(item,index) in dayArray"
v-for="(item, index) in dayArray"
:label="item.text"
:key="index"
:val="item.id"
......@@ -962,7 +991,7 @@
<div class="q-gutter-sm">
<q-checkbox
v-model="WeekDay"
v-for="(item,index) in weekList"
v-for="(item, index) in weekList"
:val="item.value"
:label="item.label"
:key="index"
......@@ -972,10 +1001,10 @@
</div>
</div>
<div class="full_btndiv">
<q-btn color="white" style="width:49%" text-color="black" label="清除" />
<q-btn color="white" style="width: 49%" text-color="black" label="清除" />
<q-btn
color="primary"
style="width:49%"
style="width: 49%"
label="套用"
v-close-popup
@click="goSearchHandler"
......@@ -989,18 +1018,18 @@
<q-card-section>
<div class="text-h6">
搜尋行程
<i class="iconfont iconbaseline-close-px" @click="isShowDialog=false"></i>
<i class="iconfont iconbaseline-close-px" @click="isShowDialog = false"></i>
</div>
</q-card-section>
<q-separator />
<div style="max-height: 550px;padding:20px 30px 30px 30px" class="scroll">
<div style="max-height: 550px; padding: 20px 30px 30px 30px" class="scroll">
<div class="chosen-box">
<div class="chosen-tab">
<q-tabs v-model="tab" align="justify" narrow-indicator class="q-mb-md">
<q-tab class="text-purple" name="dest" label="目的地" />
<q-tab class="text-teal" name="kw" label="關鍵字" />
</q-tabs>
<div v-show="tab=='dest'">
<div v-show="tab == 'dest'">
<div class="q-mb-md">
<q-select
filled
......@@ -1043,7 +1072,7 @@
/>
</div>
</div>
<div v-show="tab=='kw'" class="q-mb-md">
<div v-show="tab == 'kw'" class="q-mb-md">
<q-input
filled
id="search_key"
......@@ -1057,7 +1086,7 @@
<q-input
filled
v-model="qMsg.startDate"
style="width:99%"
style="width: 99%"
:label="$t('search_date_begin')"
mask="date"
class="bg-grey-1"
......@@ -1105,10 +1134,10 @@
<q-btn
color="primary"
unelevated
style="width:100%;height:50px;margin-top:20px;"
style="width: 100%; height: 50px; margin-top: 20px"
filled
label="搜尋"
@click="isShowDialog=false,goSearchHandler()"
@click="(isShowDialog = false), goSearchHandler()"
/>
</div>
</div>
......@@ -1126,7 +1155,7 @@
<q-tab class="text-purple" name="dest" label="目的地" />
<q-tab class="text-teal" name="kw" label="關鍵字" />
</q-tabs>
<div v-show="tab=='dest'">
<div v-show="tab == 'dest'">
<div class="q-mb-md">
<q-select
filled
......@@ -1169,7 +1198,7 @@
/>
</div>
</div>
<div v-show="tab=='kw'" class="q-mb-md">
<div v-show="tab == 'kw'" class="q-mb-md">
<q-input
filled
id="search_key"
......@@ -1230,10 +1259,10 @@
<q-btn
color="primary"
unelevated
style="width:100%"
style="width: 100%"
filled
label="搜尋"
@click="showPopup=false,goSearchHandler()"
@click="(showPopup = false), goSearchHandler()"
/>
</div>
</div>
......@@ -1251,7 +1280,7 @@ export default {
popup,
searchBlock,
searchList,
kkday
kkday,
},
data() {
return {
......@@ -1266,56 +1295,56 @@ export default {
id: 1,
min: 1,
max: 1,
text: "1天"
text: "1天",
},
{
id: 2,
min: 2,
max: 2,
text: "2天"
text: "2天",
},
{
id: 3,
min: 3,
max: 3,
text: "3天"
text: "3天",
},
{
id: 4,
min: 4,
max: 4,
text: "4天"
text: "4天",
},
{
id: 5,
min: 5,
max: 5,
text: "5天"
text: "5天",
},
{
id: 6,
min: 6,
max: 6,
text: "6天"
text: "6天",
},
{
id: 7,
min: 7,
max: 8,
text: "7-8天"
text: "7-8天",
},
{
id: 8,
min: 9,
max: 10,
text: "9-10天"
text: "9-10天",
},
{
id: 9,
min: 10,
max: null,
text: "10天以上"
}
text: "10天以上",
},
],
flight: ["长荣"],
......@@ -1327,7 +1356,7 @@ export default {
borderRadius: "5px",
backgroundColor: "#027be3",
width: "5px",
opacity: 0.75
opacity: 0.75,
},
//地区样式
barStyle: {
......@@ -1335,7 +1364,7 @@ export default {
borderRadius: "9px",
backgroundColor: "#027be3",
width: "9px",
opacity: 0.2
opacity: 0.2,
},
//地区数据
areas: [],
......@@ -1343,62 +1372,62 @@ export default {
sortArray: [
{
label: "依推薦程度",
value: 1
value: 1,
},
{
label: "低價優先",
value: 2
value: 2,
},
{
label: "高價優先",
value: 3
value: 3,
},
{
label: "最快出發日",
value: 4
value: 4,
},
{
label: "最晚出發日",
value: 5
value: 5,
},
{
label: "天數少到多",
value: 6
value: 6,
},
{
label: "天數多到少",
value: 7
}
value: 7,
},
],
weekList: [
{
label: "星期日",
value: 0
value: 0,
},
{
label: "星期一",
value: 1
value: 1,
},
{
label: "星期二",
value: 2
value: 2,
},
{
label: "星期三",
value: 3
value: 3,
},
{
label: "星期四",
value: 4
value: 4,
},
{
label: "星期五",
value: 5
value: 5,
},
{
label: "星期六",
value: 6
}
value: 6,
},
],
showPopup: false,
tab: "dest",
......@@ -1406,7 +1435,7 @@ export default {
fl: "",
sl: "",
tl: "",
ful: ""
ful: "",
},
//查询参数
qMsg: {
......@@ -1434,11 +1463,11 @@ export default {
dayNumList: [], // 天数
webSiteCategoryIds: "", // 分类Id
placeIds: "", // 目的地城市Id
orderBy: 0 // 排序 0默认 1价格升序 2价格降序
orderBy: 0, // 排序 0默认 1价格升序 2价格降序
},
ShowType: 0, //显示样式(0-豆腐格,1-列表)
//行程列表
DataList: []
DataList: [],
};
},
created() {},
......@@ -1466,7 +1495,7 @@ export default {
var qsearchDate = this.getUrlKey("qsearchDate", window.location.href);
var qsearchEndDate = this.getUrlKey("qsearchEndDate", window.location.href);
var areaId = this.getUrlKey("areaId", window.location.href);
var areaIds = this.getUrlKey("areaIds", window.location.href)
var areaIds = this.getUrlKey("areaIds", window.location.href);
var categoryId = this.getUrlKey("categoryId", window.location.href);
if (qsearchKey) {
this.qMsg.searchKey = qsearchKey;
......@@ -1481,7 +1510,7 @@ export default {
this.qMsg.areaId = Number(areaId);
}
if (areaIds) {
this.qMsg.areaIds = areaIds.split(',').map(item => Number(item));
this.qMsg.areaIds = areaIds.split(",").map((item) => Number(item));
}
if (categoryId) {
this.qMsg.categoryId = Number(categoryId);
......@@ -1522,7 +1551,7 @@ export default {
dayNumList: [], // 天数
webSiteCategoryIds: "", // 分类Id
placeIds: "", // 目的地城市Id
orderBy: 0 // 排序 0默认 1价格升序 2价格降序
orderBy: 0, // 排序 0默认 1价格升序 2价格降序
};
this.qMsg = msg;
this.goSearchHandler();
......@@ -1548,14 +1577,14 @@ export default {
this.apipost(
"ws_get_GetSearchArea",
{},
res => {
(res) => {
if (res.data.resultCode == 1) {
if (res.data.data) {
this.areas = res.data.data.AreaList;
}
}
},
err => {}
(err) => {}
);
},
searchFocusHandler() {
......@@ -1622,11 +1651,7 @@ export default {
companyId = groupinfo.siteList[0].companyId;
}
this.SearchResult =
this.qMsg.startDate +
"-" +
this.qMsg.endDate +
" " +
this.qMsg.searchKey;
this.qMsg.startDate + "-" + this.qMsg.endDate + " " + this.qMsg.searchKey;
let msg = {
pageIndex: this.qMsg.pageIndex,
pageSize: this.qMsg.pageSize,
......@@ -1647,7 +1672,7 @@ export default {
orderBySales: 0,
startCityId: this.qMsg.startCityId,
weekDayList: this.WeekDay,
dayNumList: this.dayNum
dayNumList: this.dayNum,
};
if (localStorage.b2bUser) {
var b2bUser = JSON.parse(window.localStorage.getItem("b2bUser"));
......@@ -1658,14 +1683,14 @@ export default {
this.apipost(
"b2c_get_GetB2CMergeProductPageList",
msg,
res => {
(res) => {
this.$q.loading.hide();
if (res.data.resultCode == 1) {
this.qMsg.PageCount = res.data.data.pageCount;
this.qMsg.TotalCount = res.data.data.count;
var tempArray = res.data.data.pageData;
if (tempArray && tempArray.length > 0) {
tempArray.forEach(item => {
tempArray.forEach((item) => {
if (item.imgCover && item.imgCover != "") {
try {
var imgArray = JSON.parse(item.imgCover);
......@@ -1681,9 +1706,9 @@ export default {
}
}
},
err => {}
(err) => {}
);
}
}
},
},
};
</script>
......@@ -684,7 +684,7 @@
}
</style>
<template>
<div class="SearchMain" :class="{'desktop-page':$q.platform.is.desktop}">
<div class="SearchMain" :class="{ 'desktop-page': $q.platform.is.desktop }">
<div class="SearchTop">
<div class="q-my-md" v-if="qMsg.searchKey">
<q-breadcrumbs>
......@@ -699,25 +699,26 @@
</div>
<div class="text-h6 text-left" v-if="qMsg.searchKey">
搜尋結果 “
<span class="text-primary">{{ qMsg.searchKey }}</span>
<span class="text-primary">{{ qMsg.searchKey }}</span
>
</div>
<!-- 电脑端 -->
<div class="row SearchContent q-mt-md" v-if="!$q.screen.xs && 1==0">
<div class="row SearchContent q-mt-md" v-if="!$q.screen.xs && 1 == 0">
<div class="search-filter-inner">
<div
class="search-item"
style="width:200px;cursor:pointer;"
@click="isShowDialog=true,goSearchHandler"
style="width: 200px; cursor: pointer"
@click="(isShowDialog = true), goSearchHandler"
>
<i class="iconfont iconchazhao"></i>
{{qMsg.searchKey}}
{{ qMsg.searchKey }}
</div>
<div class="search-item" @click="isShowDialog=true,goSearchHandler">
<div class="search-item" @click="(isShowDialog = true), goSearchHandler">
<i class="iconfont iconrili"></i>
{{qMsg.startDate}} ~ {{qMsg.endDate}}
{{ qMsg.startDate }} ~ {{ qMsg.endDate }}
</div>
<div class="search-item" style="margin-left:20px;">
<div class="search-item" style="margin-left: 20px">
<q-select
filled
v-model="sortNum"
......@@ -727,28 +728,36 @@
map-options
/>
</div>
<div class="search-item" style="margin-left:20px;">
<span style="display:inline-block;cursor:pointer;" @click="fullHeight = true">更多篩選條件</span>
<div class="search-item" style="margin-left: 20px">
<span
style="display: inline-block; cursor: pointer"
@click="fullHeight = true"
>更多篩選條件</span
>
</div>
</div>
<div
v-show="showSplitPannel"
id="sb"
style="z-index:999"
style="z-index: 999"
transition-show="fade"
elevated
transition-hide="scale"
class="showbox row"
>
<div style="width:180px;">
<q-scroll-area :thumb-style="thumbStyle" :bar-style="barStyle" style="height: 100%;">
<div style="width: 180px">
<q-scroll-area
:thumb-style="thumbStyle"
:bar-style="barStyle"
style="height: 100%"
>
<q-list>
<q-item
v-for="(x, i) in areas"
:key="i"
clickable
v-ripple
:active="crtAreaIndex==i"
:active="crtAreaIndex == i"
@click="clkAreaHandler(i)"
active-class="my-menu-link"
>
......@@ -761,24 +770,44 @@
</div>
<q-separator vertical />
<div class="col q-pa-md">
<q-scroll-area :thumb-style="thumbStyle" :bar-style="barStyle" style="height: 100%;">
<q-scroll-area
:thumb-style="thumbStyle"
:bar-style="barStyle"
style="height: 100%"
>
<template
v-if="areas[crtAreaIndex]&&areas[crtAreaIndex].SubList&&areas[crtAreaIndex].SubList.length>0"
v-if="
areas[crtAreaIndex] &&
areas[crtAreaIndex].SubList &&
areas[crtAreaIndex].SubList.length > 0
"
>
<div
class="area-box"
v-for="(x, i) in areas[crtAreaIndex].SubList"
:key="i"
>
<div class="area-box" v-for="(x, i) in areas[crtAreaIndex].SubList" :key="i">
<div class="q-mb-md">
<div class="h3" @click="chosenAreaHandler(x.Name)">{{x.Name}}</div>
<div class="h3" @click="chosenAreaHandler(x.Name)">{{ x.Name }}</div>
</div>
<template v-if="x&&x.SubList && x.SubList.length>0">
<div class="q-mb-sm row to-end" v-for="(y, yi) in x.SubList" :key="yi">
<div class="h4" @click="chosenAreaHandler(y.Name)">{{y.Name}}</div>
<template v-if="y&&y.SubList&&y.SubList.length>0">
<template v-if="x && x.SubList && x.SubList.length > 0">
<div
class="q-mb-sm row to-end"
v-for="(y, yi) in x.SubList"
:key="yi"
>
<div class="h4" @click="chosenAreaHandler(y.Name)">
{{ y.Name }}
</div>
<template v-if="y && y.SubList && y.SubList.length > 0">
<div
class="h5"
@click="chosenAreaHandler(z.Name)"
v-for="(z, zi) in y.SubList"
:key="zi"
>{{z.Name}}</div>
>
{{ z.Name }}
</div>
</template>
</div>
</template>
......@@ -789,11 +818,11 @@
</div>
</div>
</div>
<template v-if="ShowType==0">
<template v-if="ShowType == 0">
<!--豆腐格-->
<searchBlock :DataList="DataList" :qMsg="qMsg"></searchBlock>
</template>
<template v-else-if="ShowType==1">
<template v-else-if="ShowType == 1">
<div class="wl-section-block search-content">
<div class="search-filter-aside">
<div class="search-header">
......@@ -806,12 +835,12 @@
價格
<span class="clear-filter" @click="clearPrice()">清除篩選</span>
</div>
<div style="width:100%;height:57px;display:none"></div>
<div style="width: 100%; height: 57px; display: none"></div>
<div class="range-text">
<div class="min">
<q-input
class="full_price"
style="width:80%"
style="width: 80%"
placeholder="最低价"
v-model="qMsg.minPrice"
@input="changeData"
......@@ -822,7 +851,7 @@
<div class="max">
<q-input
class="full_price"
style="width:80%"
style="width: 80%"
placeholder="最高价"
v-model="qMsg.maxPrice"
@input="changeData"
......@@ -840,7 +869,7 @@
<q-checkbox
right-label
v-model="dayNum"
v-for="(item,index) in dayArray"
v-for="(item, index) in dayArray"
:label="item.text"
:key="index"
:val="item.id"
......@@ -868,7 +897,7 @@
<div class="q-gutter-sm">
<q-checkbox
v-model="WeekDay"
v-for="(item,index) in weekList"
v-for="(item, index) in weekList"
:val="item.value"
:label="item.label"
:key="index"
......@@ -886,7 +915,7 @@
<template v-else>
<kkday :qMsg="qMsg" @change="handlerSearchChange"></kkday>
</template>
<div v-if="DataList.length==0 && ShowType!=2" class="blank-block">
<div v-if="DataList.length == 0 && ShowType != 2" class="blank-block">
<i class="iconfont iconchazhao"></i>
<p>請嘗試其他關鍵字或篩選條件</p>
</div>
......@@ -895,11 +924,11 @@
<q-dialog v-model="fullHeight" full-height>
<q-card class="column full-height" style="width: 500px">
<div class="moreTiaojiao">更多篩選條件</div>
<div class="full_listDiv" style="padding-bottom:20px">
<div class="full_listDiv" style="padding-bottom: 20px">
<span>價格:</span>
<q-input
class="full_price"
style="width:30%;height:45px;"
style="width: 30%; height: 45px"
v-model="qMsg.minPrice"
@input="changeData"
filled
......@@ -907,7 +936,7 @@
/>
<q-input
class="full_price"
style="width:30%;height:45px;"
style="width: 30%; height: 45px"
v-model="qMsg.maxPrice"
@input="changeData"
filled
......@@ -920,7 +949,7 @@
<q-checkbox
right-label
v-model="dayNum"
v-for="(item,index) in dayArray"
v-for="(item, index) in dayArray"
:label="item.text"
:key="index"
:val="item.id"
......@@ -934,7 +963,7 @@
<div class="q-gutter-sm">
<q-checkbox
v-model="WeekDay"
v-for="(item,index) in weekList"
v-for="(item, index) in weekList"
:val="item.value"
:label="item.label"
:key="index"
......@@ -944,10 +973,10 @@
</div>
</div>
<div class="full_btndiv">
<q-btn color="white" style="width:49%" text-color="black" label="清除" />
<q-btn color="white" style="width: 49%" text-color="black" label="清除" />
<q-btn
color="primary"
style="width:49%"
style="width: 49%"
label="套用"
v-close-popup
@click="goSearchHandler"
......@@ -960,19 +989,19 @@
<q-card>
<q-card-section>
<div class="text-h6">
搜尋行程
<i class="iconfont iconbaseline-close-px" @click="isShowDialog=false"></i>
搜尋行程11
<i class="iconfont iconbaseline-close-px" @click="isShowDialog = false"></i>
</div>
</q-card-section>
<q-separator />
<div style="max-height: 550px;padding:20px 30px 30px 30px" class="scroll">
<div style="max-height: 550px; padding: 20px 30px 30px 30px" class="scroll">
<div class="chosen-box">
<div class="chosen-tab">
<q-tabs v-model="tab" align="justify" narrow-indicator class="q-mb-md">
<q-tab class="text-purple" name="dest" label="目的地" />
<q-tab class="text-teal" name="kw" label="關鍵字" />
</q-tabs>
<div v-show="tab=='dest'">
<div v-show="tab == 'dest'">
<div class="q-mb-md">
<q-select
filled
......@@ -1015,7 +1044,7 @@
/>
</div>
</div>
<div v-show="tab=='kw'" class="q-mb-md">
<div v-show="tab == 'kw'" class="q-mb-md">
<q-input
filled
id="search_key"
......@@ -1029,7 +1058,7 @@
<q-input
filled
v-model="qMsg.startDate"
style="width:99%"
style="width: 99%"
:label="$t('search_date_begin')"
mask="date"
class="bg-grey-1"
......@@ -1077,10 +1106,10 @@
<q-btn
color="primary"
unelevated
style="width:100%;height:50px;margin-top:20px;"
style="width: 100%; height: 50px; margin-top: 20px"
filled
label="搜尋"
@click="isShowDialog=false,goSearchHandler()"
@click="(isShowDialog = false), goSearchHandler()"
/>
</div>
</div>
......@@ -1098,7 +1127,7 @@
<q-tab class="text-purple" name="dest" label="目的地" />
<q-tab class="text-teal" name="kw" label="關鍵字" />
</q-tabs>
<div v-show="tab=='dest'">
<div v-show="tab == 'dest'">
<div class="q-mb-md">
<q-select
filled
......@@ -1141,7 +1170,7 @@
/>
</div>
</div>
<div v-show="tab=='kw'" class="q-mb-md">
<div v-show="tab == 'kw'" class="q-mb-md">
<q-input
filled
id="search_key"
......@@ -1202,10 +1231,10 @@
<q-btn
color="primary"
unelevated
style="width:100%"
style="width: 100%"
filled
label="搜尋"
@click="showPopup=false,goSearchHandler()"
@click="(showPopup = false), goSearchHandler()"
/>
</div>
</div>
......@@ -1223,7 +1252,7 @@ export default {
popup,
searchBlock,
searchList,
kkday
kkday,
},
data() {
return {
......@@ -1238,56 +1267,56 @@ export default {
id: 1,
min: 1,
max: 1,
text: "1天"
text: "1天",
},
{
id: 2,
min: 2,
max: 2,
text: "2天"
text: "2天",
},
{
id: 3,
min: 3,
max: 3,
text: "3天"
text: "3天",
},
{
id: 4,
min: 4,
max: 4,
text: "4天"
text: "4天",
},
{
id: 5,
min: 5,
max: 5,
text: "5天"
text: "5天",
},
{
id: 6,
min: 6,
max: 6,
text: "6天"
text: "6天",
},
{
id: 7,
min: 7,
max: 8,
text: "7-8天"
text: "7-8天",
},
{
id: 8,
min: 9,
max: 10,
text: "9-10天"
text: "9-10天",
},
{
id: 9,
min: 10,
max: null,
text: "10天以上"
}
text: "10天以上",
},
],
flight: ["长荣"],
......@@ -1299,7 +1328,7 @@ export default {
borderRadius: "5px",
backgroundColor: "#027be3",
width: "5px",
opacity: 0.75
opacity: 0.75,
},
//地区样式
barStyle: {
......@@ -1307,7 +1336,7 @@ export default {
borderRadius: "9px",
backgroundColor: "#027be3",
width: "9px",
opacity: 0.2
opacity: 0.2,
},
//地区数据
areas: [],
......@@ -1315,62 +1344,62 @@ export default {
sortArray: [
{
label: "依推薦程度",
value: 1
value: 1,
},
{
label: "低價優先",
value: 2
value: 2,
},
{
label: "高價優先",
value: 3
value: 3,
},
{
label: "最快出發日",
value: 4
value: 4,
},
{
label: "最晚出發日",
value: 5
value: 5,
},
{
label: "天數少到多",
value: 6
value: 6,
},
{
label: "天數多到少",
value: 7
}
value: 7,
},
],
weekList: [
{
label: "星期日",
value: 0
value: 0,
},
{
label: "星期一",
value: 1
value: 1,
},
{
label: "星期二",
value: 2
value: 2,
},
{
label: "星期三",
value: 3
value: 3,
},
{
label: "星期四",
value: 4
value: 4,
},
{
label: "星期五",
value: 5
value: 5,
},
{
label: "星期六",
value: 6
}
value: 6,
},
],
showPopup: false,
tab: "dest",
......@@ -1378,7 +1407,7 @@ export default {
fl: "",
sl: "",
tl: "",
ful: ""
ful: "",
},
//查询参数
qMsg: {
......@@ -1399,8 +1428,8 @@ export default {
// pageIndex: 1,
// pageSize: 10,
// priceOrderByField: 4,
SeriesIds:"",
LineIds:"",
SeriesIds: "",
LineIds: "",
searchKey: "", // 搜索词
// startCityId: 0,
// PageCount: 0,
......@@ -1408,11 +1437,11 @@ export default {
dayNumList: [], // 天数
webSiteCategoryIds: "", // 分类Id
placeIds: "", // 目的地城市Id
orderBy: 0 // 排序 0默认 1价格升序 2价格降序
orderBy: 0, // 排序 0默认 1价格升序 2价格降序
},
ShowType: 0, //显示样式(0-豆腐格,1-列表)
//行程列表
DataList: []
DataList: [],
};
},
created() {},
......@@ -1440,7 +1469,7 @@ export default {
var qsearchDate = this.getUrlKey("qsearchDate", window.location.href);
var qsearchEndDate = this.getUrlKey("qsearchEndDate", window.location.href);
var areaId = this.getUrlKey("areaId", window.location.href);
var areaIds = this.getUrlKey("areaIds", window.location.href)
var areaIds = this.getUrlKey("areaIds", window.location.href);
var categoryId = this.getUrlKey("categoryId", window.location.href);
var seriesIds = this.getUrlKey("SeriesIds", window.location.href);
var lineIds = this.getUrlKey("LineIds", window.location.href);
......@@ -1457,7 +1486,7 @@ export default {
this.qMsg.areaId = Number(areaId);
}
if (areaIds) {
this.qMsg.areaIds = areaIds.split(',').map(item => Number(item));
this.qMsg.areaIds = areaIds.split(",").map((item) => Number(item));
}
if (categoryId) {
this.qMsg.categoryId = Number(categoryId);
......@@ -1497,8 +1526,8 @@ export default {
// pageSize: 10,
// priceOrderByField: 4,
searchKey: "", // 搜索词
SeriesIds:"",
LineIds:"",
SeriesIds: "",
LineIds: "",
// startCityId: 0,
// PageCount: 0,
// TotalCount: 0,
......@@ -1506,7 +1535,7 @@ export default {
webSiteCategoryIds: "", // 分类Id
placeIds: "", // 目的地城市Id
orderBy: 0 // 排序 0默认 1价格升序 2价格降序
orderBy: 0, // 排序 0默认 1价格升序 2价格降序
};
this.qMsg = msg;
this.goSearchHandler();
......@@ -1532,14 +1561,14 @@ export default {
this.apipost(
"ws_get_GetSearchArea",
{},
res => {
(res) => {
if (res.data.resultCode == 1) {
if (res.data.data) {
this.areas = res.data.data.AreaList;
}
}
},
err => {}
(err) => {}
);
},
searchFocusHandler() {
......@@ -1606,11 +1635,7 @@ export default {
companyId = groupinfo.siteList[0].companyId;
}
this.SearchResult =
this.qMsg.startDate +
"-" +
this.qMsg.endDate +
" " +
this.qMsg.searchKey;
this.qMsg.startDate + "-" + this.qMsg.endDate + " " + this.qMsg.searchKey;
let msg = {
pageIndex: this.qMsg.pageIndex,
pageSize: this.qMsg.pageSize,
......@@ -1632,8 +1657,8 @@ export default {
startCityId: this.qMsg.startCityId,
weekDayList: this.WeekDay,
dayNumList: this.dayNum,
SeriesIds:this.qMsg.SeriesIds,
LineIds:this.qMsg.LineIds,
SeriesIds: this.qMsg.SeriesIds,
LineIds: this.qMsg.LineIds,
};
if (localStorage.b2bUser) {
var b2bUser = JSON.parse(window.localStorage.getItem("b2bUser"));
......@@ -1644,7 +1669,7 @@ export default {
this.apipost(
"b2c_get_GetB2C2024TravelProductPage",
msg,
res => {
(res) => {
this.$q.loading.hide();
if (res.data.resultCode == 1) {
this.qMsg.PageCount = res.data.data.pageCount;
......@@ -1655,9 +1680,9 @@ export default {
}
}
},
err => {}
(err) => {}
);
}
}
},
},
};
</script>
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