|
@@ -195,6 +195,14 @@
|
|
|
:disabled="totalElements < 1"
|
|
:disabled="totalElements < 1"
|
|
|
>导出
|
|
>导出
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ @click="downloadProgramme"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
|
+ :loading="downloading"
|
|
|
|
|
+ :disabled="totalElements < 1"
|
|
|
|
|
+ >导出节目
|
|
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
@@ -643,6 +651,38 @@ export default {
|
|
|
this.isShow = true;
|
|
this.isShow = true;
|
|
|
this.$refs.public.dataApi(row.id);
|
|
this.$refs.public.dataApi(row.id);
|
|
|
},
|
|
},
|
|
|
|
|
+ getParmers() {
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ sort: 'programmeStatus,desc',
|
|
|
|
|
+ size: 10000,
|
|
|
|
|
+ query: {}
|
|
|
|
|
+ };
|
|
|
|
|
+ if (this.form.competitionGroup) {
|
|
|
|
|
+ data.query.competitionGroup = this.form.competitionGroup;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.form.levelSettingId) {
|
|
|
|
|
+ data.query.levelSettingId = this.form.levelSettingId;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.form.gradingOrganizationId) {
|
|
|
|
|
+ data.query.gradingOrganizationId = this.form.gradingOrganizationId;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.organizationId) {
|
|
|
|
|
+ data.query.form.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.programmeStatus) {
|
|
|
|
|
+ data.query.programmeStatus = this.form.programmeStatus;
|
|
|
|
|
+ }
|
|
|
|
|
+ return data;
|
|
|
|
|
+ },
|
|
|
download() {
|
|
download() {
|
|
|
this.downloading = true;
|
|
this.downloading = true;
|
|
|
|
|
|
|
@@ -698,6 +738,31 @@ export default {
|
|
|
this.$message.error(e.error);
|
|
this.$message.error(e.error);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ downloadProgramme() {
|
|
|
|
|
+ this.downloading = true;
|
|
|
|
|
+ let data = this.getParmers();
|
|
|
|
|
+ this.$axios
|
|
|
|
|
+ .get('/programme/excel', {
|
|
|
|
|
+ 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);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
operation1() {
|
|
operation1() {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
title: '提示',
|
|
title: '提示',
|