Commit 453c1ce2 authored by liziwl's avatar liziwl
Browse files

更新巴士时间表 06-21生效

parent 509a1d88
Loading
Loading
Loading
Loading

.vscode/settings.json

0 → 100644
+3 −0
Original line number Diff line number Diff line
{
    "markdown.extension.toc.updateOnSave": false
}
 No newline at end of file
+400 KiB

File added.

No diff preview for this file type.

+371 KiB

File added.

No diff preview for this file type.

+46 −40
Original line number Diff line number Diff line
# 🚌校园巴士 - 节假日 (2021年5月27日更新)
# 🚌校园巴士 - 节假日 (2021年6月18日更新)

<a data-fancybox title="" href="https://cdn.jsdelivr.net/gh/sustc/sustech-online-ng@master/docs/transport/busline2.png">![](./busline2.png)</a>

## 欣园 → 工学院(共58班)
## 快速跳转
* [1路 下行 欣园 → 工学院](#_1路-欣园-→-工学院-共58班)
* [1路 上行 工学院 → 欣园](#_1路-工学院-→-欣园-共58班)

节假日仅 **1路** 运行。

## 1路 欣园 → 工学院(共58班)

<ClientOnly>

<div id="bus-table-hl2rb">
    <table class="dataTable" id="holi-bus-hl2rb">
<!-- 欣园到工学院 -->
<div id="bus-table-hl2coe">
    <table class="dataTable" id="holi-bus-hl2coe">
    </table>
</div>

</ClientOnly>

## 工学院 → 欣园(共58班)
## 1路 工学院 → 欣园(共58班)

<ClientOnly>
<div id="bus-table-rb2hl">
    <table class="dataTable" id="holi-bus-rb2hl">
<!-- 工学院到欣园 -->
<div id="bus-table-coe2hl">
    <table class="dataTable" id="holi-bus-coe2hl">
    </table>
</div>
</ClientOnly>

## 参考文献

* 2021年5月27`校园服务办公室 <ocs@sustech.edu.cn>` 邮件《关于调整校园巴士节假日班次的通知 Notice on Adjustment of Campus Bus Schedule during Weekends/Holidays 【2021】17号》
    * [下载链接-中文](https://cdn.jsdelivr.net/gh/sustc/sustech-online-ng@master/docs/transport/Campus_Bus_Schedule_2021_05_CN.pdf)(右键 / 长按保存)
    * [Download-English](https://cdn.jsdelivr.net/gh/sustc/sustech-online-ng@master/docs/transport/Campus_Bus_Schedule_2021_05_EN.pdf)(Right click / long press to save)
* 2021年6月18`校园服务办公室 <ocs@sustech.edu.cn>` 邮件《关于调整校园巴士运行班次及线路的通知 Notice on Adjustment of Campus Bus Schedule and Routes【2021】26号》
    * [下载链接-中文](https://cdn.jsdelivr.net/gh/sustc/sustech-online-ng@master/docs/transport/Campus_Bus_Schedule_2021_06_CN.pdf)(右键 / 长按保存)
    * [Download-English](https://cdn.jsdelivr.net/gh/sustc/sustech-online-ng@master/docs/transport/Campus_Bus_Schedule_2021_06_EN.pdf)(Right click / long press to save)

<script>
  export default {
@@ -60,8 +66,8 @@ function update_bus_status(bus_time_table) {
    }

    // 欣园 → 科研楼
var busdata_hl2rb= [
    ["07:00","",""],
    var bus_data_json = {
        "coe2hl":[
            ["07:20","",""],
            ["07:40","",""],
            ["08:00","",""],
@@ -119,11 +125,9 @@ var busdata_hl2rb= [
            ["21:20","",""],
            ["21:40","",""],
            ["22:00","",""],
];


// 科研楼 → 欣园
var busdata_rb2hl = [
            ["22:20","",""],],
        "hl2coe":[
            ["07:00","",""],
            ["07:20","",""],
            ["07:40","",""],
            ["08:00","",""],
@@ -180,13 +184,11 @@ var busdata_rb2hl = [
            ["21:00","",""],
            ["21:20","",""],
            ["21:40","",""],
    ["22:00","",""],
    ["22:20","",""],
];

            ["22:00","",""],],
    };

    function build_all_table() {
    if ($.fn.DataTable.isDataTable('#hl2rb')) {
        if ($.fn.DataTable.isDataTable('#hl2coe')) {
            return;
        }

@@ -198,7 +200,8 @@ function build_all_table() {
            info: false,
            columns: [
                { title: "发车时间" },
            { title: "平时/高峰", "orderable": false },
                { title: "平时/高峰", "orderable": false, "visible": false},
                // 前端隐藏高峰列,可能以后要用。
                { title: "状态", "orderable": false },
            ],
            rowCallback: function (row, data, index) {
@@ -219,21 +222,24 @@ function build_all_table() {
            }
        }

    // high land - research building
    var tmp = update_bus_status(busdata_hl2rb);
    busdata_hl2rb = tmp.now_table;
    var now_bus_row_hl2rb = tmp.row;
    var ins_table_hl2rb = $('#holi-bus-hl2rb').DataTable($.extend(true, { data: busdata_hl2rb }, dtb_config));
    var now_bus_offset = $(ins_table_hl2rb.row(Math.min(now_bus_row_hl2rb, busdata_hl2rb.length)).node()).offset().top - $(ins_table_hl2rb.row(0).node()).offset().top;
    $("#bus-table-hl2rb .dataTables_scrollBody").scrollTop(now_bus_offset);

    // research building - high land
    var tmp = update_bus_status(busdata_rb2hl);
    busdata_rb2hl = tmp.now_table;
    var now_bus_row_rb2hl = tmp.row;
    var ins_table_rb2hl = $('#holi-bus-rb2hl').DataTable($.extend(true, { data: busdata_rb2hl }, dtb_config));
    var now_bus_offset = $(ins_table_rb2hl.row(Math.min(now_bus_row_rb2hl, busdata_rb2hl.length)).node()).offset().top - $(ins_table_rb2hl.row(0).node()).offset().top;
    $("#bus-table-rb2hl .dataTables_scrollBody").scrollTop(now_bus_offset);
        var busdata_hl2coe; // high land - COE
        var busdata_coe2hl; // COE - high land

        // high land - COE
        var tmp = update_bus_status(bus_data_json.hl2coe);
        busdata_hl2coe = tmp.now_table;
        var now_bus_row_hl2coe = tmp.row;
        var ins_table_hl2coe = $('#holi-bus-hl2coe').DataTable($.extend(true, { data: busdata_hl2coe }, dtb_config));
        var now_bus_offset = $(ins_table_hl2coe.row(Math.min(now_bus_row_hl2coe, busdata_hl2coe.length)).node()).offset().top - $(ins_table_hl2coe.row(0).node()).offset().top;
        $("#bus-table-hl2coe .dataTables_scrollBody").scrollTop(now_bus_offset);

        // COE - high land
        var tmp = update_bus_status(bus_data_json.coe2hl);
        busdata_coe2hl = tmp.now_table;
        var now_bus_row_coe2hl = tmp.row;
        var ins_table_coe2hl = $('#holi-bus-coe2hl').DataTable($.extend(true, { data: busdata_coe2hl }, dtb_config));
        var now_bus_offset = $(ins_table_coe2hl.row(Math.min(now_bus_row_coe2hl, busdata_coe2hl.length)).node()).offset().top - $(ins_table_coe2hl.row(0).node()).offset().top;
        $("#bus-table-coe2hl .dataTables_scrollBody").scrollTop(now_bus_offset);

    }

+284 −188

File changed.

Preview size limit exceeded, changes collapsed.