|
|
|
@ -7,27 +7,21 @@
|
|
|
|
<div slot="content"></div>
|
|
|
|
<div slot="content"></div>
|
|
|
|
<slot>
|
|
|
|
<slot>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker class="vm10" v-model="visitRange" value-format="yyyy-MM-dd" type="daterange"
|
|
|
|
class="vm10"
|
|
|
|
range-separator="至" start-placeholder="参观开始时间" end-placeholder="参观结束时间">
|
|
|
|
v-model="visitRange"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
|
|
|
type="daterange"
|
|
|
|
|
|
|
|
range-separator="至"
|
|
|
|
|
|
|
|
start-placeholder="参观开始时间"
|
|
|
|
|
|
|
|
end-placeholder="参观结束时间">
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
<el-date-picker
|
|
|
|
<el-select style="margin-left: 10px;margin-right: 10px;" v-model="searchFields.time" placeholder="预约时段">
|
|
|
|
class="vm10"
|
|
|
|
<el-option value="">
|
|
|
|
v-model="orderRange"
|
|
|
|
</el-option>
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
<el-option v-for="item in parameters.visittime" :key="item.id" :label="item.value" :value="item.value">
|
|
|
|
type="daterange"
|
|
|
|
</el-option>
|
|
|
|
range-separator="至"
|
|
|
|
|
|
|
|
start-placeholder="订单开始时间"
|
|
|
|
</el-select>
|
|
|
|
end-placeholder="订单结束时间">
|
|
|
|
<el-date-picker class="vm10" v-model="orderRange" value-format="yyyy-MM-dd" type="daterange"
|
|
|
|
|
|
|
|
range-separator="至" start-placeholder="订单开始时间" end-placeholder="订单结束时间">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
<el-select class="vm10 vm15" v-model="searchFields.type" placeholder="请选择类型">
|
|
|
|
<el-select class="vm10 vm15" v-model="searchFields.type" placeholder="请选择类型">
|
|
|
|
<el-option v-for="item in parameters.type_list" :key="item.id" :label="item.value"
|
|
|
|
<el-option v-for="item in parameters.type_list" :key="item.id" :label="item.value" :value="item.id">
|
|
|
|
:value="item.id">
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
<Input class="inputwrap" v-model="searchFields.keyword" placeholder="请输入关键词" />
|
|
|
|
<Input class="inputwrap" v-model="searchFields.keyword" placeholder="请输入关键词" />
|
|
|
|
@ -87,6 +81,31 @@
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
parameters: {
|
|
|
|
parameters: {
|
|
|
|
|
|
|
|
visittime: [{
|
|
|
|
|
|
|
|
value: "09:00-10:00",
|
|
|
|
|
|
|
|
id: "1"
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: "10:00-11:00",
|
|
|
|
|
|
|
|
id: "2"
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: "11:00-12:00",
|
|
|
|
|
|
|
|
id: "3"
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: "12:00-13:00",
|
|
|
|
|
|
|
|
id: "4"
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: "13:00-14:00",
|
|
|
|
|
|
|
|
id: "41"
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: "14:00-15:00",
|
|
|
|
|
|
|
|
id: "51"
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: "15:00-16:00",
|
|
|
|
|
|
|
|
id: "61"
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: "16:00-17:00",
|
|
|
|
|
|
|
|
id: "71"
|
|
|
|
|
|
|
|
}],
|
|
|
|
type_list: [{
|
|
|
|
type_list: [{
|
|
|
|
value: '团体',
|
|
|
|
value: '团体',
|
|
|
|
id: "1"
|
|
|
|
id: "1"
|
|
|
|
@ -123,7 +142,8 @@
|
|
|
|
order_end_date: "",
|
|
|
|
order_end_date: "",
|
|
|
|
is_export: 0,
|
|
|
|
is_export: 0,
|
|
|
|
type: "",
|
|
|
|
type: "",
|
|
|
|
unit:""
|
|
|
|
unit: "",
|
|
|
|
|
|
|
|
time: ""
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tableData: [],
|
|
|
|
tableData: [],
|
|
|
|
paginations: {
|
|
|
|
paginations: {
|
|
|
|
@ -220,32 +240,38 @@
|
|
|
|
var topHeight = 50; //页面 头部
|
|
|
|
var topHeight = 50; //页面 头部
|
|
|
|
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
|
|
|
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
|
|
|
that.tableHeight = tableHeight;
|
|
|
|
that.tableHeight = tableHeight;
|
|
|
|
that.tokens = getToken()
|
|
|
|
that.baseurl = location.host; //process.env.VUE_APP_BASE_API
|
|
|
|
that.baseurl = process.env.VUE_APP_BASE_API
|
|
|
|
|
|
|
|
console.log("aa", process.env)
|
|
|
|
console.log("aa", process.env)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
load() {
|
|
|
|
load(is_export) {
|
|
|
|
|
|
|
|
console.log(is_export)
|
|
|
|
var that = this;
|
|
|
|
var that = this;
|
|
|
|
listvisitor({
|
|
|
|
listvisitor({
|
|
|
|
page: this.paginations.page,
|
|
|
|
page: this.paginations.page,
|
|
|
|
page_size: this.paginations.page_size,
|
|
|
|
page_size: this.paginations.page_size,
|
|
|
|
keyword: this.searchFields.keyword,
|
|
|
|
keyword: this.searchFields.keyword,
|
|
|
|
start_date: this.searchFields.start_date,
|
|
|
|
start_date: this.searchFields.start_date,
|
|
|
|
is_export:this.searchFields.is_export,
|
|
|
|
//is_export: this.searchFields.is_export,
|
|
|
|
end_date: this.searchFields.end_date,
|
|
|
|
end_date: this.searchFields.end_date,
|
|
|
|
order_start_date: this.searchFields.order_start_date,
|
|
|
|
order_start_date: this.searchFields.order_start_date,
|
|
|
|
order_end_date: this.searchFields.order_end_date,
|
|
|
|
order_end_date: this.searchFields.order_end_date,
|
|
|
|
type: this.searchFields.type,
|
|
|
|
type: this.searchFields.type,
|
|
|
|
unit:this.searchFields.unit
|
|
|
|
unit: this.searchFields.unit,
|
|
|
|
|
|
|
|
time: this.searchFields.time
|
|
|
|
}).then(res => {
|
|
|
|
}).then(res => {
|
|
|
|
if(that.searchFields.is_export==1){
|
|
|
|
let tokens = getToken();
|
|
|
|
var url = "api/admin/visit/order-detail-index?token="+that.tokens
|
|
|
|
console.log(is_export)
|
|
|
|
|
|
|
|
console.log(tokens)
|
|
|
|
|
|
|
|
console.log(that.searchFields.is_export)
|
|
|
|
|
|
|
|
if (is_export) {
|
|
|
|
|
|
|
|
var url = "/api/admin/visit/order-detail-index?token=" + tokens
|
|
|
|
|
|
|
|
console.log(url)
|
|
|
|
for (var m in that.searchFields) {
|
|
|
|
for (var m in that.searchFields) {
|
|
|
|
url += "&" + m + "=" + that.searchFields[m]
|
|
|
|
url += "&" + m + "=" + that.searchFields[m]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
url = that.baseurl + url
|
|
|
|
url = that.baseurl + url
|
|
|
|
console.log(url)
|
|
|
|
console.log(url)
|
|
|
|
window.open(url, '_blank')
|
|
|
|
window.open("http://" + url, '_blank')
|
|
|
|
that.searchFields.is_export = 0
|
|
|
|
that.searchFields.is_export = 0
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -304,9 +330,8 @@
|
|
|
|
this.load()
|
|
|
|
this.load()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
exportExcel() {
|
|
|
|
exportExcel() {
|
|
|
|
this.searchFields.is_export = 1
|
|
|
|
this.searchFields.is_export = 1;
|
|
|
|
this.load()
|
|
|
|
this.load(true);
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleCurrentChange(page) {
|
|
|
|
handleCurrentChange(page) {
|
|
|
|
this.paginations.page = page;
|
|
|
|
this.paginations.page = page;
|
|
|
|
@ -322,19 +347,23 @@
|
|
|
|
margin: 10px;
|
|
|
|
margin: 10px;
|
|
|
|
margin-left: 0;
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.inputwrap input {
|
|
|
|
.inputwrap input {
|
|
|
|
height: 40px;
|
|
|
|
height: 40px;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.inputwrap .ivu-input-suffix {
|
|
|
|
.inputwrap .ivu-input-suffix {
|
|
|
|
line-height: 40px !important;
|
|
|
|
line-height: 40px !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.vm10 {
|
|
|
|
.vm10 {
|
|
|
|
vertical-align: middle;
|
|
|
|
vertical-align: middle;
|
|
|
|
margin: 10px;
|
|
|
|
margin: 10px;
|
|
|
|
margin-left: 0;
|
|
|
|
margin-left: 0;
|
|
|
|
width: 360px !important;
|
|
|
|
width: 360px !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.vm15 {
|
|
|
|
.vm15 {
|
|
|
|
width: 150px !important;
|
|
|
|
width: 150px !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|