审查视图

public/assets/js/require-table.js 27.3 KB
Karson authored
1
define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table', 'bootstrap-table-lang', 'bootstrap-table-mobile', 'bootstrap-table-export', 'bootstrap-table-commonsearch', 'bootstrap-table-template'], function ($, undefined, Moment) {
Karson authored
2 3 4 5 6 7
    var Table = {
        list: {},
        // Bootstrap-table 基础配置
        defaults: {
            url: '',
            sidePagination: 'server',
Karson authored
8 9 10
            method: 'get', //请求方法
            toolbar: ".toolbar", //工具栏
            search: true, //是否启用快速搜索
11
            cache: false,
Karson authored
12 13
            commonSearch: true, //是否启用通用搜索
            searchFormVisible: false, //是否始终显示搜索表单
14
            titleForm: '', //为空则不显示标题,不定义默认显示:普通搜索
Karson authored
15
            idTable: 'commonTable',
Karson authored
16
            showExport: true,
17 18 19 20
            exportDataType: "all",
            exportTypes: ['json', 'xml', 'csv', 'txt', 'doc', 'excel'],
            pageSize: 10,
            pageList: [10, 25, 50, 'All'],
Karson authored
21
            pagination: true,
Karson authored
22 23
            clickToSelect: true, //是否启用点击选中
            singleSelect: false, //是否启用单选
Karson authored
24
            showRefresh: false,
25
            locale: 'zh-CN',
Karson authored
26 27
            showToggle: true,
            showColumns: true,
28
            pk: 'id',
Karson authored
29 30 31 32 33 34
            sortName: 'id',
            sortOrder: 'desc',
            paginationFirstText: __("First"),
            paginationPreText: __("Previous"),
            paginationNextText: __("Next"),
            paginationLastText: __("Last"),
Karson authored
35 36 37 38
            mobileResponsive: true, //是否自适应移动端
            cardView: false, //卡片视图
            checkOnInit: true, //是否在初始化时判断
            escape: true, //是否对内容进行转义
Karson authored
39 40 41 42 43
            extend: {
                index_url: '',
                add_url: '',
                edit_url: '',
                del_url: '',
Karson authored
44
                import_url: '',
Karson authored
45 46 47 48 49 50 51 52 53 54
                multi_url: '',
                dragsort_url: 'ajax/weigh',
            }
        },
        // Bootstrap-table 列配置
        columnDefaults: {
            align: 'center',
            valign: 'middle',
        },
        config: {
Karson authored
55
            firsttd: 'tbody tr td:first-child:not(:has(div.card-views))',
Karson authored
56 57 58 59 60
            toolbar: '.toolbar',
            refreshbtn: '.btn-refresh',
            addbtn: '.btn-add',
            editbtn: '.btn-edit',
            delbtn: '.btn-del',
Karson authored
61
            importbtn: '.btn-import',
Karson authored
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
            multibtn: '.btn-multi',
            disabledbtn: '.btn-disabled',
            editonebtn: '.btn-editone',
            dragsortfield: 'weigh',
        },
        api: {
            init: function (defaults, columnDefaults, locales) {
                defaults = defaults ? defaults : {};
                columnDefaults = columnDefaults ? columnDefaults : {};
                locales = locales ? locales : {};
                // 写入bootstrap-table默认配置
                $.extend(true, $.fn.bootstrapTable.defaults, Table.defaults, defaults);
                // 写入bootstrap-table column配置
                $.extend($.fn.bootstrapTable.columnDefaults, Table.columnDefaults, columnDefaults);
                // 写入bootstrap-table locale配置
                $.extend($.fn.bootstrapTable.locales[Table.defaults.locale], {
Karson authored
78 79
                    formatCommonSearch: function () {
                        return __('Common search');
Karson authored
80
                    },
Karson authored
81 82
                    formatCommonSubmitButton: function () {
                        return __('Submit');
Karson authored
83
                    },
Karson authored
84 85
                    formatCommonResetButton: function () {
                        return __('Reset');
Karson authored
86
                    },
Karson authored
87 88 89 90 91
                    formatCommonCloseButton: function () {
                        return __('Close');
                    },
                    formatCommonChoose: function () {
                        return __('Choose');
Karson authored
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
                    }
                }, locales);
            },
            // 绑定事件
            bindevent: function (table) {
                //Bootstrap-table的父元素,包含table,toolbar,pagnation
                var parenttable = table.closest('.bootstrap-table');
                //Bootstrap-table配置
                var options = table.bootstrapTable('getOptions');
                //Bootstrap操作区
                var toolbar = $(options.toolbar, parenttable);
                //当刷新表格时
                table.on('load-error.bs.table', function (status, res) {
                    Toastr.error(__('Unknown data format'));
                });
                //当刷新表格时
                table.on('refresh.bs.table', function (e, settings, data) {
                    $(Table.config.refreshbtn, toolbar).find(".fa").addClass("fa-spin");
                });
                //当双击单元格时
                table.on('dbl-click-row.bs.table', function (e, row, element, field) {
                    $(Table.config.editonebtn, element).trigger("click");
                });
                //当内容渲染完成后
                table.on('post-body.bs.table', function (e, settings, json, xhr) {
                    $(Table.config.refreshbtn, toolbar).find(".fa").removeClass("fa-spin");
118
                    $(Table.config.disabledbtn, toolbar).toggleClass('disabled', true);
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
                    if ($(Table.config.firsttd, table).find("input[type='checkbox'][data-index]").size() > 0) {
                        // 挺拽选择,需要重新绑定事件
                        require(['drag', 'drop'], function () {
                            $(Table.config.firsttd, table).drag("start", function (ev, dd) {
                                return $('<div class="selection" />').css('opacity', .65).appendTo(document.body);
                            }).drag(function (ev, dd) {
                                $(dd.proxy).css({
                                    top: Math.min(ev.pageY, dd.startY),
                                    left: Math.min(ev.pageX, dd.startX),
                                    height: Math.abs(ev.pageY - dd.startY),
                                    width: Math.abs(ev.pageX - dd.startX)
                                });
                            }).drag("end", function (ev, dd) {
                                $(dd.proxy).remove();
                            });
                            $(Table.config.firsttd, table).drop("start", function () {
                                Table.api.toggleattr(this);
                            }).drop(function () {
                                Table.api.toggleattr(this);
                            }).drop("end", function () {
                                Table.api.toggleattr(this);
                            });
                            $.drop({
                                multi: true
Karson authored
143 144
                            });
                        });
145
                    }
Karson authored
146 147
                });
                // 处理选中筛选框后按钮的状态统一变更
148 149 150
                table.on('check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table fa.event.check', function () {
                    var ids = Table.api.selectedids(table);
                    $(Table.config.disabledbtn, toolbar).toggleClass('disabled', !ids.length);
Karson authored
151 152 153 154 155 156 157 158
                });
                // 刷新按钮事件
                $(toolbar).on('click', Table.config.refreshbtn, function () {
                    table.bootstrapTable('refresh');
                });
                // 添加按钮事件
                $(toolbar).on('click', Table.config.addbtn, function () {
                    var ids = Table.api.selectedids(table);
159 160 161
                    var url = options.extend.add_url;
                    url = Table.api.replaceurl(url, {ids: ids.length > 0 ? ids.join(",") : 0}, table);
                    Fast.api.open(url, __('Add'), $(this).data() || {});
Karson authored
162
                });
Karson authored
163 164 165 166 167 168 169 170 171 172 173 174 175
                // 导入按钮事件
                if ($(Table.config.importbtn, toolbar).size() > 0) {
                    require(['upload'], function (Upload) {
                        Upload.api.plupload($(Table.config.importbtn, toolbar), function (data, ret) {
                            Fast.api.ajax({
                                url: options.extend.import_url,
                                data: {file: data.url},
                            }, function () {
                                table.bootstrapTable('refresh');
                            });
                        });
                    });
                }
176
                // 批量编辑按钮事件
Karson authored
177
                $(toolbar).on('click', Table.config.editbtn, function () {
178
                    var that = this;
Karson authored
179
                    //循环弹出多个编辑框
180 181 182 183 184
                    $.each(table.bootstrapTable('getSelections'), function (index, row) {
                        var url = options.extend.edit_url;
                        row = $.extend({}, row ? row : {}, {ids: row[options.pk]});
                        var url = Table.api.replaceurl(url, row, table);
                        Fast.api.open(url, __('Edit'), $(that).data() || {});
Karson authored
185 186 187 188 189 190 191 192 193 194 195
                    });
                });
                // 批量操作按钮事件
                $(toolbar).on('click', Table.config.multibtn, function () {
                    var ids = Table.api.selectedids(table);
                    Table.api.multi($(this).data("action"), ids, table, this);
                });
                // 批量删除按钮事件
                $(toolbar).on('click', Table.config.delbtn, function () {
                    var that = this;
                    var ids = Table.api.selectedids(table);
196
                    Layer.confirm(
Karson authored
197 198
                            __('Are you sure you want to delete the %s selected item?', ids.length),
                            {icon: 3, title: __('Warning'), offset: 0, shadeClose: true},
199
                            function (index) {
Karson authored
200
                                Table.api.multi("del", ids, table, that);
201
                                Layer.close(index);
Karson authored
202 203 204 205 206 207 208 209 210 211 212 213
                            }
                    );
                });
                // 拖拽排序
                require(['dragsort'], function () {
                    //绑定拖动排序
                    $("tbody", table).dragsort({
                        itemSelector: 'tr',
                        dragSelector: "a.btn-dragsort",
                        dragEnd: function () {
                            var data = table.bootstrapTable('getData');
                            var current = data[parseInt($(this).data("index"))];
214
                            var options = table.bootstrapTable('getOptions');
Karson authored
215 216
                            //改变的值和改变的ID集合
                            var ids = $.map($("tbody tr:visible", table), function (tr) {
217
                                return data[parseInt($(tr).data("index"))][options.pk];
Karson authored
218
                            });
219
                            var changeid = current[options.pk];
Karson authored
220
                            var pid = typeof current.pid != 'undefined' ? current.pid : '';
221
                            var params = {
Karson authored
222 223 224 225 226 227
                                url: table.bootstrapTable('getOptions').extend.dragsort_url,
                                data: {
                                    ids: ids.join(','),
                                    changeid: changeid,
                                    pid: pid,
                                    field: Table.config.dragsortfield,
228 229
                                    orderway: options.sortOrder,
                                    table: options.extend.table
Karson authored
230 231
                                }
                            };
232
                            Fast.api.ajax(params, function (data) {
Karson authored
233 234 235 236 237 238
                                table.bootstrapTable('refresh');
                            });
                        },
                        placeHolderTemplate: ""
                    });
                });
239 240 241
                $(table).on("click", "input[data-id][name='checkbox']", function (e) {
                    table.trigger('fa.event.check');
                });
242 243 244 245
                $(table).on("click", "[data-id].btn-change", function (e) {
                    e.preventDefault();
                    Table.api.multi($(this).data("action") ? $(this).data("action") : '', [$(this).data("id")], table, this);
                });
246 247
                $(table).on("click", "[data-id].btn-edit", function (e) {
                    e.preventDefault();
248 249 250 251 252 253 254 255 256 257 258 259
                    var ids = $(this).data("id");
                    var row = {};
                    var options = table.bootstrapTable("getOptions");
                    $.each(table.bootstrapTable('getData'), function (i, j) {
                        if (j[options.pk] == ids) {
                            row = j;
                            return false;
                        }
                    });
                    row.ids = ids;
                    var url = Table.api.replaceurl(options.extend.edit_url, row, table);
                    Fast.api.open(url, __('Edit'), $(this).data() || {});
260 261 262 263 264
                });
                $(table).on("click", "[data-id].btn-del", function (e) {
                    e.preventDefault();
                    var id = $(this).data("id");
                    var that = this;
265
                    Layer.confirm(
266 267
                            __('Are you sure you want to delete this item?'),
                            {icon: 3, title: __('Warning'), shadeClose: true},
268
                            function (index) {
269
                                Table.api.multi("del", id, table, that);
270
                                Layer.close(index);
271 272 273
                            }
                    );
                });
Karson authored
274 275 276 277 278 279 280
                var id = table.attr("id");
                Table.list[id] = table;
                return table;
            },
            // 批量操作请求
            multi: function (action, ids, table, element) {
                var options = table.bootstrapTable('getOptions');
281
                var data = element ? $(element).data() : {};
282
                var ids = ($.isArray(ids) ? ids.join(",") : ids);
283
                var url = typeof data.url !== "undefined" ? data.url : (action == "del" ? options.extend.del_url : options.extend.multi_url);
284
                url = this.replaceurl(url, {ids: ids}, table);
285 286
                var params = typeof data.params !== "undefined" ? (typeof data.params == 'object' ? $.param(data.params) : data.params) : '';
                var options = {url: url, data: {action: action, ids: ids, params: params}};
287
                Fast.api.ajax(options, function (data) {
Karson authored
288 289 290 291 292 293 294
                    table.bootstrapTable('refresh');
                });
            },
            // 单元格元素事件
            events: {
                operate: {
                    'click .btn-editone': function (e, value, row, index) {
295
                        e.stopPropagation();
Karson authored
296
                        e.preventDefault();
297 298 299 300 301 302
                        var table = $(this).closest('table');
                        var options = table.bootstrapTable('getOptions');
                        var ids = row[options.pk];
                        row = $.extend({}, row ? row : {}, {ids: ids});
                        var url = options.extend.edit_url;
                        Fast.api.open(Table.api.replaceurl(url, row, table), __('Edit'), $(this).data() || {});
Karson authored
303 304
                    },
                    'click .btn-delone': function (e, value, row, index) {
305
                        e.stopPropagation();
Karson authored
306
                        e.preventDefault();
Karson authored
307
                        var that = this;
308 309
                        var top = $(that).offset().top - $(window).scrollTop();
                        var left = $(that).offset().left - $(window).scrollLeft() - 260;
Karson authored
310
                        if (top + 154 > $(window).height()) {
311 312
                            top = top - 154;
                        }
Karson authored
313
                        if ($(window).width() < 480) {
314 315
                            top = left = undefined;
                        }
316
                        Layer.confirm(
Karson authored
317
                                __('Are you sure you want to delete this item?'),
318
                                {icon: 3, title: __('Warning'), offset: [top, left], shadeClose: true},
319
                                function (index) {
Karson authored
320
                                    var table = $(that).closest('table');
321 322
                                    var options = table.bootstrapTable('getOptions');
                                    Table.api.multi("del", row[options.pk], table, that);
323
                                    Layer.close(index);
Karson authored
324 325 326 327 328 329 330 331
                                }
                        );
                    }
                }
            },
            // 单元格数据格式化
            formatter: {
                icon: function (value, row, index) {
Karson authored
332 333
                    if (!value)
                        return '';
334
                    value = value.indexOf(" ") > -1 ? value : "fa fa-" + value;
Karson authored
335
                    //渲染fontawesome图标
336
                    return '<i class="' + value + '"></i> ' + value;
Karson authored
337
                },
338
                image: function (value, row, index) {
Karson authored
339
                    value = value ? value : '/assets/img/blank.gif';
340
                    var classname = typeof this.classname !== 'undefined' ? this.classname : 'img-sm img-center';
341
                    return '<img class="' + classname + '" src="' + Fast.api.cdnurl(value) + '" />';
Karson authored
342
                },
343
                images: function (value, row, index) {
344
                    value = value === null ? '' : value.toString();
345
                    var classname = typeof this.classname !== 'undefined' ? this.classname : 'img-sm img-center';
346
                    var arr = value.split(',');
347 348
                    var html = [];
                    $.each(arr, function (i, value) {
Karson authored
349
                        value = value ? value : '/assets/img/blank.gif';
350
                        html.push('<img class="' + classname + '" src="' + Fast.api.cdnurl(value) + '" />');
351 352 353
                    });
                    return html.join(' ');
                },
354
                status: function (value, row, index) {
355 356
                    //颜色状态数组,可使用red/yellow/aqua/blue/navy/teal/olive/lime/fuchsia/purple/maroon
                    var colorArr = {normal: 'success', hidden: 'grey', deleted: 'danger', locked: 'info'};
357 358 359
                    //如果字段列有定义custom
                    if (typeof this.custom !== 'undefined') {
                        colorArr = $.extend(colorArr, this.custom);
Karson authored
360
                    }
361
                    value = value === null ? '' : value.toString();
362
                    var color = value && typeof colorArr[value] !== 'undefined' ? colorArr[value] : 'primary';
363
                    value = value.charAt(0).toUpperCase() + value.slice(1);
364 365
                    //渲染状态
                    var html = '<span class="text-' + color + '"><i class="fa fa-circle"></i> ' + __(value) + '</span>';
Karson authored
366 367 368
                    return html;
                },
                url: function (value, row, index) {
369
                    return '<div class="input-group input-group-sm" style="width:250px;"><input type="text" class="form-control input-sm" value="' + value + '"><span class="input-group-btn input-group-sm"><a href="' + value + '" target="_blank" class="btn btn-default btn-sm"><i class="fa fa-link"></i></a></span></div>';
Karson authored
370
                },
Karson authored
371 372 373
                search: function (value, row, index) {
                    return '<a href="javascript:;" class="searchit" data-field="' + this.field + '" data-value="' + value + '">' + value + '</a>';
                },
374
                addtabs: function (value, row, index) {
375
                    var url = Table.api.replaceurl(this.url, row, this.table);
376
                    var title = this.atitle ? this.atitle : __("Search %s", value);
377
                    return '<a href="' + Fast.api.fixurl(url) + '" class="addtabsit" data-value="' + value + '" title="' + title + '">' + value + '</a>';
Karson authored
378
                },
379
                dialog: function (value, row, index) {
380
                    var url = Table.api.replaceurl(this.url, row, this.table);
381
                    var title = this.atitle ? this.atitle : __("View %s", value);
382 383 384
                    return '<a href="' + Fast.api.fixurl(url) + '" class="dialogit" data-value="' + value + '" title="' + title + '">' + value + '</a>';
                },
                flag: function (value, row, index) {
385
                    value = value === null ? '' : value.toString();
Karson authored
386
                    var colorArr = {index: 'success', hot: 'warning', recommend: 'danger', 'new': 'info'};
387 388 389
                    //如果字段列有定义custom
                    if (typeof this.custom !== 'undefined') {
                        colorArr = $.extend(colorArr, this.custom);
Karson authored
390
                    }
Karson authored
391 392 393
                    if (typeof this.customField !== 'undefined' && typeof row[this.customField] !== 'undefined') {
                        value = row[this.customField];
                    }
Karson authored
394 395
                    //渲染Flag
                    var html = [];
396
                    var arr = value.split(',');
Karson authored
397
                    $.each(arr, function (i, value) {
398
                        value = value === null ? '' : value.toString();
Karson authored
399 400 401
                        if (value == '')
                            return true;
                        var color = value && typeof colorArr[value] !== 'undefined' ? colorArr[value] : 'primary';
402
                        value = value.charAt(0).toUpperCase() + value.slice(1);
Karson authored
403
                        html.push('<span class="label label-' + color + '">' + __(value) + '</span>');
Karson authored
404 405 406
                    });
                    return html.join(' ');
                },
407
                label: function (value, row, index) {
408
                    return Table.api.formatter.flag.call(this, value, row, index);
409
                },
Karson authored
410 411 412
                datetime: function (value, row, index) {
                    return value ? Moment(parseInt(value) * 1000).format("YYYY-MM-DD HH:mm:ss") : __('None');
                },
413 414 415 416 417 418 419
                operate: function (value, row, index) {
                    var table = this.table;
                    // 操作配置
                    var options = table ? table.bootstrapTable('getOptions') : {};
                    // 默认按钮组
                    var buttons = $.extend([], this.buttons || []);
                    buttons.push({name: 'dragsort', icon: 'fa fa-arrows', classname: 'btn btn-xs btn-primary btn-dragsort'});
Karson authored
420
                    buttons.push({name: 'edit', icon: 'fa fa-pencil', classname: 'btn btn-xs btn-success btn-editone', url: options.extend.edit_url});
421
                    buttons.push({name: 'del', icon: 'fa fa-trash', classname: 'btn btn-xs btn-danger btn-delone'});
422 423 424 425 426 427 428 429 430 431 432 433 434 435
                    return Table.api.buttonlink(this, buttons, value, row, index, 'operate');
                },
                buttons: function (value, row, index) {
                    // 默认按钮组
                    var buttons = $.extend([], this.buttons || []);
                    return Table.api.buttonlink(this, buttons, value, row, index, 'buttons');
                }
            },
            buttonlink: function (column, buttons, value, row, index, type) {
                var table = column.table;
                type = typeof type === 'undefined' ? 'buttons' : type;
                var options = table ? table.bootstrapTable('getOptions') : {};
                var html = [];
                var url, classname, icon, text, title, extend;
436 437
                var fieldIndex = column.fieldIndex;
438 439
                $.each(buttons, function (i, j) {
                    if (type === 'operate') {
440 441 442
                        if (j.name === 'dragsort' && typeof row[Table.config.dragsortfield] === 'undefined') {
                            return true;
                        }
443 444 445
                        if (['add', 'edit', 'del', 'multi', 'dragsort'].indexOf(j.name) > -1 && !options.extend[j.name + "_url"]) {
                            return true;
                        }
446 447 448 449
                    }
                    var attr = table.data(type + "-" + j.name);
                    if (typeof attr === 'undefined' || attr) {
                        url = j.url ? j.url : '';
450
                        url = url ? Fast.api.fixurl(Table.api.replaceurl(url, row, table)) : 'javascript:;';
451 452 453 454
                        classname = j.classname ? j.classname : 'btn-primary btn-' + name + 'one';
                        icon = j.icon ? j.icon : '';
                        text = j.text ? j.text : '';
                        title = j.title ? j.title : text;
455
                        refresh = j.refresh ? 'data-refresh="' + j.refresh + '"' : '';
456 457
                        confirm = j.confirm ? 'data-confirm="' + j.confirm + '"' : '';
                        extend = j.extend ? j.extend : '';
458
                        html.push('<a href="' + url + '" class="' + classname + '" ' + (confirm ? confirm + ' ' : '') + (refresh ? refresh + ' ' : '') + extend + ' title="' + title + '" data-table-id="' + (table ? table.attr("id") : '') + '" data-field-index="' + fieldIndex + '" data-row-index="' + index + '" data-button-index="' + i + '"><i class="' + icon + '"></i>' + (text ? ' ' + text : '') + '</a>');
459 460 461
                    }
                });
                return html.join(' ');
Karson authored
462
            },
463
            //替换URL中的数据
464 465 466 467 468 469
            replaceurl: function (url, row, table) {
                var options = table ? table.bootstrapTable('getOptions') : null;
                var ids = options ? row[options.pk] : 0;
                row.ids = ids ? ids : (typeof row.ids !== 'undefined' ? row.ids : 0);
                //自动添加ids参数
                url = !url.match(/\{ids\}/i) ? url + (url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + '{ids}' : url;
470 471 472 473 474 475 476 477 478 479 480 481 482 483
                url = url.replace(/\{(.*?)\}/gi, function (matched) {
                    matched = matched.substring(1, matched.length - 1);
                    if (matched.indexOf(".") !== -1) {
                        var temp = row;
                        var arr = matched.split(/\./);
                        for (var i = 0; i < arr.length; i++) {
                            if (typeof temp[arr[i]] !== 'undefined') {
                                temp = temp[arr[i]];
                            }
                        }
                        return typeof temp === 'object' ? '' : temp;
                    }
                    return row[matched];
                });
484 485
                return url;
            },
Karson authored
486 487
            // 获取选中的条目ID集合
            selectedids: function (table) {
488
                var options = table.bootstrapTable('getOptions');
489 490 491 492 493 494 495 496 497
                if (options.templateView) {
                    return $.map($("input[data-id][name='checkbox']:checked"), function (dom) {
                        return $(dom).data("id");
                    });
                } else {
                    return $.map(table.bootstrapTable('getSelections'), function (row) {
                        return row[options.pk];
                    });
                }
Karson authored
498 499 500 501
            },
            // 切换复选框状态
            toggleattr: function (table) {
                $("input[type='checkbox']", table).trigger('click');
502 503 504 505 506 507
            },
            // 根据行索引获取行数据
            getrowdata: function (table, index) {
                index = parseInt(index);
                var data = table.bootstrapTable('getData');
                return typeof data[index] !== 'undefined' ? data[index] : null;
Karson authored
508 509 510 511 512
            }
        },
    };
    return Table;
});