import * as moment from "moment";

export default {
    methods: {
        onReset(formName) {
            this.$refs[formName].resetFields();
        },
        // 格式化状态
        statusFormat: function (row, column) {
            const status = row['status'];
            return this.$enumUtils.toMsg('UserStatusEnum', status);
        },
        // 格式化时间
        dateFormat: function (row, column) {
            const date = row[column.property];
            if (date === undefined) return "";
            return moment(date).format("YYYY-MM-DD HH:mm:ss");
        }
    }
}
