1、echarts配置化
This commit is contained in:
parent
31dc945f8c
commit
f4d90e74de
28
src/api/trade/index.js
Normal file
28
src/api/trade/index.js
Normal file
@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 用户提现记录
|
||||
export function getUserWithdrawList(data) {
|
||||
return request({
|
||||
url: `/trans/withdraw/list`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 用户审核提现
|
||||
export function setWithdrawStatus(data) {
|
||||
return request({
|
||||
url: `/trans/withdraw/update`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 用户充值记录
|
||||
export function getUserChargeList(data) {
|
||||
return request({
|
||||
url: `/trans/charge/list`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
@ -28,38 +28,51 @@ export default {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
};
|
||||
defaultOption: {
|
||||
title: {
|
||||
text: null,
|
||||
left: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: []
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: []
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: []
|
||||
},
|
||||
watch: {
|
||||
chartData: {
|
||||
deep: true,
|
||||
handler(val) {
|
||||
this.setOptions(val);
|
||||
}
|
||||
}
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart();
|
||||
});
|
||||
},
|
||||
beforeUnmount() {
|
||||
if (!this.chart) {
|
||||
return;
|
||||
}
|
||||
this.chart.dispose();
|
||||
this.chart = null;
|
||||
this.initChart();
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
Object.keys(this.chartData).forEach((key) => {
|
||||
this.defaultOption[key] = this.chartData[key];
|
||||
});
|
||||
const chartDom = document.getElementById('LineChartnew');
|
||||
this.chart = echarts.init(chartDom);
|
||||
this.setOptions(this.chartData);
|
||||
},
|
||||
setOptions(chartData) {
|
||||
const myChart = echarts.init(chartDom);
|
||||
myChart(this.defaultOption);
|
||||
}
|
||||
|
||||
/* setOptions(chartData) {
|
||||
console.log(chartData);
|
||||
let option = {};
|
||||
const series = [];
|
||||
@ -99,7 +112,7 @@ export default {
|
||||
series: series
|
||||
};
|
||||
option && this.chart.setOption(option);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -58,7 +58,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card header="用户量">
|
||||
<LineChartnew :chartData="LinechartData" />
|
||||
<LineChartnew v-if="lineChartsShow" :chartData="LinechartData" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -84,9 +84,11 @@ const goTarget = (url: string) => {
|
||||
window.open(url, '__blank');
|
||||
};
|
||||
const indexObj = ref<indexObjOV>();
|
||||
const lineChartsShow = ref(false);
|
||||
const LinechartData = ref({
|
||||
color: 'red',
|
||||
xAxisData: [],
|
||||
legend: {},
|
||||
series: [
|
||||
{ name: '用户量', data: [] },
|
||||
{ name: '在线用户', data: [] },
|
||||
@ -105,6 +107,7 @@ const getList = async () => {
|
||||
LinechartData.value.series[2].data.push(item.addCartMemberCount);
|
||||
LinechartData.value.series[3].data.push(item.dealMemberCount);
|
||||
});
|
||||
lineChartsShow.value = true;
|
||||
};
|
||||
onMounted(() => {
|
||||
getList();
|
||||
|
265
src/views/trade/withdrawManage/index.vue
Normal file
265
src/views/trade/withdrawManage/index.vue
Normal file
@ -0,0 +1,265 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px" size="default" class="ry_form">
|
||||
<el-form-item label="提现单号" prop="code">
|
||||
<el-input v-model.trim="queryParams.code" placeholder="请输入会员id" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="昵称" prop="nickname">
|
||||
<el-input v-model.trim="queryParams.nickname" placeholder="请输入昵称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="提现人手机号" prop="phone">
|
||||
<el-input v-model.trim="queryParams.phone" placeholder="请输入手机号码" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="提现方式" prop="method">
|
||||
<el-select v-model="queryParams.method">
|
||||
<el-option v-for="item in userWithdrawMethodMap" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="提现类型" prop="type">
|
||||
<el-select v-model="queryParams.type">
|
||||
<el-option v-for="item in userWithdrawTypeMap" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态" prop="auditStatus">
|
||||
<el-select v-model="queryParams.auditStatus">
|
||||
<el-option v-for="item in userWithdrawAuditMap" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="提现状态" prop="status">
|
||||
<el-select v-model="queryParams.status">
|
||||
<el-option v-for="item in userWithdrawStatusMap" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item class="flex_one tr">
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
<!-- <el-button :icon="showMoreCondition ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" @click="showMoreCondition = !showMoreCondition">{{showMoreCondition ? '收起条件' : '展开条件'}}</el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="userWithdrawInfoTableLoading" :data="userWithdrawInfo.data" border empty-text="暂无数据">
|
||||
<el-table-column label="申请人" prop="createBy">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.member ? scope.row.member.nickname : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" prop="createTime" />
|
||||
<el-table-column label="提现码" prop="code" />
|
||||
<el-table-column label="提现金额" prop="money">
|
||||
<template v-slot="scope"> ¥ {{ scope.row.money || '0.00' }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手续费" prop="fee">
|
||||
<template v-slot="scope"> ¥ {{ scope.row.fee || '0.00' }} </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="实际到账金额" prop="actualMoney">
|
||||
<template v-slot="scope"> ¥ {{ scope.row.actualMoney || '0.00' }} </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="提现方式" prop="method">
|
||||
<template v-slot="scope">
|
||||
{{ getEmulistLabelById(scope.row.method, userWithdrawMethodMap) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提现类型" prop="type">
|
||||
<template v-slot="scope">
|
||||
{{ getEmulistLabelById(scope.row.type, userWithdrawTypeMap) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提现状态" prop="status">
|
||||
<template v-slot="scope">
|
||||
{{ getEmulistLabelById(scope.row.status, userWithdrawStatusMap) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批状态" prop="auditStatus">
|
||||
<template v-slot="scope">
|
||||
{{ getEmulistLabelById(scope.row.auditStatus, userWithdrawAuditMap) }}
|
||||
<el-tooltip v-if="scope.row.auditStatus == '2'" :content="scope.row.auditStatus == '2' ? scope.row.auditReason : null" placement="top">
|
||||
<el-icon>
|
||||
<question-filled />
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核人" prop="auditBy" width="100" />
|
||||
<el-table-column label="审核时间" prop="auditTime" width="100" />
|
||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||
<template v-slot="scope">
|
||||
<el-button v-if="scope.row.auditStatus == '0'" text type="primary" @click="showAuditModal(scope.row)">审批</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-if="userWithdrawInfo.total"
|
||||
:total="userWithdrawInfo.total"
|
||||
v-model:page="withdrawDataParams.current"
|
||||
v-model:limit="withdrawDataParams.size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
<!-- 提现审核-->
|
||||
<el-dialog title="提现审核" v-model="auditFormOpen" width="500px" append-to-body>
|
||||
<el-row>
|
||||
<el-col :span="4">审核结果</el-col>
|
||||
<el-col :span="20">
|
||||
<el-select v-model="auditStatus">
|
||||
<el-option v-show="item.value != '0'" v-for="item in userWithdrawAuditMap" :value="item.value" :label="item.label" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="auditStatus == '2'" class="mt2">
|
||||
<el-col :span="4">拒绝原因</el-col>
|
||||
<el-col :span="20">
|
||||
<el-input v-model="auditReason" type="textarea" :rows="3"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="mt6">
|
||||
<el-col :span="12"></el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="default" @click="resetAuditForm">取消</el-button>
|
||||
<el-button type="primary" @click="confirmSubmitAudit">确认</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getUserWithdrawList, setWithdrawStatus } from '@/api/trade/index';
|
||||
|
||||
export default {
|
||||
name: 'UmsWithdrawManage',
|
||||
data() {
|
||||
return {
|
||||
// 用户提现记录
|
||||
userWithdrawInfo: {
|
||||
total: 0,
|
||||
data: [],
|
||||
record: {}
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
nickname: null,
|
||||
phone: null,
|
||||
code: '',
|
||||
method: undefined,
|
||||
type: undefined,
|
||||
auditStatus: undefined,
|
||||
status: undefined
|
||||
},
|
||||
userWithdrawInfoModalVisible: false,
|
||||
userWithdrawInfoTableLoading: false,
|
||||
withdrawDataParams: {
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
auditStatus: null,
|
||||
auditReason: null,
|
||||
auditFormOpen: false,
|
||||
currentRecord: {},
|
||||
userWithdrawMethodMap: [],
|
||||
userWithdrawTypeMap: [],
|
||||
userWithdrawStatusMap: [],
|
||||
userWithdrawAuditMap: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getWithdrawEmu();
|
||||
},
|
||||
methods: {
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
nickName: null,
|
||||
phone: null,
|
||||
code: '',
|
||||
method: undefined,
|
||||
type: undefined,
|
||||
auditStatus: undefined,
|
||||
status: undefined
|
||||
};
|
||||
this.resetForm('form');
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm');
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
showAuditModal(record) {
|
||||
this.currentRecord = record;
|
||||
this.auditFormOpen = true;
|
||||
},
|
||||
resetAuditForm() {
|
||||
this.currentRecord = {};
|
||||
this.auditFormOpen = false;
|
||||
this.auditStatus = null;
|
||||
this.auditReason = null;
|
||||
},
|
||||
// 提交审核
|
||||
confirmSubmitAudit() {
|
||||
const { id, member = {} } = this.currentRecord;
|
||||
const { id: memberId } = member;
|
||||
if (!this.auditStatus) {
|
||||
return this.$modal.msgWarning(`请选择审核结果!`);
|
||||
}
|
||||
const params = {
|
||||
memberId: memberId,
|
||||
id: id,
|
||||
auditStatus: this.auditStatus,
|
||||
auditReason: this.auditReason
|
||||
};
|
||||
setWithdrawStatus(params)
|
||||
.then(() => {
|
||||
this.$modal.msgSuccess('审核成功');
|
||||
this.getList();
|
||||
this.resetAuditForm();
|
||||
})
|
||||
.catch(() => {
|
||||
this.$modal.msgError('审核失败');
|
||||
});
|
||||
},
|
||||
|
||||
/** 查询会员信息列表 */
|
||||
getList() {
|
||||
this.userWithdrawInfoTableLoading = true;
|
||||
const { current: pageNum, size: pageSize } = this.queryParams;
|
||||
const query = { ...this.queryParams, pageNum: undefined, pageSize: undefined };
|
||||
const pageReq = { current: pageNum - 1, size: pageSize };
|
||||
getUserWithdrawList(query, pageReq)
|
||||
.then((response) => {
|
||||
const { records = [], total = 0 } = response.data || {};
|
||||
this.userWithdrawInfo = {
|
||||
total: total,
|
||||
data: records || []
|
||||
};
|
||||
this.userWithdrawInfoTableLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.userWithdrawInfoTableLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
async getWithdrawEmu() {
|
||||
const userWithdrawMethodMap = await this.getDictionaryByKey('ums_withdraw_method');
|
||||
const userWithdrawTypeMap = await this.getDictionaryByKey('ums_withdraw_type');
|
||||
const userWithdrawStatusMap = await this.getDictionaryByKey('ums_withdraw_status');
|
||||
const userWithdrawAuditMap = await this.getDictionaryByKey('sys_common_audit');
|
||||
|
||||
this.userWithdrawMethodMap = userWithdrawMethodMap;
|
||||
this.userWithdrawTypeMap = userWithdrawTypeMap;
|
||||
this.userWithdrawStatusMap = userWithdrawStatusMap;
|
||||
this.userWithdrawAuditMap = userWithdrawAuditMap;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -25,10 +25,10 @@ export default defineConfig(({ mode, command }) => {
|
||||
open: true,
|
||||
proxy: {
|
||||
[env.VITE_APP_BASE_API]: {
|
||||
// target: 'http://192.168.1.13:8080',
|
||||
// target: 'http://192.168.1.38:8080',
|
||||
// target: 'http://192.168.1.32:8080', //佳豪
|
||||
// target: 'http://192.168.1.13:8080', //祥哥
|
||||
target: 'http://111.62.22.190:8080', // 测试环境
|
||||
target: 'http://192.168.1.30:8080', //祥哥
|
||||
// target: 'http://111.62.22.190:8080', // 测试环境
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), ''),
|
||||
|
Loading…
x
Reference in New Issue
Block a user