|
@@ -222,7 +222,11 @@ userManagementLink.addEventListener('click', function(event) {
|
|
// 监听 License 信息按钮的点击事件
|
|
// 监听 License 信息按钮的点击事件
|
|
licenseInfoLink.addEventListener('click', function(event) {
|
|
licenseInfoLink.addEventListener('click', function(event) {
|
|
event.preventDefault(); // 阻止默认的跳转行为
|
|
event.preventDefault(); // 阻止默认的跳转行为
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ // 创建一个新的 div 元素
|
|
|
|
+const container = document.createElement('div');
|
|
|
|
+
|
|
|
|
+
|
|
// 将瀑布流的 License 信息内容恢复到主内容区域
|
|
// 将瀑布流的 License 信息内容恢复到主内容区域
|
|
const licenseInfoHtml = `
|
|
const licenseInfoHtml = `
|
|
<!-- 包裹搜索框、下拉框、时间选择框和确定按钮的 div -->
|
|
<!-- 包裹搜索框、下拉框、时间选择框和确定按钮的 div -->
|
|
@@ -242,14 +246,27 @@ licenseInfoLink.addEventListener('click', function(event) {
|
|
<input type="date" id="end-date" placeholder="结束时间" />
|
|
<input type="date" id="end-date" placeholder="结束时间" />
|
|
|
|
|
|
<!-- 搜索框 -->
|
|
<!-- 搜索框 -->
|
|
- <input type="text" id="search-bar" style="display: none; placeholder="搜索..." />
|
|
|
|
-
|
|
|
|
|
|
+ <input type="text" id="search-bar" style="display: none;" placeholder="搜索..." />
|
|
|
|
+
|
|
<!-- 确定按钮 -->
|
|
<!-- 确定按钮 -->
|
|
<button id="submit-button">确定</button>
|
|
<button id="submit-button">确定</button>
|
|
|
|
+ <button id="reset-button">返回</button>
|
|
</div>
|
|
</div>
|
|
- <div class="license-info-container" " id="license-info-restaurant-list"> </div>
|
|
|
|
|
|
+ <div class="license-info-container" id="license-info-restaurant-list"> </div>
|
|
`; // 这是原来的 License 信息区域 HTML
|
|
`; // 这是原来的 License 信息区域 HTML
|
|
|
|
|
|
|
|
+// 将 licenseInfoHtml 插入到 div 元素中
|
|
|
|
+ // container.innerHTML = licenseInfoHtml;
|
|
|
|
+ // searchBar = container.querySelector('search-bar');
|
|
|
|
+ // statusFilter = container.querySelector('license-status-filter');
|
|
|
|
+ // startDate = container.querySelector('start-date');
|
|
|
|
+ // endDate = container.querySelector('end-date');
|
|
|
|
+ // submitButton = container.querySelector('submit-button');
|
|
|
|
+ // licenseInfoContainer = container.querySelector('license-info-restaurant-list');
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ license_info_mainElement.innerHTML = licenseInfoHtml;
|
|
searchBar = document.getElementById('search-bar');
|
|
searchBar = document.getElementById('search-bar');
|
|
statusFilter = document.getElementById('license-status-filter');
|
|
statusFilter = document.getElementById('license-status-filter');
|
|
startDate = document.getElementById('start-date');
|
|
startDate = document.getElementById('start-date');
|
|
@@ -259,8 +276,6 @@ licenseInfoLink.addEventListener('click', function(event) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- //mainContainer.innerHTML = licenseInfoHtml;
|
|
|
|
- license_info_mainElement.innerHTML = licenseInfoHtml;
|
|
|
|
//清楚lic信息组的数据
|
|
//清楚lic信息组的数据
|
|
LicApplicationData = [];
|
|
LicApplicationData = [];
|
|
initializeScrollListeners(); // 重新初始化滚动监听器
|
|
initializeScrollListeners(); // 重新初始化滚动监听器
|
|
@@ -277,7 +292,7 @@ licenseInfoLink.addEventListener('click', function(event) {
|
|
})();
|
|
})();
|
|
|
|
|
|
// 刷新页面
|
|
// 刷新页面
|
|
- //location.reload();
|
|
|
|
|
|
+ location.reload();
|
|
});
|
|
});
|
|
|
|
|
|
roleManagementLink.addEventListener('click', function(event) {
|
|
roleManagementLink.addEventListener('click', function(event) {
|
|
@@ -605,8 +620,10 @@ async function fetchPermissionsByRole(role) {
|
|
}else if (hasReadUserPermission){
|
|
}else if (hasReadUserPermission){
|
|
document.getElementById('user-management-link').click();
|
|
document.getElementById('user-management-link').click();
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
// if (hasReadLicensePermission || hasReadLicenseAllPermission) {
|
|
// if (hasReadLicensePermission || hasReadLicenseAllPermission) {
|
|
// document.getElementById('license-info-link').click();
|
|
// document.getElementById('license-info-link').click();
|
|
|
|
|