This commit is contained in:
shi
2025-11-15 19:26:27 +08:00
parent e208fd7ffc
commit 06f4b7a0e7
9 changed files with 26 additions and 21 deletions

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -228,7 +228,7 @@ $vh_base: 1080;
} }
.options li.selected { .options li.selected {
// background-color: #e6f7ff; background-color: #e6f7ff;
color: #1890ff; color: #1890ff;
font-weight: 500; font-weight: 500;
} }

View File

@ -117,31 +117,31 @@ const infoList = ref([
name: '变压器220KV', name: '变压器220KV',
value: 564, value: 564,
unit: '(台)', unit: '(台)',
icon: 'src/assets/ueimg/1.png', icon: 'public/assets/ue1.png',
}, },
{ {
name: '开关柜220KV', name: '开关柜220KV',
value: 100, value: 100,
unit: '(台)', unit: '(台)',
icon: 'src/assets/ueimg/2.png', icon: 'public/assets/ue2.png',
}, },
{ {
name: '接地变110v', name: '接地变110v',
value: 564, value: 564,
unit: '(台)', unit: '(台)',
icon: 'src/assets/ueimg/3.png', icon: 'public/assets/ue3.png',
}, },
{ {
name: '电缆110v', name: '电缆110v',
value: 768, value: 768,
unit: '(回)', unit: '(回)',
icon: 'src/assets/ueimg/4.png', icon: 'public/assets/ue4.png',
}, },
{ {
name: 'GIS', name: 'GIS',
value: 100, value: 100,
unit: '(个)', unit: '(个)',
icon: 'src/assets/ueimg/5.png', icon: 'public/assets/ue5.png',
}, },
]) ])

View File

@ -114,8 +114,9 @@ $vh_base: 1080;
.picker-input { .picker-input {
// 关键修改:设置一个最大宽度,防止文本过长导致容器被撑破 // 关键修改:设置一个最大宽度,防止文本过长导致容器被撑破
// 你可以根据需要调整这个值vw(300) 表示在1920px宽的屏幕下最大宽度是300px // 你可以根据需要调整这个值vw(300) 表示在1920px宽的屏幕下最大宽度是300px
max-width: 12vw; max-width: 12vw;
width: 100%; /* 让输入框尽可能利用可用空间但不超过max-width */ width: 100%;
/* 让输入框尽可能利用可用空间但不超过max-width */
display: flex; display: flex;
gap: vw(8); gap: vw(8);
justify-content: space-between; justify-content: space-between;
@ -123,16 +124,21 @@ $vh_base: 1080;
padding: vh(8) vw(16); padding: vh(8) vw(16);
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
box-sizing: border-box; /* 确保padding不会增加元素总宽度 */ box-sizing: border-box;
/* 确保padding不会增加元素总宽度 */
} }
.picker-input .value { .picker-input .value {
color: #fff; color: #fff;
// 关键修改:添加文本省略样式 // 关键修改:添加文本省略样式
white-space: nowrap; /* 强制文本在一行显示 */ white-space: nowrap;
overflow: hidden; /* 隐藏溢出的文本 */ /* 强制文本在一行显示 */
text-overflow: ellipsis; /* 显示省略号 */ overflow: hidden;
flex-grow: 1; /* 让 .value 元素占据可用空间,将箭头推到最右边 */ /* 隐藏溢出的文本 */
text-overflow: ellipsis;
/* 显示省略号 */
flex-grow: 1;
/* 让 .value 元素占据可用空间,将箭头推到最右边 */
} }
.picker-input.open .arrow { .picker-input.open .arrow {
@ -155,11 +161,13 @@ $vh_base: 1080;
top: 110%; top: 110%;
left: 0; left: 0;
right: 0; right: 0;
max-height: vh(200); /* 限制最大高度并可滚动 */ max-height: vh(200);
/* 限制最大高度并可滚动 */
overflow-y: auto; overflow-y: auto;
background-color: rgba(0, 0, 0, 0.3); background-color: rgba(0, 0, 0, 0.3);
border-radius: vw(4); border-radius: vw(4);
box-shadow: 0 vh(4) vh(12) rgba(0, 0, 0, 0.15); /* 更明显的阴影 */ box-shadow: 0 vh(4) vh(12) rgba(0, 0, 0, 0.15);
/* 更明显的阴影 */
list-style: none; list-style: none;
z-index: 10; z-index: 10;
padding: vh(4) 0; padding: vh(4) 0;
@ -181,6 +189,7 @@ $vh_base: 1080;
} }
.options li.selected { .options li.selected {
background-color: #e6f7ff;
color: #1890ff; color: #1890ff;
font-weight: 500; font-weight: 500;
} }

View File

@ -20,7 +20,6 @@ import usePermissionStore from '@/store/modules/permission';
import to from 'await-to-js'; import to from 'await-to-js';
const userStore = useUserStoreHook(); const userStore = useUserStoreHook();
const initDone = ref(false); // ✅ 控制页面是否渲染
const isHideOther = ref(false); const isHideOther = ref(false);
const isFull = ref(false); const isFull = ref(false);
@ -38,12 +37,12 @@ const handleChangePage = () => {
} }
}; };
// 调用静默登录接口
const silentLogin = async (isExpired = false) => { const silentLogin = async (isExpired = false) => {
const token = getToken(); const token = getToken();
if (token && !isExpired) return true; if (token && !isExpired) return true;
try { try {
// 调用静默登录接口
await to( await to(
userStore.login({ userStore.login({
username: 'admin', username: 'admin',
@ -62,12 +61,9 @@ const silentLogin = async (isExpired = false) => {
return true; return true;
}; };
// ✅ 页面初始化逻辑
const initPage = async () => { const initPage = async () => {
const logged = await silentLogin(); const logged = await silentLogin();
if (!logged) return; if (!logged) return;
initDone.value = true; // ✅ 准备完成
}; };
onMounted(() => { onMounted(() => {
@ -93,7 +89,7 @@ $vh_base: 1080;
.ueScreen { .ueScreen {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-image: url('@/assets/ueimg/bj.png'); // background-image: url('@/assets/ueimg/bj.png');
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center center; background-position: center center;