|
|
@@ -4,35 +4,15 @@
|
|
|
<el-form :model="form" inline size="mini" label-width="100px">
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="活动名称">
|
|
|
+ <el-form-item label="展演活动名称">
|
|
|
<el-select
|
|
|
v-model="performanceId"
|
|
|
- clearable
|
|
|
filterable
|
|
|
- placeholder="活动名称"
|
|
|
+ placeholder="展演活动名称"
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in performances"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="考级机构名称">
|
|
|
- <el-select
|
|
|
- v-model="gradingOrganizationId"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- placeholder="考级机构"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in gradingOrganizationIdOptions"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
|
@@ -41,18 +21,12 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8"
|
|
|
- ><el-form-item label="考级点名称">
|
|
|
- <el-input placeholder="考级点名称" v-model="search" clearable></el-input> </el-form-item
|
|
|
- ></el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="参赛专业">
|
|
|
<el-cascader
|
|
|
ref="artCascader"
|
|
|
style="width: 100%"
|
|
|
- v-model="specialtyId"
|
|
|
+ v-model="form.specialtyId"
|
|
|
:props="optionProps"
|
|
|
:options="artTypes"
|
|
|
:show-all-levels="false"
|
|
|
@@ -62,93 +36,86 @@
|
|
|
</el-cascader>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8"
|
|
|
- ><el-form-item label="参赛组别">
|
|
|
- <el-select v-model="competitionGroup" clearable filterable placeholder="参赛组别">
|
|
|
- <el-option
|
|
|
- v-for="item in competitionGroupOptions"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select> </el-form-item
|
|
|
- ></el-col>
|
|
|
- <el-col :span="8"
|
|
|
- ><el-form-item label="参赛级别" v-if="competitionGroup">
|
|
|
- <el-select
|
|
|
- v-model="levelSettingId"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- placeholder="参赛级别"
|
|
|
- style="width: 100%"
|
|
|
- v-if="competitionGroup == 'SINGLE'"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in levelSingleOptions"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- <span style="float: left">{{ item.label }}</span>
|
|
|
- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.desc }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <el-select
|
|
|
- v-model="levelSettingId"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- placeholder="请选择"
|
|
|
- style="width: 100%"
|
|
|
- v-else
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in levelCollectiveOptions"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- <span style="float: left">{{ item.label }}</span>
|
|
|
- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.desc }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="节目名称">
|
|
|
- <el-input placeholder="节目名称" v-model="name" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="指导老师">
|
|
|
- <el-input placeholder="指导老师" v-model="instructor" clearable></el-input>
|
|
|
+ <el-input placeholder="节目名称" v-model="form.name" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-form-item>
|
|
|
- <el-button @click="canAdd" type="primary" icon="el-icon-search">查询 </el-button>
|
|
|
- <el-button @click="addRow" type="primary" icon="el-icon-plus" v-if="add">添加 </el-button>
|
|
|
- <el-upload
|
|
|
- :action="uploadUrl"
|
|
|
- :before-upload="beforeUpload"
|
|
|
- :headers="headers"
|
|
|
- :show-file-list="false"
|
|
|
- ref="upload"
|
|
|
- :on-success="onSuccess"
|
|
|
- class="uploader"
|
|
|
- :on-error="onfail"
|
|
|
+ <el-collapse-transition>
|
|
|
+ <div v-show="showMore">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="考级机构名称">
|
|
|
+ <el-select
|
|
|
+ v-model="form.gradingOrganizationId"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="考级机构"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in gradingOrganizationIdOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="承办单位名称">
|
|
|
+ <el-select
|
|
|
+ v-model="form.organizationId"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="承办单位"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in organizationIdOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8"
|
|
|
+ ><el-form-item label="考级点名称">
|
|
|
+ <el-input
|
|
|
+ placeholder="考级点名称"
|
|
|
+ v-model="search"
|
|
|
+ clearable
|
|
|
+ ></el-input> </el-form-item
|
|
|
+ ></el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </el-collapse-transition>
|
|
|
+ <div style="width:100%;textAlign:center;margin-bottom:10px;">
|
|
|
+ <el-button
|
|
|
+ class="more"
|
|
|
+ round
|
|
|
+ type="primary"
|
|
|
+ :plain="!showMore"
|
|
|
+ :icon="showMore ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
|
|
|
+ @click="showMore = !showMore"
|
|
|
+ size="mini"
|
|
|
+ >{{ showMore ? '隐藏查询区域' : '显示查询区域' }}</el-button
|
|
|
>
|
|
|
- <el-button slot="trigger" type="primary" icon="el-icon-upload2" v-if="add">批量上传</el-button>
|
|
|
- </el-upload>
|
|
|
+ </div>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button @click="getData" type="primary" icon="el-icon-search">查询 </el-button>
|
|
|
<el-button
|
|
|
- @click="download"
|
|
|
+ @click="downloadProgramme"
|
|
|
type="primary"
|
|
|
icon="el-icon-download"
|
|
|
:loading="downloading"
|
|
|
:disabled="totalElements < 1"
|
|
|
- >导出
|
|
|
+ >导出节目
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
@@ -167,32 +134,16 @@
|
|
|
<!-- <el-table-column prop="id" label="ID" width="100"> </el-table-column> -->
|
|
|
<el-table-column prop="name" label="节目名称"> </el-table-column>
|
|
|
<el-table-column prop="specialty" label="参赛专业"> </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="competitionGroup"
|
|
|
- label="参赛组别"
|
|
|
- :formatter="competitionGroupFormatter"
|
|
|
- min-width="70"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column prop="competitionGroup" label="参赛组别" min-width="70"> </el-table-column>
|
|
|
<el-table-column prop="level" label="参赛级别" min-width="70"> </el-table-column>
|
|
|
<el-table-column prop="quantity" label="参赛人数" min-width="70"> </el-table-column>
|
|
|
<el-table-column prop="gradingOrganization" label="考级机构" show-overflow-tooltip min-width="160">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="organization" label="承办单位" min-width="160"> </el-table-column>
|
|
|
<el-table-column prop="examPoint" label="考级点" min-width="160"> </el-table-column>
|
|
|
- <el-table-column prop="contact" label="联系人" min-width="68"> </el-table-column>
|
|
|
- <el-table-column prop="phone" label="联系电话" min-width="95"> </el-table-column>
|
|
|
<el-table-column prop="award" label="获奖情况" min-width="95"> </el-table-column>
|
|
|
</el-table>
|
|
|
<div class="pagination-wrapper">
|
|
|
- <!-- <div class="multiple-mode-wrapper">
|
|
|
- <el-button v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
|
|
|
- <el-button-group v-else>
|
|
|
- <el-button @click="operation1">批量操作1</el-button>
|
|
|
- <el-button @click="operation2">批量操作2</el-button>
|
|
|
- <el-button @click="toggleMultipleMode(false)">取消</el-button>
|
|
|
- </el-button-group>
|
|
|
- </div> -->
|
|
|
<el-pagination
|
|
|
background
|
|
|
@size-change="onSizeChange"
|
|
|
@@ -211,8 +162,6 @@
|
|
|
import delChild from '@/mixins/delChild';
|
|
|
import { mapState } from 'vuex';
|
|
|
import pageableTable from '@/mixins/pageableTable';
|
|
|
-import QrcodeVue from 'qrcode.vue';
|
|
|
-import resolveUrl from 'resolve-url';
|
|
|
import { format } from 'date-fns';
|
|
|
|
|
|
export default {
|
|
|
@@ -222,7 +171,7 @@ export default {
|
|
|
return {
|
|
|
multipleMode: false,
|
|
|
search: '',
|
|
|
- url: '/programme/backAll',
|
|
|
+ url: '/programme/result',
|
|
|
downloading: false,
|
|
|
competitionGroupOptions: [
|
|
|
{ label: '个人', value: 'SINGLE' },
|
|
|
@@ -234,7 +183,6 @@ export default {
|
|
|
levelCollectiveOptions: [],
|
|
|
levelSettingId: '',
|
|
|
dialogUrl: '',
|
|
|
- dialogCode: false,
|
|
|
gradingOrganizationIdOptions: [],
|
|
|
gradingOrganizationId: '',
|
|
|
performanceId: '',
|
|
|
@@ -254,14 +202,12 @@ export default {
|
|
|
videoUrl: '',
|
|
|
name: '',
|
|
|
instructor: '',
|
|
|
- uploadUrl: '',
|
|
|
- currentTime: '',
|
|
|
- add: false
|
|
|
+ showMore: false,
|
|
|
+ downloadProgramme: false,
|
|
|
+ organizationIdOptions: []
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.uploadUrl = resolveUrl(this.$baseUrl, 'programme/upload');
|
|
|
- this.currentTime = format(new Date(), 'yyyy-MM-dd');
|
|
|
this.$http
|
|
|
.post('/setting/byFlag', { flag: 3 })
|
|
|
.then(res => {
|
|
|
@@ -315,6 +261,22 @@ export default {
|
|
|
console.log(e);
|
|
|
this.$message.error(e.error);
|
|
|
});
|
|
|
+ this.$http
|
|
|
+ .post('/organization/all', { size: 1000, query: { del: false } }, { body: 'json' })
|
|
|
+ .then(res => {
|
|
|
+ if (res.content.length > 0) {
|
|
|
+ res.content.forEach(item => {
|
|
|
+ this.organizationIdOptions.push({
|
|
|
+ label: item.name,
|
|
|
+ value: item.id
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
this.$http
|
|
|
.post(
|
|
|
'/performance/all',
|
|
|
@@ -329,16 +291,14 @@ export default {
|
|
|
)
|
|
|
.then(res => {
|
|
|
if (res.content.length > 0) {
|
|
|
- // res.content.forEach(item => {
|
|
|
- // this.performances.push({
|
|
|
- // label: item.name,
|
|
|
- // value: item.id
|
|
|
- // });
|
|
|
- // });
|
|
|
- this.performances = res.content;
|
|
|
+ res.content.forEach(item => {
|
|
|
+ this.performances.push({
|
|
|
+ label: item.name,
|
|
|
+ value: item.id
|
|
|
+ });
|
|
|
+ });
|
|
|
if (!this.$route.query.pid) {
|
|
|
this.performanceId = res.content[0].id;
|
|
|
- this.canAdd();
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -376,29 +336,24 @@ export default {
|
|
|
},
|
|
|
beforeGetData() {
|
|
|
let data = {
|
|
|
- sort: 'createdAt,desc',
|
|
|
- query: {}
|
|
|
+ query: {
|
|
|
+ programmeStatus: 'SUBMIT'
|
|
|
+ }
|
|
|
};
|
|
|
- if (this.competitionGroup) {
|
|
|
- data.query.competitionGroup = this.competitionGroup;
|
|
|
+ if (this.form.gradingOrganizationId) {
|
|
|
+ data.query.gradingOrganizationId = this.form.gradingOrganizationId;
|
|
|
}
|
|
|
- if (this.levelSettingId) {
|
|
|
- data.query.levelSettingId = this.levelSettingId;
|
|
|
+ if (this.form.organizationId) {
|
|
|
+ data.query.organizationId = this.form.organizationId;
|
|
|
}
|
|
|
- if (this.gradingOrganizationId) {
|
|
|
- data.query.gradingOrganizationId = this.gradingOrganizationId;
|
|
|
+ if (this.form.specialtyId) {
|
|
|
+ data.query.code = this.getCode(this.form.specialtyId);
|
|
|
}
|
|
|
if (this.performanceId) {
|
|
|
data.query.performanceId = this.performanceId;
|
|
|
}
|
|
|
- if (this.specialtyId) {
|
|
|
- data.query.code = this.getCode(this.specialtyId);
|
|
|
- }
|
|
|
- if (this.name) {
|
|
|
- data.query.name = this.name;
|
|
|
- }
|
|
|
- if (this.instructor) {
|
|
|
- data.query.instructor = this.instructor;
|
|
|
+ if (this.form.name) {
|
|
|
+ data.query.name = this.form.name;
|
|
|
}
|
|
|
return data;
|
|
|
},
|
|
|
@@ -447,7 +402,7 @@ export default {
|
|
|
data.query.performanceId = this.performanceId;
|
|
|
}
|
|
|
this.$axios
|
|
|
- .get('/programme/excel', {
|
|
|
+ .get('/programme/excelResult', {
|
|
|
responseType: 'blob',
|
|
|
params: data
|
|
|
})
|
|
|
@@ -468,27 +423,6 @@ export default {
|
|
|
this.$message.error(e.error);
|
|
|
});
|
|
|
},
|
|
|
- downloadTemp() {
|
|
|
- this.$axios
|
|
|
- .get('/programme/excelTemp', {
|
|
|
- responseType: 'blob'
|
|
|
- })
|
|
|
- .then(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() {
|
|
|
this.$notify({
|
|
|
title: '提示',
|
|
|
@@ -513,17 +447,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- clearSearch() {
|
|
|
- this.competitionGroup = '';
|
|
|
- this.levelSettingId = '';
|
|
|
- this.gradingOrganizationId = '';
|
|
|
- this.organizationId = '';
|
|
|
- this.specialtyId = '';
|
|
|
- this.getData();
|
|
|
- },
|
|
|
- getCode(value) {
|
|
|
- return this.forTree(this.artTypes, value).code;
|
|
|
- },
|
|
|
forTree(list, value) {
|
|
|
var result = null;
|
|
|
if (!list) {
|
|
|
@@ -542,33 +465,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
- },
|
|
|
- onfail(e) {
|
|
|
- console.log(e);
|
|
|
- this.$message.error('失败');
|
|
|
- this.getData();
|
|
|
- },
|
|
|
- onSuccess() {
|
|
|
- this.$message.success('上传成功');
|
|
|
- this.getData();
|
|
|
- },
|
|
|
- beforeUpload() {
|
|
|
- return this.$confirm('确认要上传文件吗?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
- },
|
|
|
- canAdd() {
|
|
|
- let data = this.performances.find(item => {
|
|
|
- return item.id == this.performanceId;
|
|
|
- });
|
|
|
- if (data.endDate >= this.currentTime) {
|
|
|
- this.add = true;
|
|
|
- } else {
|
|
|
- this.add = false;
|
|
|
- }
|
|
|
- this.getData();
|
|
|
}
|
|
|
}
|
|
|
};
|