细节优化
This commit is contained in:
+16
-11
@@ -156,27 +156,28 @@
|
||||
panel.innerHTML = `
|
||||
<div style="font-size:16px; font-weight:bold; margin-bottom:15px; border-bottom:1px solid #eee; padding-bottom:8px;">高级筛选配置</div>
|
||||
<div style="margin-bottom:12px;">
|
||||
<div style="font-size:13px; color:#666; margin-bottom:6px;">类别 (默认全选):</div>
|
||||
<div style="font-size:13px; color:#333; font-weight:bold; margin-bottom:6px;">类别:</div>
|
||||
<div style="display:flex; flex-wrap:wrap;">${buildCheckboxes('names', FILTER_OPTIONS.names)}</div>
|
||||
</div>
|
||||
<div style="margin-bottom:12px;">
|
||||
<div style="font-size:13px; color:#666; margin-bottom:6px;">线径 (默认全选):</div>
|
||||
<div style="font-size:13px; color:#333; font-weight:bold; margin-bottom:6px;">线径:</div>
|
||||
<div style="display:flex; flex-wrap:wrap;">${buildCheckboxes('specs', FILTER_OPTIONS.specs)}</div>
|
||||
</div>
|
||||
<div style="margin-bottom:15px;">
|
||||
<div style="font-size:13px; color:#666; margin-bottom:6px;">材质 (默认全选):</div>
|
||||
<div style="font-size:13px; color:#333; font-weight:bold; margin-bottom:6px;">材质:</div>
|
||||
<div style="display:flex; flex-wrap:wrap;">${buildCheckboxes('materials', FILTER_OPTIONS.materials)}</div>
|
||||
</div>
|
||||
<div style="font-size:16px; font-weight:bold; margin-bottom:15px; border-bottom:1px solid #eee; padding-bottom:8px;">导出配置</div>
|
||||
<div style="margin-bottom:12px; display:flex; gap:10px; align-items:flex-end;">
|
||||
<div style="flex:1;">
|
||||
<div style="font-size:13px; color:#666; margin-bottom:6px;">导出格式:</div>
|
||||
<div style="font-size:13px; color:#333; font-weight:bold; margin-bottom:6px;">导出格式:</div>
|
||||
<select id="ms-filter-format" style="width:100%; padding:4px 8px; font-size:13px; height:28px; box-sizing:border-box; border:1px solid #ccc; border-radius:4px; outline:none;">
|
||||
<option value="csv" ${savedFilters.exportFormat === 'csv' ? 'selected' : ''}>CSV</option>
|
||||
<option value="xlsx" ${savedFilters.exportFormat === 'xlsx' ? 'selected' : ''}>XLSX (Excel)</option>
|
||||
<option value="xlsx" ${savedFilters.exportFormat === 'xlsx' ? 'selected' : ''}>XLSX</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="flex:2;">
|
||||
<div style="font-size:13px; color:#666; margin-bottom:6px;">自定义文件名称:</div>
|
||||
<div style="font-size:13px; color:#333; font-weight:bold; margin-bottom:6px;">自定义文件名称:</div>
|
||||
<input type="text" id="ms-filter-filename" value="${savedFilters.exportFilename || '钢材透视价格表'}" style="width:100%; padding:4px 8px; font-size:13px; height:28px; box-sizing:border-box; border:1px solid #ccc; border-radius:4px; outline:none;">
|
||||
</div>
|
||||
</div>
|
||||
@@ -193,6 +194,9 @@
|
||||
<div>类别:${formatF(f.names)}</div>
|
||||
<div>线径:${formatF(f.specs)}</div>
|
||||
<div>材质:${formatF(f.materials)}</div>
|
||||
<div style="margin-top:4px; border-top:1px solid rgba(255,255,255,0.2); padding-top:4px;">
|
||||
格式:${f.exportFormat.toUpperCase()}
|
||||
</div>
|
||||
`;
|
||||
tooltip.style.display = 'block';
|
||||
});
|
||||
@@ -218,6 +222,7 @@
|
||||
const active = getCurrentFilters();
|
||||
saveFiltersToLocal(active); // 写入 localStorage
|
||||
panel.style.display = 'none';
|
||||
showToast('配置已保存', 'success');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -227,7 +232,7 @@
|
||||
function startSingleProcess() {
|
||||
// 🔒 登录状态守卫拦截
|
||||
if (!isUserLoggedIn()) {
|
||||
showToast('请先登录 Mysteel 账号后再进行数据提取操作。', 'error');
|
||||
showToast('请登录 Mysteel 账号后重试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -275,7 +280,7 @@
|
||||
async function startBatchProcess() {
|
||||
// 🔒 登录状态守卫拦截
|
||||
if (!isUserLoggedIn()) {
|
||||
showToast('请先登录 Mysteel 账号后再进行批量提取操作。', 'error');
|
||||
showToast('请登录 Mysteel 账号后重试。', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -354,7 +359,7 @@
|
||||
|
||||
Object.assign(toast.style, {
|
||||
position: 'fixed',
|
||||
top: '20px',
|
||||
top: '30vh',
|
||||
left: '50%',
|
||||
transform: 'translateX(-50%)',
|
||||
backgroundColor: bgColor,
|
||||
@@ -377,13 +382,13 @@
|
||||
// 动画显示
|
||||
requestAnimationFrame(() => {
|
||||
toast.style.opacity = '1';
|
||||
toast.style.top = '40px';
|
||||
toast.style.top = '33vh';
|
||||
});
|
||||
|
||||
// 定时移除
|
||||
setTimeout(() => {
|
||||
toast.style.opacity = '0';
|
||||
toast.style.top = '20px';
|
||||
toast.style.top = '30vh';
|
||||
setTimeout(() => {
|
||||
if (toast.parentNode) {
|
||||
toast.parentNode.removeChild(toast);
|
||||
|
||||
Reference in New Issue
Block a user