|
@@ -0,0 +1,38 @@
|
|
|
+<template>
|
|
|
+ <div id="output"></div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import $ from "jquery";
|
|
|
+import "pivottable";
|
|
|
+import "pivottable/dist/pivot.min.css";
|
|
|
+import "webpack-jquery-ui";
|
|
|
+import "pivottable/dist/c3_renderers";
|
|
|
+import { getPayment } from "@/api/payment";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "Payment",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ list: [],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ mounted() {
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getData() {
|
|
|
+ getPayment().then((res) => {
|
|
|
+ this.list = res.data;
|
|
|
+ this.setPivot();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ setPivot() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ $("#output").pivotUI(this.list);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|