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
343ea011
Commit
343ea011
authored
Aug 02, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
82
parent
70a4cb9f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
175 additions
and
24 deletions
+175
-24
index.vue
src/components/achievement/index.vue
+2
-1
index.vue
src/components/class/index.vue
+7
-7
index.vue
src/components/config/index.vue
+101
-9
add.vue
src/components/exchange/add.vue
+17
-0
index.vue
src/components/exchange/index.vue
+23
-2
dialog.vue
src/components/teacher/dialog.vue
+3
-2
index.vue
src/components/teacher/index.vue
+12
-2
api.js
src/service/api.js
+10
-1
No files found.
src/components/achievement/index.vue
View file @
343ea011
...
@@ -34,8 +34,9 @@
...
@@ -34,8 +34,9 @@
label=
"班主任姓名"
>
label=
"班主任姓名"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"nameClick(scope.row,searchFirstFrom.dateValue)"
>
<el-button
type=
"text"
@
click=
"nameClick(scope.row,searchFirstFrom.dateValue)"
>
<!-- TOP
{{
scope
.
$index
+
1
}}
{{
scope
.
row
.
teacher_name
}}
-->
{{
scope
.
row
.
teacher_name
}}
{{
scope
.
row
.
teacher_name
}}
</el-button>
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
...
src/components/class/index.vue
View file @
343ea011
...
@@ -354,13 +354,13 @@ export default {
...
@@ -354,13 +354,13 @@ export default {
goods_type
:
"1,2"
goods_type
:
"1,2"
};
};
getSourceStudentApi
().
then
(
res
=>
{
getSourceStudentApi
().
then
(
res
=>
{
let
obj
=
{}
let
obj
=
{}
res
.
forEach
((
item
,
index
)
=>
{
res
.
forEach
((
item
,
index
)
=>
{
obj
[
item
.
type
]
=
item
.
name
obj
[
item
.
type
]
=
item
.
name
})
})
studentSource
=
obj
studentSource
=
obj
console
.
log
(
obj
)
console
.
log
(
obj
)
});
});
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
res
.
list
.
forEach
(
i
=>
{
res
.
list
.
forEach
(
i
=>
{
...
...
src/components/config/index.vue
View file @
343ea011
...
@@ -305,6 +305,39 @@
...
@@ -305,6 +305,39 @@
</el-table>
</el-table>
</div>
</div>
</el-collapse-item>
</el-collapse-item>
<el-collapse-item
title=
"设备列表"
name=
"13"
>
<div>
<el-button
@
click=
"addTeacherType"
>
添加设备
</el-button>
<el-table
:data=
"teacherTypeList"
style=
"width: 100%"
>
<el-table-column
prop=
"name"
label=
"设备名称"
>
</el-table-column>
<el-table-column
prop=
"type"
label=
"type"
width=
'90'
>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"150"
v-if=
"!$store.state.readonly"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"initTeacherType(scope.row)"
type=
""
plain
size=
"mini"
>
编辑
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</el-collapse-item>
</el-collapse>
</el-collapse>
</div>
</div>
<!-- <div class="item">
<!-- <div class="item">
...
@@ -363,6 +396,19 @@
...
@@ -363,6 +396,19 @@
<el-button
type=
"primary"
@
click=
"editSourceStudent"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"editSourceStudent"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"teacherTypeDialog"
>
<el-form
:model=
"formData"
label-width=
"100px"
inline
>
<el-form-item
label=
"设备名称"
style=
"margin-left:10px;"
>
<el-input
v-model=
"formData.name"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"teacherTypeDialog = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"editTeacherType"
>
确 定
</el-button>
</span>
</el-dialog>
<el-dialog
<el-dialog
:title=
"dialogTitle"
:title=
"dialogTitle"
:visible
.
sync=
"yunjiDialog"
>
:visible
.
sync=
"yunjiDialog"
>
...
@@ -410,6 +456,9 @@ import {
...
@@ -410,6 +456,9 @@ import {
postSourceStudentApi
,
postSourceStudentApi
,
putSourceStudentApi
,
putSourceStudentApi
,
delSourceStudentApi
,
delSourceStudentApi
,
getTeacherTypeListApi
,
postTeacherTypeListApi
,
putTeacherTypeListApi
}
from
"../../service/api"
;
}
from
"../../service/api"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
'../../util/wordbook'
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
'../../util/wordbook'
;
export
default
{
export
default
{
...
@@ -428,6 +477,7 @@ export default {
...
@@ -428,6 +477,7 @@ export default {
sourceStudentDialog
:
false
,
sourceStudentDialog
:
false
,
noticeDialog
:
false
,
noticeDialog
:
false
,
periodDialog
:
false
,
periodDialog
:
false
,
teacherTypeDialog
:
false
,
activeName
:
"1"
,
activeName
:
"1"
,
form
:
{
form
:
{
msg
:
""
msg
:
""
...
@@ -470,7 +520,9 @@ export default {
...
@@ -470,7 +520,9 @@ export default {
yunjiList
:[],
yunjiList
:[],
starList
:[],
starList
:[],
starV2List
:[],
starV2List
:[],
sourceStudentList
:[]
sourceStudentList
:[],
teacherTypeList
:[],
goodsList
:[]
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -479,6 +531,33 @@ export default {
...
@@ -479,6 +531,33 @@ export default {
},
},
filters
:
{},
filters
:
{},
methods
:
{
methods
:
{
initTeacherType
(
row
){
this
.
dialogTitle
=
'编辑设备类型'
this
.
teacherTypeDialog
=
true
this
.
formData
=
row
},
addTeacherType
(){
this
.
dialogTitle
=
'新增设备类型'
this
.
teacherTypeDialog
=
true
},
editTeacherType
(){
if
(
this
.
dialogTitle
==
'新增设备类型'
){
postTeacherTypeListApi
({
teacher_type_name
:
this
.
formData
.
name
}).
then
(
res
=>
{
getTeacherTypeListApi
().
then
(
res
=>
{
this
.
teacherTypeList
=
res
this
.
teacherTypeDialog
=
false
})
})
}
else
{
putTeacherTypeListApi
({
teacher_type_name
:
this
.
formData
.
name
,
type
:
this
.
formData
.
type
}).
then
(
res
=>
{
getTeacherTypeListApi
().
then
(
res
=>
{
this
.
teacherTypeList
=
res
this
.
teacherTypeDialog
=
false
})
})
}
},
initSource
(
row
){
initSource
(
row
){
console
.
log
(
row
)
console
.
log
(
row
)
this
.
formData
=
row
this
.
formData
=
row
...
@@ -762,32 +841,45 @@ export default {
...
@@ -762,32 +841,45 @@ export default {
// this.activeName = val.name;
// this.activeName = val.name;
if
(
val
===
"1"
)
{
if
(
val
===
"1"
)
{
this
.
first
();
this
.
first
();
}
else
if
(
val
===
"4"
){
}
if
(
val
===
"4"
){
this
.
four
();
this
.
four
();
}
else
if
(
val
===
"5"
){
}
if
(
val
===
"5"
){
this
.
five
();
this
.
five
();
}
else
if
(
val
===
"7"
){
}
if
(
val
===
"7"
){
this
.
seven
();
this
.
seven
();
}
else
if
(
val
===
"8"
){
}
if
(
val
===
"8"
){
this
.
eight
();
this
.
eight
();
}
else
if
(
val
===
"9"
){
}
if
(
val
===
"9"
){
getYunjiActivityPeriodApi
().
then
(
res
=>
{
getYunjiActivityPeriodApi
().
then
(
res
=>
{
this
.
yunjiList
=
res
this
.
yunjiList
=
res
// console.log(this.yunjiList)
// console.log(this.yunjiList)
})
})
}
else
if
(
val
===
'10'
){
}
if
(
val
===
'10'
){
getStarActivityPeriodApi
().
then
(
res
=>
{
getStarActivityPeriodApi
().
then
(
res
=>
{
this
.
starList
=
res
this
.
starList
=
res
})
})
}
else
if
(
val
===
'11'
){
}
if
(
val
===
'11'
){
getStarActivityV2PeriodApi
().
then
(
res
=>
{
getStarActivityV2PeriodApi
().
then
(
res
=>
{
this
.
starV2List
=
res
this
.
starV2List
=
res
})
})
}
else
if
(
val
===
'12'
){
}
if
(
val
===
'12'
){
getSourceStudentApi
().
then
(
res
=>
{
getSourceStudentApi
().
then
(
res
=>
{
this
.
sourceStudentList
=
res
this
.
sourceStudentList
=
res
})
})
}
}
if
(
val
===
'13'
){
getTeacherTypeListApi
().
then
(
res
=>
{
this
.
teacherTypeList
=
res
})
}
},
},
first
()
{
first
()
{
getConfigListApi
({
key
:
"new_user_redirect"
}).
then
(
res
=>
{
getConfigListApi
({
key
:
"new_user_redirect"
}).
then
(
res
=>
{
...
...
src/components/exchange/add.vue
View file @
343ea011
...
@@ -21,6 +21,16 @@
...
@@ -21,6 +21,16 @@
</el-col>
</el-col>
</el-row>
</el-row>
</el-form-item>
</el-form-item>
<el-form-item
label=
"招生来源"
>
<el-select
v-model=
"newIntegral.source"
placeholder=
"请选择"
filterable
>
<el-option
v-for=
"(data,index) in classSource"
:key=
"index"
:label=
"data.name"
:value=
"data.type"
>
</el-option>
</el-select>
</el-form-item
>
<el-form-item
label=
"数量"
<el-form-item
label=
"数量"
prop=
"num"
prop=
"num"
:rules=
"[
{ required: true, message: '请输入数量', trigger: 'blur' }]">
:rules=
"[
{ required: true, message: '请输入数量', trigger: 'blur' }]">
...
@@ -64,6 +74,7 @@
...
@@ -64,6 +74,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getSourceStudentApi
}
from
"../../service/api"
;
export
default
{
export
default
{
name
:
"add"
,
name
:
"add"
,
data
(){
data
(){
...
@@ -73,8 +84,14 @@
...
@@ -73,8 +84,14 @@
return
time
.
getTime
()
<
Date
.
now
()
-
8.64e7
;
return
time
.
getTime
()
<
Date
.
now
()
-
8.64e7
;
}
}
},
},
classSource
:[]
}
}
},
},
created
(){
getSourceStudentApi
().
then
(
res
=>
{
this
.
classSource
=
res
})
},
props
:[
props
:[
'newIntegral'
,
'newIntegral'
,
"goodsList"
"goodsList"
...
...
src/components/exchange/index.vue
View file @
343ea011
...
@@ -33,6 +33,9 @@
...
@@ -33,6 +33,9 @@
prop=
"num"
prop=
"num"
label=
"数量"
>
label=
"数量"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"source"
label=
"招生来源"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
source
|
classSourceFilter
}}
</
template
>
</el-table-column>
<el-table-column
<el-table-column
prop=
"desc"
prop=
"desc"
label=
"备注"
label=
"备注"
...
@@ -60,11 +63,12 @@
...
@@ -60,11 +63,12 @@
</template>
</template>
<
script
>
<
script
>
import
{
getExchangeListApi
,
getGoodsListApi
,
addExchangeApi
,
editExchangeApi
}
from
"../../service/api"
;
import
{
getExchangeListApi
,
getGoodsListApi
,
addExchangeApi
,
editExchangeApi
,
getSourceStudentApi
}
from
"../../service/api"
;
import
{
INTEGRALTYPE
,
INTEGRALFUN
}
from
"../../util/wordbook"
;
import
{
INTEGRALTYPE
,
INTEGRALFUN
}
from
"../../util/wordbook"
;
import
page
from
'../framework/page'
import
page
from
'../framework/page'
import
addExchange
from
'./add'
import
addExchange
from
'./add'
import
listDetail
from
'./list'
import
listDetail
from
'./list'
let
studentSource
=
[]
export
default
{
export
default
{
name
:
"index"
,
name
:
"index"
,
components
:
{
components
:
{
...
@@ -72,6 +76,12 @@
...
@@ -72,6 +76,12 @@
addExchange
,
addExchange
,
listDetail
listDetail
},
},
filters
:
{
classSourceFilter
(
val
)
{
// return CLASSSOURCE[val];
return
studentSource
[
val
];
},
},
data
(){
data
(){
let
is_addOption
=
[];
let
is_addOption
=
[];
for
(
let
k
in
INTEGRALTYPE
){
for
(
let
k
in
INTEGRALTYPE
){
...
@@ -96,7 +106,8 @@
...
@@ -96,7 +106,8 @@
num
:
''
,
num
:
''
,
expire_at
:
''
,
expire_at
:
''
,
desc
:
''
,
desc
:
''
,
id
:
null
id
:
null
,
source
:
''
},
},
goodsList
:[],
goodsList
:[],
is_addOption
:
is_addOption
,
is_addOption
:
is_addOption
,
...
@@ -133,6 +144,7 @@
...
@@ -133,6 +144,7 @@
desc
:
data
.
desc
,
desc
:
data
.
desc
,
name
:
data
.
name
,
name
:
data
.
name
,
id
:
data
.
id
,
id
:
data
.
id
,
source
:
data
.
source
}
}
},
},
subEdit
(){
subEdit
(){
...
@@ -142,6 +154,7 @@
...
@@ -142,6 +154,7 @@
expire_at
:
this
.
newIntegral
.
expire_at
,
expire_at
:
this
.
newIntegral
.
expire_at
,
desc
:
this
.
newIntegral
.
desc
,
desc
:
this
.
newIntegral
.
desc
,
name
:
this
.
newIntegral
.
name
,
name
:
this
.
newIntegral
.
name
,
source
:
this
.
newIntegral
.
source
,
};
};
editExchangeApi
(
this
.
newIntegral
.
id
,
json
).
then
(
res
=>
{
editExchangeApi
(
this
.
newIntegral
.
id
,
json
).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
...
@@ -195,6 +208,14 @@
...
@@ -195,6 +208,14 @@
};
};
this
.
getGood
();
this
.
getGood
();
this
.
getList
()
this
.
getList
()
getSourceStudentApi
().
then
(
res
=>
{
let
obj
=
{}
res
.
forEach
((
item
,
index
)
=>
{
obj
[
item
.
type
]
=
item
.
name
})
studentSource
=
obj
console
.
log
(
obj
)
});
},
},
getGood
(){
getGood
(){
getGoodsListApi
({
limit
:
1000
}).
then
(
res
=>
{
getGoodsListApi
({
limit
:
1000
}).
then
(
res
=>
{
...
...
src/components/teacher/dialog.vue
View file @
343ea011
...
@@ -48,8 +48,8 @@
...
@@ -48,8 +48,8 @@
<span
v-if=
"type===1"
>
{{
teacherDetail
.
type
}}
</span>
<span
v-if=
"type===1"
>
{{
teacherDetail
.
type
}}
</span>
<el-form-item
v-if=
"type !== 1"
>
<el-form-item
v-if=
"type !== 1"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择"
>
<el-option
v-for=
"data in
typeOption"
:key=
"data.value"
:label=
"data.label
"
<el-option
v-for=
"data in
dialogObj.teacherTypeList"
:key=
"data.type"
:label=
"data.name
"
:value=
"data.
valu
e"
></el-option>
:value=
"data.
typ
e"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -236,6 +236,7 @@
...
@@ -236,6 +236,7 @@
})
})
},
},
initDialog
(){
initDialog
(){
console
.
log
(
this
.
dialogObj
)
switch
(
this
.
dialogObj
.
type
){
switch
(
this
.
dialogObj
.
type
){
case
0
:
case
0
:
this
.
title
=
'新增教师'
;
this
.
title
=
'新增教师'
;
...
...
src/components/teacher/index.vue
View file @
343ea011
...
@@ -241,12 +241,13 @@
...
@@ -241,12 +241,13 @@
</template>
</template>
<
script
>
<
script
>
import
{
getTeacherListApi
,
delTeacherApi
}
from
"../../service/api"
;
import
{
getTeacherListApi
,
delTeacherApi
,
getTeacherTypeListApi
}
from
"../../service/api"
;
import
{
TEACHERTYPE
}
from
"../../util/wordbook"
;
import
{
TEACHERTYPE
}
from
"../../util/wordbook"
;
import
page
from
'../framework/page'
import
page
from
'../framework/page'
import
teacherDetail
from
'../teacherDetail/index'
import
teacherDetail
from
'../teacherDetail/index'
import
dialogCom
from
'./dialog'
import
dialogCom
from
'./dialog'
import
Dialog
from
"../class/dialog"
;
import
Dialog
from
"../class/dialog"
;
let
teacherTypeSource
=
{}
export
default
{
export
default
{
name
:
"index"
,
name
:
"index"
,
data
(){
data
(){
...
@@ -307,7 +308,7 @@
...
@@ -307,7 +308,7 @@
},
},
filters
:{
filters
:{
teacherType
(
value
){
teacherType
(
value
){
return
TEACHERTYPE
[
value
]
return
teacherTypeSource
[
value
]
}
}
},
},
mounted
(){
mounted
(){
...
@@ -324,6 +325,15 @@
...
@@ -324,6 +325,15 @@
}
else
{
}
else
{
this
.
getUser
()
this
.
getUser
()
}
}
getTeacherTypeListApi
().
then
(
res
=>
{
this
.
dialogObj
.
teacherTypeList
=
res
let
obj
=
{}
res
.
forEach
((
item
,
index
)
=>
{
obj
[
item
.
type
]
=
item
.
name
})
teacherTypeSource
=
obj
console
.
log
(
obj
)
});
},
},
methods
:{
methods
:{
onPageChange
(
val
){
onPageChange
(
val
){
...
...
src/service/api.js
View file @
343ea011
...
@@ -1259,9 +1259,18 @@ export const getStaffListApi = function (json) {
...
@@ -1259,9 +1259,18 @@ export const getStaffListApi = function (json) {
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/staff/list`
,
json
)
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/staff/list`
,
json
)
};
};
export
const
postStaffListApi
=
function
(
json
)
{
export
const
postStaffListApi
=
function
(
json
)
{
console
.
log
(
json
)
return
Vue
.
prototype
.
$post
(
`
${
_baseUrl
}
api/admin/staff/add`
,
json
)
return
Vue
.
prototype
.
$post
(
`
${
_baseUrl
}
api/admin/staff/add`
,
json
)
};
};
export
const
putStaffListApi
=
function
(
json
)
{
export
const
putStaffListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
_baseUrl
}
api/admin/staff/edit/
${
json
.
id
}
`
,
json
)
return
Vue
.
prototype
.
$put
(
`
${
_baseUrl
}
api/admin/staff/edit/
${
json
.
id
}
`
,
json
)
};
};
export
const
getTeacherTypeListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/teacher/type/list`
,
json
)
};
export
const
postTeacherTypeListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
`
${
_baseUrl
}
api/admin/teacher/type/add`
,
json
)
};
export
const
putTeacherTypeListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
_baseUrl
}
api/admin/teacher/type/edit/
${
json
.
type
}
`
,
json
)
};
//teacher/type/list
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