feat: init+修改node版本

This commit is contained in:
2025-12-22 12:48:14 +08:00
parent 6d9d7ad37e
commit 0e57c19027
329 changed files with 64992 additions and 10 deletions

View File

@@ -0,0 +1,216 @@
<template>
<div class="assets common-main">
<el-form ref="accountAssetsForm" :inline="true" :model="ruleForm" :rules="rules"
class="search-container" :label-position="'right'" label-width="80px">
<el-form-item label="用户ID">
<el-input v-model="ruleForm.userId" placeholder="用户ID" class="inputauto"
clearable></el-input>
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="ruleForm.userName" placeholder="用户名" class="inputauto"
clearable></el-input>
</el-form-item>
<el-form-item label="手机号码" :span="8">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.mobile"
placeholder="手机号码" clearable></el-input>
</el-form-item>
<el-form-item label="币种">
<el-select v-model="ruleForm.coinId" placeholder="币种" clearable>
<el-option label="全部" value=""></el-option>
<el-option :label="item.name" :value="item.id" v-for="item in coinAll"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="ruleForm.status" placeholder="状态" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="正常" value="1"></el-option>
<el-option label="冻结" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="账户余额">
<el-col :span="12">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.startAmount"
clearable placeholder=""></el-input>
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="10">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.endAmount"
clearable placeholder=""></el-input>
</el-col>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('accountAssetsForm')">搜索</el-button>
<el-button icon="el-icon-download" type="primary"
@click="exportExcel('accountAssetsForm','/account/exportList','账户资产')"
:disabled="listData.length == 0">导出
</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table :data="listData" style="width: 100%" v-loading="listLoading">
<el-table-column prop="id" label="ID" width="180">
</el-table-column>
<el-table-column prop="userId" label="用户ID" width="180">
</el-table-column>
<el-table-column prop="userName" label="用户名" width="120">
</el-table-column>
<el-table-column prop="realName" label="真实姓名" width="120">
</el-table-column>
<el-table-column prop="coinName" label="币种名称">
</el-table-column>
<el-table-column prop="mobile" label="手机号码" width="150">
</el-table-column>
<el-table-column prop="balanceAmount" label="账户余额">
</el-table-column>
<el-table-column prop="freezeAmount" label="冻结余额">
</el-table-column>
<el-table-column prop="recAddr" label="钱包地址">
</el-table-column>
<el-table-column prop="rechargeAmount" label="总充值">
</el-table-column>
<el-table-column prop="withdrawalsAmount" label="总提现">
</el-table-column>
<el-table-column prop="statusStr" label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status | accountAssetsListStatus}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="250">
<template slot-scope="scope">
<el-button
@click="recharge(scope.row)"
type="primary"
size="small">充值
</el-button>
<el-button
v-if="scope.row.status == 1"
@click="handleFreeze(scope.row)"
size="small"
type="danger">冻结
</el-button>
<el-button
v-if="scope.row.status == 2"
@click="handleUnfreeze(scope.row)"
size="small">解冻
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<el-pagination class="pagination-container" background layout="total,prev, pager, next"
:current-page.sync="listQuery.current" :page-size="listQuery.size"
:total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
<account-recharge ref="recharge" @refreshList="_getList"></account-recharge>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import accountRecharge from './account-recharge';
import {assetsApi} from '@/api/assetsApi'
import {mapGetters} from 'vuex'
export default {
components: {accountRecharge},
mixins: [commonMixin],
name: 'sccount-assets',
data() {
return {
dialogVisible: false,
coinAll: '',
ruleForm: {
coinId: '',
userId: '',
userName: '',
mobile: '',
coinId: '',
status: '',
startAmount: '',
endAmount: '',
},
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
],
},
}
},
computed: {
...mapGetters(['getCoinAll'])
},
created() {
this.coinAll = this.getCoinAll;
},
methods: {
// 请求数据列表
listCallback() {
return assetsApi.getAccountAssetsList(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
// 冻结
async handleFreeze(row) {
let res = await assetsApi.accountAssetsOpearte(row);
if(res.errcode === 0){
row.status = 2;
this.$notify({
type: 'success',
title: '提示',
message: '操作成功!',
});
this._getList();
}
},
// 解冻
async handleUnfreeze(row) {
let res = await assetsApi.accountAssetsOpearte(row);
if(res.errcode === 0 ){
row.status = 1;
this.$notify({
type: 'success',
title: '提示',
message: '操作成功!',
});
this._getList();
}
},
// 充值
recharge(row) {
const {coinId, userId} = row;
this.$refs.recharge.showDialog(2, {coinId, userId});
},
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,60 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
@close="closeDialog"
>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-form-item label="充值金额" prop="amount">
<el-input v-model="ruleForm.amount" class="form-input" type="number"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="ruleForm.remark" class="form-input"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import {assetsApi} from '@/api/assetsApi'
import dialogMixin from '@/components/mixin/dialog-mixin'
export default {
mixins: [dialogMixin],
data() {
return {
dialogTitle: '充值',
rules: {
amount: [
{required: true, message: '请输入金额', trigger: 'blur'},
],
remark: [
{required: true, message: '请输入备注', trigger: 'blur'},
],
},
ruleForm: {
amount: '',
remark: ''
}
}
},
methods: {
updateCallback() {
return assetsApi.rechargeCoin(this.ruleForm)
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,169 @@
<template>
<div class="assets common-main">
<el-form ref="assetsFlowForm" :inline="true" :model="ruleForm" :rules="rules" class="search-container"
:label-position="'right'" label-width="80px">
<el-form-item label="账户ID">
<el-input v-model="ruleForm.accountId" placeholder="账户ID" clearable></el-input>
</el-form-item>
<el-form-item label="用户ID">
<el-input v-model="ruleForm.userId" placeholder="用户ID" clearable></el-input>
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="ruleForm.userName" placeholder="用户名" clearable></el-input>
</el-form-item>
<el-form-item label="手机号码" :span="8">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.mobile"
placeholder="手机号码" clearable></el-input>
</el-form-item>
<el-form-item label="币种">
<el-select v-model="ruleForm.coinId" placeholder="币种" clearable>
<el-option label="全部" value=""></el-option>
<el-option :label="item.name" :value="item.id" v-for="item in coinAll"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="金额">
<el-col :span="12">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.amountStart"
placeholder="最小金额" clearable></el-input>
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="10">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.amountEnd"
placeholder="最大金额" clearable></el-input>
</el-col>
</el-form-item>
<el-form-item label="时间">
<el-date-picker class="widthauto" v-model="ruleForm.dateRange" :editable="false"
value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetimerange"
start-placeholder="开始日期" end-placeholder="结束日期" clearable>
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('assetsFlowForm')">搜索</el-button>
<el-button icon="el-icon-download" type="primary"
@click="exportExcel('assetsFlowForm','/finance/accountDetails/export','资金流水')"
:disabled="listData.length == 0">导出
</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table :data="listData" style="width: 100%" v-loading="listLoading">
<el-table-column prop="id" label="ID" width="180">
</el-table-column>
<el-table-column prop="accountId" label="账户ID" width="180">
</el-table-column>
<el-table-column prop="refAccountId" label="关联账户ID" width="180">
</el-table-column>
<el-table-column prop="username" label="用户名">
</el-table-column>
<el-table-column prop="coinName" label="币种名称">
<template slot-scope="scope">
{{ coinFilter(scope.row.coinId)}}
</template>
</el-table-column>
<el-table-column prop="amount" label="金额">
</el-table-column>
<el-table-column prop="direction" label="收付类型" width="120">
<template slot-scope="scope">
{{scope.row.direction | accountFlowDirectionFilter}}
</template>
</el-table-column>
<el-table-column prop="businessType" label="业务类型" width="120">
<template slot-scope="scope">
{{scope.row.businessType | businessTypeFilter}}
</template>
</el-table-column>
<el-table-column prop="orderId" label="关联订单号" width="180">
</el-table-column>
<el-table-column prop="created" label="发生时间" width="180">
</el-table-column>
<el-table-column prop="remark" label="备注">
</el-table-column>
</el-table>
</div>
<el-pagination class="pagination-container" background layout="total,prev, pager, next"
:current-page.sync="listQuery.current" :page-size="listQuery.size"
:total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import {mapGetters} from 'vuex'
import {assetsApi} from '@/api/assetsApi'
export default {
mixins: [commonMixin],
data() {
return {
coinAll: '',
ruleForm: {
userId: '',
userName: '',
mobile: '',
coinId: '',
startTime: '',
endTime: '',
amountStart: '',
amountEnd: '',
},
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
],
},
}
},
computed: {
...mapGetters(['getCoinAll'])
},
mounted() {
this.coinAll = this.getCoinAll;
},
methods: {
// 请求数据列表
listCallback() {
return assetsApi.getAccountAssetsFlowList(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
coinFilter(coinId) {
for (let index = 0; index < this.coinAll.length; index++) {
const element = this.coinAll[index];
if(element.id==coinId){
return element.name ;
}
}
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,193 @@
<template>
<div class="common-main">
<!-- <transactionRecordForm :Type="2" @transactionRecordForm="transactionRecordForm"></transactionRecordForm> -->
<el-form
ref="entrustManagerForm"
:inline="true"
:model="ruleForm"
class="search-container"
:label-position="'right'"
label-width="80px">
<el-form-item label="交易市场">
<el-select v-model="ruleForm.marketId" placeholder="交易市场" class="form-input" clearable>
<el-option label="全部" value=""></el-option>
<el-option :label="item.name" :value="item.id" v-for="item in marketAll"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="交易方式">
<el-select v-model="ruleForm.type" placeholder="交易方式" class="form-input" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="买" value="1"></el-option>
<el-option label="卖" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="交易状态">
<el-select v-model="ruleForm.status" placeholder="交易状态" class="form-input" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="未成交" value="0"></el-option>
<el-option label="已成交" value="1"></el-option>
<el-option label="已取消" value="2"></el-option>
<el-option label="异常单" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item label="订单ID">
<el-input v-model="ruleForm.id" placeholder="订单ID" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="用户ID" :span="8">
<el-input v-model="ruleForm.userId" placeholder="用户ID" class="form-input"
clearable></el-input>
</el-form-item>
<el-form-item label="用户名" :span="8">
<el-input v-model="ruleForm.userName" placeholder="用户名" class="form-input"
clearable></el-input>
</el-form-item>
<el-form-item label="手机号" :span="8">
<el-input class="form-input" clearable type="number" v-model.number="ruleForm.mobile"
placeholder="手机号"></el-input>
</el-form-item>
<el-form-item label="时间" :span="16">
<el-date-picker clearable v-model="ruleForm.dateRange" :editable="false"
value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetimerange"
start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('entrustManagerForm')">搜索</el-button>
<el-button type="primary" icon="el-icon-edit"
@click="exportExcel('entrustManagerForm','/entrustOrder/exportList','币币交易委托')"
:disabled="listData.length == 0">导出
</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table :data="listData" v-loading="listLoading">
<el-table-column prop="id" label="订单ID" width="170">
</el-table-column>
<el-table-column prop="userId" label="用户ID" width="180">
</el-table-column>
<el-table-column prop="userName" label="用户名">
</el-table-column>
<el-table-column prop="marketName" label="交易市场" width="120">
</el-table-column>
<el-table-column prop="price" label="委托价格" width="120">
</el-table-column>
<el-table-column prop="volume" label="委托数量">
</el-table-column>
<el-table-column prop="predictTurnoverAmount" label="预计成交额" width="150">
</el-table-column>
<el-table-column prop="deal" label="已成交量">
</el-table-column>
<el-table-column prop="fee" label="手续费" width="120">
</el-table-column>
<el-table-column prop="freeze" label="冻结金额" width="120">
</el-table-column>
<el-table-column prop="type" label="交易方式">
<template slot-scope="scope">
{{scope.row.type | entrustManagerListTradtypeFilter}}
</template>
</el-table-column>
<el-table-column prop="status" label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status | entrustManagerListStatusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="created" label="委托时间" width="180">
</el-table-column>
</el-table>
</div>
<el-pagination class="pagination-container" background layout="total,prev, pager, next"
:current-page.sync="listQuery.current" :page-size="listQuery.size"
:total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import {mapGetters} from 'vuex'
import {assetsApi} from '@/api/assetsApi'
export default {
mixins: [commonMixin],
data() {
return {
marketAll: '',
ruleForm: {
marketId: '',
type: '',
userId: '',
id: '',
userName: '',
dateRange: '',
status: '',
mobile: '',
},
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
],
},
resourceData: [{
name: "网站标题",
type: "合作机构",
code: "webtitle",
value: "hashtoken",
createTime: "2018-06-12",
status: "启用",
}],
}
},
computed: {
...mapGetters(['getMarketAll'])
},
mounted() {
this.marketAll = this.getMarketAll
},
methods: {
// 请求数据列表
listCallback() {
return assetsApi.getEntrustManagerList(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,8 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>

View File

@@ -0,0 +1,188 @@
<template lang="html">
<div class="common-main">
<el-form ref="innovateEntrustManagerForm" :inline="true" :model="ruleForm" class="search-container" :label-position="'right'" label-width="80px">
<el-form-item label="交易市场">
<el-select v-model="ruleForm.marketId" placeholder="交易市场" class="inputauto" clearable>
<el-option label="全部" value=""></el-option>
<el-option :label="item.name" :value="item.id" v-for="item in marketAll" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="交易方式">
<el-select v-model="ruleForm.type" placeholder="交易方式" class="inputauto" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="买" value="1"></el-option>
<el-option label="卖" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="价格类型">
<el-select v-model="ruleForm.priceType" placeholder="价格类型" class="inputauto" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="市价" value="1"></el-option>
<el-option label="限价" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="订单类型">
<el-select v-model="ruleForm.orderType" placeholder="交易状态" class="inputauto" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="开仓" value="1"></el-option>
<el-option label="平仓" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="交易状态">
<el-select v-model="ruleForm.status" placeholder="交易状态" class="inputauto" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="未成交" value="0"></el-option>
<el-option label="已成交" value="1"></el-option>
<el-option label="已取消" value="2"></el-option>
<el-option label="异常单" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item label="订单ID">
<el-input v-model="ruleForm.id" placeholder="订单ID" class="inputauto" clearable></el-input>
</el-form-item>
<el-form-item label="用户ID" :span="8">
<el-input v-model="ruleForm.userId" placeholder="用户ID" class="inputauto" clearable></el-input>
</el-form-item>
<el-form-item label="用户名" :span="8">
<el-input v-model="ruleForm.userName" placeholder="用户名" class="inputauto" clearable></el-input>
</el-form-item>
<el-form-item label="手机号" :span="8">
<el-input class="inputauto" clearable type="number" v-model.number="ruleForm.mobile" placeholder="手机号"></el-input>
</el-form-item>
<el-form-item label="时间" class="flex">
<el-date-picker class="inputauto" clearable v-model="ruleForm.dateRange" :editable="false" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetimerange" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('innovateEntrustManagerForm')">搜索</el-button>
<el-button icon="el-icon-download" type="primary" @click="exportExcel('innovateEntrustManagerForm','/forexEntrustOrder/exportList','创新交易委托')" :disabled="listData.length == 0">导出</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table
:data="listData" style="width: 100%" v-loading="listLoading">
<el-table-column prop="id" label="订单ID" width="180">
</el-table-column>
<el-table-column prop="userId" label="用户ID" width="180">
</el-table-column>
<el-table-column prop="userName" label="用户名">
</el-table-column>
<el-table-column prop="marketName" label="交易市场" width="120">
</el-table-column>
<el-table-column prop="price" label="委托价格">
</el-table-column>
<el-table-column prop="volume" label="委托数量">
</el-table-column>
<el-table-column prop="type" label="交易方式">
<template slot-scope="scope">
{{scope.row.type|entrustManagerListTradtypeFilter}}
</template>
</el-table-column>
<el-table-column prop="priceType" label="价格类型">
<template slot-scope="scope">
{{scope.row.priceType|invovateListFilter}}
</template>
</el-table-column>
<el-table-column prop="tradeType" label="订单类型">
<template slot-scope="scope">
{{scope.row.tradeType|invovateOrderTypeFilter}}
</template>
</el-table-column>
<el-table-column prop="fee" label="手续费">
</el-table-column>
<el-table-column prop="lockMargin" label="占用保证金" width="120">
</el-table-column>
<el-table-column prop="deal" label="已成交量">
</el-table-column>
<el-table-column prop="created" label="委托时间" width="180">
</el-table-column>
<el-table-column prop="status" label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status|entrustManagerListStatusFilter}}
</el-tag>
</template>
</el-table-column>
</el-table>
</div>
<el-pagination class="pagination-container" background layout="total,prev, pager, next" :current-page.sync="listQuery.current" :page-size="listQuery.size" :total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import { mapGetters } from 'vuex'
import { assetsApi } from '@/api/assetsApi'
import {forexConfigApi} from '@/api/coinConfigApi'
export default {
mixins: [commonMixin],
data() {
return {
marketAll: '',
ruleForm: {
marketId: '',
type: '',
priceType:'',
orderType:'',
status:'',
id: '',
userId: '',
userName: '',
mobile: '',
dateRange: '',
type: '',
},
}
},
async mounted() {
this.marketAll =await forexConfigApi.getMarketAll();
},
created() {
},
methods: {
// 请求数据列表
listCallback() {
return assetsApi.getInnovateEntrustManagerList(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
}
}
</script>
<style lang="css">
</style>

View File

@@ -0,0 +1,149 @@
<template lang="html">
<div class="common-main">
<el-form ref="innovateTurnoverRecordForm" :inline="true" :model="ruleForm" class="search-container" :label-position="'right'" label-width="80px">
<el-form-item label="交易市场">
<el-select v-model="ruleForm.marketId" placeholder="交易市场" class="inputauto" clearable>
<el-option label="全部" value=""></el-option>
<el-option :label="item.name" :value="item.id" v-for="item in marketAll" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="交易方式">
<el-select v-model="ruleForm.tradeType" placeholder="交易方式" class="inputauto" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="买" value="1"></el-option>
<el-option label="卖" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="订单ID">
<el-input v-model="ruleForm.orderId" placeholder="订单ID" class="inputauto" clearable></el-input>
</el-form-item>
<el-form-item label="用户ID" :span="8">
<el-input v-model="ruleForm.userId" placeholder="用户ID" class="inputauto" clearable></el-input>
</el-form-item>
<el-form-item label="用户名" :span="8">
<el-input v-model="ruleForm.userName" placeholder="用户名" class="inputauto" clearable></el-input>
</el-form-item>
<el-form-item label="手机号" :span="8">
<el-input class="inputauto" clearable type="number" v-model.number="ruleForm.mobile" placeholder="手机号"></el-input>
</el-form-item>
<el-form-item label="时间" class="flex">
<el-date-picker class="inputauto" clearable v-model="ruleForm.dateRange" :editable="false" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetimerange" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('innovateTurnoverRecordForm')">搜索</el-button>
<el-button
icon="el-icon-download"
type="primary"
@click="exportExcel('innovateTurnoverRecordForm','/turnoverOrder/exportList','创新交易成交')"
:disabled="listData.length == 0">导出</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table :data="listData" v-loading="listLoading">
<el-table-column prop="id" label="订单ID" width="180">
</el-table-column>
<el-table-column prop="marketName" label="交易市场" width="180">
</el-table-column>
<el-table-column prop="buyOrderId" label="买方订单ID" width="180">
</el-table-column>
<el-table-column prop="buyUserId" label="买方用户ID" width="180">
</el-table-column>
<el-table-column prop="sellOrderId" label="卖方订单ID" width="180">
</el-table-column>
<el-table-column prop="sellUserId" label="卖方用户ID" width="180">
</el-table-column>
<el-table-column prop="tradeType" label="交易方式">
<template slot-scope="scope">
{{scope.row.tradeType|entrustManagerListTradtypeFilter}}
</template>
</el-table-column>
<el-table-column prop="price" label="成交价">
</el-table-column>
<el-table-column prop="volume" label="成交量">
</el-table-column>
<el-table-column prop="dealBuyFee" label="买方手续费" width="120">
</el-table-column>
<el-table-column prop="dealSellFee" label="卖方手续费" width="120">
</el-table-column>
<el-table-column prop="created" label="成交时间" width="180">
</el-table-column>
<el-table-column prop="status" label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status|entrustManagerListStatusFilter}}
</el-tag>
</template>
</el-table-column>
</el-table>
</div>
<el-pagination class="pagination-container" background layout="total,prev, pager, next" :current-page.sync="listQuery.current" :page-size="listQuery.size" :total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import { mapGetters } from 'vuex'
import { assetsApi } from '@/api/assetsApi'
import { commonApi } from '@/api/commonApi'
import {forexConfigApi} from '@/api/coinConfigApi'
export default {
mixins: [commonMixin],
data() {
return {
marketAll: '',
ruleForm: {
marketId: '',
tradeType: '',
type: 2, //1 币币交易 2 创新交易
userId: '',
orderId:'',
id: '',
userName: '',
dateRange: '',
mobile: '',
},
}
},
async mounted() {
this.marketAll =await forexConfigApi.getMarketAll();
},
methods: {
// 请求数据列表
listCallback() {
return assetsApi.getInnovateRecordList(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
}
}
</script>
<style lang="css">
</style>

View File

@@ -0,0 +1,169 @@
<template>
<div class="common-main">
<el-form ref="turnoverRecordForm"
:inline="true"
:model="ruleForm"
class="search-container"
:label-position="'right'"
label-width="80px">
<el-form-item label="交易市场">
<el-select v-model="ruleForm.marketId" placeholder="交易市场" class="form-input" clearable>
<el-option label="全部" value=""></el-option>
<el-option :label="item.name" :value="item.id" v-for="item in marketAll"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="交易方式">
<el-select v-model="ruleForm.tradeType" placeholder="交易方式" class="form-input" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="买" value="1"></el-option>
<el-option label="卖" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="订单ID">
<el-input v-model="ruleForm.orderId" placeholder="订单ID" class="form-input"
clearable></el-input>
</el-form-item>
<el-form-item label="用户ID" :span="8">
<el-input v-model="ruleForm.userId" placeholder="用户ID" class="form-input"
clearable></el-input>
</el-form-item>
<el-form-item label="用户名" :span="8">
<el-input v-model="ruleForm.userName" placeholder="用户名" class="form-input"
clearable></el-input>
</el-form-item>
<el-form-item label="手机号" :span="8">
<el-input type="number" v-model.number="ruleForm.mobile"
placeholder="手机号" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="时间">
<el-date-picker v-model="ruleForm.dateRange" :editable="false"
value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetimerange"
start-placeholder="开始日期" end-placeholder="结束日期"
clearable>
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('turnoverRecordForm')">搜索</el-button>
<el-button
type="primary"
icon="el-icon-edit"
@click="exportExcel('turnoverRecordForm','/turnoverOrder/exportList','币币交易成交')"
:disabled="listData.length == 0">导出
</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table :data="listData" style="width: 100%" v-loading="listLoading">
<el-table-column prop="id" label="订单ID" width="180">
</el-table-column>
<el-table-column prop="marketName" label="交易市场" width="150">
</el-table-column>
<el-table-column prop="buyOrderId" label="买方委托ID" width="180">
</el-table-column>
<el-table-column prop="buyUserId" label="买方用户ID" width="180">
</el-table-column>
<el-table-column prop="sellOrderId" label="卖方委托ID" width="180">
</el-table-column>
<el-table-column prop="sellUserId" label="卖方用户ID" width="180">
</el-table-column>
<el-table-column prop="price" label="成交价">
</el-table-column>
<el-table-column prop="volume" label="成交量">
</el-table-column>
<el-table-column prop="amount" label="成交额">
</el-table-column>
<el-table-column prop="dealBuyFee" label="买方手续费" width="120">
</el-table-column>
<el-table-column prop="dealSellFee" label="卖方手续费" width="120">
</el-table-column>
<el-table-column prop="tradeType" label="交易方式">
<template slot-scope="scope">
{{scope.row.tradeType | entrustManagerListTradtypeFilter}}
</template>
</el-table-column>
<el-table-column prop="status" label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status | entrustManagerListStatusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="created" label="成交时间" width="180">
</el-table-column>
</el-table>
</div>
<el-pagination class="pagination-container" background layout="total,prev, pager, next"
:current-page.sync="listQuery.current" :page-size="listQuery.size"
:total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import {mapGetters} from 'vuex'
import {assetsApi} from '@/api/assetsApi'
export default {
mixins: [commonMixin],
data() {
return {
marketAll: '',
ruleForm: {
marketId: '',
tradeType: '',
type: 1,//1 币币交易 2 创新交易
userId: '',
orderId: '',
userName: '',
dateRange: '',
mobile: '',
},
}
},
computed: {
...mapGetters(['getMarketAll'])
},
mounted() {
this.marketAll = this.getMarketAll
},
methods: {
// 请求数据列表
listCallback() {
return assetsApi.getTurnoverRecordList(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,170 @@
<template>
<div class="assets common-main">
<el-form ref="financialDetailsForm" :inline="true" :model="ruleForm" :rules="rules" class="search-container" :label-position="'right'" label-width="80px">
<el-form-item label="用户ID">
<el-input v-model="ruleForm.userId" placeholder="用户ID" class="inputauto" clearable></el-input>
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="ruleForm.userName" placeholder="用户名" class="inputauto"
clearable></el-input>
</el-form-item>
<el-form-item label="手机号码" :span="8">
<el-input class="inputauto" clearable type="number" v-model.number="ruleForm.mobile" placeholder="手机号码"></el-input>
</el-form-item>
<el-form-item label="币种">
<el-select v-model="ruleForm.coinId" placeholder="币种" class="inputauto" clearable>
<el-option label="全部" value=""></el-option>
<el-option :label="item.name" :value="item.id" v-for="item in coinAll" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="ruleForm.status" placeholder="状态" class="inputauto" clearable>
<el-option label="待审核" value="0"></el-option>
<el-option label="审核通过" value="1"></el-option>
<el-option label="拒绝" value="2"></el-option>
<el-option label="充值成功" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="充值金额" >
<el-col :span="12">
<el-input class="inputnumber" placeholder="最小充值金额" type="number" v-model.number="ruleForm.numMin" clearable></el-input>
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="10">
<el-input class="inputnumber" placeholder="最大充值金额" type="number"
v-model.number="ruleForm.numMax"
clearable></el-input>
</el-col>
</el-form-item>
<el-form-item label="时间">
<el-date-picker class="widthauto" v-model="ruleForm.dateRange" :editable="false" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetimerange" start-placeholder="开始日期" end-placeholder="结束日期" clearable>
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('financialDetailsForm')">搜索</el-button>
<el-button icon="el-icon-download" type="primary" @click="exportExcel('financialDetailsForm','/cashRecharge/exportCNYRecharge','场外交易充值')" :disabled="listData.length == 0">导出</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table :data="listData" style="width: 100%" v-loading="listLoading">
<el-table-column prop="id" label="订单ID" width="180">
</el-table-column>
<el-table-column prop="userId" label="用户ID" width="180">
</el-table-column>
<el-table-column prop="username" label="用户名" width="100">
</el-table-column>
<el-table-column prop="realName" label="真实用户名" width="100">
</el-table-column>
<el-table-column prop="coinName" label="充值币种" width="100">
</el-table-column>
<el-table-column prop="num" label="充值金额(USDT)" width="150">
</el-table-column>
<el-table-column prop="fee" label="手续费" width="100">
</el-table-column>
<el-table-column prop="mum" label="到账金额(CNY)" width="150">
</el-table-column>
<el-table-column prop="type" label="充值方式" width="100">
<template slot-scope="scope">
{{scope.row.type | rechargeTypeFilter}}
</template>
</el-table-column>
<el-table-column prop="tradeno" label="充值订单" width="180">
</el-table-column>
<el-table-column prop="remark" label="参考号" width="120">
</el-table-column>
<el-table-column prop="created" label="充值时间" width="180">
</el-table-column>
<el-table-column prop="lastTime" label="完成时间" width="200">
</el-table-column>
<el-table-column prop="statusStr" label="状态" width="120">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status|rechargeStatusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="step" label="审核级数" width="80">
</el-table-column>
<el-table-column prop="auditRemark" label="审核备注" class="remarks">
</el-table-column>
</el-table>
</div>
<el-pagination class="pagination-container" background layout="total,prev, pager, next" :current-page.sync="listQuery.current" :page-size="listQuery.size" :total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import {mapGetters} from 'vuex'
import { financeApi } from "@/api/financeApi";
export default {
mixins: [commonMixin],
data() {
return {
coinAll:'',
ruleForm: {
coinId:'',
userId: '',
userName: '',
mobile: '',
status: '',
numMin: '',
numMax: '',
dateRange: ''
},
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
],
},
}
},
computed:{
...mapGetters(['getCoinAll'])
},
mounted(){
this.coinAll = this.getCoinAll
},
methods: {
// 请求数据列表
listCallback() {
return financeApi.getFinanceRechargeList(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,183 @@
<template>
<div class="assets common-main">
<el-form ref="financialDetailsForm" :inline="true" :model="ruleForm" :rules="rules" class="search-container" :label-position="'right'" label-width="80px">
<el-form-item label="用户ID">
<el-input v-model="ruleForm.userId" placeholder="用户ID" class="inputauto" clearable></el-input>
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="ruleForm.userName" placeholder="用户名" class="inputauto"
clearable></el-input>
</el-form-item>
<el-form-item label="手机号码" :span="8">
<el-input class="inputnumber inputauto" type="number" v-model.number="ruleForm.mobile" placeholder="手机号码" clearable></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="ruleForm.status" placeholder="状态" clearable>
<el-option label="待审核" value="0"></el-option>
<el-option label="审核通过" value="1"></el-option>
<el-option label="拒绝" value="2"></el-option>
<el-option label="提现成功" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="提现金额" >
<el-col :span="12">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.numMin"
placeholder="最小提现金额" clearable></el-input>
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="10">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.numMax"
placeholder="最大提现金额" clearable></el-input>
</el-col>
</el-form-item>
<el-form-item label="时间" >
<el-date-picker class="widthauto" v-model="ruleForm.dateRange" :editable="false" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetimerange" start-placeholder="开始日期" end-placeholder="结束日期" clearable>
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('financialDetailsForm')">搜索</el-button>
<el-button icon="el-icon-download" type="primary" @click="exportExcel('financialDetailsForm','/cashWithdrawals/exportCNYWithDrawals','场外交易提现')" :disabled="listData.length == 0">导出</el-button>
<!-- <el-button type="primary" @click="exportExcel()" :disabled="listData.length == 0">导出</el-button> -->
</el-form-item>
</el-form>
<div class="table">
<el-table :data="listData" ref="listDataTable" style="width: 100%" v-loading="listLoading">
<el-table-column prop="id" label="订单ID" width="180">
</el-table-column>
<el-table-column prop="userId" label="用户ID" width="180">
</el-table-column>
<el-table-column prop="username" label="用户名" width="180">
</el-table-column>
<el-table-column prop="num" label="提现金额(USDT)" width="150">
</el-table-column>
<el-table-column prop="fee" label="手续费">
</el-table-column>
<el-table-column prop="mum" label="到账金额(CNY)" width="120">
</el-table-column>
<el-table-column prop="truename" label="提现开户名" width="120">
</el-table-column>
<el-table-column prop="bank" label="银行名称/账号" width="180">
<template slot-scope="scope">
{{scope.row.bank}}{{scope.row.bankCard}}
</template>
</el-table-column>
<el-table-column prop="created" label="申请时间" width="180">
</el-table-column>
<el-table-column prop="lastTime" label="完成时间" width="180">
</el-table-column>
<!-- <el-table-column prop="status" label="状态" width="120" >
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.statusStr}}
</el-tag>
</template>
</el-table-column> -->
<el-table-column prop="statusStr" label="状态" width="120">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status|withdrawStatusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="remark" label="审核备注">
</el-table-column>
</el-table>
</div>
<el-pagination class="pagination-container" background layout="total,prev, pager, next" :current-page.sync="listQuery.current" :page-size="listQuery.size" :total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import {mapGetters} from 'vuex'
import { financeApi } from "@/api/financeApi";
export default {
mixins: [commonMixin],
data() {
return {
coinAll:'',
ruleForm: {
coinId:'',
userId: '',
userName: '',
mobile: '',
status: '',
numMin: '',
numMax: '',
dateRange: ''
},
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
],
},
}
},
computed:{
...mapGetters(['getCoinAll'])
},
mounted(){
this.marketAll = this.getCoinAll
console.log(this.$refs.listDataTable);
},
methods: {
// 请求数据列表
listCallback() {
return financeApi.getFinanceWithdrawalsList(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
// 请求excel数据
exportListCallback(){
return financeApi.getFinanceWithdrawalsList(this.ruleForm, this.listQuery.current, 2000)
},
// // 导出excel
// exportExcel(){
// let listDataTable = this.$refs.listDataTable.columns;
//
// let excelOption = {
// tHeader :[],
// filterVal :[],
// filename :'场外交易提现记录'
// }
//
// for (var variable in listDataTable) {
// if (listDataTable.hasOwnProperty(variable)) {
// excelOption.tHeader.push(listDataTable[variable].label)
// excelOption.filterVal.push(listDataTable[variable].property)
// }
// }
// this.getExportExcel(excelOption);
// },
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,160 @@
<template>
<div class="assets common-main">
<el-form ref="financialDetailsForm" :inline="true" :model="ruleForm" :rules="rules"
class="search-container" :label-position="'right'" label-width="80px">
<el-form-item label="用户ID">
<el-input v-model="ruleForm.userId" placeholder="用户ID" class="inputauto"
clearable></el-input>
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="ruleForm.userName" placeholder="用户名" class="inputauto"
clearable></el-input>
</el-form-item>
<el-form-item label="手机号码" :span="8">
<el-input class="inputnumber inputauto" type="number" v-model.number="ruleForm.mobile"
placeholder="手机号码" clearable></el-input>
</el-form-item>
<el-form-item label="币种">
<el-select v-model="ruleForm.coinId" placeholder="币种" clearable>
<el-option label="全部" value=""></el-option>
<el-option :label="item.name" :value="item.id" v-for="item in coinAll"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" clearable>
<el-select v-model="ruleForm.status" placeholder="状态" clearable>
<el-option label="待入帐" value="0"></el-option>
<el-option label="充值失败" value="1"></el-option>
<el-option label="到账失败" value="2"></el-option>
<el-option label="到账成功" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="充值数量">
<el-col :span="12">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.numMin"
placeholder="最小充值数量" clearable></el-input>
</el-col>
<el-col class="line" :span="1">-</el-col>
<el-col :span="10">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.numMax"
placeholder="最大充值数量" clearable></el-input>
</el-col>
</el-form-item>
<el-form-item label="时间">
<el-date-picker class="widthauto" v-model="ruleForm.dateRange" :editable="false"
value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetimerange"
start-placeholder="开始日期" end-placeholder="结束日期" clearable>
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('financialDetailsForm')">搜索
</el-button>
<el-button icon="el-icon-download" type="primary"
@click="exportExcel('financialDetailsForm','/coinRecharge/exportCoinRecharge','充币记录')"
:disabled="listData.length == 0">导出
</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table :data="listData" style="width: 100%" v-loading="listLoading">
<el-table-column prop="id" label="订单ID" width="180">
</el-table-column>
<el-table-column prop="userId" label="用户ID" width="180">
</el-table-column>
<el-table-column prop="username" label="用户名">
</el-table-column>
<el-table-column prop="coinName" label="币种名称">
</el-table-column>
<el-table-column prop="amount" label="充值数量">
</el-table-column>
<el-table-column prop="address" label="收款地址" width="200">
</el-table-column>
<el-table-column prop="txid" label="交易ID" width="200">
</el-table-column>
<el-table-column prop="created" label="充值时间" width="200">
</el-table-column>
<el-table-column prop="lastUpdateTime" label="完成时间" width="200">
</el-table-column>
<!-- <el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter2">
{{scope.row.status|rechargeStatusFilter}}
</el-tag>
</template>
</el-table-column> -->
</el-table>
</div>
<el-pagination class="pagination-container" background layout="total,prev, pager, next"
:current-page.sync="listQuery.current" :page-size="listQuery.size"
:total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import {mapGetters} from 'vuex'
import {financeApi} from "@/api/financeApi";
export default {
mixins: [commonMixin],
data() {
return {
coinAll: '',
ruleForm: {
coinId: '',
userId: '',
userName: '',
mobile: '',
status: '',
numMin: '',
numMax: '',
dateRange: ''
},
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
],
},
}
},
computed: {
...mapGetters(['getCoinAll'])
},
mounted() {
this.coinAll = this.getCoinAll
},
methods: {
// 请求数据列表
listCallback() {
return financeApi.getCoinRecharge(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,153 @@
<template>
<div class="assets common-main">
<el-form ref="financialDetailsForm" :inline="true" :model="ruleForm" :rules="rules" class="search-container" :label-position="'right'" label-width="80px">
<el-form-item label="用户ID">
<el-input v-model="ruleForm.userId" placeholder="用户ID" class="inputauto" clearable></el-input>
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="ruleForm.userName" placeholder="用户名" class="inputauto"
clearable></el-input>
</el-form-item>
<el-form-item label="手机号码" :span="8">
<el-input class="inputnumber inputauto" type="number" v-model.number="ruleForm.mobile" placeholder="手机号码" clearable></el-input>
</el-form-item>
<el-form-item label="币种">
<el-select v-model="ruleForm.coinId" placeholder="币种" class="inputauto" clearable>
<el-option label="全部" value=""></el-option>
<el-option :label="item.name" :value="item.id" v-for="item in coinAll" :key="item.id"></el-option>
</el-select>
</el-form-item>
<!-- 0-审核中1-审核通过2-拒绝3-提币成功4撤销5-打币中 -->
<el-form-item label="状态">
<el-select v-model="ruleForm.status" placeholder="状态" clearable>
<el-option label="审核中" value="0"></el-option>
<el-option label="转出成功" value="1"></el-option>
<el-option label="审核拒绝" value="2"></el-option>
<el-option label="撤销" value="3"></el-option>
<el-option label="审核通过" value="4"></el-option>
<el-option label="打币成功" value="5"></el-option>
</el-select>
</el-form-item>
<el-form-item label="提现金额">
<el-col :span="12">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.startAmount" placeholder="" clearable></el-input>
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="10">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.endAmount" placeholder="" clearable></el-input>
</el-col>
</el-form-item>
<el-form-item label="时间" >
<el-date-picker class="widthauto" v-model="ruleForm.dateRange" :editable="false" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetimerange" start-placeholder="开始日期" end-placeholder="结束日期" clearable>
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('financialDetailsForm')">搜索</el-button>
<el-button icon="el-icon-download" type="primary" @click="exportExcel('financialDetailsForm','/coinWithdraw/exportList','提币记录')" :disabled="listData.length == 0">导出</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table :data="listData" style="width: 100%" v-loading="listLoading">
<el-table-column prop="id" label="订单ID">
</el-table-column>
<el-table-column prop="userName" label="用户名" width="120">
</el-table-column>
<el-table-column prop="coinName" label="币种名称">
</el-table-column>
<el-table-column prop="num" label="提现量">
</el-table-column>
<el-table-column prop="mum" label="实际提现">
</el-table-column>
<el-table-column prop="fee" label="手续费">
</el-table-column>
<el-table-column prop="address" label="钱包地址" width="200">
</el-table-column>
<el-table-column prop="txid" label="交易ID" width="200">
</el-table-column>
<el-table-column prop="created" label="申请时间" width="160">
</el-table-column>
<el-table-column prop="auditTime" label="审核时间" width="160">
</el-table-column>
<el-table-column prop="remark" label="审核备注">
</el-table-column>
<el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status | coninWithdrawTypeFilter}}
</el-tag>
</template>
</el-table-column>
</el-table>
</div>
<el-pagination class="pagination-container" background layout="total,prev, pager, next" :current-page.sync="listQuery.current" :page-size="listQuery.size" :total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import {mapGetters} from 'vuex'
import { financeApi } from "@/api/financeApi";
export default {
mixins: [commonMixin],
data() {
return {
coinAll:'',
ruleForm: {
coinId:'',
userId: '',
userName: '',
mobile: '',
status: '',
endAmount: '',
startAmount: '',
dateRange: ''
},
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
],
},
}
},
computed:{
...mapGetters(['getCoinAll'])
},
mounted(){
this.coinAll = this.getCoinAll
},
methods: {
// 请求数据列表
listCallback() {
return financeApi.getCoinWithdraw(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,8 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>

View File

@@ -0,0 +1,24 @@
<template>
<div class='chart-container'>
<chart height='100%' width='100%'></chart>
</div>
</template>
<script>
import Chart from '@/components/Charts/keyboard'
export default {
name: 'keyboardChart',
components: { Chart }
}
</script>
<style scoped>
.chart-container{
position: relative;
padding: 20px;
width: 100%;
height: 85vh;
}
</style>

24
src/views/charts/line.vue Normal file
View File

@@ -0,0 +1,24 @@
<template>
<div class='chart-container'>
<chart height='100%' width='100%'></chart>
</div>
</template>
<script>
import Chart from '@/components/Charts/lineMarker'
export default {
name: 'lineChart',
components: { Chart }
}
</script>
<style scoped>
.chart-container{
position: relative;
padding:20px;
width: 100%;
height:85vh;
}
</style>

View File

@@ -0,0 +1,24 @@
<template>
<div class='chart-container'>
<chart height='100%' width='100%'></chart>
</div>
</template>
<script>
import Chart from '@/components/Charts/mixChart'
export default {
name: 'mixChart',
components: { Chart }
}
</script>
<style scoped>
.chart-container{
position: relative;
padding: 20px;
width: 100%;
height:85vh;
}
</style>

View File

View File

@@ -0,0 +1,205 @@
<template>
<div class="components-container">
<p class="warn-content">
<a href="https://github.com/PanJiaChen/vue-countTo" target="_blank">countTo-component</a>
</p>
<count-to ref="example" class="example" :start-val="_startVal" :end-val="_endVal" :duration="_duration" :decimals="_decimals"
:separator="_separator" :prefix="_prefix" :suffix="_suffix" :autoplay="false"></count-to>
<div style="margin-left: 25%;margin-top: 40px;">
<label class="label" for="startValInput">startVal:
<input type="number" v-model.number="setStartVal" name="startValInput" />
</label>
<label class="label" for="endValInput">endVal:
<input type="number" v-model.number="setEndVal" name="endVaInput" />
</label>
<label class="label" for="durationInput">duration:
<input type="number" v-model.number="setDuration" name="durationInput" />
</label>
<div class="startBtn example-btn" @click="start">开始</div>
<div class="pause-resume-btn example-btn" @click="pauseResume">暂停/恢复</div>
<br/>
<label class="label" for="decimalsInput">decimals:
<input type="number" v-model.number="setDecimals" name="decimalsInput" />
</label>
<label class="label" for="separatorInput">separator:
<input v-model="setSeparator" name="separatorInput" />
</label>
<label class="label" for="prefixInput">prefix:
<input v-model="setPrefix" name="prefixInput" />
</label>
<label class="label" for="suffixInput">suffix:
<input v-model="setSuffix" name="suffixInput" />
</label>
</div>
<code>&lt;count-to :start-val=&#x27;{{_startVal}}&#x27; :end-val=&#x27;{{_endVal}}&#x27; :duration=&#x27;{{_duration}}&#x27;
:decimals=&#x27;{{_decimals}}&#x27; :separator=&#x27;{{_separator}}&#x27; :prefix=&#x27;{{_prefix}}&#x27; :suffix=&#x27;{{_suffix}}&#x27;
:autoplay=false&gt;</code>
</div>
</template>
<script>
import countTo from 'vue-count-to'
export default {
name: 'countTo-demo',
components: { countTo },
data() {
return {
setStartVal: 0,
setEndVal: 2017,
setDuration: 4000,
setDecimals: 0,
setSeparator: ',',
setSuffix: ' rmb',
setPrefix: '¥ '
}
},
computed: {
_startVal() {
if (this.setStartVal) {
return this.setStartVal
} else {
return 0
}
},
_endVal() {
if (this.setEndVal) {
return this.setEndVal
} else {
return 0
}
},
_duration() {
if (this.setDuration) {
return this.setDuration
} else {
return 100
}
},
_decimals() {
if (this.setDecimals) {
if (this.setDecimals < 0 || this.setDecimals > 20) {
alert('digits argument must be between 0 and 20')
return 0
}
return this.setDecimals
} else {
return 0
}
},
_separator() {
return this.setSeparator
},
_suffix() {
return this.setSuffix
},
_prefix() {
return this.setPrefix
}
},
methods: {
start() {
this.$refs.example.start()
},
pauseResume() {
this.$refs.example.pauseResume()
}
}
}
</script>
<style scoped>
.example-btn {
display: inline-block;
margin-bottom: 0;
font-weight: 500;
text-align: center;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap;
line-height: 1.5;
padding: 4px 15px;
font-size: 12px;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1);
transition: all .3s cubic-bezier(.645, .045, .355, 1);
position: relative;
color: rgba(0, 0, 0, .65);
background-color: #fff;
border-color: #d9d9d9;
}
.example-btn:hover {
color: #4AB7BD;
background-color: #fff;
border-color: #4AB7BD;
}
.example {
font-size: 50px;
color: #F6416C;
display: block;
margin: 10px 0;
text-align: center;
font-size: 80px;
font-weight: 500;
}
.label {
color: #2f4f4f;
font-size: 16px;
display: inline-block;
margin: 15px 30px 15px 0;
}
input {
position: relative;
display: inline-block;
padding: 4px 7px;
width: 70px;
height: 28px;
cursor: text;
font-size: 12px;
line-height: 1.5;
color: rgba(0, 0, 0, .65);
background-color: #fff;
background-image: none;
border: 1px solid #d9d9d9;
border-radius: 4px;
-webkit-transition: all .3s;
transition: all .3s;
}
.startBtn {
margin-left: 20px;
font-size: 20px;
color: #30B08F;
background-color: #fff;
}
.startBtn:hover {
background-color: #30B08F;
color: #fff;
border-color: #30B08F;
}
.pause-resume-btn {
font-size: 20px;
color: #E65D6E;
background-color: #fff;
}
.pause-resume-btn:hover {
background-color: #E65D6E;
color: #fff;
border-color: #E65D6E;
}
</style>

View File

@@ -0,0 +1,72 @@
<template>
<div class="dashboard-editor-container">
<div class=" clearfix">
<!--<pan-thumb style="float: left" :image="avatar"> Your roles:-->
<!--<span class="pan-info-roles" :key='item' v-for="item in roles">{{item}}</span>-->
<!--</pan-thumb>-->
<!--<github-corner></github-corner>-->
<div class="info-container">
<span class="display_name">{{name}}</span>
<span style="font-size:20px;padding-top:20px;display:inline-block;">editor : dashboard</span>
</div>
</div>
<div>
<img class="emptyGif" :src="emptyGif">
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
// import PanThumb from '@/components/PanThumb'
// import GithubCorner from '@/components/GithubCorner'
export default {
name: 'dashboard-editor',
data() {
return {
emptyGif: 'https://wpimg.wallstcn.com/0e03b7da-db9e-4819-ba10-9016ddfdaed3'
}
},
computed: {
...mapGetters([
'name',
'avatar',
'roles'
])
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.emptyGif {
display: block;
width: 45%;
margin: 0 auto;
}
.dashboard-editor-container {
background-color: #e3e3e3;
min-height: 100vh;
padding: 50px 60px 0px;
.pan-info-roles {
font-size: 12px;
font-weight: 700;
color: #333;
display: block;
}
.info-container {
position: relative;
margin-left: 190px;
height: 150px;
line-height: 200px;
.display_name {
font-size: 48px;
line-height: 48px;
color: #212121;
position: absolute;
top: 25px;
}
}
}
</style>

View File

@@ -0,0 +1,9 @@
<template>
<div class="dashboard-container">
</div>
</template>
<script>
</script>

View File

@@ -0,0 +1,47 @@
<template>
<div class="app-container documentation-container">
<a class="document-btn" target='_blank' href="https://panjiachen.github.io/vue-element-admin-site/#/">{{$t('documentation.documentation')}}</a>
<a class="document-btn" target='_blank' href="https://github.com/PanJiaChen/vue-element-admin/">{{$t('documentation.github')}}</a>
<dropdown-menu style="float:left;margin-left:50px;" title='系列文章' :items='articleList'></dropdown-menu>
</div>
</template>
<script>
import DropdownMenu from '@/components/Share/dropdownMenu'
export default {
name: 'documentation',
components: { DropdownMenu },
data() {
return {
articleList: [
{ title: '基础篇', href: 'https://segmentfault.com/a/1190000009275424' },
{ title: '登录权限篇', href: 'https://segmentfault.com/a/1190000009506097' },
{ title: '实战篇', href: 'https://segmentfault.com/a/1190000009762198' },
{ title: 'vueAdmin-template 篇', href: 'https://segmentfault.com/a/1190000010043013' },
{ title: '自行封装 component', href: 'https://segmentfault.com/a/1190000009090836' },
{ title: '优雅的使用 icon', href: 'https://segmentfault.com/a/1190000012213278' }
]
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.documentation-container {
margin: 50px;
.document-btn {
float: left;
margin-left: 50px;
vertical-align: middle;
display: block;
cursor: pointer;
background: black;
color: white;
height: 60px;
width: 200px;
line-height: 60px;
font-size: 20px;
text-align: center;
}
}
</style>

View File

@@ -0,0 +1,13 @@
<template>
<div>
<!--error code-->
{{a.a}}
<!--error code-->
</div>
</template>
<script>
export default {
name: 'errorTestA'
}
</script>

View File

@@ -0,0 +1,11 @@
<template>
<div></div>
</template>
<script>
export default {
created() {
this.b = b // eslint-disable-line
}
}
</script>

View File

@@ -0,0 +1,33 @@
<template>
<div class="errPage-container">
<errorA></errorA>
<errorB></errorB>
<!-- $t is vue-i18n global function to translate lang -->
<h3>{{$t('errorLog.tips')}}</h3>
<code>
{{$t('errorLog.description')}}
<a target="_blank" class="link-type" href="https://panjiachen.github.io/vue-element-admin-site/#/error?id=%e4%bb%a3%e7%a0%81">
{{$t('errorLog.documentation')}}
</a>
</code>
<a href="#">
<img src='https://wpimg.wallstcn.com/360e4842-4db5-42d0-b078-f9a84a825546.gif'>
</a>
</div>
</template>
<script>
import errorA from './errorTestA'
import errorB from './errorTestB'
export default {
name: 'errorLog',
components: { errorA, errorB }
}
</script>
<style scoped>
.errPage-container {
padding: 30px;
}
</style>

View File

@@ -0,0 +1,89 @@
<template>
<div class="errPage-container">
<el-button @click="back" icon='arrow-left' class="pan-back-btn">返回</el-button>
<el-row>
<el-col :span="12">
<h1 class="text-jumbo text-ginormous">Oops!</h1>
gif来源<a href='https://zh.airbnb.com/' target='_blank'>airbnb</a> 页面
<h2>你没有权限去该页面</h2>
<h6>如有不满请联系你领导</h6>
<ul class="list-unstyled">
<li>或者你可以去:</li>
<li class="link-type">
<router-link to="/dashboard">回首页</router-link>
</li>
<li class="link-type"><a href="https://www.taobao.com/">随便看看</a></li>
<li><a @click.prevent="dialogVisible=true" href="#">点我看图</a></li>
</ul>
</el-col>
<el-col :span="12">
<img :src="errGif" width="313" height="428" alt="Girl has dropped her ice cream.">
</el-col>
</el-row>
<el-dialog title="随便看" :visible.sync="dialogVisible">
<img class="pan-img" :src="ewizardClap">
</el-dialog>
</div>
</template>
<script>
import errGif from '@/assets/401_images/401.gif'
export default {
name: 'page401',
data() {
return {
errGif: errGif + '?' + +new Date(),
ewizardClap: 'https://wpimg.wallstcn.com/007ef517-bafd-4066-aae4-6883632d9646',
dialogVisible: false
}
},
methods: {
back() {
if (this.$route.query.noGoBack) {
this.$router.push({ path: '/dashboard' })
} else {
this.$router.go(-1)
}
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.errPage-container {
width: 800px;
margin: 100px auto;
.pan-back-btn {
background: #008489;
color: #fff;
}
.pan-gif {
margin: 0 auto;
display: block;
}
.pan-img {
display: block;
margin: 0 auto;
width: 100%;
}
.text-jumbo {
font-size: 60px;
font-weight: 700;
color: #484848;
}
.list-unstyled {
font-size: 14px;
li {
padding-bottom: 5px;
}
a {
color: #008489;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
}
</style>

231
src/views/errorPage/404.vue Normal file
View File

@@ -0,0 +1,231 @@
<template>
<div style="background:#f0f2f5;margin-top: -20px;height:100%;">
<div class="wscn-http404">
<div class="pic-404">
<img class="pic-404__parent" :src="img_404" alt="404">
<img class="pic-404__child left" :src="img_404_cloud" alt="404">
<img class="pic-404__child mid" :src="img_404_cloud" alt="404">
<img class="pic-404__child right" :src="img_404_cloud" alt="404">
</div>
<div class="bullshit">
<div class="bullshit__oops">OOPS!</div>
<div class="bullshit__info">版权所有
<a class='link-type' href='https://wallstreetcn.com' target='_blank'>华尔街见闻</a>
</div>
<div class="bullshit__headline">{{ message }}</div>
<div class="bullshit__info">请检查您输入的网址是否正确请点击以下按钮返回主页或者发送错误报告</div>
<a href="/" class="bullshit__return-home">返回首页</a>
</div>
</div>
</div>
</template>
<script>
import img_404 from '@/assets/404_images/404.png'
import img_404_cloud from '@/assets/404_images/404_cloud.png'
export default {
name: 'page404',
data() {
return {
img_404,
img_404_cloud
}
},
computed: {
message() {
return '特朗普说这个页面你不能进......'
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.wscn-http404 {
position: relative;
width: 1200px;
margin: 20px auto 60px;
padding: 0 100px;
overflow: hidden;
.pic-404 {
position: relative;
float: left;
width: 600px;
padding: 150px 0;
overflow: hidden;
&__parent {
width: 100%;
}
&__child {
position: absolute;
&.left {
width: 80px;
top: 17px;
left: 220px;
opacity: 0;
animation-name: cloudLeft;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1s;
}
&.mid {
width: 46px;
top: 10px;
left: 420px;
opacity: 0;
animation-name: cloudMid;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1.2s;
}
&.right {
width: 62px;
top: 100px;
left: 500px;
opacity: 0;
animation-name: cloudRight;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1s;
}
@keyframes cloudLeft {
0% {
top: 17px;
left: 220px;
opacity: 0;
}
20% {
top: 33px;
left: 188px;
opacity: 1;
}
80% {
top: 81px;
left: 92px;
opacity: 1;
}
100% {
top: 97px;
left: 60px;
opacity: 0;
}
}
@keyframes cloudMid {
0% {
top: 10px;
left: 420px;
opacity: 0;
}
20% {
top: 40px;
left: 360px;
opacity: 1;
}
70% {
top: 130px;
left: 180px;
opacity: 1;
}
100% {
top: 160px;
left: 120px;
opacity: 0;
}
}
@keyframes cloudRight {
0% {
top: 100px;
left: 500px;
opacity: 0;
}
20% {
top: 120px;
left: 460px;
opacity: 1;
}
80% {
top: 180px;
left: 340px;
opacity: 1;
}
100% {
top: 200px;
left: 300px;
opacity: 0;
}
}
}
}
.bullshit {
position: relative;
float: left;
width: 300px;
padding: 150px 0;
overflow: hidden;
&__oops {
font-size: 32px;
font-weight: bold;
line-height: 40px;
color: #1482f0;
opacity: 0;
margin-bottom: 20px;
animation-name: slideUp;
animation-duration: 0.5s;
animation-fill-mode: forwards;
}
&__headline {
font-size: 20px;
line-height: 24px;
color: #1482f0;
opacity: 0;
margin-bottom: 10px;
animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.1s;
animation-fill-mode: forwards;
}
&__info {
font-size: 13px;
line-height: 21px;
color: grey;
opacity: 0;
margin-bottom: 30px;
animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.2s;
animation-fill-mode: forwards;
}
&__return-home {
display: block;
float: left;
width: 110px;
height: 36px;
background: #1482f0;
border-radius: 100px;
text-align: center;
color: #ffffff;
opacity: 0;
font-size: 14px;
line-height: 36px;
cursor: pointer;
animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.3s;
animation-fill-mode: forwards;
}
@keyframes slideUp {
0% {
transform: translateY(60px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
}
}
</style>

View File

@@ -0,0 +1,256 @@
<template>
<div class="assets common-main">
<el-form
ref="financeRechargeForm"
:inline="true"
:model="ruleForm"
:rules="rules"
:label-position="'right'"
label-width="100px"
class="search-container">
<el-form-item label="用户ID">
<el-input v-model="ruleForm.userId"
placeholder="用户ID"
class="form-input"
clearable></el-input>
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="ruleForm.userName" placeholder="用户名" clearable></el-input>
</el-form-item>
<el-form-item label="手机号码" :span="8">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.mobile"
placeholder="手机号码"></el-input>
</el-form-item>
<!-- 0-待审核1-审核通过2-拒绝3-充值成功 -->
<el-form-item label="充值状态">
<el-select v-model="ruleForm.status" placeholder="充值状态" class="form-input" clearable>
<el-option label="待审核" value="0"></el-option>
<el-option label="审核通过" value="1"></el-option>
<el-option label="拒绝" value="2"></el-option>
<el-option label="充值成功" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="充值金额">
<el-col :span="10">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.numMin"
placeholder=""></el-input>
</el-col>
<el-col class="line" :span="1">-</el-col>
<el-col :span="10">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.numMax"
placeholder=""></el-input>
</el-col>
</el-form-item>
<el-form-item label="时间">
<el-date-picker
v-model="ruleForm.dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="datePickerOptions"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('financeRechargeForm')">搜索</el-button>
<el-button icon="el-icon-download" type="primary"
@click="exportExcel('financeRechargeForm','/cashRecharge/exportCNYRecharge','GCN充值审核')"
:disabled="listData.length == 0">导出
</el-button>
</el-form-item>
</el-form>
<div>
<el-table :data="listData" style="width: 100%" v-loading="listLoading">
<el-table-column prop="id" label="ID" width="180">
</el-table-column>
<el-table-column prop="userId" label="用户ID" width="180">
</el-table-column>
<el-table-column prop="username" label="用户名" width="120">
</el-table-column>
<el-table-column prop="realName" label="真实用户名" width="100">
</el-table-column>
<el-table-column prop="coinName" label="充值币种" width="100">
</el-table-column>
<el-table-column prop="num" label="充值金额(USDT)" width="150">
</el-table-column>
<el-table-column prop="fee" label="手续费" width="100">
</el-table-column>
<el-table-column prop="mum" label="到账金额(CNY)" width="150">
</el-table-column>
<el-table-column prop="type" label="充值方式" width="100">
<template slot-scope="scope">
{{scope.row.type | rechargeTypeFilter}}
</template>
</el-table-column>
<el-table-column prop="tradeno" label="充值订单" width="200">
</el-table-column>
<el-table-column prop="remark" label="参考号" width="150">
</el-table-column>
<el-table-column prop="created" label="充值时间" width="200">
</el-table-column>
<el-table-column prop="lastTime" label="完成时间" width="200">
</el-table-column>
<el-table-column prop="statusStr" label="状态" width="120">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status | rechargeStatusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="auditRemark" label="审核备注" width="120">
</el-table-column>
<el-table-column prop="step" label="审核级数" width="80">
</el-table-column>
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button @click="handleAudit(scope.row)"
size="small"
type="primary"
v-if="scope.row.status == 0">审核
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<el-dialog width="600px" title="审核提示" :visible.sync="dialogFormVisible">
<el-form :model="auditForm" :rules="auditRules" ref="ruleRef">
<el-form-item label="审核备注" :label-width="'120px'" prop="remark">
<el-input v-model="auditForm.remark"></el-input>
</el-form-item>
<el-form-item class="dialog-footer">
<el-button @click="auditOperant('reject','ruleRef')">拒绝</el-button>
<el-button type="primary" @click="auditOperant('accept','ruleRef')">通过</el-button>
</el-form-item>
</el-form>
</el-dialog>
<el-pagination class="pagination-container" background layout="total,prev, pager, next"
:current-page.sync="listQuery.current" :page-size="listQuery.size"
:total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import {financeApi} from "@/api/financeApi";
export default {
mixins: [commonMixin],
data() {
return {
dialogFormVisible: false,
name: '场外交易充值审核',
postData: {},
ruleForm: {
userId: '',
userName: '',
mobile: '',
status: '',
numMin: '',
numMax: '',
dateRange: ''
},
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
],
},
auditForm: {
remark: '',
},
auditRules: {
remark: [{required: true, message: '请输入备注原因', trigger: 'blur'}]
}
}
},
mounted() {
},
methods: {
// 请求数据列表
async listCallback() {
return await financeApi.getFinanceRechargeList(this.ruleForm, this.listQuery.current,
this.listQuery.size)
},
// 充值审核
handleAudit(row) {
this.dialogFormVisible = true;
this.postData.id = row.id;
this.auditForm.remark = '';
if (this.$refs['ruleRef']) {
this.$refs['ruleRef'].resetFields();
}
},
// 审核操作
auditOperant(type, formName) {
// 拒绝审核
if (type == 'reject') {
this.$refs[formName].validate((valid) => {
if (valid) {
this.postData.remark = this.auditForm.remark;
this.postData.status = 2;
this.request();
} else {
return false;
}
})
} else if (type == 'accept') {
this.postData.remark = this.auditForm.remark;
this.postData.status = 1;
this.$refs[formName].resetFields();
this.request();
}
},
async request() {
await financeApi.checkFinanceRecharge(this.postData);
this.$notify({
type: 'success',
title: '提示',
message: '操作成功!',
});
this.dialogFormVisible = false;
this._getList();
}
},
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,238 @@
<template>
<div class="assets common-main">
<el-form ref="financeRechargeForm" :inline="true" :model="ruleForm" class="search-container"
:label-position="'right'" label-width="80px">
<el-form-item label="用户ID">
<el-input v-model="ruleForm.userId" placeholder="用户ID" clearable></el-input>
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="ruleForm.userName" placeholder="用户名" clearable></el-input>
</el-form-item>
<el-form-item label="手机号码" :span="8">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.mobile"
placeholder="手机号码" clearable></el-input>
</el-form-item>
<!-- 0-待审核1-审核通过2-拒绝3-提现成功 -->
<el-form-item label="状态">
<el-select v-model="ruleForm.status" placeholder="状态" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="待审核" value="0"></el-option>
<el-option label="审核通过" value="1"></el-option>
<el-option label="拒绝" value="2"></el-option>
<el-option label="提现成功" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="提现金额">
<el-col :span="10">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.numMin"
placeholder="" clearable></el-input>
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="10">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.numMax"
placeholder="" clearable></el-input>
</el-col>
</el-form-item>
<el-form-item label="时间">
<el-date-picker class="widthauto" v-model="ruleForm.dateRange" :editable="false"
value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetimerange"
start-placeholder="开始日期" end-placeholder="结束日期" clearable>
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('financeRechargeForm')">搜索</el-button>
<el-button icon="el-icon-download" type="primary"
@click="exportExcel('financeRechargeForm','/cashWithdrawals/exportCNYWithDrawals','GCN提现审核')"
:disabled="listData.length == 0">导出
</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table :data="listData" style="width: 100%" v-loading="listLoading">
<el-table-column prop="id" label="ID" width="180">
</el-table-column>
<el-table-column prop="userId" label="用户ID" width="180">
</el-table-column>
<el-table-column prop="username" label="用户名" width="100">
</el-table-column>
<el-table-column prop="num" label="提现金额(USDT)" width="150">
</el-table-column>
<el-table-column prop="fee" label="手续费" width="100">
</el-table-column>
<el-table-column prop="mum" label="到账金额(CNY)" width="150">
</el-table-column>
<el-table-column prop="truename" label="提现开户名" width="150">
</el-table-column>
<el-table-column prop="bankNameAndCard" label="银行名称/账号" width="150">
<template slot-scope="scope">
{{scope.row.bank}}{{scope.row.bankCard}}
</template>
</el-table-column>
<el-table-column prop="created" label="申请时间" width="160">
</el-table-column>
<el-table-column prop="lastTime" label="完成时间" width="200">
</el-table-column>
<el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status | withdrawStatusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="remark" label="审核备注">
</el-table-column>
<el-table-column prop="step" label="审核级数" width="80">
</el-table-column>
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button
@click="handleAudit(scope.row)"
type="primary"
size="small"
v-if="scope.row.status == 0">审核
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<el-dialog width="600px" title="审核提示" :visible.sync="dialogFormVisible">
<el-form :model="auditForm" :rules="auditRules" ref="ruleRef">
<el-form-item label="审核备注" :label-width="'120px'" prop="remark">
<el-input v-model="auditForm.remark"></el-input>
</el-form-item>
<el-form-item class="dialog-footer">
<el-button @click="auditOperant('reject','ruleRef')">拒绝</el-button>
<el-button type="primary" @click="auditOperant('accept','ruleRef')">通过</el-button>
</el-form-item>
</el-form>
</el-dialog>
<el-pagination class="pagination-container" background layout="total,prev, pager, next"
:current-page.sync="listQuery.current" :page-size="listQuery.size"
:total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import {mapGetters} from 'vuex'
import {financeApi} from "@/api/financeApi";
export default {
mixins: [commonMixin],
data() {
return {
dialogFormVisible: false,
remark: '',
name: '场外交易提现审核',
coinAll: '',
postData: {},
ruleForm: {
userId: '',
userName: '',
mobile: '',
status: '',
numMin: '',
numMax: '',
dateRange: ''
},
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
],
},
auditForm: {
remark: '',
},
auditRules: {
remark: [{required: true, message: '请输入备注原因', trigger: 'blur'}]
}
}
},
computed: {
...mapGetters(['getCoinAll'])
},
mounted() {
this.coinAll = this.getCoinAll;
},
methods: {
// 请求数据列表
listCallback() {
return financeApi.getFinanceWithdrawalsList(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
// 充值审核
handleAudit(row) {
this.dialogFormVisible = true;
this.postData.id = row.id;
this.auditForm.remark = '';
if (this.$refs['ruleRef']) {
this.$refs['ruleRef'].resetFields();
}
},
// 审核操作
auditOperant(type, formName) {
this.postData.remark = this.auditForm.remark;
// 拒绝审核
if (type == 'reject') {
this.$refs[formName].validate((valid) => {
if (valid) {
this.postData.status = 2;
this.request();
} else {
return false;
}
})
} else if (type == 'accept') {
this.postData.status = 1;
this.$refs[formName].resetFields();
this.request();
}
},
async request() {
await financeApi.checkFinanceWithdrawals(this.postData);
this.$notify({
type: 'success',
title: '提示',
message: '操作成功!',
});
this.dialogFormVisible = false;
this._getList();
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,163 @@
<template>
<div class="assets common-main">
<el-form ref="financeRechargeForm" :inline="true" :model="ruleForm" class="form-top" :label-position="'right'" label-width="80px">
<el-col :span="8">
<el-form-item label="用户ID">
<el-input v-model="ruleForm.userId" placeholder="用户ID"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="姓名">
<el-input v-model="ruleForm.userName" placeholder="姓名"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="手机号码" :span="8">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.mobile" placeholder="手机号码"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="币种">
<el-select v-model="ruleForm.coinId" placeholder="币种">
<el-option label="全部" value=""></el-option>
<el-option :label="item.name" :value="item.id" v-for="item in coinAll" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<!-- 0-成功1-失败 -->
<el-col :span="8">
<el-form-item label="状态">
<el-select v-model="ruleForm.status" placeholder="状态">
<el-option label="全部" value=""></el-option>
<el-option label="成功" value="0"></el-option>
<el-option label="失败" value="1"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="数额" class="flex">
<el-col :span="12">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.startAmount" placeholder=""></el-input>
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="10">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.endAmount" placeholder=""></el-input>
</el-col>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="时间" class="flex">
<el-date-picker class="widthauto" v-model="ruleForm.dateRange" :editable="false" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetimerange" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label=" ">
<el-button @click="submitForm('financeRechargeForm')">搜索</el-button>
<el-button type="primary" @click="exportExcel('financeRechargeForm','/coinRecharge/exportCoinRecharge')" :disabled="listData.length == 0">导出</el-button>
</el-form-item>
</el-col>
</el-form>
<div class="table">
<el-table :data="listData" style="width: 100%" v-loading="listLoading">
<el-table-column prop="id" label="ID" width="180">
</el-table-column>
<el-table-column prop="userId" label="用户名ID" width="180">
</el-table-column>
<el-table-column prop="userName" label="用户名" width="100">
</el-table-column>
<el-table-column prop="coinName" label="币种名称" width="100">
</el-table-column>
<el-table-column prop="mum" label="充值数量" width="100">
</el-table-column>
<el-table-column prop="address" label="收款地址">
</el-table-column>
<el-table-column prop="txid" label="交易ID" width="250">
</el-table-column>
<el-table-column prop="created" label="充值时间" >
</el-table-column>
<el-table-column prop="status" label="状态" >
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status|coinRechargeTypeListFilter}}
</el-tag>
</template>
</el-table-column>
</el-table>
</div>
<el-pagination class="pagination-container" background layout="total,prev, pager, next" :current-page.sync="listQuery.current" :page-size="listQuery.size" :total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import { mapGetters } from 'vuex'
import { financeApi } from "@/api/financeApi";
export default {
mixins: [commonMixin],
data() {
return {
dialogFormVisible: false,
remark: '',
name: '数字货币提现审核',
coinAll: '',
postData: {},
ruleForm: {
coinId:'',
userId: '',
userName: '',
mobile: '',
status: '',
numMin: '',
numMax: '',
dateRange: ''
},
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
],
},
}
},
computed: {
...mapGetters(['getCoinAll'])
},
mounted() {
this.coinAll = this.getCoinAll;
},
methods: {
// 请求数据列表
listCallback() {
return financeApi.getCoinRecharge(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,307 @@
<template>
<div class="assets common-main">
<el-form ref="financeRechargeForm" :inline="true" :model="ruleForm" class="search-container"
:label-position="'right'" label-width="80px">
<el-form-item label="用户名">
<el-input v-model="ruleForm.userName" placeholder="姓名" clearable></el-input>
</el-form-item>
<el-form-item label="手机号码" :span="8">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.mobile"
placeholder="手机号码" clearable></el-input>
</el-form-item>
<el-form-item label="币种">
<el-select v-model="ruleForm.coinId" placeholder="币种" clearable>
<el-option label="全部" value=""></el-option>
<el-option :label="item.name" :value="item.id" v-for="item in coinAll"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<!-- 0-审核中1-审核通过2-拒绝3-提币成功4撤销5-打币中 -->
<el-form-item label="状态">
<el-select v-model="ruleForm.status" placeholder="状态" clearable>
<el-option label="审核中" value="0"></el-option>
<el-option label="转出成功" value="1"></el-option>
<el-option label="审核拒绝" value="2"></el-option>
<el-option label="撤销" value="3"></el-option>
<el-option label="审核通过" value="4"></el-option>
<el-option label="打币中" value="5"></el-option>
<el-option label="钱包异常,审核中" value="6"></el-option>
</el-select>
</el-form-item>
<el-form-item label="提现金额">
<el-col :span="12">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.startAmount"
placeholder="" clearable></el-input>
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="10">
<el-input class="inputnumber" type="number" v-model.number="ruleForm.endAmount"
placeholder="" clearable></el-input>
</el-col>
</el-form-item>
<el-form-item label="时间">
<el-date-picker class="widthauto" v-model="ruleForm.dateRange" :editable="false"
value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetimerange"
start-placeholder="开始日期" end-placeholder="结束日期" clearable>
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button icon="el-icon-search" @click="submitForm('financeRechargeForm')">搜索</el-button>
<el-button icon="el-icon-download" type="primary"
@click="exportExcel('financeRechargeForm','/coinWithdraw/exportList','数字货币提现审核')"
:disabled="listData.length == 0">导出
</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table :data="listData" style="width: 100%" v-loading="listLoading">
<el-table-column prop="id" label="ID" width="80">
</el-table-column>
<el-table-column prop="userName" label="用户名" width="100">
</el-table-column>
<el-table-column prop="coinName" label="币种名称">
</el-table-column>
<el-table-column prop="num" label="提现量">
</el-table-column>
<el-table-column prop="mum" label="实际提现">
</el-table-column>
<el-table-column prop="fee" label="手续费">
</el-table-column>
<el-table-column prop="address" label="钱包地址" width="200">
</el-table-column>
<el-table-column prop="txid" label="交易ID" width="200">
</el-table-column>
<el-table-column prop="created" label="申请时间" width="160">
</el-table-column>
<el-table-column prop="auditTime" label="审核时间" width="160">
</el-table-column>
<el-table-column prop="remark" label="审核备注" width="150">
</el-table-column>
<el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status | coninWithdrawTypeFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="type" label="打款类型" width="80">
<template slot-scope="scope">
{{scope.row.type | withdrawType}}
</template>
</el-table-column>
<el-table-column prop="step" label="审核级数" width="80">
</el-table-column>
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button @click="handleAudit(scope.row)"
type="primary"
size="small"
v-if="scope.row.status == 0">
审核
</el-button>
<!--手动打款-->
<el-button @click="handleManualWithdraw(scope.row)"
type="primary"
size="small"
v-if="scope.row.status == 4 && scope.row.type ==2">
确认打款
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!--审核对话框-->
<el-dialog width="600px" title="审核提示" :visible.sync="dialogFormVisible">
<el-form :model="auditForm" :rules="auditRules" ref="ruleRef">
<el-form-item label="审核备注" :label-width="'120px'" prop="remark">
<el-input v-model="auditForm.remark"></el-input>
</el-form-item>
<el-form-item class="dialog-footer">
<el-button @click="submitAudit('reject','ruleRef')">拒绝</el-button>
<el-button type="primary" @click="submitAudit('accept','ruleRef')">通过</el-button>
</el-form-item>
</el-form>
</el-dialog>
<!--手动打款对话框-->
<el-dialog width="600px" title="手动打款信息" :visible.sync="manualVisible">
<el-form :model="manualForm" :rules="manualRules" ref="manualRef">
<el-form-item label="转账流水号" :label-width="'120px'" prop="txid">
<el-input v-model="manualForm.txid"></el-input>
</el-form-item>
<el-form-item label="链上手续费" :label-width="'120px'" prop="chainFee">
<el-input type="number" v-model="manualForm.chainFee"></el-input>
</el-form-item>
<el-form-item class="dialog-footer">
<el-button type="primary" @click="submitManual('manualRef')">确认</el-button>
</el-form-item>
</el-form>
</el-dialog>
<el-pagination class="pagination-container" background layout="total,prev, pager, next"
:current-page.sync="listQuery.current" :page-size="listQuery.size"
:total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import {mapGetters} from 'vuex'
import {financeApi} from "@/api/financeApi";
export default {
mixins: [commonMixin],
data() {
return {
dialogFormVisible: false,
manualVisible:false,
remark: '',
name: '数字货币提现审核',
coinAll: '',
postData: {},
ruleForm: {
coinId: '',
userId: '',
userName: '',
mobile: '',
status: '',
numMin: '',
numMax: '',
dateRange: ''
},
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
],
},
auditForm: {
remark: '',
},
auditRules: {
remark: [{required: true, message: '请输入备注原因', trigger: 'blur'}]
},
manualForm:{
txid:"",
chainFee:""
},
manualRules:{
txid: [{required: true, message: '请输入转账流水号', trigger: 'blur'}],
chainFee: [{required: true, message: '请输入链上手续费', trigger: 'blur'}]
}
}
},
computed: {
...mapGetters(['getCoinAll'])
},
mounted() {
this.coinAll = this.getCoinAll;
},
methods: {
// 请求数据列表
async listCallback() {
return await financeApi.getCoinWithdraw(this.ruleForm, this.listQuery.current,
this.listQuery.size)
},
// 充值审核
handleAudit(row) {
this.dialogFormVisible = true;
this.postData.id = row.id;
this.auditForm.remark = '';
},
// 手动打款
handleManualWithdraw(row){
this.manualForm = {}
this.manualVisible = true
this.manualForm.id = row.id;
},
submitManual(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this._manualWithdraw()
} else {
console.log('error submit!!');
return false;
}
});
},
async _manualWithdraw(){
await financeApi.manualWithdraw(this.manualForm);
setTimeout(()=>{
this.$notify({
type: 'success',
title: '提示',
message: '操作成功!',
});
this._getList();
this.manualVisible = false;
},2000)
},
// 审核操作
submitAudit(type, formName) {
// 拒绝审核
if (type == 'reject') {
this.$refs[formName].validate((valid) => {
if (valid) {
this.postData.remark = this.auditForm.remark;
this.postData.status = 2;
this._withdrawAudit();
} else {
return false;
}
})
} else if (type == 'accept') {
this.postData.status = 4;
this.$refs[formName].resetFields();
this._withdrawAudit();
}
},
async _withdrawAudit() {
await financeApi.checkCoinWithdraw(this.postData);
this.$notify({
type: 'success',
title: '提示',
message: '操作成功!',
});
this._getList();
this.dialogFormVisible = false;
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,159 @@
<template>
<div class="common-main">
<el-form
:inline="true"
:model="searchForm"
ref="searchForm"
class="demo-form-inline"
:label-position="'right'"
label-width="80px">
<el-form-item label="状态" prop="status">
<el-select v-model="searchForm.status" class="form-input" clearable>
<el-option v-for="(value,key) in select.status"
:key="key"
:label="value"
:value="key"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" @click="submitForm('searchForm')">搜索
</el-button>
<el-button type="primary" icon="el-icon-edit" @click="handleCreate">新建</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table
:data="listData"
style="width: 100%">
<el-table-column
prop="id"
label="ID"
width="200">
</el-table-column>
<el-table-column
prop="name"
label="名称"
width="150">
</el-table-column>
<el-table-column
prop="title"
label="标题"
width="150">
</el-table-column>
<el-table-column
prop="sort"
label="排序"
width="150">
</el-table-column>
<el-table-column
prop="status"
render="renderHeader"
label="状态"
width="100"
>
<template slot-scope="scope">
<el-tag :type="scope.row.status|elTagFilter">
{{select.status[scope.row.status]}}
</el-tag>
</template>
</el-table-column>
<el-table-column
width="775"
label="操作"
>
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row)" icon="el-icon-edit">编辑
</el-button>
<el-button
size="mini"
v-show="scope.row.status===0"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">启用
</el-button>
<el-button
size="mini"
type="danger"
v-show="scope.row.status===1"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">禁用
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
</div>
<coin-config-dialog ref="coinConfigDialog" @refreshList="_getList"></coin-config-dialog>
</div>
</template>
<script>
import coinConfigDialog from './component/coin-config-dialog.vue'
import {forexConfigApi} from "@/api/coinConfigApi";
import {selectOption} from '../trade-config/common'
import commonMixin from '@/components/mixin/common-mixin'
export default {
components: {coinConfigDialog},
mixins: [commonMixin],
data() {
return {
select: selectOption,
searchForm: {
status: '',
},
}
},
methods: {
listCallback() {
return forexConfigApi.getForexCoinList(this.searchForm,
this.listQuery.current, this.listQuery.size)
},
async changeStatusCallback(id, status) {
return await forexConfigApi.setStatus({
id,
status,
});
},
handleCreate() {
this.$refs.coinConfigDialog.showDialog(1,);
},
handleEdit(index, row) {
const data = {
...row,
status: row.status + ''
}
this.$refs.coinConfigDialog.showDialog(2, data);
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,101 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
@close="closeDialog"
>
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="100px">
<el-form-item label="名称" prop="name">
<el-input :disabled="dialogType==2" v-model="ruleForm.name" class="form-input"></el-input>
</el-form-item>
<el-form-item label="标题" prop="title">
<el-input :disabled="dialogType==2" v-model="ruleForm.title" class="form-input"></el-input>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input-number v-model="ruleForm.sort" class="form-input"></el-input-number>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="ruleForm.status" class="form-input">
<el-option v-for="(value,key) in select.status"
:key="key"
:label="value"
:value="key"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import {forexConfigApi} from '@/api/coinConfigApi'
import {selectOption} from '../../trade-config/common'
import dialogMixin from '@/components/mixin/dialog-mixin'
export default {
mixins: [dialogMixin],
data() {
return {
select: selectOption,
dialogTitle: '新建创新交易配置',
rules: {
name: [
{required: true, message: '请输入名称'},
],
title: [
{required: true, message: '请输入标题'},
],
sort: [
{required: true, message: '请输入排序'},
],
status: [
{required: true, message: '请选择状态'},
],
},
ruleForm: {
name: '',
title: '',
sort: '',
status: '',
}
}
},
watch: {
dialogType(val) {
if (val === 1) {
this.dialogTitle = "新建创新交易币种配置"
} else {
this.dialogTitle = "编辑创新交易币种配置"
}
}
},
methods: {
createCallback() {
return forexConfigApi.addForexCoin(this.ruleForm)
},
updateCallback() {
return forexConfigApi.editForexCoin(this.ruleForm)
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,112 @@
<template>
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" @close="closeDialog">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px">
<el-form-item label="名称" prop="name">
<el-input v-model="ruleForm.name" class="form-input"></el-input>
</el-form-item>
<el-form-item label="代码" prop="code">
<el-input v-model="ruleForm.code" class="form-input"></el-input>
</el-form-item>
<el-form-item label="结算币种" prop="coinId">
<el-select v-model="ruleForm.coinId" placeholder="结算币种">
<el-option :label="item.name" :value="item.id" v-for="item in coinAll"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="资产统计标识" prop="baseCoin">
<el-select v-model="ruleForm.baseCoin" placeholder="资产统计标识">
<el-option label="否" value="0"></el-option>
<el-option label="是" value="1"></el-option>
</el-select>
</el-form-item>
<!-- 0 禁用 1启用 -->
<el-form-item label="状态" prop="status">
<el-select v-model="ruleForm.status" placeholder="状态">
<el-option label="禁用" :value="0"></el-option>
<el-option label="启用" :value="1"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import {tradeAreaApi} from "@/api/tradeAreaApi";
import {forexConfigApi,marketApi} from '@/api/coinConfigApi'
import dialogMixin from '@/components/mixin/dialog-mixin';
export default {
mixins: [dialogMixin],
data() {
return {
dialogTitle: '新建配置',
coinAll: '',
rules: {
code: [
{required: true, message: '请输入代码', trigger: 'blur'}
],
name: [
{required: true, message: '请输入名称', trigger: 'blur'}
],
type: [
{required: true, message: '请输入类型', trigger: 'blur'}
],
baseCoin: [
{required: true, message: '请输入资产统计标识', trigger: 'blur'}
],
status: [
{required: true, message: '请输入状态', trigger: 'blur'}
],
coinId: [
{required: true, message: '请输入结算币种', trigger: 'blur'}
],
},
ruleForm: {
status: '',
type: '',
}
};
},
async mounted() {
this.coinAll = await marketApi.getCoinAll()
},
watch: {
dialogType(val) {
if (val === 1) {
this.dialogTitle = "新建区域配置";
} else {
this.dialogTitle = "编辑区域配置";
}
}
},
methods: {
createCallback() {
const {coinId} = this.ruleForm;
const coinName = this.coinAll.find(item => item.id == coinId).title
return tradeAreaApi.createdInnovateTradeArea({
...this.ruleForm,
coinName,
});
},
updateCallback() {
return tradeAreaApi.updateInnovateTradeArea(this.ruleForm);
},
}
};
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,128 @@
<template>
<div class="common-main">
<el-form :model="ruleForm" ref="ruleForm" label-width="100px" class="search-container">
<el-form-item label="名称">
<el-input v-model="ruleForm.name" placeholder="" clearable></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="ruleForm.status" placeholder="请选择" clearable>
<el-option label="禁用" value="0"></el-option>
<el-option label="启用" value="1"></el-option>
</el-select>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
<el-button type="primary" icon="el-icon-edit" @click="created('ruleForm')">新增</el-button>
<!-- <el-button type="danger" icon="el-icon-delete" @click="handleDelete">删除</el-button>-->
</div>
</el-form>
<el-table :data="listData" v-loading="listLoading" @selection-change="handleSelectionChange">
<!--<el-table-column type="selection" width="55">
</el-table-column>-->
<el-table-column prop="id" label="ID">
</el-table-column>
<el-table-column prop="name" label="名称">
</el-table-column>
<el-table-column prop="code" label="代码">
</el-table-column>
<el-table-column prop="coinName" label="结算币种">
</el-table-column>
<el-table-column prop="baseCoin" label="资产统计标识">
<template slot-scope="scope">
{{scope.row.baseCoin == 0 ? '否' : '是'}}
</template>
</el-table-column>
<el-table-column prop="status" label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status | statusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column width="200" label="操作" >
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row)" icon="el-icon-edit">编辑
</el-button>
<el-button
size="mini"
v-show="scope.row.status===0"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">启用
</el-button>
<el-button
size="mini"
type="danger"
v-show="scope.row.status===1"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">禁用
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination class="pagination-container" background layout="total,prev, pager, next"
:current-page.sync="listQuery.current" :page-size="listQuery.size"
:total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
<tradeAreaDialog ref="tradeAreaDialog" @refreshList="_getList"></tradeAreaDialog>
</div>
</template>
<script>
import tradeAreaDialog from './component/forex-area-dialog';
import commonMixin from '@/components/mixin/common-mixin'
import {tradeAreaApi} from '@/api/tradeAreaApi'
export default {
mixins: [commonMixin],
components: {tradeAreaDialog},
data() {
return {
ruleForm: {
name: '',
code: '',
status: ''
},
}
},
methods: {
// 请求数据列表
listCallback() {
return tradeAreaApi.getInnovateTradeAreaList(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
// 新增
created() {
this.$refs.tradeAreaDialog.showDialog(1);
},
// 修改
handleEdit(index, row) {
this.$refs.tradeAreaDialog.showDialog(2, Object.assign({}, row));
},
async changeStatusCallback(id, status) {
return await tradeAreaApi.setTradeAreaStats({
id,
status,
});
},
// 批量删除
deleteCallback(ids) {
return tradeAreaApi.deleteTradeArea(ids)
}
}
}
</script>

View File

@@ -0,0 +1,92 @@
<template>
<market-config
:marketType="marketType"
:searchListAPI="searchListAPI"
:tradeAreaSelectAPI="tradeAreaSelectAPI"
:coinSelectAPI="coinSelectAPI"
:otherRules="otherRules"
:otherRuleForm="otherRuleForm"
:otherFiels="otherFiels"
:coinidAPI="coinidAPI"
/>
</template>
<script>
import marketConfig from '../trade-config/component/base-market-config.vue';
import {forexConfigApi} from "@/api/coinConfigApi";
export default {
components: {marketConfig},
data() {
return {
// 市场类型1币币2创新
marketType: 2,
// 列表 API
searchListAPI: forexConfigApi.getCoinMarketList,
// 交易区域API
tradeAreaSelectAPI: forexConfigApi.getTradeAreaAll,
// 市场名称API
coinSelectAPI: forexConfigApi.getMarketAll,
// 报价货币/基础货币
coinidAPI: forexConfigApi.getCoinById,
// 可修改字段
otherFiels: [
{
props: 'contractUnit',
name: '合约单位'
},
{
props: 'marginRate',
name: '保证金比例'
},
/*{
props: 'pointValue',
name: '点'
},*/
{
type: 'string',
props: 'fxcmSymbol',
name: '福汇API交易对'
},
{
type: 'string',
props: 'yahooSymbol',
name: '雅虎API交易对'
},
{
type: 'string',
props: 'aliyunSymbol',
name: '阿里云API交易对'
},
],
otherRules: {
contractUnit: [
{required: true, message: '请输入合约单位'},
],
marginRate: [
{required: true, message: '请输入保证金比例'},
],
/*pointValue: [
{required: true, message: '请输入点'},
],*/
fxcmSymbol: [
{required: true, message: '请输入福汇API交易对'},
],
yahooSymbol: [
{required: true, message: '请输入雅虎API交易对'},
],
aliyunSymbol: [
{required: true, message: '请输入阿里云API交易对'},
],
},
otherRuleForm: {
contractUnit:'',
marginRate: '',
// pointValue: '',
fxcmSymbol: '',
yahooSymbol: '',
aliyunSymbol: '',
}
}
}
}
</script>

View File

@@ -0,0 +1,67 @@
<template>
<div class="app-wrapper" :class="classObj">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"></div>
<sidebar class="sidebar-container"></sidebar>
<div class="main-container">
<navbar></navbar>
<!--<tags-view></tags-view>-->
<app-main></app-main>
</div>
</div>
</template>
<script>
import { Navbar, Sidebar, AppMain, TagsView } from './components'
import ResizeMixin from './mixin/ResizeHandler'
export default {
name: 'layout',
components: {
Navbar,
Sidebar,
AppMain,
TagsView
},
mixins: [ResizeMixin],
computed: {
sidebar() {
return this.$store.state.app.sidebar
},
device() {
return this.$store.state.app.device
},
classObj() {
return {
hideSidebar: !this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile'
}
}
},
methods: {
handleClickOutside() {
this.$store.dispatch('closeSideBar', { withoutAnimation: false })
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
</style>

View File

@@ -0,0 +1,23 @@
<template>
<section class="app-main" style="min-height: 100%">
<transition name="fade" mode="out-in">
<keep-alive :include="cachedViews">
<router-view></router-view>
</keep-alive>
</transition>
</section>
</template>
<script>
export default {
name: 'AppMain',
computed: {
cachedViews() {
return this.$store.state.tagsView.cachedViews
}
// key() {
// return this.$route.name !== undefined ? this.$route.name + +new Date() : this.$route + +new Date()
// }
}
}
</script>

View File

@@ -0,0 +1,212 @@
<template>
<div>
<el-menu
:default-active="activeIndex"
class="el-menu-demo"
mode="horizontal"
background-color="#2E4155"
text-color="#fff"
active-text-color="#ffd04b"
:router="true"
>
<el-menu-item
:index="item.path"
:key="item.path"
v-for="item in topMenu"
v-if="ids.indexOf(item.id)!==-1"
@click="handleTopMenuClick(item)">
{{item.meta.title}}
</el-menu-item>
</el-menu>
<el-menu class="navbar" mode="horizontal">
<hamburger class="hamburger-container" :toggleClick="toggleSideBar"
:isActive="sidebar.opened"></hamburger>
<breadcrumb class="breadcrumb-container"></breadcrumb>
<div class="right-menu">
<error-log class="errLog-container right-menu-item"></error-log>
<el-tooltip effect="dark" :content="$t('navbar.screenfull')" placement="bottom">
<screenfull class="screenfull right-menu-item"></screenfull>
</el-tooltip>
<!--<lang-select class="international right-menu-item"></lang-select>-->
<el-tooltip effect="dark" :content="$t('navbar.theme')" placement="bottom">
<theme-picker class="theme-switch right-menu-item"></theme-picker>
</el-tooltip>
<el-dropdown class="avatar-container right-menu-item" trigger="click">
<div class="avatar-wrapper">
<img class="user-avatar" :src="avatar+'?imageView2/1/w/80/h/80'">
<i class="el-icon-caret-bottom"></i>
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/">
<el-dropdown-item>
{{$t('navbar.dashboard')}}
</el-dropdown-item>
</router-link>
<el-dropdown-item divided>
<span @click="logout" style="display:block;">{{$t('navbar.logOut')}}</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</el-menu>
</div>
</template>
<script>
import {mapGetters} from 'vuex'
import Breadcrumb from '@/components/Breadcrumb'
import Hamburger from '@/components/Hamburger'
import ErrorLog from '@/components/ErrorLog'
import Screenfull from '@/components/Screenfull'
import LangSelect from '@/components/LangSelect'
import ThemePicker from '@/components/ThemePicker'
export default {
components: {
Breadcrumb,
Hamburger,
ErrorLog,
Screenfull,
LangSelect,
ThemePicker
},
computed: {
...mapGetters([
'sidebar',
'name',
'avatar',
'topMenu',
"ids"
])
},
data() {
return {
activeIndex: "",
// topMenu:[{name:"网站运营",path:"/website-operation"},
// {name:"统计分析",path:"/statistic"},
// {name:"用户中心",path:"/usercenter"},
// {name:"财务管理",path:"/finance"},
// {name:"资金明细",path:"/assets"},
// {name:"币币交易参数",path:"/trade-config"},
// {name:"参数配置",path:"/normal-config"},
// {name:"创新交易参数",path:"/forex-config"},
// {name:"系统配置",path:"/system-config"},
// ]
}
},
mounted() {
const setSideMenu = this.setSideMenu;
if (setSideMenu) {
return;
}
const currentPath = this.$route.path;
const pathArray = currentPath.split('/').filter(item => !!item);
if (!pathArray || pathArray.length < 1) {
return;
}
const menuItem = this.topMenu.find(item => item.path === `/${pathArray[0]}`);
if (!menuItem) {
return;
}
this.activeIndex = menuItem.path;
this.$store.dispatch('setSideMenu', menuItem)
},
methods: {
handleTopMenuClick(item) {
for (let i = 0; i < this.topMenu.length; i++) {
let menuItem = this.topMenu[i];
if (menuItem.id === item.id) {
console.log(menuItem)
this.$store.dispatch('setSideMenu', menuItem).then(() => {
})
}
}
},
toggleSideBar() {
this.$store.dispatch('toggleSideBar')
},
logout() {
this.$store.dispatch('LogOut').then(() => {
location.reload()// In order to re-instantiate the vue-router object to avoid bugs
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.center-menu {
border: 1px solid #f00;
display: flex;
}
.navbar {
height: 50px;
line-height: 50px;
border-radius: 0px !important;
.hamburger-container {
line-height: 58px;
height: 50px;
float: left;
padding: 0 10px;
}
.breadcrumb-container {
float: left;
}
.errLog-container {
display: inline-block;
vertical-align: top;
}
.right-menu {
float: right;
height: 100%;
&:focus {
outline: none;
}
.right-menu-item {
display: inline-block;
margin: 0 8px;
}
.screenfull {
height: 20px;
}
.international {
vertical-align: top;
}
.theme-switch {
vertical-align: 15px;
}
.avatar-container {
height: 50px;
margin-right: 30px;
.avatar-wrapper {
cursor: pointer;
margin-top: 5px;
position: relative;
.user-avatar {
width: 40px;
height: 40px;
border-radius: 10px;
}
.el-icon-caret-bottom {
position: absolute;
right: -20px;
top: 25px;
font-size: 12px;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,57 @@
<template>
<div class="menu-wrapper">
<template v-if="sideMenu&&!sideMenu.hidden&&sideMenu.children">
<el-submenu :index="sideMenu.name||sideMenu.path" :key="sideMenu.name">
<template slot="title">
<svg-icon v-if="sideMenu.meta&&sideMenu.meta.icon" :icon-class="sideMenu.meta.icon"></svg-icon>
<span v-if="sideMenu.meta&&sideMenu.meta.title" slot="title">{{sideMenu.meta.title}}</span>
</template>
<template v-for="child in sideMenu.children" v-if="!child.hidden &&ids.indexOf(child.id)>-1" >
<sidebar-item class="nest-menu" v-if="child.children&&child.children.length>0 " :sideMenu="child" :key="child.path" :ids="ids"></sidebar-item>
<router-link v-else :to="sideMenu.path+'/'+child.path" :key="child.name">
<el-menu-item :index="sideMenu.path+'/'+child.path">
<svg-icon v-if="child.meta&&child.meta.icon" :icon-class="child.meta.icon"></svg-icon>
<span v-if="child.meta&&child.meta.title " slot="title">{{child.meta.title}}</span>
</el-menu-item>
</router-link>
</template>
</el-submenu>
</template>
</div>
</template>
<script>
import { generateTitle } from '@/utils/i18n'
export default {
name: 'SidebarItem',
props: {
routes: {
type: Array
},
// 当前路由
sideMenu:{
type: Object,
default:function () {
return {}
}
},
ids: {
type: Array,
default:function () {
return []
}
},
isNest: {
type: Boolean,
default: false
}
},
methods: {
generateTitle
}
}
</script>

View File

@@ -0,0 +1,49 @@
<template>
<el-scrollbar wrapClass="scrollbar-wrapper">
<el-menu
mode="vertical"
:show-timeout="200"
:default-active="$route.path"
:collapse="isCollapse"
background-color="#304156"
text-color="#bfcbd9"
active-text-color="#409EFF"
:default-openeds="defaultOpends"
>
<sidebar-item :routes="permission_routers" :ids="ids" :sideMenu="sideMenu"></sidebar-item>
</el-menu>
</el-scrollbar>
</template>
<script>
import { mapGetters } from 'vuex'
import SidebarItem from './SidebarItem'
export default {
components: { SidebarItem },
computed: {
...mapGetters([
'permission_routers',
'sidebar',
"ids",
"sideMenu",
"topMenu"
]),
isCollapse() {
return !this.sidebar.opened
}
},
data(){
return {
defaultOpends:''
}
},
created(){
this.defaultOpends = this.topMenu.map((item)=>{
return item.name
})
console.log(this.defaultOpends)
}
}
</script>

View File

@@ -0,0 +1,204 @@
<template>
<div class="tags-view-container">
<scroll-pane class='tags-view-wrapper' ref='scrollPane'>
<router-link ref='tag' class="tags-view-item" :class="isActive(tag)?'active':''" v-for="tag in Array.from(visitedViews)"
:to="tag.path" :key="tag.path" @contextmenu.prevent.native="openMenu(tag,$event)">
{{generateTitle(tag.title)}}
<span class='el-icon-close' @click.prevent.stop='closeSelectedTag(tag)'></span>
</router-link>
</scroll-pane>
<ul class='contextmenu' v-show="visible" :style="{left:left+'px',top:top+'px'}">
<li @click="closeSelectedTag(selectedTag)">{{$t('tagsView.close')}}</li>
<li @click="closeOthersTags">{{$t('tagsView.closeOthers')}}</li>
<li @click="closeAllTags">{{$t('tagsView.closeAll')}}</li>
</ul>
</div>
</template>
<script>
import ScrollPane from '@/components/ScrollPane'
import { generateTitle } from '@/utils/i18n'
export default {
components: { ScrollPane },
data() {
return {
visible: false,
top: 0,
left: 0,
selectedTag: {}
}
},
computed: {
visitedViews() {
return this.$store.state.tagsView.visitedViews
}
},
watch: {
$route() {
this.addViewTags()
this.moveToCurrentTag()
},
visible(value) {
if (value) {
document.body.addEventListener('click', this.closeMenu)
} else {
document.body.removeEventListener('click', this.closeMenu)
}
}
},
mounted() {
this.addViewTags()
},
methods: {
generateTitle, // generateTitle by vue-i18n
generateRoute() {
if (this.$route.name) {
return this.$route
}
return false
},
isActive(route) {
return route.path === this.$route.path || route.name === this.$route.name
},
addViewTags() {
const route = this.generateRoute()
if (!route) {
return false
}
this.$store.dispatch('addVisitedViews', route)
},
moveToCurrentTag() {
const tags = this.$refs.tag
this.$nextTick(() => {
for (const tag of tags) {
if (tag.to === this.$route.path) {
this.$refs.scrollPane.moveToTarget(tag.$el)
break
}
}
})
},
closeSelectedTag(view) {
this.$store.dispatch('delVisitedViews', view).then((views) => {
if (this.isActive(view)) {
const latestView = views.slice(-1)[0]
if (latestView) {
this.$router.push(latestView.path)
} else {
this.$router.push('/')
}
}
})
},
closeOthersTags() {
this.$router.push(this.selectedTag.path)
this.$store.dispatch('delOthersViews', this.selectedTag).then(() => {
this.moveToCurrentTag()
})
},
closeAllTags() {
this.$store.dispatch('delAllViews')
this.$router.push('/')
},
openMenu(tag, e) {
this.visible = true
this.selectedTag = tag
this.left = e.clientX
this.top = e.clientY
},
closeMenu() {
this.visible = false
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.tags-view-container {
.tags-view-wrapper {
background: #fff;
height: 34px;
border-bottom: 1px solid #d8dce5;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
.tags-view-item {
display: inline-block;
position: relative;
height: 26px;
line-height: 26px;
border: 1px solid #d8dce5;
color: #495060;
background: #fff;
padding: 0 8px;
font-size: 12px;
margin-left: 5px;
margin-top: 4px;
&:first-of-type {
margin-left: 15px;
}
&.active {
background-color: #42b983;
color: #fff;
border-color: #42b983;
&::before {
content: '';
background: #fff;
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
position: relative;
margin-right: 2px;
}
}
}
}
.contextmenu {
margin: 0;
background: #fff;
z-index: 100;
position: absolute;
list-style-type: none;
padding: 5px 0;
border-radius: 4px;
font-size: 12px;
font-weight: 400;
color: #333;
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, .3);
li {
margin: 0;
padding: 7px 16px;
cursor: pointer;
&:hover {
background: #eee;
}
}
}
}
</style>
<style rel="stylesheet/scss" lang="scss">
//reset element css of el-icon-close
.tags-view-wrapper {
.tags-view-item {
.el-icon-close {
width: 16px;
height: 16px;
vertical-align: 2px;
border-radius: 50%;
text-align: center;
transition: all .3s cubic-bezier(.645, .045, .355, 1);
transform-origin: 100% 50%;
&:before {
transform: scale(.6);
display: inline-block;
vertical-align: -3px;
}
&:hover {
background-color: #b4bccc;
color: #fff;
}
}
}
}
</style>

View File

@@ -0,0 +1,4 @@
export { default as Navbar } from './Navbar'
export { default as Sidebar } from './Sidebar/index.vue'
export { default as TagsView } from './TagsView'
export { default as AppMain } from './AppMain'

View File

@@ -0,0 +1,41 @@
import store from '@/store'
const { body } = document
const WIDTH = 1024
const RATIO = 3
export default {
watch: {
$route(route) {
if (this.device === 'mobile' && this.sidebar.opened) {
store.dispatch('closeSideBar', { withoutAnimation: false })
}
}
},
beforeMount() {
window.addEventListener('resize', this.resizeHandler)
},
mounted() {
const isMobile = this.isMobile()
if (isMobile) {
store.dispatch('toggleDevice', 'mobile')
store.dispatch('closeSideBar', { withoutAnimation: true })
}
},
methods: {
isMobile() {
const rect = body.getBoundingClientRect()
return rect.width - RATIO < WIDTH
},
resizeHandler() {
if (!document.hidden) {
const isMobile = this.isMobile()
store.dispatch('toggleDevice', isMobile ? 'mobile' : 'desktop')
if (isMobile) {
store.dispatch('closeSideBar', { withoutAnimation: true })
}
}
}
}
}

View File

@@ -0,0 +1,10 @@
<script>
export default {
name: 'authredirect',
created() {
const hash = window.location.search.slice(1)
window.opener.location.href = window.location.origin + '/login#' + hash
window.close()
}
}
</script>

348
src/views/login/index.vue Normal file
View File

@@ -0,0 +1,348 @@
<template>
<div class="login-container">
<div id="canvascontainer" ref='can'></div>
<el-form class="login-form" autoComplete="on" :model="loginForm" :rules="loginRules"
ref="loginForm" label-position="left">
<div class="title-container">
<h3 class="title">{{$t('login.title')}}</h3>
<!--<lang-select class="set-language"></lang-select>-->
</div>
<el-form-item prop="username">
<span class="svg-container svg-container_login">
<svg-icon icon-class="user"/>
</span>
<el-input name="username" type="text" v-model="loginForm.username" autoComplete="on"
placeholder="username"/>
</el-form-item>
<el-form-item prop="password">
<span class="svg-container">
<svg-icon icon-class="password"/>
</span>
<el-input name="password" :type="passwordType" @keyup.enter.native="handleLogin"
v-model="loginForm.password" autoComplete="on" placeholder="password"/>
<!--<span class="show-pwd" @click="showPwd">-->
<!--<svg-icon icon-class="eye"/>-->
<!--</span>-->
</el-form-item>
<!--<el-row>
<el-col :span="15"><el-form-item prop="code">
<el-input name="code" type="text"
v-model="loginForm.code" autoComplete="on" placeholder="请输入验证码"/>
</el-form-item>
</el-col>
<el-col :span="9">
<el-button style="width:100%;height:47px;"
@click="onGetCode"
:disabled="isdisabled"
>
{{labelText}}
</el-button>
</el-col>
</el-row>-->
<el-button
type="primary"
style="width:100%;margin-bottom:30px;"
:loading="loading"
@click.native.prevent="handleLogin">
{{$t('login.logIn')}}
</el-button>
<!--<div class="tips">-->
<!--<span>{{$t('login.username')}} : admin</span>-->
<!--<span>{{$t('login.password')}} : {{$t('login.any')}}</span>-->
<!--</div>-->
<!--<div class="tips">-->
<!--<span style="margin-right:18px;">{{$t('login.username')}} : editor</span>-->
<!--<span>{{$t('login.password')}} : {{$t('login.any')}}</span>-->
<!--</div>-->
<!--<el-button class="thirdparty-button" type="primary" @click="showDialog=true">{{$t('login.thirdparty')}}</el-button>-->
</el-form>
<!--<el-dialog :title="$t('login.thirdparty')" :visible.sync="showDialog" append-to-body>-->
<!--{{$t('login.thirdpartyTips')}}-->
<!--<br/>-->
<!--<br/>-->
<!--<br/>-->
<!--<social-sign />-->
<!--</el-dialog>-->
</div>
</template>
<script>
import {isvalidUsername} from '@/utils/validate'
import LangSelect from '@/components/LangSelect'
import SocialSign from './socialsignin'
export default {
components: {LangSelect, SocialSign},
name: 'login',
data() {
// const validateUsername = (rule, value, callback) => {
// if (!isvalidUsername(value)) {
// callback(new Error('Please enter the correct user name'))
// } else {
// callback()
// }
// }
// const validatePassword = (rule, value, callback) => {
// if (value.length < 6) {
// callback(new Error('The password can not be less than 6 digits'))
// } else {
// callback()
// }
// }
return {
loginForm: {
username: '',
password: ''
},
loginRules: {
username: [{required: true, message: "请输入用户名", trigger: 'blur',}],
password: [{required: true, message: "请输入密码", trigger: 'blur',}]
},
labelText: '获取验证码',
passwordType: 'password',
loading: false,
showDialog: false,
isdisabled: false
}
},
methods: {
showPwd() {
if (this.passwordType === 'password') {
this.passwordType = ''
} else {
this.passwordType = 'password'
}
},
handleLogin() {
this.$refs.loginForm.validate(valid => {
if (valid) {
this.loading = true
// this.loginForm.password = md5(this.loginForm.password)
this.$store.dispatch('LoginByUsername', this.loginForm).then((response) => {
this.loading = false
this.$router.push({path: '/'})
// 这里要做判断 有些角色 没有权限调用此接口
//trade_coin_query trade_market_query
let authorities = response.authorities
authorities.forEach(item=>{
if(item.authority === "trade_coin_query"){
this.$store.dispatch('CoinAll');//获取所有币种信息
}
if(item.authority === "trade_market_query"){
this.$store.dispatch('MarketAll');//获取所有交易市场信息
}
})
}).catch(() => {
this.loading = false
})
} else {
console.log('error submit!!')
return false
}
})
},
onGetCode(){
var countdown = 60;
var text = this;
function settime(){
console.log("第二层this:"+text)
if(countdown === 0){
text.isdisabled = false;
text.labelText = "获取验证码";
countdown = 60;
return false;
}else{
text.isdisabled = true;
text.labelText = countdown + "s";
countdown--
}
setTimeout(function() {
settime();
},1000);
}
settime();
}
},
created() {
// window.addEventListener('hashchange', this.afterQRScan)
},
mounted() {
container = document.createElement('div');
this.$refs.can.appendChild(container);
camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 1, 10000);
camera.position.z = 1000;
scene = new THREE.Scene();
particles = new Array();
var PI2 = Math.PI * 2;
var material = new THREE.ParticleCanvasMaterial({
color: 0x0078de,
program: function (context) {
context.beginPath();
context.arc(0, 0, 1, 0, PI2, true);
context.fill();
}
});
var i = 0;
for (var ix = 0; ix < AMOUNTX; ix++) {
for (var iy = 0; iy < AMOUNTY; iy++) {
particle = particles[i++] = new THREE.Particle(material);
particle.position.x = ix * SEPARATION - ((AMOUNTX * SEPARATION) / 2);
particle.position.z = iy * SEPARATION - ((AMOUNTY * SEPARATION) / 2);
scene.add(particle);
}
}
renderer = new THREE.CanvasRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
container.appendChild(renderer.domElement);
document.addEventListener('mousemove', onDocumentMouseMove, false);
//
window.addEventListener('resize', onWindowResize, false);
animate();
},
destroyed() {
// window.removeEventListener('hashchange', this.afterQRScan)
}
}
var SEPARATION = 100, AMOUNTX = 50, AMOUNTY = 50;
var container;
var camera, scene, renderer;
var particles, particle, count = 0;
var mouseX = 0, mouseY = 0;
var windowHalfX = window.innerWidth / 2;
var windowHalfY = window.innerHeight / 2;
// animate();
function init() {
}
function onWindowResize() {
windowHalfX = window.innerWidth / 2;
windowHalfY = window.innerHeight / 2;
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
}
//
function onDocumentMouseMove(event) {
mouseX = event.clientX - windowHalfX;
mouseY = event.clientY - windowHalfY;
}
function onDocumentTouchStart(event) {
if (event.touches.length === 1) {
event.preventDefault();
mouseX = event.touches[0].pageX - windowHalfX;
mouseY = event.touches[0].pageY - windowHalfY;
}
}
function onDocumentTouchMove(event) {
if (event.touches.length === 1) {
event.preventDefault();
mouseX = event.touches[0].pageX - windowHalfX;
mouseY = event.touches[0].pageY - windowHalfY;
}
}
//
function animate() {
requestAnimationFrame(animate);
render();
}
function render() {
camera.position.x += (mouseX - camera.position.x) * .05;
camera.position.y += (-mouseY - camera.position.y) * .05;
camera.lookAt(scene.position);
var i = 0;
for (var ix = 0; ix < AMOUNTX; ix++) {
for (var iy = 0; iy < AMOUNTY; iy++) {
particle = particles[i++];
particle.position.y = (Math.sin((ix + count) * 0.3) * 50) + (Math.sin((iy + count) * 0.5) * 50);
particle.scale.x = particle.scale.y = (Math.sin((ix + count) * 0.3) + 1) * 2 + (Math.sin((iy + count) * 0.5) + 1) * 2;
}
}
renderer.render(scene, camera);
count += 0.1;
}
</script>
<style rel="stylesheet/scss" lang="scss">
</style>

View File

@@ -0,0 +1,68 @@
<template>
<div class="social-signup-container">
<div class="sign-btn" @click="wechatHandleClick('wechat')">
<span class="wx-svg-container"><svg-icon icon-class="wechat" class="icon"></svg-icon></span> 微信
</div>
<div class="sign-btn" @click="tencentHandleClick('tencent')">
<span class="qq-svg-container"><svg-icon icon-class="qq" class="icon"></svg-icon></span> QQ
</div>
</div>
</template>
<script>
import openWindow from '@/utils/openWindow'
export default {
name: 'social-signin',
methods: {
wechatHandleClick(thirdpart) {
this.$store.commit('SET_AUTH_TYPE', thirdpart)
const appid = 'xxxxx'
const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/authredirect')
const url = 'https://open.weixin.qq.com/connect/qrconnect?appid=' + appid + '&redirect_uri=' + redirect_uri + '&response_type=code&scope=snsapi_login#wechat_redirect'
openWindow(url, thirdpart, 540, 540)
},
tencentHandleClick(thirdpart) {
this.$store.commit('SET_AUTH_TYPE', thirdpart)
const client_id = 'xxxxx'
const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/authredirect')
const url = 'https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=' + client_id + '&redirect_uri=' + redirect_uri
openWindow(url, thirdpart, 540, 540)
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.social-signup-container {
margin: 20px 0;
.sign-btn {
display: inline-block;
cursor: pointer;
}
.icon {
color: #fff;
font-size: 30px;
margin-top: 6px;
}
.wx-svg-container,
.qq-svg-container {
display: inline-block;
width: 40px;
height: 40px;
line-height: 40px;
text-align: center;
padding-top: 1px;
border-radius: 4px;
margin-bottom: 20px;
margin-right: 5px;
}
.wx-svg-container {
background-color: #8dc349;
}
.qq-svg-container {
background-color: #6BA2D6;
margin-left: 50px;
}
}
</style>

View File

@@ -0,0 +1,147 @@
<template>
<div class="common-main">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"
class="search-container">
<el-form-item label="银行卡号" prop="bankCard">
<el-input v-model="ruleForm.bankCard" class="form-input" clearable></el-input>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
<el-button type="primary" icon="el-icon-edit" @click="handleCreate">新增银行卡</el-button>
</div>
</el-form>
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<!--<el-table-column
type="selection"
width="55">
</el-table-column>-->
<el-table-column
prop="id"
label="ID"
width="180"
>
</el-table-column>
<el-table-column
prop="name"
label="开户人姓名"
width="120"
>
</el-table-column>
<el-table-column
prop="bankName"
label="开户行(包含支行名称)"
width="280"
>
</el-table-column>
<el-table-column
prop="bankCard"
label="卡号"
width="180"
>
</el-table-column>
<el-table-column
prop="status"
label="状态"
>
<template slot-scope="scope">
<el-tag :type="scope.row.status|elTagFilter">
{{scope.row.status | statusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="操作"
width="250"
>
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row)" icon="el-icon-edit">编辑
</el-button>
<el-button
size="mini"
v-show="scope.row.status===0"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">启用
</el-button>
<el-button
size="mini"
type="danger"
v-show="scope.row.status===1"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">禁用
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<bankCardDialog ref="bankCardDialog" @refreshList="_getList"></bankCardDialog>
</div>
</template>
<script>
import bankCardDialog from './component/bankcard-dialog';
import {normalConfigApi} from "@/api/normalConfigApi";
import commonMixin from '@/components/mixin/common-mixin';
export default {
components: {bankCardDialog},
mixins: [commonMixin],
data() {
return {
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
]
},
ruleForm: {
bankCard: ''
}
};
},
methods: {
listCallback() {
return normalConfigApi.getBankList(this.ruleForm,
this.listQuery.current, this.listQuery.size);
},
changeStatusCallback(id, status) {
return normalConfigApi.setBanks({
bankId: id,
status: status
});
},
// deleteCallback(ids) {
// return normalConfigApi.deleteNotice(ids)
// },
handleCreate() {
this.$refs.bankCardDialog.showDialog(1);
},
handleEdit(index, row) {
this.$refs.bankCardDialog.showDialog(2, Object.assign({}, row));
}
}
};
</script>

View File

@@ -0,0 +1,22 @@
<template>
<div>
合作渠道管理
</div>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,134 @@
<template>
<div class="common-main">
<!--<el-form :rules="rules" ref="ruleForm" label-width="100px" class="search-container">
<div class="operation-container">
<el-button type="primary" icon="el-icon-edit" @click="handleCreate">新增配置</el-button>
</div>
</el-form>-->
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"
class="search-container">
<el-form-item label="规则类型" prop="type">
<el-input v-model="ruleForm.type" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="规则代码" prop="code">
<el-input v-model="ruleForm.code" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="规则名称" prop="name">
<el-input v-model="ruleForm.name" class="form-input" clearable></el-input>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索
</el-button>
<el-button type="primary" icon="el-icon-edit" @click="handleCreate">新建</el-button>
</div>
</el-form>
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
prop="type"
label="类型"
width="100"
>
</el-table-column>
<el-table-column
prop="code"
label="规则代码"
width="120"
class-name="article-content-class"
>
</el-table-column>
<el-table-column
prop="name"
label="规则名称"
width="200"
>
</el-table-column>
<el-table-column
prop="desc"
label="规则描述"
width="300"
>
</el-table-column>
<el-table-column
prop="value"
label="值"
width="450"
>
</el-table-column>
<el-table-column
label="操作"
width="200"
>
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row)" icon="el-icon-edit">编辑
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<cnyRechargeDialog ref="cnyRechargeDialog" @refreshList="_getList"></cnyRechargeDialog>
</div>
</template>
<script>
import cnyRechargeDialog from './component/cnyrecharge-dialog';
import {normalConfigApi} from "@/api/normalConfigApi";
import commonMixin from '@/components/mixin/common-mixin';
export default {
components: {cnyRechargeDialog},
mixins: [commonMixin],
data() {
return {
rules: {
title: [
]
},
ruleForm: {
type: '',
code: ''
}
};
},
methods: {
async listCallback() {
return await normalConfigApi.getConfigList(this.listQuery.current, this.listQuery.size,
this.ruleForm);
},
handleCreate() {
this.$refs.cnyRechargeDialog.showDialog(1);
},
handleEdit(index, row) {
this.$refs.cnyRechargeDialog.showDialog(2, Object.assign({}, row));
}
}
};
</script>

View File

@@ -0,0 +1,22 @@
<template>
<div>
场外交易提现配置
</div>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,22 @@
<template>
<div>
分佣奖励
</div>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,133 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
@close="closeDialog"
>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="180px">
<el-form-item label="开户人姓名" prop="name">
<el-input v-model="ruleForm.name" class="form-input"></el-input>
</el-form-item>
<el-form-item label="开户行(包含支行名称)" prop="bankName">
<el-input v-model="ruleForm.bankName" class="form-input"></el-input>
</el-form-item>
<el-form-item label="卡号" prop="bankCard">
<el-input v-model="ruleForm.bankCard" class="form-input" type="text"></el-input>
</el-form-item>
<!-- <el-form-item label="币种">
<el-select v-model="ruleForm.coinId" placeholder="币种">
<el-option :label="item.name" @change="updateCoinType(item)" :value="item.id" v-for="item in coinAll" :key="item.id"></el-option>
</el-select>
</el-form-item>-->
<el-form-item label="状态">
<el-switch
v-model="statusFlag"
active-text="开启"
inactive-text="关闭">
</el-switch>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import Tinymce from '@/components/Tinymce'
import { normalConfigApi } from '@/api/normalConfigApi'
import dialogMixin from '@/components/mixin/dialog-mixin'
import {
mapGetters
} from 'vuex'
export default {
components: { Tinymce },
mixins: [dialogMixin],
computed: {
...mapGetters(['getCoinAll'])
},
mounted() {
this.coinAll = this.getCoinAll
},
data() {
return {
dialogTitle: '新建银行卡',
coinAll: '',
rules: {
name: [
{ required: true, message: '请输入开户人姓名', trigger: 'blur' }
],
bankName: [
{ required: true, message: '请输入开户行名称', trigger: 'blur' }
],
bankCard: [
{ required: true, message: '请输入卡号', trigger: 'blur' }
]
},
ruleForm: {
coinId: null,
coinName: null,
status: null
},
statusFlag: ''
}
},
watch: {
dialogType(val) {
if (val === 1) {
this.statusFlag = 0
this.dialogTitle = '新建银行卡'
} else {
this.dialogTitle = '编辑银行卡'
}
},
statusFlag(val) {
if (val) {
this.ruleForm.status = 1
} else {
this.ruleForm.status = 0
}
}
},
methods: {
editCallback(row) {
this.ruleForm.coinId = row.coinId !== null ? row.coinId.toString() : '0'
this.statusFlag = row.status === 1
},
updateCoinType(item) {
this.ruleForm.coinId = item.id
this.ruleForm.coinName = item.name
},
createCallback() {
this.updateRuleForm()
return normalConfigApi.createBank(this.ruleForm)
},
updateRuleForm() {
this.ruleForm.status ? this.ruleForm.status = 1 : this.ruleForm.status = 0
for (let i = 0; i < this.coinAll.length; i++) {
if (this.ruleForm.coinId === this.coinAll[i].id) {
this.ruleForm.coinName = this.coinAll[i].name
}
}
},
updateCallback() {
this.updateRuleForm()
return normalConfigApi.updateBank(this.ruleForm)
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,94 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
@close="closeDialog"
>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-form-item label="类型" prop="type">
<!--<el-select v-model="ruleForm.type" placeholder="类型" :disabled="dialogType==2">
<el-option label="CNY" value="CNY"></el-option>
<el-option label="SYSTEM" value="SYSTEM"></el-option>
</el-select>-->
<el-input v-model="ruleForm.type" class="form-input" :disabled="dialogType==2"></el-input>
</el-form-item>
<el-form-item label="规则代码" prop="code">
<el-input v-model="ruleForm.code" class="form-input" :disabled="dialogType==2"></el-input>
</el-form-item>
<el-form-item label="规则名称" prop="name">
<el-input v-model="ruleForm.name" class="form-input" type="text"></el-input>
</el-form-item>
<el-form-item label="规则描述" prop="desc">
<el-input v-model="ruleForm.desc" class="form-input" type="text"></el-input>
</el-form-item>
<el-form-item label="值" prop="value">
<el-input v-model="ruleForm.value" class="form-input" type="text"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import {normalConfigApi} from "@/api/normalConfigApi";
import dialogMixin from '@/components/mixin/dialog-mixin';
export default {
mixins : [dialogMixin],
data() {
return {
dialogTitle: '新建配置',
coinAll : '',
rules : {
type : [
{required: true, message: '请输入类型', trigger: 'blur'}
],
code : [
{required: true, message: '请输入规则代码', trigger: 'blur'}
],
name : [
{required: true, message: '请输入规则名称', trigger: 'blur'}
],
desc : [
{required: true, message: '请输入规则描述', trigger: 'blur'}
],
value: [
{required: true, message: '请输入值', trigger: 'blur'}
]
},
ruleForm : {
type: ''
}
};
},
watch : {
dialogType(val) {
if (val === 1) {
this.dialogTitle = "新建配置";
} else {
this.dialogTitle = "编辑配置";
}
}
},
methods: {
async createCallback() {
return await normalConfigApi.createConfig(this.ruleForm);
},
async updateCallback() {
return await normalConfigApi.updateConfig(this.ruleForm);
}
}
};
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,40 @@
<template>
<el-upload action="https://upload.qbox.me" :data="dataObj" drag :multiple="true" :before-upload="beforeUpload">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
</template>
<script>
import { getToken } from '@/api/qiniu'
// 获取七牛token 后端通过Access Key,Secret Key,bucket等生成token
// 七牛官方sdk https://developer.qiniu.com/sdk#official-sdk
export default{
data() {
return {
dataObj: { token: '', key: '' },
image_uri: [],
fileList: []
}
},
methods: {
beforeUpload() {
const _self = this
return new Promise((resolve, reject) => {
getToken().then(response => {
const key = response.data.qiniu_key
const token = response.data.qiniu_token
_self._data.dataObj.token = token
_self._data.dataObj.key = key
resolve(true)
}).catch(err => {
console.log(err)
reject(false)
})
})
}
}
}
</script>

View File

@@ -0,0 +1,118 @@
<!-- 场外交易充值统计 -->
<template>
<div class="common-main">
<!-- Search Form -->
<el-form :rules="rules" :model="ruleForm" ref="ruleForm" label-width="100px" class="search-container">
<el-form-item label="统计时间" prop="countTime">
<!-- 日期选择器 -->
<el-date-picker
v-model="ruleForm.dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="datePickerOptions"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
</div>
</el-form>
<!-- Search Form End -->
<!-- Table -->
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
prop="created"
label="统计时间"
>
</el-table-column>
<el-table-column
prop="sumNum"
label="充值金额"
>
</el-table-column>
<el-table-column
prop="sumMum"
label="到账金额"
>
</el-table-column>
<el-table-column
prop="counts"
label="充值笔数"
>
</el-table-column>
<el-table-column
prop="validCounts"
label="成功笔数"
>
</el-table-column>
<el-table-column
prop="userCounts"
label="充值用户数"
>
</el-table-column>
<el-table-column
prop="userId"
label="最多充值用户ID"
>
</el-table-column>
</el-table>
<!-- Table End-->
<!-- Page -->
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<!-- Page End -->
</div>
</template>
<script>
import {countApi} from "@/api/countApi";
import commonMixin from '@/components/mixin/common-mixin'
export default {
mixins: [commonMixin],
data() {
return {
rules:{},
ruleForm:{}
}
},
methods: {
listCallback(){
let url = '/cashRechargeCount/getList';
return countApi.getCountList(this.ruleForm,this.listQuery.current, this.listQuery.size,url);
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,117 @@
<!-- 场外交易提现统计 -->
<template>
<div class="common-main">
<!-- Search Form -->
<el-form :rules="rules" :model="ruleForm" ref="ruleForm" label-width="100px" class="search-container">
<el-form-item label="统计时间" prop="countTime">
<!-- 日期选择器 -->
<el-date-picker
v-model="ruleForm.dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="datePickerOptions"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
</div>
</el-form>
<!-- Search Form End -->
<!-- Table -->
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
prop="created"
label="统计时间"
>
</el-table-column>
<el-table-column
prop="sumNum"
label="提现金额"
>
</el-table-column>
<el-table-column
prop="sumMum"
label="到账金额"
>
</el-table-column>
<el-table-column
prop="counts"
label="提现笔数"
>
</el-table-column>
<el-table-column
prop="validCounts"
label="提现成功笔数"
>
</el-table-column>
<el-table-column
prop="userCounts"
label="提现用户数"
>
</el-table-column>
<el-table-column
prop="userId"
label="最多提现用户ID"
>
</el-table-column>
</el-table>
<!-- Table End-->
<!-- Page -->
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<!-- Page End -->
</div>
</template>
<script>
import {countApi} from "@/api/countApi";
import commonMixin from '@/components/mixin/common-mixin'
export default {
mixins: [commonMixin],
data() {
return {
rules:{},
ruleForm:{}
}
},
methods: {
listCallback(){
let url = '/finance/cashWithdrawals/count';
return countApi.getCountList(this.ruleForm,this.listQuery.current, this.listQuery.size,url);
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,117 @@
<!-- 充币统计 -->
<template>
<div class="common-main">
<!-- Search Form -->
<el-form :rules="rules" :model="ruleForm" ref="ruleForm" label-width="100px" class="search-container">
<el-form-item label="统计时间" prop="countTime">
<!-- 日期选择器 -->
<el-date-picker
v-model="ruleForm.dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="datePickerOptions"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
</div>
</el-form>
<!-- Search Form End -->
<!-- Table -->
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
prop="created"
label="统计时间"
>
</el-table-column>
<el-table-column
prop="sumAmount"
label="充值金额"
>
</el-table-column>
<!--<el-table-column-->
<!--prop="sumMum"-->
<!--label="到账金额"-->
<!--&gt;-->
<!--</el-table-column>-->
<el-table-column
prop="counts"
label="充值笔数"
>
</el-table-column>
<!--<el-table-column-->
<!--prop="validCounts"-->
<!--label="成功笔数"-->
<!--&gt;-->
<!--</el-table-column>-->
<el-table-column
prop="userCounts"
label="充值用户数"
>
</el-table-column>
<el-table-column
prop="userId"
label="最多充值用户ID"
>
</el-table-column>
</el-table>
<!-- Table End-->
<!-- Page -->
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<!-- Page End -->
</div>
</template>
<script>
import {countApi} from "@/api/countApi";
import commonMixin from '@/components/mixin/common-mixin'
export default {
mixins: [commonMixin],
data() {
return {
rules:{},
ruleForm:{}
}
},
methods: {
listCallback(){
let url = '/coinRechargeCount/getList';
return countApi.getCountList(this.ruleForm,this.listQuery.current, this.listQuery.size,url);
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,117 @@
<!-- 提币统计 -->
<template>
<div class="common-main">
<!-- Search Form -->
<el-form :rules="rules" :model="ruleForm" ref="ruleForm" label-width="100px" class="search-container">
<el-form-item label="统计时间" prop="countTime">
<!-- 日期选择器 -->
<el-date-picker
v-model="ruleForm.dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="datePickerOptions"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
</div>
</el-form>
<!-- Search Form End -->
<!-- Table -->
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
prop="created"
label="统计时间"
>
</el-table-column>
<el-table-column
prop="sumNum"
label="提现金额"
>
</el-table-column>
<el-table-column
prop="sumMum"
label="提现汇出金额"
>
</el-table-column>
<el-table-column
prop="counts"
label="提现笔数"
>
</el-table-column>
<el-table-column
prop="validCounts"
label="成功笔数"
>
</el-table-column>
<el-table-column
prop="userCounts"
label="提现用户数"
>
</el-table-column>
<el-table-column
prop="userId"
label="最多提现用户ID"
>
</el-table-column>
</el-table>
<!-- Table End-->
<!-- Page -->
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<!-- Page End -->
</div>
</template>
<script>
import {countApi} from "@/api/countApi";
import commonMixin from '@/components/mixin/common-mixin'
export default {
mixins: [commonMixin],
data() {
return {
rules:{},
ruleForm:{}
}
},
methods: {
listCallback(){
let url = '/coinWithdrawalsCount/getList';
return countApi.getCountList(this.ruleForm,this.listQuery.current, this.listQuery.size,url);
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,93 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="80%"
@close="closeDialog"
>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
</span>
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
highlight-current-row
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
prop="userId"
label="用户ID"
>
</el-table-column>
<el-table-column
prop="btcAmount"
label="持有BTC"
>
</el-table-column>
<el-table-column
prop="usdtAmount"
label="持有CNY"
>
</el-table-column>
<el-table-column
prop="ethAmount"
label="持有ETH"
>
</el-table-column>
<el-table-column
prop="ltcAmount"
label="持有LTC"
>
</el-table-column>
</el-table>
<!-- Page -->
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<!-- Page End -->
</el-dialog>
</template>
<script>
import Tinymce from '@/components/Tinymce'
import {countApi} from "@/api/countApi";
import commonMixin from '@/components/mixin/common-mixin'
import dialogMixin from '@/components/mixin/dialog-mixin'
export default {
components: {Tinymce},
mixins: [dialogMixin,commonMixin],
data() {
return {
dialogTitle: '用户BTC持仓',
rules: {}
}
},
methods: {
listCallback(){
let url = '/trade/count/top/balance';
return countApi.getCountList(this.ruleForm,this.listQuery.current, this.listQuery.size,url);
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,94 @@
<!-- 交易量排行 -->
<template>
<div class="common-main">
<!-- Search Form -->
<el-form :rules="rules" :model="ruleForm" ref="ruleForm" label-width="100px" class="search-container">
<el-form-item label="统计时间" prop="countTime">
<!-- 日期选择器 -->
<el-date-picker
v-model="ruleForm.dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="datePickerOptions"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
</div>
</el-form>
<!-- Search Form End -->
<!-- Table -->
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
prop="tradeDate"
label="统计时间"
>
</el-table-column>
<el-table-column
prop="marketName"
label="交易市场"
>
</el-table-column>
<el-table-column
prop="userId"
label="用户ID"
>
</el-table-column>
<el-table-column
prop="volume"
label="交易量"
>
</el-table-column>
</el-table>
<!-- Table End-->
<!-- Page -->
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<!-- Page End -->
</div>
</template>
<script>
import {countApi} from "@/api/countApi";
import commonMixin from '@/components/mixin/common-mixin'
export default {
mixins: [commonMixin],
data() {
return {
rules:{},
ruleForm:{}
}
},
methods: {
listCallback(){
let url = '/trade/count/top/volume';
return countApi.getCountList(this.ruleForm,this.listQuery.current, this.listQuery.size,url);
}
}
}
</script>

View File

@@ -0,0 +1,108 @@
<!-- 持仓排行 -->
<template>
<div class="common-main">
<!-- Search Form -->
<el-form :rules="rules" :model="ruleForm" ref="ruleForm" label-width="100px" class="search-container">
<el-form-item label="统计时间" prop="countTime">
<!-- 日期选择器 -->
<el-date-picker
v-model="ruleForm.dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="datePickerOptions"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
</div>
</el-form>
<!-- Search Form End -->
<!-- Table -->
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
highlight-current-row
@current-change="handleCurrentChange"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
prop="tradeDate"
label="统计时间"
>
</el-table-column>
<el-table-column
prop="marketName"
label="交易市场"
>
</el-table-column>
<el-table-column
prop="userId"
label="用户ID"
>
</el-table-column>
<el-table-column
prop="volume"
label="交易量"
>
</el-table-column>
</el-table>
<!-- Table End-->
<!-- Page -->
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<!-- Page End -->
<article-dialog ref="articleDialog" @refreshList="_getList"></article-dialog>
</div>
</template>
<script>
import articleDialog from './component/article-dialog'
import {countApi} from "@/api/countApi";
import commonMixin from '@/components/mixin/common-mixin'
export default {
components: {articleDialog},
mixins: [commonMixin],
data() {
return {
rules:{},
ruleForm:{}
}
},
methods: {
listCallback(){
let url = '/trade/count/top/volume';
return countApi.getCountList(this.ruleForm,this.listQuery.current, this.listQuery.size,url);
},
handleCurrentChange() {
this.$refs.articleDialog.showDialog();
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,9 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>

View File

@@ -0,0 +1,8 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>

View File

@@ -0,0 +1,103 @@
<template>
<div class="common-main">
<!-- Search Form -->
<el-form :rules="rules" :model="ruleForm" ref="ruleForm" label-width="100px" class="search-container">
<el-form-item label="统计时间" prop="countTime">
<el-date-picker
v-model="ruleForm.dateRange"
type="daterange"
align="right"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="datePickerOptions"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
</div>
</el-form>
<!-- Search Form End -->
<!-- Table -->
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width:100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
label="统计时间"
prop="loginDate"
>
</el-table-column>
<el-table-column
label="登录人数"
prop="loginNum"
>
</el-table-column>
<el-table-column
label="参与交易人数"
prop="tradeNum"
>
</el-table-column>
<el-table-column
label="充值人数"
prop="rechargeNum"
>
</el-table-column>
<el-table-column
label="提现人数"
prop="withdrawNum"
>
</el-table-column>
<el-table-column
label="充币人数"
prop="rechargeCoinNum"
>
</el-table-column>
<el-table-column
label="提币人数"
prop="withdrawCoinNum"
>
</el-table-column>
</el-table>
<!-- Table End -->
<!-- Page -->
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<!-- Page End -->
</div>
</template>
<script>
import {countApi} from "@/api/countApi";
import commonMixin from "@/components/mixin/common-mixin"
export default {
mixins:[commonMixin],
data() {
return {
rules:{},
ruleForm:{}
}
},
methods: {
listCallback(){
let url = '/users/count/login';
return countApi.getCountList(this.ruleForm,this.listQuery.current, this.listQuery.size,url);
}
}
}
</script>

View File

@@ -0,0 +1,109 @@
<template>
<div class="common-main">
<!-- Search Form -->
<el-form :rules="rules" :model="ruleForm" ref="ruleForm" label-width="100px" class="search-container">
<el-form-item label="统计时间" prop="countTime">
<!-- 日期选择器 -->
<el-date-picker
v-model="ruleForm.dateRange"
type="daterange"
align="right"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="datePickerOptions"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
</div>
</el-form>
<!-- Search Form End -->
<!-- Table -->
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
prop="countDate"
label="统计时间"
>
</el-table-column>
<el-table-column
prop="regNum"
label="注册人数"
>
</el-table-column>
<el-table-column
prop="mobileBindNum"
label="绑定手机人数"
>
</el-table-column>
<el-table-column
prop="emailBindNum"
label="绑定邮箱人数"
>
</el-table-column>
<el-table-column
prop="setPayPwdNum"
label="设置资金密码人数"
>
</el-table-column>
<el-table-column
prop="rechargeNum"
label="完成充值人数"
>
</el-table-column>
</el-table>
<!-- Table End-->
<!-- Page -->
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<!-- Page End -->
</div>
</template>
<script>
import {countApi} from "@/api/countApi";
import commonMixin from '@/components/mixin/common-mixin'
export default {
mixins: [commonMixin],
data() {
return {
rules:{
},
ruleForm:{
countTime:'',
}
}
},
methods: {
listCallback(){
let url = '/user/count/reg';
return countApi.getCountList(this.ruleForm,this.listQuery.current, this.listQuery.size,url);
}
}
}
</script>

View File

@@ -0,0 +1,10 @@
const data = {
state: {
iconsMap: []
},
generate(iconsMap) {
this.state.iconsMap = iconsMap
}
}
export default data

View File

@@ -0,0 +1,77 @@
<template>
<div class="icons-container">
<p class="warn-content">
<a href="https://panjiachen.github.io/vue-element-admin-site/#/icon" target="_blank">Add and use
</a>
</p>
<div class="icons-wrapper">
<div v-for="item of iconsMap" :key="item" @click="handleClipboard(generateIconCode(item),$event)">
<el-tooltip placement="top">
<div slot="content">
{{generateIconCode(item)}}
</div>
<div class="icon-item">
<svg-icon class-name="disabled" :icon-class="item" />
<span>{{item}}</span>
</div>
</el-tooltip>
</div>
</div>
</div>
</template>
<script>
import icons from './generateIconsView'
import clipboard from '@/utils/clipboard'
export default {
name: 'icons',
data() {
return {
iconsMap: []
}
},
mounted() {
const iconsMap = icons.state.iconsMap.map((i) => {
return i.default.id.split('-')[1]
})
this.iconsMap = iconsMap
},
methods: {
generateIconCode(symbol) {
return `<svg-icon icon-class="${symbol}" />`
},
handleClipboard(text, event) {
clipboard(text, event)
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.icons-container {
margin: 10px 20px 0;
overflow: hidden;
.icons-wrapper {
margin: 0 auto;
}
.icon-item {
margin: 20px;
height: 110px;
text-align: center;
width: 110px;
float: left;
font-size: 30px;
color: #24292e;
cursor: pointer;
}
span {
display: block;
font-size: 24px;
margin-top: 10px;
}
.disabled{
pointer-events: none;
}
}
</style>

View File

@@ -0,0 +1,147 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
@close="closeDialog"
>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="180px">
<el-form-item label="用户名" prop="username">
<el-input v-model="ruleForm.username" class="form-input"></el-input>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input v-model="ruleForm.password" class="form-input"></el-input>
</el-form-item>
<el-form-item label="姓名" prop="fullname">
<el-input v-model="ruleForm.fullname" class="form-input"></el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model="ruleForm.mobile" class="form-input"></el-input>
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input v-model="ruleForm.email" class="form-input"></el-input>
</el-form-item>
<el-form-item label="角色" prop="role_strings_array">
<el-checkbox-group v-model="ruleForm.role_strings_array">
<el-checkbox v-for="item in roleSelect"
:label="item.id"
:key="item.id">
{{item.name}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="状态">
<el-switch
v-model="statusFlag"
active-text="开启"
inactive-text="关闭">
</el-switch>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import { sysConfigApi } from '@/api/sysConfigApi'
import dialogMixin from '@/components/mixin/dialog-mixin'
export default {
mixins: [dialogMixin],
data() {
return {
dialogTitle: '新建员工',
roleSelect: [],
statusFlag: '',
rules: {
username: [
{ required: true, message: '请输入用户名', trigger: 'blur' }
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' }
],
fullname: [
{ required: true, message: '请输入姓名', trigger: 'blur' }
],
mobile: [
{ required: true, message: '请输入手机号', trigger: 'blur' }
],
email: [
{ required: true, message: '请输入邮箱', trigger: 'blur' }
],
role_strings_array: [
{ required: true, message: '请选择角色', trigger: 'blur' }
]
},
ruleForm: {
username: [],
email: [],
password: [],
fullname: [],
mobile: [],
role_strings_array: []
}
}
},
watch: {
dialogType(val) {
if (val === 1) {
this.statusFlag = 0
this.dialogTitle = '新建员工'
} else {
this.dialogTitle = '编辑员工'
}
}
},
async mounted() {
const response = await sysConfigApi.getRoleList({}, 1, 100)
const { records } = response
this.roleSelect = records
},
methods: {
editCallback(row) {
this.statusFlag = row.status === 1
},
getResponseData() {
const props = [
'username',
'password',
'fullname',
'mobile',
'email',
'role_strings',
'status',
'id'
]
const data = { ...this.ruleForm }
const roleSelect = this.roleSelect
const { role_strings_array = [] } = data
data.role_strings =
role_strings_array.map(item => roleSelect.find(child => child.id === item).id).join(',')
const requestData = {}
// props.map(key => data[key] === null ? requestData[key] = data[key] : '')
props.map(key => requestData[key] = data[key])
return requestData
},
createCallback() {
return sysConfigApi.createEmployee(this.getResponseData())
},
updateCallback() {
return sysConfigApi.updateEmployee(this.getResponseData())
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,124 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
@close="closeDialog"
>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="180px">
<el-form-item label="名称" prop="name">
<el-input v-model="ruleForm.name" class="form-input" :disabled="dialogType==2"></el-input>
</el-form-item>
<el-form-item label="描述" prop="description">
<el-input v-model="ruleForm.description" class="form-input"></el-input>
</el-form-item>
<el-form-item label="菜单ID" prop="topSelectedMenu" v-if="dialogType==1">
<el-cascader
:options="topMenuOptions"
:show-all-levels="false"
:props="topMenuProps"
v-model="ruleForm.topSelectedMenu">
</el-cascader>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import Tinymce from '@/components/Tinymce';
import {normalConfigApi} from "@/api/normalConfigApi";
import dialogMixin from '@/components/mixin/dialog-mixin';
import {mapGetters} from 'vuex';
export default {
mixins: [dialogMixin],
data() {
return {
topMenuOptions: '',
topMenuProps: {
value: 'id',
label: 'title',
children: 'children',
},
dialogTitle: '新建功能权限',
coinAll: '',
rules: {
name: [
{required: true, message: '请输入名称', trigger: 'blur'}
],
description: [
{required: true, message: '请输入描述', trigger: 'blur'}
],
topSelectedMenu: [
{required: true, message: '请选择菜单ID', trigger: 'blur'}
]
},
ruleForm: {
name: '',
description: '',
topSelectedMenu: [],
}
};
},
computed: {
...mapGetters(['topMenu'])
},
created() {
this.recursionMenu(this.topMenu);
this.topMenuOptions = this.topMenu;
},
watch: {
dialogType(val) {
if (val === 1) {
this.dialogTitle = "新建功能权限";
} else {
this.dialogTitle = "编辑功能权限";
}
}
},
methods: {
// 递归设置菜单名称
recursionMenu(data) {
if (data.length != 0) {
for (let i = 0; i < data.length; i++) {
data[i].title = data[i].meta.title;
if (data[i].children) {
this.recursionMenu(data[i].children)
}
}
}
},
getRequestData() {
const props = ['id', 'name', 'description', 'menuId'];
const data = {};
props.map(key => this.ruleForm[key] ? data[key] = this.ruleForm[key] : '')
const menuId =
this.ruleForm.topSelectedMenu ?
this.ruleForm.topSelectedMenu[this.ruleForm.topSelectedMenu.length - 1] :
'';
if (menuId) {
data['menuId'] = menuId;
}
return data;
},
// 新建权限
createCallback() {
return normalConfigApi.createSysPrivileges(this.getRequestData());
},
// 修改权限
updateCallback() {
return normalConfigApi.editSysPrivileges(this.getRequestData());
},
}
};
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,72 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
@close="closeDialog"
>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-form-item :key="par.id" :label="par.name" v-for="par in configRule">
<el-checkbox-group v-model="checkList">
<el-checkbox label="复选框 A"></el-checkbox>
<el-checkbox label="复选框 B"></el-checkbox>
<el-checkbox label="复选框 C"></el-checkbox>
<el-checkbox label="禁用" disabled></el-checkbox>
<el-checkbox label="选中且禁用" disabled></el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import {sysConfigApi} from "@/api/sysConfigApi";
import dialogMixin from '@/components/mixin/dialog-mixin';
export default {
mixins : [dialogMixin],
data() {
return {
dialogTitle: '配置角色权限',
checkList : ['选中且禁用', '复选框 A'],
configRule : [],
rules : {
name: [
{required: true, message: '请输入角色', trigger: 'blur'}
],
code: [
{required: true, message: '请输入角色编码', trigger: 'blur'}
]
},
ruleForm : {}
};
},
methods: {
async editCallback(row) {
let that = this;
await sysConfigApi.getRolePrivileges(row.id).then(function (data) {
that.configRule = data;
});
console.log(that.configRule);
},
createCallback() {
return sysConfigApi.createRole(this.ruleForm);
},
updateCallback() {
// return sysConfigApi.updateRole(this.ruleForm);
}
}
};
</script>

View File

@@ -0,0 +1,77 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
@close="closeDialog"
>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="180px">
<el-form-item label="角色" prop="name">
<el-input v-model="ruleForm.name" class="form-input"></el-input>
</el-form-item>
<el-form-item label="角色编码" prop="code">
<el-input v-model="ruleForm.code" class="form-input"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import {sysConfigApi} from "@/api/sysConfigApi";
import dialogMixin from '@/components/mixin/dialog-mixin';
export default {
mixins: [dialogMixin],
data() {
return {
dialogTitle: '新建角色权限',
coinAll: '',
rules: {
name: [
{required: true, message: '请输入角色', trigger: 'blur'}
],
code: [
{required: true, message: '请输入角色编码', trigger: 'blur'}
]
},
ruleForm: {}
};
},
watch: {
dialogType(val) {
if (val === 1) {
this.dialogTitle = "新建角色权限";
} else {
this.dialogTitle = "编辑角色权限";
}
}
},
methods: {
getData() {
const data = {};
if (this.dialogType == 2) {
data['id'] = this.ruleForm.id;
}
data['name'] = this.ruleForm.name;
data['code'] = this.ruleForm.code;
return data;
},
async createCallback() {
return await sysConfigApi.createRole(this.getData());
}
}
};
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,136 @@
<template>
<div class="common-main">
<el-form :rules="rules" ref="ruleForm" :model="ruleForm" label-width="100px"
class="search-container">
<el-form-item label="手机号" prop="mobile">
<el-input v-model="ruleForm.mobile" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="姓名" prop="fullname">
<el-input v-model="ruleForm.fullname" class="form-input" clearable></el-input>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索
</el-button>
<el-button type="primary" icon="el-icon-edit" @click="handleCreate">新建</el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleDelete">删除</el-button>
</div>
</el-form>
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
prop="username"
label="用户名"
>
</el-table-column>
<el-table-column
prop="fullname"
label="姓名"
>
</el-table-column>
<el-table-column
prop="mobile"
width="250"
label="手机号"
>
</el-table-column>
<el-table-column
prop="email"
width="250"
label="邮箱"
>
</el-table-column>
<el-table-column
prop="status"
width="100"
label="状态"
>
<template slot-scope="scope">
<el-tag :type="scope.row.status | elTagFilter">
{{scope.row.status | statusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="操作"
>
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row)" icon="el-icon-edit">编辑
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<employeeDialog ref="employeeDialog" @refreshList="_getList"></employeeDialog>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import {sysConfigApi} from '@/api/sysConfigApi'
import employeeDialog from './component/employee-dialog'
export default {
components: {employeeDialog},
mixins: [commonMixin],
data() {
return {
rules: {},
ruleForm: {}
}
},
methods: {
listCallback() {
return sysConfigApi.getUsers(this.ruleForm,
this.listQuery.current, this.listQuery.size)
},
deleteCallback(ids) {
return sysConfigApi.deleteEmployee(ids)
},
getInitForm(data) {
const {role_strings = ''} = data;
return {
...data,
role_strings_array: role_strings ? role_strings.split(',').filter(item => !!item) : []
}
},
handleCreate() {
this.$refs.employeeDialog.showDialog(1, this.getInitForm({}));
},
handleEdit(index, row) {
console.log(row.role_strings)
this.$refs.employeeDialog.showDialog(2, this.getInitForm({...row}));
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,8 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>

View File

@@ -0,0 +1,22 @@
<template>
<div>
组织机构管理
</div>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,91 @@
<template>
<div class="common-main">
<el-form :rules="rules" ref="ruleForm" label-width="100px" class="search-container">
<div class="operation-container">
<el-button type="primary" icon="el-icon-edit" @click="handleCreate">新增功能权限</el-button>
</div>
</el-form>
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<!-- <el-table-column
type="selection"
width="55">
</el-table-column> -->
<el-table-column
prop="name"
label="名称"
>
</el-table-column>
<el-table-column
prop="description"
label="描述"
>
</el-table-column>
<el-table-column
label="操作"
>
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row)" icon="el-icon-edit">编辑
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<powerConfigDialog ref="powerConfigDialog" @refreshList="_getList"></powerConfigDialog>
</div>
</template>
<script>
import powerConfigDialog from './component/powerconfig-dialog';
import {sysConfigApi} from "@/api/sysConfigApi";
import commonMixin from '@/components/mixin/common-mixin';
export default {
components: {powerConfigDialog},
mixins : [commonMixin],
data() {
return {
rules : {
},
ruleForm: {
type: ''
}
};
},
methods: {
async listCallback() {
return await sysConfigApi.getPowerList(
this.listQuery.current, this.listQuery.size);
},
handleCreate() {
this.$refs.powerConfigDialog.showDialog(1);
},
handleEdit(index, row) {
this.$refs.powerConfigDialog.showDialog(2, Object.assign({}, row));
}
}
};
</script>

View File

@@ -0,0 +1,22 @@
<template>
<div>
流程配置
</div>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,164 @@
<template>
<div class="config-main">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
<el-form :model="ruleForm" ref="ruleForm">
<el-form-item class="par-name" :key="root.id" :label="root.name" v-for="root in configRule">
<template v-if="root.childs.length>0">
<el-form-item class="par-name" :key="sec.id" :label="sec.name" v-for="sec in root.childs">
<template v-if="sec.childs.length>0">
<el-form-item class="par-name" :key="third.id" :label="third.name" v-for="third in sec.childs">
<template v-if="third.privileges.length>0">
<el-checkbox @change="handleCheckedChange(child)" v-model="child.checked" v-for="child in third.privileges" :key="child.id" :label="child.description"></el-checkbox>
</template>
</el-form-item>
</template>
</el-form-item>
</template>
</el-form-item>
<el-row type="flex" class="operation-container" justify="flex-start">
<el-col :span="3">
<el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
</el-col>
<el-col :span="3">
<el-button type="danger" @click="handleCancel">返回</el-button>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import {sysConfigApi} from "../../../api/sysConfigApi";
export default {
data() {
return {
checkAll : false,
id : '',
ruleForm : {},
configRule : [],
checkList : [],
isIndeterminate : false,
privilegeIds : [],
countPrivilegeIds: []
};
},
async mounted() {
let that = this;
let id = this.$route.params.id;
this.id = id;
await sysConfigApi.getRolePrivileges(id).then(function (data) {
that.boolPrivileges(data);
that.configRule = data;
});
// console.log(that.countPrivilegeIds, that.privilegeIds);
},
methods: {
submitForm(formName) {
let id = this.$route.params.id;
let that = this;
this.$refs[formName].validate((valid) => {
if (valid) {
// alert('submit!');
sysConfigApi.postRolePrivileges(id, that.privilegeIds);
that.$notify({
title : '成功',
message : '配置权限成功',
type : 'success',
duration: 2000
});
that.$router.push("../role-manager");
} else {
console.log('error submit!!');
return false;
}
});
},
handleCheckAllChange() {
// this.checkedCities = val ? cityOptions : [];
this.isIndeterminate = false;
this.boolPrivileges(this.configRule, this.checkAll);
// console.log(this.configRule);
},
handleCancel() {
this.$router.push("../role-manager");
},
//判断状态
statusCheck() {
if (this.privilegeIds.length == 0) {
this.isIndeterminate = false;
}
if (this.privilegeIds.length > 0) {
this.isIndeterminate = true;
if (this.privilegeIds.length == this.countPrivilegeIds.length) {
this.checkAll = true;
this.isIndeterminate = false;
} else {
this.checkAll = false;
this.isIndeterminate = true;
}
}
},
handleCheckedChange(item) {
// this.boolPrivileges(this.configRule)
if (item.checked) {
this.privilegeIds.push(item.id);
} else {
for (let i = 0; i < this.privilegeIds.length; i ++) {
if (this.privilegeIds[i] == item.id) {
this.privilegeIds.splice(i, 1);
}
}
}
this.statusCheck();
// console.log(this.privilegeIds, this.countPrivilegeIds);
},
/**
* data传入的数据,bool全选值
* @param data
* @param bool
*/
boolPrivileges(data, bool) {
for (let i in data) {
if (typeof(bool) == "undefined") {
if (typeof(data[i].own) != "undefined") {
this.countPrivilegeIds.push(data[i].id);
if (data[i].own === 1) {
data[i].checked = true;
this.privilegeIds.push(data[i].id);
} else {
data[i].checked = false;
}
this.statusCheck();
}
} else if (bool) {
if (typeof(data[i].own) != "undefined") {
data[i].checked = true;
this.privilegeIds.push(data[i].id);
}
} else if (! bool) {
data[i].checked = false;
this.privilegeIds = [];
}
this.boolPrivileges(data[i].privileges, bool);
}
}
}
};
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,154 @@
<template>
<div class="config-main">
<el-checkbox :indeterminate="isIndeterminate" :key="" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
<el-form :model="ruleForm" ref="ruleForm">
<el-form-item class="par-name" :key="par.id" :label="par.name" v-for="par in configRule" v-if="par.privileges.length>0">
<el-checkbox @change="handleCheckedChange(child)" v-model="child.checked" v-for="child in par.privileges" :key="child.id" :label="child.description"></el-checkbox>
</el-form-item>
<el-row type="flex" class="operation-container" justify="flex-start">
<el-col :span="3">
<el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
</el-col>
<el-col :span="3">
<el-button type="danger" @click="handleCancel">返回</el-button>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import {sysConfigApi} from "../../../api/sysConfigApi";
export default {
data() {
return {
checkAll : false,
id : '',
ruleForm : {},
configRule : [],
checkList : [],
isIndeterminate : false,
privilegeIds : [],
countPrivilegeIds: []
};
},
async mounted() {
let that = this;
let id = this.$route.params.id;
this.id = id;
await sysConfigApi.getRolePrivileges(id).then(function (data) {
that.boolPrivileges(data);
that.configRule = data;
});
// console.log(that.countPrivilegeIds, that.privilegeIds);
},
methods: {
submitForm(formName) {
let id = this.$route.params.id;
let that = this;
this.$refs[formName].validate((valid) => {
if (valid) {
// alert('submit!');
sysConfigApi.postRolePrivileges(id, that.privilegeIds);
that.$notify({
title : '成功',
message : '配置权限成功',
type : 'success',
duration: 2000
});
that.$router.push("../role-manager");
} else {
console.log('error submit!!');
return false;
}
});
},
handleCheckAllChange() {
// this.checkedCities = val ? cityOptions : [];
this.isIndeterminate = false;
this.boolPrivileges(this.configRule, this.checkAll);
// console.log(this.configRule);
},
handleCancel() {
this.$router.push("../role-manager");
},
//判断状态
statusCheck() {
if (this.privilegeIds.length == 0) {
this.isIndeterminate = false;
}
if (this.privilegeIds.length > 0) {
this.isIndeterminate = true;
if (this.privilegeIds.length == this.countPrivilegeIds.length) {
this.checkAll = true;
this.isIndeterminate = false;
} else {
this.checkAll = false;
this.isIndeterminate = true;
}
}
},
handleCheckedChange(item) {
// this.boolPrivileges(this.configRule)
if (item.checked) {
this.privilegeIds.push(item.id);
} else {
for (let i = 0; i < this.privilegeIds.length; i ++) {
if (this.privilegeIds[i] == item.id) {
this.privilegeIds.splice(i, 1);
}
}
}
this.statusCheck();
// console.log(this.privilegeIds, this.countPrivilegeIds);
},
/**
* data传入的数据,bool全选值
* @param data
* @param bool
*/
boolPrivileges(data, bool) {
for (let i in data) {
if (typeof(bool) == "undefined") {
if (typeof(data[i].own) != "undefined") {
this.countPrivilegeIds.push(data[i].id);
if (data[i].own === 1) {
data[i].checked = true;
this.privilegeIds.push(data[i].id);
} else {
data[i].checked = false;
}
this.statusCheck();
}
} else if (bool) {
if (typeof(data[i].own) != "undefined") {
data[i].checked = true;
this.privilegeIds.push(data[i].id);
}
} else if (! bool) {
data[i].checked = false;
this.privilegeIds = [];
}
this.boolPrivileges(data[i].privileges, bool);
}
}
}
};
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,121 @@
<template>
<div class="common-main">
<el-form :rules="rules" ref="ruleForm" :model="ruleForm" label-width="100px" class="search-container">
<el-form-item label="角色名称" prop="name">
<el-input v-model="ruleForm.name" class="form-input" clearable></el-input>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
<el-button type="primary" icon="el-icon-edit" @click="handleCreate">新建</el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleDelete">删除</el-button>
</div>
</el-form>
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
type="selection"
width="55"
>
</el-table-column>
<el-table-column
prop="name"
label="角色"
width="250"
>
</el-table-column>
<el-table-column
prop="code"
label="权限"
>
</el-table-column>
<el-table-column
label="操作"
width="200"
>
<template slot-scope="scope">
<!--<el-button
size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row)" icon="el-icon-edit">编辑
</el-button>-->
<el-button
size="mini"
type="primary"
@click="configEdit(scope.row.id)" icon="el-icon-edit">配置
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<rolemanagerDialog ref="rolemanagerDialog" @refreshList="_getList"></rolemanagerDialog>
</div>
</template>
<script>
import rolemanagerDialog from './component/rolemanager-dialog';
import {sysConfigApi} from "@/api/sysConfigApi";
import commonMixin from '@/components/mixin/common-mixin';
export default {
components: {rolemanagerDialog},
mixins : [commonMixin],
data() {
return {
rules : {
},
ruleForm: {
}
};
},
methods: {
listCallback() {
return sysConfigApi.getRoleList(this.ruleForm,
this.listQuery.current, this.listQuery.size);
},
// 需要特别处理
needListProcess(data){
return data.filter(item=>{
console.log(item)
return item.code !== "ROLE_ADMIN"
})
},
deleteCallback(ids) {
return sysConfigApi.deleteRole(ids)
},
handleCreate() {
this.$refs.rolemanagerDialog.showDialog(1);
},
handleEdit(index, row) {
this.$refs.rolemanagerDialog.showDialog(2, Object.assign({}, row));
},
configEdit(id) {
this.$router.push({path:`role-config/${id}`})
},
}
};
</script>

View File

@@ -0,0 +1,22 @@
<template>
<div>
组织机构管理
</div>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,8 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>

View File

@@ -0,0 +1,95 @@
<template>
<div class="common-main">
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
prop="group"
label="日志类型"
>
</el-table-column>
<el-table-column
prop="created"
label="时间"
>
</el-table-column>
<el-table-column
prop="userId"
label="操作人员ID"
>
</el-table-column>
<el-table-column
prop="ip"
label="IP地址"
>
</el-table-column>
<el-table-column
prop="remark"
label="详情"
>
</el-table-column>
</el-table>
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
</div>
</template>
<script>
import commonMixin from '@/components/mixin/common-mixin'
import { sysConfigApi } from '@/api/sysConfigApi'
export default {
mixins: [commonMixin],
data() {
return {
rules: {},
ruleForm: {
userName: '',
dateRange: ''
}
}
},
methods: {
listCallback() {
return sysConfigApi.getSysUserLog(this.ruleForm,
this.listQuery.current, this.listQuery.size)
},
getInitForm(data) {
const { role_strings = '' } = data
return {
...data,
role_strings_array: role_strings.split(',').filter(item => !!item)
}
},
handleCreate() {
this.$refs.employeeDialog.showDialog(1, this.getInitForm({}))
},
handleEdit(index, row) {
this.$refs.employeeDialog.showDialog(2, this.getInitForm({ ...row }))
}
}
}
</script>
<style scoped>
</style>

86
src/views/theme/index.vue Normal file
View File

@@ -0,0 +1,86 @@
<template>
<div class="app-container">
<el-card class="box-card">
<div slot="header">
<a class='link-type link-title' target="_blank" href='https://panjiachen.github.io/vue-element-admin-site/#/theme'>
{{$t('theme.documentation')}}
</a>
</div>
<div class="box-item">
<span class="field-label">{{$t('theme.change')}} : </span>
<el-switch v-model="theme"></el-switch>
<code style="margin-top:15px;">{{$t('theme.tips')}}</code>
</div>
</el-card>
<div class="block">
<el-button type="primary">Primary</el-button>
<el-button type="success">Success</el-button>
<el-button type="info">Info</el-button>
<el-button type="warning">Warning</el-button>
<el-button type="danger">Danger</el-button>
</div>
<div class="block">
<el-button type="primary" icon="el-icon-edit"></el-button>
<el-button type="primary" icon="el-icon-share"></el-button>
<el-button type="primary" icon="el-icon-delete"></el-button>
<el-button type="primary" icon="el-icon-search">Search</el-button>
<el-button type="primary">
Upload
<i class="el-icon-upload el-icon-right"></i>
</el-button>
</div>
<div class="block">
<el-tag class='tag-item' v-for="tag in tags" :type="tag.type" :key='tag.type'>
{{tag.name}}
</el-tag>
</div>
<div class="block">
<el-radio-group v-model="radio">
<el-radio :label="3">Option A</el-radio>
<el-radio :label="6">Option B</el-radio>
<el-radio :label="9">Option C</el-radio>
</el-radio-group>
</div>
<div class="block">
<el-slider v-model="slideValue"></el-slider>
</div>
</div>
</template>
<script>
import { toggleClass } from '@/utils'
import '@/assets/custom-theme/index.css' // the theme changed version element-ui css
export default {
name: 'theme',
data() {
return {
theme: false,
tags: [
{ name: 'Tag One', type: '' },
{ name: 'Tag Two', type: 'info' },
{ name: 'Tag Three', type: 'success' },
{ name: 'Tag Four', type: 'warning' },
{ name: 'Tag Five', type: 'danger' }
],
slideValue: 50,
radio: 3
}
},
watch: {
theme() {
toggleClass(document.body, 'custom-theme')
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,236 @@
<template>
<div class="common-main">
<el-form :model="searchForm" ref="searchForm" label-width="100px" class="search-container">
<el-form-item label="标题" prop="title">
<el-input v-model="searchForm.title" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="币种名称" prop="name">
<el-input v-model="searchForm.name" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="币种类型" prop="type">
<el-select v-model="searchForm.type" class="form-input" clearable>
<el-option v-for="(item,index) in coinTypeOptions"
:key="index"
:label="item.code"
:value="item.code"></el-option>
</el-select>
</el-form-item>
<el-form-item label="钱包类型" prop="wallet_type">
<el-select v-model="searchForm.wallet_type" class="form-input" clearable>
<el-option v-for="(value,key) in select.wallet_type"
:key="key"
:label="value"
:value="key"></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="searchForm.status" class="form-input" clearable>
<el-option v-for="(value,key) in select.status"
:key="key"
:label="value"
:value="key"></el-option>
</el-select>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('searchForm')">搜索
</el-button>
<el-button type="primary" icon="el-icon-edit" @click="handleCreate">新建</el-button>
</div>
</el-form>
<el-table
class="test"
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading">
<el-table-column
prop="id"
label="ID"
width="100">
</el-table-column>
<el-table-column
prop="name"
label="币种名称"
>
</el-table-column>
<el-table-column
prop="title"
label="标题"
>
</el-table-column>
<el-table-column
prop="img"
label="币种Logo"
width="100"
>
<template slot-scope="scope">
<img class="logoImg" v-bind:src="scope.row.img"/>
</template>
</el-table-column>
<el-table-column
prop="type"
label="类型"
width="100"
>
</el-table-column>
<el-table-column
prop="wallet"
label="钱包类型"
width="100"
>
<template slot-scope="scope">
{{select.wallet_type[scope.row.wallet]}}
</template>
</el-table-column>
<el-table-column
prop="status"
render="renderHeader"
label="状态"
width="100"
>
<template slot-scope="scope">
<el-tag :type="scope.row.status|elTagFilter">
{{select.status[scope.row.status]}}
</el-tag>
</template>
</el-table-column>
<el-table-column
prop="rechargeFlag"
render="renderHeader"
label="充值状态"
width="100"
>
<template slot-scope="scope">
<el-tag :type="scope.row.rechargeFlag|elTagFilter">
{{select.rechargeFlag[scope.row.rechargeFlag]}}
</el-tag>
</template>
</el-table-column>
<el-table-column
prop="withdrawFlag"
render="renderHeader"
label="提币状态"
width="100"
>
<template slot-scope="scope">
<el-tag :type="scope.row.withdrawFlag|elTagFilter">
{{select.withdrawFlag[scope.row.withdrawFlag]}}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="操作"
width="200"
align="center"
>
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row)" icon="el-icon-edit">编辑
</el-button>
<el-button
size="mini"
v-show="scope.row.status===0"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">启用
</el-button>
<el-button
size="mini"
type="danger"
v-show="scope.row.status===1"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">禁用
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagination-container dialog-footer"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
</div>
</template>
<script>
import {coinConfigApi} from '@/api/coinConfigApi'
import commonMixin from '@/components/mixin/common-mixin'
import {selectOption} from './common'
import {mapGetters} from 'vuex'
export default {
mixins: [commonMixin],
computed: {
...mapGetters(['getCoinTypeAll'])
},
data() {
return {
searchForm: {
id: '',
name: '',
type: '',
status: '',
title: '',
wallet_type: ''
},
select: selectOption,
coinTypeOptions: null
}
},
async mounted() {
await this.$store.dispatch("CoinTypeAll")
this.coinTypeOptions = this.getCoinTypeAll
},
methods: {
listCallback() {
this.$store.dispatch("CoinAll")
return coinConfigApi.getCoinList(this.searchForm,
this.listQuery.current, this.listQuery.size)
},
async changeStatusCallback(id, status) {
return await coinConfigApi.setStatus({
id,
status,
});
},
handleCreate() {
this.$router.push({path: `/trade-config/coin-config/coin-detail/add/0`})
},
handleEdit(index, row) {
//认购币隐藏二三tab
let hiddenTab = false
if (row.wallet === 'rgb') {
hiddenTab = true
}
this.$router.push({
path: `/trade-config/coin-config/coin-detail/edit/${row.id}`,
query: {hiddenTab: hiddenTab}
})
},
handleDetail(index, row) {
this.$router.push({path: `/trade-config/coin-config/coin-detail/detail/${row.id}`})
},
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
</style>

View File

@@ -0,0 +1,574 @@
<template>
<div class="conin-config-add">
<el-tabs v-model="activePaneName" type="border-card">
<el-tab-pane label="币种信息" name="coin">
<el-form :model="coinForm"
:rules="coinFormRules"
ref="coinForm"
label-width="150px"
class="search-container">
<el-form-item label="标题" prop="title">
<el-input v-model="coinForm.title" :disabled="!isAdd"></el-input>
</el-form-item>
<el-form-item label="币种名称" prop="name">
<el-input v-model="coinForm.name" :disabled="!isAdd"></el-input>
</el-form-item>
<el-form-item label="图片" prop="img">
<el-upload
class="avatar-uploader"
:action="uploadHost"
:show-file-list="false"
:on-success="handleUploadSuccess"
:data="uploadData"
:before-upload="beforeUpload"
>
<img v-if="coinForm.img"
:src="coinForm.img"
class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item label="钱包类型" prop="wallet">
<el-select v-model="coinForm.wallet" class="form-input" @change="handleWalletChange">
<el-option v-for="(value,key) in select.wallet_type"
:key="key"
:label="value"
:value="key"></el-option>
</el-select>
</el-form-item>
<el-form-item label="币种类型" prop="type" v-show="!hiddenTab">
<el-select v-model="coinForm.type" class="form-input">
<el-option v-for="(item,index) in coinTypeOptions"
:key="index"
:label="item.code"
:value="item.code"></el-option>
</el-select>
</el-form-item>
<el-form-item label="最小提现单位" prop="baseAmount">
<el-input-number v-model="coinForm.baseAmount" :min="0">
</el-input-number>
</el-form-item>
<el-form-item label="单笔最小提现额度" prop="minAmount">
<el-input-number v-model="coinForm.minAmount" :min="0">
</el-input-number>
</el-form-item>
<el-form-item label="单笔最大提现额度" prop="maxAmount">
<el-input-number v-model="coinForm.maxAmount" :min="0">
</el-input-number>
</el-form-item>
<el-form-item label="单日最大提现额度" prop="dayMaxAmount">
<el-input-number v-model="coinForm.dayMaxAmount" :min="0">
</el-input-number>
</el-form-item>
<el-form-item label="最低提现手续费" prop="minFeeNum">
<el-input-number v-model="coinForm.minFeeNum" :min="0">
</el-input-number>
</el-form-item>
<el-form-item label="充值状态" prop="rechargeFlag" v-show="!hiddenTab">
<el-select v-model="coinForm.rechargeFlag" class="form-input">
<el-option v-for="(value,key) in select.rechargeFlag"
:key="key"
:label="value"
:value="key"></el-option>
</el-select>
</el-form-item>
<el-form-item label="提币状态" prop="withdrawFlag" v-show="!hiddenTab">
<el-select v-model="coinForm.withdrawFlag" class="form-input">
<el-option v-for="(value,key) in select.withdrawFlag"
:key="key"
:label="value"
:value="key"></el-option>
</el-select>
</el-form-item>
<el-form-item label="提现手续费费率" prop="rate" v-show="!hiddenTab">
<el-input-number v-model="coinForm.rate" :min="0">
</el-input-number>
</el-form-item>
<el-form-item label="小数位数" prop="round">
<el-input-number v-model="coinForm.round" :min="0">
</el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="savecoinForm()">保存</el-button>
<el-button type="danger" @click="backToList()">返回</el-button>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane label="钱包配置" name="coinConfig" v-if="!hiddenTab">
<el-form :model="coinConfigForm"
:rules="coinConfigFormRules"
ref="coinConfigForm"
label-width="100px"
class="search-container">
<el-form-item label="服务器IP" prop="rpcIp">
<el-input v-model="coinConfigForm.rpcIp" ></el-input>
</el-form-item>
<el-form-item label="端口" prop="rpcPort">
<el-input v-model="coinConfigForm.rpcPort" type="number"></el-input>
</el-form-item>
<el-form-item label="定时任务" prop="task">
<el-input v-model="coinConfigForm.task" placeholder="定时任务表达式0/15 * * * * ?"></el-input>
</el-form-item>
<el-form-item label="最新区块" prop="lastBlock">
<el-input type="number" v-model="coinConfigForm.lastBlock" placeholder=""></el-input>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="coinConfigForm.status" class="form-input">
<el-option v-for="(key,value) in select.status"
:key="key"
:label="key"
:value="value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否自动打币" prop="autoDraw">
<el-select v-model="coinConfigForm.autoDraw" class="form-input">
<el-option v-for="(key,value) in select.isAuto"
:key="key"
:label="key"
:value="value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="最高打币额度" prop="autoDrawLimit">
<el-input v-model="coinConfigForm.autoDrawLimit" placeholder="默认或者小于等于0代表不限制打币额度"></el-input>
</el-form-item>
<el-form-item label="RPC用户名" prop="rpcUser">
<el-input v-model="coinConfigForm.rpcUser"></el-input>
</el-form-item>
<el-form-item label="RPC密码" prop="rpcPwd">
<el-input v-model="coinConfigForm.rpcPwd"></el-input>
</el-form-item>
<el-form-item label="合约地址" prop="contractAddress">
<el-input v-model="coinConfigForm.contractAddress"></el-input>
</el-form-item>
<el-form-item label="最低确认数" prop="minConfirm">
<el-input-number v-model="coinConfigForm.minConfirm" :min="0"></el-input-number>
</el-form-item>
<el-form-item label="最低保留额度" prop="creditLimit">
<el-input-number v-model="coinConfigForm.creditLimit" :min="0">
</el-input-number>
</el-form-item>
<el-form-item label="归集额度" prop="creditMaxLimit">
<el-input type="number" v-model="coinConfigForm.creditMaxLimit" placeholder="ETH系列不需要填写"></el-input>
</el-form-item>
<!--<el-form-item label="主账户" prop="mainAccount">-->
<!--<el-input v-model="coinConfigForm.mainAccount"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="主账户地址" prop="mainAddr">-->
<!--<el-input v-model="coinConfigForm.mainAddr"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="钱包用户名" prop="walletUser">-->
<!--<el-input v-model="coinConfigForm.walletUser"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="钱包密码" prop="walletPass">
<el-input v-model="coinConfigForm.walletPass" placeholder="只支持BTC系列可以为空"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="savecoinConfigForm()">保存</el-button>
<el-button type="danger" @click="backToList()">返回</el-button>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane label="钱包归集提币地址" name="adminAddress" v-if="!hiddenTab">
<el-button type="primary" @click="addAdminAddress">新增</el-button>
<el-button type="danger" @click="backToList()">返回</el-button>
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading">
<el-table-column
prop="address"
label="钱包地址"
width="350px">
</el-table-column>
<!--<el-table-column-->
<!--prop="keystore"-->
<!--label="密钥"-->
<!--width="950px">-->
<!--</el-table-column>-->
<el-table-column
prop="status"
label="地址类型"
width="100">
<template slot-scope="scope">
{{select.adminAddressStatus[scope.row.status]}}
</template>
</el-table-column>
<el-table-column
label="操作"
>
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="editAdminAddress(scope.$index, scope.row)" icon="el-icon-edit">编辑
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
</el-tab-pane>
</el-tabs>
<admin-address-dialog ref="adminAddressDialog" @refreshList="_getList"></admin-address-dialog>
</div>
</template>
<script>
import {selectOption} from './common'
import {coinConfigApi} from '@/api/coinConfigApi'
import adminAddressDialog from './component/admin-address-dialog'
import commonMixin from '@/components/mixin/common-mixin'
import {mapGetters} from 'vuex'
export default {
components: {adminAddressDialog},
mixins: [commonMixin],
computed: {
...mapGetters(['getCoinTypeAll'])
},
data() {
let ipReg =/^(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])(\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)){3}$/
var checkIp = (rule, value, callback) => {
if (!ipReg.test(value)) {
callback(new Error('IP格式不正确'));
} else {
callback();
}
};
return {
// 认购币隐藏tab
hiddenTab: false,
isAdd: true,
operType: '',
coinId: '',
coinStatus: '',
select: selectOption,
activePaneName: 'coin',
coinForm: {
title: '',
name: '',
img: '',
type: '',
wallet: '',
baseAmount: 1,
minAmount: 1,
maxAmount: 100000,
dayMaxAmount: 200000,
minFeeNum: 1,
rate: 1,
round: 2,
rechargeFlag: '1',
withdrawFlag: '1'
},
coinFormRules: {
title: [
{required: true, message: '请输入标题'},
],
name: [
{required: true, message: '请输入名称'},
],
img: [
{required: true, message: '请上传图片'},
],
type: [
{required: true, message: '请选择类型'},
],
wallet: [
{required: true, message: '请选择钱包类型'},
],
baseAmount: [
{required: true, message: '请输入最小提现单位'},
],
minAmount: [
{required: true, message: '请输入最小提现额度'},
],
maxAmount: [
{required: true, message: '请输入单笔最大提现额度'},
],
dayMaxAmount: [
{required: true, message: '请输入单日最大提现额度'},
],
minFeeNum: [
{required: true, message: '请输入最低提现手续费'},
],
rate: [],
round: [],
rechargeFlag: [
{required: true, message: '请选择充值状态'},
],
withdrawFlag: [
{required: true, message: '请选择提币状态'},
],
},
coinConfigForm: {
creditLimit: 1,
rpcIp: '',
rpcPort: '',
rpcUser: '',
rpcPwd: '',
contractAddress: '',
lastBlock: '',
minConfirm: '',
task: '',
// mainAccount: '',
// mainAddr: '',
// walletUser: '',
walletPass: '',
status: '',
// 是否自动打币
autoDraw :"",
// 最高打币额度
autoDrawLimit:''
},
coinConfigFormRules: {
creditLimit: [],
rpcIp: [
{required: true, message: '请输入服务器IP'},
{validator: checkIp},
],
rpcPort: [
{required: true, message: '请输入端口'},
],
rpcUser: [],
rpcPwd: [],
contractAddress: [],
lastBlock: [
{required: true, message: '请输入最新区块'},
],
minConfirm: [],
task: [
{required: true, message: '请输入定时任务'},
],
// mainAccount: [],
// mainAddr: [],
// walletUser: [],
walletPass: [],
status: [
{required: true, message: '请选择状态'},
],
},
adminAddressForm: {},
adminAddressFormRules: {},
coinTypeOptions: null,
needUpload:true
}
},
async mounted() {
this.coinTypeOptions = this.getCoinTypeAll
const operType = this.$route.params.type;
const coinId = this.$route.params.id;
this.hiddenTab = this.$route.query.hiddenTab;
this.coinId = coinId;
this.operType = operType;
if (operType != 'edit' || !coinId) {
this.isAdd = true;
return;
}
this.isAdd = false;
// console.log("mounted:",typeof this.hiddenTab,this.hiddenTab)
//解决浏览器刷新后 hiddenTab 类型由boolean转string的问题
if (this.hiddenTab === "false" || this.hiddenTab === false) {
this.hiddenTab = false
} else {
this.hiddenTab = true
}
let coinForm, coinConfigForm = this.coinConfigForm;
coinForm = await coinConfigApi.getCoin(coinId);
console.log(coinForm)
// rgb不调用配置信息
if (!this.hiddenTab) {
coinConfigForm = await coinConfigApi.getCoinConfig(coinId)
}
this.hiddenTab = coinForm.wallet === 'rgb';
this._getList()
this.coinForm = {
...coinForm,
rechargeFlag: coinForm.rechargeFlag + '',
withdrawFlag: coinForm.withdrawFlag + '',
};
this.coinConfigForm = coinConfigForm;
this.coinConfigForm.status = this.coinConfigForm.status+""
this.coinConfigForm.autoDraw = this.coinConfigForm.autoDraw?this.coinConfigForm.autoDraw+"":"0"
},
methods: {
// 钱包类型change事件
handleWalletChange(val) {
if (val === 'rgb') {
this.hiddenTab = true
this.coinForm.type = "rgb"
} else {
this.hiddenTab = false
this.coinForm.type = ""
}
},
// 上传成功
handleAvatarSuccess(response) {
const {data} = response;
this.coinForm.img = data;
},
// 验证表单
validateForm(formName) {
return new Promise((resolve, reject) => {
this.$refs[formName].validate((valid) => {
resolve(valid)
});
})
},
// 保存第一张表单
async savecoinForm() {
const formName = 'coinForm';
const validateRes = await this.validateForm(formName);
if (!validateRes) {
return;
}
if (!this.coinForm.img) {
this.$message.error('请上传图片');
return;
}
const {minAmount, maxAmount, dayMaxAmount} = this.coinForm;
if (minAmount >= maxAmount) {
this.$message.error('单笔最小提现额度必须小于单笔最大提现额度');
return;
}
if (maxAmount >= dayMaxAmount) {
this.$message.error('单笔最大提现额度必须小于单日最大提现额度');
return;
}
let response = {};
if (this.isAdd) {
response = await coinConfigApi.addCoin(this.coinForm);
}
else {
response = await coinConfigApi.editCoin(this.coinForm);
}
const {id, status} = response;
this.coinId = id;
this.coinStatus = status;
this.$notify({
type: 'success',
title: '提示',
message: '保存成功!',
});
if (this.hiddenTab) {
this.backToList()
}
this.activePaneName = 'coinConfig';
},
// 保存第二张表单
async savecoinConfigForm() {
const formName = 'coinConfigForm';
const validateRes = await this.validateForm(formName);
if (!validateRes) {
return;
}
if (this.coinId === '0' || this.coinId === 0) {
this.$message.error('请先新增币种信息');
this.activePaneName = 'coin';
return;
}
const postData = {
id: this.coinId,
status: this.coinStatus,
...this.coinConfigForm,
}
/*if (this.isAdd) {
await coinConfigApi.addCoinConfig(postData);
}
else {
await coinConfigApi.editCoinConfig(postData);
}*/
await coinConfigApi.editCoinConfig(postData);
this.activePaneName = 'adminAddress';
this.$notify({
type: 'success',
title: '提示',
message: '保存成功!',
});
},
// 第三张表单,查询表格
listCallback() {
return coinConfigApi.getAdminAddressByCoinId(this.coinId,
this.listQuery.current, this.listQuery.size)
},
// 新增钱包归集地址
addAdminAddress() {
const row = {coinId: this.coinId};
this.$refs.adminAddressDialog.showDialog(1, row);
},
// 修改钱包归集地址
editAdminAddress(index, row) {
this.$refs.adminAddressDialog.showDialog(2, {
...row,
status: row.status + '',
});
},
backToList() {
this.$router.push("/trade-config/coin-config")
}
}
}
</script>

View File

@@ -0,0 +1,118 @@
<template>
<div class="common-main">
<el-form ref="coinTypeConfigForm"
:model="ruleForm"
label-width="100px"
class="search-container">
<el-form-item label="币种类型">
<el-input v-model="ruleForm.code" placeholder="请输入" clearable></el-input>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('coinTypeConfigForm')">搜索</el-button>
<el-button type="primary" icon="el-icon-edit" @click="created('coinTypeConfigForm')">新增</el-button>
<!--<el-button type="danger" icon="el-icon-delete" @click="handleDelete">删除</el-button>-->
</div>
</el-form>
<el-table ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading">
<!--<el-table-column type="selection" width="55">
</el-table-column>-->
<el-table-column prop="code" label="币种类型">
</el-table-column>
<el-table-column prop="description" label="描述">
</el-table-column>
<el-table-column prop="status" label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status|statusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column width="200" label="操作">
<template slot-scope="scope">
<el-button @click="handleEdit(scope.$index,scope.row)" size="small" type="primary">编辑</el-button>
<el-button
size="mini"
v-show="scope.row.status===0"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">启用
</el-button>
<el-button
size="mini"
type="danger"
v-show="scope.row.status===1"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">禁用
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange">
</el-pagination>
<coinTypeDialog ref="coinTypeDialog" @refreshList="_getList"></coinTypeDialog>
</div>
</template>
<script>
import coinTypeDialog from './component/coin-type-dialog';
import commonMixin from '@/components/mixin/common-mixin'
import {coinConfigApi} from '@/api/coinConfigApi'
export default {
mixins: [commonMixin],
components: {coinTypeDialog},
data() {
return {
ruleForm: {
code: '',
},
}
},
methods: {
// 请求数据列表
listCallback() {
this.$store.dispatch("CoinTypeAll");
return coinConfigApi.getCoinType(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
// 新增
created() {
this.$refs.coinTypeDialog.showDialog(1);
},
// 批量删除
deleteCallback(ids) {
return coinConfigApi.deleteCoinType(ids)
},
async changeStatusCallback(id, status) {
return await coinConfigApi.setCoinTypeStatus({
id,
status,
});
},
handleEdit(index,row){
this.$refs.coinTypeDialog.showDialog(2, Object.assign({}, row));
}
}
}
</script>

View File

@@ -0,0 +1,57 @@
export const selectOption = {
// 类型
type: {
'xnb': '人民币',
'default': '比特币系列',
'eth': '以太坊',
'ethToken': '以太坊代币'
},
// 钱包类型
wallet_type: {
'rgb': '认购币',
'qbb': '钱包币'
},
// 状态
status: {
0: '禁用',
1: '启用',
},
//是否自动打币
isAuto:{
0: "自动打币",
1: "手动打币"
},
// 充值状态
rechargeFlag: {
0: '关闭',
1: '开启',
},
// 提现状态
withdrawFlag: {
0: '关闭',
1: '开启',
},
// 钱包归集地址状态
adminAddressStatus: {
1: '归账',
2: '打款',
3: ' 手续费',
4: '充值'
},
// 合并深度
mergeDepth: {
0.01: 0.01,
0.001: 0.001,
0.0001: 0.0001,
},
tradeWeekData: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日',],
mergeDepthData: ["1", "0.1", "0.01", "0.001", "0.0001", "0.00001", "0.000001", "0.0000001", "0.00000001", "0.000000001"],
createMergeDepthData: (scale = 0, mergeDepthData) => {
const result = [];
let all = parseInt(scale) + 1;
for (let i = 0; i < all; i++) {
result[i] = mergeDepthData[i];
}
return result;
}
}

View File

@@ -0,0 +1,110 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
@close="closeDialog"
>
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="100px">
<!-- <el-form-item label="钱包币种" prop="coinType">
<el-select v-model="ruleForm.coinType" class="form-input">
<el-option v-for="item in select.type"
:key="item.id"
:label="item.name"
:value="item.type"></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="钱包地址" prop="address">
<el-input v-model="ruleForm.address" class="form-input"></el-input>
</el-form-item>
<el-form-item label="地址类型" prop="status">
<el-select v-model="ruleForm.status" class="form-input">
<el-option v-for="(value,key) in select.adminAddressStatus"
:key="key"
:label="value"
:value="key"></el-option>
</el-select>
</el-form-item>
<el-form-item label="密钥" prop="keystore">
<el-input v-model="ruleForm.keystore" class="form-input" placeholder="私钥或者keystore(eth系列币必须填写keystore,暂不支持私钥)"></el-input>
</el-form-item>
<el-form-item label="密码" prop="pwd">
<el-input v-model="ruleForm.pwd" class="form-input" placeholder="只有eth,etc系列需要填写密码"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import {selectOption} from '../common'
import {coinConfigApi} from '@/api/coinConfigApi'
import dialogMixin from '@/components/mixin/dialog-mixin'
export default {
mixins: [dialogMixin],
data() {
return {
select: selectOption,
dialogTitle: '新建钱包归集地址',
rules: {
coinType: [
{required: true, message: '请选择币种类型'},
],
address: [
{required: true, message: '请输入钱包地址'},
],
keystore: [
],
pwd: [
],
status: [
{required: true, message: '请选择状态'},
],
},
ruleForm: {
coinId: '',
coinType: '',
address: '',
keystore: '',
pwd: '',
status: '',
}
}
},
watch: {
dialogType(val) {
if (val === 1) {
this.dialogTitle = "新建钱包归集地址"
} else {
this.dialogTitle = "编辑钱包归集地址"
}
}
},
methods: {
createCallback() {
return coinConfigApi.addAdminAddress(this.ruleForm)
},
updateCallback() {
return coinConfigApi.editAdminAddress(this.ruleForm)
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,331 @@
<template>
<div class="common-main">
<el-form
:inline="true"
:model="searchForm"
ref="searchForm"
class="demo-form-inline"
:label-position="'right'"
label-width="80px">
<el-form-item label="交易区域" prop="tradeAreaId">
<el-select v-model="searchForm.tradeAreaId" class="form-input" clearable>
<el-option v-for="item in tradeAreaSelect"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<!--<el-form-item label="市场名称" prop="coinId">
<el-select v-model="searchForm.coinId" class="form-input">
<el-option v-for="item in coinSelect"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>-->
<el-form-item label="状态" prop="status">
<el-select v-model="searchForm.status" class="form-input" clearable>
<el-option v-for="(value,key) in select.status"
:key="key"
:label="value"
:value="key"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" @click="submitForm('searchForm')">搜索
</el-button>
<el-button type="primary" icon="el-icon-edit" @click="handleCreate">新建</el-button>
</el-form-item>
</el-form>
<div class="table">
<el-table
:data="listData"
style="width: 100%"
v-loading="listLoading"
>
<el-table-column
prop="id"
label="市场ID"
width="200">
</el-table-column>
<el-table-column
prop="name"
label="市场名称"
width="150">
</el-table-column>
<el-table-column
prop="symbol"
label="市场标识符"
width="150">
</el-table-column>
<el-table-column
prop="title"
label="市场标题"
width="150">
</el-table-column>
<el-table-column
prop="img"
label="市场图标"
width="160"
v-if="marketType==1"
>
<template slot-scope="scope">
<img class="logoImg" v-bind:src="scope.row.img"/>
</template>
</el-table-column>
<el-table-column
prop="openPrice"
label="开盘价">
</el-table-column>
<el-table-column
prop="feeBuy"
label="买入手续费"
width="100">
</el-table-column>
<el-table-column
prop="feeSell"
label="卖出手续费"
width="100">
</el-table-column>
<el-table-column
prop="sort"
label="排序"
>
</el-table-column>
<el-table-column
prop="status"
render="renderHeader"
label="状态"
>
<template slot-scope="scope">
<el-tag :type="scope.row.status|elTagFilter">
{{select.status[scope.row.status]}}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="操作"
width="250"
>
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row)" icon="el-icon-edit">编辑
</el-button>
<el-button
size="mini"
v-show="scope.row.status===0"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">启用
</el-button>
<el-button
size="mini"
type="danger"
v-show="scope.row.status===1"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">禁用
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
</div>
<market-config-dialog ref="marketConfigDialog"
:marketType="marketType"
:otherRules="otherRules"
:otherRuleForm="otherRuleForm"
:otherFiels="otherFiels"
:tradeAreaAPI="tradeAreaSelectAPI"
:coinidAPI="coinidAPI"
@refreshList="_getList"></market-config-dialog>
</div>
</template>
<script>
import marketConfigDialog from './market-config-dialog.vue'
import {marketApi} from "@/api/coinConfigApi";
import commonMixin from '@/components/mixin/common-mixin'
import {selectOption} from '../common'
export default {
components: {marketConfigDialog},
mixins: [commonMixin],
props: [
'marketType',
'searchListAPI',
'tradeAreaSelectAPI',
'coinSelectAPI',
'otherRules',
'otherRuleForm',
'otherFiels',
'coinidAPI',
],
data() {
return {
tradeAreaSelect: [],
coinSelect: [],
select: selectOption,
rules: {
tradeAreaId: [
{required: true, message: '请选择交易区域'},
],
coinId: [
{required: true, message: '请选择交易区域'},
],
status: [
{required: true, message: '请选择交易区域'},
],
},
searchForm: {
tradeAreaId: '',
coinId: '',
status: '',
},
}
},
async mounted() {
let [tradeAreaSelect, coinSelect] = await Promise.all([
this.tradeAreaSelectAPI(),
// this.coinSelectAPI(),
]);
this.tradeAreaSelect = tradeAreaSelect;
this.coinSelect = coinSelect;
},
methods: {
// 启用/禁用 回调
async changeStatusCallback(id, status) {
return await marketApi.setStatus({
id,
status,
});
},
// 列表 回调
listCallback() {
return this.searchListAPI(this.searchForm,
this.listQuery.current, this.listQuery.size)
},
// 新增/编辑 赋值
getDialogData(row) {
const {
tradeWeek,
tradeTime,
mergeDepth,
tradeAreaId = '',
buyCoinId = '',
sellCoinId = '',
status = '',
openPrice = '1',
sort = '1',
feeBuy = '1',
feeSell = '1',
priceScale = '2',
numScale = '1',
numMin = '1',
numMax = '1',
tradeMin = '1',
tradeMax = '1',
contractUnit = '1',
marginRate = '1',
pointValue = '1',
} = row;
// 交易周期
const finallyTradeWeek = tradeWeek ? tradeWeek : '1,2,3,4,5,6,7';
const tradeWeekData = selectOption.tradeWeekData;
const tradeWeekArray = finallyTradeWeek.split(',').map(item => tradeWeekData[item - 1]);
// 交易时间
let tradeTimeArray = [];
if (tradeTime) {
tradeTimeArray = tradeTime.split('-');
tradeTimeArray = tradeTimeArray.map(item => {
const temp = item.split(':');
const add0 = (i) => (i < 10 ? `0${i}` : i);
return new Date(2018, 10, 10, add0(temp[0]), add0(temp[1]), '00');
})
}
else {
tradeTimeArray = [new Date(2018, 10, 10, '00', '00', '00'), new Date(2018, 10, 10, 23, 59, '00')]
}
// 合并深度
const allMergeDepthData = selectOption.mergeDepthData;
const mergeDepthData = selectOption.createMergeDepthData(priceScale, allMergeDepthData);
const finallMergeDepth = mergeDepth ? mergeDepth : '0,1,2';
const mergeDepthArray = finallMergeDepth.split(',').map(item =>
(allMergeDepthData[item]));
const data = {
...row,
tradeWeekArray,
tradeTimeArray,
openPrice,
sort,
feeBuy,
feeSell,
priceScale,
numScale,
numMin,
numMax,
tradeMin,
tradeMax,
mergeDepthData,
mergeDepthArray,
contractUnit,
marginRate,
pointValue,
tradeAreaId: tradeAreaId + '',
buyCoinId: buyCoinId + '',
sellCoinId: sellCoinId + '',
mergeDepth: mergeDepth ? (mergeDepth + '') : mergeDepth,
status: status + '',
type: this.marketType
}
return data;
},
// 新增
handleCreate() {
this.$refs.marketConfigDialog.showDialog(1, this.getDialogData({}));
},
// 编辑
handleEdit(index, row) {
this.$refs.marketConfigDialog.showDialog(2, this.getDialogData(row));
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,82 @@
<template>
<el-dialog :title="dialogTitle"
:visible.sync="dialogVisible"
@close="closeDialog">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px">
<el-form-item label="币种类型" prop="code">
<el-input v-model="ruleForm.code" class="form-input"></el-input>
</el-form-item>
<el-form-item label="描述" prop="description">
<el-input v-model="ruleForm.description" class="form-input"></el-input>
</el-form-item>
<!-- 0 禁用 1启用 -->
<el-form-item label="状态" prop="status">
<el-select v-model="ruleForm.status" placeholder="状态">
<el-option label="禁用" :value="0"></el-option>
<el-option label="启用" :value="1"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import {coinConfigApi} from "@/api/coinConfigApi";
import dialogMixin from '@/components/mixin/dialog-mixin';
export default {
mixins: [dialogMixin],
data() {
return {
dialogTitle: '新建配置',
rules: {
code: [
{required: true, message: '请输入币种类型', trigger: 'blur'}
],
description: [
{required: true, message: '请输入描述', trigger: 'blur'}
],
status: [
{required: true, message: '请输入状态', trigger: 'blur'}
],
},
ruleForm: {
code:'',
description:'',
status: '',
}
};
},
watch: {
dialogType(val) {
if (val === 1) {
this.dialogTitle = "新建配置";
} else {
this.dialogTitle = "编辑配置";
}
}
},
methods: {
createCallback() {
return coinConfigApi.createCoinType(this.ruleForm);
},
updateCallback() {
return coinConfigApi.updateCoinType(this.ruleForm);
},
}
};
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,348 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
@close="closeDialog"
>
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="150px">
<el-form-item label="交易区域" prop="tradeAreaId">
<el-select v-model="ruleForm.tradeAreaId" @change="changeTradeArea" class="form-input"
:disabled="dialogType==21">
<el-option v-for="item in tradeAreaSelect"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="报价货币" prop="buyCoinId">
<el-select v-model="ruleForm.buyCoinId" class="form-input" :disabled="dialogType==2">
<el-option v-for="item in coinidSelect"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="基础货币" prop="sellCoinId">
<el-select v-model="ruleForm.sellCoinId" class="form-input" :disabled="dialogType==2">
<el-option v-for="item in coinidSelect"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="开盘价" prop="openPrice">
<el-input-number v-model="ruleForm.openPrice" class="form-input"></el-input-number>
</el-form-item>
<el-form-item label="交易周期" prop="tradeWeekArray">
<el-checkbox-group v-model="ruleForm.tradeWeekArray">
<el-checkbox :label="item" v-for="item in tradeWeekData" :key="item.id"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="交易时间" prop="tradeTimeArray">
<el-time-picker
is-range
v-model="ruleForm.tradeTimeArray"
range-separator=""
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围">
</el-time-picker>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input-number v-model="ruleForm.sort" class="form-input"></el-input-number>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="ruleForm.status" class="form-input">
<el-option v-for="(value,key) in select.status"
:key="key"
:label="value"
:value="key"></el-option>
</el-select>
</el-form-item>
<el-form-item label="买入手续费" prop="feeBuy">
<el-input-number v-model="ruleForm.feeBuy">
</el-input-number>
</el-form-item>
<el-form-item label="卖出手续费" prop="feeSell">
<el-input-number v-model="ruleForm.feeSell">
</el-input-number>
</el-form-item>
<el-form-item label="价格小数位数" prop="priceScale">
<el-input-number v-model="ruleForm.priceScale"
:min="minPriceScale"
:max="maxPriceScale"
@change="changePriceScale">
</el-input-number>
</el-form-item>
<el-form-item label="合并深度" prop="mergeDepthArray" v-if="this.marketType==1">
<el-checkbox-group v-model="ruleForm.mergeDepthArray">
<el-checkbox :label="item"
v-for="item in ruleForm.mergeDepthData"
:key="item.id"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="数量小数位数" prop="numScale">
<el-input-number v-model="ruleForm.numScale">
</el-input-number>
</el-form-item>
<el-form-item label="最小委托" prop="numMin">
<el-input-number v-model="ruleForm.numMin">
</el-input-number>
</el-form-item>
<el-form-item label="最大委托" prop="numMax">
<el-input-number v-model="ruleForm.numMax">
</el-input-number>
</el-form-item>
<el-form-item :label="item.name"
:prop="item.props"
v-if="item.type!='string'"
:key="item.type"
v-for="item in otherFiels">
<el-input-number v-model="ruleForm[item.props]">
</el-input-number>
</el-form-item>
<el-form-item :label="item.name"
:prop="item.props"
v-if="item.type=='string'"
:key="item.type"
v-for="item in otherFiels">
<el-input v-model="ruleForm[item.props]">
</el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import {selectOption} from '../common'
import {marketApi} from '@/api/coinConfigApi'
import dialogMixin from '@/components/mixin/dialog-mixin'
export default {
mixins: [dialogMixin],
props: [
'marketType',
'otherRules',
'otherRuleForm',
'otherFiels',
'tradeAreaAPI',
'buyCoinIdAPI',
'coinidAPI',
],
data() {
let that = this;
let validateDepth = function (rule, value, callback) {
if (value.length !== 3) {
callback(new Error('请选择3个合并深度!'));
} else {
callback();
}
};
return {
tradeAreaSelect: [],
coinidSelect: [],
select: selectOption,
tradeWeekData: selectOption.tradeWeekData,
dialogTitle: '新建市场',
minPriceScale: 0,
maxPriceScale: 8,
rules: {
tradeAreaId: [
{required: true, message: '请选择交易区域'},
],
buyCoinId: [
{required: true, message: '请选择报价货币'},
],
sellCoinId: [
{required: true, message: '请选择基础货币'},
],
openPrice: [
{required: true, message: '请输入开盘价'},
],
tradeWeekArray: [
{required: true, message: '请输入交易周期'},
],
tradeTimeArray: [
{required: true, message: '请输入交易时间'},
],
sort: [
{required: true, message: '请输入排序'},
],
status: [
{required: true, message: '请选择状态'},
],
mergeDepthArray: [
{required: true, message: '请选择合并深度'},
{validator: validateDepth, message: '请选择3个合并深度', trigger: blur}
],
feeBuy: [
{required: true, message: '请输入买入手续费'},
],
feeSell: [
{required: true, message: '请输入卖出手续费'},
],
priceScale: [
{required: true, message: '请输入价格小数位数'},
],
numScale: [
{required: true, message: '请输入数量小数位数'},
],
numMin: [
{required: true, message: '请输入最小委托量'},
],
numMax: [
{required: true, message: '请输入最大委托量'},
],
},
ruleForm: {
tradeAreaId: '',
buyCoinId: '',
sellCoinId: '',
openPrice: '',
tradeWeekArray: [],
tradeTimeArray: '',
sort: '',
status: '',
mergeDepthArray: [],
mergeDepthData: [],
feeBuy: '',
feeSell: '',
priceScale: '',
numScale: '',
numMin: '',
numMax: '',
}
}
},
async mounted() {
this.rules = {
...this.rules,
...this.otherRules,
}
this.ruleForm = {
...this.ruleForm,
...this.otherRuleForm,
}
if (this.marketType == 1) {
const [tradeAreaSelect, coinidSelect] = await Promise.all([
this.tradeAreaAPI(),
this.coinidAPI()
]);
this.tradeAreaSelect = tradeAreaSelect;
this.coinidSelect = coinidSelect;
this.minPriceScale = 2;
this.maxPriceScale = 8;
}
else {
const tradeAreaSelect = await this.tradeAreaAPI();
this.tradeAreaSelect = tradeAreaSelect;
this.minPriceScale = 0;
this.maxPriceScale = 8;
this.changeTradeArea();
}
},
watch: {
dialogType(val) {
if (val === 1) {
this.dialogTitle = "新建市场"
} else {
this.dialogTitle = "编辑市场"
}
}
},
methods: {
editCallback(row) {
if (this.marketType == 2) {
this.changeTradeArea();
}
},
// 交易区域chang
async changeTradeArea() {
if (this.marketType == 1 || !this.ruleForm.tradeAreaId) {
return;
}
const tradeId = this.ruleForm.tradeAreaId;
const coinidSelect = await this.coinidAPI(tradeId);
this.coinidSelect = coinidSelect;
},
// 价格小数位数 change 事件
changePriceScale(val) {
const data = selectOption.mergeDepthData;
this.ruleForm.mergeDepthData = selectOption.createMergeDepthData(val, data);
},
// 获取请求的 data
getRequestData() {
const {tradeTimeArray, tradeWeekArray, mergeDepthArray} = this.ruleForm;
const mergeDepthData = selectOption.mergeDepthData;
const converToTimeStr = (date) => {
const hours = date.getHours();
const mins = date.getMinutes();
const add0 = (i) => {
return i < 10 ? `0${i}` : i;
}
return `${add0(hours)}:${add0(mins)}`;
}
const data = {
...this.ruleForm,
pointValue: `0.${'0'.repeat(this.ruleForm.priceScale - 1)}1`,
tradeWeek: tradeWeekArray.map(item => (this.tradeWeekData.indexOf(item) + 1)).join(','),
tradeTime: `${converToTimeStr(tradeTimeArray[0])}-${converToTimeStr(tradeTimeArray[1])}`,
mergeDepth: mergeDepthArray.map(item => (mergeDepthData.indexOf(item))).join(','),
}
delete data.mergeDepthData;
delete data.mergeDepthArray;
delete data.tradeTimeArray;
delete data.tradeWeekArray;
return data;
},
createCallback() {
return marketApi.addMarket(this.getRequestData())
},
updateCallback() {
return marketApi.editMarket(this.getRequestData())
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,127 @@
<template>
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" @close="closeDialog">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px">
<el-form-item label="名称" prop="name">
<el-input v-model="ruleForm.name" class="form-input"></el-input>
</el-form-item>
<el-form-item label="代码" prop="code">
<el-input v-model="ruleForm.code" class="form-input"></el-input>
</el-form-item>
<!-- 1 币币交易 2 创新交易 -->
<!--<el-form-item label="类型" prop="type">-->
<!--<el-select v-model="ruleForm.type" placeholder="类型">-->
<!--<el-option label="币币交易" :value="1"></el-option>-->
<!--<el-option label="创新交易" :value="2"></el-option>-->
<!--</el-select>-->
<!--</el-form-item>-->
<el-form-item label="结算币种" prop="coinId">
<el-select v-model="ruleForm.coinId" placeholder="结算币种">
<el-option :label="item.name" :value="item.id" v-for="item in coinAll"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="资产统计标识" prop="baseCoin">
<el-select v-model="ruleForm.baseCoin" placeholder="资产统计标识">
<el-option label="否" value="0"></el-option>
<el-option label="是" value="1"></el-option>
</el-select>
<el-tooltip class="item" effect="dark" content="币币交易统计用户资产的单位一般结算币种为USDT时设置为是结算币种不是USDT请设置为否" placement="top">
<i style="color:#E6A23C" class="el-icon-question"></i>
</el-tooltip>
</el-form-item>
<!-- 0 禁用 1启用 -->
<el-form-item label="状态" prop="status">
<el-select v-model="ruleForm.status" placeholder="状态">
<el-option label="禁用" :value="0"></el-option>
<el-option label="启用" :value="1"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import {tradeAreaApi} from "@/api/tradeAreaApi";
import dialogMixin from '@/components/mixin/dialog-mixin';
import {mapGetters} from 'vuex'
export default {
mixins: [dialogMixin],
data() {
return {
dialogTitle: '新建配置',
coinAll: '',
rules: {
code: [
{required: true, message: '请输入代码', trigger: 'blur'}
],
name: [
{required: true, message: '请输入名称', trigger: 'blur'}
],
// type : [
// {required: true, message: '请输入类型', trigger: 'blur'}
// ],
baseCoin: [
{required: true, message: '请输入资产统计标识', trigger: 'blur'}
],
status: [
{required: true, message: '请输入状态', trigger: 'blur'}
],
coinId: [
{required: true, message: '请输入结算币种', trigger: 'blur'}
],
},
ruleForm: {
status: '',
type: '',
}
};
},
computed: {
...mapGetters(['getCoinAll'])
},
created() {
this.coinAll = this.getCoinAll;
},
watch: {
dialogType(val) {
if (val === 1) {
this.dialogTitle = "新建配置";
} else {
this.dialogTitle = "编辑配置";
}
}
},
methods: {
createCallback() {
this.coinAll.forEach((i, k) => {
if (i.id == this.ruleForm.coinId) {
this.ruleForm.coinName = i.title;
}
})
return tradeAreaApi.createdTradeArea(this.ruleForm);
},
updateCallback() {
return tradeAreaApi.updateTradeArea(this.ruleForm);
},
}
};
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,58 @@
<template>
<market-config
:marketType="marketType"
:searchListAPI="searchListAPI"
:tradeAreaSelectAPI="tradeAreaSelectAPI"
:coinSelectAPI="coinSelectAPI"
:otherRules="otherRules"
:otherRuleForm="otherRuleForm"
:otherFiels="otherFiels"
:coinidAPI="coinidAPI"
/>
</template>
<script>
import marketConfig from './component/base-market-config.vue';
import {marketApi} from "@/api/coinConfigApi";
export default {
components: {marketConfig},
data() {
return {
// 市场类型1币币2创新
marketType: 1,
// 列表 API
searchListAPI: marketApi.getCoinMarketList,
// 交易区域API
tradeAreaSelectAPI: marketApi.getTradeAreaAll,
// 市场名称API
coinSelectAPI: marketApi.getMarketAll,
// 报价货币/基础货币
coinidAPI: marketApi.getCoinAll,
// 可修改字段
otherFiels: [
{
props: 'tradeMin',
name: '最小成交额'
},
{
props: 'tradeMax',
name: '最大成交额'
},
],
otherRules: {
tradeMin: [
{required: true, message: '请输入单笔最小成交额'},
],
tradeMax: [
{required: true, message: '请输入单笔最大成交额'},
],
},
otherRuleForm: {
tradeMin: '',
tradeMax: '',
}
}
}
}
</script>

View File

@@ -0,0 +1,123 @@
<template>
<div class="common-main">
<el-form :model="ruleForm" ref="ruleForm" label-width="100px" class="search-container">
<el-form-item label="名称">
<el-input v-model="ruleForm.name" placeholder="" clearable></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="ruleForm.status" placeholder="请选择" clearable>
<el-option label="禁用" value="0"></el-option>
<el-option label="启用" value="1"></el-option>
</el-select>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
<el-button type="primary" icon="el-icon-edit" @click="created('ruleForm')">新增</el-button>
<!--<el-button type="danger" icon="el-icon-delete" @click="handleDelete">删除</el-button>-->
</div>
</el-form>
<el-table :data="listData" v-loading="listLoading" @selection-change="handleSelectionChange">
<!--<el-table-column type="selection" width="55">
</el-table-column>-->
<el-table-column prop="id" label="ID">
</el-table-column>
<el-table-column prop="name" label="名称">
</el-table-column>
<el-table-column prop="code" label="代码">
</el-table-column>
<el-table-column prop="coinName" label="结算币种">
</el-table-column>
<el-table-column prop="baseCoin" label="资产统计标识">
<template slot-scope="scope">
{{scope.row.baseCoin == 0 ? '否' : '是'}}
</template>
</el-table-column>
<el-table-column prop="status" label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status| elTagFilter">
{{scope.row.status | statusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column width="200" label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row)" icon="el-icon-edit">编辑
</el-button>
<el-button
size="mini"
v-show="scope.row.status===0"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">启用
</el-button>
<el-button
size="mini"
type="danger"
v-show="scope.row.status===1"
@click="handleChangeStatus(scope.$index, scope.row)" icon="el-icon-edit">禁用
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination class="pagination-container" background layout="total,prev, pager, next"
:current-page.sync="listQuery.current" :page-size="listQuery.size"
:total="listQuery.total" @current-change="handlePageChange">
</el-pagination>
<tradeAreaDialog ref="tradeAreaDialog" @refreshList="_getList"></tradeAreaDialog>
</div>
</template>
<script>
import tradeAreaDialog from './component/trade-area-dialog';
import commonMixin from '@/components/mixin/common-mixin'
import {tradeAreaApi} from '@/api/tradeAreaApi'
export default {
mixins: [commonMixin],
components: {tradeAreaDialog},
data() {
return {
ruleForm: {
name: '',
code: '',
status: ''
},
}
},
methods: {
// 请求数据列表
listCallback() {
return tradeAreaApi.getTradeAreaList(this.ruleForm, this.listQuery.current, this.listQuery.size)
},
// 新增
created() {
this.$refs.tradeAreaDialog.showDialog(1);
},
// 修改
handleEdit(index, row) {
this.$refs.tradeAreaDialog.showDialog(2, Object.assign({}, row));
},
// 批量删除
deleteCallback(ids) {
return tradeAreaApi.deleteTradeArea(ids)
},
// 启用禁用
async changeStatusCallback(id, status) {
return await tradeAreaApi.setTradeAreaStats({id, status});
},
}
}
</script>

View File

@@ -0,0 +1,167 @@
<template>
<div class="common-main">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"
class="search-container">
<el-form-item label="用户ID" prop="userId">
<el-input v-model="ruleForm.userId" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="姓名" prop="realName">
<el-input v-model="ruleForm.realName" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model="ruleForm.mobile" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="层级" prop="level">
<el-input v-model="ruleForm.level" class="form-input" clearable></el-input>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="submitForm('ruleForm')">搜索</el-button>
</div>
</el-form>
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<el-table-column
prop="id"
label="用户ID"
width="180"
>
</el-table-column>
<el-table-column
prop="level"
label="层级"
>
</el-table-column>
<el-table-column
prop="mobile"
label="手机号"
width="120"
>
</el-table-column>
<el-table-column
prop="email"
label="邮箱"
width="120"
>
</el-table-column>
<!--<el-table-column-->
<!--prop="coinId"-->
<!--label="币种ID"-->
<!--&gt;-->
<!--</el-table-column>-->
<el-table-column
prop="realName"
label="姓名"
>
</el-table-column>
<el-table-column
prop="idCard"
label="身份证号"
width="180"
>
</el-table-column>
<el-table-column
prop="reviewsStatus"
label="审核状态"
width="100"
>
<template slot-scope="scope">
<el-tag :type="scope.row.reviewsStatus|elTagFilter">
{{scope.row.reviewsStatus | reviewsStatusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column
prop="agentNote"
label="审核备注"
width="100"
>
</el-table-column>
<el-table-column
prop="created"
label="注册时间 "
width="200"
>
</el-table-column>
<el-table-column
label="操作"
width="200"
>
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row)"
v-if="scope.row.reviewsStatus==0"
icon="el-icon-edit">审核
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<agentCheckDialog ref="agentCheckDialog" @refreshList="_getList"></agentCheckDialog>
</div>
</template>
<script>
import agentCheckDialog from './component/agentcheck-dialog';
import {agentVerifyApi} from "@/api/agentVerifyApi";
import commonMixin from '@/components/mixin/common-mixin';
export default {
components: {agentCheckDialog},
mixins: [commonMixin],
data() {
return {
rules: {},
ruleForm: {}
};
},
methods: {
async listCallback() {
return await agentVerifyApi.getAgentSellerList(this.ruleForm,
this.listQuery.current, this.listQuery.size);
},
async handleEdit(index, row) {
let {reviewsStatus} = row;
if (reviewsStatus == 1 || reviewsStatus == 2) {
reviewsStatus += '';
}
else {
reviewsStatus = '';
}
await this.$refs.agentCheckDialog.showDialog(2, {
...row,
reviewsStatus,
});
}
}
};
</script>

View File

@@ -0,0 +1,163 @@
<template>
<div class="common-main">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"
class="search-container">
<el-form-item label="用户ID" prop="userId">
<el-input v-model="ruleForm.userId" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="姓名" prop="trueName">
<el-input v-model="ruleForm.trueName" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model="ruleForm.mobile" class="form-input" clearable></el-input>
</el-form-item>
<el-form-item label="层级" prop="level">
<el-input v-model="ruleForm.level" class="form-input" clearable></el-input>
</el-form-item>
<div class="operation-container">
<el-button icon="el-icon-search" @click="beforeSubmit()">搜索</el-button>
</div>
</el-form>
<el-table
ref="multipleTable"
:data="listData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
v-loading="listLoading"
>
<!-- <el-table-column
type="selection"
width="55">
</el-table-column> -->
<el-table-column prop="id" label="用户ID" width="180">
</el-table-column>
<el-table-column prop="level" label="层级">
</el-table-column>
<el-table-column prop="mobile" label="手机号"
width="150">
</el-table-column>
<el-table-column prop="email" label="邮箱"
width="150">
</el-table-column>
<!--<el-table-column-->
<!--prop="coinId"-->
<!--label="币种ID"-->
<!--&gt;-->
<!--</el-table-column>-->
<el-table-column prop="realName" label="姓名">
</el-table-column>
<el-table-column prop="idCard" label="身份证号"
width="180">
</el-table-column>
<el-table-column prop="reviewsStatus" label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status|elTagFilter">
{{scope.row.status | statusFilter}}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="agentNote" label="审核备注"
width="180">
</el-table-column>
<el-table-column prop="created" label="注册时间"
width="180">
</el-table-column>
<el-table-column label="操作" width="350">
<template slot-scope="scope">
<el-button size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row)"
v-if="scope.row.username!='AgentAdmin'"
icon="el-icon-edit">编辑
</el-button>
<el-button
size="mini"
@click="nextAgent(scope.$index, scope.row)"
icon="el-icon-edit">
下级代理
</el-button>
<el-button
size="mini"
@click="handleChangeStatus(scope.$index,scope.row)"
v-if="scope.row.status === 0" icon="el-icon-edit">启用
</el-button>
<el-button
size="mini"
type="danger"
@click="handleChangeStatus(scope.$index,scope.row)"
v-if="scope.row.status === 1 && scope.row.username!='AgentAdmin'" icon="el-icon-edit">禁用
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagination-container"
background
layout="total,prev, pager, next"
:current-page.sync="listQuery.current"
:page-size="listQuery.size"
:total="listQuery.total"
@current-change="handlePageChange"
>
</el-pagination>
<agentListDialog ref="agentListDialog" @refreshList="_getList"></agentListDialog>
</div>
</template>
<script>
import agentListDialog from './component/agentlist-dialog';
import {agentVerifyApi} from "@/api/agentVerifyApi";
import commonMixin from '@/components/mixin/common-mixin';
export default {
components: {agentListDialog},
mixins: [commonMixin],
data() {
return {
rules: {
title: [
// {required: true, message: '请输入标题', trigger: 'blur'},
]
},
ruleForm: {}
};
},
methods: {
listCallback() {
return agentVerifyApi.getSellerList(this.ruleForm,
this.listQuery.current, this.listQuery.size);
},
handleEdit(index, row) {
this.$refs.agentListDialog.showDialog(2, {
...row,
status: row.status + ''
});
},
beforeSubmit() {
this.ruleForm.lower = ''
this.submitForm('ruleForm')
},
nextAgent(index, row) {
this.ruleForm.lower = 2;
this.ruleForm.userId = row.id;
this.submitForm('ruleForm')
},
async changeStatusCallback(id, status) {
return await agentVerifyApi.getOperateUser(id, status)
}
}
};
</script>

View File

@@ -0,0 +1,92 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
@close="closeDialog"
>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-form-item label="ID" prop="id">
<el-input disabled v-model="ruleForm.id" class="form-input"></el-input>
</el-form-item>
<el-form-item label="层级" prop="level">
<el-input disabled v-model="ruleForm.level" class="form-input"></el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input disabled v-model="ruleForm.mobile" class="form-input"></el-input>
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input disabled v-model="ruleForm.email" class="form-input"></el-input>
</el-form-item>
<el-form-item label="姓名" prop="realName">
<el-input disabled v-model="ruleForm.realName" class="form-input"></el-input>
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-input disabled v-model="ruleForm.idCard" class="form-input"></el-input>
</el-form-item>
<el-form-item label="注册时间" prop="created">
<el-input disabled v-model="ruleForm.created" class="form-input"></el-input>
</el-form-item>
<el-form-item label="审核备注" prop="agentNote">
<el-input v-model="ruleForm.agentNote" class="form-input"></el-input>
</el-form-item>
<el-form-item label="审核状态" prop="reviewsStatus">
<el-select v-model="ruleForm.reviewsStatus" class="form-input">
<el-option key="'1'" label="通过" value="1"></el-option>
<el-option key="'2'" label="拒绝" value="2"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import {agentVerifyApi} from "@/api/agentVerifyApi";
import dialogMixin from '@/components/mixin/dialog-mixin';
export default {
mixins: [dialogMixin],
data() {
return {
dialogTitle: '编辑代理注册审核',
rules: {},
ruleForm: {},
statusFlag: ''
};
},
watch: {
statusFlag(val) {
if (val) {
this.ruleForm.reviewsStatus = 1;
} else {
this.ruleForm.reviewsStatus = 2;
}
}
},
methods: {
editCallback(row) {
},
async updateCallback() {
let that = this;
await agentVerifyApi.updateVerify(
that.ruleForm.id,
that.ruleForm.reviewsStatus,
that.ruleForm.agentNote);
}
}
};
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,95 @@
<template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
@close="closeDialog"
>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-form-item label="ID" prop="id">
<el-input disabled v-model="ruleForm.id" class="form-input"></el-input>
</el-form-item>
<el-form-item label="层级" prop="level">
<el-input disabled v-model="ruleForm.level" class="form-input"></el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input disabled v-model="ruleForm.mobile" class="form-input"></el-input>
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input disabled v-model="ruleForm.email" class="form-input"></el-input>
</el-form-item>
<el-form-item label="姓名" prop="username">
<el-input disabled v-model="ruleForm.username" class="form-input"></el-input>
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-input disabled v-model="ruleForm.idCard" class="form-input"></el-input>
</el-form-item>
<el-form-item label="注册时间" prop="created">
<el-input disabled v-model="ruleForm.created" class="form-input"></el-input>
</el-form-item>
<el-form-item label="审核备注" prop="agentNote">
<el-input disabled v-model="ruleForm.agentNote" class="form-input"></el-input>
</el-form-item>
<el-form-item label="上级代理商">
<el-select v-model="ruleForm.directInviteid" class="form-input">
<el-option v-for="user in userArr"
:label="user.realName || user.username"
:key="user.id"
:value="user.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
</template>
<script>
import {agentVerifyApi} from "@/api/agentVerifyApi";
import dialogMixin from '@/components/mixin/dialog-mixin';
export default {
mixins: [dialogMixin],
data() {
return {
dialogTitle: '编辑代理信息',
rules: {},
ruleForm: {},
userArr: []
};
},
methods: {
async editCallback(row) {
let that = this;
await agentVerifyApi.getCurrentAgent(row.id).then(function (data) {
that.userArr = data;
});
},
async updateCallback() {
let that = this;
let ruleForm = {
agentNote: that.ruleForm.agentNote,
changeUserId: that.ruleForm.directInviteid,
countryCode: that.ruleForm.countryCode,
email: that.ruleForm.email,
idCard: that.ruleForm.idCard,
mobile: that.ruleForm.mobile,
status: that.ruleForm.reviewsStatus,
userId: that.ruleForm.id,
username: that.ruleForm.username
};
await agentVerifyApi.postAgentInfo(ruleForm);
}
}
};
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,8 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>

View File

@@ -0,0 +1,250 @@
<template>
<div class="common-main">
<el-row type="flex">
<el-col :span="3">
<div class="label">ID</div>
</el-col>
<el-col :span="9">
<div class="label-content" v-text="user.id"></div>
</el-col>
<el-col :span="3">
<div class="label">用户名</div>
</el-col>
<el-col :span="9">
<div class="label-content" v-text="user.userName"></div>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="3">
<div class="label">手机号码</div>
</el-col>
<el-col :span="9">
<div class="label-content" v-text="user.mobile"></div>
</el-col>
<el-col :span="3">
<div class="label">真实姓名</div>
</el-col>
<el-col :span="9">
<div class="label-content" v-text="user.realName"></div>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="3">
<div class="label">证件类型</div>
</el-col>
<el-col :span="9">
<div class="label-content">{{getIdCardType(user.idCardType)}}</div>
</el-col>
<el-col :span="3">
<div class="label">证件号码</div>
</el-col>
<el-col :span="9">
<div class="label-content" v-text="user.idCard"></div>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="3">
<div class="label">邮箱</div>
</el-col>
<el-col :span="9">
<div class="label-content" v-text="user.email"></div>
</el-col>
<el-col :span="3">
<div class="label">注册时间</div>
</el-col>
<el-col :span="9">
<div class="label-content" v-text="user.created"></div>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="3">
<div class="label">证件照片</div>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="7" :key="item.index" v-for="item in userAuthInfoList">
<div class="img-container" @click="imgEnlarge(item.imageUrl)">
<img :src="item.imageUrl" alt="">
</div>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="3">
<div class="label">审核历史</div>
</el-col>
<el-col :span="21" v-if="userAuthAuditRecord.length>0">
<p v-for="item in userAuthAuditRecord" :key="item.id" style="margin: 10px 0px 0px 0px;">
{{item.auditUserName}}:{{item.status == 1 ? '通过' : '拒绝'}}{{item.remark}}
</p>
</el-col>
</el-row>
<el-form :model="ruleForm"
:rules="rules"
ref="ruleForm"
class="verify-form">
<el-form-item label="审核状态" prop="status">
<el-select
v-model="ruleForm.status"
class="form-input"
placeholder="请选择">
<el-option label="拒绝" value="2"></el-option>
<el-option label="通过" value="1"></el-option>
<el-option label="待审核" value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item label="拒绝原因" prop="remark" v-show="reject" class="red-require">
<el-input v-model="ruleForm.remark" placeholder="请输入拒绝原因" class="form-input"></el-input>
</el-form-item>
<el-row type="flex" class="operation-container" justify="flex-start">
<el-col :span="3">
<el-button type="primary" @click="submitForm('ruleForm')" >确定</el-button>
</el-col>
<el-col :span="3">
<el-button type="danger" @click="handleCancel">返回</el-button>
</el-col>
</el-row>
</el-form>
<el-dialog
title=""
:visible.sync="centerDialogVisible"
width="30%"
center>
<img :src="checkImg" width="100%"/>
</el-dialog>
</div>
</template>
<script>
import {userApi} from "../../api/userApi";
export default {
data() {
let that = this;
let validateRemark = function (rule, value, callback) {
if (that.reject && !value) {
callback(new Error('请填写拒绝原因!'));
} else {
callback();
}
};
return {
reject: false,
id: '',
user: {},
userAuthAuditRecord: {},
userAuthInfoList: {},
centerDialogVisible: false,
checkImg: '',
ruleForm: {
status: '',
remark: '',
authCode:''
},
rules: {
reviewsStatus: [
{required: true, message: '请选择审核状态', trigger: 'change'}
],
remark: [
{validator: validateRemark, trigger: "change"}
]
}
};
},
async mounted() {
let id = this.$route.params.id;
this.id = id;
const {user, authAuditRecordList ,userAuthInfoList} = await userApi.selUserAuthDetail(id);
this.user = user;
this.userAuthInfoList = userAuthInfoList;
var lastUserAuth
var authCode = '';
if(authAuditRecordList && authAuditRecordList.length>0){
console.log(authAuditRecordList)
this.userAuthAuditRecord = authAuditRecordList ;
lastUserAuth = authAuditRecordList[0] ;
authCode = lastUserAuth.authCode ;
}
if(userAuthInfoList){
console.log(userAuthInfoList[0])
authCode = userAuthInfoList[0].authCode ;
}
console.log(authCode)
this.ruleForm = {
status: user.reviewsStatus + '',
authCode: authCode,
remark: lastUserAuth == null ? '': lastUserAuth.remark
};
},
watch: {
"ruleForm.status"(curVal) {
if (curVal == 2) {
this.reject = true;
} else {
this.reject = false;
}
}
},
methods: {
getIdCardType(type) {
switch (type) {
case 1:
return '身份证'
case 2:
return '军官证'
case 3:
return '护照'
case 4:
return '台湾居民通行证'
case 5:
return '港澳居民通行证'
case 9:
default:
return '其他';
}
},
submitForm(formName) {
let id = this.id;
let review = this.ruleForm.status;
let remark = this.ruleForm.remark;
let authCode = this.ruleForm.authCode;
let that = this;
this.$refs[formName].validate(async (valid) => {
if (valid) {
const data = await that.handleVerify(id, review, remark,authCode);
this.$notify({
title: '成功',
message: '实名认证审核成功',
type: 'success',
duration: 2000
});
} else {
return false;
}
});
},
async handleVerify(id, review, remark,authCode) {
await userApi.updateVerify(id, review, remark,authCode);
this.$router.push("../authentication");
},
handleCancel() {
this.$router.push("../authentication");
},
async imgEnlarge(imgUrl) {
this.checkImg = imgUrl;
this.centerDialogVisible = true;
}
}
};
</script>

Some files were not shown because too many files have changed in this diff Show More