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
d9abab24
Commit
d9abab24
authored
Jun 22, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a10397e9
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
2601 additions
and
82 deletions
+2601
-82
active-from.vue
src/components/activity/active-from.vue
+447
-0
activeType-from.vue
src/components/activity/activeType-from.vue
+37
-38
commonMap.vue
src/components/activity/commonMap.vue
+224
-0
index.template.html
src/index.template.html
+1
-0
activeSignUpList.vue
src/pages/activity/activeSignUpList.vue
+271
-0
activeSummary.vue
src/pages/activity/activeSummary.vue
+215
-0
activeType.vue
src/pages/activity/activeType.vue
+31
-34
activityList.vue
src/pages/activity/activityList.vue
+491
-0
materialMan.vue
src/pages/activity/materialMan.vue
+845
-0
activityList.vue
src/pages/sale/activityList.vue
+0
-0
routes.js
src/router/routes.js
+27
-10
erpindex.js
src/utils/erpindex.js
+12
-0
No files found.
src/components/activity/active-from.vue
0 → 100644
View file @
d9abab24
<
template
>
<div>
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
class=
"addactivetype"
>
<q-card
style=
"width: 450px;max-width:500px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
(
saveObj
&&
saveObj
.
Id
>
0
)?
"修改活动"
:
"新增活动"
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"addMsg.ActivityName"
ref=
"Name"
class=
"col-12 q-pb-lg"
label=
"活动名称"
:rules=
"[val => !!val || '请填写活动名称']"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<q-input
filled
v-model=
"addMsg.StartTime"
mask=
"date"
label=
"开始时间"
ref=
"StartTime"
:rules=
"[val => !!val || '请选择开始时间']"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"addMsg.StartTime"
mask=
"YYYY-MM-DD"
minimal
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"关闭"
color=
"primary"
flat
/>
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<q-input
filled
v-model=
"addMsg.EndTime"
mask=
"date"
label=
"结束时间"
ref=
"EndTime"
:rules=
"[val => !!val || '请选择结束时间']"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"addMsg.EndTime"
mask=
"YYYY-MM-DD"
minimal
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"关闭"
color=
"primary"
flat
/>
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<q-input
filled
v-model=
"addMsg.SignStartTime"
mask=
"####-##-## ##:##:##"
ref=
"SignStartTime"
label=
"报名开始时间"
:rules=
"[val => !!val || '请选择报名开始时间']"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
transition-show=
"scale"
transition-hide=
"scale"
>
<div
class=
"q-gutter-md row items-start"
>
<q-date
v-model=
"addMsg.SignStartTimeStr"
mask=
"YYYY-MM-DD HH:mm:ss"
@
input=
"date"
/>
<q-time
v-model=
"addMsg.SignStartTimeStr"
format24h
mask=
"YYYY-MM-DD HH:mm:ss"
@
input=
"time"
/>
</div>
<q-btn
v-close-popup
label=
"关闭"
color=
"primary"
flat
style=
"float:right"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<q-input
filled
v-model=
"addMsg.SignEndTime"
mask=
"####-##-## ##:##:##"
ref=
"SignEndTime"
label=
"报名结束时间"
:rules=
"[val => !!val || '请选择报名开始时间']"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
transition-show=
"scale"
transition-hide=
"scale"
>
<div
class=
"q-gutter-md row items-start"
>
<q-date
v-model=
"addMsg.SignEndTimeStr"
mask=
"YYYY-MM-DD HH:mm:ss"
@
input=
"endDate"
/>
<q-time
v-model=
"addMsg.SignEndTimeStr"
format24h
mask=
"YYYY-MM-DD HH:mm:ss"
@
input=
"endTime"
/>
</div>
<q-btn
v-close-popup
label=
"关闭"
color=
"primary"
flat
style=
"float:right"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<q-select
stack-label
color=
"primary"
filled
clearable
label=
"选择活动类型"
option-value=
"Id"
option-label=
"TypeName"
:options=
"activeTypeOptions"
v-model=
"addMsg.ActivityType"
ref=
"ActivityType"
emit-value
map-options
:rules=
"[val => !!val || '请选择活动类型']"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<q-uploader
:style=
"{ backgroundImage: 'url(' + addMsg.CoverImg + ')' }"
style=
"width:auto;height:300px;background-repeat:no-repeat;background-size:cover; border:1px solid #eee"
flat
hide-upload-btn
max-files=
"1"
label=
"封面图"
accept=
".jpg, image/*"
:factory=
"uploadFile"
auto-upload
>
</q-uploader>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12 q-mt-sm q-mb-sm flex "
style=
"align-items:center"
>
<div>
是否免费:
</div>
<q-toggle
v-model=
"addMsg.IsFree"
:true-value=
"1"
:false-value=
"2"
@
input=
'addMsg.Price=0,addMsg.PointNum=0'
/>
</div>
</div>
<div
class=
"row wrap"
v-if=
"addMsg.IsFree==2"
>
<div
class=
"col-12"
>
<q-input
filled
stack-label
maxlength=
"20"
type=
"number"
:step=
"0.01"
:dense=
"false"
v-model=
"addMsg.Price"
ref=
"Price"
class=
"col-12 q-pb-lg"
label=
"现金价格"
:rules=
"[val => !!val || '请填写现金价格']"
suffix=
"元"
>
</q-input>
</div>
</div>
<div
class=
"row wrap"
v-if=
"addMsg.IsFree==2"
>
<div
class=
"col-12"
>
<q-input
filled
stack-label
maxlength=
"20"
type=
"number"
:dense=
"false"
v-model=
"addMsg.PointNum"
ref=
"PointNum"
class=
"col-12 q-pb-lg"
label=
"点数"
:rules=
"[val => !!val || '请填写点数']"
suffix=
"点"
>
</q-input>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12 q-mt-sm q-mb-sm flex "
style=
"align-items:center"
>
<div>
是否区分性别:
</div>
<q-toggle
v-model=
"addMsg.Distinguish"
:true-value=
"0"
:false-value=
"1"
@
input=
'addMsg.ManNum=0,addMsg.WoManNum=0'
/>
</div>
</div>
<div
class=
"row wrap"
v-if=
"addMsg.Distinguish==0"
>
<div
class=
"col-12"
>
<q-input
filled
stack-label
maxlength=
"20"
type=
"number"
:dense=
"false"
v-model=
"addMsg.ManNum"
ref=
"ManNum"
class=
"col-12 q-pb-lg"
label=
"男性"
:rules=
"[val => !!val || '请填写男性人数']"
suffix=
"人"
>
</q-input>
</div>
</div>
<div
class=
"row wrap"
v-if=
"addMsg.Distinguish==0"
>
<div
class=
"col-12"
>
<q-input
filled
stack-label
maxlength=
"20"
type=
"number"
:dense=
"false"
v-model=
"addMsg.WoManNum"
ref=
"WoManNum"
class=
"col-12 q-pb-lg"
label=
"女性"
:rules=
"[val => !!val || '请填写女性人数']"
suffix=
"人"
>
</q-input>
</div>
</div>
<div
class=
"row wrap"
v-if=
"addMsg.Distinguish==1"
>
<div
class=
"col-12"
>
<q-input
filled
stack-label
maxlength=
"20"
type=
"number"
:dense=
"false"
v-model=
"addMsg.ManNum"
ref=
"ManNum"
class=
"col-12 q-pb-lg"
label=
"总人数"
:rules=
"[val => !!val || '请填写总人数']"
suffix=
"人"
>
</q-input>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12 q-mt-sm q-mb-sm flex "
style=
"align-items:center"
>
<div>
是否区分年龄:
</div>
<q-toggle
v-model=
"addMsg.AgeLimit"
:true-value=
"0"
:false-value=
"1"
@
change=
'addMsg.StartAge=0,addMsg.EndAge=0'
/>
</div>
</div>
<div
class=
"row wrap"
v-if=
"addMsg.AgeLimit==0"
>
<div
class=
"col-12 q-mt-sm q-mb-sm flex "
style=
"align-items:center"
>
<div>
年龄范围:
</div>
<q-range
v-model=
"labelAge"
:min=
"0"
:max=
"50"
:step=
"1"
label-always
:left-label-value=
"labelAge.min + '岁'"
:right-label-value=
"labelAge.max + '岁'"
color=
"brown"
@
change =
"changeAge"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12 q-mt-sm q-mb-sm flex "
style=
"align-items:center"
>
<div>
是否内部限制:
</div>
<q-toggle
v-model=
"addMsg.LnsideLimit"
:true-value=
"1"
:false-value=
"0"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12 q-mt-sm q-mb-sm flex "
style=
"align-items:center"
>
<div>
报名取消确认:
</div>
<q-toggle
v-model=
"addMsg.IsCancelConfirm"
:true-value=
"1"
:false-value=
"2"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<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>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<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=
"z-index:99999"
>
<Map
@
map-submit=
"mapEvent"
:address=
"addMsg.LocationName"
></Map>
</el-dialog>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"q-mt-lg q-mb-sm"
>
活动详情
</div>
<div
class=
"col-12"
>
<Ueditor
:value=
"ueditor.value"
:config=
"ueditor.config"
@
input=
"setVal"
ref=
"ue"
no-margin
:isShowInsertImage=
"false"
:isShowAttachment=
"false"
:isShowVoice=
"false"
></Ueditor>
</div>
</div>
</q-card-section>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeRuleForm"
/>
<q-btn
label=
"保存"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
@
click=
"saveRule"
/>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<
script
>
import
{
UploadSelfFile
}
from
"../../api/common/common"
;
import
Ueditor
from
"../editor/UeEditor"
;
import
Map
from
"./commonMap"
;
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
},
activeTypeOptions
:{
type
:
Array
,
default
:
null
}
},
components
:
{
Ueditor
,
Map
},
data
()
{
return
{
labelAge
:{
min
:
0
,
max
:
0
},
//年龄范围
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
:
''
,
//位置名称
},
persistent
:
true
,
isShowMap
:
false
,
//是否显示地图弹窗
//富文本
ueditor
:
{
value
:
""
,
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
100
,
autoHeightEnabled
:
true
,
enableContextMenu
:
false
}
},
}
},
mounted
()
{
console
.
log
(
135
,
this
.
saveObj
)
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
this
.
addMsg
.
Id
=
this
.
saveObj
.
Id
this
.
addMsg
.
ActivityName
=
this
.
saveObj
.
ActivityName
this
.
addMsg
.
StartTime
=
this
.
saveObj
.
StartTime
this
.
addMsg
.
EndTime
=
this
.
saveObj
.
EndTime
this
.
addMsg
.
CoverImg
=
this
.
saveObj
.
CoverImg
this
.
addMsg
.
ActivityType
=
this
.
saveObj
.
ActivityType
this
.
addMsg
.
ActivityInfo
=
this
.
saveObj
.
ActivityInfo
this
.
addMsg
.
SignStartTime
=
this
.
saveObj
.
SignStartTime
this
.
addMsg
.
SignStartTimeStr
=
this
.
saveObj
.
SignStartTimeStr
this
.
addMsg
.
SignEndTime
=
this
.
saveObj
.
SignEndTime
this
.
addMsg
.
SignEndTimeStr
=
this
.
saveObj
.
SignEndTimeStr
this
.
addMsg
.
IsFree
=
this
.
saveObj
.
IsFree
this
.
addMsg
.
Price
=
this
.
saveObj
.
Price
this
.
addMsg
.
PointNum
=
this
.
saveObj
.
PointNum
this
.
addMsg
.
IsCancelConfirm
=
this
.
saveObj
.
IsCancelConfirm
this
.
addMsg
.
Distinguish
=
this
.
saveObj
.
Distinguish
this
.
addMsg
.
ManNum
=
this
.
saveObj
.
ManNum
this
.
addMsg
.
WoManNum
=
this
.
saveObj
.
WoManNum
this
.
addMsg
.
AgeLimit
=
this
.
saveObj
.
AgeLimit
this
.
addMsg
.
StartAge
=
this
.
saveObj
.
StartAge
this
.
addMsg
.
EndAge
=
this
.
saveObj
.
EndAge
this
.
labelAge
.
max
=
this
.
saveObj
.
StartAge
this
.
labelAge
.
min
=
this
.
saveObj
.
EndAge
this
.
addMsg
.
LnsideLimit
=
this
.
saveObj
.
LnsideLimit
this
.
addMsg
.
LonLat
=
this
.
saveObj
.
LonLat
this
.
addMsg
.
LocationName
=
this
.
saveObj
.
LocationName
// this.addMsg.ActivityName=this.saveObj.ActivityName
// this.addMsg.ActivityName=this.saveObj.ActivityName
// this.addMsg.TypeContent=this.saveObj.TypeContent
this
.
setVal
(
this
.
addMsg
.
ActivityInfo
);
}
else
{
this
.
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
:
''
,
//位置名称
},
this
.
setVal
(
""
);
}
},
methods
:
{
// 选择报名开始时间
date
(
val
){
this
.
addMsg
.
SignStartTime
=
val
},
time
(
val
){
this
.
addMsg
.
SignStartTime
=
val
},
// 选择报名结束时间
endDate
(
val
){
this
.
addMsg
.
SignEndTime
=
val
},
endTime
(
val
){
this
.
addMsg
.
SignEndTime
=
val
},
// 选择年龄范围
changeAge
(
val
){
this
.
addMsg
.
StartAge
=
val
.
min
this
.
addMsg
.
EndAge
=
val
.
max
},
uploadFile
(
files
)
{
UploadSelfFile
(
"course"
,
files
[
0
],
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
addMsg
.
CoverImg
=
res
.
FileUrl
;
}
});
},
//保存信息
saveRule
()
{
console
.
log
(
this
.
addMsg
)
this
.
$refs
.
Name
.
validate
();
this
.
$refs
.
StartTime
.
validate
();
this
.
$refs
.
EndTime
.
validate
();
this
.
$refs
.
SignStartTime
.
validate
();
this
.
$refs
.
SignEndTime
.
validate
();
if
(
!
this
.
$refs
.
Name
.
hasError
&&!
this
.
$refs
.
StartTime
.
hasError
&&!
this
.
$refs
.
EndTime
.
hasError
&&!
this
.
$refs
.
SignStartTime
.
hasError
&&!
this
.
$refs
.
SignEndTime
.
hasError
)
{
this
.
apipostDS
(
"/api/Education/SetActivity"
,
this
.
addMsg
,(
res
)
=>
{
if
(
res
.
data
.
resultCode
===
1
){
this
.
Success
(
res
.
data
.
message
);
this
.
closeRuleForm
();
this
.
$emit
(
'success'
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
},
//关闭窗口
closeRuleForm
()
{
this
.
$emit
(
'close'
);
this
.
persistent
=
false
},
// 富文本
setVal
(
val
)
{
this
.
addMsg
.
ActivityInfo
=
val
;
this
.
ueditor
.
value
=
decodeURIComponent
(
val
);
},
//得到地图信息
mapEvent
(
e
)
{
this
.
addMsg
.
LonLat
=
e
.
lat
+
","
+
e
.
long
;
this
.
addMsg
.
LocationName
=
e
.
address
;
this
.
isShowMap
=
false
;
},
getMapShow
()
{
this
.
isShowMap
=
true
;
console
.
log
(
this
.
isShowMap
)
},
},
}
</
script
>
<
style
scoped
>
.input-new-tag
{
width
:
90px
;
margin-left
:
10px
;
vertical-align
:
bottom
;
margin-right
:
5px
;
}
.el-tag
{
margin-right
:
5px
;
}
.el-form-item__content
{
line-height
:
0
;
}
.el-button
{
line-height
:
30px
;
padding-top
:
0
;
padding-bottom
:
0
;
height
:
32px
;
margin-top
:
8px
;
}
</
style
>
src/components/
sale/active
/activeType-from.vue
→
src/components/
activity
/activeType-from.vue
View file @
d9abab24
...
@@ -2,18 +2,18 @@
...
@@ -2,18 +2,18 @@
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
class=
"addactivetype"
>
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
class=
"addactivetype"
>
<q-card
style=
"width: 450px;max-width:500px;"
>
<q-card
style=
"width: 450px;max-width:500px;"
>
<q-card-section>
<q-card-section>
<div
class=
"text-h6"
>
{{
(
saveObj
&&
saveObj
.
Id
>
0
)?
"修改
班次"
:
"新增班次
"
}}
</div>
<div
class=
"text-h6"
>
{{
(
saveObj
&&
saveObj
.
Id
>
0
)?
"修改
活动类型"
:
"新增活动类型
"
}}
</div>
</q-card-section>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<div
class=
"col-12"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"
m
sg.TypeName"
ref=
"Name"
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"
addM
sg.TypeName"
ref=
"Name"
class=
"col-12 q-pb-lg"
label=
"活动类型名称"
:rules=
"[val => !!val || '请填写活动类型名称']"
/>
class=
"col-12 q-pb-lg"
label=
"活动类型名称"
:rules=
"[val => !!val || '请填写活动类型名称']"
/>
</div>
</div>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<div
class=
"col-12"
>
<q-uploader
:style=
"
{ backgroundImage: 'url(' +
m
sg.CoverImage + ')' }" style="width:auto;height:500px;background-repeat:no-repeat;background-size:cover; border:1px solid #eee" flat
<q-uploader
:style=
"
{ backgroundImage: 'url(' +
addM
sg.CoverImage + ')' }" style="width:auto;height:500px;background-repeat:no-repeat;background-size:cover; border:1px solid #eee" flat
hide-upload-btn max-files="1" label="封面图" accept=".jpg, image/*" :factory="uploadFile" auto-upload>
hide-upload-btn max-files="1" label="封面图" accept=".jpg, image/*" :factory="uploadFile" auto-upload>
</q-uploader>
</q-uploader>
</div>
</div>
...
@@ -58,8 +58,8 @@
...
@@ -58,8 +58,8 @@
<
script
>
<
script
>
import
{
import
{
UploadSelfFile
UploadSelfFile
}
from
"../../
../
api/common/common"
;
}
from
"../../api/common/common"
;
import
Ueditor
from
"../
../
editor/UeEditor"
;
import
Ueditor
from
"../editor/UeEditor"
;
export
default
{
export
default
{
props
:
{
props
:
{
saveObj
:
{
saveObj
:
{
...
@@ -70,69 +70,69 @@ import {
...
@@ -70,69 +70,69 @@ import {
components
:
{
Ueditor
},
components
:
{
Ueditor
},
data
()
{
data
()
{
return
{
return
{
m
sg
:
{
addM
sg
:
{
Id
:
0
,
Id
:
0
,
TypeName
:
""
,
TypeName
:
""
,
CoverImage
:
""
,
CoverImage
:
""
,
LableNameList
:[],
TypeContent
:
""
,
},
},
persistent
:
true
,
persistent
:
true
,
//标签
dynamicTags
:
[],
//标签数组
dynamicTags
:
[],
//标签数组
inputVisible
:
false
,
inputVisible
:
false
,
inputValue
:
''
,
inputValue
:
''
,
//富文本
ueditor
:
{
ueditor
:
{
value
:
""
,
value
:
""
,
config
:
{
config
:
{
initialFrameWidth
:
null
,
initialFrameWidth
:
null
,
initialFrameHeight
:
2
0
,
initialFrameHeight
:
10
0
,
autoHeightEnabled
:
true
,
autoHeightEnabled
:
true
,
enableContextMenu
:
false
enableContextMenu
:
false
}
}
},
},
}
}
},
},
created
()
{},
mounted
()
{
mounted
()
{
console
.
log
(
93
,
this
.
saveObj
)
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
this
.
m
sg
.
Id
=
this
.
saveObj
.
Id
this
.
addM
sg
.
Id
=
this
.
saveObj
.
Id
this
.
m
sg
.
CoverImage
=
this
.
saveObj
.
CoverImage
this
.
addM
sg
.
CoverImage
=
this
.
saveObj
.
CoverImage
this
.
dynamicTags
=
this
.
saveObj
.
LableNameList
this
.
dynamicTags
=
this
.
saveObj
.
LableNameList
this
.
msg
.
TypeName
=
this
.
saveObj
.
TypeName
this
.
addMsg
.
TypeName
=
this
.
saveObj
.
TypeName
this
.
msg
.
TypeContent
=
this
.
saveObj
.
TypeContent
this
.
addMsg
.
TypeContent
=
this
.
saveObj
.
TypeContent
this
.
setVal
(
this
.
msg
.
TypeContent
);
this
.
setVal
(
this
.
addMsg
.
TypeContent
);
}
else
{
this
.
addMsg
.
Id
=
0
this
.
addMsg
.
CoverImage
=
""
this
.
dynamicTags
=
[]
this
.
addMsg
.
TypeName
=
""
this
.
addMsg
.
TypeContent
=
""
this
.
setVal
(
""
);
}
}
},
},
methods
:
{
methods
:
{
uploadFile
(
files
)
{
uploadFile
(
files
)
{
UploadSelfFile
(
"course"
,
files
[
0
],
res
=>
{
UploadSelfFile
(
"course"
,
files
[
0
],
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
m
sg
.
CoverImage
=
res
.
FileUrl
;
this
.
addM
sg
.
CoverImage
=
res
.
FileUrl
;
}
}
});
});
},
},
//保存信息
//保存信息
saveRule
()
{
saveRule
()
{
this
.
$refs
.
Name
.
validate
();
this
.
$refs
.
Name
.
validate
();
this
.
$refs
.
School_Ids
.
validate
();
if
(
!
this
.
$refs
.
Name
.
hasError
)
{
this
.
$refs
.
StartTime
.
validate
();
this
.
addMsg
.
LableNameList
=
this
.
dynamicTags
;
this
.
$refs
.
EndTime
.
validate
();
this
.
apipostDS
(
"/api/Education/SetCommerceActivityType"
,
this
.
addMsg
,(
res
)
=>
{
if
(
!
this
.
$refs
.
Name
.
hasError
&&
if
(
res
.
data
.
resultCode
===
1
){
!
this
.
$refs
.
School_Ids
.
hasError
&&
this
.
Success
(
res
.
data
.
message
);
!
this
.
$refs
.
StartTime
.
hasError
&&
this
.
closeRuleForm
();
!
this
.
$refs
.
EndTime
.
hasError
)
{
this
.
$emit
(
'success'
);
if
(
this
.
schoolArr
&&
this
.
schoolArr
.
length
>
0
)
{
}
else
{
this
.
msg
.
School_Ids
=
this
.
schoolArr
.
map
(
item
=>
item
.
SId
).
toString
();
this
.
Error
(
res
.
data
.
message
);
}
else
{
}
this
.
msg
.
School_Ids
=
""
;
})
}
SetFrequency
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$emit
(
'success'
);
this
.
closeRuleForm
();
}
})
}
}
},
},
//关闭窗口
//关闭窗口
...
@@ -161,9 +161,8 @@ import {
...
@@ -161,9 +161,8 @@ import {
},
},
// 富文本
// 富文本
setVal
(
val
)
{
setVal
(
val
)
{
this
.
m
sg
.
TypeContent
=
val
;
this
.
addM
sg
.
TypeContent
=
val
;
this
.
ueditor
.
value
=
decodeURIComponent
(
val
);
this
.
ueditor
.
value
=
decodeURIComponent
(
val
);
},
},
},
},
}
}
...
...
src/components/activity/commonMap.vue
0 → 100644
View file @
d9abab24
<
template
id=
"app-map"
>
<div
class=
"app-map"
>
<el-form
label-width=
"80px"
size=
"small"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"地址搜索"
>
<el-input
placeholder=
"请输入具体地址"
@
keyup
.
enter
.
native=
"mapSearch"
v-model=
"mapKeyword"
>
<el-button
@
click=
"mapSearch"
slot=
"append"
icon=
"el-icon-search"
>
</el-button>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"地址"
>
<el-input
disabled
v-model=
"newAddress"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"纬度|经度"
>
<el-input
disabled
v-model=
"lat_long"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
class=
"app-map"
id=
"container"
:style=
"style"
></div>
<span
style=
"height:30px;display:none"
id=
"city"
></span>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align:right;margin-top:30px;"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"confirm"
>
确 定
</el-button>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
width
:
String
,
height
:
String
,
lat
:
String
,
long
:
String
,
address
:
{
type
:
String
,
default
:
''
,
},
title
:
String
,
},
data
()
{
return
{
longitude
:
''
,
// 经度(大)
latitude
:
''
,
// 纬度(小)
lat_long
:
''
,
markers
:
[],
map
:
[],
searchService
:
{},
mapKeyword
:
''
,
dialogVisible
:
false
,
newAddress
:
''
,
city
:
''
,
};
},
created
()
{
},
methods
:
{
// 初始化地图
initMap
()
{
let
self
=
this
;
let
center
=
new
qq
.
maps
.
LatLng
(
self
.
latitude
,
self
.
longitude
);
// 默认坐标
self
.
map
=
new
qq
.
maps
.
Map
(
document
.
getElementById
(
"container"
),
{
center
:
center
,
zoom
:
13
,
// 缩放级别
}
);
let
citylocation
=
new
qq
.
maps
.
CityService
({
map
:
self
.
map
,
complete
:
function
(
results
)
{
self
.
city
=
results
.
detail
.
name
;
self
.
map
.
setCenter
(
results
.
detail
.
latLng
);
let
marker
=
self
.
setMarker
(
results
.
detail
.
latLng
);
self
.
markers
.
push
(
marker
);
}
});
// 搜索服务 默认获取当前地址
if
(
!
self
.
lat
&&
!
self
.
long
)
{
citylocation
.
searchLocalCity
()
}
else
{
self
.
latitude
=
self
.
lat
;
self
.
longitude
=
self
.
long
;
self
.
lat_long
=
self
.
lat
+
','
+
self
.
long
;
citylocation
.
searchCityByLatLng
(
new
qq
.
maps
.
LatLng
(
self
.
latitude
,
self
.
longitude
));
}
this
.
clickEvent
(
center
);
this
.
initSearch
();
},
// 地图点击事件
clickEvent
(
center
)
{
let
self
=
this
;
let
listener
=
qq
.
maps
.
event
.
addListener
(
this
.
map
,
'click'
,
function
(
event
)
{
self
.
longitude
=
event
.
latLng
.
getLng
().
toFixed
(
6
);
self
.
latitude
=
event
.
latLng
.
getLat
().
toFixed
(
6
);
self
.
lat_long
=
self
.
latitude
+
','
+
self
.
longitude
;
self
.
getAddressBylatLong
();
let
coord
=
new
qq
.
maps
.
LatLng
(
self
.
latitude
,
self
.
longitude
);
let
marker
=
self
.
setMarker
(
coord
);
self
.
markers
.
push
(
marker
);
});
},
// 根据经纬度获取地址信息
getAddressBylatLong
()
{
let
self
=
this
;
// 根据经纬度查询城市信息
let
geocoder
=
new
qq
.
maps
.
Geocoder
({
complete
:
function
(
result
)
{
self
.
newAddress
=
result
.
detail
.
address
;
}
});
let
coord
=
new
qq
.
maps
.
LatLng
(
self
.
latitude
,
self
.
longitude
);
geocoder
.
getAddress
(
coord
);
},
// 添加标注
setMarker
(
coord
)
{
let
self
=
this
;
// 添加标注
let
marker
=
new
qq
.
maps
.
Marker
({
map
:
self
.
map
,
position
:
coord
});
//获取标记的点击事件
qq
.
maps
.
event
.
addListener
(
marker
,
'click'
,
function
(
event
)
{
self
.
longitude
=
event
.
latLng
.
getLng
().
toFixed
(
6
);
self
.
latitude
=
event
.
latLng
.
getLat
().
toFixed
(
6
);
self
.
lat_long
=
self
.
latitude
+
','
+
self
.
longitude
;
self
.
getAddressBylatLong
();
});
return
marker
;
},
// 清除地址坐标
clearOverLays
()
{
//清除地图上的marker
let
overlay
;
while
(
overlay
=
this
.
markers
.
pop
())
{
overlay
.
setMap
(
null
);
}
},
initSearch
()
{
let
self
=
this
;
let
latlngBounds
=
new
qq
.
maps
.
LatLngBounds
();
//设置Poi检索服务,用于本地检索、周边检索
self
.
searchService
=
new
qq
.
maps
.
SearchService
({
//设置搜索范围为
location
:
self
.
city
,
//设置动扩大检索区域。默认值true,会自动检索指定城市以外区域。
autoExtend
:
true
,
//检索成功的回调函数
complete
:
function
(
results
)
{
//设置回调函数参数
let
pois
=
results
.
detail
.
pois
;
if
(
!
pois
)
{
alert
(
"输入详细地址搜索更准确"
);
return
false
;
}
for
(
let
i
=
0
,
l
=
pois
.
length
;
i
<
l
;
i
++
)
{
let
poi
=
pois
[
i
];
//扩展边界范围,用来包含搜索到的Poi点
latlngBounds
.
extend
(
poi
.
latLng
);
let
marker
=
self
.
setMarker
(
poi
.
latLng
)
marker
.
setTitle
(
i
+
1
);
self
.
markers
.
push
(
marker
);
}
//调整地图视野
self
.
map
.
fitBounds
(
latlngBounds
);
},
//若服务请求失败,则运行以下函数
error
:
function
()
{
alert
(
"出错了。"
);
}
});
},
// 地址搜索
mapSearch
()
{
this
.
clearOverLays
();
this
.
searchService
.
search
(
this
.
mapKeyword
);
},
confirm
()
{
this
.
$emit
(
'map-submit'
,
{
lat
:
this
.
latitude
,
long
:
this
.
longitude
,
address
:
this
.
newAddress
});
},
},
computed
:
{
style
()
{
let
width
=
'100%'
;
let
height
=
'400px'
;
if
(
this
.
width
)
{
width
=
this
.
width
+
(
isNaN
(
this
.
width
)
?
''
:
'px'
);
}
if
(
this
.
height
)
{
height
=
this
.
height
+
(
isNaN
(
this
.
height
)
?
''
:
'px'
);
}
return
`width:
${
width
}
;height:
${
height
}
;`
;
},
},
mounted
()
{
this
.
newAddress
=
this
.
address
?
this
.
address
:
''
;
this
.
mapKeyword
=
this
.
newAddress
;
this
.
initMap
();
if
(
this
.
mapKeyword
!=
''
){
this
.
mapSearch
();
}
}
};
</
script
>
src/index.template.html
View file @
d9abab24
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
<link
rel=
"icon"
type=
"image/ico"
href=
"favicon.ico"
>
<link
rel=
"icon"
type=
"image/ico"
href=
"favicon.ico"
>
<link
rel=
"stylesheet"
href=
"https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css"
/>
<link
rel=
"stylesheet"
href=
"https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css"
/>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"https://g.alicdn.com/de/prismplayer/2.9.3/aliplayer-min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"https://g.alicdn.com/de/prismplayer/2.9.3/aliplayer-min.js"
></script>
<script
charset=
"utf-8"
src=
"https://map.qq.com/api/js?v=2.exp&key=OV7BZ-ZT3HP-6W3DE-LKHM3-RSYRV-ULFZV"
></script>
</head>
</head>
<body>
<body>
<!-- DO NOT touch the following DIV -->
<!-- DO NOT touch the following DIV -->
...
...
src/pages/activity/activeSignUpList.vue
0 → 100644
View file @
d9abab24
<
style
>
li
{
list-style-type
:
none
;
}
.activeType
ul
{
padding
:
0px
;
}
.activeType
li
{
background
:
rgba
(
221
,
222
,
224
,
0.2
);
border-radius
:
4px
;
margin-top
:
15px
;
}
.activeType
li
.dline
{
display
:
table
;
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
}
.activeType
li
.d1
,
.activeType
li
.d2
,
.activeType
li
.d3
,
.activeType
li
.d4
,
.activeType
li
.d5
{
width
:
18%
;
padding
:
20px
20px
10px
;
}
.activeType
li
.d7
{
flex
:
1
;
width
:
1px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
}
.activeType
li
.d1
.di-title
{
font-size
:
16px
;
color
:
#111111
;
}
.activeType
li
.d1
.di-c
{
font-size
:
14px
;
display
:
flex
;
line-height
:
28px
;
color
:
#111111
;
}
.activeType
li
.d6
{
padding
:
10px
20px
;
width
:
100%
;
height
:
inherit
;
position
:
relative
;
border-top
:
1px
solid
#dddee0
;
}
.activeType
li
.d6
.progress
{
width
:
100%
;
height
:
5px
;
position
:
absolute
;
left
:
0
;
bottom
:
0
;
}
.activeType
li
.d2
div
{
margin
:
2px
0
;
font-size
:
14px
;
color
:
#111111
;
}
.activeType
li
.d2-n
{
font-size
:
12px
;
color
:
#999999
;
margin-right
:
20px
;
}
.activeType
li
.d3
.d3-s
{
color
:
var
(
--q-color-negative
);
font-weight
:
bold
;
}
.activeType
li
.d3
div
{
margin
:
2px
0
;
font-size
:
14px
;
}
.activeType
li
.d4
div
{
font-size
:
14px
;
color
:
#111111
;
margin
:
2px
0
;
}
.activeType
li
.d5
div
{
font-size
:
14px
;
color
:
#111111
;
margin
:
2px
0
;
}
.activeType
.myCourseNName
{
width
:
25px
;
height
:
25px
;
border-radius
:
50%
;
color
:
#fff
!important
;
text-align
:
center
;
line-height
:
25px
;
background-color
:
#004d40
;
}
.activeType
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
</
style
>
<
template
>
<div
class=
"page-body activeType"
>
<!--
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.TypeName"
label=
"类型名称"
@
clear=
"resetSearch"
maxlength=
"20"
/>
</div>
</div>
</div>
-->
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"返回"
@
click=
"goBack"
/>
<div
class=
"col-2 q-table__title"
>
活动报名列表
</div>
<q-space
/>
<!--
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增"
@
click=
"editQuotation(null)"
/>
</div>
-->
</
template
>
<!-- <template v-slot:body-cell-CoverImage="props">
<q-td :props="props">
<div class="app-image"
:style="{backgroundImage:'url(' + props.row.CoverImage + ')',backgroundSize:'cover'}">
</div>
</q-td>
</template> -->
<
template
v-slot:body-cell-Money=
"props"
>
<q-td
:props=
"props"
>
<span
v-if=
"props.row.PaymentWay == 6"
>
星星支付:
{{
props
.
row
.
TotalPoint
}}
点
</span
>
<span
v-if=
"props.row.PaymentWay == 1"
>
现金支付:
{{
props
.
row
.
Money
}}
元
</span
>
</q-td>
</
template
>
<!-- <template v-slot:body-cell-optioned="props">
<q-td :props="props">
<div>
<q-btn flat size="xs" icon="edit"
color="accent" style="font-weight:400" label="编辑" @click="editQuotation(props.row)" />
<q-btn flat size="xs" icon="edit"
color="accent" style="font-weight:400" label="删除" @click="delType(props.row)" />
</div>
</q-td>
</template> -->
<
template
v-slot:bottom
>
<!--
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
-->
</
template
>
</q-table>
</div>
</div>
</template>
<
script
>
export
default
{
meta
:
{
title
:
"报名列表"
},
data
()
{
return
{
data
:
[],
loading
:
true
,
msg
:
{
// pageIndex: 1,
// pageSize: 10,
LinkMan
:
''
,
EnrollState
:
1
,
ActivityId
:
0
},
pageCount
:
0
,
columns
:
[{
name
:
"LinkMan"
,
label
:
"联系人"
,
field
:
"LinkMan"
,
align
:
"left"
},
{
name
:
"LinkTel"
,
label
:
"联系电话"
,
field
:
"LinkTel"
,
align
:
"left"
},
{
name
:
"PeopleNum"
,
required
:
true
,
label
:
"人数"
,
field
:
"PeopleNum"
,
align
:
"left"
,
},
{
name
:
"Money"
,
label
:
"付款方式"
,
field
:
"Money"
,
align
:
"left"
},
{
name
:
"Remark"
,
label
:
"备注"
,
field
:
"Remark"
,
align
:
"left"
},
{
name
:
"CreateTimeStr"
,
label
:
"报名时间"
,
field
:
"CreateTimeStr"
,
align
:
"left"
},
// {
// name: 'optioned',
// label: '操作',
// align: "left"
// }
],
showForm
:
false
,
typeObj
:{}
}
},
mounted
()
{
if
(
this
.
$route
.
query
.
Id
){
this
.
msg
.
ActivityId
=
this
.
$route
.
query
.
Id
;
}
this
.
getList
();
},
methods
:
{
getList
(){
this
.
loading
=
true
;
this
.
apipostDS
(
"/api/Education/GetCommerceConsultPage"
,
this
.
msg
,(
res
)
=>
{
this
.
loading
=
false
if
(
res
.
data
.
resultCode
===
1
){
this
.
data
=
res
.
data
.
data
;
}
})
},
goBack
(){
this
.
$router
.
go
(
-
1
)
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/activity/activeSummary.vue
0 → 100644
View file @
d9abab24
<
style
>
li
{
list-style-type
:
none
;
}
.activeType
ul
{
padding
:
0px
;
}
.activeType
li
{
background
:
rgba
(
221
,
222
,
224
,
0.2
);
border-radius
:
4px
;
margin-top
:
15px
;
}
.activeType
li
.dline
{
display
:
table
;
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
}
.activeType
li
.d1
,
.activeType
li
.d2
,
.activeType
li
.d3
,
.activeType
li
.d4
,
.activeType
li
.d5
{
width
:
18%
;
padding
:
20px
20px
10px
;
}
.activeType
li
.d7
{
flex
:
1
;
width
:
1px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
}
.activeType
li
.d1
.di-title
{
font-size
:
16px
;
color
:
#111111
;
}
.activeType
li
.d1
.di-c
{
font-size
:
14px
;
display
:
flex
;
line-height
:
28px
;
color
:
#111111
;
}
.activeType
li
.d6
{
padding
:
10px
20px
;
width
:
100%
;
height
:
inherit
;
position
:
relative
;
border-top
:
1px
solid
#dddee0
;
}
.activeType
li
.d6
.progress
{
width
:
100%
;
height
:
5px
;
position
:
absolute
;
left
:
0
;
bottom
:
0
;
}
.activeType
li
.d2
div
{
margin
:
2px
0
;
font-size
:
14px
;
color
:
#111111
;
}
.activeType
li
.d2-n
{
font-size
:
12px
;
color
:
#999999
;
margin-right
:
20px
;
}
.activeType
li
.d3
.d3-s
{
color
:
var
(
--q-color-negative
);
font-weight
:
bold
;
}
.activeType
li
.d3
div
{
margin
:
2px
0
;
font-size
:
14px
;
}
.activeType
li
.d4
div
{
font-size
:
14px
;
color
:
#111111
;
margin
:
2px
0
;
}
.activeType
li
.d5
div
{
font-size
:
14px
;
color
:
#111111
;
margin
:
2px
0
;
}
.activeType
.myCourseNName
{
width
:
25px
;
height
:
25px
;
border-radius
:
50%
;
color
:
#fff
!important
;
text-align
:
center
;
line-height
:
25px
;
background-color
:
#004d40
;
}
.activeType
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
</
style
>
<
template
>
<div
class=
"page-body activeType"
>
<div
class=
"q-mb-sm"
style=
"display:flex;align-items:center; justify-content:space-between"
>
<div
style=
"font-size: 20px;letter-spacing: .005em;"
>
活动总结
</div>
<div>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md q-mr-sm"
label=
"返回"
@
click=
"goBack"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md q-mr-sm"
label=
"提交"
@
click=
"save"
/>
</div>
</div>
<div
class=
"page-content"
>
<Ueditor
:value=
"ueditor.value"
:config=
"ueditor.config"
@
input=
"setVal"
ref=
"ue"
no-margin
:isShowInsertImage=
"false"
:isShowAttachment=
"false"
:isShowVoice=
"false"
></Ueditor>
</div>
</div>
</
template
>
<
script
>
import
Ueditor
from
"../../components/editor/UeEditor"
;
export
default
{
meta
:
{
title
:
"活动总结"
},
components
:
{
Ueditor
},
data
()
{
return
{
msg
:{
Id
:
0
,
Summary
:
''
},
//富文本
ueditor
:
{
value
:
""
,
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
800
,
autoHeightEnabled
:
true
,
enableContextMenu
:
false
}
}
}
},
mounted
()
{
if
(
this
.
$route
.
query
.
Id
){
this
.
msg
.
Id
=
parseInt
(
this
.
$route
.
query
.
Id
)
this
.
getDetail
()
}
},
methods
:
{
goBack
(){
this
.
$router
.
go
(
-
1
)
}
,
// 富文本
setVal
(
val
)
{
this
.
msg
.
Summary
=
val
;
this
.
ueditor
.
value
=
decodeURIComponent
(
val
);
},
save
(){
this
.
apipostDS
(
"/api/Education/UpdateSummaryActivityModule"
,
this
.
msg
,(
res
)
=>
{
if
(
res
.
data
.
resultCode
===
1
){
this
.
Success
(
res
.
data
.
message
)
this
.
goBack
()
}
})
},
getDetail
(){
this
.
apipostDS
(
"/api/Education/GetActivity"
,{
Id
:
this
.
msg
.
Id
},(
res
)
=>
{
if
(
res
.
data
.
resultCode
===
1
){
this
.
msg
.
Summary
=
res
.
data
.
data
.
Summary
this
.
setVal
(
res
.
data
.
data
.
Summary
);
}
})
},
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/
sale
/activeType.vue
→
src/pages/
activity
/activeType.vue
View file @
d9abab24
...
@@ -158,7 +158,7 @@
...
@@ -158,7 +158,7 @@
<q-btn
flat
size=
"xs"
icon=
"edit"
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"editQuotation(props.row)"
/>
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"editQuotation(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"删除"
@
click=
""
/>
color=
"accent"
style=
"font-weight:400"
label=
"删除"
@
click=
"
delType(props.row)
"
/>
</div>
</div>
</q-td>
</q-td>
</
template
>
</
template
>
...
@@ -175,7 +175,7 @@
...
@@ -175,7 +175,7 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
ActiveTypeForm
from
'../../components/
sale/active
/activeType-from'
import
ActiveTypeForm
from
'../../components/
activity
/activeType-from'
export
default
{
export
default
{
meta
:
{
meta
:
{
title
:
"活动类型"
title
:
"活动类型"
...
@@ -185,7 +185,6 @@ import ActiveTypeForm from '../../components/sale/active/activeType-from'
...
@@ -185,7 +185,6 @@ import ActiveTypeForm from '../../components/sale/active/activeType-from'
},
},
data
()
{
data
()
{
return
{
return
{
currentUrl
:
""
,
data
:
[],
data
:
[],
loading
:
true
,
loading
:
true
,
msg
:
{
msg
:
{
...
@@ -223,62 +222,59 @@ import ActiveTypeForm from '../../components/sale/active/activeType-from'
...
@@ -223,62 +222,59 @@ import ActiveTypeForm from '../../components/sale/active/activeType-from'
align
:
"left"
align
:
"left"
}
}
],
],
//-----------
showOrderForm
:
false
,
//是否显示转订单表单
commonId
:
0
,
showEditPrice
:
false
,
//是否显示改价表单
isShowviewQuo
:
false
,
rId
:
0
,
isShowUpPrice
:
false
,
showStudyForm
:
false
,
//是否显示留学就业报价单
uppriceMsg
:
{
Id
:
0
,
ApplyReason
:
''
},
//-----------
showForm
:
false
,
showForm
:
false
,
typeObj
:{}
typeObj
:{}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
currentUrl
=
this
.
$route
.
path
;
// this.msg.CreateBy = this.getLocalStorage().Id;
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
getList
(){
getList
(){
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
apipostDS
(
"/api/Education/GetActivityTypePage"
,
this
.
msg
,(
res
)
=>
{
this
.
apipostDS
(
"/api/Education/GetActivityTypePage"
,
this
.
msg
,(
res
)
=>
{
this
.
loading
=
false
this
.
loading
=
false
if
(
res
.
data
.
resultCode
===
1
){
this
.
data
=
res
.
data
.
data
.
pageData
;
this
.
data
=
res
.
data
.
data
.
pageData
;
this
.
pageCount
=
res
.
data
.
data
.
pageCount
;
this
.
pageCount
=
res
.
data
.
data
.
pageCount
;
}
console
.
log
(
254
,
this
.
data
,
this
.
pageCount
)
console
.
log
(
257
,
res
)
})
})
},
},
delType
(
item
){
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipostDS
(
"/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
);
}
},
);
})
},
//刷新页面
//刷新页面
refreshPage
()
{
refreshPage
()
{
this
.
showForm
=
false
;
this
.
showForm
=
false
;
this
.
getList
();
this
.
getList
();
},
},
// gotoDetails(item) {
// // this.rId = item.Id;
// // this.isShowviewQuo = true;
// this.OpenNewUrl("/sale/quotation", {
// Id: item.Id
// });
// },
//显示修改
//显示修改
editQuotation
(
item
)
{
editQuotation
(
item
)
{
this
.
showForm
=
true
;
if
(
item
)
{
if
(
item
)
{
this
.
showForm
=
true
;
this
.
typeObj
=
item
;
this
.
typeObj
=
item
;
}
else
{
this
.
typeObj
=
{};
}
}
},
},
//重新查询
//重新查询
resetSearch
()
{
resetSearch
()
{
...
@@ -294,6 +290,7 @@ import ActiveTypeForm from '../../components/sale/active/activeType-from'
...
@@ -294,6 +290,7 @@ import ActiveTypeForm from '../../components/sale/active/activeType-from'
closeruleset
()
{
closeruleset
()
{
this
.
showForm
=
false
;
this
.
showForm
=
false
;
},
},
}
}
}
}
...
...
src/pages/activity/activityList.vue
0 → 100644
View file @
d9abab24
<
style
>
li
{
list-style-type
:
none
;
}
.activeType
ul
{
padding
:
0px
;
}
.activeType
li
{
background
:
rgba
(
221
,
222
,
224
,
0.2
);
border-radius
:
4px
;
margin-top
:
15px
;
}
.activeType
li
.dline
{
display
:
table
;
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
}
.activeType
li
.d1
,
.activeType
li
.d2
,
.activeType
li
.d3
,
.activeType
li
.d4
,
.activeType
li
.d5
{
width
:
18%
;
padding
:
20px
20px
10px
;
}
.activeType
li
.d7
{
flex
:
1
;
width
:
1px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
}
.activeType
li
.d1
.di-title
{
font-size
:
16px
;
color
:
#111111
;
}
.activeType
li
.d1
.di-c
{
font-size
:
14px
;
display
:
flex
;
line-height
:
28px
;
color
:
#111111
;
}
.activeType
li
.d6
{
padding
:
10px
20px
;
width
:
100%
;
height
:
inherit
;
position
:
relative
;
border-top
:
1px
solid
#dddee0
;
}
.activeType
li
.d6
.progress
{
width
:
100%
;
height
:
5px
;
position
:
absolute
;
left
:
0
;
bottom
:
0
;
}
.activeType
li
.d2
div
{
margin
:
2px
0
;
font-size
:
14px
;
color
:
#111111
;
}
.activeType
li
.d2-n
{
font-size
:
12px
;
color
:
#999999
;
margin-right
:
20px
;
}
.activeType
li
.d3
.d3-s
{
color
:
var
(
--q-color-negative
);
font-weight
:
bold
;
}
.activeType
li
.d3
div
{
margin
:
2px
0
;
font-size
:
14px
;
}
.activeType
li
.d4
div
{
font-size
:
14px
;
color
:
#111111
;
margin
:
2px
0
;
}
.activeType
li
.d5
div
{
font-size
:
14px
;
color
:
#111111
;
margin
:
2px
0
;
}
.activeType
.myCourseNName
{
width
:
25px
;
height
:
25px
;
border-radius
:
50%
;
color
:
#fff
!important
;
text-align
:
center
;
line-height
:
25px
;
background-color
:
#004d40
;
}
.activeType
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
</
style
>
<
template
>
<div
class=
"page-body activeType"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.ActivityName"
label=
"活动名称"
@
clear=
"resetSearch"
maxlength=
"20"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
活动列表
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增"
@
click=
"editQuotation(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-activeName=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"display:flex;align-items:center"
>
<div
class=
"app-image"
:style=
"
{backgroundImage:'url(' + props.row.CoverImg + ')',backgroundSize:'cover'}">
</div>
{{
props
.
row
.
ActivityName
}}
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-ActivityTime=
"props"
>
<q-td
:props=
"props"
>
<div>
<div>
活动时间:
</div>
<div>
{{
props
.
row
.
StartTimeStr
}}
~
{{
props
.
row
.
EndTimeStr
}}
</div>
<div>
报名时间:
</div>
<div>
{{
props
.
row
.
SignStartTimeStr
}}
</div>
<div>
{{
props
.
row
.
SignEndTimeStr
}}
</div>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-AgeAndPeopleNum=
"props"
>
<q-td
:props=
"props"
>
<div>
<div>
{{
props
.
row
.
AgeLimit
==
1
?
'不区分年龄'
:
'区分年龄'
}}
</div>
<div
v-if=
"props.row.AgeLimit==0"
>
范围:
{{
props
.
row
.
StartAge
}}
岁~
{{
props
.
row
.
EndAge
}}
岁
</div>
<div>
报名人数
</div>
<div
v-if=
"props.row.Distinguish ==1"
>
总人数:
{{
props
.
row
.
ManNum
}}
人
</div>
<div
v-if=
"props.row.Distinguish ==0"
>
男性:
{{
props
.
row
.
ManNum
}}
人
<span
style=
"margin-left:10px"
>
女性:
{{
props
.
row
.
WoManNum
}}
人
</span>
</div>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-activePrice=
"props"
>
<q-td
:props=
"props"
>
<div>
<div
v-if=
"props.row.IsFree==1"
style=
"color:green;"
>
免费
</div>
<div
v-if=
"props.row.IsFree==2"
style=
"color:red;"
>
现金价格:
{{
props
.
row
.
Price
}}
元
</div>
<div
v-if=
"props.row.IsFree==2"
style=
"color:red;"
>
现金点数:
{{
props
.
row
.
PointNum
}}
点
</div>
<div>
报名取消确认:
{{
props
.
row
.
IsCancelConfirm
==
1
?
'是'
:
'否'
}}
</div>
<div>
内部限制:
{{
props
.
row
.
IsCancelConfirm
==
1
?
'是'
:
'否'
}}
</div>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-JoinNum=
"props"
>
<q-td
:props=
"props"
>
<div>
{{
props
.
row
.
JoinNum
}}
人
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<div>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"editQuotation(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"删除"
@
click=
"delActive(props.row)"
/>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left:10px;"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"goUrl('/activity/activeSignUpList',props.row)"
>
<q-item-section>
<q-item-label>
报名列表
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"goUrl('/activity/activeSummary',props.row)"
>
<q-item-section>
<q-item-label>
活动总结
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"goUrl('/activity/materialMan',props.row)"
>
<q-item-section>
<q-item-label>
活动图片与视频
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
>
<q-item-section>
<q-item-label>
活动收支
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</div>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
</q-table>
</div>
<!-- 新增修改活动类型 -->
<ActiveForm
v-if=
"showForm"
@
close=
"closeruleset"
:save-obj=
"typeObj"
:activeTypeOptions=
"activityTypeList"
@
success=
"resetSearch"
>
</ActiveForm>
<!-- 报名信息 -->
<!-- <el-dialog title="报名信息" :visible.sync="dialogTableVisible" width="1100px">
<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="180">
<template slot-scope="scope">
<span v-if="scope.row.PaymentWay==6">星星支付:{{scope.row.TotalPoint}}点</span>
<span v-if="scope.row.PaymentWay==1">现金支付:{{scope.row.Money}}元</span>
</template>
</el-table-column>
<el-table-column property="Remark" label="备注" width="150"></el-table-column>
<el-table-column property="PaymentTime" label="报名时间" width="200"></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
ActiveForm
from
'../../components/activity/active-from'
export
default
{
meta
:
{
title
:
"活动列表"
},
components
:
{
ActiveForm
},
data
()
{
return
{
data
:
[],
loading
:
true
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
ActivityName
:
''
,
},
pageCount
:
0
,
activityTypeList
:[],
columns
:
[{
name
:
"Id"
,
label
:
"编号"
,
field
:
"Id"
,
align
:
"left"
},
{
name
:
"activeName"
,
label
:
"活动名称"
,
align
:
"left"
},
{
name
:
"ActivityTypeName"
,
label
:
"活动类型"
,
align
:
"left"
,
field
:
"ActivityTypeName"
},
{
name
:
"ActivityTime"
,
label
:
"活动时间"
,
align
:
"left"
},
{
name
:
"AgeAndPeopleNum"
,
label
:
"年龄和报名人数"
,
align
:
"left"
},
{
name
:
"activePrice"
,
label
:
"活动费用"
,
align
:
"left"
},
{
name
:
"LocationName"
,
label
:
"位置"
,
field
:
"LocationName"
,
align
:
"left"
},
{
name
:
"activeStutes"
,
label
:
"活动状态"
,
field
:
"ActivityStatusStr"
,
align
:
"left"
},
{
name
:
"JoinNum"
,
label
:
"报名人数"
,
field
:
"JoinNum"
,
align
:
"left"
},
{
name
:
'optioned'
,
label
:
'操作'
,
align
:
"left"
}
],
// //报名列表
// dialogTableVisible: false, //是否显示弹窗
// joinData: [], //报名信息
// joinMsg: {
// LinkMan: '',
// EnrollState: 1,
// ActivityId: 0
// },
// bdMsg: {
// Id: 0, //报名id
// ApplyForCancelStatus: 1, //申请取消审核状态 1同意 2拒绝
// RejectRemark: ''
// },
// showJujue:false,
showForm
:
false
,
typeObj
:{}
}
},
mounted
()
{
this
.
getList
();
this
.
getActiveTypeList
();
},
methods
:
{
// getItem(item) {
// this.joinMsg.ActivityId = item.Id;
// this.getJoinData();
// },
//确定
// agreeApply(item) {
// this.bdMsg.Id = item.Id;
// this.bdMsg.ApplyForCancelStatus = 1;
// this.apipostDS("/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.apipostDS("/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);
// }
// })
// },
//获取活动类型下拉
getActiveTypeList
(){
this
.
apipostDS
(
"/api/Education/GetCommerceActivityTypeList"
,{},(
res
)
=>
{
if
(
res
.
data
.
resultCode
===
1
){
this
.
activityTypeList
=
res
.
data
.
data
;
this
.
activityTypeList
.
unshift
({
Id
:
-
1
,
TypeName
:
"不限"
})
}
})
},
getList
(){
this
.
loading
=
true
;
this
.
apipostDS
(
"/api/Education/GetActivityPage"
,
this
.
msg
,(
res
)
=>
{
this
.
loading
=
false
if
(
res
.
data
.
resultCode
===
1
){
this
.
data
=
res
.
data
.
data
.
pageData
;
this
.
pageCount
=
res
.
data
.
data
.
pageCount
;
}
console
.
log
(
257
,
res
)
})
},
delActive
(
item
){
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipostDS
(
"/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
);
}
},
);
})
},
//刷新页面
refreshPage
()
{
this
.
showForm
=
false
;
this
.
getList
();
},
//显示修改
editQuotation
(
item
)
{
this
.
showForm
=
true
;
if
(
item
)
{
this
.
typeObj
=
item
;
}
else
{
this
.
typeObj
=
{};
}
},
//重新查询
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
()
},
//关闭弹窗
closeruleset
()
{
this
.
showForm
=
false
;
},
goUrl
(
url
,
item
){
this
.
$router
.
push
({
path
:
url
,
query
:{
Id
:
item
.
Id
}
})
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/activity/materialMan.vue
0 → 100644
View file @
d9abab24
<
template
>
<div
class=
"ChooseImg materialMan page-body"
>
<div
v-loading=
"loading"
style=
"margin-top:10px;background:#fff;padding:20px"
>
<div
class=
"TabDiv"
>
<span
:class=
"commonType==1?'spanActive':''"
@
click=
"handleClick(1)"
>
图片
</span>
<span
:class=
"commonType==2?'spanActive':''"
@
click=
"handleClick(2)"
>
视频
</span>
<!--
<span
:class=
"commonType==3?'spanActive':''"
@
click=
"handleClick(3)"
>
其他
</span>
-->
</div>
<div>
<div
style=
"height: 718px;display:flex;"
flex=
"box:first"
>
<div
style=
"margin-right: 15px;width: auto;-webkit-box-flex: 0;flex-shrink: 0;flex-grow: 0;"
>
<el-button
@
click=
"addGroup"
style=
"margin-bottom: 12px;"
type=
"primary"
size=
"small"
>
添加分组
</el-button>
<div
style=
"border: 1px solid rgb(227, 227, 227);width:250px"
>
<div
class=
"el-scrollbar"
style=
"width: 100%;height:670px;"
>
<div
class=
"el-scrollbar__wrap"
style=
"margin-bottom: -8px; margin-right: -8px;"
>
<div
class=
"el-scrollbar__view"
>
<li
:class=
"PageMsg.GroupId==0?'selectActive' : ''"
@
click=
"SelectGroup(0)"
class=
"el-menu-item"
style=
"padding-left: 10px;padding-right: 10px;"
>
<i
class=
"el-icon-tickets"
></i>
<span>
全部
</span>
</li>
<li
:class=
"PageMsg.GroupId==item.Id?'selectActive' : ''"
@
click=
"SelectGroup(item.Id)"
v-for=
"(item,index) in groupList"
:key=
"index"
class=
"el-menu-item"
style=
"padding-left: 10px;padding-right: 10px;"
>
<div
flex=
"dir:left box:last"
>
<el-col
:span=
"18"
style=
"overflow: hidden; text-overflow: ellipsis;"
>
<i
class=
"el-icon-tickets"
></i>
<span>
{{
item
.
Name
}}
</span>
</el-col>
<el-col
class=
"blue"
:span=
"6"
>
<span
v-if=
"scgroupMsg.Recycled==1"
@
click
.
prevent=
"EditGroup(item)"
>
编辑 |
</span>
<span
v-if=
"scgroupMsg.Recycled==2"
@
click
.
prevent=
"HYGroup(item)"
>
还原 |
</span>
<!-- 回收 -->
<span
v-if=
"scgroupMsg.Recycled==1"
@
click
.
prevent=
"HsGroup(item)"
>
删除
</span>
<!--回收站删除 -->
<span
v-if=
"scgroupMsg.Recycled==2"
@
click
.
prevent=
"DeleteGroup(item)"
>
删除
</span>
</el-col>
</div>
</li>
</div>
</div>
</div>
</div>
</div>
<div
flex=
"dir:top"
class=
"box"
>
<div>
<div
class=
"basefix"
style=
"margin-bottom:12px"
>
<span>
全部
</span>
<div
style=
"display:inline-block;float:right"
>
<div
style=
"margin-left: 20px;display:inline-block;"
class=
"appendInput"
>
<el-input
@
keyup
.
enter
.
native=
"GetPageList()"
size=
"small"
style=
"width:250px"
placeholder=
"请输入内容"
v-model=
"PageMsg.Name"
>
<el-button
@
click=
"GetPageList"
slot=
"append"
icon=
"el-icon-search"
></el-button>
</el-input>
</div>
<el-checkbox
style=
"margin-left:12px"
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"CheckAllChange"
>
全选
</el-checkbox>
<el-button
v-if=
"PageMsg.Recycled==1"
@
click=
"HsPage"
style=
"margin:0 12px"
size=
"small"
>
删除
</el-button>
<el-button
v-if=
"PageMsg.Recycled==2"
@
click=
"HYPage"
style=
"margin-left:12px"
size=
"small"
>
还原
</el-button>
<el-button
v-if=
"PageMsg.Recycled==2"
@
click=
"DeletePage"
size=
"small"
>
删除
</el-button>
<el-dropdown
v-if=
"scgroupMsg.Recycled==1"
size=
"small"
split-button
>
移动至
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
v-for=
"(item,index) in groupList"
:key=
"index"
>
<div
@
click=
"SelectPageId(item)"
>
{{
item
.
Name
}}
</div>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
<div
style=
"border: 1px solid rgb(227, 227, 227);height:674px;overflow: scroll;width:100%"
>
<div
class=
"basefix app-attachment-list"
>
<template
v-if=
"PageMsg.Type==1"
>
<div
class=
"material-item material-upload"
>
<el-upload
class=
"avatar-uploader"
action=
""
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
:http-request=
"UploadImage"
multiple
>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width: 140px; height: 140px;"
>
<i
class=
"el-icon-upload"
></i>
</div>
</el-upload>
</div>
<el-tooltip
v-for=
"(item,index) in PageList"
:key=
"index"
class=
"item"
effect=
"dark"
:content=
"item.Name"
placement=
"top-start"
>
<div
@
click=
"PageSelect(item,index)"
:class=
"item.Selected ? 'selected' :''"
class=
"el-tooltip item material-item "
>
<img
:src=
"getIconLink(item.Path)"
class=
"material-img"
style=
"width: 140px; height: 140px;"
>
<div
flex=
"dir:left"
style=
"margin-top: 5px;"
>
<div
class=
"material-name"
>
{{
item
.
Name
}}
</div>
<div
style=
"margin: 0px 5px;"
>
|
</div>
<div>
<button
type=
"button"
class=
"el-button el-button--text"
style=
"padding: 0px;"
>
<span
@
click=
"EditPage(item)"
>
编辑
</span>
</button>
</div>
</div>
</div>
</el-tooltip>
</
template
>
<
template
v-if=
"PageMsg.Type==2"
>
<div
class=
"material-item material-upload"
>
<el-upload
class=
"avatar-uploader"
action=
""
:before-upload=
"beforeAvatarUpload"
accept=
"video/mp4,video/ogg,video/webm"
:show-file-list=
"false"
:http-request=
"UploadVideo"
multiple
>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width: 140px; height: 140px;"
>
<i
class=
"el-icon-upload"
></i>
</div>
</el-upload>
</div>
<el-tooltip
v-for=
"(item,index) in PageList"
:key=
"index"
class=
"item"
effect=
"dark"
:content=
"item.Name"
placement=
"top-start"
>
<div
@
click=
"PageSelect(item,index)"
:class=
"item.Selected ? 'selected' :''"
class=
"el-tooltip item material-item "
>
<img
:src=
"getIconLink(item.Image)"
class=
"material-img"
style=
"width: 140px; height: 140px;"
>
<div
class=
"material-video-info"
><i
class=
"el-icon-video-play"
></i>
<span>
{{
Time
(
item
.
VideoTime
)
}}
</span></div>
<div
flex=
"dir:left"
style=
"margin-top: 5px;"
>
<div
class=
"material-name"
>
{{
item
.
Name
}}
</div>
<div
style=
"margin: 0px 5px;"
>
|
</div>
<div>
<button
type=
"button"
class=
"el-button el-button--text"
style=
"padding: 0px;"
>
<span
@
click=
"EditPage(item)"
>
编辑
</span>
</button>
</div>
</div>
</div>
</el-tooltip>
</
template
>
<
template
v-if=
"PageMsg.Type==3"
>
<div
class=
"material-item material-upload"
>
<el-upload
class=
"avatar-uploader"
action=
""
accept=
".pdf,.PDF,.ppt,.PPT,.doc,.docx"
:show-file-list=
"false"
:http-request=
"UploadpdfFile"
multiple
>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width: 140px; height: 140px;"
>
<i
class=
"el-icon-upload"
></i>
</div>
</el-upload>
</div>
<el-tooltip
v-for=
"(item,index) in PageList"
:key=
"index"
class=
"item"
effect=
"dark"
:content=
"item.Name"
placement=
"top-start"
>
<div
@
click=
"PageSelect(item,index)"
:class=
"item.Selected ? 'selected' :''"
class=
"el-tooltip item material-item "
>
<div
class=
"mater_MyFileType"
v-if=
"getFileType(item.Name)==1"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/WORD.png"
alt=
""
>
</div>
<div
class=
"mater_MyFileType"
v-if=
"getFileType(item.Name)==2"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/PPT.png"
alt=
""
>
</div>
<div
class=
"mater_MyFileType"
v-if=
"getFileType(item.Name)==3"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/pdf.png"
alt=
""
>
</div>
<div
flex=
"dir:left"
style=
"margin-top: 5px;"
>
<div
class=
"material-name"
>
{{
item
.
Name
}}
</div>
<div
style=
"margin: 0px 5px;"
>
|
</div>
<div>
<button
type=
"button"
class=
"el-button el-button--text"
style=
"padding: 0px;"
>
<span
@
click=
"EditPage(item)"
>
编辑
</span>
</button>
</div>
</div>
</div>
</el-tooltip>
</
template
>
</div>
</div>
<div
style=
"padding-top:10px;float:right"
>
<el-pagination
style=
"text-align:right width:100%"
background
:current-page=
"currentPage4"
@
current-change=
"handleCurrentChange"
:page-size=
"PageMsg.pageSize"
layout=
"prev, pager, next,jumper"
:total=
"total"
>
</el-pagination>
</div>
</div>
</div>
</div>
</div>
<video
style=
"display:none;"
controls=
"controls"
id=
"aa"
oncanplaythrough=
"myFunction(this)"
>
</video>
</div>
<!-- 新增分组 -->
<el-dialog
title=
"分组管理"
:visible
.
sync=
"addGroupMsgDig"
width=
"400px"
>
<el-form
:model=
"addGroupMsg"
:rules=
"addGroupMsgrules"
ref=
"addGroupMsg"
label-width=
"100px"
>
<el-form-item
label=
"分组名称"
prop=
"Name"
>
<el-input
size=
"small"
type=
"text"
placeholder=
"请输入内容"
v-model=
"addGroupMsg.Name"
maxlength=
"8"
show-word-limit
>
</el-input>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"Sort"
>
<el-input
@
keyup
.
native=
"checkInteger(addGroupMsg,'Sort')"
size=
"small"
v-model=
"addGroupMsg.Sort"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"addGroupMsgDig = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"GroupsubmitForm('addGroupMsg')"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 修改素材 -->
<el-dialog
title=
"图片名称修改"
:visible
.
sync=
"pageMsgDig"
width=
"400px"
>
<el-form
:model=
"addpageMsg"
:rules=
"addpageMsg"
ref=
"addpageMsg"
label-width=
"100px"
>
<el-form-item
label=
"图片名称"
prop=
"Name"
>
<el-input
size=
"small"
type=
"text"
placeholder=
"请输入内容"
v-model=
"addpageMsg.Name"
>
</el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"pageMsgDig = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"pagesubmitForm('addpageMsg')"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
name
:
'ChooseImg'
,
data
()
{
return
{
loading
:
false
,
commonType
:
1
,
activeName
:
'first'
,
val
:
''
,
Id
:
''
,
currentPage4
:
1
,
scgroupMsg
:
{
Id
:
0
,
Name
:
''
,
Type
:
1
,
Recycled
:
1
,
},
isIndeterminate
:
false
,
groupList
:
[],
addGroupMsg
:
{
Id
:
0
,
Name
:
''
,
Type
:
''
,
Sort
:
''
,
},
addGroupMsgrules
:
{
Name
:
[{
required
:
true
,
message
:
'请填写分组名称'
,
trigger
:
'blur'
}],
Sort
:
[{
required
:
true
,
message
:
'请填写排序'
,
trigger
:
'blur'
}],
},
addGroupMsgDig
:
false
,
PageMsg
:
{
Id
:
0
,
Name
:
''
,
Type
:
1
,
Recycled
:
1
,
pageIndex
:
1
,
pageSize
:
20
,
GroupId
:
0
,
},
PageList
:
[],
total
:
0
,
addpageMsg
:
{
Id
:
0
,
Name
:
''
,
Type
:
1
,
GroupId
:
0
,
Path
:
''
,
Image
:
''
,
VideoTime
:
0
,
WithHeight
:
0
,
PathType
:
0
},
pageMsgDig
:
false
,
checkList
:
[],
checkAllList
:
[],
checkAll
:
false
,
imgSrc
:
""
}
},
created
()
{
this
.
GetMemberGradeList
();
this
.
GetPageList
();
localStorage
.
removeItem
(
"uploadInfo"
);
//获取上传配置
this
.
getUpConfig
();
},
mounted
()
{
},
methods
:
{
//登录后获取上传配置
getUpConfig
(){
this
.
apipostDS
(
"/api/MallBase/GetDefaultFileStore"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
var
upData
=
res
.
data
.
data
;
localStorage
.
uploadInfo
=
JSON
.
stringify
(
upData
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
Time
(
value
)
{
var
theTime
=
parseInt
(
value
);
// 秒
var
middle
=
0
;
// 分
var
hour
=
0
;
// 小时
if
(
theTime
>
60
)
{
middle
=
parseInt
(
theTime
/
60
);
theTime
=
parseInt
(
theTime
%
60
);
if
(
middle
>
60
)
{
hour
=
parseInt
(
middle
/
60
);
middle
=
parseInt
(
middle
%
60
);
}
}
var
result
=
""
+
parseInt
(
theTime
);
if
(
theTime
<
10
)
{
result
=
"0"
+
parseInt
(
theTime
);
}
if
(
middle
>
0
)
{
result
=
""
+
parseInt
(
middle
)
+
":"
+
result
;
}
else
{
result
=
"00:"
+
result
;
}
if
(
hour
>
0
)
{
result
=
""
+
parseInt
(
hour
)
+
"小时"
+
result
;
}
return
result
;
},
SelectPageId
(
item
)
{
this
.
PageList
.
forEach
(
item
=>
{
if
(
item
.
Selected
)
{
this
.
checkList
.
push
(
item
.
Id
)
}
})
if
(
this
.
checkList
.
length
==
0
)
{
this
.
Error
(
"至少选择一项!"
);
return
;
}
let
MaterialIds
=
this
.
checkList
.
join
(
","
);
let
msg
=
{
MaterialIds
:
MaterialIds
,
GroupId
:
item
.
Id
,
Type
:
this
.
commonType
}
this
.
apipostDS
(
"/api/product/SetMaterialInfoTransfer"
,
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
GetPageList
();
this
.
checkList
=
[];
}
})
},
// 全选
CheckAllChange
(
val
)
{
this
.
PageList
.
forEach
(
item
=>
{
if
(
val
)
{
item
.
Selected
=
true
;
}
else
{
item
.
Selected
=
false
;
}
})
},
// 删除
DeletePage
()
{
this
.
checkList
=
[];
this
.
PageList
.
forEach
(
item
=>
{
if
(
item
.
Selected
)
{
this
.
checkList
.
push
(
item
.
Id
)
}
})
if
(
this
.
checkList
.
length
==
0
)
{
this
.
Error
(
"至少选择一项!"
);
return
;
}
let
MaterialIds
=
this
.
checkList
.
join
(
","
);
this
.
loading
=
true
;
this
.
apipostDS
(
"/api/product/DelMaterialInfo"
,
{
MaterialIds
:
MaterialIds
},
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
GetPageList
();
this
.
checkList
=
[];
}
})
},
// 还原
HYPage
()
{
this
.
checkList
=
[];
this
.
PageList
.
forEach
(
item
=>
{
if
(
item
.
Selected
)
{
this
.
checkList
.
push
(
item
.
Id
)
}
})
if
(
this
.
checkList
.
length
==
0
)
{
this
.
Error
(
"至少选择一项!"
);
return
;
}
let
MaterialIds
=
this
.
checkList
.
join
(
","
);
this
.
loading
=
true
;
this
.
apipostDS
(
"/api/product/SetMaterialInfoRestore"
,
{
MaterialIds
:
MaterialIds
},
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
GetPageList
();
this
.
checkList
=
[];
}
})
},
// 回收
HsPage
()
{
this
.
checkList
=
[];
this
.
PageList
.
forEach
(
item
=>
{
if
(
item
.
Selected
)
{
this
.
checkList
.
push
(
item
.
Id
)
}
})
if
(
this
.
checkList
.
length
==
0
)
{
this
.
Error
(
"至少选择一项!"
);
return
;
}
let
MaterialIds
=
this
.
checkList
.
join
(
","
);
this
.
loading
=
true
;
this
.
apipostDS
(
"/api/product/SetMaterialInfoRecycled"
,
{
MaterialIds
:
MaterialIds
},
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
GetPageList
();
this
.
checkList
=
[];
}
})
},
// 单个删除
PageSelect
(
item
,
index
)
{
item
.
Selected
=
!
item
.
Selected
;
},
// 数组去重
unique
(
arr
)
{
return
arr
.
filter
(
function
(
item
,
index
,
arr
)
{
//当前元素,在原始数组中的第一个索引==当前索引值,否则返回当前元素
return
arr
.
indexOf
(
item
,
0
)
===
index
;
});
},
SelectGroup
(
id
)
{
this
.
PageMsg
.
GroupId
=
id
;
this
.
addpageMsg
.
GroupId
=
id
;
this
.
GetPageList
();
},
EditPage
(
item
)
{
this
.
pageMsgDig
=
true
;
this
.
addpageMsg
=
{
Id
:
item
.
Id
,
Name
:
item
.
Name
,
Type
:
item
.
Type
,
GroupId
:
item
.
GroupId
,
Path
:
item
.
Path
,
Image
:
item
.
Image
,
VideoTime
:
item
.
VideoTime
,
WithHeight
:
item
.
WithHeight
,
}
},
pagesubmitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
apipostDS
(
'/api/product/SetGetMaterialInfo'
,
this
.
addpageMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
GetPageList
();
this
.
Success
(
res
.
data
.
message
)
this
.
pageMsgDig
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}
else
{
return
false
;
}
});
},
beforeAvatarUpload
(
file
)
{
this
.
getTimes
(
file
);
//
},
getTimes
(
file
)
{
//获取时长
var
content
=
file
;
var
url
=
URL
.
createObjectURL
(
content
);
//经测试,发现audio也可获取视频的时长
var
audioElement
=
new
Audio
(
url
);
audioElement
.
addEventListener
(
"loadedmetadata"
,
(
_event
)
=>
{
this
.
audioDuration
=
parseInt
(
audioElement
.
duration
);
this
.
addpageMsg
.
VideoTime
=
this
.
audioDuration
;
});
},
UploadImage
(
file
)
{
this
.
UploadFileToTencent
(
this
.
FileType
().
GoodsImg
,
file
.
file
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
this
.
addpageMsg
.
Type
==
2
)
{
this
.
addpageMsg
.
Image
=
res
.
FileUrl
;
}
this
.
addpageMsg
.
Path
=
res
.
FileUrl
;
this
.
addpageMsg
.
Name
=
res
.
FileName
;
this
.
addPageList
();
}
})
},
//上传视频
UploadVideo
(
file
)
{
var
that
=
this
;
this
.
UploadSelfFile
(
this
.
FileType
().
Video
,
file
.
file
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
that
.
addpageMsg
.
Image
=
res
.
VideoCoverImg
;
that
.
addpageMsg
.
Path
=
res
.
FileUrl
;
that
.
addpageMsg
.
Name
=
res
.
FileName
;
that
.
addPageList
();
that
.
$forceUpdate
();
}
})
},
//上传附件doc docx pdf ppt pptx
UploadpdfFile
(
file
)
{
var
that
=
this
;
var
flieType
=
file
.
file
.
name
.
split
(
'.'
)[
1
];
if
(
flieType
!=
'doc'
&&
flieType
!=
'docx'
&&
flieType
!=
'pdf'
&&
flieType
!=
'ppt'
&&
flieType
!=
'pptx'
)
{
this
.
Error
(
'请上传word ppt pdf文件'
);
return
;
}
this
.
UploadFileToTencent
(
this
.
FileType
().
GoodsImg
,
file
.
file
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
that
.
addpageMsg
.
Image
=
res
.
VideoCoverImg
;
that
.
addpageMsg
.
Path
=
res
.
FileUrl
;
that
.
addpageMsg
.
Name
=
res
.
FileName
;
that
.
addPageList
();
that
.
$forceUpdate
();
}
})
},
// 新增素材信息
addPageList
()
{
var
upInfo
=
JSON
.
parse
(
localStorage
.
uploadInfo
);
if
(
upInfo
){
this
.
addpageMsg
.
PathType
=
upInfo
.
StoreType
;
}
this
.
apipostDS
(
"/api/product/SetGetMaterialInfo"
,
this
.
addpageMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
GetPageList
();
this
.
$forceUpdate
();
}
})
},
SelectRecycled
(
num
)
{
this
.
scgroupMsg
.
Recycled
=
num
;
this
.
PageMsg
.
Recycled
=
num
;
this
.
GetMemberGradeList
();
this
.
GetPageList
();
},
EditGroup
(
item
)
{
this
.
addGroupMsgDig
=
true
;
this
.
addGroupMsg
=
{
Id
:
item
.
Id
,
Name
:
item
.
Name
,
Type
:
item
.
Type
,
Sort
:
item
.
Sort
,
}
},
HYGroup
(
item
)
{
let
that
=
this
;
that
.
$confirm
(
'是否还原?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipostDS
(
'/api/product/SetMaterialGroupRestore'
,
{
GroupId
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
GetMemberGradeList
();
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}).
catch
(()
=>
{});
},
HsGroup
(
item
)
{
let
that
=
this
;
that
.
$confirm
(
'是否删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipostDS
(
'/api/product/SetMaterialGroupRecycled'
,
{
GroupId
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
GetMemberGradeList
();
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}).
catch
(()
=>
{});
},
DeleteGroup
(
item
)
{
let
that
=
this
;
that
.
$confirm
(
'是否删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipostDS
(
'/api/product/DelMaterialGroupInfo'
,
{
GroupId
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
GetMemberGradeList
();
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}).
catch
(()
=>
{});
},
addGroup
()
{
this
.
addGroupMsgDig
=
true
;
this
.
addGroupMsg
=
{
Id
:
0
,
Name
:
''
,
Type
:
this
.
commonType
,
Sort
:
''
,
}
},
GroupsubmitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
apipostDS
(
'/api/product/SetMaterialGroupInfo'
,
this
.
addGroupMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
GetMemberGradeList
();
this
.
Success
(
res
.
data
.
message
)
this
.
addGroupMsgDig
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}
else
{
return
false
;
}
});
},
GetMemberGradeList
()
{
this
.
loading
=
true
;
this
.
apipostDS
(
"/api/product/GetMaterialGroupList"
,
this
.
scgroupMsg
,
res
=>
{
this
.
loading
=
false
;
this
.
groupList
=
res
.
data
.
data
;
})
},
GetPageList
()
{
this
.
loading
=
true
;
this
.
PageList
=
[];
this
.
apipostDS
(
"/api/product/GetMaterialInfoPageList"
,
this
.
PageMsg
,
res
=>
{
this
.
loading
=
false
;
this
.
total
=
res
.
data
.
data
.
count
;
let
data
=
res
.
data
.
data
.
pageData
;
this
.
checkAllList
=
[];
data
.
forEach
(
item
=>
{
this
.
checkAllList
.
push
(
item
.
Id
)
item
.
Selected
=
false
;
})
this
.
PageList
=
data
;
this
.
$forceUpdate
();
})
},
handleClick
(
val
)
{
this
.
commonType
=
val
;
this
.
scgroupMsg
.
Type
=
val
;
this
.
PageMsg
.
Type
=
val
;
this
.
addpageMsg
.
Type
=
val
;
this
.
GetMemberGradeList
();
this
.
GetPageList
();
},
handleCurrentChange
(
val
)
{
this
.
PageMsg
.
pageIndex
=
val
;
this
.
GetPageList
();
},
//拆分后缀
getFileType
(
item
)
{
var
num
=
0
;
if
(
item
)
{
var
name
=
item
.
split
(
'.'
)[
1
]
}
if
(
name
==
'doc'
||
name
==
'docx'
)
{
num
=
1
}
if
(
name
==
'ppt'
||
name
==
'pptx'
)
{
num
=
2
}
if
(
name
==
'pdf'
)
{
num
=
3
}
return
num
;
}
},
}
</
script
>
<
style
>
.materialMan
.material-video-info
{
background
:
rgba
(
0
,
0
,
0
,
.35
);
color
:
#fff
;
position
:
absolute
;
left
:
10px
;
bottom
:
31px
;
padding
:
1px
3px
;
font-size
:
14px
;
}
.materialMan
.TabDiv
.spanActive
{
border-bottom
:
2px
solid
#409EFF
;
color
:
#409EFF
;
}
.materialMan
.TabDiv
span
{
font-size
:
14px
;
margin-right
:
20px
;
display
:
inline-block
;
height
:
100%
;
cursor
:
pointer
;
}
.materialMan
.TabDiv
{
height
:
40px
;
line-height
:
40px
;
border-bottom
:
2px
solid
#f3f3f3
;
margin-bottom
:
20px
;
}
.materialMan
.selectActive
.el-icon-tickets
{
color
:
#409EFF
;
}
.materialMan
.selectActive
{
color
:
#409EFF
;
}
.materialMan
.material-name
{
color
:
#666666
;
font-size
:
13px
;
margin-top
:
0px
;
margin-right
:
auto
;
word-break
:
break-all
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
1
;
overflow
:
hidden
;
}
.materialMan
.material-item.checked
,
.material-item.selected
{
box-shadow
:
0
0
0
1px
#1ed0ff
;
background
:
#daf5ff
;
border-radius
:
5px
;
}
.materialMan
.material-upload
i
{
font-size
:
30px
;
color
:
#909399
;
}
.materialMan
.material-item
{
display
:
inline-block
;
cursor
:
pointer
;
position
:
relative
;
float
:
left
;
width
:
160px
;
height
:
180px
;
margin
:
7.5px
;
text-align
:
center
;
padding
:
10px
10px
0
;
}
.materialMan
.material-upload
{
box-shadow
:
none
;
border
:
1px
dashed
#b2b6bd
;
height
:
140px
;
width
:
140px
;
margin
:
17.5px
;
padding
:
0
;
}
.ChooseImg
.app-attachment-list
{
padding
:
5px
;
}
.materialMan
.appendInput
.el-input.is-active
.el-input__inner
,
.materialMan
.appendInput
.el-input__inner
:focus
{
border-color
:
#DCDFE6
;
}
.ChooseImg
.appendInput
.el-input__inner
{
border-right
:
none
;
outline
:
none
;
}
.ChooseImg
.appendInput
.el-input-group__append
{
background-color
:
#fff
!important
;
border-left
:
none
;
padding
:
0
15px
;
}
.mater_MyFileType
{
width
:
140px
;
height
:
140px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.mater_MyFileType
img
{
width
:
80%
;
height
:
80%
;
}
</
style
>
src/pages/sale/activityList.vue
deleted
100644 → 0
View file @
a10397e9
src/router/routes.js
View file @
d9abab24
...
@@ -17,6 +17,7 @@ const routes = [{
...
@@ -17,6 +17,7 @@ const routes = [{
component
:
()
=>
component
:
()
=>
import
(
"src/pages/Work.vue"
)
import
(
"src/pages/Work.vue"
)
},
},
{
{
path
:
"/school/manager"
,
path
:
"/school/manager"
,
component
:
()
=>
component
:
()
=>
...
@@ -580,16 +581,6 @@ const routes = [{
...
@@ -580,16 +581,6 @@ const routes = [{
component
:
()
=>
component
:
()
=>
import
(
"pages/sale/studyjob.vue"
)
import
(
"pages/sale/studyjob.vue"
)
},
},
{
path
:
"/sale/activeType"
,
//销售 活动类型
component
:
()
=>
import
(
"pages/sale/activeType.vue"
)
},
{
path
:
"/sale/activityList"
,
//销售 活动列表
component
:
()
=>
import
(
"pages/sale/activityList.vue"
)
},
{
{
path
:
"/sale/courseoffer"
,
//销售 报价单管理
path
:
"/sale/courseoffer"
,
//销售 报价单管理
component
:
()
=>
component
:
()
=>
...
@@ -655,6 +646,31 @@ const routes = [{
...
@@ -655,6 +646,31 @@ const routes = [{
component
:
()
=>
component
:
()
=>
import
(
"pages/sale/visitorRegistrat.vue"
)
import
(
"pages/sale/visitorRegistrat.vue"
)
},
},
{
path
:
"/activity/activeType"
,
//活动 活动类型
component
:
()
=>
import
(
"pages/activity/activeType.vue"
)
},
{
path
:
"/activity/activityList"
,
//活动 活动列表
component
:
()
=>
import
(
"pages/activity/activityList.vue"
)
},
{
path
:
"/activity/activeSignUpList"
,
//活动 活动报名列表
component
:
()
=>
import
(
"pages/activity/activeSignUpList.vue"
)
},
{
path
:
"/activity/activeSummary"
,
//活动 活动总结
component
:
()
=>
import
(
"pages/activity/activeSummary.vue"
)
},
{
path
:
"/activity/materialMan"
,
//活动 活动图片与视频
component
:
()
=>
import
(
"pages/activity/materialMan.vue"
)
},
{
{
path
:
"/course/teacherHours"
,
//教学奖励 教师课时统计
path
:
"/course/teacherHours"
,
//教学奖励 教师课时统计
component
:
()
=>
component
:
()
=>
...
@@ -806,6 +822,7 @@ const routes = [{
...
@@ -806,6 +822,7 @@ const routes = [{
component
:
()
=>
component
:
()
=>
import
(
"pages/classroom/courseInfo"
)
import
(
"pages/classroom/courseInfo"
)
},
},
],
],
},
},
...
...
src/utils/erpindex.js
View file @
d9abab24
...
@@ -389,6 +389,18 @@ export default {
...
@@ -389,6 +389,18 @@ export default {
query
:
queryObj
query
:
queryObj
});
});
window
.
open
(
newUrl
.
href
,
'_blank'
);
window
.
open
(
newUrl
.
href
,
'_blank'
);
},
//公用判断图片地址 判断是否包含http
Vue
.
prototype
.
getIconLink
=
function
(
url
)
{
let
str
=
''
if
(
url
&&
url
!=
''
)
{
if
(
url
.
indexOf
(
'http'
)
!=
-
1
)
{
str
=
url
}
else
{
str
=
this
.
domainManager
().
ImageUrl
+
url
;
}
return
str
;
}
}
}
}
}
}
}
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