Commit b1fa7e78 authored by 黄奎's avatar 黄奎

防止页面重复提交

parent 79be75d3
...@@ -20,6 +20,12 @@ ...@@ -20,6 +20,12 @@
padding-left: 20px; padding-left: 20px;
} }
.comTextdisClick {
background-color: #d1d1d1;
color: #fff;
border: 1px solid #d1d1d1;
}
</style> </style>
<template> <template>
<div> <div>
...@@ -102,8 +108,9 @@ ...@@ -102,8 +108,9 @@
<tfoot> <tfoot>
<tr> <tr>
<td colspan="6"> <td colspan="6">
<input type="button" class="normalBtn" @click="SaveData()" value="保存" /> <input type="button" class="normalBtn" :class="{'comTextdisClick':isSave}" @click="SaveData()" value="保存" />
<input type="button" class="normalBtn" @click="DownLoadFile()" value="下载" /> <input type="button" class="normalBtn" :class="{'comTextdisClick':isSave}" @click="DownLoadFile()"
value="下载" />
</td> </td>
</tr> </tr>
</tfoot> </tfoot>
...@@ -128,20 +135,25 @@ ...@@ -128,20 +135,25 @@
Remarks: "", Remarks: "",
Details_Extends: [] Details_Extends: []
}, },
isSave: false,
TCIDS: "" TCIDS: ""
} }
}, },
methods: { methods: {
DownLoadFile(item) { DownLoadFile(item) {
if (!this.isSave) {
this.isSave = true;
let msg = { let msg = {
TCIDS: this.TCIDS TCIDS: this.TCIDS
}; };
this.loading = true; this.loading = true;
var fileName = "バス手配依頼書" + this.DataObj.TeamNum + ".xls"; var fileName = "バス手配依頼書" + this.DataObj.TeamNum + ".xls";
this.GetLocalFile("bus_get_DownLoadBusConfig", msg,fileName, this.GetLocalFile("bus_get_DownLoadBusConfig", msg, fileName,
res => { res => {
this.loading = false; this.loading = false;
this.isSave = false;
}); });
}
}, },
GetData() { GetData() {
this.loading = true; this.loading = true;
...@@ -151,13 +163,14 @@ ...@@ -151,13 +163,14 @@
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.DataObj = res.data.data; this.DataObj = res.data.data;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}, err => {}) }, err => {})
}, },
SaveData() { SaveData() {
if (!this.isSave) {
this.isSave = true;
this.DataObj.TCIDS = this.TCIDS; this.DataObj.TCIDS = this.TCIDS;
this.apipost('bus_Post_SaveBusDownLoadData', this.DataObj, res => { this.apipost('bus_Post_SaveBusDownLoadData', this.DataObj, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -166,8 +179,10 @@ ...@@ -166,8 +179,10 @@
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
this.isSave = false;
}, err => {}) }, err => {})
} }
}
}, },
mounted() { mounted() {
//this.TCIDS = this.$route.query.TCID; //this.TCIDS = this.$route.query.TCID;
......
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