|
|
@@ -139,12 +139,12 @@
|
|
|
<el-table-column prop="name" 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="level" label="参赛级别" min-width="70"> </el-table-column>
|
|
|
- <!-- <el-table-column prop="quantity" 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="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>
|
|
|
@@ -158,17 +158,25 @@
|
|
|
</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-table-column label="操作" align="left" fixed="right" min-width="165">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ <el-button @click="playVideo(row, $index)" size="mini" plain type="primary" style="margin-right:5px"
|
|
|
+ >查看作品</el-button
|
|
|
+ >
|
|
|
+ <span v-if="performance.status == 'RATE'">
|
|
|
+ <el-button
|
|
|
+ @click="row.second = true"
|
|
|
+ size="mini"
|
|
|
+ plain
|
|
|
+ type="warning"
|
|
|
+ v-if="!row.second && display"
|
|
|
>修改</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>
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -185,6 +193,42 @@
|
|
|
>
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
+ <el-dialog
|
|
|
+ :title="programme.name"
|
|
|
+ class="videoDialog"
|
|
|
+ destroy-on-close
|
|
|
+ center
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="showViedo"
|
|
|
+ width="45vw"
|
|
|
+ >
|
|
|
+ <div class="dialog-content">
|
|
|
+ <video
|
|
|
+ :src="programme.video"
|
|
|
+ controls
|
|
|
+ style="max-height: 600px; max-width: 100%; margin: 0 auto"
|
|
|
+ v-if="programme.video"
|
|
|
+ >
|
|
|
+ 您的浏览器不支持 video 标签。
|
|
|
+ </video>
|
|
|
+ <img
|
|
|
+ style="max-height: 600px; max-width: 100%; display: block; margin: auto"
|
|
|
+ :src="programme.annex"
|
|
|
+ alt=""
|
|
|
+ v-if="programme.annex"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div style="display: block; margin: 10px;">
|
|
|
+ <el-button size="mini" @click="move(-1)" :disabled="index == 0">上一个</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="move(1)"
|
|
|
+ :disabled="(page - 1) * pageSize + index == totalElements - 1 || index >= pageSize - 1"
|
|
|
+ >下一个</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="showViedo = false" size="mini">关闭</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -207,8 +251,6 @@ export default {
|
|
|
],
|
|
|
form: {},
|
|
|
competitionGroup: '',
|
|
|
- levelSingleOptions: [],
|
|
|
- levelCollectiveOptions: [],
|
|
|
levelSettingId: '',
|
|
|
gradingOrganizationIdOptions: [],
|
|
|
gradingOrganizationId: '',
|
|
|
@@ -228,47 +270,18 @@ export default {
|
|
|
specialtyId: '',
|
|
|
showMore: false,
|
|
|
organizationIdOptions: [],
|
|
|
- awards: []
|
|
|
+ awards: [],
|
|
|
+ showViedo: false,
|
|
|
+ programme: {},
|
|
|
+ index: 0,
|
|
|
+ display: false
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.$http
|
|
|
- .post('/setting/byFlag', { flag: 3 })
|
|
|
- .then(res => {
|
|
|
- if (res.length > 0) {
|
|
|
- res.forEach(item => {
|
|
|
- this.levelSingleOptions.push({
|
|
|
- label: item.name,
|
|
|
- value: item.id,
|
|
|
- desc: item.code
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- console.log(e);
|
|
|
- this.$message.error(e.error);
|
|
|
- });
|
|
|
+ this.getAdmin();
|
|
|
if (this.$route.query.pid) {
|
|
|
this.performanceId = Number(this.$route.query.pid);
|
|
|
}
|
|
|
- this.$http
|
|
|
- .post('/setting/byFlag', { flag: 4 })
|
|
|
- .then(res => {
|
|
|
- if (res.length > 0) {
|
|
|
- res.forEach(item => {
|
|
|
- this.levelCollectiveOptions.push({
|
|
|
- label: item.name,
|
|
|
- value: item.id,
|
|
|
- desc: item.code
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- console.log(e);
|
|
|
- this.$message.error(e.error);
|
|
|
- });
|
|
|
this.$http
|
|
|
.post('/gradingOrganization/all', { size: 1000, query: { del: false } }, { body: 'json' })
|
|
|
.then(res => {
|
|
|
@@ -340,7 +353,7 @@ export default {
|
|
|
console.log(e);
|
|
|
});
|
|
|
this.$http
|
|
|
- .post('/award/all', { size: 20 }, { body: 'json' })
|
|
|
+ .post('/award/all', { size: 20, query: { performance: this.performanceId } }, { body: 'json' })
|
|
|
.then(res => {
|
|
|
if (res.content.length > 0) {
|
|
|
res.content.forEach(item => {
|
|
|
@@ -359,7 +372,7 @@ export default {
|
|
|
selection() {
|
|
|
return this.$refs.table.selection.map(i => i.id);
|
|
|
},
|
|
|
- ...mapState(['organization'])
|
|
|
+ ...mapState(['userInfo'])
|
|
|
},
|
|
|
methods: {
|
|
|
competitionGroupFormatter(row, column, cellValue, index) {
|
|
|
@@ -496,6 +509,24 @@ export default {
|
|
|
this.saving = false;
|
|
|
this.$message.error(e.error);
|
|
|
});
|
|
|
+ },
|
|
|
+ playVideo(row, index) {
|
|
|
+ this.index = index;
|
|
|
+ this.showViedo = true;
|
|
|
+ this.programme = row;
|
|
|
+ },
|
|
|
+ move(direction) {
|
|
|
+ const end = direction + this.index;
|
|
|
+ this.programme = { ...this.tableData[end] };
|
|
|
+ this.index = end;
|
|
|
+ },
|
|
|
+ getAdmin() {
|
|
|
+ let data = this.userInfo.authorities;
|
|
|
+ data.forEach(element => {
|
|
|
+ if (element.name === 'ROLE_ADMIN') {
|
|
|
+ this.display = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|