feat: 新增
This commit is contained in:
parent
0dcdbab835
commit
22d2252dea
|
@ -0,0 +1,71 @@
|
||||||
|
import axios from 'axios';
|
||||||
|
import { S } from 'mockjs';
|
||||||
|
|
||||||
|
|
||||||
|
export interface LoginData {
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface jobuser {
|
||||||
|
status: string;
|
||||||
|
code: number;
|
||||||
|
message: string;
|
||||||
|
data: {
|
||||||
|
jobuser: {
|
||||||
|
username: string; // 账号
|
||||||
|
password: string; // 密码
|
||||||
|
time: Date; // 注册时间
|
||||||
|
type: number; // 累计在线时间
|
||||||
|
}[]
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Black {
|
||||||
|
status: string;
|
||||||
|
code: number;
|
||||||
|
message: string;
|
||||||
|
data: {};
|
||||||
|
}
|
||||||
|
export interface Refresh {
|
||||||
|
status: string;
|
||||||
|
code: number;
|
||||||
|
data: {
|
||||||
|
access_token: string;
|
||||||
|
refresh_token: string;
|
||||||
|
};
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ListParams {
|
||||||
|
black?: string;
|
||||||
|
username?: string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param data 获取列表
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function lists(params: ListParams) {
|
||||||
|
return axios.post<jobuser>('/api/v1/withdraw/lists',params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// *
|
||||||
|
// * @param id 拉黑
|
||||||
|
// * @returns
|
||||||
|
// */
|
||||||
|
// export function getBlack(id: string) {
|
||||||
|
// return axios.post<Black>('/api/v1/jobuser/getBlack', { id });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// *
|
||||||
|
// * @param id 洗白
|
||||||
|
// * @returns
|
||||||
|
// */
|
||||||
|
// export function getOutBlack(id: string) {
|
||||||
|
// return axios.post<Black>('/api/v1/jobuser/getOutBlack', { id });
|
||||||
|
// }
|
|
@ -36,6 +36,8 @@ import localeJobuser from '@/views/jobuser/locale/zh-CN';
|
||||||
import localeJUserblack from '@/views/userblack/locale/zh-CN';
|
import localeJUserblack from '@/views/userblack/locale/zh-CN';
|
||||||
|
|
||||||
import localeDictionary from '@/views/dictionary/locale/zh-CN';
|
import localeDictionary from '@/views/dictionary/locale/zh-CN';
|
||||||
|
|
||||||
|
import localeWithdraw from '@/views/withdraw/locale/zh-CN';
|
||||||
export default {
|
export default {
|
||||||
'menu.dashboard': '仪表盘',
|
'menu.dashboard': '仪表盘',
|
||||||
'menu.server.dashboard': '仪表盘-服务端',
|
'menu.server.dashboard': '仪表盘-服务端',
|
||||||
|
@ -58,6 +60,7 @@ export default {
|
||||||
'menu.volunteerservicecorps':'志愿队',
|
'menu.volunteerservicecorps':'志愿队',
|
||||||
'menu.jobuser':'用户',
|
'menu.jobuser':'用户',
|
||||||
"menu.dictionary":'客服',
|
"menu.dictionary":'客服',
|
||||||
|
"menu.withdraw": '提现管理',
|
||||||
...localeSettings,
|
...localeSettings,
|
||||||
...localeMessageBox,
|
...localeMessageBox,
|
||||||
...localeLogin,
|
...localeLogin,
|
||||||
|
@ -84,5 +87,6 @@ export default {
|
||||||
...localevolunteerservicecorps,
|
...localevolunteerservicecorps,
|
||||||
...localeJobuser,
|
...localeJobuser,
|
||||||
...localeJUserblack,
|
...localeJUserblack,
|
||||||
...localeDictionary
|
...localeDictionary,
|
||||||
|
...localeWithdraw
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
import { DEFAULT_LAYOUT } from '../base';
|
||||||
|
import { AppRouteRecordRaw } from '../types';
|
||||||
|
|
||||||
|
const JOBUSER: AppRouteRecordRaw = {
|
||||||
|
path: '/withdraw',
|
||||||
|
name: 'withdraw',
|
||||||
|
component: DEFAULT_LAYOUT,
|
||||||
|
meta: {
|
||||||
|
locale: 'menu.withdraw',
|
||||||
|
requiresAuth: true,
|
||||||
|
icon: 'icon-user',
|
||||||
|
order: 0,
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'withdraws',
|
||||||
|
name: 'withdraws',
|
||||||
|
component: () => import('@/views/withdraw/index.vue'),
|
||||||
|
meta: {
|
||||||
|
locale: 'menu.withdraw.list',
|
||||||
|
requiresAuth: true,
|
||||||
|
roles: ['*'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default JOBUSER;
|
|
@ -10,8 +10,8 @@
|
||||||
100 积分 = 5 PKR -->
|
100 积分 = 5 PKR -->
|
||||||
<h2 style="text-align: center;">100积分</h2>
|
<h2 style="text-align: center;">100积分</h2>
|
||||||
<a-form :model="form" auto-label-width @submit="handleSubmit">
|
<a-form :model="form" auto-label-width @submit="handleSubmit">
|
||||||
<a-form-item field="USDT" label="USDT">
|
<a-form-item field="BDT" label="BDT">
|
||||||
<a-input v-model="form.USDT" placeholder="请输入对应的USDT汇率" />
|
<a-input v-model="form.USDT" placeholder="请输入对应的BDT汇率" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item field="NGN" label="NGN">
|
<a-form-item field="NGN" label="NGN">
|
||||||
<a-input v-model="form.NGN" placeholder="请输入对应的NGN汇率" />
|
<a-input v-model="form.NGN" placeholder="请输入对应的NGN汇率" />
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
<a-table-column title="用户id" data-index="user_id"></a-table-column>
|
<a-table-column title="用户id" data-index="user_id"></a-table-column>
|
||||||
<a-table-column title="用户名称" data-index="username"></a-table-column>
|
<a-table-column title="用户名称" data-index="username"></a-table-column>
|
||||||
<a-table-column title="用户积分" data-index="money"></a-table-column>
|
<a-table-column title="用户积分" data-index="money"></a-table-column>
|
||||||
|
<a-table-column title="上级代理" data-index="agent"></a-table-column>
|
||||||
<a-table-column title="累计在线时长/分" data-index="time"></a-table-column>
|
<a-table-column title="累计在线时长/分" data-index="time"></a-table-column>
|
||||||
<a-table-column title="注册时间" data-index="time"></a-table-column>
|
<a-table-column title="注册时间" data-index="time"></a-table-column>
|
||||||
<a-table-column title="是否封禁" data-index="black"><template #cell="{ record }">
|
<a-table-column title="是否封禁" data-index="black"><template #cell="{ record }">
|
||||||
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
<template>
|
||||||
|
<div ref="chartContainer" style="width: 800px; height: 550px;"></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { defineComponent, ref, onMounted } from "vue";
|
||||||
|
import * as echarts from "echarts";
|
||||||
|
import { getSonId, getDayId } from '@/api/Invite';
|
||||||
|
import { reactive } from "vue";
|
||||||
|
const chartContainer = ref(null);
|
||||||
|
const props = defineProps({
|
||||||
|
id: Number,
|
||||||
|
});
|
||||||
|
const data = reactive( {
|
||||||
|
name: '',
|
||||||
|
symbolSize:40,
|
||||||
|
children: []
|
||||||
|
});
|
||||||
|
// 树形数据
|
||||||
|
const chartOption = {
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
formatter: '{b}'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
type: 'tree', // 使用树形图
|
||||||
|
layout: 'tree', // 布局类型:'radial' 或 'tree'
|
||||||
|
roam: true, // 启用拖动功能,
|
||||||
|
orient: 'vertical',// 方向改为自上而下
|
||||||
|
initialTreeDepth: -1, // 可以让所有节点都展开
|
||||||
|
data: [
|
||||||
|
data
|
||||||
|
],
|
||||||
|
itemStyle: {
|
||||||
|
color: '#63b1f2', // 节点颜色
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
position: 'top',
|
||||||
|
verticalAlign: 'middle',
|
||||||
|
align: 'center',
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
lineStyle: {
|
||||||
|
color: '#aaa',
|
||||||
|
width: 2,
|
||||||
|
curveness: 0.3,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
// 在组件挂载后初始化图表
|
||||||
|
onMounted(() => {
|
||||||
|
getSonId(props.id).then(res => {
|
||||||
|
data.name = props.id || '';
|
||||||
|
|
||||||
|
if(res.data!=null){
|
||||||
|
res.data.forEach((element: any) => {
|
||||||
|
let item = {
|
||||||
|
name:element.invitename,
|
||||||
|
symbolSize:20,
|
||||||
|
children: []
|
||||||
|
}
|
||||||
|
getSonId(element.invitename).then(res1 => {
|
||||||
|
if(res1.data!=null){
|
||||||
|
res1.data.forEach((element1: any) => {
|
||||||
|
let item1 = {
|
||||||
|
name: element1.invitename,
|
||||||
|
symbolSize:20,
|
||||||
|
children: []
|
||||||
|
};
|
||||||
|
item.children.push(item1);
|
||||||
|
})
|
||||||
|
data.children.push(item);
|
||||||
|
const myChart = echarts.init(chartContainer.value);
|
||||||
|
myChart.setOption(chartOption);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/* 样式可根据需要自定义 */
|
||||||
|
</style>
|
|
@ -0,0 +1,35 @@
|
||||||
|
<template>
|
||||||
|
<a-col class="banner">
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-typography-title :heading="5" style="margin-top: 0">
|
||||||
|
{{ $t('workplace.welcome') }} {{ userInfo.name }}
|
||||||
|
</a-typography-title>
|
||||||
|
</a-col>
|
||||||
|
<a-divider class="panel-border" />
|
||||||
|
</a-col>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { computed } from 'vue';
|
||||||
|
import { useUserStore } from '@/store';
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const userInfo = computed(() => {
|
||||||
|
return {
|
||||||
|
name: userStore.name,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.banner {
|
||||||
|
width: 100%;
|
||||||
|
padding: 20px 20px 0 20px;
|
||||||
|
background-color: var(--color-bg-2);
|
||||||
|
border-radius: 4px 4px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.arco-icon-home) {
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,39 @@
|
||||||
|
<template>
|
||||||
|
<div class="group">
|
||||||
|
<a-card>
|
||||||
|
父亲
|
||||||
|
</a-card>
|
||||||
|
</div>
|
||||||
|
<div class="group">
|
||||||
|
<a-card>
|
||||||
|
我
|
||||||
|
</a-card>
|
||||||
|
</div>
|
||||||
|
<div class="group">
|
||||||
|
<a-card>
|
||||||
|
子
|
||||||
|
</a-card>
|
||||||
|
<a-card>
|
||||||
|
子
|
||||||
|
</a-card>
|
||||||
|
</div>
|
||||||
|
<div class="group">
|
||||||
|
<a-card>
|
||||||
|
孙
|
||||||
|
</a-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { computed } from 'vue';
|
||||||
|
const props = defineProps({
|
||||||
|
id: Number,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.group {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,186 @@
|
||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<Breadcrumb :items="['menu.withdraw', 'menu.withdraw.list']" />
|
||||||
|
|
||||||
|
<a-card class="general-card" :title="$t('menu.withdraw.list')">
|
||||||
|
<a-table :data="data">
|
||||||
|
<template #columns>
|
||||||
|
<a-table-column title="用户id" data-index="user_id"></a-table-column>
|
||||||
|
<a-table-column title="用户名称" data-index="username"></a-table-column>
|
||||||
|
<a-table-column title="转账金额" data-index="money"></a-table-column>
|
||||||
|
<a-table-column title="状态" data-index="status"></a-table-column>
|
||||||
|
<a-table-column title="操作时间" data-index="createtime2"></a-table-column>
|
||||||
|
<a-table-column title="操作">
|
||||||
|
<template #cell="{ record }">
|
||||||
|
<a-button v-if="record.status == '申请中'" @click="showConfirm(record.id)">审批</a-button>
|
||||||
|
</template>
|
||||||
|
</a-table-column>
|
||||||
|
<!-- <a-table-column title="是否封禁" data-index="black"><template #cell="{ record }">
|
||||||
|
{{ record.black == 1 ? '是' : '否' }}
|
||||||
|
</template></a-table-column>
|
||||||
|
<a-table-column title="操作">
|
||||||
|
<template #cell="{ record }">
|
||||||
|
<a-button @click="create(record.id)">编辑</a-button>
|
||||||
|
<a-space>
|
||||||
|
<a-button v-show="record.black != 1" status="danger" @click="showConfirm(record.id)">封禁</a-button>
|
||||||
|
<a-button v-show="record.black == 1" status="danger" @click="showConfirm(record.id)">解禁</a-button>
|
||||||
|
<a-button @click="show_group(record.username)">查看团队</a-button>
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
|
</a-table-column>-->
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
</a-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { computed, ref, reactive, watch, nextTick, onMounted } from 'vue';
|
||||||
|
import { lists } from '@/api/withdraw';
|
||||||
|
import { Modal } from '@arco-design/web-vue';
|
||||||
|
import { Message } from '@arco-design/web-vue';
|
||||||
|
|
||||||
|
interface DataItem {
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
time: Date;
|
||||||
|
money: string;
|
||||||
|
}
|
||||||
|
let data = ref<DataItem[]>([])
|
||||||
|
//弹窗控制
|
||||||
|
const modal_visible=ref(false)
|
||||||
|
//传递下去的用户id
|
||||||
|
const show_group_id=ref(0)
|
||||||
|
const show_group=(id:number)=>{
|
||||||
|
show_group_id.value=id
|
||||||
|
modal_visible.value=true
|
||||||
|
}
|
||||||
|
|
||||||
|
const showConfirm = (id: string) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: '操作提醒',
|
||||||
|
content: '是否同意该用户提现申请',
|
||||||
|
okText: '通过',
|
||||||
|
cancelText: '不通过',
|
||||||
|
onOk: () => handleBlock(id),
|
||||||
|
onCancel: () => Message.info('取消操作'),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const handleBlock = (id: string) => {
|
||||||
|
// getBlack(id).then(res => {
|
||||||
|
// console.log(res.status)
|
||||||
|
// if (res.status == 'success') {
|
||||||
|
// getAll();
|
||||||
|
// Message.success('拉黑成功')
|
||||||
|
// } else {
|
||||||
|
// Message.error('拉黑失败')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
};
|
||||||
|
const queryParams = ref({
|
||||||
|
black: null,
|
||||||
|
username: null
|
||||||
|
});
|
||||||
|
const getAll = () => {
|
||||||
|
lists(queryParams.value).then(res => {
|
||||||
|
data.value = res.data;
|
||||||
|
})
|
||||||
|
};
|
||||||
|
onMounted(async () => {
|
||||||
|
getAll()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.container {
|
||||||
|
padding: 0 20px 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-side {
|
||||||
|
flex: 1;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-side {
|
||||||
|
width: 280px;
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
background-color: var(--color-bg-2);
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.panel-border) {
|
||||||
|
margin-bottom: 0;
|
||||||
|
border-bottom: 1px solid rgb(var(--gray-2));
|
||||||
|
}
|
||||||
|
|
||||||
|
.moduler-wrap {
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: var(--color-bg-2);
|
||||||
|
|
||||||
|
:deep(.text) {
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
color: rgb(var(--gray-8));
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.wrapper) {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
text-align: center;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
.text {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.icon {
|
||||||
|
color: rgb(var(--arcoblue-6));
|
||||||
|
background-color: #e8f3ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
color: rgb(var(--arcoblue-6));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.icon) {
|
||||||
|
display: inline-block;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
color: rgb(var(--dark-gray-1));
|
||||||
|
line-height: 32px;
|
||||||
|
font-size: 16px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: rgb(var(--gray-1));
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
// responsive
|
||||||
|
.mobile {
|
||||||
|
.container {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-side {
|
||||||
|
// display: none;
|
||||||
|
width: 100%;
|
||||||
|
margin-left: 0;
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,5 @@
|
||||||
|
export default {
|
||||||
|
'menu.profile.basic': 'User List',
|
||||||
|
'menu.withdraw.list': '提现记录',
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
export default {
|
||||||
|
'menu.profile.basic': 'User List',
|
||||||
|
'menu.withdraw.list': '提现记录',
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue