|
|
@@ -116,9 +116,15 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button @click="editRow(performanceId)">设置复审</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="download"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-download"
|
|
|
+ :loading="downloading"
|
|
|
+ :disabled="totalElements < 1"
|
|
|
+ >导出节目
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
- <!-- </el-col> -->
|
|
|
- <!-- </el-row> -->
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<el-table
|
|
|
@@ -443,27 +449,36 @@ export default {
|
|
|
}
|
|
|
return '';
|
|
|
},
|
|
|
- beforeGetData() {
|
|
|
+ getBefore() {
|
|
|
let data = {
|
|
|
sort: 'score,desc',
|
|
|
- query: {
|
|
|
- programmeStatus: ['SUBMIT']
|
|
|
- }
|
|
|
+ query: {}
|
|
|
};
|
|
|
- if (this.performanceId) {
|
|
|
- data.query.performanceId = this.performanceId;
|
|
|
+ if (this.form.gradingOrganizationId) {
|
|
|
+ data.query.gradingOrganizationId = this.form.gradingOrganizationId;
|
|
|
}
|
|
|
- if (!this.review) {
|
|
|
- data.query.programmeStatus.push('REVIEW_FAILED');
|
|
|
+ if (this.form.organizationId) {
|
|
|
+ data.query.organizationId = this.form.organizationId;
|
|
|
}
|
|
|
if (this.form.specialtyId) {
|
|
|
data.query.code = this.getCode(this.form.specialtyId);
|
|
|
}
|
|
|
+ if (this.performanceId) {
|
|
|
+ data.query.performanceId = this.performanceId;
|
|
|
+ }
|
|
|
+ if (this.form.name) {
|
|
|
+ data.query.name = this.form.name;
|
|
|
+ }
|
|
|
if (this.form.id) {
|
|
|
data.query.id = this.form.id;
|
|
|
}
|
|
|
return data;
|
|
|
},
|
|
|
+ beforeGetData() {
|
|
|
+ let data = this.getBefore();
|
|
|
+ data.query.programmeStatus = 'SUBMIT';
|
|
|
+ return data;
|
|
|
+ },
|
|
|
toggleMultipleMode(multipleMode) {
|
|
|
this.multipleMode = multipleMode;
|
|
|
if (!multipleMode) {
|
|
|
@@ -609,6 +624,33 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
+ },
|
|
|
+ download() {
|
|
|
+ this.downloading = true;
|
|
|
+
|
|
|
+ let data = this.getBefore();
|
|
|
+ data.size = 2000;
|
|
|
+ this.$axios
|
|
|
+ .get('/programme/excelScore', {
|
|
|
+ responseType: 'blob',
|
|
|
+ params: data
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ console.log(res);
|
|
|
+ this.downloading = false;
|
|
|
+ const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
|
|
|
+ const link = document.createElement('a');
|
|
|
+ link.href = downloadUrl;
|
|
|
+ link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ link.remove();
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.downloading = false;
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|