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
499b22f7
Commit
499b22f7
authored
Jul 06, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
efcb8f71
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
255 additions
and
22 deletions
+255
-22
active-from.vue
src/components/activity/active-from.vue
+18
-18
copyActive.vue
src/pages/activity/copyActive.vue
+228
-0
routes.js
src/router/routes.js
+9
-4
No files found.
src/components/activity/active-from.vue
View file @
499b22f7
...
...
@@ -81,7 +81,24 @@
</
template
>
</q-input>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"40"
:dense=
"false"
v-model=
"addMsg.LocationName"
ref=
"LocationName"
class=
"col-12 q-pb-lg"
label=
"活动地址"
:rules=
"[val => !!val || '请填写活动地址']"
>
</q-input>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"40"
disable
:dense=
"false"
v-model=
"addMsg.LonLat"
ref=
"LonLat"
class=
"col-12 q-pb-lg"
label=
"门店经纬度"
:rules=
"[val => !!val || '请填写门店经纬度']"
>
<
template
v-slot:after
>
<q-btn
round
color=
"black"
icon=
"my_location"
@
click=
"getMapShow"
/>
</
template
>
</q-input>
<!-- 地图选址 -->
<el-dialog
title=
"地图展示"
:visible
.
sync=
"isShowMap"
width=
"960px"
style=
"zIndex:999999"
>
<Map
@
map-submit=
"mapEvent"
:address=
"addMsg.LocationName"
style=
"zIndex:999999"
></Map>
</el-dialog>
</div>
<div
class=
"col-6"
>
<div>
是否免费:
</div>
<q-toggle
v-model=
"addMsg.IsFree"
:true-value=
"1"
:false-value=
"2"
...
...
@@ -141,24 +158,7 @@
<div>
报名取消确认:
</div>
<q-toggle
v-model=
"addMsg.IsCancelConfirm"
:true-value=
"1"
:false-value=
"2"
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"40"
:dense=
"false"
v-model=
"addMsg.LocationName"
ref=
"LocationName"
class=
"col-12 q-pb-lg"
label=
"活动地址"
:rules=
"[val => !!val || '请填写活动地址']"
>
</q-input>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"40"
disable
:dense=
"false"
v-model=
"addMsg.LonLat"
ref=
"LonLat"
class=
"col-12 q-pb-lg"
label=
"门店经纬度"
:rules=
"[val => !!val || '请填写门店经纬度']"
>
<
template
v-slot:after
>
<q-btn
round
color=
"black"
icon=
"my_location"
@
click=
"getMapShow"
/>
</
template
>
</q-input>
<!-- 地图选址 -->
<el-dialog
title=
"地图展示"
:visible
.
sync=
"isShowMap"
width=
"960px"
style=
"zIndex:999999"
>
<Map
@
map-submit=
"mapEvent"
:address=
"addMsg.LocationName"
style=
"zIndex:999999"
></Map>
</el-dialog>
</div>
<div
class=
"col-6"
>
<q-uploader
:style=
"{ backgroundImage: 'url(' + addMsg.CoverImg + ')' }"
...
...
src/pages/activity/copyActive.vue
0 → 100644
View file @
499b22f7
<
style
scoped
>
.header-box
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
40px
;
}
.p_title
{
color
:
#000000
;
font-size
:
20px
;
/* height: 30px !important; */
display
:
flex
;
align-items
:
center
;
}
.activeDetail
{
overflow-y
:
scroll
;
}
.conbox
{
height
:
calc
(
100vh
-
220px
);
overflow-y
:
scroll
;
}
.conbox
::-webkit-scrollbar
{
/*滚动条整体样式*/
width
:
5px
;
/*宽度竖滚动条的尺寸*/
height
:
10px
;
/*高度横滚动条的尺寸*/
}
.conbox
::-webkit-scrollbar-thumb
{
/*滚动条里面的条*/
border-radius
:
10px
;
box-shadow
:
inset
0
0
5px
rgba
(
0
,
0
,
0
,
0.2
);
background
:
#eee
;
}
.conbox
::-webkit-scrollbar-track
{
/*滚动条里面轨道*/
border-radius
:
5px
;
background
:
#ffffff
;
}
.listTitle
{
font-size
:
18px
}
</
style
>
<
template
>
<div
class=
"page-body activeDetail"
>
<div
class=
"header-box"
>
<div
class=
"flex"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"返回"
@
click=
"goBack"
/>
<span
class=
"p_title"
>
复制活动
</span>
</div>
<div>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-sm"
label=
"新增活动"
@
click=
"addActiveList"
/>
<q-btn
color=
"accent"
size=
"sm"
label=
"保存"
@
click=
"save"
/>
</div>
</div>
<div
class=
"conbox"
>
<ActiveForm
:save-obj=
"activedata"
:activeTypeOptions=
"activityTypeList"
ref=
"childForm"
@
success=
"getactivedata"
/>
<div
class=
""
>
<div
class=
"q-mt-lg q-mb-lg listTitle"
>
活动列表
</div>
<div
v-for=
"(item,index) in ActivityTitle"
:key=
"item.id"
class=
"flex "
>
<DetailItem
:itemData=
"item"
:index=
"index+1"
@
success=
"getItemData($event,index)"
ref=
"child"
/>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除当前活动"
placement=
"top"
v-if=
"index>0"
>
<i
class=
"iconfont icon-img_delete_small q-ml-sm"
style=
"color: #2961FE"
@
click=
"delActiveList(index)"
></i>
</el-tooltip>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
DetailItem
from
"../../components/activity/activeDetail-item"
import
ActiveForm
from
'../../components/activity/active-from'
export
default
{
meta
:
{
title
:
"活动详情"
},
components
:
{
DetailItem
,
ActiveForm
},
data
()
{
return
{
msg
:
{
Id
:
0
,
ActivityTitle
:
[]
},
activeBaseData
:
{
},
ActivityTitle
:
[{
Title
:
""
,
//活动大标题
TripSort
:
0
,
//活动排序
ActivityPlanList
:
[
//活动安排
{
TripSort
:
0
,
//排序
StartTime
:
""
,
//开始时间
ActivityDuration
:
""
,
//活动时长(单位:分钟)
LonLat
:
""
,
//活动地址经纬度
LocationName
:
""
,
//活动地址
TripTitle
:
""
,
//安排标题
TripContent
:
""
,
//内容
TripPicList
:
[]
//图片
}
]
}],
activedata
:
{
},
activityTypeList
:
[],
}
},
mounted
()
{
this
.
getActiveTypeList
();
if
(
this
.
$route
.
query
.
Id
)
{
this
.
msg
.
Id
=
this
.
$route
.
query
.
Id
this
.
getDetail
()
}
},
methods
:
{
goBack
()
{
this
.
$router
.
go
(
-
1
)
},
addActiveList
()
{
let
obj
=
{
Title
:
""
,
//活动大标题
TripSort
:
this
.
ActivityTitle
.
length
,
//活动排序
ActivityPlanList
:
[
//活动安排
{
TripSort
:
0
,
//排序
StartTime
:
""
,
//开始时间
ActivityDuration
:
""
,
//活动时长(单位:分钟)
LonLat
:
""
,
//活动地址经纬度
LocationName
:
""
,
//活动地址
TripTitle
:
""
,
//安排标题
TripContent
:
""
,
//内容
TripPicList
:
[]
//图片
}
]
}
this
.
ActivityTitle
.
push
(
obj
)
},
delActiveList
(
index
)
{
this
.
ActivityTitle
.
splice
(
index
,
1
)
},
//活动详情列表数据
getItemData
(
val
,
index
)
{
this
.
msg
.
ActivityTitle
[
index
]
=
val
},
//保存信息
save
()
{
this
.
msg
.
ActivityTitle
=
this
.
ActivityTitle
this
.
$refs
.
child
.
map
(
x
=>
{
x
.
ruleVerification
();
})
let
res
=
this
.
$refs
.
child
.
every
(
x
=>
{
return
x
.
ruleVerification
();
})
let
res2
=
this
.
$refs
.
childForm
.
saveRule
()
if
(
res
&&
res2
)
{
let
msg
=
{
...
this
.
msg
,
...
this
.
activeBaseData
}
msg
.
Id
=
0
this
.
apipostDS
(
"/api/Education/SetActivity"
,
msg
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
Success
(
"操作成功"
);
// this.getDetail()
this
.
$router
.
push
(
"/activity/activityList"
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
},
getDetail
()
{
this
.
apipostDS
(
"/api/Education/GetActivity"
,
{
Id
:
this
.
msg
.
Id
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
ActivityTitle
=
res
.
data
.
data
.
ActivityTitleList
this
.
activedata
=
res
.
data
.
data
console
.
log
(
192
,
this
.
activedata
)
this
.
activedata
.
StartTime
=
""
this
.
activedata
.
StartTimeStr
=
""
this
.
activedata
.
EndTime
=
""
this
.
activedata
.
EndTimeStr
=
""
this
.
activedata
.
SignStartTime
=
""
this
.
activedata
.
SignStartTimeStr
=
""
this
.
activedata
.
SignEndTime
=
""
this
.
activedata
.
SignEndTimeStr
=
""
}
})
},
//获取活动类型下拉
getActiveTypeList
()
{
this
.
apipostDS
(
"/api/Education/GetCommerceActivityTypeList"
,
{},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
activityTypeList
=
res
.
data
.
data
;
this
.
activityTypeList
.
unshift
({
Id
:
-
1
,
TypeName
:
"不限"
})
}
})
},
//活动基础数据
getactivedata
(
val
)
{
this
.
activeBaseData
=
val
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/router/routes.js
View file @
499b22f7
...
...
@@ -741,6 +741,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/activity/activeDetail.vue"
)
},
{
path
:
"/activity/copyActive"
,
//活动 复制活动
component
:
()
=>
import
(
"pages/activity/copyActive.vue"
)
},
{
path
:
"/activity/advmanager"
,
//活动 广告图管理
component
:
()
=>
...
...
@@ -835,7 +840,7 @@ const routes = [{
component
:
()
=>
import
(
"pages/course/chapter.vue"
)
},
{
path
:
"/course/coursejob"
,
//作业管理
component
:
()
=>
...
...
@@ -985,9 +990,9 @@ const routes = [{
},
},
{
path
:
"/course/chapter-editor"
,
//章节管理
component
:
()
=>
import
(
"pages/course/chapterEditor.vue"
)
path
:
"/course/chapter-editor"
,
//章节管理
component
:
()
=>
import
(
"pages/course/chapterEditor.vue"
)
},
{
path
:
"*"
,
...
...
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