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 = {
...
@@ -95,6 +95,7 @@ const _HttpService = {
postObj
:
(
url
,
data
,
config
)
=>
{
postObj
:
(
url
,
data
,
config
)
=>
{
const
_selfConfig
=
{
const
_selfConfig
=
{
headers
:
{
headers
:
{
language
:
"cn"
,
"Content-Type"
:
"application/json"
,
"Content-Type"
:
"application/json"
,
"X-Access-Token"
:
"X-Access-Token"
:
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
...
@@ -108,6 +109,7 @@ const _HttpService = {
...
@@ -108,6 +109,7 @@ const _HttpService = {
putObj
:
(
url
,
data
,
config
)
=>
{
putObj
:
(
url
,
data
,
config
)
=>
{
const
_selfConfig
=
{
const
_selfConfig
=
{
headers
:
{
headers
:
{
language
:
"cn"
,
"Content-Type"
:
"application/json"
,
"Content-Type"
:
"application/json"
,
"X-Access-Token"
:
"X-Access-Token"
:
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
...
@@ -130,6 +132,7 @@ const _HttpService = {
...
@@ -130,6 +132,7 @@ const _HttpService = {
get
:
(
url
,
data
,
config
)
=>
{
get
:
(
url
,
data
,
config
)
=>
{
const
_selfConfig
=
{
const
_selfConfig
=
{
headers
:
{
headers
:
{
language
:
"cn"
,
"Content-Type"
:
"application/json"
,
"Content-Type"
:
"application/json"
,
"X-Access-Token"
:
"X-Access-Token"
:
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
...
@@ -144,9 +147,10 @@ const _HttpService = {
...
@@ -144,9 +147,10 @@ const _HttpService = {
delete
:
(
url
,
data
,
config
)
=>
{
delete
:
(
url
,
data
,
config
)
=>
{
const
_selfConfig
=
{
const
_selfConfig
=
{
headers
:
{
headers
:
{
language
:
"cn"
,
"Content-Type"
:
"application/json"
,
"Content-Type"
:
"application/json"
,
"X-Access-Token"
:
"X-Access-Token"
:
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
sessionStorage
.
getItem
(
"token"
)
||
"1b8cc15a59947ce27dd62b"
},
},
data
:
JSON
.
stringify
(
data
),
data
:
JSON
.
stringify
(
data
),
setLoading
:
true
setLoading
:
true
...
...
src/view/clockEarly/dataStatistics.vue
View file @
4e0a71ab
...
@@ -5,8 +5,9 @@
...
@@ -5,8 +5,9 @@
<p
slot=
"title"
>
早起人数统计
</p>
<p
slot=
"title"
>
早起人数统计
</p>
<div
class=
"dateBox"
>
<div
class=
"dateBox"
>
<DatePicker
<DatePicker
@
on-change=
"search"
v-model=
"date"
v-model=
"date"
format=
"yyyy
/MM/
dd"
format=
"yyyy
-MM-
dd"
type=
"daterange"
type=
"daterange"
placement=
"bottom-end"
placement=
"bottom-end"
placeholder=
"Select date"
placeholder=
"Select date"
...
@@ -39,11 +40,11 @@ export default {
...
@@ -39,11 +40,11 @@ export default {
resize
()
{
resize
()
{
this
.
dom
.
resize
();
this
.
dom
.
resize
();
},
},
search
()
{
search
(
p
)
{
let
params
=
{
let
params
=
{
language
:
"cn"
,
language
:
"cn"
,
startDate
:
this
.
date
[
0
]
,
startDate
:
p
&&
p
.
length
?
p
[
0
]
:
"2021-01-01"
,
endDate
:
this
.
date
[
1
]
endDate
:
p
&&
p
.
length
?
p
[
1
]
:
"2021-09-15"
};
};
queryList
(
params
).
then
(
res
=>
{
queryList
(
params
).
then
(
res
=>
{
const
option
=
{
const
option
=
{
...
@@ -59,8 +60,8 @@ export default {
...
@@ -59,8 +60,8 @@ export default {
xAxis
:
{
xAxis
:
{
type
:
"category"
,
type
:
"category"
,
boundaryGap
:
false
,
boundaryGap
:
false
,
data
:
res
.
map
(
(
p
)
=>
{
data
:
res
.
map
(
p
=>
{
return
p
.
group_date
return
p
.
group_date
;
})
})
},
},
yAxis
:
{
yAxis
:
{
...
@@ -71,17 +72,17 @@ export default {
...
@@ -71,17 +72,17 @@ export default {
name
:
"报名人数"
,
name
:
"报名人数"
,
type
:
"line"
,
type
:
"line"
,
stack
:
"总量"
,
stack
:
"总量"
,
data
:
res
.
map
(
(
p
)
=>
{
data
:
res
.
map
(
p
=>
{
return
p
.
apply_num
return
p
.
apply_num
;
})
})
},
},
{
{
name
:
"签到人数"
,
name
:
"签到人数"
,
type
:
"line"
,
type
:
"line"
,
stack
:
"总量"
,
stack
:
"总量"
,
data
:
res
.
map
(
(
p
)
=>
{
data
:
res
.
map
(
p
=>
{
return
p
.
clock_num
return
p
.
clock_num
;
})
})
}
}
]
]
};
};
...
...
src/view/clockEarly/setTabs.vue
View file @
4e0a71ab
...
@@ -79,31 +79,23 @@
...
@@ -79,31 +79,23 @@
</div>
</div>
</div>
</div>
<Table
<Table
v-if=
"tab === '3'"
v-if=
"tab === '3'
|| tab === '4'
"
:loading=
"$store.state.app.isLoading"
:loading=
"$store.state.app.isLoading"
border
border
ref=
"selection"
ref=
"selection"
:columns=
"newoldcolumns"
:columns=
"newoldcolumns"
:data=
"data"
:data=
"data"
>
>
<
template
slot-scope=
"{ row }"
slot=
"a
ction
"
>
<
template
slot-scope=
"{ row }"
slot=
"a
ward_type
"
>
<a
@
click=
"edit(row)"
>
编辑
</a>
{{
row
.
award_type
===
1
?
"优惠券"
:
"真我币"
}}
</
template
>
</
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"
>
<
template
slot-scope=
"{ row }"
slot=
"action"
>
<a
@
click=
"edit(row)"
>
编辑
</a>
<a
@
click=
"edit(row)"
>
编辑
</a>
<a
style=
"margin-left:10px"
@
click=
"del(row)"
>
删除
</a>
</
template
>
</
template
>
</Table>
</Table>
<div
class=
"editor"
v-if=
"tab === '6'"
>
<div
class=
"editor"
v-if=
"tab === '6'"
>
<editor
/>
<editor
v-model=
"content"
/>
<div
class=
"topSearch"
style=
"margin-top: 20px;"
>
<div
class=
"topSearch"
style=
"margin-top: 20px;"
>
<div
class=
"left"
>
<div
class=
"left"
>
<Button
type=
"primary"
@
click=
"goDetail"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"goDetail"
>
取消
</Button>
...
@@ -118,8 +110,7 @@
...
@@ -118,8 +110,7 @@
v-model=
"modalVisible"
v-model=
"modalVisible"
width=
"600"
width=
"600"
:mask-closable=
"false"
:mask-closable=
"false"
:styles=
"styles"
@
on-close=
"modalVisible = false"
@
on-close=
"close"
>
>
<Form
<Form
ref=
"formValidate"
ref=
"formValidate"
...
@@ -175,6 +166,7 @@ export default {
...
@@ -175,6 +166,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
content
:
""
,
payData
:
[
payData
:
[
{
{
break_time
:
""
,
break_time
:
""
,
...
@@ -270,7 +262,7 @@ export default {
...
@@ -270,7 +262,7 @@ export default {
},
},
{
{
title
:
"模板编号"
,
title
:
"模板编号"
,
slot
:
"template_code"
key
:
"template_code"
},
},
{
{
title
:
"获奖概率"
,
title
:
"获奖概率"
,
...
@@ -290,6 +282,9 @@ export default {
...
@@ -290,6 +282,9 @@ export default {
let
type
=
val
===
"3"
?
1
:
2
;
let
type
=
val
===
"3"
?
1
:
2
;
this
.
getjllist
(
type
);
this
.
getjllist
(
type
);
}
}
if
(
val
===
"6"
)
{
this
.
getRu
();
}
},
},
immediate
:
true
immediate
:
true
}
}
...
@@ -306,30 +301,53 @@ export default {
...
@@ -306,30 +301,53 @@ export default {
},
},
submit
()
{
submit
()
{
this
.
formValidate
.
type
=
this
.
tab
===
"3"
?
1
:
2
;
this
.
formValidate
.
type
=
this
.
tab
===
"3"
?
1
:
2
;
this
.
formValidate
.
uuid
=
sessionStorage
.
getItem
(
'admin_uuid'
)
this
.
formValidate
.
uuid
=
sessionStorage
.
getItem
(
"admin_uuid"
);
this
.
formValidate
.
award_rate
=
Number
(
this
.
formValidate
.
award_rate
)
this
.
formValidate
.
award_rate
=
Number
(
this
.
formValidate
.
award_rate
)
;
if
(
this
.
add
)
{
if
(
this
.
add
)
{
addConfigAward
(
this
.
formValidate
).
then
(
res
=>
{
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
{
}
else
{
editConfigAward
(
this
.
formValidate
).
then
(
res
=>
{
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
()
{
del
(
p
)
{
deleteConfigAward
(
id
).
then
(
res
=>
{
deleteConfigAward
({
console
.
log
(
res
);
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
)
{
getjllist
(
type
)
{
configAwards
(
type
).
then
(
res
=>
{
configAwards
(
type
).
then
(
res
=>
{
this
.
data
=
res
;
this
.
data
=
res
;
});
});
},
},
getRu
()
{
getRu
()
{
getActivityConfigRule
(
1
).
then
(
res
=>
{
getActivityConfigRule
({
language
:
"cn"
,
ruleType
:
1
}).
then
(
res
=>
{
this
.
data
=
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