1
PC-20250623MANY\Administrator
2025-08-26 82710753a6be96cb08c12b99da61e46fe4e53e40
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<template>
  <el-drawer
    :title="$t('dkjl')"
    :visible.sync="dialogVisible"
    direction="rtl"
    :before-close="onClose"
    size="980px"
  >
    <div class="drawer-content">
      <el-radio-group v-model="opt.state" style="margin-bottom: 10px">
        <el-radio-button label="">{{ $t("hj160") }}</el-radio-button>
        <el-radio-button label="0">{{ $t("sqz") }}</el-radio-button>
        <el-radio-button label="1">{{ $t("sptg") }}</el-radio-button>
        <el-radio-button label="2">{{ $t("sqsb") }}</el-radio-button>
      </el-radio-group>
 
      <el-table
        height="100%"
        :data="tableData"
        style="width: 100%; flex: 1"
        empty-text="No Data"
      >
        <el-table-column prop="dkMoney" :label="$t('dkje')"> </el-table-column>
        <el-table-column prop="spMoney" :label="$t('shje')"> </el-table-column>
        <el-table-column prop="createTime" :label="$t('提交时间')">
          <template slot-scope="scope">
            {{ scope.row.createTime | gettime }}
          </template>
        </el-table-column>
        <el-table-column prop="dkState" :label="$t('状态')">
          <template slot-scope="scope">
            <el-tag type="warning" size="small" v-if="scope.row.dkState == '0'">
              {{ $t("sqz") }}
            </el-tag>
            <el-tag
              type="success"
              size="small"
              v-else-if="scope.row.dkState == '1'"
            >
              {{ $t("sptg") }}
            </el-tag>
            <el-tag
              type="danger"
              size="small"
              v-else-if="scope.row.dkState == '2'"
            >
              {{ $t("shjj") }}
            </el-tag>
          </template>
        </el-table-column>
      </el-table>
 
      <div class="pagination flex-end">
        <el-pagination
          background
          layout="prev, pager, next"
          :total="total"
          :current-page="pageNum"
          :page-size="pageSize"
          @current-change="handleCurrentChange"
        >
        </el-pagination>
      </div>
    </div>
  </el-drawer>
</template>
 
<script>
import mixins from "@/mixins/myMixins"; // 混入
import * as api from "@/axios/api";
export default {
  data() {
    return {
      // 列表参数,必须是opt和myMixins混入配合使用
      opt: {
        state: "",
      },
    };
  },
  mixins: [mixins],
  props: {
    dialogVisible: {
      type: Boolean,
      default: false,
    },
  },
  watch: {},
  created() {
    this.apiInterface = api.getDkJl; // 赋值接口
    this.init(); // 获取记录列表
  },
  methods: {
    // 关闭弹窗
    onClose() {
      this.$emit("update:dialogVisible", false);
      this.$emit("onClose"); // 关闭弹窗时,通知父组件
    },
  },
};
</script>
 
<style lang="scss" scoped>
.drawer-content {
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
 
  .pagination {
    margin-top: 20px;
    text-align: center;
  }
}
</style>