parent
664a86e71c
commit
a7f0c8d3a2
@ -10,10 +10,10 @@ export interface ConfigVO {
|
|||||||
|
|
||||||
// 查询积分设置详情
|
// 查询积分设置详情
|
||||||
export const getConfig = async () => {
|
export const getConfig = async () => {
|
||||||
return await request.get({ url: `/point/config/get` })
|
return await request.get({ url: `/member/point/config/get` })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增修改积分设置
|
// 新增修改积分设置
|
||||||
export const saveConfig = async (data: ConfigVO) => {
|
export const saveConfig = async (data: ConfigVO) => {
|
||||||
return await request.put({ url: `/point/config/save`, data })
|
return await request.put({ url: `/member/point/config/save`, data })
|
||||||
}
|
}
|
||||||
|
@ -17,5 +17,5 @@ export interface RecordVO {
|
|||||||
|
|
||||||
// 查询用户积分记录列表
|
// 查询用户积分记录列表
|
||||||
export const getRecordPage = async (params) => {
|
export const getRecordPage = async (params) => {
|
||||||
return await request.get({ url: `/point/record/page`, params })
|
return await request.get({ url: `/member/point/record/page`, params })
|
||||||
}
|
}
|
||||||
|
@ -4,30 +4,30 @@ export interface SignInConfigVO {
|
|||||||
id: number
|
id: number
|
||||||
day: number | null
|
day: number | null
|
||||||
point: number | null
|
point: number | null
|
||||||
isEnable: boolean | null
|
enable: boolean | null
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询积分签到规则列表
|
// 查询积分签到规则列表
|
||||||
export const getSignInConfigPage = async () => {
|
export const getSignInConfigPage = async () => {
|
||||||
return await request.get({ url: `/point/sign-in-config/list` })
|
return await request.get({ url: `/member/point/sign-in-config/list` })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询积分签到规则详情
|
// 查询积分签到规则详情
|
||||||
export const getSignInConfig = async (id: number) => {
|
export const getSignInConfig = async (id: number) => {
|
||||||
return await request.get({ url: `/point/sign-in-config/get?id=` + id })
|
return await request.get({ url: `/member/point/sign-in-config/get?id=` + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增积分签到规则
|
// 新增积分签到规则
|
||||||
export const createSignInConfig = async (data: SignInConfigVO) => {
|
export const createSignInConfig = async (data: SignInConfigVO) => {
|
||||||
return await request.post({ url: `/point/sign-in-config/create`, data })
|
return await request.post({ url: `/member/point/sign-in-config/create`, data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改积分签到规则
|
// 修改积分签到规则
|
||||||
export const updateSignInConfig = async (data: SignInConfigVO) => {
|
export const updateSignInConfig = async (data: SignInConfigVO) => {
|
||||||
return await request.put({ url: `/point/sign-in-config/update`, data })
|
return await request.put({ url: `/member/point/sign-in-config/update`, data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除积分签到规则
|
// 删除积分签到规则
|
||||||
export const deleteSignInConfig = async (id: number) => {
|
export const deleteSignInConfig = async (id: number) => {
|
||||||
return await request.delete({ url: `/point/sign-in-config/delete?id=` + id })
|
return await request.delete({ url: `/member/point/sign-in-config/delete?id=` + id })
|
||||||
}
|
}
|
||||||
|
@ -9,10 +9,10 @@ export interface SignInRecordVO {
|
|||||||
|
|
||||||
// 查询用户签到积分列表
|
// 查询用户签到积分列表
|
||||||
export const getSignInRecordPage = async (params) => {
|
export const getSignInRecordPage = async (params) => {
|
||||||
return await request.get({ url: `/point/sign-in-record/page`, params })
|
return await request.get({ url: `/member/point/sign-in-record/page`, params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出用户签到积分 Excel
|
// 导出用户签到积分 Excel
|
||||||
export const exportSignInRecord = async (params) => {
|
export const exportSignInRecord = async (params) => {
|
||||||
return await request.download({ url: `/point/sign-in-record/export-excel`, params })
|
return await request.download({ url: `/member/point/sign-in-record/export-excel`, params })
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
:inline="true"
|
:inline="true"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<el-form-item label="用户" prop="nickName">
|
<el-form-item label="用户" prop="nickname">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.nickName"
|
v-model="queryParams.nickname"
|
||||||
placeholder="请输入用户昵称"
|
placeholder="请输入用户昵称"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
@ -79,13 +79,13 @@
|
|||||||
<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" />
|
||||||
<el-table-column label="用户" align="center" prop="nickName" />
|
<el-table-column label="用户" align="center" prop="nickname" />
|
||||||
<el-table-column label="积分标题" align="center" prop="title" />
|
<el-table-column label="积分标题" align="center" prop="title" />
|
||||||
<el-table-column label="积分描述" align="center" prop="description" />
|
<el-table-column label="积分描述" align="center" prop="description" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="获得时间"
|
label="获得时间"
|
||||||
align="center"
|
align="center"
|
||||||
prop="createDate"
|
prop="createTime"
|
||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="积分" align="center" prop="point">
|
<el-table-column label="积分" align="center" prop="point">
|
||||||
@ -147,7 +147,7 @@ const list = ref([]) // 列表的数据
|
|||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
nickName: null,
|
nickname: null,
|
||||||
bizType: null,
|
bizType: null,
|
||||||
type: null,
|
type: null,
|
||||||
title: null,
|
title: null,
|
||||||
|
@ -71,6 +71,8 @@ const submitForm = async () => {
|
|||||||
try {
|
try {
|
||||||
const data = formData.value as unknown as SignInConfigApi.SignInConfigVO
|
const data = formData.value as unknown as SignInConfigApi.SignInConfigVO
|
||||||
if (formType.value === 'create') {
|
if (formType.value === 'create') {
|
||||||
|
//默认新创建的自动启动
|
||||||
|
data.enable = true
|
||||||
await SignInConfigApi.createSignInConfig(data)
|
await SignInConfigApi.createSignInConfig(data)
|
||||||
message.success(t('common.createSuccess'))
|
message.success(t('common.createSuccess'))
|
||||||
} else {
|
} else {
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>
|
<div>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.isEnable"
|
v-model="scope.row.enable"
|
||||||
@change="handleSwitchChange(scope.row.id, $event)"
|
@change="handleSwitchChange(scope.row, $event)"
|
||||||
inline-prompt
|
inline-prompt
|
||||||
active-text="开启"
|
active-text="开启"
|
||||||
inactive-text="关闭"
|
inactive-text="关闭"
|
||||||
@ -105,15 +105,11 @@ const handleDelete = async (id: number) => {
|
|||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSwitchChange = async (id, e) => {
|
const handleSwitchChange = async (row, e) => {
|
||||||
console.log('开关状态变更,id:', id, '新状态:', e)
|
console.log('开关状态变更,id:', row, '新状态:', e)
|
||||||
// 创建对象
|
// 创建对象
|
||||||
const signInConfig: SignInConfigVO = {
|
const signInConfig: SignInConfigVO = { enable: e }
|
||||||
id: id,
|
;({ id: signInConfig.id, day: signInConfig.day, point: signInConfig.point, enable: e } = row)
|
||||||
day: null,
|
|
||||||
point: null,
|
|
||||||
isEnable: e
|
|
||||||
}
|
|
||||||
await SignInConfigApi.updateSignInConfig(signInConfig)
|
await SignInConfigApi.updateSignInConfig(signInConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
:inline="true"
|
:inline="true"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<el-form-item label="签到用户" prop="nickName">
|
<el-form-item label="签到用户" prop="nickname">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.nickName"
|
v-model="queryParams.nickname"
|
||||||
placeholder="请输入签到用户"
|
placeholder="请输入签到用户"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
@ -58,7 +58,7 @@
|
|||||||
<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:展示用户昵称 -->
|
<!-- 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="签到天数"
|
||||||
align="center"
|
align="center"
|
||||||
@ -101,7 +101,7 @@ const list = ref([]) // 列表的数据
|
|||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
nickName: null,
|
nickname: null,
|
||||||
day: null,
|
day: null,
|
||||||
createTime: []
|
createTime: []
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user