mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-20 00:06:47 +08:00
feat:新增新增线上 面授 添加面授课(差一点)
This commit is contained in:
@@ -62,16 +62,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btn btn4">
|
<div class="btn btn4">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText" @click="ft_hShow">新建课程</div>
|
<div class="btnText" @click="of_hShow">新建课程</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 搜索框及按钮 -->
|
<!-- 搜索框及按钮 -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 新建面授课弹窗 -->
|
<!-- 新建选择线上还是面授课弹窗 -->
|
||||||
<div class="faceteach" :style="{display:ft_hs ? 'block' :'none' }">
|
<div class="selectonlineface" :style="{display:of_hs ? 'block' :'none' }">
|
||||||
<div class="ft_header"></div>
|
<div class="of_header"></div>
|
||||||
<div class="ft_main">
|
<div class="of_main">
|
||||||
<div class="m_header">
|
<div class="m_header">
|
||||||
<div class="add_icon"></div>
|
<div class="add_icon"></div>
|
||||||
<span>请选择课程类型</span>
|
<span>请选择课程类型</span>
|
||||||
@@ -128,11 +128,11 @@
|
|||||||
<div class="ol_checkbox">
|
<div class="ol_checkbox">
|
||||||
<div class="checkbtn"></div>
|
<div class="checkbtn"></div>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin:auto 31px auto 5px;">线上</span>
|
<span style="margin:auto 45px auto 5px;">是</span>
|
||||||
<div class="ol_checkbox">
|
<div class="ol_checkbox">
|
||||||
<div class="checkbtn"></div>
|
<div class="checkbtn"></div>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin:auto 31px auto 5px;">面授</span>
|
<span style="margin:auto 0px auto 5px;">否</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="b_footer">
|
<div class="b_footer">
|
||||||
@@ -140,13 +140,164 @@
|
|||||||
<div class="btnText">取消</div>
|
<div class="btnText">取消</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn btn6" >
|
<div class="btn btn6" >
|
||||||
<div class="btnText">确定</div>
|
<div class="btnText" @click="createft">确定</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 新建面授课弹窗 -->
|
<!-- 新建选择线上还是面授课弹窗 -->
|
||||||
|
|
||||||
|
<!-- 确定新建面授课弹窗 -->
|
||||||
|
<div class="faceteach">
|
||||||
|
<div class="ft_header"></div>
|
||||||
|
<div class="ft_main">
|
||||||
|
<div class="m_header">
|
||||||
|
<div class="add_icon"></div>
|
||||||
|
<span>新建面授课</span>
|
||||||
|
<div class="add_exit">x</div>
|
||||||
|
</div>
|
||||||
|
<div class="m_title">课程信息</div>
|
||||||
|
<div class="m_body">
|
||||||
|
<div class="mb_left">
|
||||||
|
<div class="mbl_items1">
|
||||||
|
<span style="font-weight: 900; color: red;margin-right: 6px;">⃰</span>
|
||||||
|
<span style="margin-right:14px;">课程名称</span>
|
||||||
|
<div class="i1_input">
|
||||||
|
<a-input v-model:value="value" style="width: 440px ;height:40px;border-radius: 8px;" placeholder="请输入课程名称" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mbl_items2">
|
||||||
|
<div class="i2_top">
|
||||||
|
<div class="i2_left">课程命名规则</div>
|
||||||
|
<div class="i2_right" @click="hideShow" >
|
||||||
|
<div class="b_zk" :style="{display:hideshow ? 'block' :'none' }">
|
||||||
|
<span style="color: #4EA6FF;">收起</span>
|
||||||
|
</div>
|
||||||
|
<div class="b_sq" :style="{display:hideshow ? 'none' :'block' }">
|
||||||
|
<span style="color: #4EA6FF;">展开</span>
|
||||||
|
</div>
|
||||||
|
<div class="b_icon"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="i2_detail" :style="{display:hideshow ? 'block' :'none' }">
|
||||||
|
<span style="color: #999BA3;">
|
||||||
|
1、课程名称统一不加书名号。<br/>
|
||||||
|
2、项目名称、属地等信息如需体现在课程名称中,请放在课程名称信息
|
||||||
|
之后,如“时间管理(GROW180项目)”或“时间管理(B*)”确保首先
|
||||||
|
看到的是课程内容主题。<br/>
|
||||||
|
3、同一课程如先后有多个版本,原则上仅开放最新版本,旧版本应停用
|
||||||
|
版本如必须以年份标明,请以“沟通技巧(2022年)”的方式呈现。
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mbl_items3">
|
||||||
|
<div class="i3_top">
|
||||||
|
<span style="font-weight: 900; color: red;margin-right: 6px;">⃰</span>
|
||||||
|
<span style="margin-right:14px;">封面图</span>
|
||||||
|
<div class="i3_upload">
|
||||||
|
<a-upload
|
||||||
|
v-model:file-list="fileList"
|
||||||
|
name="avatar"
|
||||||
|
list-type="picture-card"
|
||||||
|
class="avatar-uploader"
|
||||||
|
:show-upload-list="false"
|
||||||
|
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
@change="handleChange"
|
||||||
|
>
|
||||||
|
<img v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||||
|
<div v-else>
|
||||||
|
<loading-outlined v-if="loading"></loading-outlined>
|
||||||
|
<plus-outlined v-else></plus-outlined>
|
||||||
|
<div class="ant-upload-text">Upload</div>
|
||||||
|
</div>
|
||||||
|
</a-upload>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="i3_bottom">
|
||||||
|
<span style="color:#999BA3;">高宽比为16:9 (如:800*450) png或jpg图片</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mbl_items4">
|
||||||
|
<span style="font-weight: 900; color: red;margin-right: 6px;">⃰</span>
|
||||||
|
<span style="margin-right:14px;">目标人群</span>
|
||||||
|
<div class="i1_input">
|
||||||
|
<a-input v-model:value="value" style="width: 440px ;height:40px;border-radius: 8px;" placeholder="请输入目标人群" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mbl_items5">
|
||||||
|
<span style="margin-right:14px;">课程价值</span>
|
||||||
|
<div class="i1_input">
|
||||||
|
<a-input v-model:value="value" style="width: 440px ;height:40px;border-radius: 8px;" placeholder="请输入课程价值" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mbl_items6">
|
||||||
|
<span style="font-weight: 900; color: red;margin-right: 6px;">⃰</span>
|
||||||
|
<span style="margin-right:14px;">内容分类</span>
|
||||||
|
<div class="select i6_input">
|
||||||
|
<a-select
|
||||||
|
dropdownClassName="dropdown-style"
|
||||||
|
style="width: 440px"
|
||||||
|
placeholder="请选择"
|
||||||
|
:options="options2"
|
||||||
|
allowClear
|
||||||
|
showSearch
|
||||||
|
></a-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mbl_items7">
|
||||||
|
<span style="margin-right:14px;">场景</span>
|
||||||
|
<div class="select i7_input">
|
||||||
|
<a-select
|
||||||
|
dropdownClassName="dropdown-style"
|
||||||
|
style="width: 440px"
|
||||||
|
placeholder="请选择"
|
||||||
|
:options="options2"
|
||||||
|
allowClear
|
||||||
|
showSearch
|
||||||
|
></a-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mbl_items8">
|
||||||
|
<div class="i8_top">
|
||||||
|
<span style="margin-right:14px;">内容标签</span>
|
||||||
|
<div class="i1_input">
|
||||||
|
<a-input v-model:value="value" style="width: 440px ;height:40px;border-radius: 8px;" placeholder="请输入按回车键创建成功" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="i8_bottom">
|
||||||
|
<a-tag closable @close="log">Tag 2</a-tag>
|
||||||
|
<a-tag closable @close.prevent>Prevent Default</a-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb_right">
|
||||||
|
<div class="mbl_items9">
|
||||||
|
<span style="font-weight: 900; color: red;margin-right: 6px;">⃰</span>
|
||||||
|
<span style="margin-right:14px;">授课教师</span>
|
||||||
|
<div class="i1_input">
|
||||||
|
<a-input v-model:value="value" style="width: 440px ;height:40px;border-radius: 8px;" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mbl_items10">
|
||||||
|
<span style="margin-right:14px;">课程简介</span>
|
||||||
|
<div class="i10_textarea">
|
||||||
|
<a-textarea v-model:value="value" style="width: 440px ;height:100px;border-radius: 8px; " placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mbl_items11">
|
||||||
|
<div class="i11_top">
|
||||||
|
<span style="margin-right: 10px;">附件</span>
|
||||||
|
<div class="accessory_icon"></div>
|
||||||
|
<span style="color:#4EA6FF;">添加附件</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 确定新建面授课弹窗 -->
|
||||||
|
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div class="tableBox">
|
<div class="tableBox">
|
||||||
@@ -163,6 +314,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, defineComponent, ref } from 'vue';
|
import { reactive, toRefs, defineComponent, ref } from 'vue';
|
||||||
|
import { PlusOutlined, LoadingOutlined } from '@ant-design/icons-vue';
|
||||||
|
import { message } from 'ant-design-vue';
|
||||||
const columns = [{
|
const columns = [{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 200,
|
width: 200,
|
||||||
@@ -280,7 +433,69 @@ const data = [{
|
|||||||
ynuse: '启用',
|
ynuse: '启用',
|
||||||
kkty:true,
|
kkty:true,
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
function getBase64(img, callback) {
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.addEventListener('load', () => callback(reader.result));
|
||||||
|
reader.readAsDataURL(img);
|
||||||
|
}
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
components: {
|
||||||
|
LoadingOutlined,
|
||||||
|
PlusOutlined,
|
||||||
|
},
|
||||||
|
|
||||||
|
setup() {
|
||||||
|
const fileList = ref([]);
|
||||||
|
const loading = ref(false);
|
||||||
|
const imageUrl = ref('');
|
||||||
|
|
||||||
|
const handleChange = info => {
|
||||||
|
if (info.file.status === 'uploading') {
|
||||||
|
loading.value = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (info.file.status === 'done') {
|
||||||
|
// Get this url from response in real world.
|
||||||
|
getBase64(info.file.originFileObj, base64Url => {
|
||||||
|
imageUrl.value = base64Url;
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (info.file.status === 'error') {
|
||||||
|
loading.value = false;
|
||||||
|
message.error('upload error');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const beforeUpload = file => {
|
||||||
|
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||||
|
|
||||||
|
if (!isJpgOrPng) {
|
||||||
|
message.error('You can only upload JPG file!');
|
||||||
|
}
|
||||||
|
|
||||||
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
|
|
||||||
|
if (!isLt2M) {
|
||||||
|
message.error('Image must smaller than 2MB!');
|
||||||
|
}
|
||||||
|
|
||||||
|
return isJpgOrPng && isLt2M;
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
fileList,
|
||||||
|
loading,
|
||||||
|
imageUrl,
|
||||||
|
handleChange,
|
||||||
|
beforeUpload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
const options1 = ref([ {
|
const options1 = ref([ {
|
||||||
value: 'value1',
|
value: 'value1',
|
||||||
@@ -314,14 +529,14 @@ export default defineComponent({
|
|||||||
}]);
|
}]);
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
ft_hs:false,
|
of_hs:false,
|
||||||
hideshow: false,
|
hideshow: false,
|
||||||
bs_hs:true,
|
bs_hs:true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const ft_hShow = () => {
|
const of_hShow = () => {
|
||||||
if (state.ft_hs == false) {
|
if (state.of_hs == false) {
|
||||||
state.ft_hs = true
|
state.of_hs = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,15 +555,21 @@ export default defineComponent({
|
|||||||
state.bs_hs = true
|
state.bs_hs = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const createft = () => {
|
||||||
|
if (state.bs_hs == false) {
|
||||||
|
state.of_hs = false
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
data,
|
data,
|
||||||
columns,
|
columns,
|
||||||
options1,
|
options1,
|
||||||
options2,
|
options2,
|
||||||
ft_hShow,
|
of_hShow,
|
||||||
hideShow,
|
hideShow,
|
||||||
bs_hShow,
|
bs_hShow,
|
||||||
|
createft,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -481,7 +702,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.faceteach{
|
.selectonlineface{
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
width: 679px;
|
width: 679px;
|
||||||
height: 525px;
|
height: 525px;
|
||||||
@@ -491,13 +712,13 @@ export default defineComponent({
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translate(-50%,-50%);
|
transform: translate(-50%,-50%);
|
||||||
.ft_header{
|
.of_header{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width:calc(100%);
|
width:calc(100%);
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background: linear-gradient( rgba(78,166,255,0.2) 0%, rgba(78,166,255,0) 100%);
|
background: linear-gradient( rgba(78,166,255,0.2) 0%, rgba(78,166,255,0) 100%);
|
||||||
}
|
}
|
||||||
.ft_main{
|
.of_main{
|
||||||
width:calc(100%);
|
width:calc(100%);
|
||||||
position: relative;
|
position: relative;
|
||||||
.m_header{
|
.m_header{
|
||||||
@@ -605,6 +826,154 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.faceteach{
|
||||||
|
// display: none;
|
||||||
|
z-index: 1000;
|
||||||
|
width: 1358px;
|
||||||
|
min-width: 1000px;
|
||||||
|
height: 805px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px 1px 35px 0px rgba(118,136,166,0.21);
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%,-50%);
|
||||||
|
.ft_header{
|
||||||
|
position: absolute;
|
||||||
|
width:calc(100%);
|
||||||
|
height: 40px;
|
||||||
|
background: linear-gradient( rgba(78,166,255,0.2) 0%, rgba(78,166,255,0) 100%);
|
||||||
|
}
|
||||||
|
.ft_main{
|
||||||
|
width:calc(100%);
|
||||||
|
position: relative;
|
||||||
|
.m_header{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 20px;
|
||||||
|
padding-left: 26px;
|
||||||
|
font-size: 16px;
|
||||||
|
.add_icon{
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-right: 10px;
|
||||||
|
background-image: url(@/assets/images/coursewareManage/add1.png);
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
.add_exit{
|
||||||
|
position: absolute;
|
||||||
|
right:42px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.m_title{
|
||||||
|
margin: 7px auto 25px 52px;
|
||||||
|
}
|
||||||
|
.m_body{
|
||||||
|
display: flex;
|
||||||
|
.mb_left{
|
||||||
|
.mbl_items1{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 87px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.mbl_items2{
|
||||||
|
margin-left: 164px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
.i2_top{
|
||||||
|
display: flex;
|
||||||
|
.i2_right{
|
||||||
|
margin-left: 320px;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.i2_detail{
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.mbl_items3{
|
||||||
|
margin-left: 87px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
.i3_top{
|
||||||
|
display: flex;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
.i3_bottom{
|
||||||
|
margin-left: 60px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.mbl_items4{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 87px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.mbl_items5{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 93px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.mbl_items6{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 87px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.mbl_items7{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 121px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.mbl_items8{
|
||||||
|
margin-left: 93px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
.i8_top{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.i8_bottom{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 71px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.mb_right{
|
||||||
|
.mbl_items9{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 100px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.mbl_items10{
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
margin-left: 107px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
.mbl_items11{
|
||||||
|
margin-left: 105px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
.i11_top{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.accessory_icon{
|
||||||
|
width: 15px ;
|
||||||
|
height: 15px ;
|
||||||
|
background-color: #4EA6FF;
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.tableBox {
|
.tableBox {
|
||||||
margin: 20px 38px 30px;
|
margin: 20px 38px 30px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user