Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
admin
Overview
Overview
Details
Activity
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
baihong
admin
Commits
4e0a71ab
Commit
4e0a71ab
authored
Apr 26, 2021
by
baihong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
奖励新增,奖励编辑
parent
c7eb0ff6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
37 deletions
+60
-37
http.js
src/libs/http.js
+5
-1
dataStatistics.vue
src/view/clockEarly/dataStatistics.vue
+13
-12
setTabs.vue
src/view/clockEarly/setTabs.vue
+42
-24
No files found.
src/libs/http.js
View file @
4e0a71ab
...
...
@@ -95,6 +95,7 @@ const _HttpService = {
postObj
:
(
url
,
data
,
config
)
=>
{
const
_selfConfig
=
{
headers
:
{
language
:
"cn"
,
"Content-Type"
:
"application/json"
,
"X-Access-Token"
:
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
...
...
@@ -108,6 +109,7 @@ const _HttpService = {
putObj
:
(
url
,
data
,
config
)
=>
{
const
_selfConfig
=
{
headers
:
{
language
:
"cn"
,
"Content-Type"
:
"application/json"
,
"X-Access-Token"
:
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
...
...
@@ -130,6 +132,7 @@ const _HttpService = {
get
:
(
url
,
data
,
config
)
=>
{
const
_selfConfig
=
{
headers
:
{
language
:
"cn"
,
"Content-Type"
:
"application/json"
,
"X-Access-Token"
:
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
...
...
@@ -144,9 +147,10 @@ const _HttpService = {
delete
:
(
url
,
data
,
config
)
=>
{
const
_selfConfig
=
{
headers
:
{
language
:
"cn"
,
"Content-Type"
:
"application/json"
,
"X-Access-Token"
:
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
},
data
:
JSON
.
stringify
(
data
),
setLoading
:
true
...
...
src/view/clockEarly/dataStatistics.vue
View file @
4e0a71ab
...
...
@@ -5,8 +5,9 @@
<p
slot=
"title"
>
早起人数统计
</p>
<div
class=
"dateBox"
>
<DatePicker
@
on-change=
"search"
v-model=
"date"
format=
"yyyy
/MM/
dd"
format=
"yyyy
-MM-
dd"
type=
"daterange"
placement=
"bottom-end"
placeholder=
"Select date"
...
...
@@ -39,11 +40,11 @@ export default {
resize
()
{
this
.
dom
.
resize
();
},
search
()
{
search
(
p
)
{
let
params
=
{
language
:
"cn"
,
startDate
:
this
.
date
[
0
]
,
endDate
:
this
.
date
[
1
]
startDate
:
p
&&
p
.
length
?
p
[
0
]
:
"2021-01-01"
,
endDate
:
p
&&
p
.
length
?
p
[
1
]
:
"2021-09-15"
};
queryList
(
params
).
then
(
res
=>
{
const
option
=
{
...
...
@@ -59,8 +60,8 @@ export default {
xAxis
:
{
type
:
"category"
,
boundaryGap
:
false
,
data
:
res
.
map
(
(
p
)
=>
{
return
p
.
group_date
data
:
res
.
map
(
p
=>
{
return
p
.
group_date
;
})
},
yAxis
:
{
...
...
@@ -71,17 +72,17 @@ export default {
name
:
"报名人数"
,
type
:
"line"
,
stack
:
"总量"
,
data
:
res
.
map
(
(
p
)
=>
{
return
p
.
apply_num
})
data
:
res
.
map
(
p
=>
{
return
p
.
apply_num
;
})
},
{
name
:
"签到人数"
,
type
:
"line"
,
stack
:
"总量"
,
data
:
res
.
map
(
(
p
)
=>
{
return
p
.
clock_num
})
data
:
res
.
map
(
p
=>
{
return
p
.
clock_num
;
})
}
]
};
...
...
src/view/clockEarly/setTabs.vue
View file @
4e0a71ab
...
...
@@ -79,31 +79,23 @@
</div>
</div>
<Table
v-if=
"tab === '3'"
v-if=
"tab === '3'
|| tab === '4'
"
:loading=
"$store.state.app.isLoading"
border
ref=
"selection"
:columns=
"newoldcolumns"
:data=
"data"
>
<
template
slot-scope=
"{ row }"
slot=
"a
ction
"
>
<a
@
click=
"edit(row)"
>
编辑
</a>
<
template
slot-scope=
"{ row }"
slot=
"a
ward_type
"
>
{{
row
.
award_type
===
1
?
"优惠券"
:
"真我币"
}}
</
template
>
</Table>
<Table
v-if=
"tab === '4'"
:loading=
"$store.state.app.isLoading"
border
ref=
"selection"
:columns=
"newoldcolumns"
:data=
"data"
>
<
template
slot-scope=
"{ row }"
slot=
"action"
>
<a
@
click=
"edit(row)"
>
编辑
</a>
<a
style=
"margin-left:10px"
@
click=
"del(row)"
>
删除
</a>
</
template
>
</Table>
<div
class=
"editor"
v-if=
"tab === '6'"
>
<editor
/>
<editor
v-model=
"content"
/>
<div
class=
"topSearch"
style=
"margin-top: 20px;"
>
<div
class=
"left"
>
<Button
type=
"primary"
@
click=
"goDetail"
>
取消
</Button>
...
...
@@ -118,8 +110,7 @@
v-model=
"modalVisible"
width=
"600"
:mask-closable=
"false"
:styles=
"styles"
@
on-close=
"close"
@
on-close=
"modalVisible = false"
>
<Form
ref=
"formValidate"
...
...
@@ -175,6 +166,7 @@ export default {
},
data
()
{
return
{
content
:
""
,
payData
:
[
{
break_time
:
""
,
...
...
@@ -270,7 +262,7 @@ export default {
},
{
title
:
"模板编号"
,
slot
:
"template_code"
key
:
"template_code"
},
{
title
:
"获奖概率"
,
...
...
@@ -290,6 +282,9 @@ export default {
let
type
=
val
===
"3"
?
1
:
2
;
this
.
getjllist
(
type
);
}
if
(
val
===
"6"
)
{
this
.
getRu
();
}
},
immediate
:
true
}
...
...
@@ -306,30 +301,53 @@ export default {
},
submit
()
{
this
.
formValidate
.
type
=
this
.
tab
===
"3"
?
1
:
2
;
this
.
formValidate
.
uuid
=
sessionStorage
.
getItem
(
'admin_uuid'
)
this
.
formValidate
.
award_rate
=
Number
(
this
.
formValidate
.
award_rate
)
this
.
formValidate
.
uuid
=
sessionStorage
.
getItem
(
"admin_uuid"
);
this
.
formValidate
.
award_rate
=
Number
(
this
.
formValidate
.
award_rate
)
;
if
(
this
.
add
)
{
addConfigAward
(
this
.
formValidate
).
then
(
res
=>
{
console
.
log
(
res
);
this
.
$Message
.
success
(
"新增成功!"
);
this
.
modalVisible
=
false
;
let
type
=
this
.
tab
===
"3"
?
1
:
2
;
this
.
getjllist
(
type
);
});
}
else
{
editConfigAward
(
this
.
formValidate
).
then
(
res
=>
{
console
.
log
(
res
);
this
.
$Message
.
success
(
"编辑成功!"
);
this
.
modalVisible
=
false
;
let
type
=
this
.
tab
===
"3"
?
1
:
2
;
this
.
getjllist
(
type
);
});
}
},
del
()
{
deleteConfigAward
(
id
).
then
(
res
=>
{
console
.
log
(
res
);
del
(
p
)
{
deleteConfigAward
({
awardId
:
p
.
id
}).
then
(
res
=>
{
this
.
$Message
.
success
(
"删除成功!"
);
this
.
modalVisible
=
false
;
let
type
=
this
.
tab
===
"3"
?
1
:
2
;
this
.
getjllist
(
type
);
});
},
edit
(
p
)
{
this
.
add
=
false
;
this
.
formValidate
.
award_name
=
p
.
award_name
;
this
.
formValidate
.
award_type
=
p
.
award_type
;
this
.
formValidate
.
award_rate
=
p
.
award_rate
;
this
.
formValidate
.
template_code
=
p
.
template_code
;
this
.
formValidate
.
id
=
p
.
id
;
this
.
modalVisible
=
true
;
},
getjllist
(
type
)
{
configAwards
(
type
).
then
(
res
=>
{
this
.
data
=
res
;
});
},
getRu
()
{
getActivityConfigRule
(
1
).
then
(
res
=>
{
getActivityConfigRule
({
language
:
"cn"
,
ruleType
:
1
}).
then
(
res
=>
{
this
.
data
=
res
;
});
},
...
...
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