Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
be485cc4
authored
Aug 20, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review:签到记录
parent
82628ce7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
37 deletions
+10
-37
src/api/member/signin/record/index.ts
+0
-5
src/views/member/point/record/index.vue
+1
-1
src/views/member/signin/record/index.vue
+9
-31
No files found.
src/api/member/signin/record/index.ts
View file @
be485cc4
...
@@ -11,8 +11,3 @@ export interface SignInRecordVO {
...
@@ -11,8 +11,3 @@ export interface SignInRecordVO {
export
const
getSignInRecordPage
=
async
(
params
)
=>
{
export
const
getSignInRecordPage
=
async
(
params
)
=>
{
return
await
request
.
get
({
url
:
`/member/point/sign-in-record/page`
,
params
})
return
await
request
.
get
({
url
:
`/member/point/sign-in-record/page`
,
params
})
}
}
// 导出用户签到积分 Excel
export
const
exportSignInRecord
=
async
(
params
)
=>
{
return
await
request
.
download
({
url
:
`/member/point/sign-in-record/export-excel`
,
params
})
}
src/views/member/point/record/index.vue
View file @
be485cc4
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
width=
"180"
width=
"180"
/>
/>
<el-table-column
label=
"用户"
align=
"center"
prop=
"nickname"
width=
"200"
/>
<el-table-column
label=
"用户"
align=
"center"
prop=
"nickname"
width=
"200"
/>
<el-table-column
label=
"
变动
积分"
align=
"center"
prop=
"point"
width=
"100"
>
<el-table-column
label=
"
获得
积分"
align=
"center"
prop=
"point"
width=
"100"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-tag
v-if=
"scope.row.point > 0"
class=
"ml-2"
type=
"success"
effect=
"dark"
>
<el-tag
v-if=
"scope.row.point > 0"
class=
"ml-2"
type=
"success"
effect=
"dark"
>
+
{{
scope
.
row
.
point
}}
+
{{
scope
.
row
.
point
}}
...
...
src/views/member/signin/record/index.vue
View file @
be485cc4
...
@@ -40,15 +40,6 @@
...
@@ -40,15 +40,6 @@
<el-form-item>
<el-form-item>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<el-button
type=
"success"
plain
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['point:sign-in-record:export']"
>
<Icon
icon=
"ep:download"
class=
"mr-5px"
/>
导出
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</ContentWrap>
</ContentWrap>
...
@@ -57,7 +48,6 @@
...
@@ -57,7 +48,6 @@
<ContentWrap>
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<!-- TODO @xiaqing:展示用户昵称 -->
<el-table-column
label=
"签到用户"
align=
"center"
prop=
"nickname"
/>
<el-table-column
label=
"签到用户"
align=
"center"
prop=
"nickname"
/>
<el-table-column
<el-table-column
label=
"签到天数"
label=
"签到天数"
...
@@ -65,7 +55,14 @@
...
@@ -65,7 +55,14 @@
prop=
"day"
prop=
"day"
:formatter=
"(_, __, cellValue) => ['第', cellValue, '天'].join(' ')"
:formatter=
"(_, __, cellValue) => ['第', cellValue, '天'].join(' ')"
/>
/>
<el-table-column
label=
"获得积分"
align=
"center"
prop=
"point"
/>
<el-table-column
label=
"获得积分"
align=
"center"
prop=
"point"
width=
"100"
>
<template
#
default=
"scope"
>
<el-tag
v-if=
"scope.row.point > 0"
class=
"ml-2"
type=
"success"
effect=
"dark"
>
+
{{
scope
.
row
.
point
}}
</el-tag>
<el-tag
v-else
class=
"ml-2"
type=
"danger"
effect=
"dark"
>
{{
scope
.
row
.
point
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
<el-table-column
label=
"签到时间"
label=
"签到时间"
align=
"center"
align=
"center"
...
@@ -81,15 +78,11 @@
...
@@ -81,15 +78,11 @@
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</ContentWrap>
</ContentWrap>
<!-- 表单弹窗:添加/修改 -->
<SignInRecordForm
ref=
"formRef"
@
success=
"getList"
/>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
download
from
'@/utils/download'
import
*
as
SignInRecordApi
from
'@/api/member/signin/record'
import
*
as
SignInRecordApi
from
'@/api/point/signInRecord'
defineOptions
({
name
:
'SignInRecord'
})
defineOptions
({
name
:
'SignInRecord'
})
...
@@ -132,21 +125,6 @@ const resetQuery = () => {
...
@@ -132,21 +125,6 @@ const resetQuery = () => {
handleQuery
()
handleQuery
()
}
}
/** 导出按钮操作 */
const
handleExport
=
async
()
=>
{
try
{
// 导出的二次确认
await
message
.
exportConfirm
()
// 发起导出
exportLoading
.
value
=
true
const
data
=
await
SignInRecordApi
.
exportSignInRecord
(
queryParams
)
download
.
excel
(
data
,
'用户签到积分.xls'
)
}
catch
{
}
finally
{
exportLoading
.
value
=
false
}
}
/** 初始化 **/
/** 初始化 **/
onMounted
(()
=>
{
onMounted
(()
=>
{
getList
()
getList
()
...
...
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