Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-task
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit af62255a
authored
Nov 08, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
43f1454d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
24 deletions
src/components/GLEditor/index.vue
src/views/task/addTask/index.vue
src/views/task/taskList/index.vue
src/components/GLEditor/index.vue
View file @
af62255
...
@@ -277,8 +277,8 @@
...
@@ -277,8 +277,8 @@
type=
"file"
type=
"file"
style=
"opacity: 0"
style=
"opacity: 0"
:id=
"item.type + 'file'"
:id=
"item.type + 'file'"
ref=
"file"
ref=
"file
Video
"
class=
"welcome-input"
class=
"welcome-input
upload-video
"
:accept=
"item.accept || 'video/*'"
:accept=
"item.accept || 'video/*'"
@
change=
"(e) => handleVideoChange(e)"
@
change=
"(e) => handleVideoChange(e)"
/>
/>
...
@@ -646,6 +646,7 @@ export default {
...
@@ -646,6 +646,7 @@ export default {
ATT_TYPE
.
VEDIO
ATT_TYPE
.
VEDIO
)
)
}
}
document
.
querySelector
(
'.upload-video'
).
value
=
''
var
reader
=
new
FileReader
()
var
reader
=
new
FileReader
()
reader
.
readAsDataURL
(
file
)
reader
.
readAsDataURL
(
file
)
reader
.
onload
=
(
e
)
=>
{
reader
.
onload
=
(
e
)
=>
{
...
@@ -655,7 +656,6 @@ export default {
...
@@ -655,7 +656,6 @@ export default {
const
fileUrl
=
splitStr
[
splitStr
.
length
-
1
]
+
'@'
+
arrBase64
[
1
]
const
fileUrl
=
splitStr
[
splitStr
.
length
-
1
]
+
'@'
+
arrBase64
[
1
]
// const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
// const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this
.
videoList
.
uploadApi
({
file
:
fileUrl
}).
then
((
res
)
=>
{
this
.
videoList
.
uploadApi
({
file
:
fileUrl
}).
then
((
res
)
=>
{
console
.
log
(
res
)
if
(
res
)
{
if
(
res
)
{
this
.
$notify
({
this
.
$notify
({
title
:
'提示'
,
title
:
'提示'
,
...
@@ -707,7 +707,7 @@ export default {
...
@@ -707,7 +707,7 @@ export default {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
file
=
e
.
srcElement
.
files
[
0
]
let
file
=
e
.
srcElement
.
files
[
0
]
// 默认10MB
// 默认10MB
const
limitSize
=
this
.
videoList
.
limitSize
||
1
0
const
limitSize
=
this
.
videoList
.
limitSize
||
5
0
const
isLt
=
file
.
size
/
1024
/
1024
<
limitSize
const
isLt
=
file
.
size
/
1024
/
1024
<
limitSize
if
(
!
isLt
)
{
if
(
!
isLt
)
{
_this
.
$message
.
error
(
'上传视频大小不能超过'
+
limitSize
+
'MB!'
)
_this
.
$message
.
error
(
'上传视频大小不能超过'
+
limitSize
+
'MB!'
)
...
...
src/views/task/addTask/index.vue
View file @
af62255
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
size=
"small"
size=
"small"
:disabled=
"isEditor"
:disabled=
"isEditor"
>
>
<el-option
label=
"1.3
存量用户众筹
"
:value=
"3"
></el-option>
<el-option
label=
"1.3
售后直播众筹活动
"
:value=
"3"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商户:"
prop=
"merchantId"
>
<el-form-item
label=
"商户:"
prop=
"merchantId"
>
...
@@ -168,13 +168,19 @@
...
@@ -168,13 +168,19 @@
<el-form-item
<el-form-item
:prop=
"'missionList.' + index1 + '.missionMaterialList'"
:prop=
"'missionList.' + index1 + '.missionMaterialList'"
:rules=
"taskFormRules.attachmentList"
:rules=
"taskFormRules.attachmentList"
v-if=
"itm.missonType && itm.missonType
!= 1
"
v-if=
"itm.missonType && itm.missonType
== 2
"
>
>
<label
slot=
"label"
class=
"required"
>
分享素材:
</label>
<label
slot=
"label"
class=
"required"
>
分享素材:
</label>
<GLEditor
<GLEditor
:id=
"'missionList' + itm.id + 'welcome'"
:id=
"
:key=
"'missionList' + itm.id + 'welcome'"
'missionList' + (itm.taskid || itm.id) + 'welcome'
:ref=
"'missionList' + itm.id + 'welcome'"
"
:key=
"
'missionList' + (itm.taskid || itm.id) + 'welcome'
"
:ref=
"
'missionList' + (itm.taskid || itm.id) + 'welcome'
"
:form=
"'customer'"
:form=
"'customer'"
style=
"line-height: 12px"
style=
"line-height: 12px"
:btnList=
"btnList"
:btnList=
"btnList"
...
@@ -230,7 +236,7 @@
...
@@ -230,7 +236,7 @@
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
v-if=
"itm.
rewardType == 2
"
v-if=
"itm.
missonType && itm.missonType != 1
"
label=
"最低指标:"
label=
"最低指标:"
:prop=
"'missionList.' + index1 + '.minTriggerValue'"
:prop=
"'missionList.' + index1 + '.minTriggerValue'"
:rules=
"taskFormRules.minTriggerValue"
:rules=
"taskFormRules.minTriggerValue"
...
@@ -409,7 +415,7 @@ export default {
...
@@ -409,7 +415,7 @@ export default {
name
:
'视频'
,
name
:
'视频'
,
funcName
:
''
,
funcName
:
''
,
type
:
'video'
,
type
:
'video'
,
limitSize
:
10
,
// 限制视频大小
//
limitSize: 10, // 限制视频大小
limitNum
:
1
,
// 限制视频数量
limitNum
:
1
,
// 限制视频数量
uploadApi
:
commonApi
.
uploadImgApi
,
uploadApi
:
commonApi
.
uploadImgApi
,
},
},
...
@@ -431,7 +437,7 @@ export default {
...
@@ -431,7 +437,7 @@ export default {
activityImage
:
''
,
activityImage
:
''
,
// 公共任务类型
// 公共任务类型
basicObj
:
{
basicObj
:
{
id
:
''
,
task
id
:
''
,
missonType
:
''
,
missonType
:
''
,
missionName
:
''
,
missionName
:
''
,
missonDesc
:
''
,
missonDesc
:
''
,
...
@@ -447,7 +453,7 @@ export default {
...
@@ -447,7 +453,7 @@ export default {
},
},
// 浏览指标任务类型
// 浏览指标任务类型
browseObj
:
{
browseObj
:
{
missionMaterialList
:
[],
//
missionMaterialList: [],
rewardType
:
''
,
rewardType
:
''
,
rewardCount
:
''
,
rewardCount
:
''
,
repeatCount
:
''
,
repeatCount
:
''
,
...
@@ -456,14 +462,14 @@ export default {
...
@@ -456,14 +462,14 @@ export default {
},
},
// 访客指标任务类型
// 访客指标任务类型
visitorObj
:
{
visitorObj
:
{
missionMaterialList
:
[],
//
missionMaterialList: [],
rewardType
:
''
,
rewardType
:
''
,
triggerValue
:
''
,
triggerValue
:
''
,
minTriggerValue
:
''
,
minTriggerValue
:
''
,
},
},
// 成单指标任务类型
// 成单指标任务类型
orderObj
:
{
orderObj
:
{
missionMaterialList
:
[],
//
missionMaterialList: [],
rewardType
:
''
,
rewardType
:
''
,
triggerValue
:
''
,
triggerValue
:
''
,
minTriggerValue
:
''
,
minTriggerValue
:
''
,
...
@@ -706,7 +712,7 @@ export default {
...
@@ -706,7 +712,7 @@ export default {
this
.
taskList
[
index
].
missionList
.
unshift
({
this
.
taskList
[
index
].
missionList
.
unshift
({
...
this
.
basicObj
,
...
this
.
basicObj
,
})
})
this
.
taskList
[
index
].
missionList
[
0
].
id
=
this
.
getUuid
()
this
.
taskList
[
index
].
missionList
[
0
].
task
id
=
this
.
getUuid
()
console
.
log
(
this
.
taskList
[
index
].
missionList
[
0
])
console
.
log
(
this
.
taskList
[
index
].
missionList
[
0
])
},
},
// 任务选择类型切换
// 任务选择类型切换
...
@@ -763,7 +769,7 @@ export default {
...
@@ -763,7 +769,7 @@ export default {
}
}
// 沿用任务名称以及id
// 沿用任务名称以及id
taskItem
.
missonType
=
task
.
missonType
taskItem
.
missonType
=
task
.
missonType
taskItem
.
id
=
task
.
id
taskItem
.
taskid
=
task
.
task
id
// 任务类型=浏览、访客、成单时,默认添加活动专属链接
// 任务类型=浏览、访客、成单时,默认添加活动专属链接
if
(
taskItem
.
missonType
!=
1
&&
taskItem
.
missonType
!=
2
)
{
if
(
taskItem
.
missonType
!=
1
&&
taskItem
.
missonType
!=
2
)
{
taskItem
.
linkStatus
=
true
taskItem
.
linkStatus
=
true
...
@@ -778,9 +784,11 @@ export default {
...
@@ -778,9 +784,11 @@ export default {
}
}
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$set
(
this
.
taskList
[
dateTaskIndex
].
missionList
,
taskIndex
,
taskItem
)
this
.
$set
(
this
.
taskList
[
dateTaskIndex
].
missionList
,
taskIndex
,
taskItem
)
var
box
=
document
.
getElementById
(
'missionList'
+
task
.
id
+
'welcome'
)
var
box
=
document
.
getElementById
(
'missionList'
+
task
.
taskid
+
'welcome'
)
if
(
box
)
{
if
(
box
)
{
var
editName
=
'missionList'
+
task
.
id
+
'welcome'
var
editName
=
'missionList'
+
task
.
task
id
+
'welcome'
console
.
log
(
this
.
$refs
[
editName
])
console
.
log
(
this
.
$refs
[
editName
])
this
.
$refs
[
editName
][
0
].
resetItem
()
this
.
$refs
[
editName
][
0
].
resetItem
()
}
}
...
@@ -971,7 +979,7 @@ export default {
...
@@ -971,7 +979,7 @@ export default {
if
(
itm
.
repeatCount
||
itm
.
repeatFlag
)
{
if
(
itm
.
repeatCount
||
itm
.
repeatFlag
)
{
itm
.
repeatCount
=
itm
.
repeatCount
?
itm
.
repeatCount
:
-
1
itm
.
repeatCount
=
itm
.
repeatCount
?
itm
.
repeatCount
:
-
1
}
}
delete
itm
.
id
delete
itm
.
task
id
})
})
})
})
try
{
try
{
...
...
src/views/task/taskList/index.vue
View file @
af62255
...
@@ -59,10 +59,14 @@
...
@@ -59,10 +59,14 @@
:pageConf=
"pageConf"
:pageConf=
"pageConf"
>
>
<div
slot=
"businessScene"
slot-scope=
"scope"
>
<div
slot=
"businessScene"
slot-scope=
"scope"
>
<span
v-if=
"scope.scope.businessScene == 0"
>
1.0新车权益销售
</span>
<span
v-if=
"scope.scope.businessScene == 0"
>
1.0 新车权益升级
</span>
<span
v-if=
"scope.scope.businessScene == 1"
>
1.1次新车精品升级
</span>
<span
v-if=
"scope.scope.businessScene == 1"
>
1.1 新车精品升级
</span>
<span
v-if=
"scope.scope.businessScene == 2"
>
1.2次新车线上转化
</span>
<span
v-if=
"scope.scope.businessScene == 2"
<span
v-if=
"scope.scope.businessScene == 3"
>
1.3存量用户众筹
</span>
>
1.2 次新车膨胀金活动
</span
>
<span
v-if=
"scope.scope.businessScene == 3"
>
1.3 售后直播众筹活动
</span
>
</div>
</div>
<div
slot=
"activityStatus"
slot-scope=
"scope"
>
<div
slot=
"activityStatus"
slot-scope=
"scope"
>
<span
v-if=
"scope.scope.activityStatus == statusNum.UNPUBLISH"
<span
v-if=
"scope.scope.activityStatus == statusNum.UNPUBLISH"
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment