1
PC-20250623MANY\Administrator
2025-09-17 cdd46caef517696298e394579d6819fa0ca8388d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<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>