更新
This commit is contained in:
@@ -17,7 +17,8 @@ import {
|
||||
changePassWordByUser,
|
||||
setMoneyByUser,
|
||||
officialUserData,
|
||||
banUserData
|
||||
banUserData,
|
||||
findUserData
|
||||
} from "@/api/modules/newuserList";
|
||||
import { addDialog } from "@/components/ReDialog";
|
||||
// import { object } from "vue-types";
|
||||
@@ -35,6 +36,10 @@ export function useData() {
|
||||
const loading = ref(true);
|
||||
const tableList = ref([]);
|
||||
const isShow = ref(false);
|
||||
const totalPrice = ref({
|
||||
total_coin: 0,
|
||||
total_earnings: 0
|
||||
})
|
||||
const pagination = ref({
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
@@ -144,7 +149,7 @@ export function useData() {
|
||||
label: "登录状态",
|
||||
prop: "status",
|
||||
cellRenderer: ({ row }) => (
|
||||
<el-tag type={row.status == 2 ? 'error' : 'success'}>{row.status_str}</el-tag>
|
||||
<el-tag type={row.status == 0 ? 'error' : row.status == 2 ? 'warn' : 'success'}>{row.status_str}</el-tag>
|
||||
)
|
||||
},
|
||||
{
|
||||
@@ -171,6 +176,8 @@ export function useData() {
|
||||
if (code) {
|
||||
tableList.value = data.lists;
|
||||
pagination.value.total = data.count;
|
||||
totalPrice.value.total_coin = data.total_coin;
|
||||
totalPrice.value.total_earnings = data.total_earnings;
|
||||
pagination.value.currentPage = +data.page;
|
||||
}
|
||||
loading.value = false;
|
||||
@@ -473,6 +480,17 @@ export function useData() {
|
||||
// });
|
||||
|
||||
}
|
||||
// 找回账号
|
||||
const FindData = async (rowData) => {
|
||||
// console.log(rowData)
|
||||
const { code } = await findUserData({ mobile: rowData.mobile });
|
||||
if (code) {
|
||||
message(`操作成功`, {
|
||||
type: "success"
|
||||
});
|
||||
onSearch(searchForm.value);
|
||||
}
|
||||
}
|
||||
// 修改密码
|
||||
const changePassword = async (rowData: any) => {
|
||||
addDialog({
|
||||
@@ -532,6 +550,8 @@ export function useData() {
|
||||
onSeniorSearch,
|
||||
resetFieldsSearch,
|
||||
exportExcel,
|
||||
changeSearchValue
|
||||
changeSearchValue,
|
||||
FindData,
|
||||
totalPrice
|
||||
};
|
||||
}
|
||||
@@ -25,7 +25,9 @@ const {
|
||||
onSeniorSearch,
|
||||
resetFieldsSearch,
|
||||
exportExcel,
|
||||
changeSearchValue
|
||||
changeSearchValue,
|
||||
FindData,
|
||||
totalPrice
|
||||
} = useData();
|
||||
defineOptions({
|
||||
name: "newuserList"
|
||||
@@ -53,6 +55,10 @@ onMounted(() => {
|
||||
<PureTableBar title="会员列表" :class="[isShow && !deviceDetection() ? '!w-[60vw]' : 'w-full']" :columns="tableLabel"
|
||||
@refresh="onSearch">
|
||||
<template #buttons>
|
||||
<div style="display: inline-flex;align-items: center;" class="mr-10">当前平台用户总计:<span
|
||||
style="color: red;margin-right: 5px;">{{
|
||||
totalPrice.total_coin }}</span> 金币,<span style="color: red;margin-right: 5px;">{{
|
||||
totalPrice.total_earnings }}</span> 钻石。</div>
|
||||
<el-button type="primary" @click="exportExcel">
|
||||
导出
|
||||
</el-button>
|
||||
@@ -71,6 +77,13 @@ onMounted(() => {
|
||||
<el-button link type="primary" @click="viewDetail(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-popconfirm :title="`是否找回账号`" @confirm="FindData(row)">
|
||||
<template #reference>
|
||||
<el-button v-if="row.status == 0" link type="primary">
|
||||
找回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
<el-button link type="primary" @click="handleBanData(row)">
|
||||
{{ row.status == 2 ? '解封' : '禁用' }}
|
||||
</el-button>
|
||||
|
||||
Reference in New Issue
Block a user