This commit is contained in:
parent
8e31957279
commit
9eb285861c
|
@ -20,3 +20,6 @@ export interface PopularRecord {
|
|||
export function queryPopularList(params: { type: string }) {
|
||||
return axios.get<TableData[]>('/api/popular/list', { params });
|
||||
}
|
||||
export function index() {
|
||||
return axios.post<any>('/admin/api/v1/Dashboard/index');
|
||||
}
|
||||
|
|
|
@ -48,8 +48,9 @@ export interface ListParams {
|
|||
* @param data 获取列表
|
||||
* @returns
|
||||
*/
|
||||
export function lists() {
|
||||
return axios.post<jobuser>('/admin/api/v1/jobuser/lists');
|
||||
export function lists(key:string,status:Number) {
|
||||
key=key?key:"";
|
||||
return axios.post<jobuser>('/admin/api/v1/jobuser/lists',{key,status});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -57,7 +58,7 @@ export function lists() {
|
|||
* @param id 封禁用户
|
||||
* @returns
|
||||
*/
|
||||
export function black(id: string) {
|
||||
export function black(id: number) {
|
||||
return axios.post<Black>('/admin/api/v1/jobuser/black', { id });
|
||||
}
|
||||
|
||||
|
@ -66,7 +67,7 @@ export function black(id: string) {
|
|||
* @param id 解禁用户
|
||||
* @returns
|
||||
*/
|
||||
export function OutBlack(id: string) {
|
||||
export function OutBlack(id: number) {
|
||||
return axios.post<Black>('/admin/api/v1/jobuser/outblack', { id });
|
||||
}
|
||||
/**
|
||||
|
@ -74,7 +75,7 @@ export function OutBlack(id: string) {
|
|||
* @param id 查询用户树
|
||||
* @returns
|
||||
*/
|
||||
export function getSonId(id: string) {
|
||||
export function getSonId(id: number) {
|
||||
return axios.post<Black>('/admin/api/v1/jobuser/getSonId', { id });
|
||||
}
|
||||
|
||||
|
@ -83,6 +84,33 @@ export function getSonId(id: string) {
|
|||
* @param id 删除用户
|
||||
* @returns
|
||||
*/
|
||||
export function del(id: string) {
|
||||
export function del(id: number) {
|
||||
return axios.post<Black>('/admin/api/v1/jobuser/del', { id });
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param 设置用户密码
|
||||
* @returns
|
||||
*/
|
||||
export function set_user_password(id: number,password:string) {
|
||||
return axios.post<Black>('/admin/api/v1/jobuser/set_user_password', { id,password });
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param 设置用户备注
|
||||
* @returns
|
||||
*/
|
||||
export function set_user_remark(id: number,remark:string) {
|
||||
return axios.post<Black>('/admin/api/v1/jobuser/set_user_remark', { id,remark });
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param 获取用户提现记录
|
||||
* @returns
|
||||
*/
|
||||
export function get_user_withdraw(id: number) {
|
||||
return axios.post<Black>('/admin/api/v1/jobuser/get_user_withdraw', { id });
|
||||
}
|
|
@ -22,17 +22,6 @@ const JOBUSER: AppRouteRecordRaw = {
|
|||
roles: ['*'],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'userblack',
|
||||
name: 'userblack',
|
||||
component: () => import('@/views/userblack/index.vue'),
|
||||
meta: {
|
||||
locale: 'menu.userblack.userlist',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
},
|
||||
},
|
||||
|
||||
// {
|
||||
// path: 'monitor',
|
||||
// name: 'Monitor',
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
// import { DEFAULT_LAYOUT } from '../base';
|
||||
// import { AppRouteRecordRaw } from '../types';
|
||||
import { DEFAULT_LAYOUT } from '../base';
|
||||
import { AppRouteRecordRaw } from '../types';
|
||||
|
||||
// const LIST: AppRouteRecordRaw = {
|
||||
// path: '/list',
|
||||
// name: 'list',
|
||||
// component: DEFAULT_LAYOUT,
|
||||
// meta: {
|
||||
// locale: 'menu.list',
|
||||
// requiresAuth: true,
|
||||
// icon: 'icon-list',
|
||||
// order: 2,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'search-table', // The midline path complies with SEO specifications
|
||||
// name: 'SearchTable',
|
||||
// component: () => import('@/views/list/search-table/index.vue'),
|
||||
// meta: {
|
||||
// locale: 'menu.list.searchTable',
|
||||
// requiresAuth: true,
|
||||
// roles: ['*'],
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: 'card',
|
||||
// name: 'Card',
|
||||
// component: () => import('@/views/list/card/index.vue'),
|
||||
// meta: {
|
||||
// locale: 'menu.list.cardList',
|
||||
// requiresAuth: true,
|
||||
// roles: ['*'],
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
const LIST: AppRouteRecordRaw = {
|
||||
path: '/list',
|
||||
name: 'list',
|
||||
component: DEFAULT_LAYOUT,
|
||||
meta: {
|
||||
locale: 'menu.list',
|
||||
requiresAuth: true,
|
||||
icon: 'icon-list',
|
||||
order: 2,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'search-table', // The midline path complies with SEO specifications
|
||||
name: 'SearchTable',
|
||||
component: () => import('@/views/list/search-table/index.vue'),
|
||||
meta: {
|
||||
locale: 'menu.list.searchTable',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'card',
|
||||
name: 'Card',
|
||||
component: () => import('@/views/list/card/index.vue'),
|
||||
meta: {
|
||||
locale: 'menu.list.cardList',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// export default LIST;
|
||||
export default LIST;
|
||||
|
|
|
@ -1,97 +1,109 @@
|
|||
<template>
|
||||
<a-grid :cols="24" :row-gap="16" class="panel">
|
||||
<a-grid-item
|
||||
class="panel-col"
|
||||
:span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
|
||||
>
|
||||
<a-grid-item class="panel-col" :span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }">
|
||||
<a-space>
|
||||
<a-avatar :size="54" class="col-avatar">
|
||||
<img
|
||||
alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/288b89194e657603ff40db39e8072640.svg~tplv-49unhts6dw-image.image"
|
||||
/>
|
||||
<img alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/288b89194e657603ff40db39e8072640.svg~tplv-49unhts6dw-image.image" />
|
||||
</a-avatar>
|
||||
<a-statistic
|
||||
:title="$t('workplace.onlineContent')"
|
||||
:value="373.5"
|
||||
:precision="1"
|
||||
:value-from="0"
|
||||
animation
|
||||
show-group-separator
|
||||
>
|
||||
<a-statistic :title="'用户总数'" :value="data.user_total" :value-from="0" animation show-group-separator>
|
||||
<template #suffix>
|
||||
<span class="unit">个</span>
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
</a-grid-item>
|
||||
<a-grid-item class="panel-col" :span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }">
|
||||
<a-space>
|
||||
<a-avatar :size="54" class="col-avatar">
|
||||
<img alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/fdc66b07224cdf18843c6076c2587eb5.svg~tplv-49unhts6dw-image.image" />
|
||||
</a-avatar>
|
||||
<a-statistic :title="'总手机号'" :value="data.user_phone" :value-from="0" animation show-group-separator>
|
||||
<template #suffix>
|
||||
<span class="unit">{{ $t('workplace.pecs') }}</span>
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
</a-grid-item>
|
||||
<a-grid-item class="panel-col" :span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }">
|
||||
<a-space>
|
||||
<a-avatar :size="54" class="col-avatar">
|
||||
<img alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/77d74c9a245adeae1ec7fb5d4539738d.svg~tplv-49unhts6dw-image.image" />
|
||||
</a-avatar>
|
||||
<a-statistic :title="'当前在线手机号'" :value="data.user_phone_onlin" :value-from="0" animation show-group-separator>
|
||||
<template #suffix>
|
||||
<span class="unit">{{ $t('workplace.pecs') }}</span>
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
</a-grid-item>
|
||||
<a-grid-item class="panel-col" :span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
|
||||
style="border-right: none">
|
||||
<a-space>
|
||||
<a-avatar :size="54" class="col-avatar">
|
||||
<img alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/c8b36e26d2b9bb5dbf9b74dd6d7345af.svg~tplv-49unhts6dw-image.image" />
|
||||
</a-avatar>
|
||||
<a-statistic :title="'提款人数'" :value="data.withdraw" :value-from="0" animation>
|
||||
<template #suffix> 人 </template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
</a-grid-item>
|
||||
<a-grid-item :span="24">
|
||||
<a-divider class="panel-border" />
|
||||
</a-grid-item>
|
||||
</a-grid>
|
||||
<a-grid :cols="24" :row-gap="16" class="panel">
|
||||
<a-grid-item class="panel-col" :span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }">
|
||||
<a-space>
|
||||
<a-avatar :size="54" class="col-avatar">
|
||||
<img alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/288b89194e657603ff40db39e8072640.svg~tplv-49unhts6dw-image.image" />
|
||||
</a-avatar>
|
||||
<a-statistic :title="$t('workplace.onlineContent')" :value="373.5" :precision="1" :value-from="0" animation
|
||||
show-group-separator>
|
||||
<template #suffix>
|
||||
W+ <span class="unit">{{ $t('workplace.pecs') }}</span>
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
</a-grid-item>
|
||||
<a-grid-item
|
||||
class="panel-col"
|
||||
:span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
|
||||
>
|
||||
<a-grid-item class="panel-col" :span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }">
|
||||
<a-space>
|
||||
<a-avatar :size="54" class="col-avatar">
|
||||
<img
|
||||
alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/fdc66b07224cdf18843c6076c2587eb5.svg~tplv-49unhts6dw-image.image"
|
||||
/>
|
||||
<img alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/fdc66b07224cdf18843c6076c2587eb5.svg~tplv-49unhts6dw-image.image" />
|
||||
</a-avatar>
|
||||
<a-statistic
|
||||
:title="$t('workplace.putIn')"
|
||||
:value="368"
|
||||
:value-from="0"
|
||||
animation
|
||||
show-group-separator
|
||||
>
|
||||
<a-statistic :title="$t('workplace.putIn')" :value="368" :value-from="0" animation show-group-separator>
|
||||
<template #suffix>
|
||||
<span class="unit">{{ $t('workplace.pecs') }}</span>
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
</a-grid-item>
|
||||
<a-grid-item
|
||||
class="panel-col"
|
||||
:span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
|
||||
>
|
||||
<a-grid-item class="panel-col" :span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }">
|
||||
<a-space>
|
||||
<a-avatar :size="54" class="col-avatar">
|
||||
<img
|
||||
alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/77d74c9a245adeae1ec7fb5d4539738d.svg~tplv-49unhts6dw-image.image"
|
||||
/>
|
||||
<img alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/77d74c9a245adeae1ec7fb5d4539738d.svg~tplv-49unhts6dw-image.image" />
|
||||
</a-avatar>
|
||||
<a-statistic
|
||||
:title="$t('workplace.newDay')"
|
||||
:value="8874"
|
||||
:value-from="0"
|
||||
animation
|
||||
show-group-separator
|
||||
>
|
||||
<a-statistic :title="$t('workplace.newDay')" :value="8874" :value-from="0" animation show-group-separator>
|
||||
<template #suffix>
|
||||
<span class="unit">{{ $t('workplace.pecs') }}</span>
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
</a-grid-item>
|
||||
<a-grid-item
|
||||
class="panel-col"
|
||||
:span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
|
||||
style="border-right: none"
|
||||
>
|
||||
<a-grid-item class="panel-col" :span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
|
||||
style="border-right: none">
|
||||
<a-space>
|
||||
<a-avatar :size="54" class="col-avatar">
|
||||
<img
|
||||
alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/c8b36e26d2b9bb5dbf9b74dd6d7345af.svg~tplv-49unhts6dw-image.image"
|
||||
/>
|
||||
<img alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/c8b36e26d2b9bb5dbf9b74dd6d7345af.svg~tplv-49unhts6dw-image.image" />
|
||||
</a-avatar>
|
||||
<a-statistic
|
||||
:title="$t('workplace.newFromYesterday')"
|
||||
:value="2.8"
|
||||
:precision="1"
|
||||
:value-from="0"
|
||||
animation
|
||||
>
|
||||
<a-statistic :title="$t('workplace.newFromYesterday')" :value="2.8" :precision="1" :value-from="0" animation>
|
||||
<template #suffix> % <icon-caret-up class="up-icon" /> </template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
|
@ -102,30 +114,56 @@
|
|||
</a-grid>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script lang="ts" setup>
|
||||
import { index } from '@/api/dashboard';
|
||||
import { Ref, onMounted, reactive } from 'vue';
|
||||
const data = reactive({
|
||||
user_total: 0,
|
||||
user_phone: 0,
|
||||
withdraw: 0,
|
||||
user_phone_onlin: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
setInterval(async () => {
|
||||
const res = await index();
|
||||
data.user_phone=res.data.user_phone
|
||||
data.user_phone_onlin=res.data.user_phone_onlin
|
||||
data.user_total=res.data.user_total
|
||||
data.withdraw=res.data.withdraw
|
||||
}, 1000)
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.arco-grid.panel {
|
||||
.arco-grid.panel {
|
||||
margin-bottom: 0;
|
||||
padding: 16px 20px 0 20px;
|
||||
}
|
||||
.panel-col {
|
||||
}
|
||||
|
||||
.panel-col {
|
||||
padding-left: 43px;
|
||||
border-right: 1px solid rgb(var(--gray-2));
|
||||
}
|
||||
.col-avatar {
|
||||
}
|
||||
|
||||
.col-avatar {
|
||||
margin-right: 12px;
|
||||
background-color: var(--color-fill-2);
|
||||
}
|
||||
.up-icon {
|
||||
}
|
||||
|
||||
.up-icon {
|
||||
color: rgb(var(--red-6));
|
||||
}
|
||||
.unit {
|
||||
}
|
||||
|
||||
.unit {
|
||||
margin-left: 8px;
|
||||
color: rgb(var(--gray-8));
|
||||
font-size: 12px;
|
||||
}
|
||||
:deep(.panel-border) {
|
||||
}
|
||||
|
||||
:deep(.panel-border) {
|
||||
margin: 4px 0 0 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
<template>
|
||||
<a-col class="banner">
|
||||
<a-col :span="8">
|
||||
<a-form-item field="password" label="密码" validate-trigger="blur">
|
||||
<a-input-password v-model="form.password" placeholder="please enter your password..." />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-col>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
|
||||
</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,33 @@
|
|||
<template>
|
||||
<a-card>
|
||||
<a-table :data="data">
|
||||
<template #columns>
|
||||
<a-table-column title="金额" data-index="money"></a-table-column>
|
||||
<a-table-column title="状态">
|
||||
<template #cell="{ record }">
|
||||
<!-- {{ record.status }} -->
|
||||
{{ record.status_text }}
|
||||
</template>
|
||||
</a-table-column>
|
||||
<a-table-column title="时间">
|
||||
<template #cell="{ record }">
|
||||
{{ dayjs(record.createtime2).format('YYYY-MM-DD HH:MM') }}
|
||||
</template>
|
||||
</a-table-column>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import { useUserStore } from '@/store';
|
||||
import dayjs from 'dayjs';
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
},
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
@ -2,7 +2,60 @@
|
|||
<div class="container">
|
||||
<Breadcrumb :items="['menu.jobuser', 'menu.jobuser.userlist']" />
|
||||
|
||||
|
||||
|
||||
<a-card class="general-card" :title="$t('menu.jobuser.userlist')">
|
||||
<a-row>
|
||||
<a-col :flex="1">
|
||||
<a-form :model="queryParams" :label-col-props="{ span: 6 }" :wrapper-col-props="{ span: 18 }"
|
||||
label-align="left">
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="8">
|
||||
<a-form-item field="name" :label="'关键字'">
|
||||
<a-input v-model="queryParams.key" :placeholder="'请输入关键字'" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="8">
|
||||
<a-form-item field="createdTime" :label="$t('searchTable.form.createdTime')">
|
||||
<a-range-picker v-model="formModel.createdTime" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
<a-col :span="8">
|
||||
<a-form-item field="status" :label="$t('searchTable.form.status')">
|
||||
<a-select v-model="queryParams.status" :options="[
|
||||
{
|
||||
label: '全部',
|
||||
value: -1,
|
||||
},{
|
||||
label: '封禁',
|
||||
value: 0
|
||||
}, {
|
||||
label: '正常',
|
||||
value: 1,
|
||||
}]" :placeholder="'状态'" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-col>
|
||||
|
||||
<a-col :flex="'86px'" style="text-align: right">
|
||||
<a-space :size="18">
|
||||
<a-button type="primary" @click="getAll">
|
||||
<template #icon>
|
||||
<icon-search />
|
||||
</template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button @click="reset">
|
||||
<template #icon>
|
||||
<icon-refresh />
|
||||
</template>
|
||||
重置
|
||||
</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-table :data="data">
|
||||
<template #columns>
|
||||
<a-table-column title="用户id" data-index="id"></a-table-column>
|
||||
|
@ -28,8 +81,9 @@
|
|||
<a-table-column title="操作">
|
||||
<template #cell="{ record }">
|
||||
<a-space>
|
||||
<a-button status="" @click="showConfirm(record.id)">提现记录</a-button>
|
||||
<a-button @click="handleBeforeOk_withdraw(record.id)">提现记录</a-button>
|
||||
<a-button @click="show_group(record.id)">修改密码</a-button>
|
||||
<a-button @click="set_remark(record.id)">修改备注</a-button>
|
||||
<a-button v-if="record.status == 1" status="danger" @click="showConfirm(record.id)">封禁</a-button>
|
||||
<a-button v-if="record.status == 0" status="success" @click="showConfirm_out(record.id)">解禁</a-button>
|
||||
<a-button status="danger" @click="showConfirm_del(record.id)">删除</a-button>
|
||||
|
@ -46,23 +100,42 @@
|
|||
</template>
|
||||
<FamilyTreeChart :id="show_group_id" v-if="modal_visible"></FamilyTreeChart>
|
||||
</a-modal> -->
|
||||
<a-modal v-model:visible="modal_visible" width="800px">
|
||||
<a-modal v-model:visible="modal_visible" width="800px" @before-ok="handleBeforeOk">
|
||||
<template #title>
|
||||
下级成员展示
|
||||
修改密码
|
||||
</template>
|
||||
<setpassword :id="show_group_id" v-if="modal_visible"></setpassword>
|
||||
<a-col :span="8">
|
||||
<a-form-item field="password" label="密码" validate-trigger="blur">
|
||||
<a-input-password v-model="password" placeholder="请输入密码" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-modal>
|
||||
<a-modal v-model:visible="modal_visible_remark" width="800px" @before-ok="handleBeforeOk_remark">
|
||||
<template #title>
|
||||
修改备注
|
||||
</template>
|
||||
<a-col :span="8">
|
||||
<a-form-item field="remark" label="备注" validate-trigger="blur">
|
||||
<a-input v-model="remark" placeholder="请输入备注" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-modal>
|
||||
<a-modal v-model:visible="modal_visible_withdraw" width="800px">
|
||||
<template #title>
|
||||
用户提现记录
|
||||
</template>
|
||||
<withdrawitem :data="withdraw"></withdrawitem>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, reactive, watch, nextTick, onMounted } from 'vue';
|
||||
import { lists, black, ListParams, OutBlack, del } from '@/api/jobuser';
|
||||
import { lists, black, OutBlack, del, set_user_password, set_user_remark,get_user_withdraw } from '@/api/jobuser';
|
||||
import { Modal } from '@arco-design/web-vue';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import dayjs from 'dayjs';
|
||||
import showgroup from './components/showgroup.vue';
|
||||
import setpassword from './components/setpassword.vue';
|
||||
import withdrawitem from './components/withdrawitem.vue';
|
||||
|
||||
interface DataItem {
|
||||
id: number;
|
||||
|
@ -71,16 +144,36 @@ interface DataItem {
|
|||
time: Date;
|
||||
money: string;
|
||||
}
|
||||
//设置备注弹窗
|
||||
const modal_visible_remark = ref(false)
|
||||
//用户提现记录弹窗
|
||||
const modal_visible_withdraw = ref(false)
|
||||
|
||||
const remark = ref("")
|
||||
const password = ref("")
|
||||
let data = ref<DataItem[]>([])
|
||||
//弹窗控制
|
||||
const modal_visible = ref(false)
|
||||
//传递下去的用户id
|
||||
const show_group_id = ref(0)
|
||||
//保存需要修改的用户id
|
||||
const userid = ref(0)
|
||||
const show_group = (id: number) => {
|
||||
show_group_id.value = id
|
||||
userid.value = id
|
||||
modal_visible.value = true
|
||||
}
|
||||
|
||||
const set_remark = (id: number) => {
|
||||
userid.value = id
|
||||
modal_visible_remark.value = true
|
||||
}
|
||||
const withdraw=ref([])
|
||||
const handleBeforeOk_withdraw = async (id: number) => {
|
||||
userid.value = id
|
||||
modal_visible_withdraw.value = true
|
||||
const res= await get_user_withdraw(id);
|
||||
withdraw.value=[];
|
||||
withdraw.value=res.data;
|
||||
}
|
||||
|
||||
const showConfirm = (id: string) => {
|
||||
Modal.confirm({
|
||||
title: '操作提醒',
|
||||
|
@ -103,7 +196,7 @@ const showConfirm_del = (id: string) => {
|
|||
onOk: () => deluser(id),
|
||||
});
|
||||
};
|
||||
const deluser = async (id: string) => {
|
||||
const deluser = async (id: any) => {
|
||||
const res = await del(id);
|
||||
if (res.code == 200) {
|
||||
getAll()
|
||||
|
@ -116,6 +209,23 @@ const OutBlock = async (id: string) => {
|
|||
}
|
||||
};
|
||||
|
||||
const handleBeforeOk = async () => {
|
||||
const res = await set_user_password(userid.value, password.value);
|
||||
if (res.code == 200) {
|
||||
Message.success('修改密码成功')
|
||||
}
|
||||
password.value = ""
|
||||
}
|
||||
|
||||
const handleBeforeOk_remark = async () => {
|
||||
const res = await set_user_remark(userid.value, remark.value);
|
||||
if (res.code == 200) {
|
||||
Message.success('修改备注成功')
|
||||
getAll()
|
||||
}
|
||||
remark.value = ""
|
||||
}
|
||||
|
||||
const handleBlock = async (id: string) => {
|
||||
const res = await black(id);
|
||||
if (res.code == 200) {
|
||||
|
@ -126,14 +236,20 @@ const handleBlock = async (id: string) => {
|
|||
}
|
||||
};
|
||||
const queryParams = ref({
|
||||
black: null,
|
||||
username: null
|
||||
key: "",
|
||||
status: 1
|
||||
});
|
||||
|
||||
const reset=()=>{
|
||||
queryParams.value.key=""
|
||||
queryParams.value.status=-1
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有的用户列表
|
||||
*/
|
||||
const getAll = async () => {
|
||||
const res = await lists();
|
||||
const res: any = await lists(queryParams.value.key, queryParams.value.status);
|
||||
if (res.code == 200) {
|
||||
data.value = res.data;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue