Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
39ac1601
Commit
39ac1601
authored
Dec 30, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/huangyuanyuan/electricitysheep
parents
49f70a73
9a2043ea
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
998 additions
and
0 deletions
+998
-0
activityList.vue
src/components/education/activityList.vue
+276
-0
addActivity.vue
src/components/education/addActivity.vue
+248
-0
educationIndex.vue
src/components/education/educationIndex.vue
+3
-0
questionnaireList.vue
src/components/education/questionnaireList.vue
+453
-0
index.js
src/router/index.js
+18
-0
No files found.
src/components/education/activityList.vue
0 → 100644
View file @
39ac1601
<
template
>
<div
class=
"activityList"
>
<div
class=
"el-card__header"
>
<span>
活动管理
</span>
<div
style=
"display: flex;flex-direction: row;align-items: center"
>
<el-button
type=
"primary"
class=
"el-button--small"
@
click=
"addRecharge"
>
新增
</el-button>
</div>
</div>
<div
class=
"content"
>
<div
style=
"display: flex;flex-direction: row;align-items: center"
>
<div
class=
"block"
>
<div
class=
"searchInput"
style=
"width:250px"
>
<el-input
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"请输入活动名称搜索"
v-model=
"msg.Title"
size=
"small"
@
clear=
"getList"
@
keyup
.
enter
.
native=
"getList"
clearable
>
</el-input>
<span
@
click=
"getList"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div>
<span>
领奖方式
</span>
<el-select
class=
"w100"
@
change=
"getList()"
style=
"margin-right: 10px;"
v-model=
"msg.PrizeType"
size=
"small"
placeholder=
"请选择"
>
<el-option
label=
"不限"
:value=
"0"
></el-option>
<el-option
v-for=
"item in platList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
</div>
</div>
</div>
<div
style=
"padding: 20px;background: #fff;"
>
<el-table
:data=
"tableData"
header-cell-class-name=
"headClass"
style=
"width: 100%"
border
>
<el-table-column
prop=
"ID"
label=
"ID"
width=
"100"
>
</el-table-column>
<el-table-column
prop=
"Title"
label=
"活动信息"
>
</el-table-column>
<el-table-column
prop=
"HeXiao"
label=
"活动时间"
>
<template
slot-scope=
"scope"
>
<div
flex=
"dir:left cross:center"
>
{{
scope
.
row
.
StartDateStr
}}
</div>
<div
flex=
"dir:left cross:center"
>
{{
scope
.
row
.
EndDateStr
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"领奖方式"
prop=
"PrizeTypeStr"
>
</el-table-column>
<el-table-column
label=
"领奖地址"
prop=
"PrizeAddress"
>
</el-table-column>
<el-table-column
label=
"奖品说明"
prop=
"Description"
>
</el-table-column>
<el-table-column
label=
"问卷调查份数"
prop=
"SurveyNum"
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"查看"
placement=
"top"
>
<img
src=
"../../assets/img/setup/send.png"
alt=
""
class=
"imgstyle"
@
click=
"grant(scope.row)"
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top"
>
<img
src=
"../../assets/img/setup/edit.png"
alt=
""
class=
"imgstyle"
@
click=
"Edit(scope.row)"
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
src=
"../../assets/img/setup/del.png"
alt=
""
class=
"imgstyle"
@
click=
"delete_b(scope.row)"
>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:current-page
.
sync=
"msg.pageIndex"
:total=
"count"
>
</el-pagination>
</div>
</div>
</template>
<
script
>
export
default
{
name
:
"activityList"
,
data
(){
return
{
msg
:{
pageIndex
:
1
,
pageSize
:
20
,
PrizeType
:
0
,
Title
:
''
,
},
tableData
:[],
count
:
0
,
loading
:
false
,
platList
:[],
}
},
created
(){
this
.
getDateList
();
this
.
GetPrizeTypeEnumList
()
},
methods
:{
getDateList
(){
this
.
loading
=
true
;
this
.
apipost
(
"/api/Survey/GetActivitySurveyPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
){
this
.
tableData
=
res
.
data
.
data
.
pageData
;
this
.
count
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
GetPrizeTypeEnumList
(){
this
.
apipost
(
"/api/Survey/GetPrizeTypeEnumList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
platList
=
res
.
data
.
data
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
addRecharge
(){
this
.
$router
.
push
(
'/addActivity'
);
},
grant
(
row
){
this
.
$router
.
push
({
name
:
'questionnaireList'
,
query
:
{
ID
:
row
.
ID
,
blank
:
"y"
}
});
},
Edit
(
row
){
this
.
$router
.
push
({
name
:
'addActivity'
,
query
:
{
ID
:
row
.
ID
,
blank
:
"y"
}
});
},
delete_b
(
row
){
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"/api/Survey/DelActivitySurvey"
,
{
ID
:
row
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getDateList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
);
});
},
SetUp
(){
this
.
$router
.
push
(
'/rechargeSet'
);
},
getList
(){
this
.
msg
.
pageIndex
=
1
this
.
getDateList
()
},
dianswitch
(
row
){
this
.
apipost
(
"/api/Education/UpdatePickupType"
,
{
'Id'
:
row
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getDateList
();
},
},
}
</
script
>
<
style
>
.activityList
.el-card__header
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
background
:
#fff
;
}
.activityList
.el-button--small
{
padding
:
9px
15px
;
}
.activityList
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
margin-left
:
20px
;
}
.activityList
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.activityList
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
}
.activityList
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
15px
;
box-sizing
:
border-box
;
}
.activityList
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
</
style
>
src/components/education/addActivity.vue
0 → 100644
View file @
39ac1601
<
template
>
<div
v-loading=
"loading"
class=
"addActivity"
>
<div
class=
"head-title"
>
<span
@
click=
"CommonJump('activityList')"
class=
"blue point"
>
活动管理
</span>
/ 编辑活动管理
</div>
<div
class=
"content"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
style=
"width:50%"
>
<el-form-item
label=
"领奖方式"
size=
"small"
class=
"is-required"
>
<el-radio-group
v-model=
"addMsg.PrizeType"
>
<el-radio
:label=
"x.Id"
v-for=
"(x,y) in platList"
:key=
"y"
>
{{
x
.
Name
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"标题"
prop=
"Title"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.Title"
placeholder=
"请输入标题"
class=
"w400"
/>
</el-form-item>
<el-form-item
label=
"问卷调查份数"
prop=
"SurveyNum"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.SurveyNum"
placeholder=
"请输入问卷调查份数"
type=
"number"
:min=
"0"
class=
"w400"
/>
</el-form-item>
<el-form-item
label=
"活动时间"
class=
"is-required"
>
<el-date-picker
v-model=
"dateList"
size=
"small"
type=
"datetimerange"
range-separator=
"至"
value-format=
"yyyy-MM-dd HH:mm:ss"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"奖品地址"
prop=
"PrizeAddress"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.PrizeAddress"
placeholder=
"请输入奖品地址"
class=
"w400"
/>
</el-form-item>
<el-form-item
label=
"活动说明"
prop=
"Description"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.Description"
placeholder=
"请输入奖品说明"
type=
"textarea"
class=
"w400"
/>
</el-form-item>
</el-form>
</div>
<div
style=
"margin-top:20px"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"Save('addMsg')"
>
保存
</el-button>
</div>
</div>
</
template
>
<
script
>
export
default
{
components
:
{
},
data
()
{
return
{
addMsg
:
{
ID
:
0
,
Title
:
''
,
StartDate
:
''
,
EndDate
:
""
,
SurveyNum
:
0
,
Description
:
''
,
PrizeAddress
:
''
,
PrizeType
:
'0'
,
},
rules
:
{
Title
:
[{
required
:
true
,
message
:
'请输入标题'
,
trigger
:
'blur'
}],
SurveyNum
:
[{
required
:
true
,
message
:
'请输入问卷调查份数'
,
trigger
:
'blur'
}],
Description
:
[{
required
:
true
,
message
:
'请输入奖品说明'
,
trigger
:
'blur'
}],
PrizeAddress
:
[{
required
:
true
,
message
:
'请输入奖品地址'
,
trigger
:
'blur'
}],
},
platList
:[],
dateList
:[],
loading
:
false
,
};
},
created
()
{
if
(
this
.
$route
.
query
.
ID
){
this
.
getData
(
this
.
$route
.
query
.
ID
)
}
this
.
GetPrizeTypeEnumList
()
},
methods
:
{
Save
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
addMsg
.
PrizeType
==
0
){
this
.
Error
(
'请选择奖品领取类型'
)
return
false
}
if
(
this
.
dateList
&&
this
.
dateList
.
length
>
0
)
{
this
.
addMsg
.
StartDate
=
this
.
dateList
[
0
];
this
.
addMsg
.
EndDate
=
this
.
dateList
[
1
];
}
else
{
this
.
Error
(
'请选择活动时间'
)
return
false
}
this
.
apipost
(
"/api/Survey/SetActivitySurvey"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
CommonJump
(
'activityList'
);
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
else
{
return
false
;
}
});
},
GetPrizeTypeEnumList
(){
this
.
apipost
(
"/api/Survey/GetPrizeTypeEnumList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
platList
=
res
.
data
.
data
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
getData
(
ID
)
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/Survey/GetActivitySurvey"
,
{
ID
:
ID
},
res
=>
{
this
.
loading
=
false
;
this
.
addMsg
=
res
.
data
.
data
;
this
.
addMsg
.
PrizeType
=
this
.
addMsg
.
PrizeType
.
toString
()
this
.
dateList
=
[
this
.
addMsg
.
StartDate
,
this
.
addMsg
.
EndDate
]
})
},
},
mounted
()
{
}
};
</
script
>
<
style
>
.app-add-cat
.el-checkbox-group
{
font-size
:
14px
!important
;
}
.app-add-cat
.el-checkbox
{
margin-right
:
0
;
}
.app-add-cat
.el-dialog__body
{
padding
:
10px
20px
!important
;
}
.app-add-cat
.tag-box
.tag-item
{
margin-right
:
5px
;
}
.app-add-cat
.tag-box
{
margin
:
20px
0
;
}
.app-add-cat
.app-goods-cat-list
.active
{
background
:
#FAFAFA
;
}
.app-add-cat
.app-goods-cat-list
.cat-item
{
cursor
:
pointer
;
padding
:
5px
10px
;
}
.app-add-cat
.app-goods-cat-list
{
border
:
1px
solid
#E8EAEE
;
border-radius
:
5px
;
margin-top
:
-5px
;
padding
:
10px
0
;
overflow
:
scroll
;
height
:
400px
;
}
.addActivity
.blue
{
color
:
#409EFF
;
}
.addActivity
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
.addActivity
.gez_list
{
/*width: 650px;*/
margin-bottom
:
12px
;
padding
:
20px
;
border
:
1px
solid
#EBEEF5
;
background-color
:
#FFF
;
color
:
#303133
;
}
.addActivity
.quyu
{
background-color
:
#f4f4f5
;
color
:
#909399
;
padding
:
10px
;
line-height
:
30px
;
height
:
30px
;
font-size
:
12px
;
border-radius
:
4px
;
white-space
:
nowrap
;
margin
:
5px
;
}
.addActivity
.el-tag
+
.el-tag
{
margin-left
:
10px
;
}
.addActivity
.button-new-tag
{
margin-left
:
10px
;
height
:
32px
;
line-height
:
30px
;
padding-top
:
0
;
padding-bottom
:
0
;
}
.addActivity
.input-new-tag
{
width
:
90px
;
margin-left
:
10px
;
vertical-align
:
bottom
;
}
</
style
>
src/components/education/educationIndex.vue
View file @
39ac1601
...
@@ -190,6 +190,9 @@
...
@@ -190,6 +190,9 @@
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/uploadKCSet'}" @click="isChecked='/uploadKCSet',CommonJump('uploadKCSet')">
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/uploadKCSet'}" @click="isChecked='/uploadKCSet',CommonJump('uploadKCSet')">
<i
class=
"el-icon-menu"
></i><span>
上传配置
</span>
<i
class=
"el-icon-menu"
></i><span>
上传配置
</span>
</li>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/activityList'}" @click="isChecked='/activityList',CommonJump('activityList')">
<i
class=
"el-icon-menu"
></i><span>
活动列表
</span>
</li>
</ul>
</ul>
</div>
</div>
</div>
</div>
...
...
src/components/education/questionnaireList.vue
0 → 100644
View file @
39ac1601
This diff is collapsed.
Click to expand it.
src/router/index.js
View file @
39ac1601
...
@@ -361,6 +361,24 @@ export default new Router({
...
@@ -361,6 +361,24 @@ export default new Router({
path
:
'/uploadKCSet'
,
path
:
'/uploadKCSet'
,
name
:
'uploadKCSet'
,
name
:
'uploadKCSet'
,
component
:
resolve
=>
require
([
'@/components/education/uploadKCSet'
],
resolve
),
component
:
resolve
=>
require
([
'@/components/education/uploadKCSet'
],
resolve
),
},
//网课 活动页面
{
path
:
'/activityList'
,
name
:
'activityList'
,
component
:
resolve
=>
require
([
'@/components/education/activityList'
],
resolve
),
},
//网课 新增活动
{
path
:
'/addActivity'
,
name
:
'addActivity'
,
component
:
resolve
=>
require
([
'@/components/education/addActivity'
],
resolve
),
},
//网课 问卷列表
{
path
:
'/questionnaireList'
,
name
:
'questionnaireList'
,
component
:
resolve
=>
require
([
'@/components/education/questionnaireList'
],
resolve
),
}
}
]
]
},
},
...
...
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