|
@@ -54,7 +54,7 @@
|
|
|
<span class="lable">车牌</span>
|
|
|
<el-input v-model.trim="conditions.carPlate" placeholder="请输入内容车牌" style="width:150px;" />
|
|
|
</div>
|
|
|
- <el-select v-model="conditions.transEvaluate" placeholder="请选择结论" style="width:120px;margin-left:10px">
|
|
|
+ <el-select v-model="conditions.transEvaluate" placeholder="请选择结论" style="width:120px;margin-left:10px" clearable>
|
|
|
<el-option
|
|
|
v-for="item in transEvaluates"
|
|
|
:key="item.value"
|
|
@@ -63,7 +63,7 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
<div class="block"><el-button type="primary" @click="search">查询</el-button></div>
|
|
|
- <div class="block"><el-button type="primary" @click="exportExcel">导出EXCEL</el-button></div>
|
|
|
+ <div class="block"><el-button type="primary" :disabled="downloadLoading" @click="exportExcel">导出EXCEL</el-button></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -173,6 +173,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
tabType: 0,
|
|
|
+ downloadLoading: false,
|
|
|
conditions: {
|
|
|
page: 1,
|
|
|
limit: 10,
|
|
@@ -311,7 +312,8 @@ export default {
|
|
|
const filterVal = Object.keys(enums)
|
|
|
|
|
|
data = this.formatJson(filterVal, data)
|
|
|
-
|
|
|
+ this.downloadLoading = true
|
|
|
+ const loadingInstance = this.$loading({ text: '数据正在导出请稍等……', fullscreen: true })
|
|
|
import('@/vendor/Export2Excel').then(excel => {
|
|
|
excel.export_json_to_excel({
|
|
|
header: tHeader,
|
|
@@ -320,6 +322,7 @@ export default {
|
|
|
autoWidth: this.autoWidth,
|
|
|
bookType: this.bookType
|
|
|
})
|
|
|
+ loadingInstance.close()
|
|
|
this.downloadLoading = false
|
|
|
})
|
|
|
},
|
|
@@ -327,7 +330,7 @@ export default {
|
|
|
formatJson(filterVal, jsonData) {
|
|
|
return jsonData.map((v, index) => filterVal.map(j => {
|
|
|
if (j === 'index') return index + 1
|
|
|
- if (j === 'data') return parseTime(v.transLoadTime, '{y}-{m}-{d}')
|
|
|
+ if (j === 'date') return parseTime(v.transLoadTime, '{y}-{m}-{d}')
|
|
|
if (j === 'transEvaluate') {
|
|
|
return this.formateTransEvaluate(v[j])
|
|
|
} else {
|