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
ad565a10
Commit
ad565a10
authored
3 years ago
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
教育的活动内容新增
parent
a2afcd96
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1012 additions
and
0 deletions
+1012
-0
edactiveType.vue
src/components/education/edactiveType.vue
+319
-0
edactivity.vue
src/components/education/edactivity.vue
+673
-0
educationIndex.vue
src/components/education/educationIndex.vue
+8
-0
index.js
src/router/index.js
+12
-0
No files found.
src/components/education/edactiveType.vue
0 → 100644
View file @
ad565a10
<
template
>
<div
class=
"companyList tradeactivity"
>
<template
v-if=
"isShowAdd"
>
<div
class=
"head-title"
>
活动类型管理
<el-button
style=
"float:right;margin-top: -5px;"
size=
"small"
type=
"primary"
@
click=
"isShowAdd=false,clearMsg()"
>
新增
</el-button>
</div>
<div
class=
"content"
>
<div>
<div
class=
"searchInput"
style=
"width:250px"
>
<el-input
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
@
clear=
"msg.pageIndex=1,getList()"
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"活动类型名称"
v-model=
"msg.TypeName"
size=
"small"
clearable
>
</el-input>
<span
@
click=
"msg.pageIndex=1,getList()"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div>
</div>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width: 100%;margin:20px 0"
>
<el-table-column
prop=
"Id"
label=
"编号"
width=
"100"
>
</el-table-column>
<el-table-column
prop=
"TypeName"
label=
"类型名称"
>
</el-table-column>
<el-table-column
prop=
"CoverImage"
label=
"封面图"
>
<template
slot-scope=
"scope"
>
<div
class=
"app-image"
:style=
"
{backgroundImage:'url(' + scope.row.CoverImage + ')',backgroundSize:'cover'}">
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"LableNameList"
label=
"标签"
>
<
template
slot-scope=
"scope"
>
<span
v-for=
"(LItem,Lindex) in scope.row.LableNameList"
style=
""
:key=
"Lindex"
>
{{
LItem
}}{{
Lindex
+
1
==
scope
.
row
.
LableNameList
.
length
?
''
:
'、'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"Id"
width=
"200"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top"
>
<img
@
click=
"EditType(scope.row)"
style=
"width:32px;height:32px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top-start"
>
<img
@
click=
"delType(scope.row)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
:current-page
.
sync=
"msg.pageIndex"
layout=
"total,prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
</template>
<
template
v-else
>
<div
class=
"head-title"
>
<span
@
click=
"isShowAdd=true"
style=
"color:rgb(64, 158, 255);cursor:pointer;"
>
活动类型管理
</span><span
style=
"margin:0 9px;color:#C0C4CC"
>
/
</span><span>
修改活动类型
</span>
</div>
<div
class=
"content"
>
<el-form
label-width=
"120px"
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
>
<el-form-item
label=
"类型名称"
prop=
"TypeName"
class=
"is-required"
>
<el-input
type=
"text"
class=
"w400"
v-model=
"addMsg.TypeName"
size=
"small"
maxlength=
"20"
></el-input>
</el-form-item>
<el-form-item
label=
"封面图"
size=
"small"
>
<el-button
@
click=
"isShowImage=true"
size=
"small"
>
选择文件
</el-button>
<div
class=
"app-gallery-item"
style=
"position: relative;width: 100px;margin-top: 10px;border:none;"
>
<img
v-if=
"!addMsg.CoverImage || addMsg.CoverImage==''"
src=
"../../assets/img/default.png"
style=
"width:80px;height:80px"
alt=
""
>
<img
v-else
style=
"width:80px;height:80px"
:src=
"addMsg.CoverImage"
alt=
""
>
</div>
</el-form-item>
<el-form-item
label=
"标签"
size=
"small"
>
<el-tag
:key=
"tag"
v-for=
"tag in dynamicTags"
closable
:disable-transitions=
"false"
@
close=
"handleClose(tag)"
>
{{
tag
}}
</el-tag>
<el-input
class=
"input-new-tag"
v-if=
"inputVisible"
v-model=
"inputValue"
ref=
"saveTagInput"
size=
"small"
@
keyup
.
enter
.
native=
"handleInputConfirm"
@
blur=
"handleInputConfirm"
>
</el-input>
<el-button
v-else
class=
"button-new-tag"
size=
"small"
@
click=
"showInput"
>
+ 标签
</el-button>
</el-form-item>
<el-form-item
label=
"简介"
>
<UE
style=
"width:750px;"
:defaultMsg=
"defaultMsg"
:config=
"config"
:IsMultiple=
"true"
ref=
"ue"
></UE>
</el-form-item>
</el-form>
</div>
<el-button
size=
"small"
style=
"margin-top:20px;padding:9px 25px;"
type=
"primary"
@
click=
"submitform('addMsg')"
>
保存
</el-button>
</
template
>
<!-- 选择文件 -->
<el-dialog
title=
"选择文件"
:visible
.
sync=
"isShowImage"
width=
"1240px"
>
<ChooseImg
@
SelectId=
"SelectId"
></ChooseImg>
</el-dialog>
</div>
</template>
<
script
>
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
import
UE
from
"@/components/global/UE.vue"
;
export
default
{
components
:
{
ChooseImg
,
UE
},
data
()
{
return
{
defaultMsg
:
""
,
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
350
},
rules
:
{
TypeName
:
[{
required
:
true
,
message
:
'请输入类型名称'
,
trigger
:
'blur'
}],
},
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
TypeName
:
''
,
},
total
:
0
,
isShowAdd
:
true
,
//是否显示新增
tableData
:
[],
//数据列表
isShowImage
:
false
,
//是否显示选择图片弹窗
addMsg
:
{
Id
:
0
,
//编号
TypeName
:
""
,
//类型名称
CoverImage
:
""
,
//封面图
LableNameList
:
[]
},
dynamicTags
:
[],
//标签数组
inputVisible
:
false
,
inputValue
:
''
,
};
},
created
()
{
this
.
getList
();
},
methods
:
{
clearMsg
()
{
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
TypeName
=
""
;
this
.
addMsg
.
CoverImage
=
""
;
},
SelectId
(
msg
)
{
let
url
=
this
.
getIconLink
(
msg
.
url
)
this
.
addMsg
.
CoverImage
=
url
this
.
isShowImage
=
false
;
},
getList
()
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/Education/GetActivityTypePage"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
tableData
=
pageData
;
}
})
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
//修改类型
EditType
(
item
)
{
this
.
apipost
(
"/api/Education/GetCommerceActivityType"
,
{
Id
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
isShowAdd
=
false
;
var
tempData
=
res
.
data
.
data
;
this
.
addMsg
.
Id
=
tempData
.
Id
;
this
.
addMsg
.
TypeName
=
tempData
.
TypeName
;
this
.
addMsg
.
CoverImage
=
tempData
.
CoverImage
;
this
.
dynamicTags
=
tempData
.
LableNameList
;
if
(
tempData
.
TypeContent
)
{
this
.
defaultMsg
=
tempData
.
TypeContent
;
}
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
//删除类型
delType
(
item
)
{
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"/api/Education/RemoveCommerceActivityType"
,
{
Id
:
item
.
Id
,
Status
:
1
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
);
});
},
//新增活动类型
submitform
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
content
=
this
.
$refs
.
ue
.
getUEContent
();
this
.
addMsg
.
TypeContent
=
content
;
this
.
addMsg
.
LableNameList
=
this
.
dynamicTags
;
this
.
apipost
(
"/api/Education/SetCommerceActivityType"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
isShowAdd
=
true
;
this
.
getList
();
this
.
clearMsg
();
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
else
{
return
false
;
}
});
},
handleInputConfirm
()
{
let
inputValue
=
this
.
inputValue
;
if
(
inputValue
)
{
this
.
dynamicTags
.
push
(
inputValue
);
}
this
.
inputVisible
=
false
;
this
.
inputValue
=
''
;
},
showInput
()
{
this
.
inputVisible
=
true
;
this
.
$nextTick
(
_
=>
{
this
.
$refs
.
saveTagInput
.
$refs
.
input
.
focus
();
});
},
//删除
handleClose
(
tag
)
{
this
.
dynamicTags
.
splice
(
this
.
dynamicTags
.
indexOf
(
tag
),
1
);
}
},
mounted
()
{}
};
</
script
>
<
style
>
.companyList
.remark_name
{
color
:
#888888
;
font-size
:
12px
;
margin-left
:
10px
;
float
:
right
;
}
.companyList
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
.companyList
.blue
{
color
:
#409EFF
;
}
.companyList
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
}
.companyList
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.companyList
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
width
:
100%
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
margin-right
:
20px
;
}
.companyList
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
.companyList
.input-new-tag
{
width
:
90px
;
margin-left
:
10px
;
vertical-align
:
bottom
;
margin-right
:
5px
;
}
.companyList
.el-tag
{
margin-right
:
5px
;
}
.tradeactivity
.el-form-item__content
{
line-height
:
0
;
}
</
style
>
This diff is collapsed.
Click to expand it.
src/components/education/edactivity.vue
0 → 100644
View file @
ad565a10
<
template
>
<div
class=
"companyList tradeactivity"
>
<template
v-if=
"isShowAdd"
>
<div
class=
"head-title"
>
活动管理
<el-button
style=
"float:right;margin-top: -5px;"
size=
"small"
type=
"primary"
@
click=
"isShowAdd=false,clearMsg()"
>
新增
</el-button>
</div>
<div
class=
"content"
>
<div>
<div
class=
"searchInput"
style=
"width:250px"
>
<el-input
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
@
clear=
"msg.pageIndex=1,getList()"
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"活动名称"
v-model=
"msg.ActivityName"
size=
"small"
clearable
>
</el-input>
<span
@
click=
"msg.pageIndex=1,getList()"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div>
</div>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width: 100%;margin:20px 0"
>
<el-table-column
prop=
"Id"
label=
"编号"
width=
"60"
>
</el-table-column>
<el-table-column
prop=
"ActivityName"
label=
"活动名称"
min-width=
"200"
>
<template
slot-scope=
"scope"
>
<div
class=
"flex"
>
<div
class=
"app-image"
:style=
"
{backgroundImage:'url(' + scope.row.CoverImg + ')',backgroundSize:'cover'}">
</div>
<span>
{{
scope
.
row
.
ActivityName
}}
</span>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"ActivityTypeName"
label=
"活动类型"
width=
"100"
>
</el-table-column>
<!-- <el-table-column prop="CoverImg" label="封面图" width="100">
</el-table-column> -->
<el-table-column
prop=
"StartTimeStr"
label=
"活动时间"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<div>
活动时间:
</div>
<span>
{{
scope
.
row
.
StartTimeStr
}}
</span>
~
<span>
{{
scope
.
row
.
EndTimeStr
}}
</span>
<div>
报名时间:
</div>
<span>
{{
scope
.
row
.
SignStartTimeStr
}}
</span><br
/>
<span>
{{
scope
.
row
.
SignEndTimeStr
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"SignStartTimeStr"
label=
"年龄和报名人数"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
AgeLimit
==
1
?
'不区分年龄'
:
'区分年龄'
}}
</div>
<div
v-if=
"scope.row.AgeLimit==0"
>
范围:
{{
scope
.
row
.
StartAge
}}
岁~
{{
scope
.
row
.
EndAge
}}
岁
</div>
<div>
报名人数
</div>
<div
v-if=
"scope.row.Distinguish ==1"
>
总人数:
{{
scope
.
row
.
ManNum
}}
人
</div>
<div
v-if=
"scope.row.Distinguish ==0"
>
男性:
{{
scope
.
row
.
ManNum
}}
人
<span
style=
"margin-left:10px"
>
女性:
{{
scope
.
row
.
WoManNum
}}
人
</span>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"活动费用"
width=
"170"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.IsFree==1"
style=
"color:green;"
>
免费
</div>
<div
v-if=
"scope.row.IsFree==2"
style=
"color:red;"
>
现金价格:
{{
scope
.
row
.
Price
}}
元
</div>
<div
v-if=
"scope.row.IsFree==2"
style=
"color:red;"
>
现金点数:
{{
scope
.
row
.
PointNum
}}
点
</div>
<div>
报名取消确认:
{{
scope
.
row
.
IsCancelConfirm
==
1
?
'是'
:
'否'
}}
</div>
<div>
内部限制:
{{
scope
.
row
.
IsCancelConfirm
==
1
?
'是'
:
'否'
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"LocationName"
label=
"位置"
></el-table-column>
<el-table-column
prop=
"ActivityStatusStr"
label=
"活动状态"
width=
"120"
>
</el-table-column>
<el-table-column
prop=
"JoinNum"
label=
"报名人数"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"dialogTableVisible = true,getItem(scope.row)"
>
{{
scope
.
row
.
JoinNum
}}
人
</el-button>
</
template
>
</el-table-column>
<el-table-column
prop=
"Id"
width=
"150"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top"
>
<img
@
click=
"EditType(scope.row)"
style=
"width:32px;height:32px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top-start"
>
<img
@
click=
"delType(scope.row)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
:current-page
.
sync=
"msg.pageIndex"
layout=
"total,prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
</template>
<
template
v-else
>
<div
class=
"head-title"
>
<span
@
click=
"isShowAdd=true"
style=
"color:rgb(64, 158, 255);cursor:pointer;"
>
活动管理
</span><span
style=
"margin:0 9px;color:#C0C4CC"
>
/
</span><span>
修改活动
</span>
</div>
<div
class=
"content"
>
<el-form
label-width=
"120px"
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
>
<el-form-item
label=
"活动名称"
class=
"is-required"
prop=
"ActivityName"
>
<el-input
type=
"text"
class=
"w400"
v-model=
"addMsg.ActivityName"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"开始时间"
class=
"is-required"
prop=
"StartTime"
>
<el-date-picker
class=
"w300"
value-format=
"yyyy-MM-dd"
v-model=
"addMsg.StartTime"
type=
"date"
size=
"small"
placeholder=
"开始时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"结束时间"
class=
"is-required"
prop=
"EndTime"
>
<el-date-picker
class=
"w300"
v-model=
"addMsg.EndTime"
type=
"date"
size=
"small"
placeholder=
"结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"报名开始时间"
class=
"is-required"
prop=
"SignStartTime"
>
<el-date-picker
class=
"w300"
v-model=
"addMsg.SignStartTime"
type=
"datetime"
size=
"small"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"报名开始时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"报名截止时间"
class=
"is-required"
prop=
"SignEndTime"
>
<el-date-picker
class=
"w300"
v-model=
"addMsg.SignEndTime"
type=
"datetime"
size=
"small"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"报名截止时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"活动类型"
class=
"is-required"
prop=
"ActivityType"
>
<el-select
class=
"w300"
v-model=
"addMsg.ActivityType"
size=
"small"
placeholder=
"请选择"
@
change=
'acselect'
>
<el-option
:key=
"0"
label=
"请选择"
:value=
"0"
></el-option>
<el-option
v-for=
"item in activityTypeList"
:key=
"item.Id"
:label=
"item.TypeName"
:value=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"封面图"
size=
"small"
>
<el-button
@
click=
"isShowImage=true"
size=
"small"
>
选择文件
</el-button>
<div
class=
"app-gallery-item"
style=
"position: relative;width: 100px;margin-top: 10px;border:none;"
>
<img
v-if=
"!addMsg.CoverImg || addMsg.CoverImg==''"
src=
"../../assets/img/default.png"
style=
"width:80px;height:80px"
alt=
""
>
<img
v-else
style=
"width:80px;height:80px"
:src=
"addMsg.CoverImg"
alt=
""
>
</div>
</el-form-item>
<el-form-item
label=
"是否免费"
size=
"small"
>
<el-switch
v-model=
"addMsg.IsFree"
:active-value=
"1"
:inactive-value=
"2"
@
change=
'addMsg.Price=0,addMsg.PointNum=0'
>
</el-switch>
</el-form-item>
<el-form-item
label=
"现金价格"
prop=
"Price"
size=
"small"
v-if=
"addMsg.IsFree==2"
>
<el-input
type=
"number"
:min=
"0"
class=
"w400"
v-model=
"addMsg.Price"
size=
"small"
><template
slot=
"append"
>
元
</
template
></el-input>
</el-form-item>
<el-form-item
label=
"点数"
prop=
"PointNum"
size=
"small"
v-if=
"addMsg.IsFree==2"
>
<el-input
type=
"number"
:min=
"0"
class=
"w400"
v-model=
"addMsg.PointNum"
size=
"small"
onkeyup=
"this.value= this.value.match(/\d+(\d{0,0})?/) ? this.value.match(/\d+(\d{0,0})?/)[0] : ''"
><
template
slot=
"append"
>
点
</
template
></el-input>
</el-form-item>
<el-form-item
label=
"是否区分性别"
size=
"small"
>
<el-switch
v-model=
"addMsg.Distinguish"
:active-value=
"0"
:inactive-value=
"1"
@
change=
'addMsg.ManNum=0,addMsg.WoManNum=0'
>
</el-switch>
</el-form-item>
<el-form-item
label=
"男性"
prop=
"ManNum"
size=
"small"
v-if=
"addMsg.Distinguish==0"
>
<el-input
type=
"number"
:min=
"0"
class=
"w400"
v-model=
"addMsg.ManNum"
size=
"small"
onkeyup=
"this.value= this.value.match(/\d+(\d{0,0})?/) ? this.value.match(/\d+(\d{0,0})?/)[0] : ''"
><
template
slot=
"append"
>
人
</
template
></el-input>
</el-form-item>
<el-form-item
label=
"女性"
prop=
"WoManNum"
size=
"small"
v-if=
"addMsg.Distinguish==0"
>
<el-input
type=
"number"
:min=
"0"
class=
"w400"
v-model=
"addMsg.WoManNum"
size=
"small"
onkeyup=
"this.value= this.value.match(/\d+(\d{0,0})?/) ? this.value.match(/\d+(\d{0,0})?/)[0] : ''"
><
template
slot=
"append"
>
人
</
template
></el-input>
</el-form-item>
<el-form-item
label=
"总人数"
prop=
"ManNum"
size=
"small"
v-if=
"addMsg.Distinguish==1"
>
<el-input
type=
"number"
:min=
"0"
class=
"w400"
v-model=
"addMsg.ManNum"
size=
"small"
onkeyup=
"this.value= this.value.match(/\d+(\d{0,0})?/) ? this.value.match(/\d+(\d{0,0})?/)[0] : ''"
><
template
slot=
"append"
>
人
</
template
></el-input>
</el-form-item>
<el-form-item
label=
"是否区分年龄"
size=
"small"
>
<el-switch
v-model=
"addMsg.AgeLimit"
:active-value=
"0"
:inactive-value=
"1"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"年龄范围"
size=
"small"
v-if=
"addMsg.AgeLimit==0"
@
change=
'addMsg.StartAge=0,addMsg.EndAge=0'
>
<el-input
type=
"number"
:min=
"0"
class=
"w150"
v-model=
"addMsg.StartAge"
size=
"small"
onkeyup=
"this.value= this.value.match(/\d+(\d{0,0})?/) ? this.value.match(/\d+(\d{0,0})?/)[0] : ''"
><
template
slot=
"append"
>
岁
</
template
></el-input>
<span
style=
"line-height:32px"
>
~
</span>
<el-input
type=
"number"
:min=
"0"
class=
"w150"
v-model=
"addMsg.EndAge"
size=
"small"
onkeyup=
"this.value= this.value.match(/\d+(\d{0,0})?/) ? this.value.match(/\d+(\d{0,0})?/)[0] : ''"
><
template
slot=
"append"
>
岁
</
template
></el-input>
</el-form-item>
<el-form-item
label=
"是否内部限制"
size=
"small"
>
<el-switch
v-model=
"addMsg.LnsideLimit"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"报名取消确认"
size=
"small"
>
<el-switch
v-model=
"addMsg.IsCancelConfirm"
:active-value=
"1"
:inactive-value=
"2"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"活动地址"
prop=
"LocationName"
>
<el-input
type=
"text"
class=
"w400"
placeholder=
"请输入门店地址"
v-model=
"addMsg.LocationName"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"地址经纬度"
prop=
"LngLat"
>
<label
slot=
"label"
>
门店经纬度
<el-tooltip
class=
"item"
effect=
"dark"
content=
"纬度 | 经度,可在地图上选择位置"
placement=
"top"
>
<i
class=
"el-icon-info"
></i>
</el-tooltip>
</label>
<el-input
type=
"text"
class=
"w400"
:disabled=
"true"
placeholder=
"请输入门店经纬度"
v-model=
"addMsg.LonLat"
size=
"small"
>
<el-button
slot=
"append"
@
click=
"getMapShow"
>
地图
</el-button>
</el-input>
</el-form-item>
<el-form-item
label=
"活动详情"
>
<UE
style=
"width:750px;"
:defaultMsg=
"defaultMsg"
:config=
"config"
:IsMultiple=
"true"
ref=
"ue"
></UE>
</el-form-item>
</el-form>
</div>
<el-button
size=
"small"
style=
"margin-top:20px;padding:9px 25px;"
type=
"primary"
@
click=
"submitform('addMsg')"
>
保存
</el-button>
</template>
<!-- 选择文件 -->
<el-dialog
title=
"选择文件"
:visible
.
sync=
"isShowImage"
width=
"1240px"
>
<ChooseImg
@
SelectId=
"SelectId"
></ChooseImg>
</el-dialog>
<!-- 地图选址 -->
<el-dialog
title=
"地图展示"
:visible
.
sync=
"isShowMap"
width=
"960px"
>
<commonMap
@
map-submit=
"mapEvent"
:address=
"addMsg.LocationName"
></commonMap>
</el-dialog>
<el-dialog
title=
"报名信息"
:visible
.
sync=
"dialogTableVisible"
width=
"910px"
>
<el-table
:data=
"joinData"
style=
"width:100%;"
>
<el-table-column
property=
"LinkMan"
label=
"联系人"
width=
"100"
></el-table-column>
<el-table-column
property=
"LinkTel"
label=
"联系电话"
width=
"120"
></el-table-column>
<el-table-column
property=
"PeopleNum"
label=
"人数"
width=
"60"
></el-table-column>
<el-table-column
property=
"Money"
label=
"星星数"
width=
"80"
></el-table-column>
<el-table-column
property=
"Remark"
label=
"备注"
width=
"200"
></el-table-column>
<el-table-column
property=
"CreateTimeStr"
label=
"报名时间"
width=
"160"
></el-table-column>
<el-table-column
label=
"操作"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.IsApplyForCancel==1"
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"agreeApply(scope.row)"
>
同意
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"jujueMsg(scope.row)"
>
拒绝
</el-button>
</
template
>
</template>
</el-table-column>
</el-table>
</el-dialog>
<el-dialog
title=
"拒绝报名"
:visible
.
sync=
"showJujue"
width=
"600px"
>
<div
class=
"activityFlex"
>
<el-input
type=
"textarea"
rows=
"4"
v-model=
"bdMsg.RejectRemark"
></el-input>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"sureJujue"
>
确定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
import
UE
from
"@/components/global/UE.vue"
;
import
commonMap
from
"../common/commonMap.vue"
;
export
default
{
components
:
{
ChooseImg
,
UE
,
commonMap
},
data
()
{
let
validataTrade
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
addMsg
.
ActivityType
==
0
)
{
return
callback
(
new
Error
(
'请选择活动类型'
));
}
else
{
callback
();
}
}
return
{
isShowMap
:
false
,
defaultMsg
:
""
,
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
350
},
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
ActivityName
:
''
,
},
total
:
0
,
isShowAdd
:
true
,
//是否显示新增
tableData
:
[],
//数据列表
isShowImage
:
false
,
//是否显示选择图片弹窗
addMsg
:
{
Id
:
0
,
//活动编号(主键)
ActivityName
:
""
,
//活动名称
StartTime
:
""
,
//开始时间
EndTime
:
""
,
//结束时间
CoverImg
:
""
,
//封面图
ActivityType
:
0
,
//活动类型
ActivityInfo
:
""
,
//活动详情
SignStartTime
:
""
,
//报名开始时间
SignEndTime
:
""
,
//报名截止时间
IsFree
:
1
,
//是否免费 1是 2否
Price
:
0
,
//价格
PointNum
:
0
,
//点数
IsCancelConfirm
:
1
,
//取消确定1是 2否
Distinguish
:
1
,
//是否区别性别 0区分 1不区分
ManNum
:
0
,
//男数量
WoManNum
:
0
,
//女数量
AgeLimit
:
1
,
//是否区别年龄 0区分 1不区分
StartAge
:
0
,
//最小年龄
EndAge
:
0
,
//最大年龄
LnsideLimit
:
1
,
//内部限制0-否,1-是
LonLat
:
''
,
//经纬度(逗号分隔)
LocationName
:
''
,
//位置名称
},
activityTypeList
:
[],
//活动类型列表
dialogTableVisible
:
false
,
//是否显示弹窗
joinData
:
[],
//报名信息
joinMsg
:
{
LinkMan
:
''
,
EnrollState
:
1
,
ActivityId
:
0
},
rules
:
{
ActivityName
:
[{
required
:
true
,
message
:
'请输入活动名称'
,
trigger
:
'blur'
}],
Price
:
[{
required
:
true
,
message
:
'请填写现金价格'
,
trigger
:
'blur'
}],
PointNum
:
[{
required
:
true
,
message
:
'请填写点数'
,
trigger
:
'blur'
}],
ManNum
:
[{
required
:
true
,
message
:
'请填写人数'
,
trigger
:
'blur'
}],
WoManNum
:
[{
required
:
true
,
message
:
'请填写人数'
,
trigger
:
'blur'
}],
StartTime
:
[{
required
:
true
,
message
:
'请选择开始时间'
,
trigger
:
'blur'
}],
EndTime
:
[{
required
:
true
,
message
:
'请选择结束时间'
,
trigger
:
'blur'
}],
ActivityType
:
[{
validator
:
validataTrade
,
trigger
:
"change"
,
required
:
true
}],
LocationName
:
[{
required
:
true
,
message
:
'请填写活动地址'
,
trigger
:
'blur'
}],
},
pickerBeginDateBefore
:
{
disabledDate
:
time
=>
{
if
(
this
.
addMsg
.
EndTime
==
null
)
{
return
false
;
}
else
{
let
endTime
=
new
Date
(
this
.
addMsg
.
EndTime
)
return
endTime
.
getTime
()
<
time
.
getTime
()
}
}
},
pickerSignBeginDateBefore
:
{
disabledDate
:
time
=>
{
if
(
this
.
addMsg
.
SignEndTime
==
null
)
{
return
false
;
}
else
{
let
endTime
=
new
Date
(
this
.
addMsg
.
SignEndTime
)
return
endTime
.
getTime
()
<
time
.
getTime
()
}
}
},
pickerBeginDateAfter
:
{
disabledDate
:
time
=>
{
let
startTime
=
new
Date
(
this
.
addMsg
.
StartTime
)
return
startTime
.
getTime
()
>=
time
.
getTime
()
}
},
pickerSignBeginDateAfter
:
{
disabledDate
:
time
=>
{
let
startTime
=
new
Date
(
this
.
addMsg
.
SignStartTime
)
return
startTime
.
getTime
()
>=
time
.
getTime
()
}
},
bdMsg
:
{
Id
:
0
,
//报名id
ApplyForCancelStatus
:
1
,
//申请取消审核状态 1同意 2拒绝
RejectRemark
:
''
},
showJujue
:
false
,
};
},
created
()
{
this
.
getActivityType
();
this
.
getList
();
},
methods
:
{
getItem
(
item
)
{
// this.joinData = [];
// this.joinData = item.CommerceConsultList;
this
.
joinMsg
.
ActivityId
=
item
.
Id
;
this
.
getJoinData
();
},
getJoinData
()
{
this
.
apipost
(
"/api/Education/GetCommerceConsultPage"
,
this
.
joinMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
joinData
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
//确定
agreeApply
(
item
)
{
this
.
bdMsg
.
Id
=
item
.
Id
;
this
.
bdMsg
.
ApplyForCancelStatus
=
1
;
this
.
apipost
(
"/api/Education/SetCommerceConsultApplyCancel"
,
this
.
bdMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
location
.
reload
();
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
jujueMsg
(
item
){
this
.
bdMsg
.
Id
=
item
.
Id
;
this
.
showJujue
=
true
;
},
//取消
sureJujue
(){
this
.
bdMsg
.
ApplyForCancelStatus
=
2
;
this
.
apipost
(
"/api/Education/SetCommerceConsultApplyCancel"
,
this
.
bdMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getList
();
this
.
dialogTableVisible
=
false
;
this
.
showJujue
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
//获取活动类型列表
getActivityType
()
{
this
.
apipost
(
"/api/Education/GetCommerceActivityTypeList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
activityTypeList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
clearMsg
()
{
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
ActivityName
=
""
;
this
.
addMsg
.
StartTime
=
""
;
this
.
addMsg
.
EndTime
=
""
;
this
.
addMsg
.
CoverImg
=
""
;
this
.
addMsg
.
ActivityType
=
0
;
this
.
addMsg
.
ActivityInfo
=
""
;
this
.
addMsg
.
SignStartTime
=
''
;
this
.
addMsg
.
SignEndTime
=
''
;
this
.
addMsg
.
IsFree
=
1
;
this
.
addMsg
.
Price
=
0
;
this
.
addMsg
.
PointNum
=
0
;
this
.
addMsg
.
IsCancelConfirm
=
1
;
this
.
addMsg
.
Distinguish
=
1
;
this
.
addMsg
.
ManNum
=
0
;
this
.
addMsg
.
WoManNum
=
0
;
this
.
addMsg
.
AgeLimit
=
1
;
this
.
addMsg
.
StartAge
=
0
;
this
.
addMsg
.
EndAge
=
0
;
this
.
addMsg
.
LnsideLimit
=
1
;
this
.
addMsg
.
LonLat
=
''
;
this
.
addMsg
.
LocationName
=
''
;
},
SelectId
(
msg
)
{
let
url
=
this
.
getIconLink
(
msg
.
url
)
this
.
addMsg
.
CoverImg
=
url
this
.
isShowImage
=
false
;
},
getList
()
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/Education/GetActivityPage"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
tableData
=
pageData
;
}
})
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
//修改类型
EditType
(
item
)
{
this
.
apipost
(
"/api/Education/GetActivity"
,
{
Id
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
isShowAdd
=
false
;
var
tempData
=
res
.
data
.
data
;
this
.
addMsg
.
Id
=
tempData
.
Id
;
this
.
addMsg
.
ActivityName
=
tempData
.
ActivityName
;
this
.
addMsg
.
StartTime
=
tempData
.
StartTimeStr
;
this
.
addMsg
.
EndTime
=
tempData
.
EndTimeStr
;
this
.
addMsg
.
SignStartTime
=
tempData
.
SignStartTimeStr
;
this
.
addMsg
.
SignEndTime
=
tempData
.
SignEndTimeStr
;
this
.
addMsg
.
CoverImg
=
tempData
.
CoverImg
;
this
.
addMsg
.
ActivityType
=
tempData
.
ActivityType
;
this
.
addMsg
.
ActivityInfo
=
tempData
.
ActivityInfo
;
this
.
addMsg
.
IsFree
=
tempData
.
IsFree
;
this
.
addMsg
.
Price
=
tempData
.
Price
;
this
.
addMsg
.
PointNum
=
tempData
.
PointNum
;
this
.
addMsg
.
Distinguish
=
tempData
.
Distinguish
;
this
.
addMsg
.
ManNum
=
tempData
.
ManNum
;
this
.
addMsg
.
WoManNum
=
tempData
.
WoManNum
;
this
.
addMsg
.
AgeLimit
=
tempData
.
AgeLimit
;
this
.
addMsg
.
StartAge
=
tempData
.
StartAge
;
this
.
addMsg
.
EndAge
=
tempData
.
EndAge
;
this
.
addMsg
.
LnsideLimit
=
tempData
.
LnsideLimit
;
this
.
addMsg
.
LonLat
=
tempData
.
LonLat
;
this
.
addMsg
.
LocationName
=
tempData
.
LocationName
;
this
.
addMsg
.
IsCancelConfirm
=
tempData
.
IsCancelConfirm
;
if
(
tempData
.
ActivityInfo
)
{
this
.
defaultMsg
=
tempData
.
ActivityInfo
;
}
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
//删除类型
delType
(
item
)
{
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"/api/Education/RemoveActivity"
,
{
Id
:
item
.
Id
,
Status
:
1
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
);
});
},
//新增修改
submitform
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
content
=
this
.
$refs
.
ue
.
getUEContent
();
this
.
addMsg
.
ActivityInfo
=
content
;
if
(
this
.
addMsg
.
StartAge
>
this
.
addMsg
.
EndAge
){
this
.
Error
(
'年龄范围从小到大'
)
return
}
this
.
apipost
(
"/api/Education/SetActivity"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
isShowAdd
=
true
;
this
.
getList
();
this
.
clearMsg
();
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
else
{
return
false
;
}
})
},
//得到地图信息
mapEvent
(
e
)
{
this
.
addMsg
.
LonLat
=
e
.
lat
+
','
+
e
.
long
;
this
.
addMsg
.
LocationName
=
e
.
address
;
this
.
isShowMap
=
false
;
},
getMapShow
(){
this
.
isShowMap
=
true
;
},
acselect
(
e
){
if
(
e
>
0
&&
this
.
addMsg
.
Id
==
0
){
this
.
activityTypeList
.
map
(
x
=>
{
if
(
x
.
Id
==
e
){
this
.
defaultMsg
=
x
.
TypeContent
;
return
}
})
}
}
},
mounted
()
{}
};
</
script
>
<
style
>
.companyList
.remark_name
{
color
:
#888888
;
font-size
:
12px
;
margin-left
:
10px
;
float
:
right
;
}
.companyList
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
.companyList
.blue
{
color
:
#409EFF
;
}
.companyList
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
}
.companyList
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.companyList
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
width
:
100%
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
margin-right
:
20px
;
}
.companyList
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
.tradeactivity
.el-form-item__content
{
line-height
:
0
;
}
</
style
>
This diff is collapsed.
Click to expand it.
src/components/education/educationIndex.vue
View file @
ad565a10
...
...
@@ -194,8 +194,16 @@
<i
class=
"el-icon-menu"
></i><span>
上传配置
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/activityList'}" @click="isChecked='/activityList',CommonJump('activityList')">
<i
class=
"el-icon-menu"
></i><span>
官方活动列表
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/edactiveType'}" @click="isChecked='/edactiveType',CommonJump('edactiveType')">
<i
class=
"el-icon-menu"
></i><span>
活动类型
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/edactivity'}" @click="isChecked='/edactivity',CommonJump('edactivity')">
<i
class=
"el-icon-menu"
></i><span>
活动列表
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/resultPageList'}" @click="isChecked='/resultPageList',CommonJump('resultPageList')">
<i
class=
"el-icon-menu"
></i><span>
调查列表
</span>
</li>
...
...
This diff is collapsed.
Click to expand it.
src/router/index.js
View file @
ad565a10
...
...
@@ -514,6 +514,18 @@ export default new Router({
path
:
'/rechargeList'
,
name
:
'rechargeList'
,
component
:
resolve
=>
require
([
'@/components/education/rechargeList'
],
resolve
),
},
//网课 活动类型
{
path
:
'/edactiveType'
,
name
:
'edactiveType'
,
component
:
resolve
=>
require
([
'@/components/education/edactiveType'
],
resolve
),
},
//网课 活动列表
{
path
:
'/edactivity'
,
name
:
'edactivity'
,
component
:
resolve
=>
require
([
'@/components/education/edactivity'
],
resolve
),
}
]
},
...
...
This diff is collapsed.
Click to expand it.
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