|
@@ -1,13 +1,72 @@
|
|
|
<script setup>
|
|
|
import { ref, reactive } from 'vue'
|
|
|
+import { Search } from '@element-plus/icons-vue'
|
|
|
+import MediaUpload from './components/MediaUpload.vue';
|
|
|
+
|
|
|
+
|
|
|
+const tableQuery = reactive({
|
|
|
+ keyWord:'',
|
|
|
+ currentPage:1,
|
|
|
+ pageSize:10,
|
|
|
+ totals:0,
|
|
|
+})
|
|
|
+const tableData = ref([])
|
|
|
+function handlePageChange(){}
|
|
|
+
|
|
|
+const tableColumns = [
|
|
|
+ {label:'视频封面',key:'cover',},
|
|
|
+ {label:'视频名称',key:'name',},
|
|
|
+ {label:'研究员',key:'author',},
|
|
|
+ {label:'标签',key:'label',},
|
|
|
+ {label:'添加时间',key:'time',width:250,sortable:true}
|
|
|
+]
|
|
|
+
|
|
|
+let mediaUploadShow = ref(false)
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <div>
|
|
|
- 视频管理
|
|
|
+ <div class="video-list-wrap">
|
|
|
+ <div class="top-box">
|
|
|
+ <el-button @click="mediaUploadShow = true">上传视频</el-button>
|
|
|
+ <el-input style="width:400px;margin-left: auto;" placeholder="视频名称" v-model="tableQuery.keyWord" :prefix-icon="Search" clearable></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="table-box">
|
|
|
+ <el-table stripe border :data="tableData">
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ v-for="column in tableColumns" :key="column.key"
|
|
|
+ :prop="column.key" :label="column.label" :sortable="column.sortable" :width="column.width">
|
|
|
+
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
+
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="total,prev,pager,next,jumper"
|
|
|
+ :current-page="tableQuery.page"
|
|
|
+ :page-size="tableQuery.pageSize"
|
|
|
+ :total="tableQuery.totals"
|
|
|
+ @current-change="handlePageChange"
|
|
|
+ style=" justify-content: flex-end;border:1px solid #ebeef5;border-top: none;"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <MediaUpload
|
|
|
+ v-model:show="mediaUploadShow"
|
|
|
+ mediaType="video"
|
|
|
+ modifyType="add"
|
|
|
+ ImageUploadWidth="192px"
|
|
|
+ ImageUploadHeight="108px"
|
|
|
+ ></MediaUpload>
|
|
|
</template>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-
|
|
|
+.video-list-wrap{
|
|
|
+ .top-box{
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|