|
@@ -37,8 +37,15 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="节目名称">
|
|
|
|
|
- <el-input placeholder="节目名称" v-model="form.name" clearable></el-input>
|
|
|
|
|
|
|
+ <el-form-item label="奖项">
|
|
|
|
|
+ <el-select v-model="form.awardId" clearable>
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in awards"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ ></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -84,14 +91,11 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</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-col :span="8">
|
|
|
|
|
+ <el-form-item label="节目名称">
|
|
|
|
|
+ <el-input placeholder="节目名称" v-model="form.name" clearable></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</div>
|
|
</div>
|
|
|
</el-collapse-transition>
|
|
</el-collapse-transition>
|
|
@@ -131,17 +135,42 @@
|
|
|
:height="tableHeight"
|
|
:height="tableHeight"
|
|
|
>
|
|
>
|
|
|
<el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
|
|
<el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
|
|
|
- <!-- <el-table-column prop="id" label="ID" width="100"> </el-table-column> -->
|
|
|
|
|
|
|
+ <el-table-column prop="id" label="节目编号" width="100"> </el-table-column>
|
|
|
<el-table-column prop="name" label="节目名称"> </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="specialty" label="参赛专业"> </el-table-column>
|
|
|
<el-table-column prop="competitionGroup" label="参赛组别" 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="level" label="参赛级别" min-width="70"> </el-table-column>
|
|
|
- <el-table-column prop="quantity" 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 prop="gradingOrganization" label="考级机构" show-overflow-tooltip min-width="160">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="organization" label="承办单位" 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="award" label="获奖情况" min-width="95"> </el-table-column>
|
|
|
|
|
|
|
+ <!-- <el-table-column prop="examPoint" label="考级点" min-width="160"> </el-table-column> -->
|
|
|
|
|
+ <el-table-column prop="award" label="获奖情况" min-width="120">
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
|
+ <span v-if="!row.second">{{ row.award }}</span>
|
|
|
|
|
+ <el-select v-else v-model="row.awardId" size="mini" :controls="true" style="width: 90px" clearable>
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in awards"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ ></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="操作" align="left" fixed="right" min-width="120">
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
|
+ <div v-if="performance.status == 'RATE'">
|
|
|
|
|
+ <el-button @click="row.second = true" size="mini" plain type="warning" v-if="!row.second"
|
|
|
|
|
+ >修改</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <div v-else>
|
|
|
|
|
+ <el-button @click="saveRow(row)" size="mini" plain type="primary">保存</el-button>
|
|
|
|
|
+ <el-button @click="row.second = false" size="mini" plain type="danger">取消</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<div class="pagination-wrapper">
|
|
<div class="pagination-wrapper">
|
|
|
<el-pagination
|
|
<el-pagination
|
|
@@ -162,7 +191,6 @@
|
|
|
import delChild from '@/mixins/delChild';
|
|
import delChild from '@/mixins/delChild';
|
|
|
import { mapState } from 'vuex';
|
|
import { mapState } from 'vuex';
|
|
|
import pageableTable from '@/mixins/pageableTable';
|
|
import pageableTable from '@/mixins/pageableTable';
|
|
|
-import { format } from 'date-fns';
|
|
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'ProgrammeOrgList',
|
|
name: 'ProgrammeOrgList',
|
|
@@ -182,11 +210,11 @@ export default {
|
|
|
levelSingleOptions: [],
|
|
levelSingleOptions: [],
|
|
|
levelCollectiveOptions: [],
|
|
levelCollectiveOptions: [],
|
|
|
levelSettingId: '',
|
|
levelSettingId: '',
|
|
|
- dialogUrl: '',
|
|
|
|
|
gradingOrganizationIdOptions: [],
|
|
gradingOrganizationIdOptions: [],
|
|
|
gradingOrganizationId: '',
|
|
gradingOrganizationId: '',
|
|
|
performanceId: '',
|
|
performanceId: '',
|
|
|
performances: [],
|
|
performances: [],
|
|
|
|
|
+ performance: {},
|
|
|
artTypes: [],
|
|
artTypes: [],
|
|
|
optionProps: {
|
|
optionProps: {
|
|
|
value: 'id',
|
|
value: 'id',
|
|
@@ -198,13 +226,10 @@ export default {
|
|
|
expandTrigger: 'hover'
|
|
expandTrigger: 'hover'
|
|
|
},
|
|
},
|
|
|
specialtyId: '',
|
|
specialtyId: '',
|
|
|
- showViedo: false,
|
|
|
|
|
- videoUrl: '',
|
|
|
|
|
- name: '',
|
|
|
|
|
- instructor: '',
|
|
|
|
|
showMore: false,
|
|
showMore: false,
|
|
|
downloadProgramme: false,
|
|
downloadProgramme: false,
|
|
|
- organizationIdOptions: []
|
|
|
|
|
|
|
+ organizationIdOptions: [],
|
|
|
|
|
+ awards: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -299,6 +324,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
if (!this.$route.query.pid) {
|
|
if (!this.$route.query.pid) {
|
|
|
this.performanceId = res.content[0].id;
|
|
this.performanceId = res.content[0].id;
|
|
|
|
|
+ this.performance = res.content[0];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -314,17 +340,27 @@ export default {
|
|
|
.catch(e => {
|
|
.catch(e => {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
});
|
|
});
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post('/award/all', { size: 20 }, { body: 'json' })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ if (res.content.length > 0) {
|
|
|
|
|
+ res.content.forEach(item => {
|
|
|
|
|
+ this.awards.push({
|
|
|
|
|
+ label: item.name,
|
|
|
|
|
+ value: item.id
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
selection() {
|
|
selection() {
|
|
|
return this.$refs.table.selection.map(i => i.id);
|
|
return this.$refs.table.selection.map(i => i.id);
|
|
|
},
|
|
},
|
|
|
- ...mapState(['organization']),
|
|
|
|
|
- headers() {
|
|
|
|
|
- return {
|
|
|
|
|
- Authorization: 'Bearer ' + sessionStorage.getItem('token')
|
|
|
|
|
- };
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ ...mapState(['organization'])
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
competitionGroupFormatter(row, column, cellValue, index) {
|
|
competitionGroupFormatter(row, column, cellValue, index) {
|
|
@@ -355,6 +391,9 @@ export default {
|
|
|
if (this.form.name) {
|
|
if (this.form.name) {
|
|
|
data.query.name = this.form.name;
|
|
data.query.name = this.form.name;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this.form.awardId) {
|
|
|
|
|
+ data.query.awardId = this.form.awardId;
|
|
|
|
|
+ }
|
|
|
return data;
|
|
return data;
|
|
|
},
|
|
},
|
|
|
toggleMultipleMode(multipleMode) {
|
|
toggleMultipleMode(multipleMode) {
|
|
@@ -375,6 +414,7 @@ export default {
|
|
|
this.downloading = true;
|
|
this.downloading = true;
|
|
|
|
|
|
|
|
let data = {
|
|
let data = {
|
|
|
|
|
+ size: 2000,
|
|
|
sort: 'createdAt,desc',
|
|
sort: 'createdAt,desc',
|
|
|
query: {
|
|
query: {
|
|
|
organizationId: this.organization.id
|
|
organizationId: this.organization.id
|
|
@@ -392,15 +432,12 @@ export default {
|
|
|
if (this.specialtyId) {
|
|
if (this.specialtyId) {
|
|
|
data.query.code = this.getCode(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.performanceId) {
|
|
if (this.performanceId) {
|
|
|
data.query.performanceId = this.performanceId;
|
|
data.query.performanceId = this.performanceId;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this.form.awardId) {
|
|
|
|
|
+ data.query.awardId = this.form.awardId;
|
|
|
|
|
+ }
|
|
|
this.$axios
|
|
this.$axios
|
|
|
.get('/programme/excelResult', {
|
|
.get('/programme/excelResult', {
|
|
|
responseType: 'blob',
|
|
responseType: 'blob',
|
|
@@ -423,29 +460,8 @@ export default {
|
|
|
this.$message.error(e.error);
|
|
this.$message.error(e.error);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- operation1() {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: this.selection
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- operation2() {
|
|
|
|
|
- this.$message('操作2');
|
|
|
|
|
- },
|
|
|
|
|
- deleteRow(row) {
|
|
|
|
|
- this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- return this.$http.post(`/programme/del/${row.id}`);
|
|
|
|
|
- })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- this.$message.success('删除成功');
|
|
|
|
|
- this.getData();
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {
|
|
|
|
|
- if (e !== 'cancel') {
|
|
|
|
|
- this.$message.error(e.error);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ getCode(value) {
|
|
|
|
|
+ return this.forTree(this.artTypes, value).code;
|
|
|
},
|
|
},
|
|
|
forTree(list, value) {
|
|
forTree(list, value) {
|
|
|
var result = null;
|
|
var result = null;
|
|
@@ -465,6 +481,23 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return result;
|
|
return result;
|
|
|
|
|
+ },
|
|
|
|
|
+ saveRow(row) {
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post('/programme/saveAward', {
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ awardId: row.awardId
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ this.saving = false;
|
|
|
|
|
+ this.$message.success('成功');
|
|
|
|
|
+ this.getData();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ this.saving = false;
|
|
|
|
|
+ this.$message.error(e.error);
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|