|
|
@@ -112,13 +112,25 @@
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.desc }}</span>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- </el-form-item></el-col
|
|
|
- >
|
|
|
+ </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-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-form-item>
|
|
|
<el-button @click="getData" type="primary" icon="el-icon-search">搜索 </el-button>
|
|
|
- <el-button @click="clearSearch" type="primary">清空 </el-button>
|
|
|
- <!-- <el-button @click="addRow" type="primary" icon="el-icon-plus">添加 </el-button> -->
|
|
|
+ <el-button @click="addRow" type="primary" icon="el-icon-plus">添加 </el-button>
|
|
|
+ <el-button @click="clearSearch" type="primary" icon="el-icon-upload2">批量导入 </el-button>
|
|
|
<el-button
|
|
|
@click="download"
|
|
|
type="primary"
|
|
|
@@ -164,7 +176,7 @@
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-button @click="showRow(row)" size="mini" plain>查看</el-button>
|
|
|
<el-button type="success" @click="editRow(row)" size="mini" plain>编辑</el-button>
|
|
|
- <el-button type="warning" size="mini" plain>浏览视频</el-button>
|
|
|
+ <el-button type="warning" @click="playVideo(row)" size="mini" plain>浏览视频</el-button>
|
|
|
<el-button @click="showCode(row)" type="primary" size="mini" plain>查看二维码</el-button>
|
|
|
<!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
|
|
|
</template>
|
|
|
@@ -197,6 +209,29 @@
|
|
|
<qrcode-vue :value="dialogUrl" :size="200" level="H" />
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ class="videoDialog"
|
|
|
+ destroy-on-close
|
|
|
+ center
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="showViedo"
|
|
|
+ @close="closeEvent"
|
|
|
+ width="70%"
|
|
|
+ >
|
|
|
+ <video
|
|
|
+ :src="videoUrl.src"
|
|
|
+ controlsList="nodownload noremote footbar"
|
|
|
+ controls
|
|
|
+ style="height: 100%; max-width: 100%"
|
|
|
+ oncontextmenu="return false;"
|
|
|
+ onmouseleave="leaveVideo(this)"
|
|
|
+ ref="video"
|
|
|
+ v-if="showViedo"
|
|
|
+ >
|
|
|
+ 您的浏览器不支持 video 标签。
|
|
|
+ </video>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -239,7 +274,11 @@ export default {
|
|
|
checkStrictly: true,
|
|
|
expandTrigger: 'hover'
|
|
|
},
|
|
|
- specialtyId: ''
|
|
|
+ specialtyId: '',
|
|
|
+ showViedo: false,
|
|
|
+ videoUrl: '',
|
|
|
+ name: '',
|
|
|
+ instructor: ''
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -327,7 +366,8 @@ export default {
|
|
|
computed: {
|
|
|
selection() {
|
|
|
return this.$refs.table.selection.map(i => i.id);
|
|
|
- }
|
|
|
+ },
|
|
|
+ ...mapState(['organization'])
|
|
|
},
|
|
|
methods: {
|
|
|
competitionGroupFormatter(row, column, cellValue, index) {
|
|
|
@@ -340,7 +380,9 @@ export default {
|
|
|
beforeGetData() {
|
|
|
let data = {
|
|
|
sort: 'createdAt,desc',
|
|
|
- query: {}
|
|
|
+ query: {
|
|
|
+ organizationId: this.organization.id
|
|
|
+ }
|
|
|
};
|
|
|
if (this.competitionGroup) {
|
|
|
data.query.competitionGroup = this.competitionGroup;
|
|
|
@@ -357,6 +399,12 @@ export default {
|
|
|
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;
|
|
|
+ }
|
|
|
return data;
|
|
|
},
|
|
|
toggleMultipleMode(multipleMode) {
|
|
|
@@ -394,7 +442,9 @@ export default {
|
|
|
|
|
|
let data = {
|
|
|
sort: 'createdAt,desc',
|
|
|
- query: {}
|
|
|
+ query: {
|
|
|
+ organizationId: this.organization.id
|
|
|
+ }
|
|
|
};
|
|
|
if (this.competitionGroup) {
|
|
|
data.query.competitionGroup = this.competitionGroup;
|
|
|
@@ -405,13 +455,15 @@ export default {
|
|
|
if (this.gradingOrganizationId) {
|
|
|
data.query.gradingOrganizationId = this.gradingOrganizationId;
|
|
|
}
|
|
|
- if (this.organizationId) {
|
|
|
- data.query.organizationId = this.organizationId;
|
|
|
- }
|
|
|
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;
|
|
|
+ }
|
|
|
this.$axios
|
|
|
.get('/programme/excel', {
|
|
|
responseType: 'blob',
|
|
|
@@ -495,6 +547,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
+ },
|
|
|
+ closeEvent() {
|
|
|
+ document.exitPictureInPicture();
|
|
|
+ },
|
|
|
+ playVideo(row) {
|
|
|
+ this.showViedo = true;
|
|
|
+ this.videoUrl = row.video;
|
|
|
+ console.log(row.video);
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -507,4 +567,46 @@ export default {
|
|
|
.el-form-item--small.el-form-item {
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
+.videoDialog {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ .el-dialog {
|
|
|
+ max-width: 900px;
|
|
|
+ margin-top: 0px;
|
|
|
+
|
|
|
+ .close {
|
|
|
+ position: absolute;
|
|
|
+ right: 0px;
|
|
|
+ top: -42px;
|
|
|
+ width: 71px;
|
|
|
+ height: 32px;
|
|
|
+ background: #00000015;
|
|
|
+
|
|
|
+ font-size: 12px;
|
|
|
+ color: #fdffff;
|
|
|
+ line-height: 32px;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: #00000055;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-dialog__header {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-dialog__body {
|
|
|
+ padding: 0;
|
|
|
+
|
|
|
+ video {
|
|
|
+ display: block;
|
|
|
+ height: auto;
|
|
|
+ width: 100%;
|
|
|
+ outline: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|