|
|
@ -1,20 +1,24 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="apply-step-box"> |
|
|
|
<div class="apply-step-box"> |
|
|
|
<el-steps :active="active" simple> |
|
|
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> |
|
|
|
<el-step title="课程信息"></el-step> |
|
|
|
<el-tab-pane label="基本信息" name="first">基本信息</el-tab-pane> |
|
|
|
<el-step title="章节信息"></el-step> |
|
|
|
<el-tab-pane label="章节信息" name="second" v-if="dataForm.type === '视频课'">章节信息</el-tab-pane> |
|
|
|
</el-steps> |
|
|
|
<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> |
|
|
|
<div v-if="active === 1"> |
|
|
|
<div v-if="activeName === 'first'"> |
|
|
|
<div style="width: 100%;display: flex"> |
|
|
|
<div style="width: 100%;"> |
|
|
|
<div style="width: 60%;float: left"> |
|
|
|
<div style="width: 60%;margin-left: 22%"> |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<span class="text-title">课程标题:</span> |
|
|
|
<span class="text-title">课程名称:</span> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
<el-input |
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="dataForm.name" |
|
|
|
maxlength="25" |
|
|
|
maxlength="25" |
|
|
|
:rows="1" |
|
|
|
:rows="1" |
|
|
|
placeholder="最多输入25个字" |
|
|
|
placeholder="最多输入25个字" |
|
|
@ -25,32 +29,40 @@ |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<span class="text-title">主讲老师:</span> |
|
|
|
<span class="text-title">课程类型:</span> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
<el-input |
|
|
|
<el-select |
|
|
|
maxlength="25" |
|
|
|
disabled |
|
|
|
:rows="1" |
|
|
|
style="width:100%" |
|
|
|
placeholder="最多输入25个字" |
|
|
|
clearable |
|
|
|
show-word-limit |
|
|
|
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-col> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
<el-row type="flex" align="middle" :gutter="10" class="el-row"> |
|
|
|
<el-row type="flex" align="middle" :gutter="10" class="el-row"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<span class="require-icon">*</span> |
|
|
|
<span class="require-icon">*</span> |
|
|
|
<span class="text-title">课程分类:</span> |
|
|
|
<span class="text-title">课程科目:</span> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
<el-select |
|
|
|
<el-select |
|
|
|
style="width:100%" |
|
|
|
style="width:100%" |
|
|
|
clearable |
|
|
|
clearable |
|
|
|
multiple |
|
|
|
v-model="dataForm.subject" |
|
|
|
placeholder="请选择分类" |
|
|
|
placeholder="请选择" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="item in typelist" |
|
|
|
v-for="item in subjectList" |
|
|
|
:key="item.id" |
|
|
|
:key="item.id" |
|
|
|
:label="item.name" |
|
|
|
:label="item.name" |
|
|
|
:value="item.id" |
|
|
|
:value="item.id" |
|
|
@ -59,6 +71,27 @@ |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</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-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<span class="require-icon">*</span> |
|
|
|
<span class="require-icon">*</span> |
|
|
@ -80,7 +113,7 @@ |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<span class="require-icon">*</span> |
|
|
|
<span class="require-icon">*</span> |
|
|
|
<span class="text-title">简介:</span> |
|
|
|
<span class="text-title">课程说明:</span> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
<el-input |
|
|
|
<el-input |
|
|
@ -94,172 +127,488 @@ |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="float: right;width: 40%"> |
|
|
|
</div> |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
</div> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<div v-else-if="activeName === 'second' "> |
|
|
|
<span class="require-icon">*</span> |
|
|
|
<div style="width: 60%;margin-left: 20%"> |
|
|
|
<span class="text-title">课程难度:</span> |
|
|
|
<div style="display: flex;float: left"> |
|
|
|
</el-col> |
|
|
|
<el-form :inline="true"> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
<el-form-item> |
|
|
|
<el-radio v-model="radio" label="1">简单</el-radio> |
|
|
|
<el-button type="primary" |
|
|
|
<el-radio v-model="radio" label="2">一般</el-radio> |
|
|
|
@click="handleAdd()">新增章节 |
|
|
|
<el-radio v-model="radio" label="2">难</el-radio> |
|
|
|
</el-button> |
|
|
|
</el-col> |
|
|
|
</el-form-item> |
|
|
|
</el-row> |
|
|
|
<el-form-item> |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<el-button type="primary" |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
@click="addCourse()">结课 |
|
|
|
<span class="require-icon">*</span> |
|
|
|
</el-button> |
|
|
|
<span class="text-title">课程价格:</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-form> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
</div> |
|
|
|
<el-radio v-model="radio" label="1">免费</el-radio> |
|
|
|
<div> |
|
|
|
<el-radio v-model="radio" label="2">收费</el-radio> |
|
|
|
<el-table |
|
|
|
</el-col> |
|
|
|
border |
|
|
|
</el-row> |
|
|
|
:data="tableData" |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<el-table-column prop="name" label="序号" align="center"> |
|
|
|
<span class="require-icon">*</span> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="text-title">课程标签:</span> |
|
|
|
<span> |
|
|
|
</el-col> |
|
|
|
{{ scope.$index + 1 }} |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="inIp" label="章节名称" align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
<el-input |
|
|
|
type="textarea" |
|
|
|
v-if="scope.row.isEdit" |
|
|
|
maxlength="150" |
|
|
|
v-model="scope.row.inPort" |
|
|
|
:rows="4" |
|
|
|
maxlength="20" |
|
|
|
placeholder="最多输入150个字" |
|
|
|
placeholder="Required" |
|
|
|
show-word-limit |
|
|
|
/> |
|
|
|
> |
|
|
|
<span v-else v-text="scope.row.inIp"></span> |
|
|
|
</el-input> |
|
|
|
</template> |
|
|
|
</el-col> |
|
|
|
</el-table-column> |
|
|
|
</el-row> |
|
|
|
<el-table-column prop="inPort" label="状态" align="center"> |
|
|
|
</div> |
|
|
|
<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> |
|
|
|
<div style="width: 100%"> |
|
|
|
|
|
|
|
<el-button style="margin-top: 12px;" @click="next">下一步</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="active !== 1 "> |
|
|
|
<div v-if="activeName === 'third'"> |
|
|
|
<div style="width: 100%;display: flex"> |
|
|
|
<div style="width: 100%;"> |
|
|
|
<div style="float: right;width: 30%"> |
|
|
|
<div style="width: 60%;margin-left: 22%"> |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<el-col :span="10" class="text-right"> |
|
|
|
<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> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
</el-row> |
|
|
|
<el-input |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
v-model="dataForm.name" |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
maxlength="25" |
|
|
|
</el-col> |
|
|
|
:rows="1" |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
placeholder="最多输入25个字" |
|
|
|
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree> |
|
|
|
show-word-limit |
|
|
|
</el-col> |
|
|
|
> |
|
|
|
</el-row> |
|
|
|
</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> |
|
|
|
<div style="width: 40%;float: left"> |
|
|
|
</div> |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<div v-if="activeName === 'fourth'"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<div style="width: 100%;"> |
|
|
|
<span class="text-title">标题:</span> |
|
|
|
<div style="width: 60%;margin-left: 22%"> |
|
|
|
</el-col> |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<el-input |
|
|
|
<span class="text-title">开课地点:</span> |
|
|
|
maxlength="25" |
|
|
|
</el-col> |
|
|
|
:rows="1" |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
placeholder="最多输入25个字" |
|
|
|
<el-input |
|
|
|
show-word-limit |
|
|
|
v-model="dataForm.name" |
|
|
|
> |
|
|
|
maxlength="25" |
|
|
|
</el-input> |
|
|
|
:rows="1" |
|
|
|
</el-col> |
|
|
|
placeholder="最多输入25个字" |
|
|
|
</el-row> |
|
|
|
show-word-limit |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
</el-input> |
|
|
|
<span class="require-icon">*</span> |
|
|
|
</el-col> |
|
|
|
<span class="text-title">简介:</span> |
|
|
|
</el-row> |
|
|
|
</el-col> |
|
|
|
<el-row type="flex" align="middle" :gutter="10" class="el-row"> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<el-input |
|
|
|
<span class="require-icon">*</span> |
|
|
|
type="textarea" |
|
|
|
<span class="text-title">开课时间:</span> |
|
|
|
maxlength="1000" |
|
|
|
</el-col> |
|
|
|
:rows="10" |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
placeholder="最多输入1000个字" |
|
|
|
<el-input |
|
|
|
show-word-limit |
|
|
|
v-model="dataForm.name" |
|
|
|
> |
|
|
|
maxlength="25" |
|
|
|
</el-input> |
|
|
|
:rows="1" |
|
|
|
</el-col> |
|
|
|
placeholder="最多输入25个字" |
|
|
|
</el-row> |
|
|
|
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> |
|
|
|
<div style="float: right;width: 30%"> |
|
|
|
</div> |
|
|
|
<el-row type="flex" align="top" :gutter="10" class="el-row"> |
|
|
|
<div v-if="activeName === 'fiveth'"> |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
<div style="width: 40%;margin-left: 30%"> |
|
|
|
<span class="require-icon">*</span> |
|
|
|
<div style="display: flex;float: left;"> |
|
|
|
<span class="text-title">上传封面:</span> |
|
|
|
<el-form :inline="true"> |
|
|
|
</el-col> |
|
|
|
<el-form-item> |
|
|
|
<el-col :span="14" class="text-content"> |
|
|
|
<el-button type="primary" |
|
|
|
<el-upload |
|
|
|
@click="addCourse()">导出 |
|
|
|
class="upload-demo" |
|
|
|
</el-button> |
|
|
|
action="https://jsonplaceholder.typicode.com/posts/" |
|
|
|
</el-form-item> |
|
|
|
:on-preview="handlePreview" |
|
|
|
</el-form> |
|
|
|
:on-remove="handleRemove" |
|
|
|
</div> |
|
|
|
:file-list="fileList" |
|
|
|
<div> |
|
|
|
list-type="picture"> |
|
|
|
<el-table :data="dataList" border> |
|
|
|
<el-button size="small" type="primary">点击上传</el-button> |
|
|
|
<el-table-column label="序号" fixed |
|
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> |
|
|
|
header-align="center" align="center" width="50"> |
|
|
|
</el-upload> |
|
|
|
<template slot-scope="scope"> |
|
|
|
</el-col> |
|
|
|
<span> |
|
|
|
</el-row> |
|
|
|
{{ 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> |
|
|
|
</div> |
|
|
|
<div style="width: 100%"> |
|
|
|
|
|
|
|
<el-button style="margin-top: 12px;" @click="finde">完成</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
|
|
|
|
import { getRequest } from '../../utils/api' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
|
|
|
|
activeName: 'first', |
|
|
|
active: 1, |
|
|
|
active: 1, |
|
|
|
typelist: [], |
|
|
|
subjectList: [], |
|
|
|
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'}], |
|
|
|
typeList: [ |
|
|
|
data: [{ |
|
|
|
{ |
|
|
|
label: '一级 1', |
|
|
|
id: '1', |
|
|
|
children: [{ |
|
|
|
name: '钉钉' |
|
|
|
label: '二级 1-1', |
|
|
|
}, |
|
|
|
children: [{ |
|
|
|
{ |
|
|
|
label: '三级 1-1-1' |
|
|
|
id: '2', |
|
|
|
}] |
|
|
|
name: '腾讯' |
|
|
|
}] |
|
|
|
} |
|
|
|
}, { |
|
|
|
], |
|
|
|
label: '一级 2', |
|
|
|
tableData: [ |
|
|
|
children: [{ |
|
|
|
{ |
|
|
|
label: '二级 2-1', |
|
|
|
name: '123', |
|
|
|
children: [{ |
|
|
|
inIp: '2222', |
|
|
|
label: '三级 2-1-1' |
|
|
|
inPort: '21', |
|
|
|
}] |
|
|
|
outPort: '333', |
|
|
|
}, { |
|
|
|
enabled: '555' |
|
|
|
label: '二级 2-2', |
|
|
|
} |
|
|
|
children: [{ |
|
|
|
], |
|
|
|
label: '三级 2-2-1' |
|
|
|
internalIpList: [], |
|
|
|
}] |
|
|
|
fileList:[], |
|
|
|
}] |
|
|
|
dataForm: { |
|
|
|
}, { |
|
|
|
name: '', |
|
|
|
label: '一级 3', |
|
|
|
teacherName: '', |
|
|
|
children: [{ |
|
|
|
type: this.$route.query.couresName, |
|
|
|
label: '二级 3-1', |
|
|
|
couresName: '', |
|
|
|
children: [{ |
|
|
|
status: '', |
|
|
|
label: '三级 3-1-1' |
|
|
|
time: '', |
|
|
|
}] |
|
|
|
subjectIdList: [], |
|
|
|
}, { |
|
|
|
teacherList: [] |
|
|
|
label: '二级 3-2', |
|
|
|
} |
|
|
|
children: [{ |
|
|
|
|
|
|
|
label: '三级 3-2-1' |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}], |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
created () { |
|
|
|
|
|
|
|
this.getTypeList() |
|
|
|
|
|
|
|
this.getTeacherList() |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
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() { |
|
|
|
next() { |
|
|
|
if (this.active++ > 1) this.active = 1; |
|
|
|
if (this.active++ > 1) this.active = 1; |
|
|
|
}, |
|
|
|
}, |
|
|
|