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
794fbf81
Commit
794fbf81
authored
Sep 07, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
c18c68f6
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
218 additions
and
139 deletions
+218
-139
index.vue
src/components/class/index.vue
+5
-9
dialog.vue
src/components/noLesson/dialog.vue
+2
-2
index.vue
src/components/noLesson/index.vue
+3
-7
index.vue
src/components/periods/index.vue
+52
-25
newDialog.vue
src/components/periods/newDialog.vue
+1
-1
dialog.vue
src/components/shop/dialog.vue
+146
-95
wordbook.js
src/util/wordbook.js
+9
-0
No files found.
src/components/class/index.vue
View file @
794fbf81
...
...
@@ -181,15 +181,11 @@
});
},
onAdd
(){
if
(
this
.
periods
){
this
.
dialogObj
=
{
show
:
true
,
title
:
'添加班级'
,
periodsId
:
this
.
periods
.
id
,
type
:
0
,
}
}
else
{
this
.
$message
.
error
(
'请先选择期数'
);
this
.
dialogObj
=
{
show
:
true
,
title
:
'添加班级'
,
periodsId
:
this
.
periods
?
this
.
periods
.
id
:
''
,
type
:
0
,
}
},
editClass
(
data
){
...
...
src/components/noLesson/dialog.vue
View file @
794fbf81
...
...
@@ -47,8 +47,8 @@
title
:
''
,
loading
:
true
,
form
:{
key
:
'no
Lesson
'
,
value
:
'no
Lesson
'
,
key
:
'no
_lesson_date
'
,
value
:
'no
_lesson_date
'
,
desc
:[]
},
noLessonDate
:
''
,
...
...
src/components/noLesson/index.vue
View file @
794fbf81
...
...
@@ -46,12 +46,11 @@
},
getList
(){
let
json
=
{
key
:
'no
Lesson
'
key
:
'no
_lesson_date
'
};
getConfigListApi
(
json
).
then
(
res
=>
{
if
(
res
.
list
.
length
>
0
){
let
_desc
=
res
.
list
[
0
].
desc
;
console
.
log
(
'desc'
,
_desc
)
this
.
id
=
res
.
list
[
0
].
id
;
this
.
list
=
_desc
?
JSON
.
parse
(
_desc
)
:
[];
}
...
...
@@ -75,25 +74,22 @@
});
},
del
(
data
){
console
.
log
(
'data'
,
data
);
this
.
$confirm
(
'此操作将删除该记录?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
json
=
{
key
:
'no
Lesson
'
,
value
:
'no
Lesson
'
key
:
'no
_lesson_date
'
,
value
:
'no
_lesson_date
'
}
let
_desc
=
[];
this
.
list
.
forEach
((
val
)
=>
{
if
(
val
!==
data
)
{
console
.
log
(
'_desc val'
,
val
)
_desc
.
push
(
val
);
}
})
json
.
desc
=
JSON
.
stringify
(
_desc
);
console
.
log
(
'_desc json'
,
json
)
updateConfigApi
(
this
.
id
,
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
...
...
src/components/periods/index.vue
View file @
794fbf81
...
...
@@ -22,6 +22,46 @@
<el-table
:data=
"periodList"
style=
"width: 100%"
>
<el-table-column
type=
"expand"
>
<template
slot-scope=
"props"
>
<el-form
label-position=
"left"
class=
"demo-table-expand"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"关联的商品ID:"
>
<span>
{{
props
.
row
.
goods_id
}}
</span>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"已看课包数:"
>
<span>
{{
props
.
row
.
has_watch_num
}}
</span>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"已续看课包数:"
>
<span>
{{
props
.
row
.
has_duration_num
}}
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"当前看的课包ID:"
>
<span>
{{
props
.
row
.
current_category_id
}}
</span>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"周几不上课:"
>
<span>
{{
props
.
row
.
rest_week_day
|
dayFilter
}}
</span>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"开始的主题/歌ID:"
>
<span>
{{
props
.
row
.
start_num
}}
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</
template
>
</el-table-column>
<el-table-column
prop=
"id"
label=
"期数ID"
>
...
...
@@ -30,18 +70,10 @@
prop=
"title"
label=
"期数标题"
>
</el-table-column>
<el-table-column
prop=
"goods_id"
label=
"关联的商品ID"
>
</el-table-column>
<el-table-column
prop=
"course_id"
label=
"课程ID"
>
</el-table-column>
<el-table-column
prop=
"start_num"
label=
"开始的主题/歌ID"
>
</el-table-column>
<el-table-column
prop=
"start_at"
label=
"期数开始时间"
>
...
...
@@ -55,23 +87,8 @@
label=
"续看课包数"
>
</el-table-column>
<el-table-column
prop=
"has_watch_num"
label=
"已看课包数"
>
</el-table-column>
<el-table-column
prop=
"has_duration_num"
label=
"已续看课包数"
>
</el-table-column>
<el-table-column
prop=
"current_category_id"
label=
"当前看的课包ID"
>
</el-table-column>
<el-table-column
prop=
"rest_week_day"
label=
"周几不上课"
>
</el-table-column>
<el-table-column
label=
"操作"
>
label=
"操作"
width=
"148"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"onEdit(scope.row)"
>
编辑
...
...
@@ -93,6 +110,7 @@
import
newDialog
from
'./newDialog'
import
page
from
'../framework/page'
import
{
getPeriodsApi
,
delPeriodApi
}
from
"../../service/api"
;
import
{
WEEKDAY
}
from
'../../util/wordbook'
;
export
default
{
name
:
"index"
,
data
(){
...
...
@@ -120,6 +138,15 @@
}
}
},
filters
:
{
dayFilter
:
function
(
value
)
{
let
list
=
value
?
value
.
split
(
','
)
:
[];
list
=
list
.
map
((
day
)
=>
{
return
WEEKDAY
[
day
];
})
return
list
.
join
(
','
)
}
},
components
:{
goodDialog
,
newDialog
,
...
...
src/components/periods/newDialog.vue
View file @
794fbf81
...
...
@@ -42,7 +42,7 @@
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"
老师IDs
"
>
<el-form-item
label=
"
相关老师ID
"
>
<el-select
v-model=
"teacherList"
multiple
placeholder=
"请选择"
>
<el-option
v-for=
"item in teacherOptions"
...
...
src/components/shop/dialog.vue
View file @
794fbf81
This diff is collapsed.
Click to expand it.
src/util/wordbook.js
View file @
794fbf81
...
...
@@ -24,3 +24,12 @@ export const GOODSSTATUS = {
'0'
:
'在售'
,
'1'
:
'下架'
};
export
const
WEEKDAY
=
{
0
:
'周日'
,
1
:
'周一'
,
2
:
'周二'
,
3
:
'周三'
,
4
:
'周四'
,
5
:
'周五'
,
6
:
'周六'
};
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