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 305f8095
authored
Dec 05, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
xiugai
1 parent
07262c78
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
19 deletions
src/views/task/addTask/index.vue
src/views/task/addTask/index.vue
View file @
305f809
...
@@ -196,11 +196,7 @@
...
@@ -196,11 +196,7 @@
<el-form-item
<el-form-item
label=
"页面风格:"
label=
"页面风格:"
:rules=
"taskFormRules.textType"
:rules=
"taskFormRules.textType"
v-show=
"
v-show=
"itm.showArticle"
itm.showArticle &&
itm.missonType &&
itm.missonType != 1
"
>
>
<el-radio-group
v-model=
"itm.textType"
>
<el-radio-group
v-model=
"itm.textType"
>
<el-radio
:label=
"1"
>
软文模式
</el-radio>
<el-radio
:label=
"1"
>
软文模式
</el-radio>
...
@@ -210,9 +206,7 @@
...
@@ -210,9 +206,7 @@
<el-form-item
<el-form-item
label=
"文章素材:"
label=
"文章素材:"
:prop=
"'missionList.' + index1 + '.textContent'"
:prop=
"'missionList.' + index1 + '.textContent'"
v-show=
"
v-show=
"itm.showArticle"
itm.showArticle && itm.textType && itm.textType == 1
"
>
>
<!--
<textBox
<!--
<textBox
@
change=
"writeChange"
@
change=
"writeChange"
...
@@ -531,7 +525,7 @@ export default {
...
@@ -531,7 +525,7 @@ export default {
validFlag
:
true
,
validFlag
:
true
,
// 活动图片
// 活动图片
activityImage
:
''
,
activityImage
:
''
,
textId
:
''
,
textId
s
:
[]
,
// 公共任务类型
// 公共任务类型
basicObj
:
{
basicObj
:
{
taskid
:
''
,
taskid
:
''
,
...
@@ -669,8 +663,10 @@ export default {
...
@@ -669,8 +663,10 @@ export default {
methods
:
{
methods
:
{
// 初始化富文本
// 初始化富文本
getTextBox
(
id
,
dateTaskIndex
,
taskIndex
,
textContent
)
{
getTextBox
(
id
,
dateTaskIndex
,
taskIndex
,
textContent
)
{
if
(
this
.
textId
==
id
)
return
// 如果找到了相同的id则直接返回
this
.
textId
=
id
let
textId
=
this
.
textIds
.
findIndex
((
item
)
=>
item
==
id
)
if
(
textId
!=
-
1
)
return
this
.
textIds
.
push
(
id
)
console
.
log
(
id
,
dateTaskIndex
,
taskIndex
)
console
.
log
(
id
,
dateTaskIndex
,
taskIndex
)
let
editor
=
new
E
(
this
.
$refs
[
id
])
let
editor
=
new
E
(
this
.
$refs
[
id
])
console
.
log
(
editor
)
console
.
log
(
editor
)
...
@@ -895,7 +891,7 @@ export default {
...
@@ -895,7 +891,7 @@ export default {
},
},
// 任务选择类型切换
// 任务选择类型切换
selectTaskType
(
dateTask
,
dateTaskIndex
,
task
,
taskIndex
)
{
selectTaskType
(
dateTask
,
dateTaskIndex
,
task
,
taskIndex
)
{
console
.
log
(
dateTaskIndex
,
taskIndex
)
console
.
log
(
dateTaskIndex
,
taskIndex
,
task
)
// dateTask -- 具体哪一天的任务对象
// dateTask -- 具体哪一天的任务对象
// dateTaskIndex -- 具体哪一天的任务对象索引
// dateTaskIndex -- 具体哪一天的任务对象索引
// task -- 具体哪个任务
// task -- 具体哪个任务
...
@@ -941,7 +937,7 @@ export default {
...
@@ -941,7 +937,7 @@ export default {
}
}
// 沿用任务名称以及id
// 沿用任务名称以及id
taskItem
.
missonType
=
task
.
missonType
taskItem
.
missonType
=
task
.
missonType
taskItem
.
taskid
=
task
.
taskid
taskItem
.
taskid
=
task
.
taskid
||
task
.
id
// 任务类型=浏览、访客、成单时,默认添加活动专属链接
// 任务类型=浏览、访客、成单时,默认添加活动专属链接
if
(
taskItem
.
missonType
!=
1
&&
taskItem
.
missonType
!=
2
)
{
if
(
taskItem
.
missonType
!=
1
&&
taskItem
.
missonType
!=
2
)
{
taskItem
.
linkStatus
=
true
taskItem
.
linkStatus
=
true
...
@@ -958,8 +954,8 @@ export default {
...
@@ -958,8 +954,8 @@ export default {
var
editName
=
'missionList'
+
task
.
taskid
+
'welcome'
var
editName
=
'missionList'
+
task
.
taskid
+
'welcome'
this
.
$refs
[
editName
][
0
].
resetItem
()
this
.
$refs
[
editName
][
0
].
resetItem
()
}
}
// let textId = `#id${task.taskid}`
let
textId
=
task
.
taskid
||
task
.
id
this
.
getTextBox
(
t
ask
.
taski
d
,
dateTaskIndex
,
taskIndex
)
this
.
getTextBox
(
t
extI
d
,
dateTaskIndex
,
taskIndex
)
})
})
},
},
// 获取分享素材内容
// 获取分享素材内容
...
@@ -1001,12 +997,14 @@ export default {
...
@@ -1001,12 +997,14 @@ export default {
'showArticle'
,
'showArticle'
,
false
false
)
)
this
.
$forceUpdate
()
}
else
{
}
else
{
this
.
$set
(
this
.
$set
(
this
.
taskList
[
dateTaskIndex
].
missionList
[
taskIndex
],
this
.
taskList
[
dateTaskIndex
].
missionList
[
taskIndex
],
'showArticle'
,
'showArticle'
,
true
true
)
)
this
.
$forceUpdate
()
}
}
console
.
log
(
this
.
taskList
[
dateTaskIndex
].
missionList
[
taskIndex
])
console
.
log
(
this
.
taskList
[
dateTaskIndex
].
missionList
[
taskIndex
])
},
},
...
@@ -1243,12 +1241,13 @@ export default {
...
@@ -1243,12 +1241,13 @@ export default {
itm
.
minTriggerValue
=
1
itm
.
minTriggerValue
=
1
}
}
// 分享模式处理
// 分享模式处理
if
(
itm
.
sharingMethod
)
{
//
if (itm.sharingMethod) {
itm
.
sharingMethod
=
itm
.
sharingMethod
.
toString
()
//
itm.sharingMethod = itm.sharingMethod.toString()
}
//
}
// 页面风格处理
// 页面风格处理
if
(
!
itm
.
showArticle
)
{
if
(
!
itm
.
showArticle
)
{
itm
.
textType
=
2
itm
.
textType
=
2
itm
.
textContent
=
''
}
}
// 自定义uuid删除
// 自定义uuid删除
delete
itm
.
taskid
delete
itm
.
taskid
...
@@ -1275,6 +1274,32 @@ export default {
...
@@ -1275,6 +1274,32 @@ export default {
return
return
}
}
this
.
taskFormEmptyValidate
()
this
.
taskFormEmptyValidate
()
this
.
taskList
.
map
((
item
)
=>
{
item
.
missionList
.
map
((
itm
)
=>
{
// 重复次数处理
// if (itm.repeatCount || itm.repeatFlag) {
// itm.repeatCount = itm.repeatCount ? itm.repeatCount : -1
// }
// 最低指标处理
// if (
// itm.rewardType == 1 &&
// itm.rewardCount == 2 &&
// !itm.minTriggerValue
// ) {
// itm.minTriggerValue = 1
// }
// 分享模式处理
if
(
itm
.
sharingMethod
)
{
itm
.
sharingMethod
=
itm
.
sharingMethod
.
toString
()
}
// 页面风格处理
// if (!itm.showArticle) {
// itm.textType = 2
// }
// 自定义uuid删除
// delete itm.taskid
})
})
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
basicForm
))
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
basicForm
))
params
.
startTime
=
this
.
startTime
params
.
startTime
=
this
.
startTime
params
.
endTime
=
this
.
endTime
params
.
endTime
=
this
.
endTime
...
@@ -1446,7 +1471,7 @@ export default {
...
@@ -1446,7 +1471,7 @@ export default {
left
:
0
;
left
:
0
;
height
:
64px
;
height
:
64px
;
line-height
:
64px
;
line-height
:
64px
;
z-index
:
999
;
z-index
:
999
99
;
}
}
.el-alert
{
.el-alert
{
margin-top
:
10px
;
margin-top
:
10px
;
...
...
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