Browse Source

提交框架更新

master
陈志鹏 2 years ago
parent
commit
f9a7727335
  1. 28
      src/components/heat.vue
  2. 2
      src/page/Home.vue
  3. 98
      src/page/coures/add-coures.vue
  4. 683
      src/page/coures/coures-info.vue
  5. 43
      src/page/coures/coures.vue
  6. 15
      src/router/index.js

28
src/components/heat.vue

@ -9,7 +9,7 @@ export default { @@ -9,7 +9,7 @@ export default {
data() {
return {
xData: ['2022/10/11', '2022/10/12', '2022/10/13', '2022/10/14', '2022/10/15', '2022/10/16', '2022/10/17'], //
yData: [23, 24, 18, 25, 27, 28, 25], //
yData: [10, 24, 18, 25, 27, 28, 25], //
myChartStyle: { float: 'left', width: '100%', height: '400px' }, //
}
},
@ -20,10 +20,6 @@ export default { @@ -20,10 +20,6 @@ export default {
initEcharts() {
//
const option = {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#00fffb' }, //0
{ offset: 1, color: '#0061ce' }, //1
]),
tooltip: {
trigger: 'item',
},
@ -90,11 +86,25 @@ export default { @@ -90,11 +86,25 @@ export default {
},
series: [
{
type: 'bar', //
data: this.yData,
barWidth: 20,
},
],
type: 'bar',
showBackground: true,
barWidth: 40,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
},
itemStyle: {
normal: {
//
color: function(params) {
//
var colorList = ['#CCCCCC'];
return colorList[params.dataIndex]
}
}
}
}
]
}
const myChart = echarts.init(document.getElementById('mychart'))
myChart.setOption(option)

2
src/page/Home.vue

@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
<el-aside width="900px" style="background-color: dodgerblue;">
<el-menu
default-active="0"
class="el-menu-vertical-demo" style="background-color: dodgerblue;display: flex" router>
class="el-menu-vertical-demo" style="background-color: dodgerblue;display: flex;width: 100%" router>
<template v-for="(item,index) in this.$router.options.routes" v-if="!item.hidden">
<el-submenu :index="index+''" v-if="item.children.length>1" :key="index">
<template slot="title">

98
src/page/coures/add-coures.vue

@ -0,0 +1,98 @@ @@ -0,0 +1,98 @@
<template>
<div style="margin-top: 20px">
<el-card style="">
<div style="margin-top: 50px;width: 100%">
<div style="width: 200px;height: 400px;background-color: #8cc5ff;float: left;margin-left: 280px" @click="setCoures('视频课')">
<div style="align-content: center">
<div style="margin-top: 80px;font-size: 30px;font-weight: bolder;color: #ffffff">
<img style="width: 100px;height: 100px;border-radius: 65px" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.gpbctv.com%2Fuploads%2F20210424%2Fzip_1619246266UkP6CL.jpg&refer=http%3A%2F%2Fwww.gpbctv.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1668584440&t=cbeb6a7281e4058a12dcf2f83cd25901">
</div>
<div style="padding-top: 10px;color: #ffffff">视频课</div>
</div>
</div>
<div style="width: 200px;height: 400px;background-color: #8cc5ff;float: left;margin-left: 280px" @click="setCoures('直播课')">
<div style="align-content: center">
<div style="margin-top: 80px;font-size: 30px;font-weight: bolder;color: #ffffff">
<img style="width: 100px;height: 100px;border-radius: 65px" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.gpbctv.com%2Fuploads%2F20210424%2Fzip_1619246266UkP6CL.jpg&refer=http%3A%2F%2Fwww.gpbctv.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1668584440&t=cbeb6a7281e4058a12dcf2f83cd25901">
</div>
<div style="padding-top: 10px;color: #ffffff">直播课</div>
</div>
</div>
<div style="width: 200px;height: 400px;background-color: #8cc5ff;float: left;margin-left: 280px" @click="setCoures('现场课')">
<div style="align-content: center">
<div style="margin-top: 80px;font-size: 30px;font-weight: bolder;color: #ffffff">
<img style="width: 100px;height: 100px;border-radius: 65px" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.gpbctv.com%2Fuploads%2F20210424%2Fzip_1619246266UkP6CL.jpg&refer=http%3A%2F%2Fwww.gpbctv.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1668584440&t=cbeb6a7281e4058a12dcf2f83cd25901">
</div>
<div style="padding-top: 10px;color: #ffffff">现场课</div>
</div>
</div>
</div>
<div style="width: 100%;float: left;margin-top: 100px;margin-bottom: 100px">
<el-button type="primary" @click="openCoures()">确认</el-button>
</div>
</el-card>
</div>
</template>
<script>
export default {
data () {
return {
activeName: 'first',
dataForm: {
name: '',
teacherName: '',
type: '',
status: '',
time: '',
subjectIdList: []
},
dataFormType: {
name: ''
},
couresName: '',
dataList: [],
subjectList: [],
teacherList: []
}
},
mounted () {
},
methods: {
setCoures(e){
this.couresName = e
},
openCoures() {
if (this.couresName !== '') {
//
this.$router.push({
path: "/coures-info",
query: {
couresName: this.couresName
}
});
} else {
this.$alert('请选择新建课程类型!', '请确认!');
}
}
}
}
</script>
<style type="text/css">
.crud__left {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
float: left;
-webkit-box-pack: end;
-ms-flex-pack: end;
justify-content: flex-end
}
.crud__right {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: end;
-ms-flex-pack: end;
justify-content: flex-end
}
</style>

683
src/page/coures/coures-info.vue

@ -1,20 +1,24 @@ @@ -1,20 +1,24 @@
<template>
<div>
<div class="apply-step-box">
<el-steps :active="active" simple>
<el-step title="课程信息"></el-step>
<el-step title="章节信息"></el-step>
</el-steps>
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="基本信息" name="first">基本信息</el-tab-pane>
<el-tab-pane label="章节信息" name="second" v-if="dataForm.type === '视频课'">章节信息</el-tab-pane>
<el-tab-pane label="直播信息" name="third" v-if="dataForm.type === '直播课'">直播信息</el-tab-pane>
<el-tab-pane label="现场信息" name="fourth" v-if="dataForm.type === '现场课'">现场信息</el-tab-pane>
<el-tab-pane label="学员信息" name="fiveth">学员信息</el-tab-pane>
</el-tabs>
</div>
<div v-if="active === 1">
<div style="width: 100%;display: flex">
<div style="width: 60%;float: left">
<div v-if="activeName === 'first'">
<div style="width: 100%;">
<div style="width: 60%;margin-left: 22%">
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="text-title">课程标题</span>
<span class="text-title">课程名称</span>
</el-col>
<el-col :span="14" class="text-content">
<el-input
v-model="dataForm.name"
maxlength="25"
:rows="1"
placeholder="最多输入25个字"
@ -25,32 +29,40 @@ @@ -25,32 +29,40 @@
</el-row>
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="text-title">主讲老师</span>
<span class="text-title">课程类型</span>
</el-col>
<el-col :span="14" class="text-content">
<el-input
maxlength="25"
:rows="1"
placeholder="最多输入25个字"
show-word-limit
<el-select
disabled
style="width:100%"
clearable
v-model="dataForm.type"
placeholder="请选择"
>
</el-input>
<el-option
v-for="item in typeList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-col>
</el-row>
<el-row type="flex" align="middle" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="require-icon">*</span>
<span class="text-title">课程分类</span>
<span class="text-title">课程科目</span>
</el-col>
<el-col :span="14" class="text-content">
<el-select
style="width:100%"
clearable
multiple
placeholder="请选择分类"
v-model="dataForm.subject"
placeholder="请选择"
>
<el-option
v-for="item in typelist"
v-for="item in subjectList"
:key="item.id"
:label="item.name"
:value="item.id"
@ -59,6 +71,27 @@ @@ -59,6 +71,27 @@
</el-select>
</el-col>
</el-row>
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="text-title">主讲老师</span>
</el-col>
<el-col :span="14" class="text-content">
<el-select
style="width:100%"
clearable
v-model="dataForm.teacherName"
placeholder="请选择"
>
<el-option
v-for="item in teacherList"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
</el-option>
</el-select>
</el-col>
</el-row>
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="require-icon">*</span>
@ -80,7 +113,7 @@ @@ -80,7 +113,7 @@
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="require-icon">*</span>
<span class="text-title">简介</span>
<span class="text-title">课程说明</span>
</el-col>
<el-col :span="14" class="text-content">
<el-input
@ -94,172 +127,488 @@ @@ -94,172 +127,488 @@
</el-col>
</el-row>
</div>
<div style="float: right;width: 40%">
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="require-icon">*</span>
<span class="text-title">课程难度</span>
</el-col>
<el-col :span="14" class="text-content">
<el-radio v-model="radio" label="1">简单</el-radio>
<el-radio v-model="radio" label="2">一般</el-radio>
<el-radio v-model="radio" label="2"></el-radio>
</el-col>
</el-row>
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="require-icon">*</span>
<span class="text-title">课程价格</span>
</el-col>
<el-col :span="14" class="text-content">
<el-radio v-model="radio" label="1">免费</el-radio>
<el-radio v-model="radio" label="2">收费</el-radio>
</el-col>
</el-row>
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="require-icon">*</span>
<span class="text-title">课程标签</span>
</el-col>
<el-col :span="14" class="text-content">
</div>
</div>
<div v-else-if="activeName === 'second' ">
<div style="width: 60%;margin-left: 20%">
<div style="display: flex;float: left">
<el-form :inline="true">
<el-form-item>
<el-button type="primary"
@click="handleAdd()">新增章节
</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary"
@click="addCourse()">结课
</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-table
border
:data="tableData"
>
<el-table-column prop="name" label="序号" align="center">
<template slot-scope="scope">
<span>
{{ scope.$index + 1 }}
</span>
</template>
</el-table-column>
<el-table-column prop="inIp" label="章节名称" align="center">
<template slot-scope="scope">
<el-input
type="textarea"
maxlength="150"
:rows="4"
placeholder="最多输入150个字"
show-word-limit
>
</el-input>
</el-col>
</el-row>
</div>
v-if="scope.row.isEdit"
v-model="scope.row.inPort"
maxlength="20"
placeholder="Required"
/>
<span v-else v-text="scope.row.inIp"></span>
</template>
</el-table-column>
<el-table-column prop="inPort" label="状态" align="center">
<template slot-scope="scope">
<el-input
v-if="scope.row.isEdit"
v-model="scope.row.inPort"
maxlength="20"
placeholder="Required"
/>
<span v-else v-text="scope.row.inPort"></span>
</template>
</el-table-column>
<el-table-column prop="outPort" label="视频" align="center">
<template slot-scope="scope">
<el-input
v-if="scope.row.isEdit"
v-model="scope.row.outPort"
maxlength="20"
placeholder="Required"
/>
<span v-else v-text="scope.row.outPort"></span>
</template>
</el-table-column>
<el-table-column prop="enabled" label="课件" align="center">
<template slot-scope="scope">
<el-input
v-if="scope.row.isEdit"
v-model="scope.row.inPort"
maxlength="20"
placeholder="Required"
/>
<span v-else v-text="scope.row.inPort"></span>
</template>
</el-table-column>
<el-table-column prop="enabled" label="随堂练习" align="center">
<template slot-scope="scope">
<el-input
v-if="scope.row.isEdit"
v-model="scope.row.inPort"
maxlength="20"
placeholder="Required"
/>
<span v-else v-text="scope.row.inPort"></span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
style="color: #2090c1"
@click="handleUpdate(scope.row)"
>查看
</el-button>
<el-button
size="mini"
type="text"
style="color: #2090c1"
@click="handleAdd(scope.row)"
>发布
</el-button>
<el-button
size="mini"
type="text"
style="color: #F56C6C"
@click="handleDelete(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div style="width: 100%">
<el-button style="margin-top: 12px;" @click="next">下一步</el-button>
</div>
</div>
<div v-else-if="active !== 1 ">
<div style="width: 100%;display: flex">
<div style="float: right;width: 30%">
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="10" class="text-right">
<span class="require-icon">*</span>
<span class="text-title">新建章节</span>
</el-col>
</el-row>
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
</el-col>
<el-col :span="14" class="text-content">
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</el-col>
</el-row>
<div v-if="activeName === 'third'">
<div style="width: 100%;">
<div style="width: 60%;margin-left: 22%">
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="text-title">直播时间</span>
</el-col>
<el-col :span="14" class="text-content">
<el-input
v-model="dataForm.name"
maxlength="25"
:rows="1"
placeholder="最多输入25个字"
show-word-limit
>
</el-input>
</el-col>
</el-row>
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="text-title">直播服务商</span>
</el-col>
<el-col :span="14" class="text-content">
<el-select
style="width:100%"
clearable
v-model="dataForm.couresName"
placeholder="请选择"
>
<el-option
v-for="item in typeList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-col>
</el-row>
<el-row type="flex" align="middle" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="require-icon">*</span>
<span class="text-title">直播间号码</span>
</el-col>
<el-col :span="14" class="text-content">
<el-input
v-model="dataForm.name"
maxlength="25"
:rows="1"
placeholder="最多输入25个字"
show-word-limit
>
</el-input>
</el-col>
</el-row>
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="text-title">直播间密码</span>
</el-col>
<el-col :span="14" class="text-content">
<el-input
v-model="dataForm.name"
maxlength="25"
:rows="1"
placeholder="最多输入25个字"
show-word-limit
>
</el-input>
</el-col>
</el-row>
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="require-icon">*</span>
<span class="text-title">上传录播</span>
</el-col>
<el-col :span="14" class="text-content">
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
list-type="picture">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div>
</el-upload>
</el-col>
</el-row>
</div>
</div>
<div style="width: 40%;float: left">
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="text-title">标题</span>
</el-col>
<el-col :span="14" class="text-content">
<el-input
maxlength="25"
:rows="1"
placeholder="最多输入25个字"
show-word-limit
>
</el-input>
</el-col>
</el-row>
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="require-icon">*</span>
<span class="text-title">简介</span>
</el-col>
<el-col :span="14" class="text-content">
<el-input
type="textarea"
maxlength="1000"
:rows="10"
placeholder="最多输入1000个字"
show-word-limit
>
</el-input>
</el-col>
</el-row>
</div>
<div v-if="activeName === 'fourth'">
<div style="width: 100%;">
<div style="width: 60%;margin-left: 22%">
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="text-title">开课地点</span>
</el-col>
<el-col :span="14" class="text-content">
<el-input
v-model="dataForm.name"
maxlength="25"
:rows="1"
placeholder="最多输入25个字"
show-word-limit
>
</el-input>
</el-col>
</el-row>
<el-row type="flex" align="middle" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="require-icon">*</span>
<span class="text-title">开课时间</span>
</el-col>
<el-col :span="14" class="text-content">
<el-input
v-model="dataForm.name"
maxlength="25"
:rows="1"
placeholder="最多输入25个字"
show-word-limit
>
</el-input>
</el-col>
</el-row>
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="text-title">直播间密码</span>
</el-col>
<el-col :span="14" class="text-content">
<el-input
v-model="dataForm.name"
maxlength="25"
:rows="1"
placeholder="最多输入25个字"
show-word-limit
>
</el-input>
</el-col>
</el-row>
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="require-icon">*</span>
<span class="text-title">上传录播</span>
</el-col>
<el-col :span="14" class="text-content">
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
list-type="picture">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div>
</el-upload>
</el-col>
</el-row>
</div>
</div>
<div style="float: right;width: 30%">
<el-row type="flex" align="top" :gutter="10" class="el-row">
<el-col :span="4" class="text-right">
<span class="require-icon">*</span>
<span class="text-title">上传封面</span>
</el-col>
<el-col :span="14" class="text-content">
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
list-type="picture">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div>
</el-upload>
</el-col>
</el-row>
</div>
<div v-if="activeName === 'fiveth'">
<div style="width: 40%;margin-left: 30%">
<div style="display: flex;float: left;">
<el-form :inline="true">
<el-form-item>
<el-button type="primary"
@click="addCourse()">导出
</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-table :data="dataList" border>
<el-table-column label="序号" fixed
header-align="center" align="center" width="50">
<template slot-scope="scope">
<span>
{{ scope.$index + 1 }}
</span>
</template>
</el-table-column>
<el-table-column prop="name" label="学员姓名" fixed
header-align="center" align="center" width="160">
</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="120">
</el-table-column>
<el-table-column prop="updateTime" label="最近一次学习时间" fixed
header-align="center" align="center" width="220">
</el-table-column>
</el-table>
</div>
</div>
<div style="width: 100%">
<el-button style="margin-top: 12px;" @click="finde">完成</el-button>
</div>
</div>
</div>
</template>
<script>
import { getRequest } from '../../utils/api'
export default {
data() {
return {
activeName: 'first',
active: 1,
typelist: [],
fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}],
data: [{
label: '一级 1',
children: [{
label: '二级 1-1',
children: [{
label: '三级 1-1-1'
}]
}]
}, {
label: '一级 2',
children: [{
label: '二级 2-1',
children: [{
label: '三级 2-1-1'
}]
}, {
label: '二级 2-2',
children: [{
label: '三级 2-2-1'
}]
}]
}, {
label: '一级 3',
children: [{
label: '二级 3-1',
children: [{
label: '三级 3-1-1'
}]
}, {
label: '二级 3-2',
children: [{
label: '三级 3-2-1'
}]
}]
}],
subjectList: [],
typeList: [
{
id: '1',
name: '钉钉'
},
{
id: '2',
name: '腾讯'
}
],
tableData: [
{
name: '123',
inIp: '2222',
inPort: '21',
outPort: '333',
enabled: '555'
}
],
internalIpList: [],
fileList:[],
dataForm: {
name: '',
teacherName: '',
type: this.$route.query.couresName,
couresName: '',
status: '',
time: '',
subjectIdList: [],
teacherList: []
}
};
},
created () {
this.getTypeList()
this.getTeacherList()
},
methods: {
//
getReverseShellList() {
getShellList().then(res => {
if (res.code === 200) {
if (res.data && res.data.length > 0) {
// isEditfalse
res.data.forEach(item => {
item['isEdit'] = false
})
}
this.tableData = res.data
//
this.tableData.unshift({
name: '',
inIp: '',
inPort: null,
outPort: null,
enabled: null,
isEdit: true
})
}
})
},
//
handleAdd(row) {
for (let key in row) {
//
if (row[key] === '' || row[key] === null || typeof row[key] === 'undefined') {
this.msgError('Please complete the information')
return
}
}
const params = {
name: row.name,
inIp: row.inIp,
inPort: parseInt(row.inPort),
outPort: parseInt(row.outPort),
enabled: row.enabled
}
},
// Apply
handleUpdate(row) {
// Apply
if (row.isEdit) {
for (let key in row) {
if (row[key] === '' || row[key] === null || typeof row[key] === 'undefined') {
this.msgError('Please complete the information')
return
}
}
const params = {
name: row.name,
inIp: row.inIp,
inPort: parseInt(row.inPort),
outPort: parseInt(row.outPort),
enabled: row.enabled
}
} else {
//
row.isEdit = true
}
},
//
handleDelete(row) {
//
if (row.isEdit) {
this.getReverseShellList()
} else {
//
this.$confirm('Are you sure to delete reverse shell?', 'warning', {
confirmButtonText: 'Sure',
cancelButtonText: 'Cancel',
type: 'warning'
}).then(() => {
deleteShell(row.name).then(res => {
if (res.code === 200) {
this.msgSuccess('Delete reverse shell successfully')
this.getReverseShellList()
}
})
}).catch(() => {
})
}
},
getTeacherList: function () {
var _this = this;
this.loading = true;
getRequest('/edu/v1/pc/school/schoolTeacher', JSON.stringify({
scope: '10010',
})).then(resp=> {
_this.loading = false;
if (resp.status === 200) {
this.teacherList = resp.data.data
} else {
//
_this.$alert('');
}
}, resp=> {
});
},
getTypeList: function () {
var _this = this;
this.loading = true;
getRequest('/edu/v1/pc/subject/by/name', JSON.stringify({
mode: 'all',
})).then(resp=> {
_this.loading = false;
if (resp.status === 200) {
this.subjectList = resp.data.data
} else {
//
_this.$alert('');
}
}, resp=> {
});
},
handleClick(tab, event) {
console.log(tab, event);
},
next() {
if (this.active++ > 1) this.active = 1;
},

43
src/page/coures/coures.vue

@ -106,7 +106,41 @@ @@ -106,7 +106,41 @@
</template>
</el-table-column>
<el-table-column prop="name" label="课程名称" fixed
header-align="center" align="center" width="200">
header-align="center" align="left" width="200">
<template slot-scope="scope">
<div>
<span>
{{ scope.row.name}}
</span>
</div>
<div v-if="scope.row.type === '视频课'">
<span style="font-size: 8px;color: #909399">
10章节
</span>
</div>
<div v-if="scope.row.type === '直播课'">
<span style="font-size: 8px;color: #909399">
2022-10-16 20:20
</span>
</div>
<div v-if="scope.row.type === '现场课'">
<el-popover
placement="right"
width="400"
trigger="click">
<el-table :data="gridData">
<el-table-column width="150" property="date" label="日期"></el-table-column>
<el-table-column width="100" property="address" label="地址"></el-table-column>
<el-table-column width="100" property="name" label="备注"></el-table-column>
</el-table>
<el-button slot="reference" size="mini">
<span style="font-size: 8px;color: dodgerblue">
上课信息
</span>
</el-button>
</el-popover>
</div>
</template>
</el-table-column>
<el-table-column prop="type" label="类型" fixed
header-align="center" align="center" width="150">
@ -140,7 +174,7 @@ @@ -140,7 +174,7 @@
width="150">
<template slot-scope="scope">
<el-button type="text" size="mini"
@click="">查看
@click="updateCourse(scope.row)">查看
</el-button>
<el-button type="text" size="mini" v-if="scope.row.status!=='DRAFT'"
@click="">下架
@ -303,16 +337,17 @@ export default { @@ -303,16 +337,17 @@ export default {
addCourse(){
//
this.$router.push({
path: "/coures-info",
path: "/add-coures",
query: {
}
});
},
updateCourse(id){
updateCourse(row){
//
this.$router.push({
path: "/coures-info",
query: {
couresName: row.type
}
});
},

15
src/router/index.js

@ -13,6 +13,7 @@ import subscribe from '@/page/coures/subscribe' //课程管理 @@ -13,6 +13,7 @@ import subscribe from '@/page/coures/subscribe' //课程管理
import examination from '@/page/examination/examination' //新建习题
import examinationInfo from '@/page/examination/examination-info' //新建考试
import exercisesInfo from '@/page/exercises/exercises-info' //新建习题
import addCoures from '@/page/coures/add-coures' //新建习题
Vue.use(Router)
@ -122,6 +123,20 @@ export default new Router({ @@ -122,6 +123,20 @@ export default new Router({
}
]
},
{
path: '/home',
component: Home,
name: '新增习题',
hidden: true,
children: [
{
path: '/add-coures',
iconCls: 'fa fa-user-o',
name: '新增习题',
component: addCoures
}
]
},
{
path: '/home',
component: Home,

Loading…
Cancel
Save