<template>
<div>
<span class="btns" title="导出" @click="downLoadFile"></span>
</div>
</template>
<script>
import { mapState, mapActions } from "vuex";
export default {
mounted() {
scrollBox.init("booking_order", this.$store);
},
data() {
return {
deliveryVal: 0,
downLoadFileFlag:true,
url: "",
hostUrl: config.hostUrl,
shipMentOrderList: [],
permission: {},
num: 0,
code: 0,
so: 0,
status:0,
loading_date: '',
forwarder: 0,
query: {},
permission:{},
addSellList: [],
searchDatas: {
};
},
created() {
// var _this = this;
// var obj = {
// orderType: 'feeding-order',
// pagenum: _this.pageAAA,
// pagecounts: _this.page_countaaa,
// };
// this.$store.dispatch('getListData',obj);
},
watch: {
},
computed: {
...mapState({
headers: state => state.headers,
changeFlages: state => state.changeFlages,
searchData: state => state.shipment.searchData
})
},
methods: {
downLoadFile() { //点击事件
let shipmentPageExportIssueTime = localStorage.getItem('shipmentPageExportIssueTime')
if ( shipmentPageExportIssueTime && (new Date().getTime() - Number(shipmentPageExportIssueTime) > 0)) {
localStorage.removeItem('shipmentPageExportIssueTime')
shipmentPageExportIssueTime = null
}
if (!shipmentPageExportIssueTime) {
let url = this.hostUrl+`/cn/new/landing-order/export?&code=${this.searchData.code}&customer=${this.searchData.customer}&forwarder=${this.searchData.forwarder}&cports=${this.searchData.cports}&mports=${this.searchData.mports}&status=${this.searchData.status}&so=${this.searchData.so}&factory=${this.searchData.factory}&cabinet=${this.searchData.cabinet}&date=${this.searchData.date}&endDate=${this.searchData.endDate}+$ty`;
window.open(url);
localStorage.setItem('shipmentPageExportIssueTime', (new Date().getTime() + 1000 * 60 * 5).toString())
} else {
let minus = ((Number(shipmentPageExportIssueTime) - new Date().getTime()) / 1000 /60).toFixed(0)
if(minus==0){
minus=1;
}
var obj = {
title: '请求已发送,请'+minus+'分钟以后再操作',
flag: true,
type: 3,
btnGroup:['ok']
};
this.$store.commit('popup',obj);
}
},
本地存储5分钟在点击提示
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 2018.2.3 目标:身心健康,财富丰盛 好种子: 1早起健康早餐,种下健康的种子,回向群里姐妹及家人身心健康 ...
- 每年到这个时候,身边就会有很多人开始咳嗽、咳痰、流鼻涕、打喷嚏的,有些是感冒、有些是哮喘、有些是气管炎,有些的鼻炎...
- 下面选了最近十年里,十位名人所做的毕业演讲。那么多的故事与经历,其实只想告诉你一件事: 面对迷茫和不确定的未来,我...
- 2018.3.1 目标:身心健康,财富丰盛 好种子: 1早起健康早餐,种下健康的种子 2收拾家,回向女儿和众学子干...