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 18eef479
authored
Oct 14, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
任务逻辑添加
1 parent
1a6439ca
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
353 additions
and
37 deletions
src/api/commonApi.js
src/api/task.js
src/views/task/addTask/app.js
src/views/task/addTask/components/activityDia.vue
src/views/task/addTask/index.vue
src/views/task/taskList/index.vue
src/api/commonApi.js
0 → 100644
View file @
18eef47
import
request
from
'./request'
import
Vue
from
'vue'
const
commonApi
=
{
uploadImgApi
(
data
=
{})
{
data
.
method
=
'glsx.accounts.biz.common.pictureUpload'
return
request
(
data
,
'glsx.accounts.biz.common.pictureUpload'
,
[],
Vue
.
prototype
.
fileUploadURL
)
},
}
export
{
commonApi
}
src/api/task.js
View file @
18eef47
// import request from './request'
import
request
from
'./request'
import
Vue
from
'vue'
// const path = 'scrm.api.renewal.insurance.customer.name.list.'
// const defaultPath = 'scrm.api.renewal.order.'
const
taskApi
=
{
// searchCustomerList(data = {}) {
// data.method = `${path}get`
// return request(data)
// },
getMerchantsList
(
data
=
{})
{
data
.
method
=
'merchants.api.open.findMerchantList'
return
request
(
data
,
'merchants.api.open.findMerchantList'
,
[],
Vue
.
prototype
.
otherUrl
)
},
}
export
{
taskApi
}
src/views/task/addTask/app.js
View file @
18eef47
import
App
from
'./index.vue'
import
base
from
'@/base'
import
GlsxVueCommon
from
'glsx-vue-common'
base
.
getConfig
().
then
(
data
=>
{
import
Vue
from
'vue'
base
.
getConfig
().
then
((
data
)
=>
{
const
{
vue
,
config
}
=
data
Vue
.
prototype
.
otherUrl
=
config
.
axios
.
otherURL
Vue
.
prototype
.
fileUploadURL
=
config
.
axios
.
fileUploadURL
vue
.
use
(
GlsxVueCommon
,
config
)
base
.
render
(
App
)
})
src/views/task/addTask/components/activityDia.vue
0 → 100644
View file @
18eef47
<
template
>
<div>
<el-dialog
title=
"选择活动"
:visible
.
sync=
"activityDiaVisible"
width=
"1098px"
:before-close=
"handleClose"
>
<div
class=
"activity-box"
>
<div
class=
"model-item-panel"
v-if=
"data.list.length"
>
<div
class=
"model-item"
:class=
"
{ checked: selectItem == item }"
v-for="(item, index) in data.list"
:key="index"
@click="handleSelectItem(item)"
>
<div
class=
"model-item-title"
:title=
"item.name"
>
{{
item
.
name
}}
</div>
<div
class=
"model-item-content"
></div>
<div
class=
"model-item-content"
>
开始时间:
{{
item
.
createdDate
}}
</div>
<div
class=
"model-item-content"
>
结束时间:
{{
item
.
endDate
}}
</div>
</div>
<el-pagination
background
layout=
"sizes, total, prev, pager, next, jumper"
:page-sizes=
"[12, 24, 48]"
:page-size=
"data.pageSize"
:total=
"data.total"
:current-page=
"data.pageNum"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
>
</el-pagination>
</div>
<div
v-else
v-loading=
"loading"
>
<div>
暂无数据
</div>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"activityDiaVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"confirmActivity"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
name
:
'activityDia'
,
data
()
{
return
{
activityDiaVisible
:
false
,
loading
:
false
,
data
:
{
pageNum
:
1
,
pageSize
:
12
,
total
:
31
,
list
:
[
{
id
:
1100
,
name
:
'4天'
,
createdDate
:
'2022-08-20 17:56:05'
,
endDate
:
'2022-08-23'
,
},
{
id
:
112
,
name
:
'优惠券0826'
,
createdDate
:
'2022-08-20 17:56:05'
,
endDate
:
'2022-08-26'
,
},
{
id
:
113
,
name
:
'优惠券0826'
,
createdDate
:
'2022-08-20 17:56:05'
,
endDate
:
'2022-08-26'
,
},
{
id
:
114
,
name
:
'优惠ff券0826'
,
createdDate
:
'2022-08-20 17:56:05'
,
endDate
:
'2022-08-26'
,
},
{
id
:
115
,
name
:
'优惠f券0826'
,
createdDate
:
'2022-08-20 17:56:05'
,
endDate
:
'2022-08-26'
,
},
{
id
:
116
,
name
:
'优惠s券0826'
,
createdDate
:
'2022-08-20 17:56:05'
,
endDate
:
'2022-08-26'
,
},
{
id
:
117
,
name
:
'优惠f券0826'
,
createdDate
:
'2022-08-20 17:56:05'
,
endDate
:
'2022-08-26'
,
},
{
id
:
118
,
name
:
'优s惠券0826'
,
createdDate
:
'2022-08-20 17:56:05'
,
endDate
:
'2022-08-26'
,
},
],
},
selectItem
:
{},
}
},
methods
:
{
init
()
{
this
.
activityDiaVisible
=
true
},
handleSelectItem
(
item
)
{
console
.
log
(
item
)
this
.
selectItem
=
item
},
// 确认活动
confirmActivity
()
{
console
.
log
(
11
)
if
(
!
this
.
selectItem
.
id
)
{
this
.
$message
({
message
:
'请选择活动'
,
type
:
'warning'
,
})
return
}
this
.
$emit
(
'selectActivity'
,
this
.
selectItem
)
this
.
handleClose
()
},
// 关闭弹窗
handleClose
()
{
this
.
selectItem
=
{}
this
.
activityDiaVisible
=
false
},
handleSizeChange
(
val
)
{
console
.
log
(
`每页
${
val
}
条`
)
},
handleCurrentChange
(
val
)
{
console
.
log
(
`当前页:
${
val
}
`
)
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.activity-box
{
min-height
:
200px
;
}
.model-item-panel
{
//
display
:
grid
;
//
grid-template-columns
:
repeat
(
4
,
25%
);
//
grid-row-gap
:
10px
;
//
max-height
:
38vh
;
overflow
:
auto
;
display
:
flex
;
flex-wrap
:
wrap
;
align-items
:
stretch
;
flex-direction
:
row
;
.model-item
{
width
:
248px
;
margin-right
:
16px
;
margin-bottom
:
16px
;
position
:
relative
;
height
:
128px
;
background
:
#f9f9f9
;
border-radius
:
4px
;
padding
:
14px
16px
;
box-sizing
:
border-box
;
&.checked
{
border
:
2px
solid
#5850ff
;
}
&
:nth-child
(
4n
)
{
margin-right
:
0px
;
}
&
-title
{
font-size
:
16px
;
font-weight
:
600
;
color
:
#333333
;
line-height
:
25px
;
margin-bottom
:
5px
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
}
&
-content
{
font-size
:
12px
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
16px
;
height
:
16px
;
margin-top
:
6px
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
&.model-item-weight
{
line-height
:
20px
;
height
:
20px
;
}
span
{
color
:
#5850ff
;
font-size
:
20px
;
}
}
&
-contents
{
line-height
:
22px
;
height
:
22px
;
}
}
}
</
style
>
src/views/task/addTask/index.vue
View file @
18eef47
This diff is collapsed.
Click to expand it.
src/views/task/taskList/index.vue
View file @
18eef47
...
...
@@ -45,12 +45,8 @@
</el-form>
</div>
<div
class=
"table-top"
>
<div>
订单列表
</div>
<el-button
class=
"output-btn"
size=
"small"
style=
"margin-bottom: 20px"
@
click=
"handleEdit"
<div
class=
"table-title"
>
订单列表
</div>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleEdit()"
>
添加任务
</el-button
>
</div>
...
...
@@ -72,7 +68,7 @@
<el-button
type=
"text"
v-if=
"scope.scope.status == statusNum.UNPUBLISH"
@
click=
"handleEdit(scope.scope)"
@
click=
"handleEdit(scope.scope
, 1
)"
>
编辑
</el-button
>
<el-button
...
...
@@ -122,25 +118,25 @@ const sceneOption = [
},
{
label
:
'1.0新车权益销售'
,
value
:
'
0
'
,
value
:
'
1
'
,
},
{
label
:
'1.1次新车精品升级'
,
value
:
'
1
'
,
value
:
'
2
'
,
},
{
label
:
'1.2次新车线上转化'
,
value
:
'
2
'
,
value
:
'
3
'
,
},
{
label
:
'1.3存量用户众筹'
,
value
:
'
3
'
,
value
:
'
4
'
,
},
]
const
statusNum
=
{
UNPUBLISH
:
'
0
'
,
PUBLISHED
:
'
1
'
,
FINISHIED
:
'
2
'
,
UNPUBLISH
:
'
1
'
,
PUBLISHED
:
'
2
'
,
FINISHIED
:
'
3
'
,
}
const
taskStatus
=
[
{
...
...
@@ -184,16 +180,17 @@ export default {
{
label
:
'业务场景'
,
prop
:
'scene'
,
width
:
20
0
,
width
:
15
0
,
},
{
label
:
'商户'
,
prop
:
'merchant'
,
width
:
2
50
,
width
:
1
50
,
},
{
label
:
'活动/产品'
,
prop
:
'activity'
,
width
:
200
,
},
{
label
:
'任务数'
,
...
...
@@ -228,8 +225,58 @@ export default {
activity
:
'氛围灯众筹活动'
,
taskNum
:
'10'
,
creatPerson
:
'用户名'
,
creatTime
:
'2021-10-27 16:00:00'
,
status
:
'0'
,
creatTime
:
'2021-10-11 16:00:00'
,
taskList
:
[
{
date
:
'2022-10-12'
,
taskData
:
[
{
taskType
:
'1'
,
taskName
:
'fff'
,
taskDetail
:
'fff'
,
awardIntegral
:
33
,
},
],
},
{
date
:
'2022-10-13'
,
taskData
:
[
{
taskType
:
'1'
,
taskName
:
'fff'
,
taskDetail
:
'fff'
,
awardIntegral
:
33
,
},
],
},
{
date
:
'2022-10-14'
,
taskData
:
[
{
taskType
:
'1'
,
taskName
:
'fff'
,
taskDetail
:
'fff'
,
awardIntegral
:
33
,
},
],
},
{
date
:
'2022-10-15'
,
taskData
:
[
{
taskType
:
'1'
,
taskName
:
'fff'
,
taskDetail
:
'fff'
,
awardIntegral
:
33
,
},
],
},
{
date
:
'完整周期'
,
taskData
:
[],
},
],
status
:
'1'
,
},
{
id
:
22
,
...
...
@@ -239,7 +286,9 @@ export default {
taskNum
:
'10'
,
creatPerson
:
'用户名'
,
creatTime
:
'2021-10-27 16:00:00'
,
status
:
'1'
,
startTime
:
'2022-10-01 16:00:00'
,
endTime
:
'2022-10-05 16:00:00'
,
status
:
'2'
,
},
{
id
:
33
,
...
...
@@ -249,7 +298,9 @@ export default {
taskNum
:
'10'
,
creatPerson
:
'用户名'
,
creatTime
:
'2021-10-27 16:00:00'
,
status
:
'2'
,
startTime
:
'2022-10-15 16:00:00'
,
endTime
:
'2022-10-20 16:00:00'
,
status
:
'3'
,
},
],
// 获取订单列表
...
...
@@ -293,16 +344,16 @@ export default {
},
// 编辑
handleEdit
(
scope
,
type
)
{
if
(
!
type
)
{
this
.
$root
.
to
([
'任务中心'
,
'任务平台'
,
'任务管理'
,
'任务模板管理'
,
'*添加任务模板'
,
])
handleEdit
(
item
,
type
)
{
const
para
=
{
task
:
item
,
type
,
}
console
.
log
(
para
)
this
.
$root
.
to
(
[
'任务中心'
,
'任务平台'
,
'任务管理'
,
'任务模板管理'
,
'*添加任务模板'
],
para
)
// this.$root.close('任务模板管理列表')
},
// 删除
...
...
@@ -333,7 +384,12 @@ export default {
)
},
// 克隆
handleClone
()
{},
handleClone
(
scope
)
{
this
.
$root
.
to
(
[
'任务中心'
,
'任务平台'
,
'任务管理'
,
'任务模板管理'
,
'*添加任务模板'
],
scope
)
},
// 跳转查看详情
handleViewDetail
(
scope
)
{
console
.
log
(
scope
)
...
...
@@ -381,4 +437,20 @@ export default {
},
}
</
script
>
<
style
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
.task-contentbox
{
padding
:
20px
;
}
.table-top
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-bottom
:
10px
;
}
.table-title
{
font-size
:
16px
;
font-weight
:
600
;
color
:
rgb
(
51
,
51
,
51
);
line-height
:
16px
;
}
</
style
>
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