浏览代码

修复bug

laiguoran 4 年之前
父节点
当前提交
20831f2251
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 2
      app/public/js/schedule_stage_gcl.js
  2. 2 2
      app/view/schedule/stage_gcl.ejs

+ 2 - 2
app/public/js/schedule_stage_gcl.js

@@ -440,10 +440,10 @@ $(function () {
                 if (ss.order !== order) {
                     html += '<a class="dropdown-item change-tp" data-order="'+ ss.order +'" href="javascript:void(0);">'+ ss.yearmonth.split('-')[0] + '年' + parseInt(ss.yearmonth.split('-')[1]) +'月(第'+ ss.order +'期)</a>';
                 } else {
-                    $('#dropdownMenuButton').text(ss.yearmonth.split('-')[0] + '年' + parseInt(ss.yearmonth.split('-')[1]) +'月(第'+ ss.order +'期)');
+                    $('#stageDropdownMenuButton').text(ss.yearmonth.split('-')[0] + '年' + parseInt(ss.yearmonth.split('-')[1]) +'月(第'+ ss.order +'期)');
                 }
             }
-            $('.dropdown-menu').html(html);
+            $('#stageDropdownMenu').html(html);
         }
     };
 

+ 2 - 2
app/view/schedule/stage_gcl.ejs

@@ -38,10 +38,10 @@
                             <% if (scheduleStage.length > 0) { %>
                                 <div class="d-inline-block ml-2">
                                     <div class="dropdown">
-                                        <button class="btn btn-sm btn-light dropdown-toggle text-primary" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+                                        <button class="btn btn-sm btn-light dropdown-toggle text-primary" type="button" id="stageDropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                             <%- curScheduleStage.yearmonth.split('-')[0] %>年<%- parseInt(curScheduleStage.yearmonth.split('-')[1]) %>月(第<%- curScheduleStage.order %>期)
                                         </button>
-                                        <div class="dropdown-menu" aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 26px, 0px); top: 0px; left: 0px; will-change: transform;">
+                                        <div class="dropdown-menu" id="stageDropdownMenu" aria-labelledby="stageDropdownMenuButton" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 26px, 0px); top: 0px; left: 0px; will-change: transform;">
                                             <% for (const s of scheduleStage) { %>
                                                 <% if (s.id !== curScheduleStage.id) { %>
                                                     <a class="dropdown-item change-tp" data-order="<%- s.order %>" href="javascript:void(0);"><%- s.yearmonth.split('-')[0] %>年<%- parseInt(s.yearmonth.split('-')[1]) %>月(第<%- s.order %>期)</a>