Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
admin-base
Commits
7ab62374
Commit
7ab62374
authored
Sep 07, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
教研管理
parent
adcf7d86
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
154 additions
and
67 deletions
+154
-67
dialog.vue
src/components/lesson/dialog.vue
+29
-11
index.vue
src/components/lesson/index.vue
+4
-8
editor.vue
src/components/resources/editor.vue
+83
-22
editorDialog.vue
src/components/resources/editorDialog.vue
+19
-6
index.vue
src/components/resources/index.vue
+5
-7
list.vue
src/components/resources/list.vue
+6
-5
dialog.vue
src/components/shop/dialog.vue
+8
-8
No files found.
src/components/lesson/dialog.vue
View file @
7ab62374
...
...
@@ -24,7 +24,7 @@
</el-upload>
</el-form-item>
<el-form-item
label=
"课程类型"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择课程类型"
@
change=
"selectedLesson = []"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择课程类型"
@
change=
"selectedLesson = []
,selectedLessonList = []
"
>
<el-option
label=
"月课"
:value=
"0"
></el-option>
<el-option
label=
"日课"
:value=
"1"
></el-option>
</el-select>
...
...
@@ -139,11 +139,28 @@
let
select
=
this
.
showLessonList
.
find
(
i
=>
{
return
i
.
id
===
data
[
0
]});
select
=
select
.
children
.
find
(
i
=>
{
return
i
.
id
===
data
[
1
]});
if
(
data
.
length
===
3
)
select
=
select
.
children
.
find
(
i
=>
{
return
i
.
id
===
data
[
2
]});
this
.
selectedLessonList
.
push
(
select
)
let
index
=
this
.
selectedLessonList
.
findIndex
(
val
=>
val
===
select
);
if
(
index
===
-
1
){
this
.
selectedLessonList
.
push
(
select
)
}
else
{
this
.
$message
({
type
:
'info'
,
message
:
'不能重复添加!'
});
}
},
selectBox
(
data
){
let
select
=
this
.
showBoxList
.
find
(
i
=>
{
return
i
.
id
===
data
[
0
]});
this
.
selectedBoxList
.
push
(
select
)
let
index
=
this
.
selectedBoxList
.
findIndex
(
val
=>
val
===
select
);
if
(
index
===
-
1
){
this
.
selectedBoxList
.
push
(
select
)
}
else
{
this
.
$message
({
type
:
'info'
,
message
:
'不能重复添加!'
});
}
},
sub
(){
this
.
selectedBoxList
.
forEach
(
i
=>
{
this
.
form
.
item_category_ids
.
push
(
i
.
id
)});
...
...
@@ -205,6 +222,7 @@
item_category_ids
:[],
cover
:
0
,
};
this
.
uploadShow
=
true
;
this
.
imageList
=
[];
this
.
selectedLessonList
=
[];
this
.
selectedBoxList
=
[];
...
...
@@ -245,14 +263,14 @@
this
.
show
=
this
.
dialogObj
.
show
;
this
.
id
=
this
.
dialogObj
.
id
;
this
.
type
=
2
;
getTeacherDetailApi
(
this
.
id
).
then
(
res
=>
{
this
.
form
.
name
=
res
.
name
;
this
.
form
.
alias
=
res
.
alias
;
this
.
form
.
qr
=
res
.
qr
;
this
.
form
.
type
=
res
.
type
;
this
.
form
.
status
=
res
.
status
;
this
.
loading
=
false
});
//
getTeacherDetailApi(this.id).then(res=>{
//
this.form.name = res.name;
//
this.form.alias = res.alias;
//
this.form.qr = res.qr;
//
this.form.type = res.type;
//
this.form.status = res.status;
//
this.loading = false
//
});
break
}
},
...
...
src/components/lesson/index.vue
View file @
7ab62374
...
...
@@ -16,15 +16,11 @@
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"getUser"
>
搜索
</el-button>
</el-form-item>
<el-col
:span=
"3"
>
<el-button
style=
"margin-left: 16px;"
type=
"primary"
plain
@
click=
"getUser"
>
搜索
</el-button>
</el-col>
<el-col
:span=
"4"
:offset=
"8"
>
<el-form-item>
<el-button
type=
"success"
plain
@
click=
"add"
>
新增课程
</el-button>
</el-form-item>
<el-col
:span=
"5"
:offset=
"8"
>
<el-button
style=
"float: right"
type=
"success"
plain
@
click=
"add"
>
新增课程
</el-button>
</el-col>
</el-row>
</el-form>
...
...
src/components/resources/editor.vue
View file @
7ab62374
<
template
>
<div>
<el-container>
<
el-header
height=
"80px
"
>
<div
class=
"head-top"
>
缩放:
<el-input-number
v-model=
"bigNum"
size=
"mini"
:min=
"30"
:max=
"150"
:step=
"10"
></el-input-number
>
<el-button
size=
"mini"
type=
"success"
style=
"float: righ
t"
@
click=
"setOpen()"
>
编辑当前页参数
</el-button>
</div
>
<
div
class=
"head-top
"
>
缩放:
<el-input-number
v-model=
"bigNum"
size=
"mini"
:min=
"30"
:max=
"150"
:step=
"10"
></el-input-number
>
</div
>
<el-button
class=
"head-edit"
type=
"defaul
t"
@
click=
"setOpen()"
>
编辑当前页参数
</el-button>
<el-header
>
<div
class=
"head-content"
>
<div
v-if=
"selectedMould.length > 0"
>
{{
selectedMould
[
nowIndex
].
title
}}
...
...
@@ -17,8 +17,11 @@
<el-container>
<el-aside
width=
"150px"
>
<div
class=
"page-list"
>
<div
v-for=
"(data,index) in selectedMould"
:key=
"index"
@
click=
"chooseThat(index)"
>
<el-card
shadow=
"hover"
class=
"box"
:body-style=
"
{ padding: '0px' }">
<div
class=
"card-item"
v-for=
"(data,index) in selectedMould"
:key=
"index"
@
click=
"chooseThat(index)"
>
<div
class=
"list2-btn"
>
<i
class=
"iconfont icon-shanchu"
@
click=
"delMould(index)"
></i>
</div>
<el-card
shadow=
"hover"
:class=
"nowIndex === index ? 'border' : ''"
:body-style=
"
{ padding: '0px' }">
<div
class=
"dialog-card"
>
序号:
{{
index
}}
</div>
...
...
@@ -29,7 +32,7 @@
</el-aside>
<el-main>
<!--爸妈看一看1-->
<div
v-if=
"selectedMould[nowIndex] && selectedMould[nowIndex].key === 'look1'"
>
<div
v-if=
"selectedMould
.length > 0 && selectedMould
[nowIndex] && selectedMould[nowIndex].key === 'look1'"
>
<div
class=
"look1"
:style=
"
{backgroundImage:`url(${mouldImg.look1.bg}`,transform:`scale(${bigNum/100},${bigNum/100})`}">
<div
class=
"bg-block"
>
<img
:src=
"mouldImg.look1.reqiqiu"
class=
"reqiqiu"
/>
...
...
@@ -461,6 +464,10 @@
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
>
<el-button
type=
"default"
@
click=
"selectedMould[nowIndex].content =
{};dialogVisible = false">取消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
...
...
@@ -477,7 +484,7 @@
data
(){
return
{
// 放大缩小参数
bigNum
:
10
0
,
bigNum
:
5
0
,
// 弹窗参数
dialogVisible
:
false
,
// 当前对象下标
...
...
@@ -505,7 +512,11 @@
},
// 打开设置弹窗
setOpen
(){
this
.
dialogVisible
=
true
;
if
(
!
this
.
selectedMould
[
this
.
nowIndex
]){
this
.
$message
.
info
(
'请先选泽模版!'
);
}
else
{
this
.
dialogVisible
=
true
;
}
},
// 上传Banner
uploadFileVideo1Banner
(
a
){
...
...
@@ -545,6 +556,12 @@
// 源生上传成功音频回调
uploadSuccessRadio1
(
a
){
this
.
selectedMould
[
this
.
nowIndex
].
content
.
radio
.
push
({
name
:
a
.
data
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
a
.
data
.
url
,
title
:
''
,
lable
:
''
})
},
delMould
(
index
){
this
.
selectedMould
.
splice
(
index
,
1
);
if
(
this
.
nowIndex
>
this
.
selectedMould
.
length
-
1
){
this
.
nowIndex
=
0
;
}
}
},
watch
:{
...
...
@@ -562,21 +579,37 @@
<
style
scoped
lang=
"less"
>
@import "../../util/public";
.el-container{
position: relative;
background: white;
.head-top{
background: #f5f8ff;
font-size: 14px;
color: #333333;
padding: 5px;
position: absolute;
top: -102px;
left: 50%;
width: 182px;
margin-left: -91px;
.page-type{
display: inline-block;
padding: 0 10px;
}
}
.head-edit{
position: absolute;
top: -49px;
left: 190px;
width: 182px;
margin-left: 0;
}
.el-header{
padding: 0;
.head-top{
background: #f5f8ff;
font-size: 14px;
color: #333333;
padding: 5px;
.page-type{
display: inline-block;
padding: 0 10px;
}
}
.head-content{
padding: 10px;
text-align: center;
line-height: 60px;
font-size: 18px;
}
}
.page-list{
...
...
@@ -932,4 +965,32 @@
}
}
}
.border {
border: 1px dashed red;
}
.box {
padding: 0px;
}
.list2-btn{
position: absolute;
top: 50%;
left: 50%;
transition: all 1s;
display: none;
i{
color: #444;
font-size: 26px;
margin-left: -13px;
&:hover{
color: #333;
}
}
z-index: 999;
}
.card-item {
position: relative;
}
.card-item:hover .list2-btn{
display: inline-block;
}
</
style
>
src/components/resources/editorDialog.vue
View file @
7ab62374
...
...
@@ -26,12 +26,14 @@
</div>
</el-aside>
<el-main>
<el-button
@
click=
"showDialog = true"
>
课程基本信息编辑
</el-button>
<el-button
type=
"success"
@
click=
"onSave()"
>
保存
</el-button>
<div
class=
"main-btns"
>
<el-button
type=
"primary"
@
click=
"showDialog = true"
>
课程基本信息编辑
</el-button>
<el-button
style=
"float: right;"
type=
"success"
@
click=
"onSave()"
>
保存
</el-button>
</div>
<editor
:selectedMould=
"selectedMould"
:editorObj=
"editorObj"
/>
</el-main>
</el-container>
...
...
@@ -111,6 +113,13 @@
})
},
onSave
(){
if
(
!
this
.
form
.
title
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请完成基本信息编辑!'
});
return
}
this
.
form
.
content
=
JSON
.
stringify
(
this
.
selectedMould
);
this
.
category_id
=
this
.
editorObj
.
category_id
;
switch
(
this
.
editorObj
.
type
)
{
...
...
@@ -176,6 +185,10 @@
padding: 10px;
background: #f5f8ff;
}
.main-btns {
margin-top: 68px;
margin-bottom: 10px;
}
.left-block{
font-size: 14px;
border: 1px solid #f0f0f0;
...
...
src/components/resources/index.vue
View file @
7ab62374
...
...
@@ -17,7 +17,7 @@
<i
class=
"iconfont icon-shanchu"
@
click=
"delIndex(data)"
></i>
</span>
</
template
>
<el-submenu
class=
"list2"
:index=
"item.name"
v-for=
"item in data.children"
:key=
"item.id"
>
<el-submenu
v-if=
"data.children"
class=
"list2"
:index=
"item.name"
v-for=
"item in data.children"
:key=
"item.id"
>
<span
slot=
"title"
>
{{item.name}}
<div
class=
"btn-block list2-btn"
>
...
...
@@ -39,11 +39,11 @@
</el-menu-item>
</div>
<el-menu-item
class=
"list3"
index=
"new"
>
<el-button
type=
"success"
round
size=
"mini"
plain
style=
"width: 100%"
@
click=
"addItem(item.id)"
>
+添加
</el-button>
<el-button
type=
"success"
round
size=
"mini"
plain
style=
"width: 100%"
@
click=
"addItem(item.id)"
>
+添加
三级分类
</el-button>
</el-menu-item>
</el-submenu>
<el-menu-item
class=
"list3"
index=
"new"
>
<el-button
type=
"success"
round
size=
"mini"
plain
style=
"width: 100%"
@
click=
"addSec(data.id)"
>
+添加
</el-button>
<el-button
type=
"success"
round
size=
"mini"
plain
style=
"width: 100%"
@
click=
"addSec(data.id)"
>
+添加
二级分类
</el-button>
</el-menu-item>
</el-submenu>
</el-menu>
...
...
@@ -95,6 +95,7 @@
getList
(){
getCategoryApi
(
''
).
then
(
res
=>
{
res
.
forEach
(
i
=>
{
i
.
children
=
i
.
children
||
[];
i
.
children
.
forEach
(
j
=>
{
if
(
!
j
.
children
){
j
.
children
=
[]
...
...
@@ -102,10 +103,7 @@
})
});
this
.
leftList
=
res
;
if
(
this
.
id
===
''
){
this
.
id
=
res
[
0
].
children
[
0
].
children
[
0
].
id
;
this
.
index
=
res
[
0
].
children
[
0
].
children
[
0
].
name
}
this
.
$store
.
commit
(
'mainCanShow'
);
this
.
menuLoading
=
false
;
})
...
...
src/components/resources/list.vue
View file @
7ab62374
<
template
>
<div>
<div
class=
"add-block"
>
<el-button
class=
"add-btn
"
@
click=
"onAdd"
>
+新增课时
</el-button>
<div
class=
"add-block"
v-if=
"id && list.length === 0"
>
<el-button
round
type=
"success
"
@
click=
"onAdd"
>
+新增课时
</el-button>
</div>
<el-card
v-for=
"data in list"
:key=
"data.id"
class=
"box-card"
>
<div
class=
"id"
>
...
...
@@ -137,9 +137,10 @@
}
.add-block{
.clear-both;
.add-btn{
float: right;
}
display: flex;
justify-content: center;
align-items: center;
margin-top: 30%;
}
</
style
>
src/components/shop/dialog.vue
View file @
7ab62374
...
...
@@ -373,14 +373,14 @@
this
.
show
=
this
.
dialogObj
.
show
;
this
.
id
=
this
.
dialogObj
.
id
;
this
.
type
=
2
;
getTeacherDetailApi
(
this
.
id
).
then
(
res
=>
{
this
.
form
.
name
=
res
.
name
;
this
.
form
.
alias
=
res
.
alias
;
this
.
form
.
qr
=
res
.
qr
;
this
.
form
.
type
=
res
.
type
;
this
.
form
.
status
=
res
.
status
;
this
.
loading
=
false
});
//
getTeacherDetailApi(this.id).then(res=>{
//
this.form.name = res.name;
//
this.form.alias = res.alias;
//
this.form.qr = res.qr;
//
this.form.type = res.type;
//
this.form.status = res.status;
//
this.loading = false
//
});
break
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment