|
@@ -4,7 +4,7 @@
|
|
<el-form ref="FilterForm" label-position="left" label-width="90px" inline>
|
|
<el-form ref="FilterForm" label-position="left" label-width="90px" inline>
|
|
<el-form-item label="下载时间:">
|
|
<el-form-item label="下载时间:">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
- v-model="filter.operateDate"
|
|
|
|
|
|
+ v-model="filter.operateTime"
|
|
type="date"
|
|
type="date"
|
|
placeholder="下载时间"
|
|
placeholder="下载时间"
|
|
value-format="timestamp"
|
|
value-format="timestamp"
|
|
@@ -22,7 +22,13 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="下载用途:">
|
|
<el-form-item label="下载用途:">
|
|
- <el-select v-model="filter.useScene" placeholder="下载用途" clearable>
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="filter.useScene"
|
|
|
|
+ placeholder="下载用途"
|
|
|
|
+ clearable
|
|
|
|
+ multiple
|
|
|
|
+ class="width-400"
|
|
|
|
+ >
|
|
<el-option
|
|
<el-option
|
|
v-for="item in useScenes"
|
|
v-for="item in useScenes"
|
|
:key="item.name"
|
|
:key="item.name"
|
|
@@ -55,18 +61,18 @@
|
|
width="70"
|
|
width="70"
|
|
:index="indexMethod"
|
|
:index="indexMethod"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
- <el-table-column prop="operateDate" label="下载时间">
|
|
|
|
|
|
+ <el-table-column prop="operateTime" label="下载时间" width="170">
|
|
<span slot-scope="scope">{{
|
|
<span slot-scope="scope">{{
|
|
- scope.row.operateDate | timestampFilter
|
|
|
|
|
|
+ scope.row.operateTime | timestampFilter
|
|
}}</span>
|
|
}}</span>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="userName" label="下载人员"></el-table-column>
|
|
<el-table-column prop="userName" label="下载人员"></el-table-column>
|
|
- <el-table-column prop="fileName" label="文件" min-width="200">
|
|
|
|
|
|
+ <el-table-column prop="fileName" label="文件" min-width="150">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div
|
|
<div
|
|
class="cont-link"
|
|
class="cont-link"
|
|
title="点击下载文件"
|
|
title="点击下载文件"
|
|
- @click="toDownloadFile(scope.row)"
|
|
|
|
|
|
+ @click="toDownload(scope.row)"
|
|
>
|
|
>
|
|
{{ scope.row.fileName }}
|
|
{{ scope.row.fileName }}
|
|
</div>
|
|
</div>
|
|
@@ -109,8 +115,9 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { USE_TYPE, BOOLEAN_TYPE } from "../../../constants/enumerate";
|
|
import { USE_TYPE, BOOLEAN_TYPE } from "../../../constants/enumerate";
|
|
-import { downloadList, useSceneList } from "../api";
|
|
|
|
|
|
+import { downloadList, useSceneList, downloadBusinessData } from "../api";
|
|
import SignDownloadData from "../components/SignDownloadData.vue";
|
|
import SignDownloadData from "../components/SignDownloadData.vue";
|
|
|
|
+import { downloadByApi } from "@/plugins/download";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "student-manage",
|
|
name: "student-manage",
|
|
@@ -118,9 +125,9 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
filter: {
|
|
filter: {
|
|
- operateDate: "",
|
|
|
|
|
|
+ operateTime: "",
|
|
used: null,
|
|
used: null,
|
|
- useScene: null
|
|
|
|
|
|
+ useScene: []
|
|
},
|
|
},
|
|
current: 1,
|
|
current: 1,
|
|
size: this.GLOBAL.pageSize,
|
|
size: this.GLOBAL.pageSize,
|
|
@@ -130,7 +137,8 @@ export default {
|
|
curRow: {},
|
|
curRow: {},
|
|
BOOLEAN_TYPE,
|
|
BOOLEAN_TYPE,
|
|
USE_TYPE,
|
|
USE_TYPE,
|
|
- multipleSelection: []
|
|
|
|
|
|
+ multipleSelection: [],
|
|
|
|
+ downloading: false
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -148,6 +156,7 @@ export default {
|
|
pageNumber: this.current,
|
|
pageNumber: this.current,
|
|
pageSize: this.size
|
|
pageSize: this.size
|
|
};
|
|
};
|
|
|
|
+ datas.useScene = datas.useScene.join();
|
|
const data = await downloadList(datas);
|
|
const data = await downloadList(datas);
|
|
this.dataList = data.records;
|
|
this.dataList = data.records;
|
|
this.total = data.total;
|
|
this.total = data.total;
|
|
@@ -168,12 +177,19 @@ export default {
|
|
}
|
|
}
|
|
this.$refs.SignDownloadData.open();
|
|
this.$refs.SignDownloadData.open();
|
|
},
|
|
},
|
|
- toDownloadFile(row) {
|
|
|
|
- if (!row.filePath) {
|
|
|
|
- this.$message.error("文件路径不存在!");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- window.open(row.filePath);
|
|
|
|
|
|
+ async toDownload(row) {
|
|
|
|
+ if (this.downloading) return;
|
|
|
|
+ this.downloading = true;
|
|
|
|
+
|
|
|
|
+ const res = await downloadByApi(() => {
|
|
|
|
+ return downloadBusinessData(row.examSyncTotalId, false);
|
|
|
|
+ }).catch(e => {
|
|
|
|
+ this.$message.error(e || "下载失败,请重新尝试!");
|
|
|
|
+ });
|
|
|
|
+ this.downloading = false;
|
|
|
|
+
|
|
|
|
+ if (!res) return;
|
|
|
|
+ this.$message.success("下载成功!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|