master
lion 3 years ago
parent 7b75f2e48d
commit 3d160a1618

@ -2,5 +2,4 @@
ENV = 'production'
# base api
VUE_APP_BASE_API = ''
VUE_APP_BASE_API = 'https://dangxingjiaoyujidi.langye.net/'

@ -34,7 +34,7 @@
<Input class="inputwrap" v-model="searchFields.unit" placeholder="请输入单位" />
<Button type="primary" style="margin-right:10px" @click="searchload"></Button>
<Button type="primary" style="margin-right:10px" @click="resetload"></Button>
<!-- <Button type="primary" @click="exportExcel"></Button> -->
<Button type="primary" @click="exportExcel"></Button>
<!-- <Button type="primary" @click="searchload"></Button> -->
</div>
</slot>
@ -76,7 +76,10 @@
import LxHeader from "@/components/LxHeader/index.vue";
import {
listvisitor
} from "../../api/order/visitorder.js";
} from "../../api/order/visitorder.js";
import {
getToken
} from '@/utils/auth'
export default {
components: {
LxHeader
@ -108,15 +111,17 @@
tableHeight: 0,
clientHeight:0,
//
visitRange:[],
orderRange:[],
visitRange:['',''],
orderRange:['',''],
tokens:"",
baseurl:"",
searchFields: {
keyword: "",
start_date:"",
end_date:"",
order_start_date:"",
order_end_date:"",
// is_export:0,
is_export:0,
type:"",
unit:""
},
@ -214,7 +219,10 @@
var paginationHeight = 37; //
var topHeight = 50; //
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.tableHeight = tableHeight;
that.tableHeight = tableHeight;
that.tokens = getToken()
that.baseurl = process.env.VUE_APP_BASE_API
console.log("aa",process.env)
},
load() {
var that = this;
@ -223,18 +231,28 @@
page_size: this.paginations.page_size,
keyword:this.searchFields.keyword,
start_date:this.searchFields.start_date,
is_export:this.searchFields.is_export,
end_date:this.searchFields.end_date,
order_start_date:this.searchFields.order_start_date,
order_end_date:this.searchFields.order_end_date,
type:this.searchFields.type,
unit:this.searchFields.unit
}).then(res => {
if(that.searchFields.is_export==1){
var url = "api/admin/visit/order-detail-index?token="+that.tokens
for(var m in that.searchFields){
url +="&"+m+"="+that.searchFields[m]
}
url = that.baseurl + url
console.log(url)
window.open(url, '_blank')
that.searchFields.is_export=0
return;
}
let _data = [];
console.log(res)
// let result = Object.assign(_data, res.data);
for(var m of res.data){
var mod ={};
mod.date = m.visit_order.date +" "+ m.visit_order.time
mod.leader = m.visit_order.type==1 ? m.visit_order.leader : m.name
mod.mobile = m.visit_order.mobile
@ -281,17 +299,14 @@
type:"",
unit:""
},
this.visitRange = []
this.orderRange = []
this.visitRange = ['','']
this.orderRange = ['','']
this.load()
},
exportExcel(){
this.searchFields.is_export = 1
listvisitor({
is_export:this.searchFields.is_export
}).then(res => {
console.log(res)
})
this.load()
},
handleCurrentChange(page) {
this.paginations.page = page;

Loading…
Cancel
Save