jinhui.wang

校验增加,下载逻辑修改

......@@ -125,6 +125,8 @@ export default {
},
//确定配舱
submit() {
this.$refs.form.validate(val => {
if (val) {
this.loading = true;
let arr = [];
this.tableData.forEach((item) => {
......@@ -182,6 +184,8 @@ export default {
this.loading = false;
this.msgWarning('航班号或航班日期不能为空')
}
}
})
},
dialogBeforeClose() {
this.cleaerForm();
......
......@@ -125,6 +125,8 @@ export default {
},
//确定配舱
submit() {
this.$refs.form.validate(val => {
if (val) {
this.loading = true;
let arr = [];
this.tableData.forEach((item) => {
......@@ -182,6 +184,8 @@ export default {
this.loading = false;
this.msgWarning('航班号或航班日期不能为空')
}
}
})
},
dialogBeforeClose() {
this.cleaerForm();
......
......@@ -23,24 +23,26 @@
:loading="loading" @currentChange="currentChange">
<template v-slot:queryParameter="scope">
<el-popover placement="top" width="350" trigger="hover">
<ul v-if="scope.row.queryParameter != null && scope.row.queryParameter != ''">
<ul style="height:300px;overflow-y:scroll;"
v-if="scope.row.queryParameter != null && scope.row.queryParameter != ''">
<li v-for="(item, index) in JSON.stringify(JSON.parse(scope.row.queryParameter)).split(',')"
:key="index">{{ item }}</li>
:key="index" style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li>
</ul>
<el-button type="text" slot="reference">查 看</el-button>
</el-popover>
</template>
<template v-slot:downloadPath="scope">
<el-button v-if="scope.row.downloadPath != null" type="text" size="mini" icon="el-icon-download"
@click="download(scope.row)">下载
<el-button v-if="scope.row.downloadPath != null && scope.row.status == 1" type="text" size="mini"
icon="el-icon-download" @click="download(scope.row)">下载
</el-button>
<span v-else>暂无下载</span>
</template>
</Tables>
</div>
</template>
<script>
import { findArchiveCargoLog } from "@/api/system/logConfig.js";
import { findArchiveCargoLog, isExistZip } from "@/api/system/logConfig.js";
import { downLoadZip } from "@/utils/zipdownload";
export default {
......@@ -55,7 +57,7 @@ export default {
tableHeader: this.tableHeaders['archiveData'],
tableHeight: null,
total: 0,
loading: false
loading: false,
}
},
created() {
......@@ -91,10 +93,19 @@ export default {
})
},
download(val) {
let url = 'entrymanager/entryExcel/download'
isExistZip(val).then(res => {
if (res.code === 200) {
setTimeout(() => {
let url = '/archiveCargoLog/downloadZip'
let filename = val.packageName
downLoadZip(url, val, filename)
}, 500);
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
currentChange(val) {
this.selectForm.page = val.page
......