|
40 | 40 | <el-form-item>
|
41 | 41 | <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
42 | 42 | <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
43 |
| - <el-button |
44 |
| - type="success" |
45 |
| - plain |
46 |
| - @click="handleExport" |
47 |
| - :loading="exportLoading" |
48 |
| - v-hasPermi="['point:sign-in-record:export']" |
49 |
| - > |
50 |
| - <Icon icon="ep:download" class="mr-5px" /> 导出 |
51 |
| - </el-button> |
52 | 43 | </el-form-item>
|
53 | 44 | </el-form>
|
54 | 45 | </ContentWrap>
|
|
57 | 48 | <ContentWrap>
|
58 | 49 | <el-table v-loading="loading" :data="list">
|
59 | 50 | <el-table-column label="编号" align="center" prop="id" />
|
60 |
| - <!-- TODO @xiaqing:展示用户昵称 --> |
61 | 51 | <el-table-column label="签到用户" align="center" prop="nickname" />
|
62 | 52 | <el-table-column
|
63 | 53 | label="签到天数"
|
64 | 54 | align="center"
|
65 | 55 | prop="day"
|
66 | 56 | :formatter="(_, __, cellValue) => ['第', cellValue, '天'].join(' ')"
|
67 | 57 | />
|
68 |
| - <el-table-column label="获得积分" align="center" prop="point" /> |
| 58 | + <el-table-column label="获得积分" align="center" prop="point" width="100"> |
| 59 | + <template #default="scope"> |
| 60 | + <el-tag v-if="scope.row.point > 0" class="ml-2" type="success" effect="dark"> |
| 61 | + +{{ scope.row.point }} |
| 62 | + </el-tag> |
| 63 | + <el-tag v-else class="ml-2" type="danger" effect="dark"> {{ scope.row.point }} </el-tag> |
| 64 | + </template> |
| 65 | + </el-table-column> |
69 | 66 | <el-table-column
|
70 | 67 | label="签到时间"
|
71 | 68 | align="center"
|
|
81 | 78 | @pagination="getList"
|
82 | 79 | />
|
83 | 80 | </ContentWrap>
|
84 |
| - |
85 |
| - <!-- 表单弹窗:添加/修改 --> |
86 |
| - <SignInRecordForm ref="formRef" @success="getList" /> |
87 | 81 | </template>
|
88 | 82 |
|
89 | 83 | <script lang="ts" setup>
|
90 | 84 | import { dateFormatter } from '@/utils/formatTime'
|
91 |
| -import download from '@/utils/download' |
92 |
| -import * as SignInRecordApi from '@/api/point/signInRecord' |
| 85 | +import * as SignInRecordApi from '@/api/member/signin/record' |
93 | 86 |
|
94 | 87 | defineOptions({ name: 'SignInRecord' })
|
95 | 88 |
|
@@ -132,21 +125,6 @@ const resetQuery = () => {
|
132 | 125 | handleQuery()
|
133 | 126 | }
|
134 | 127 |
|
135 |
| -/** 导出按钮操作 */ |
136 |
| -const handleExport = async () => { |
137 |
| - try { |
138 |
| - // 导出的二次确认 |
139 |
| - await message.exportConfirm() |
140 |
| - // 发起导出 |
141 |
| - exportLoading.value = true |
142 |
| - const data = await SignInRecordApi.exportSignInRecord(queryParams) |
143 |
| - download.excel(data, '用户签到积分.xls') |
144 |
| - } catch { |
145 |
| - } finally { |
146 |
| - exportLoading.value = false |
147 |
| - } |
148 |
| -} |
149 |
| -
|
150 | 128 | /** 初始化 **/
|
151 | 129 | onMounted(() => {
|
152 | 130 | getList()
|
|
0 commit comments