import * as echarts from "echarts";
import { msgBoradTabel, msgBoradNum, responMsg } from "../../api/messageBoard"
export default {
    data() {
        return {
            from: [{
                id: 0,
                userDate: "",
                userName: "",
                msgPage: "",
                userMsg: ""
            }],
            time: "",
            productList: [{
                num: 46846,
                label: "今日转账用户数"

            }, {
                num: 46846,
                label: "今日转账金额"

            }, {
                num: 46846,
                label: "目前总转账次数"

            }, {
                num: 46846,
                label: "目前总转账金额"

            }, {
                num: 46846,
                label: "今日消费用户数"

            }, {
                num: 46846,
                label: "今日消费金额"

            }, {
                num: 46846,
                label: "目前总消费次数"

            },
            {
                num: 46846,
                label: "目前总消费金额"

            },
            {
                num: 46846,
                label: "今日提现用户数"

            },
            {
                num: 46846,
                label: "今日提现金额"

            },{
                num: 46846,
                label: "目前总提现次数"

            },
            {
                num: 46846,
                label: "目前总提现金额"

            },
            {
                num: 46846,
                label: "L2等级用户总数"

            },
            {
                num: 46846,
                label: "L3等级用户总数"

            },
            {
                num: 46846,
                label: "L4等级用户总数"

            },
            {
                num: 46846,
                label: "VIP用户总数"

            },
        ]



        }
    },
    mounted() {

    },
    methods: {
        //初始化图表
        inCharts() {
            this.myChart = echarts.init(document.getElementById("MessageBoardBox"));

            this.myChart.setOption(this.option);

            window.addEventListener("resize", () => {
                if (this.myChart) this.myChart.resize();
            });
        },
        //tabel表格数据请求//未处理
        async fetchMsgBoradTabe0(data) {
            const list = await msgBoradTabel(data)

        },
        //已处理
        async fetchMsgBoradTabel1(data) {
            const list = await msgBoradTabel(data)
        },
        //所有留言
        async fetchMsgBoradTabel2(data) {
            const list = await msgBoradTabel(data)
        },
        //回复留言
        async fetchResponMsg(data) {
            const list = await responMsg(data);
        },

        //留言数量请求
        async fetchMsgBoradNum(data) {
            const list = await msgBoradNum(data)
        },
        //点击未处理留言的回复
        clickRow(a, b) {
            //每一行的ID
            this.submitReply.msg_id = b[a].id

            this.dialogFormVisible = true
            // console.log(a,b,6666666);
        },
        //确定提交回复
        handelSubmitReply() {

            this.fetchResponMsg(this.submitReply)
            this.dialogFormVisible = false
        }

    }
}