Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
3b754d8a
Commit
3b754d8a
authored
Dec 14, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加
parent
f3f85e5f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
345 additions
and
0 deletions
+345
-0
index.js
src/api/system/index.js
+55
-0
baseSet.vue
src/pages/course/baseSet.vue
+285
-0
routes.js
src/router/routes.js
+5
-0
No files found.
src/api/system/index.js
View file @
3b754d8a
...
...
@@ -310,3 +310,58 @@ export function getConfigStatus(data) {
});
}
/**
* 获取基础设置
*/
export
function
GetClassConfig
(
data
)
{
return
request
({
url
:
'/Public/GetClassConfig'
,
method
:
'post'
,
data
});
}
/**
* 保存基础设置
*/
export
function
SetClassConfig
(
data
)
{
return
request
({
url
:
'/Public/SetClassConfig'
,
method
:
'post'
,
data
});
}
/**
* 新增班级类型
*/
export
function
SetClassType
(
data
)
{
return
request
({
url
:
'/Public/SetClassType'
,
method
:
'post'
,
data
});
}
/**
* 新增班级类型
*/
export
function
GetClassTypePageList
(
data
)
{
return
request
({
url
:
'/Public/GetClassTypePageList'
,
method
:
'post'
,
data
});
}
/**
* 删除班级类型
*/
export
function
RemoveClassType
(
data
)
{
return
request
({
url
:
'/Public/RemoveClassType'
,
method
:
'post'
,
data
});
}
src/pages/course/baseSet.vue
0 → 100644
View file @
3b754d8a
<
style
>
.baseSet_Title
{
width
:
120px
!important
;
padding
:
18px
0
0
16px
;
text-align
:
right
;
}
</
style
>
<
template
>
<div
class=
"page-body"
>
<q-tabs
style=
"margin-bottom:20px;"
v-model=
"tabCheck"
narrow-indicator
dense
align=
"left"
class=
"text-primary"
>
<q-tab
:ripple=
"false"
name=
"first"
label=
"基础设置"
/>
<q-tab
:ripple=
"false"
name=
"second"
label=
"班级类型"
/>
</q-tabs>
<template
v-if=
"tabCheck=='first'"
>
<div
class=
"col row wrap"
style=
"margin-top:30px;"
>
<div
class=
"col-2 baseSet_Title"
>
基础课时费:
</div>
<div
class=
"col-4"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"msg.BasicHourFee"
ref=
"BasicHourFee"
class=
"q-pb-lg"
:rules=
"[val => !!val || '请填写基础课时费']"
/>
</div>
</div>
<div
class=
"col row wrap"
>
<div
class=
"col-2 baseSet_Title"
>
基础带班人数:
</div>
<div
class=
"col-4"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"msg.BasicClassNum"
ref=
"BasicClassNum"
class=
"q-pb-lg"
:rules=
"[val => !!val || '请填写基础带班人数']"
/>
</div>
</div>
<div
class=
"col row wrap"
>
<div
class=
"col-2 baseSet_Title"
>
课时分钟数:
</div>
<div
class=
"col-4"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"msg.BasicMinutes"
ref=
"BasicMinutes"
class=
"q-pb-lg"
:rules=
"[val => !!val || '请填写课时分钟数']"
/>
</div>
<div
class=
"col-3"
style=
"padding:18px 0 0 10px;"
>
每节课的分钟数,单位为分钟计算
</div>
</div>
<q-btn
label=
"保存"
color=
"accent q-px-md"
style=
"font-weight:400 !important;margin:20px 0 0 120px;width:300px;"
@
click=
"saveInfo"
/>
</
template
>
<
template
v-if=
"tabCheck=='second'"
>
<q-table
:loading=
"loading"
:pagination=
"tabeMsg"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
icon=
"add"
@
click=
"clearInfo(),isShowAddPop=true"
ref=
"addBtn"
label=
"新增"
>
<q-popup-proxy>
<q-banner
v-if=
"isShowAddPop"
>
<div
class=
"dropClassDialog"
>
<div
style=
"margin:10px 0 15px 0;width:300px;"
>
新增班级类型
</div>
</div>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"addMsg.CTypeName"
label=
"类型名称"
ref=
"CTypeName"
class=
"q-pb-lg"
:rules=
"[val => !!val || '请填写类型名称']"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"addMsg.AddHourFee"
label=
"基础课时费"
ref=
"AddHourFee"
class=
"q-pb-lg"
:rules=
"[val => !!val || '请填写基础课时费']"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"addMsg.DefaultClassNum"
label=
"默认班级人数"
ref=
"DefaultClassNum"
class=
"q-pb-lg"
:rules=
"[val => !!val || '请填写默认班级人数']"
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"isShowAddPop=false"
/>
<q-btn
label=
"确认"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
@
click=
"saveClassType()"
/>
</q-card-actions>
</q-banner>
</q-popup-proxy>
</q-btn>
</div>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"tabeMsg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"修改"
@
click=
"EditClass(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-shanchu"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
@
click=
"deleteClass(props.row)"
/>
</q-td>
</
template
>
</q-table>
</template>
</div>
</template>
<
script
>
import
{
GetClassConfig
,
SetClassConfig
,
SetClassType
,
GetClassTypePageList
,
RemoveClassType
}
from
'../../api/system/index'
;
export
default
{
props
:
{},
components
:
{},
data
()
{
return
{
tabCheck
:
'first'
,
//默认选第一个
dense
:
false
,
msg
:
{
ConfigId
:
0
,
BasicHourFee
:
''
,
//基础课时费
BasicClassNum
:
''
,
//基础带班人数
BasicMinutes
:
''
//课时分钟数
},
columns
:
[{
name
:
'CTypeName'
,
label
:
'类型名称'
,
field
:
'CTypeName'
,
align
:
'left'
},
{
name
:
'AddHourFee'
,
label
:
'课时费加价'
,
field
:
'AddHourFee'
,
align
:
'left'
,
},
{
name
:
'DefaultClassNum'
,
label
:
'默认班级人数'
,
field
:
'DefaultClassNum'
,
align
:
'left'
},
{
name
:
'TotalClassNum'
,
label
:
'关联班级数'
,
field
:
'TotalClassNum'
,
align
:
'left'
},
{
name
:
'CompleteClassNum'
,
label
:
'结课班级数'
,
field
:
'CompleteClassNum'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'RoleId'
}
],
loading
:
false
,
dataList
:
[],
//列表数据
isShowAddPop
:
false
,
// 新增弹出
addMsg
:
{
CTypeId
:
0
,
//班级类型主键编号
CTypeName
:
''
,
//类型名称
AddHourFee
:
''
,
//课时费加价
DefaultClassNum
:
''
//默认班级人数
},
//列表数据参数
tabeMsg
:
{
pageIndex
:
1
,
pageSize
:
12
},
pageCount
:
0
,
isEdit
:
true
}
},
created
()
{},
mounted
()
{
this
.
GetClassConfig
();
this
.
GetClassTypePageList
();
},
methods
:
{
//保存基础数据
saveInfo
()
{
SetClassConfig
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
GetClassConfig
();
}
})
},
//获取基础数据
GetClassConfig
()
{
GetClassConfig
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Data
)
{
this
.
msg
.
ConfigId
=
res
.
Data
.
ConfigId
;
this
.
msg
.
BasicHourFee
=
res
.
Data
.
BasicHourFee
;
this
.
msg
.
BasicClassNum
=
res
.
Data
.
BasicClassNum
;
this
.
msg
.
BasicMinutes
=
res
.
Data
.
BasicMinutes
;
}
}
})
},
//保存班级类型
saveClassType
()
{
SetClassType
(
this
.
addMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
isShowAddPop
=
false
;
this
.
GetClassTypePageList
();
}
})
},
//获取班级类型列表数据
GetClassTypePageList
()
{
this
.
loading
=
true
;
GetClassTypePageList
(
this
.
tabeMsg
).
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
Code
==
1
)
{
console
.
log
(
res
,
'数据来了'
);
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
}
})
},
//翻页
changePage
(
val
)
{
this
.
tabeMsg
.
pageIndex
=
val
;
this
.
GetClassTypePageList
()
},
clearInfo
()
{
// this.addMsg.CTypeId = 0;
// this.addMsg.CTypeName = '';
// this.addMsg.AddHourFee = '';
// this.addMsg.DefaultClassNum = '';
},
//编辑班级类型
EditClass
(
obj
)
{
this
.
addMsg
.
CTypeId
=
obj
.
CTypeId
;
this
.
addMsg
.
CTypeName
=
obj
.
CTypeName
;
this
.
addMsg
.
AddHourFee
=
obj
.
AddHourFee
;
this
.
addMsg
.
DefaultClassNum
=
obj
.
DefaultClassNum
;
this
.
$refs
.
addBtn
.
$el
.
click
();
},
//删除班级类型
deleteClass
(
obj
)
{
this
.
$q
.
dialog
({
title
:
"删除类型"
,
message
:
''
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
}).
onOk
(()
=>
{
let
msg
=
{
CTypeId
:
obj
.
CTypeId
}
RemoveClassType
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
GetClassTypePageList
();
}
})
});
}
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass');
</
style
>
src/router/routes.js
View file @
3b754d8a
...
...
@@ -102,6 +102,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/course/classManage.vue"
)
},
{
path
:
"/course/baseSet"
,
//基础设置
component
:
()
=>
import
(
"pages/course/baseSet.vue"
)
},
{
path
:
"/course/classorder"
,
//班级订单
component
:
()
=>
...
...
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