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

76
src/page/coures/coures.vue

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

Loading…
Cancel
Save