<template>
|
<div class="acd">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tab-pane label="All" name="all"></el-tab-pane>
|
<el-tab-pane :label="$t('gm')" name="BUY"></el-tab-pane>
|
<el-tab-pane :label="$t('hj121')" name="CLOSE_POSITION"></el-tab-pane>
|
<el-tab-pane :label="$t('hj44')" name="HANDLING_CHARGE"></el-tab-pane>
|
</el-tabs>
|
|
<el-table
|
height="250"
|
:data="tableData"
|
style="width: 100%"
|
empty-text="No Data"
|
>
|
<el-table-column prop="amount" :label="$t('je')">
|
<template slot-scope="scope">
|
<span :class="`${scope.row.amount > 0 ? 'sc_c' : 'r_c'}`">
|
{{ scope.row.accectType | currencySymbol }} {{ scope.row.amount }}
|
</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="createTime" :label="$t('操作时间')">
|
</el-table-column>
|
<el-table-column prop="descs" :label="$t('描述')"> </el-table-column>
|
</el-table>
|
|
<div class="pagination">
|
<el-pagination
|
background
|
layout="prev, pager, next"
|
:total="total"
|
:current-page="pageNum"
|
:page-size="pageSize"
|
@current-change="handleCurrentChange"
|
>
|
</el-pagination>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import mixins from "@/mixins/myMixins"; // 混入
|
import * as api from "@/axios/api";
|
import { mapState } from "vuex";
|
export default {
|
mixins: [mixins],
|
data() {
|
return {
|
activeName: "all",
|
// 列表参数,必须是opt和myMixins混入配合使用
|
opt: {
|
type: "",
|
},
|
};
|
},
|
computed: {
|
...mapState(["userInfo"]),
|
},
|
watch: {},
|
created() {
|
this.apiInterface = api.moneylogAll; // 赋值接口
|
this.init(); // 获取记录列表
|
},
|
methods: {
|
handleClick() {
|
if (this.activeName === "all") this.opt.type = "";
|
else this.opt.type = this.activeName;
|
},
|
},
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
.acd {
|
width: 100%;
|
|
.pagination {
|
margin-top: 20px;
|
text-align: center;
|
}
|
}
|
</style>
|