|
@@ -52,6 +52,7 @@
|
|
|
icon="el-icon-plus"
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
+ :disabled="hasMinimizableDialog"
|
|
|
v-hasPermi="['course:videoResource:add']"
|
|
|
>新增</el-button>
|
|
|
</el-col>
|
|
@@ -61,6 +62,7 @@
|
|
|
icon="el-icon-plus"
|
|
|
size="mini"
|
|
|
@click="handleBatchAdd"
|
|
|
+ :disabled="hasMinimizableDialog"
|
|
|
v-hasPermi="['course:videoResource:add']"
|
|
|
>批量新增</el-button>
|
|
|
</el-col>
|
|
@@ -77,7 +79,7 @@
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="resourceList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table v-loading="loading" :data="resourceList" @selection-change="handleSelectionChange" border>
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="序号" width="55" align="center">
|
|
|
<template slot-scope="scope">
|
|
@@ -155,6 +157,7 @@
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
+ :disabled="hasMinimizableDialog"
|
|
|
v-hasPermi="['course:videoResource:edit']"
|
|
|
>修改</el-button>
|
|
|
<el-button
|
|
@@ -177,7 +180,8 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改视频素材库对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body :before-close="cancel">
|
|
|
+ <minimizable-dialog :title="title" :visible.sync="open" width="700px" append-to-body :before-close="cancel"
|
|
|
+ @minimize="hasMinimizableDialog = true" @restore="hasMinimizableDialog = false">
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="素材名称" prop="resourceName" style="margin-top: 20px">
|
|
|
<el-input v-model="form.resourceName" placeholder="请输入" />
|
|
@@ -286,7 +290,7 @@
|
|
|
<el-button @click="cancel">取消</el-button>
|
|
|
<el-button type="primary" @click="submitForm">保存</el-button>
|
|
|
</div>
|
|
|
- </el-dialog>
|
|
|
+ </minimizable-dialog>
|
|
|
|
|
|
<el-dialog
|
|
|
title="视频预览"
|
|
@@ -301,7 +305,8 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 批量选择视频弹窗 -->
|
|
|
- <el-dialog :title="'选择视频'" :visible.sync="batchAddVisible" width="1200px" append-to-body class="batch-dialog" :close-on-click-modal="false" :before-close="cancelBeforeBatch">
|
|
|
+ <minimizable-dialog :title="'选择视频'" :visible.sync="batchAddVisible" width="1200px" append-to-body class="batch-dialog" :close-on-click-modal="false" :before-close="cancelBeforeBatch"
|
|
|
+ @minimize="hasMinimizableDialog = true" @restore="hasMinimizableDialog = false">
|
|
|
<div class="filter-container">
|
|
|
<el-button type="primary" icon="el-icon-plus" size="small" @click="showUploadPanel">上传视频</el-button>
|
|
|
</div>
|
|
@@ -309,7 +314,8 @@
|
|
|
<el-table
|
|
|
v-loading="batchLoading"
|
|
|
:data="videoList"
|
|
|
- height="350">
|
|
|
+ height="350"
|
|
|
+ border>
|
|
|
<el-table-column label="序号" width="60" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.$index + 1 }}
|
|
@@ -491,7 +497,7 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
- </el-dialog>
|
|
|
+ </minimizable-dialog>
|
|
|
|
|
|
<!-- 项目选择弹窗 -->
|
|
|
<el-dialog
|
|
@@ -643,9 +649,13 @@ import {getByIds, listCourseQuestionBank} from '@/api/course/courseQuestionBank'
|
|
|
import {getThumbnail} from "@/api/course/userVideo";
|
|
|
import {uploadObject} from "@/utils/cos.js";
|
|
|
import {uploadToOBS} from "@/utils/obs.js";
|
|
|
+import MinimizableDialog from "@/components/MinimizableDialog"
|
|
|
|
|
|
export default {
|
|
|
name: 'VideoResource',
|
|
|
+ components: {
|
|
|
+ MinimizableDialog
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
// 遮罩层
|
|
@@ -768,6 +778,8 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
},
|
|
|
+ // 是否存在最小化窗口
|
|
|
+ hasMinimizableDialog: false,
|
|
|
}
|
|
|
},
|
|
|
watch: {
|