|
|
|
@ -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) { |
|
|
|
|
// 获取到的数据加上 isEdit是false, 默认是文本 |
|
|
|
|
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; |
|
|
|
|
}, |
|
|
|
|