样式优化,uuid去除
|
After Width: | Height: | Size: 915 KiB |
|
After Width: | Height: | Size: 288 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 242 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 93 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
|
<img src="../assets/images/444.png" class="logo" alt="logo" />
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<!-- 左侧插图区域 -->
|
<!-- 左侧插图区域 -->
|
||||||
<div class="login-left">
|
<div class="login-left">
|
||||||
|
|
@ -18,14 +19,14 @@
|
||||||
:rules="loginRules"
|
:rules="loginRules"
|
||||||
class="login-form"
|
class="login-form"
|
||||||
>
|
>
|
||||||
<h3 class="title">{{ title }}</h3>
|
<h3 class="title-text">品号高效检索系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.username"
|
v-model="loginForm.username"
|
||||||
type="text"
|
type="text"
|
||||||
size="large"
|
size="large"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="admin"
|
placeholder="请输入账号"
|
||||||
>
|
>
|
||||||
<template #prefix
|
<template #prefix
|
||||||
><svg-icon icon-class="user" class="el-input__icon input-icon"
|
><svg-icon icon-class="user" class="el-input__icon input-icon"
|
||||||
|
|
@ -38,7 +39,7 @@
|
||||||
:type="showPassword ? 'text' : 'password'"
|
:type="showPassword ? 'text' : 'password'"
|
||||||
size="large"
|
size="large"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="密码"
|
placeholder="请输入密码"
|
||||||
@keyup.enter="handleLogin"
|
@keyup.enter="handleLogin"
|
||||||
>
|
>
|
||||||
<template #prefix
|
<template #prefix
|
||||||
|
|
@ -115,17 +116,15 @@ import { getCodeImg } from "@/api/login";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
import { View, Hide } from "@element-plus/icons-vue";
|
|
||||||
|
|
||||||
const title = import.meta.env.VITE_APP_TITLE;
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
const loginForm = ref({
|
const loginForm = ref({
|
||||||
username: "admin",
|
username: "",
|
||||||
password: "admin123",
|
password: "",
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
code: "",
|
code: "",
|
||||||
uuid: "",
|
uuid: "",
|
||||||
|
|
@ -242,48 +241,56 @@ getCookie();
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: linear-gradient(135deg, #e3f2f5 0%, #d0e8eb 50%, #c5e3e6 100%);
|
background: linear-gradient(to bottom, #449ac6 0%, #5dbbe4 100%);
|
||||||
|
// background: linear-gradient(135deg, #e3f2f5 0%, #d0e8eb 50%, #c5e3e6 100%);
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
// 底部背景图片 - 左侧
|
// // 底部背景图片 - 左侧
|
||||||
&::before {
|
// &::before {
|
||||||
content: "";
|
// content: "";
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
bottom: 0;
|
// bottom: 0;
|
||||||
left: 0;
|
// left: 0;
|
||||||
width: 45%;
|
// width: 45%;
|
||||||
height: 280px;
|
// height: 280px;
|
||||||
min-height: 220px;
|
// min-height: 220px;
|
||||||
background-image: url("../assets/images/logo_left.png");
|
// background-image: url("../assets/images/logo_left.png");
|
||||||
background-repeat: no-repeat;
|
// background-repeat: no-repeat;
|
||||||
background-position: left bottom;
|
// background-position: left bottom;
|
||||||
background-size: contain;
|
// background-size: contain;
|
||||||
opacity: 0.5;
|
// opacity: 0.5;
|
||||||
z-index: 0;
|
// z-index: 0;
|
||||||
pointer-events: none;
|
// pointer-events: none;
|
||||||
filter: blur(0.5px);
|
// filter: blur(0.5px);
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 底部背景图片 - 右侧
|
// // 底部背景图片 - 右侧
|
||||||
&::after {
|
// &::after {
|
||||||
content: "";
|
// content: "";
|
||||||
|
// position: absolute;
|
||||||
|
// bottom: 0;
|
||||||
|
// right: 0;
|
||||||
|
// width: 45%;
|
||||||
|
// height: 280px;
|
||||||
|
// min-height: 220px;
|
||||||
|
// background-image: url("../assets/images/logo_leftright.png");
|
||||||
|
// background-repeat: no-repeat;
|
||||||
|
// background-position: right bottom;
|
||||||
|
// background-size: contain;
|
||||||
|
// opacity: 0.5;
|
||||||
|
// z-index: 0;
|
||||||
|
// pointer-events: none;
|
||||||
|
// filter: blur(0.5px);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
top: 35px;
|
||||||
right: 0;
|
left: 45px;
|
||||||
width: 45%;
|
width: 18%;
|
||||||
height: 280px;
|
|
||||||
min-height: 220px;
|
|
||||||
background-image: url("../assets/images/logo_leftright.png");
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: right bottom;
|
|
||||||
background-size: contain;
|
|
||||||
opacity: 0.5;
|
|
||||||
z-index: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
filter: blur(0.5px);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-container {
|
.login-container {
|
||||||
|
|
@ -315,14 +322,15 @@ getCookie();
|
||||||
.login-right {
|
.login-right {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 40px 60px;
|
padding: 40px 60px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title-text {
|
||||||
margin: 0px auto 35px auto;
|
margin: 0 auto 35px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
|
@ -399,8 +407,8 @@ getCookie();
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-button--primary) {
|
:deep(.el-button--primary) {
|
||||||
background-color: #20b2aa;
|
background-color: #5dbbe4;
|
||||||
border-color: #20b2aa;
|
border-color: #5dbbe4;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|
@ -409,8 +417,8 @@ getCookie();
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #1a9b94;
|
background-color: #449ac6;
|
||||||
border-color: #1a9b94;
|
border-color: #449ac6;
|
||||||
transform: translateY(-1px);
|
transform: translateY(-1px);
|
||||||
box-shadow: 0 4px 12px rgba(32, 178, 170, 0.3);
|
box-shadow: 0 4px 12px rgba(32, 178, 170, 0.3);
|
||||||
}
|
}
|
||||||
|
|
@ -430,8 +438,8 @@ getCookie();
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-checkbox__input.is-checked .el-checkbox__inner {
|
.el-checkbox__input.is-checked .el-checkbox__inner {
|
||||||
background-color: #20b2aa;
|
background-color: #5dbbe4;
|
||||||
border-color: #20b2aa;
|
border-color: #5dbbe4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -642,7 +642,7 @@ const onHeaderDrop = (targetIndex) => {
|
||||||
const compareTableData = ref([]);
|
const compareTableData = ref([]);
|
||||||
const diffFieldKeys = ref(new Set());
|
const diffFieldKeys = ref(new Set());
|
||||||
|
|
||||||
const getItemKey = (item) => item?.id ?? item?.uuid ?? item?.partNumber ?? "";
|
const getItemKey = (item) => item?.partNumber ?? item?.id ?? item?.uuid ?? "";
|
||||||
|
|
||||||
const getDictLabel = (dictRef, value) => {
|
const getDictLabel = (dictRef, value) => {
|
||||||
if (!dictRef) return null;
|
if (!dictRef) return null;
|
||||||
|
|
@ -1411,7 +1411,8 @@ const fetchSearchHints = async (keyword) => {
|
||||||
? currentPart.split(":").slice(1).join(":").trim()
|
? currentPart.split(":").slice(1).join(":").trim()
|
||||||
: currentPart;
|
: currentPart;
|
||||||
const valueQueryLower = (valueQuery || "").toLowerCase();
|
const valueQueryLower = (valueQuery || "").toLowerCase();
|
||||||
const apiValueSuggestions = [];
|
const matchedValueSuggestions = [];
|
||||||
|
const fallbackValueSuggestions = [];
|
||||||
hintList.forEach((item) => {
|
hintList.forEach((item) => {
|
||||||
if (!Array.isArray(item.fieldValues)) return;
|
if (!Array.isArray(item.fieldValues)) return;
|
||||||
const fieldKey = item.fieldKey || item.key || "";
|
const fieldKey = item.fieldKey || item.key || "";
|
||||||
|
|
@ -1420,23 +1421,28 @@ const fetchSearchHints = async (keyword) => {
|
||||||
const strVal =
|
const strVal =
|
||||||
val === null || val === undefined ? "" : String(val).trim();
|
val === null || val === undefined ? "" : String(val).trim();
|
||||||
if (!strVal) return;
|
if (!strVal) return;
|
||||||
if (
|
const matched =
|
||||||
valueQueryLower &&
|
!valueQueryLower || strVal.toLowerCase().includes(valueQueryLower);
|
||||||
!strVal.toLowerCase().includes(valueQueryLower)
|
const target = matched
|
||||||
) {
|
? matchedValueSuggestions
|
||||||
return;
|
: fallbackValueSuggestions;
|
||||||
}
|
target.push({
|
||||||
apiValueSuggestions.push({
|
|
||||||
type: "value",
|
type: "value",
|
||||||
label: strVal,
|
label: strVal,
|
||||||
value: strVal,
|
value: strVal,
|
||||||
fieldKey,
|
fieldKey,
|
||||||
fieldLabel,
|
fieldLabel,
|
||||||
weight: 5, // 接口值优先展示
|
weight: matched ? 5 : 3, // 匹配结果权重大,不匹配时作为兜底展示
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 如果没有匹配到值,则使用接口返回的全部值做兜底展示
|
||||||
|
const apiValueSuggestions =
|
||||||
|
matchedValueSuggestions.length > 0
|
||||||
|
? matchedValueSuggestions
|
||||||
|
: fallbackValueSuggestions;
|
||||||
|
|
||||||
// 只用接口返回的值作为下拉建议,并去重
|
// 只用接口返回的值作为下拉建议,并去重
|
||||||
const seen = new Set();
|
const seen = new Set();
|
||||||
const uniqueSuggestions = [];
|
const uniqueSuggestions = [];
|
||||||
|
|
@ -1910,7 +1916,7 @@ const fetchDifferenceRecommendations = async () => {
|
||||||
|
|
||||||
const fetchCompareTable = async () => {
|
const fetchCompareTable = async () => {
|
||||||
const idList = selectedCompareList.value
|
const idList = selectedCompareList.value
|
||||||
.map((item) => item.uuid || item.partNumber)
|
.map((item) => item.partNumber)
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
const ids = idList.join(",");
|
const ids = idList.join(",");
|
||||||
if (!ids) {
|
if (!ids) {
|
||||||
|
|
|
||||||