Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
6e9469c3
Commit
6e9469c3
authored
Aug 08, 2024
by
chenwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交积分规则
parent
105d91ea
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1181 additions
and
147 deletions
+1181
-147
memberManagement.js
src/api/ecw/memberManagement.js
+61
-0
index.vue
src/components/DictSelector/index.vue
+168
-123
dict.js
src/utils/dict.js
+2
-0
index.vue
...cw/memberManagement/addIntegrationRuleOperation/index.vue
+677
-10
index.vue
src/views/ecw/memberManagement/integralRecord/index.vue
+1
-1
index.vue
src/views/ecw/memberManagement/integrationRule/index.vue
+272
-13
No files found.
src/api/ecw/memberManagement.js
View file @
6e9469c3
...
@@ -157,3 +157,64 @@ export function editMemberLevel(data) {
...
@@ -157,3 +157,64 @@ export function editMemberLevel(data) {
data
,
data
,
});
});
}
}
//获得目的国、目的城市、目的仓列表
export
function
getRegionTreeList
()
{
return
request
({
url
:
"
/member/score-rule/warehouse-tree-region-list
"
,
method
:
"
get
"
,
});
}
//获取渠道列表
export
function
getChannelList
()
{
return
request
({
url
:
"
/ecw/channel/list-all-simple
"
,
method
:
"
get
"
,
});
}
//积分规则创建
export
function
createIntegralRule
(
data
)
{
return
request
({
url
:
"
/member/score-rule/create
"
,
method
:
"
post
"
,
data
,
});
}
//启用关闭 积分规则
export
function
integralRuleStatus
(
data
)
{
return
request
({
url
:
"
/member/score-rule/status
"
,
method
:
"
post
"
,
data
,
});
}
//复制积分规则
export
function
integralRuleCopy
(
data
)
{
return
request
({
url
:
"
/member/score-rule/copy
"
,
method
:
"
post
"
,
data
,
});
}
//延期积分规则
export
function
integralRuleDelay
(
data
)
{
return
request
({
url
:
"
/member/score-rule/delay
"
,
method
:
"
post
"
,
data
,
});
}
//删除积分规则
export
function
integralRuleDelete
(
data
)
{
return
request
({
url
:
"
/member/score-rule/delete
"
,
method
:
"
post
"
,
data
,
});
}
src/components/DictSelector/index.vue
View file @
6e9469c3
<
template
>
<
template
>
<div
class=
"dict-selector"
>
<div
class=
"dict-selector"
>
<el-select
v-if=
"formType == 'select'"
v-model=
"valueSync"
:placeholder=
"placeholder || $t('请选择')"
:clearable=
"clearable"
:multiple=
"multiple"
:disabled=
"disabled"
@
change=
"val => $emit('change', val)"
>
<el-select
<el-option
v-for=
"dict in formattedList"
v-if=
"formType == 'select'"
:key=
"dict.value"
:label=
"$l(dict, 'label')"
:value=
"dict.value"
/>
v-model=
"valueSync"
</el-select>
:placeholder=
"placeholder || $t('请选择')"
<el-radio-group
v-if=
"formType == 'radio'"
v-model=
"valueSync"
:disabled=
"disabled"
>
:clearable=
"clearable"
<el-radio
v-for=
"dict in formattedList"
:label=
"dict.value"
:checked=
"valueSync === dict.value"
:key=
"dict.value"
>
{{
$l
(
dict
,
'
label
'
)
}}
</el-radio>
:multiple=
"multiple"
</el-radio-group>
:disabled=
"disabled"
<el-checkbox-group
v-if=
"formType == 'checkbox'"
v-model=
"valueSync"
:disabled=
"disabled"
>
@
change=
"(val) => $emit('change', val)"
<el-checkbox
v-for=
"dict in formattedList"
:label=
"dict.value"
:key=
"dict.value"
>
{{
$l
(
dict
,
'
label
'
)
}}
</el-checkbox>
>
</el-checkbox-group>
<el-option
</div>
v-for=
"dict in formattedList"
:key=
"dict.value"
:label=
"$l(dict, 'label')"
:value=
"dict.value"
/>
</el-select>
<el-radio-group
v-if=
"formType == 'radio'"
v-model=
"valueSync"
:disabled=
"disabled"
>
<el-radio
v-for=
"dict in formattedList"
:label=
"dict.value"
:checked=
"valueSync === dict.value"
:key=
"dict.value"
>
{{
$l
(
dict
,
"
label
"
)
}}
</el-radio
>
</el-radio-group>
<el-checkbox-group
v-if=
"formType == 'checkbox'"
v-model=
"valueSync"
:disabled=
"disabled"
>
<el-checkbox
v-for=
"dict in formattedList"
:label=
"dict.value"
:key=
"dict.value"
>
{{
$l
(
dict
,
"
label
"
)
}}
</el-checkbox
>
</el-checkbox-group>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
const
FORMATTERS
=
{
const
FORMATTERS
=
{
"
string
"
:
String
,
string
:
String
,
"
bool
"
:
function
(
val
){
bool
:
function
(
val
)
{
return
[
false
,
'
false
'
,
0
,
"
0
"
].
indexOf
(
val
)
<
0
return
[
false
,
"
false
"
,
0
,
"
0
"
].
indexOf
(
val
)
<
0
;
},
},
'
number
'
:
Number
,
number
:
Number
,
'
array
'
:
function
(
val
){
array
:
function
(
val
)
{
return
typeof
val
==
'
string
'
?
val
.
split
(
'
,
'
).
filter
(
item
=>
item
&&
item
!==
''
)
:
val
return
typeof
val
==
"
string
"
}
?
val
.
split
(
"
,
"
).
filter
((
item
)
=>
item
&&
item
!==
""
)
}
:
val
;
},
};
export
default
{
export
default
{
props
:{
props
:
{
placeholder
:
{
placeholder
:
{
type
:
String
,
type
:
String
,
default
:
null
default
:
null
,
},
type
:
String
,
value
:
[
String
,
Number
,
Array
,
Boolean
],
multiple
:
Boolean
,
formType
:{
type
:
String
,
default
:
'
select
'
},
formatter
:
{
type
:
[
Function
,
String
],
default
:
String
},
defaultable
:
Boolean
,
// 是否默认选择第一个
disabled
:
Boolean
,
/**
* 过滤字典项,用于只使用部分字典项的场景
*/
filter
:
{
type
:
Function
,
default
:
()
=>
true
},
clearable
:
Boolean
},
},
data
(){
type
:
String
,
return
{
value
:
[
String
,
Number
,
Array
,
Boolean
],
valueSync
:
this
.
multiple
?
[]
:
null
multiple
:
Boolean
,
}
formType
:
{
type
:
String
,
default
:
"
select
"
,
},
},
computed
:{
formatter
:
{
dicts
(){
type
:
[
Function
,
String
],
return
this
.
getList
(
this
.
type
)
default
:
String
,
},
dictList
(){
return
this
.
dicts
.
filter
(
this
.
filter
)
},
formattedList
(){
let
arr
=
[]
this
.
dictList
.
forEach
(
item
=>
{
arr
.
push
({
label
:
item
.
label
,
labelEn
:
item
.
labelEn
,
value
:
this
.
format
(
item
.
value
),
cssClass
:
item
.
cssClass
,
colorType
:
item
.
colorType
})
})
return
arr
}
},
},
watch
:{
defaultable
:
Boolean
,
// 是否默认选择第一个
valueSync
(
val
){
disabled
:
Boolean
,
this
.
$emit
(
'
input
'
,
val
)
/**
},
* 过滤字典项,用于只使用部分字典项的场景
value
(
val
){
*/
if
(
val
!=
this
.
valueSync
)
this
.
setValueSync
()
filter
:
{
},
type
:
Function
,
dictList
(){
default
:
()
=>
true
,
this
.
setDefault
()
},
}
clearable
:
Boolean
,
},
data
()
{
return
{
valueSync
:
this
.
multiple
?
[]
:
null
,
};
},
computed
:
{
dicts
()
{
return
this
.
getList
(
this
.
type
);
},
dictList
()
{
return
this
.
dicts
.
filter
(
this
.
filter
);
},
formattedList
()
{
let
arr
=
[];
this
.
dictList
.
forEach
((
item
)
=>
{
arr
.
push
({
label
:
item
.
label
,
labelEn
:
item
.
labelEn
,
value
:
this
.
format
(
item
.
value
),
cssClass
:
item
.
cssClass
,
colorType
:
item
.
colorType
,
});
});
return
arr
;
},
},
created
(){
},
this
.
setValueSync
()
watch
:
{
this
.
setDefault
()
valueSync
(
val
)
{
this
.
$emit
(
"
input
"
,
val
);
},
},
methods
:{
value
(
val
)
{
format
(
val
){
if
(
val
!=
this
.
valueSync
)
this
.
setValueSync
();
if
(
val
===
null
||
val
==
undefined
||
val
==
''
)
return
val
},
let
formatter
=
typeof
this
.
formatter
==
'
function
'
?
this
.
formatter
:
FORMATTERS
[
this
.
formatter
]
dictList
()
{
if
(
!
formatter
){
this
.
setDefault
();
console
.
warn
(
'
格式器无效
'
,
this
.
formatter
)
},
return
val
},
}
created
()
{
return
formatter
(
val
)
this
.
setValueSync
();
},
this
.
setDefault
();
changeValue
(
val
){
},
this
.
valueSync
=
val
methods
:
{
},
format
(
val
)
{
setValueSync
(){
if
(
val
===
null
||
val
==
undefined
||
val
==
""
)
return
val
;
if
(
this
.
value
===
null
||
this
.
value
===
undefined
||
this
.
value
===
''
){
let
formatter
=
return
this
.
valueSync
=
this
.
multiple
?
[]
:
this
.
value
typeof
this
.
formatter
==
"
function
"
}
?
this
.
formatter
if
(
this
.
multiple
){
:
FORMATTERS
[
this
.
formatter
];
let
value
=
this
.
value
||
[]
if
(
!
formatter
)
{
if
(
typeof
this
.
value
==
'
string
'
){
console
.
warn
(
"
格式器无效
"
,
this
.
formatter
);
value
=
this
.
value
.
split
(
'
,
'
).
filter
(
item
=>
item
&&
item
!=
''
)
return
val
;
}
}
this
.
valueSync
=
value
.
map
(
item
=>
this
.
format
(
item
))
return
formatter
(
val
);
}
else
{
},
this
.
valueSync
=
this
.
format
(
this
.
value
)
changeValue
(
val
)
{
}
this
.
valueSync
=
val
;
},
},
getList
(){
setValueSync
()
{
return
this
.
getDictDatas
(
this
.
type
)
if
(
},
this
.
value
===
null
||
setDefault
(){
this
.
value
===
undefined
||
if
(
!
this
.
defaultable
)
return
this
.
value
===
""
if
(
this
.
dictList
.
length
&&
(
this
.
valueSync
===
null
||
this
.
valueSync
==
undefined
||
this
.
valueSync
==
''
)){
)
{
this
.
valueSync
=
this
.
multiple
?
[]
:
this
.
formattedList
[
0
].
value
return
(
this
.
valueSync
=
this
.
multiple
?
[]
:
this
.
value
);
}
}
if
(
this
.
multiple
)
{
let
value
=
this
.
value
||
[];
if
(
typeof
this
.
value
==
"
string
"
)
{
value
=
this
.
value
.
split
(
"
,
"
).
filter
((
item
)
=>
item
&&
item
!=
""
);
}
}
}
this
.
valueSync
=
value
.
map
((
item
)
=>
this
.
format
(
item
));
}
}
else
{
this
.
valueSync
=
this
.
format
(
this
.
value
);
}
},
getList
()
{
return
this
.
getDictDatas
(
this
.
type
);
},
setDefault
()
{
if
(
!
this
.
defaultable
)
return
;
if
(
this
.
dictList
.
length
&&
(
this
.
valueSync
===
null
||
this
.
valueSync
==
undefined
||
this
.
valueSync
==
""
)
)
{
this
.
valueSync
=
this
.
multiple
?
[]
:
this
.
formattedList
[
0
].
value
;
}
},
},
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.dict-selector
{
.dict-selector
{
display
:
inline-block
;
display
:
inline-block
;
}
}
</
style
>
</
style
>
src/utils/dict.js
View file @
6e9469c3
...
@@ -251,6 +251,8 @@ export const DICT_TYPE = {
...
@@ -251,6 +251,8 @@ export const DICT_TYPE = {
REWARD_REDEEM_STATUS
:
"
reward_redeem_status
"
,
//礼品兑换状态
REWARD_REDEEM_STATUS
:
"
reward_redeem_status
"
,
//礼品兑换状态
MEMBER_SCORE_OPERATE_TYPE
:
"
member_user_score_log_operate_type
"
,
//会员积分日志操作类型
MEMBER_SCORE_OPERATE_TYPE
:
"
member_user_score_log_operate_type
"
,
//会员积分日志操作类型
SCORE_RULE_TYPE
:
"
score_rule_type
"
,
//积分规则指标类型
SCORE_RULE_TYPE
:
"
score_rule_type
"
,
//积分规则指标类型
YES_OR_NO
:
"
yes_or_no
"
,
CLIENT_PLATFORM
:
"
client_platform
"
,
};
};
/**
/**
...
...
src/views/ecw/memberManagement/addIntegrationRuleOperation/index.vue
View file @
6e9469c3
This diff is collapsed.
Click to expand it.
src/views/ecw/memberManagement/integralRecord/index.vue
View file @
6e9469c3
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
{{
{{
isChinese
isChinese
?
handleSourceType
(
scope
.
row
.
sourceType
).
label
?
handleSourceType
(
scope
.
row
.
sourceType
).
label
:
handle
holdScor
e
(
scope
.
row
.
sourceType
).
labelEn
:
handle
SourceTyp
e
(
scope
.
row
.
sourceType
).
labelEn
}}
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
...
src/views/ecw/memberManagement/integrationRule/index.vue
View file @
6e9469c3
...
@@ -119,11 +119,174 @@
...
@@ -119,11 +119,174 @@
>
{{
$t
(
"
添加规则
"
)
}}
</el-button
>
{{
$t
(
"
添加规则
"
)
}}
</el-button
>
>
</el-row>
</el-row>
<el-table
ref=
"multipleTable"
v-loading=
"loading"
:data=
"integrationRuleList"
>
<el-table-column
width=
"140"
:label=
"$t('指标类型')"
align=
"center"
>
<template
slot-scope=
"scope"
>
{{
isChinese
?
handleSourceType
(
scope
.
row
.
type
).
label
:
handleSourceType
(
scope
.
row
.
type
).
labelEn
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('标题')"
align=
"center"
:prop=
"isChinese ? 'titleZh' : 'titleEn'"
></el-table-column>
<el-table-column
:label=
"$t('开始时间')"
align=
"center"
>
<
template
v-slot=
"{ row }"
>
{{
parseTime
(
row
.
startTime
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('结束时间')"
align=
"center"
>
<
template
v-slot=
"{ row }"
>
{{
parseTime
(
row
.
endTime
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('单次积分')"
align=
"center"
prop=
"getScoreOnce"
>
</el-table-column>
<el-table-column
:label=
"$t('累计最高积分')"
align=
"center"
prop=
"maxScoreTotal"
>
</el-table-column>
<el-table-column
:label=
"$t('规则说明')"
align=
"center"
:prop=
"isChinese ? 'descZh' : 'descEn'"
>
</el-table-column>
<el-table-column
:label=
"$t('展示平台')"
align=
"center"
>
<
template
v-slot=
"{ row }"
>
{{
handlePlatform
(
row
.
showPlatform
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('状态')"
align=
"center"
>
<
template
v-slot=
"{ row }"
>
{{
$l
(
handleStatus
(
row
.
status
),
"
label
"
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('创建人')"
align=
"center"
prop=
"creator"
>
</el-table-column>
<el-table-column
:label=
"$t('创建时间')"
align=
"center"
>
<
template
v-slot=
"{ row }"
>
{{
parseTime
(
row
.
createTime
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('最后更新人')"
align=
"center"
prop=
"updater"
>
</el-table-column>
<el-table-column
:label=
"$t('最后更新时间')"
align=
"center"
>
<
template
v-slot=
"{ row }"
>
{{
parseTime
(
row
.
updateTime
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
width=
"220px"
:label=
"$t('操作')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleUpdate(scope.row)"
>
{{
$t
(
"
查看
"
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.status != '1'"
@
click=
"handleCloseButton(scope.row)"
>
{{
$t
(
"
关闭
"
)
}}
</el-button
>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleCopyButton(scope.row)"
>
{{
$t
(
"
复制
"
)
}}
</el-button
>
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.status != '1'"
@
click=
"handleDelayButton(scope.row)"
>
{{
$t
(
"
延期
"
)
}}
</el-button
>
<el-button
size=
"mini"
:disabled=
"scope.row.status != '2'"
type=
"text"
@
click=
"handleDelete(scope.row)"
>
{{
$t
(
"
删除
"
)
}}
</el-button
>
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.status == '1'"
@
click=
"handleDelete(scope.row)"
>
{{
$t
(
"
编辑
"
)
}}
</el-button
>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleEnabledStatus(scope.row)"
>
{{
$t
(
"
启用
"
)
}}
</el-button
>
</
template
>
</el-table-column>
</el-table>
<!-- //分页列表 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page"
:limit.sync=
"queryParams.rows"
@
pagination=
"handleQueryPagination"
/>
<el-dialog
:title=
"$t('提示')"
:visible.sync=
"dialogPostponeVisible"
width=
"30%"
>
<el-row
class=
"mb8"
>
{{ $t("请选择延期时间") }}
</el-row>
<el-date-picker
type=
"datetime"
clearable
v-model=
"postponeDatetime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"pickerOptions"
:placeholder=
"$t('请选择时间')"
></el-date-picker>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogPostponeVisible = false"
>
{{
$t("取 消")
}}
</el-button>
<el-button
type=
"primary"
@
click=
"confirmPostponeIntegral"
>
{{
$t("确 定")
}}
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
getScoreRecordList
}
from
"
@/api/ecw/memberManagement
"
;
import
{
getScoreRecordList
,
integralRuleStatus
,
integralRuleCopy
,
integralRuleDelay
,
integralRuleDelete
,
}
from
"
@/api/ecw/memberManagement
"
;
export
default
{
export
default
{
name
:
"
integralRecord
"
,
name
:
"
integralRecord
"
,
data
()
{
data
()
{
...
@@ -131,7 +294,15 @@ export default {
...
@@ -131,7 +294,15 @@ export default {
dateRangeCreateTime
:
[],
dateRangeCreateTime
:
[],
total
:
0
,
total
:
0
,
loading
:
true
,
loading
:
true
,
memberList
:
[],
dialogPostponeVisible
:
false
,
integrationRuleList
:
[],
postponeIntegralID
:
""
,
postponeDatetime
:
""
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<
Date
.
now
()
-
8.64e7
;
},
},
queryParams
:
{
queryParams
:
{
type
:
""
,
type
:
""
,
title
:
""
,
title
:
""
,
...
@@ -158,6 +329,73 @@ export default {
...
@@ -158,6 +329,73 @@ export default {
this
.
handleQuery
();
this
.
handleQuery
();
},
},
methods
:
{
methods
:
{
//延期按钮操作
handleDelayButton
(
row
)
{
this
.
postponeIntegralID
=
row
.
id
;
this
.
dialogPostponeVisible
=
true
;
},
confirmPostponeIntegral
()
{
integralRuleDelay
({
id
:
this
.
postponeIntegralID
,
endTime
:
this
.
postponeDatetime
,
}).
then
((
res
)
=>
{
this
.
postponeDatetime
=
""
;
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
延期成功
"
));
});
},
//删除按钮操作
handleDelete
(
row
)
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认删除此礼品规则
"
))
.
then
(
function
()
{
return
integralRuleDelete
({
id
:
row
.
id
});
})
.
then
(()
=>
{
this
.
handleQuery
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
));
})
.
catch
(()
=>
{});
},
//启用按钮操作
handleEnabledStatus
(
row
)
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认启用此礼品规则
"
))
.
then
(
function
()
{
return
integralRuleStatus
({
id
:
row
.
id
,
status
:
"
1
"
});
})
.
then
(()
=>
{
this
.
handleQuery
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
启用成功
"
));
})
.
catch
(()
=>
{});
},
//复制按钮操作
handleCopyButton
(
row
)
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认复制礼品规则
"
))
.
then
(
function
()
{
return
integralRuleCopy
({
id
:
row
.
id
});
})
.
then
(()
=>
{
this
.
handleQuery
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
复制成功
"
));
})
.
catch
(()
=>
{});
},
//关闭按钮操作
handleCloseButton
(
row
)
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认关闭此礼品规则
"
))
.
then
(
function
()
{
return
integralRuleStatus
({
id
:
row
.
id
,
status
:
"
3
"
});
})
.
then
(()
=>
{
this
.
handleQuery
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
关闭成功
"
));
})
.
catch
(()
=>
{});
},
// new score rule func
// new score rule func
handleNewScoreRule
()
{
handleNewScoreRule
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
...
@@ -170,24 +408,45 @@ export default {
...
@@ -170,24 +408,45 @@ export default {
(
item
)
=>
item
.
value
==
id
(
item
)
=>
item
.
value
==
id
)[
0
];
)[
0
];
},
},
handleholdScoreStatus
(
id
)
{
// 活动状态
return
this
.
getDictDatas
(
DICT_TYPE
.
MEMBER_SCORE_OPERATE_TYPE
).
filter
(
handleStatus
(
id
)
{
return
this
.
getDictDatas
(
DICT_TYPE
.
GIFT_STATUS
).
filter
(
(
item
)
=>
item
.
value
==
id
(
item
)
=>
item
.
value
==
id
)[
0
];
)[
0
];
},
},
arraysEqual
(
arr1
,
arr2
)
{
return
arr1
.
filter
((
current
)
=>
{
return
arr2
.
find
((
item
)
=>
item
==
current
.
value
.
toString
())
?
true
:
false
;
});
},
//展示平台
handlePlatform
(
platformId
)
{
let
platformIdLabel
=
[];
if
(
this
.
isChinese
)
{
this
.
arraysEqual
(
this
.
getDictDatas
(
DICT_TYPE
.
PLATFORM_TYPE
),
platformId
.
split
(
"
,
"
)
).
forEach
((
element
)
=>
{
platformIdLabel
.
push
(
element
.
label
);
});
}
else
{
this
.
arraysEqual
(
this
.
getDictDatas
(
DICT_TYPE
.
PLATFORM_TYPE
),
platformId
.
split
(
"
,
"
)
).
forEach
((
element
)
=>
{
platformIdLabel
.
push
(
element
.
labelEn
);
});
}
return
platformIdLabel
.
join
();
},
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
page
=
1
;
this
.
queryParams
.
page
=
1
;
let
params
=
{
...
this
.
queryParams
};
let
params
=
{
...
this
.
queryParams
};
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
,
false
);
getScoreRecordList
(
params
).
then
((
res
)
=>
{
getScoreRecordList
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
member
List
=
res
.
data
.
list
;
this
.
integrationRule
List
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
this
.
total
=
res
.
data
.
total
;
});
});
},
},
...
@@ -201,7 +460,7 @@ export default {
...
@@ -201,7 +460,7 @@ export default {
);
);
getScoreRecordList
(
params
).
then
((
res
)
=>
{
getScoreRecordList
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
member
List
=
res
.
data
.
list
;
this
.
integrationRule
List
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
this
.
total
=
res
.
data
.
total
;
});
});
},
},
...
...
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