优化页面-手机端响应式
This commit is contained in:
parent
10c309fcd2
commit
8a3385cbea
@ -1,17 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" label-width="70px">
|
||||||
<el-form-item label="视频类别" prop="type">
|
<el-row :gutter="10">
|
||||||
<el-cascader
|
<el-col :xs="24" :ms="12" :md="5">
|
||||||
placeholder="请选择视频类别"
|
<el-form-item label="视频类别" prop="type">
|
||||||
v-model="queryParams.type"
|
<el-cascader
|
||||||
:options="optionTypes"
|
placeholder="请选择视频类别"
|
||||||
:props="{ checkStrictly: true, value: 'id', label: 'name' }"
|
v-model="queryParams.type"
|
||||||
clearable
|
:options="optionTypes"
|
||||||
></el-cascader>
|
:props="{ checkStrictly: true, value: 'id', label: 'name' }"
|
||||||
</el-form-item>
|
clearable
|
||||||
<!-- 博士要求注释掉,不需要该过滤条件 2020-05-30 zlp -->
|
></el-cascader>
|
||||||
<!-- <el-form-item label="讲师姓名" prop="lecturer">
|
</el-form-item>
|
||||||
|
<!-- 博士要求注释掉,不需要该过滤条件 2020-05-30 zlp -->
|
||||||
|
<!-- <el-form-item label="讲师姓名" prop="lecturer">
|
||||||
<el-select v-model="queryParams.lecturer" filterable placeholder="请选择讲师">
|
<el-select v-model="queryParams.lecturer" filterable placeholder="请选择讲师">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in lecturerOptions"
|
v-for="item in lecturerOptions"
|
||||||
@ -30,13 +32,32 @@
|
|||||||
placeholder="请输入培训视频标题"
|
placeholder="请输入培训视频标题"
|
||||||
/>
|
/>
|
||||||
</el-form-item>-->
|
</el-form-item>-->
|
||||||
<el-form-item>
|
</el-col>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-col :xs="24" :ms="12" :md="6">
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-form-item class="no-margin">
|
||||||
</el-form-item>
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row v-loading="loading">
|
<el-row v-loading="loading">
|
||||||
<el-col :xs="24" :sm="8" :md="6" v-for="(o, index) in videoList" :key="index" style="padding: 10px;">
|
<el-col
|
||||||
|
:xs="24"
|
||||||
|
:sm="8"
|
||||||
|
:md="6"
|
||||||
|
v-for="(o, index) in videoList"
|
||||||
|
:key="index"
|
||||||
|
style="padding: 10px"
|
||||||
|
>
|
||||||
<el-card :body-style="{ padding: '2px' }">
|
<el-card :body-style="{ padding: '2px' }">
|
||||||
<video-player
|
<video-player
|
||||||
class="vjs-custom-skin"
|
class="vjs-custom-skin"
|
||||||
@ -47,12 +68,15 @@
|
|||||||
<div class="to-detail">
|
<div class="to-detail">
|
||||||
<el-tooltip effect="dark" :content="o.title" placement="bottom">
|
<el-tooltip effect="dark" :content="o.title" placement="bottom">
|
||||||
<div>
|
<div>
|
||||||
<router-link :to="'/video_study/study/detail/' + o.id" class="link-type">
|
<router-link
|
||||||
<p class="info-title">{{o.title}}</p>
|
:to="'/video_study/study/detail/' + o.id"
|
||||||
|
class="link-type"
|
||||||
|
>
|
||||||
|
<p class="info-title">{{ o.title }}</p>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<p class="info-title info-title-name">讲师:{{o.lecturername}}</p>
|
<p class="info-title info-title-name">讲师:{{ o.lecturername }}</p>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<time class="time">{{ parseTime(o.createtime) }}</time>
|
<time class="time">{{ parseTime(o.createtime) }}</time>
|
||||||
<!-- <el-button type="text" class="button">进入详情页</el-button> -->
|
<!-- <el-button type="text" class="button">进入详情页</el-button> -->
|
||||||
@ -63,7 +87,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:page-sizes="[8, 16, 32, 64]"
|
:page-sizes="[8, 16, 32, 64]"
|
||||||
@ -74,7 +98,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listVideo, getVideo, privateDownloadUrl } from "@/api/benyi_train/video";
|
import {
|
||||||
|
listVideo,
|
||||||
|
getVideo,
|
||||||
|
privateDownloadUrl,
|
||||||
|
} from "@/api/benyi_train/video";
|
||||||
import { listAllLecturer } from "@/api/benyi_train/lecturer";
|
import { listAllLecturer } from "@/api/benyi_train/lecturer";
|
||||||
import { listMoedata } from "@/api/system/moedata";
|
import { listMoedata } from "@/api/system/moedata";
|
||||||
|
|
||||||
@ -100,19 +128,19 @@ export default {
|
|||||||
title: undefined,
|
title: undefined,
|
||||||
lecturer: undefined,
|
lecturer: undefined,
|
||||||
type: undefined,
|
type: undefined,
|
||||||
status:"0",
|
status: "0",
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 8
|
pageSize: 8,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
listAllLecturer().then(response => {
|
listAllLecturer().then((response) => {
|
||||||
//console.log(response.lecturer);
|
//console.log(response.lecturer);
|
||||||
this.lecturerOptions = response.lecturer;
|
this.lecturerOptions = response.lecturer;
|
||||||
});
|
});
|
||||||
listMoedata(this.queryParams).then(response => {
|
listMoedata(this.queryParams).then((response) => {
|
||||||
//第一步转换数组
|
//第一步转换数组
|
||||||
this.optionTypes = this.handleTree(response.data, "id", "pid");
|
this.optionTypes = this.handleTree(response.data, "id", "pid");
|
||||||
//第二步移除children为0的数组,也就是将children为0 设置为undefined
|
//第二步移除children为0的数组,也就是将children为0 设置为undefined
|
||||||
@ -137,9 +165,9 @@ export default {
|
|||||||
/** 查询培训列表 */
|
/** 查询培训列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listVideo(this.queryParams).then(response => {
|
listVideo(this.queryParams).then((response) => {
|
||||||
this.videoList = response.rows;
|
this.videoList = response.rows;
|
||||||
this.playerOptions = response.rows.map(ele => {
|
this.playerOptions = response.rows.map((ele) => {
|
||||||
return {
|
return {
|
||||||
autoplay: false,
|
autoplay: false,
|
||||||
muted: true,
|
muted: true,
|
||||||
@ -150,8 +178,8 @@ export default {
|
|||||||
{
|
{
|
||||||
type: ele.filetype,
|
type: ele.filetype,
|
||||||
// mp4
|
// mp4
|
||||||
src: ele.videourl
|
src: ele.videourl,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
notSupportedMessage: "此视频暂无法播放,请稍后再试",
|
notSupportedMessage: "此视频暂无法播放,请稍后再试",
|
||||||
poster: "",
|
poster: "",
|
||||||
@ -159,8 +187,8 @@ export default {
|
|||||||
timeDivider: true,
|
timeDivider: true,
|
||||||
durationDisplay: false,
|
durationDisplay: false,
|
||||||
remainingTimeDisplay: false,
|
remainingTimeDisplay: false,
|
||||||
fullscreenToggle: true //全屏按钮
|
fullscreenToggle: true, //全屏按钮
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
@ -182,8 +210,8 @@ export default {
|
|||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -217,4 +245,11 @@ export default {
|
|||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-cascader {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.no-margin ::v-deep.el-form-item__content {
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user