Browse Source

提交首页优化

master
陈志鹏 2 years ago
parent
commit
188577d636
  1. 43
      src/page/Index.vue
  2. 76
      src/page/coures/coures.vue

43
src/page/Index.vue

@ -3,31 +3,31 @@ @@ -3,31 +3,31 @@
<div style="margin-top: 50px;width: 100%">
<div style="width: 300px;height: 200px;background-color: #8cc5ff;float: left;margin-left: 120px">
<div style="align-content: center">
<div style="padding-top: 60px;font-size: 30px;font-weight: bolder;color: #ffffff">10</div>
<div style="padding-top: 60px;font-size: 30px;font-weight: bolder;color: #ffffff">{{classNum}}</div>
<div style="padding-top: 10px;color: #ffffff">开班班级</div>
</div>
</div>
<div style="width: 300px;height: 200px;background-color: #f9a7a7;float: left;margin-left: 100px">
<div style="align-content: center">
<div style="padding-top: 60px;font-size: 30px;font-weight: bolder;color: #ffffff">22</div>
<div style="padding-top: 60px;font-size: 30px;font-weight: bolder;color: #ffffff">{{courseNum}}</div>
<div style="padding-top: 10px;color: #ffffff">上架课程</div>
</div>
</div>
<div style="width: 300px;height: 200px;background-color: #a4da89;float: left;margin-left: 100px">
<div style="align-content: center">
<div style="padding-top: 60px;font-size: 30px;font-weight: bolder;color: #ffffff">1000</div>
<div style="padding-top: 60px;font-size: 30px;font-weight: bolder;color: #ffffff">{{xtNum}}</div>
<div style="padding-top: 10px;color: #ffffff">习题库</div>
</div>
</div>
<div style="width: 300px;height: 200px;background-color: #f0c78a;float: left;margin-left: 100px">
<div style="align-content: center">
<div style="padding-top: 60px;font-size: 30px;font-weight: bolder;color: #ffffff">3</div>
<div style="padding-top: 60px;font-size: 30px;font-weight: bolder;color: #ffffff">{{ksNum}}</div>
<div style="padding-top: 10px;color: #ffffff">进行中的考试</div>
</div>
</div>
</div>
<div style="width: 100%;float: left;margin-top: 50px;font-weight: bolder">
<div>课程统计信息统计</div>
<div>课程报名信息统计</div>
<div style="margin-left: 50px">
<component is="heat"></component>
</div>
@ -36,24 +36,41 @@ @@ -36,24 +36,41 @@
</template>
<script>
import heat from '../components/heat.vue'
import { getRequest, postRequest } from '../utils/api'
export default{
components: {
heat
},
created () {
this.getTypeList()
},
mounted: function () {
},
methods: {
getTypeList: function () {
var _this = this;
this.loading = true;
postRequest('/edu/v1/pc/courseTj').then(resp=> {
_this.loading = false;
if (resp.status === 200) {
this.classNum = resp.data.data.classNum
this.courseNum = resp.data.data.courseNum
this.xtNum = resp.data.data.xtNum
this.ksNum = resp.data.data.ksNum
} else {
//
_this.$alert('');
}
}, resp=> {
});
},
},
data(){
return {
loading: false,
eploading: [],
cardloading: [],
keywords: '',
users: [],
allRoles: [],
roles: [],
cpRoles: []
classNum: 0,
courseNum: 0,
xtNum: 0,
ksNum: 0
}
}
}

76
src/page/coures/coures.vue

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
<div class="crud__left">
<el-form :inline="true">
<div style="float: right;">
<el-row>
<el-form-item style="float: left" label="课程名称:">
<el-input v-model="dataForm.name"
placeholder="课程名称" clearable></el-input>
@ -35,7 +36,7 @@ @@ -35,7 +36,7 @@
<el-form-item style="float: left" label="课程状态:">
<el-select
clearable
v-model="dataForm.status"
v-model="dataForm.coursestatus"
placeholder="请选择"
>
<el-option
@ -50,7 +51,8 @@ @@ -50,7 +51,8 @@
<el-form-item style="float: left" label="课程科目:">
<el-select
clearable
v-model="dataForm.subject"
multiple
v-model="dataForm.subjectIdList"
placeholder="请选择"
>
<el-option
@ -70,20 +72,22 @@ @@ -70,20 +72,22 @@
>
<el-option
v-for="item in teacherList"
:key="item.id"
:key="item.displayName"
:label="item.displayName"
:value="item.id"
:value="item.displayName"
>
</el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item style="float: left" label="创建时间:">
<el-date-picker
v-model="dataForm.time"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
style="width: 250px"
style="width: 320px"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
@ -92,6 +96,7 @@ @@ -92,6 +96,7 @@
@click="submitClick">查询
</el-button>
</el-form-item>
</el-row>
</div>
</el-form>
</div>
@ -110,7 +115,7 @@ @@ -110,7 +115,7 @@
<template slot-scope="scope">
<div>
<span>
{{ scope.row.name}}
<b>{{scope.row.name}}</b>
</span>
</div>
<div v-if="scope.row.type === '视频课'">
@ -144,30 +149,47 @@ @@ -144,30 +149,47 @@
</el-table-column>
<el-table-column prop="type" label="类型" fixed
header-align="center" align="center" width="150">
</el-table-column>
<el-table-column prop="intro" label="科目" fixed
header-align="center" align="center" width="150">
<template slot-scope="scope">
<b>{{scope.row.type}}</b>
</template>
</el-table-column>
<el-table-column prop="teacherName" label="讲师" fixed
header-align="center" align="center" width="120">
<template slot-scope="scope">
<b>{{scope.row.teacherName}}</b>
</template>
</el-table-column>
<el-table-column prop="subscribedCount" label="报名人数" fixed
header-align="center" align="center" width="120">
<template slot-scope="scope">
<b v-if="scope.row.subscribedCount !== null">{{scope.row.subscribedCount}}</b>
<b v-else>0</b>
</template>
</el-table-column>
<el-table-column prop="createdBy" label="创建人" fixed
header-align="center" align="center" width="150">
<template slot-scope="scope">
<b>{{scope.row.createdBy}}</b>
</template>
</el-table-column>
<el-table-column prop="creationTime" label="创建时间" fixed
header-align="center" align="center" width="200">
<template slot-scope="scope">
<b>{{scope.row.creationTime.toString().substr(0,10)}}</b>
</template>
</el-table-column>
<el-table-column prop="updateTime" label="上次更新时间" fixed
header-align="center" align="center" width="200">
<template slot-scope="scope">
<b>{{scope.row.updateTime.toString().substr(0,10)}}</b>
</template>
</el-table-column>
<el-table-column prop="status" label="状态" fixed
header-align="center" align="center" width="200">
<template slot-scope="scope">
<b v-if="scope.row.status==='DRAFT'">草稿</b>
<b v-else>上架</b>
<b v-if="scope.row.status==='UP'">上架</b>
<b v-if="scope.row.status==='DOWN'">下架</b>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" header-align="center" align="center"
@ -202,43 +224,43 @@ export default { @@ -202,43 +224,43 @@ export default {
name: '',
teacherName: '',
type: '',
status: '',
time: '',
coursestatus: '',
time: [],
subjectIdList: []
},
typeList: [
{
id: '0',
id: '',
name: '全部'
},
{
id: '1',
id: '视频课',
name: '视频课'
},
{
id: '2',
id: '直播课',
name: '直播课'
},
{
id: '3',
id: '现场课',
name: '现场课'
},
],
statusList: [
{
id: '0',
id: '',
name: '全部'
},
{
id: '1',
id: 'DRAFT',
name: '草稿'
},
{
id: '2',
id: 'UP',
name: '上架'
},
{
id: '3',
id: 'DOWN',
name: '已下架'
},
],
@ -282,9 +304,21 @@ export default { @@ -282,9 +304,21 @@ export default {
submitClick: function () {
var _this = this;
this.loading = true;
var startTime = ''
var endTime = ''
if(this.dataForm.time !==null && this.dataForm.time.length>0){
startTime = this.dataForm.time[0]
endTime = this.dataForm.time[1]
}
var filter = {
filer: {
name: this.dataForm.name
name: this.dataForm.name,
type: this.dataForm.type,
coursestatus: this.dataForm.coursestatus,
subjectIdList: this.dataForm.subjectIdList,
teacherName: this.dataForm.teacherName,
startTime: startTime,
endTime: endTime
},
pagination: {pageNo: 1,pageSize: 10}
}

Loading…
Cancel
Save