diff --git a/src/api/WarningList/index.ts b/src/api/WarningList/index.ts index ff60453..b459a53 100644 --- a/src/api/WarningList/index.ts +++ b/src/api/WarningList/index.ts @@ -5,7 +5,7 @@ import { DemoQuery } from './types'; * 设备告警分页列表 * @param query id、deviceId、分页、时间范围等 */ -export const listDemo = (query?: DemoQuery) => { +export const listDemo = (query?: any) => { return request({ url: '/device/deviceAlarm/list', method: 'get', diff --git a/src/views/WarningList/list.vue b/src/views/WarningList/list.vue index be7540a..05954fa 100644 --- a/src/views/WarningList/list.vue +++ b/src/views/WarningList/list.vue @@ -13,7 +13,22 @@ - + + @@ -63,7 +78,7 @@ @@ -91,7 +106,7 @@ {{ form.status ?? '-' }} - + @@ -160,7 +175,7 @@ const getList = async () => { loading.value = true; try { const res = await listDemo(queryParams.value); - demoList.value = res.rows; + demoList.value = res.data.rows; total.value = res.total; } finally { loading.value = false; diff --git a/src/views/login.vue b/src/views/login.vue index 2240a61..479c6f1 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -1,64 +1,74 @@ @@ -70,10 +80,10 @@ import { LoginData, TenantVO } from '@/api/types'; import { to } from 'await-to-js'; import { HttpStatus } from '@/enums/RespEnum'; import { useI18n } from 'vue-i18n'; +import logoUrl from '@/assets/logo/logo.png'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; -const title = import.meta.env.VITE_APP_TITLE; const userStore = useUserStore(); const router = useRouter(); const { t } = useI18n(); @@ -221,23 +231,126 @@ onMounted(() => { display: flex; justify-content: center; align-items: center; - height: 100%; + box-sizing: border-box; + min-height: 100vh; + width: 100%; + padding: 24px; background-image: url('../assets/images/logbg.jpg'); background-size: cover; background-position: center; } +.login-cards { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + align-items: stretch; + gap: 0; + max-width: 100%; +} + +.login-brand { + flex: 0 0 auto; + width: min(420px, 90vw); + max-width: 420px; + height: 450px; + max-height: 450px; + box-sizing: border-box; + display: flex; + align-items: center; + justify-content: center; + border-radius: var(--app-radius-lg); + background: linear-gradient(165deg, #2d60e3 0%, #1a4bb8 55%, #153d9a 100%); + box-shadow: 0 24px 48px rgba(30, 64, 175, 0.35); + z-index: 0; +} + +.login-brand__inner { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; + padding: 36px 28px; + gap: 16px; + box-sizing: border-box; +} + +.login-brand__logo-wrap { + display: flex; + align-items: center; + justify-content: center; + width: 88px; + height: 88px; + border-radius: 12px; + background: #fff; + box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); +} + +.login-brand__logo { + width: 56px; + height: 56px; + object-fit: contain; +} + +.login-brand__title { + margin: 0; + font-size: 22px; + font-weight: 700; + line-height: 1.35; + color: #fff; + letter-spacing: 0.5px; +} + +.login-brand__subtitle { + margin: 0; + font-size: 14px; + font-weight: 400; + line-height: 1.5; + color: rgba(255, 255, 255, 0.92); + letter-spacing: 0.3px; +} + +@media (max-width: 900px) { + .login-cards { + flex-direction: column; + align-items: center; + gap: 16px; + } + + .login-brand { + width: min(420px, 100%); + max-width: 420px; + height: 450px; + max-height: 450px; + border-radius: var(--app-radius-lg); + } + + .login-form { + border-radius: 10px; + } +} + .title-box { - //display: flex; - //align-items: center; + flex-shrink: 0; gap: 8px; .title { - margin: 0px auto 26px auto; - //text-align: center; - color: var(--el-text-color-primary); - font-weight: 600; - letter-spacing: 0.5px; + margin: 0 0 10px 0; + font-size: 22px; + font-weight: 700; + line-height: 1.3; + color: #111827; + letter-spacing: 0; + } + + > p { + margin: 0 0 28px 0; + font-size: 13px; + line-height: 1.5; + color: #9ca3af; + font-weight: 400; } :deep(.lang-select--style) { @@ -247,15 +360,89 @@ onMounted(() => { } .login-form { - border-radius: var(--app-radius-lg); - background: rgba(255, 255, 255, 0.94); - border: 1px solid rgba(255, 255, 255, 0.5); + flex: 0 0 auto; + display: flex; + flex-direction: column; + box-sizing: border-box; + min-height: 0; width: min(420px, 90vw); - padding: 32px 30px 12px 30px; + height: 450px; + max-height: 450px; + padding: 44px 48px 36px; + overflow-x: hidden; + overflow-y: auto; + border-radius: 10px; + background: #ffffff; + border: 1px solid #ebebeb; z-index: 1; - box-shadow: var(--app-shadow-lg); - backdrop-filter: blur(6px); - -webkit-backdrop-filter: blur(6px); + box-shadow: + 0 12px 40px rgba(15, 23, 42, 0.08), + 0 2px 10px rgba(15, 23, 42, 0.04); + + :deep(.el-form-item__label) { + color: #1f2937; + font-weight: 500; + } + + :deep(.el-form-item) { + margin-bottom: 14px; + } + + :deep(.el-form-item:last-child) { + margin-bottom: 0; + margin-top: auto; + } + + :deep(.el-input__wrapper) { + background-color: #ffffff; + border-radius: 8px; + box-shadow: 0 0 0 1px #e5e7eb inset; + } + + :deep(.el-input__wrapper:hover) { + box-shadow: 0 0 0 1px #d1d5db inset; + } + + :deep(.el-input__wrapper.is-focus) { + box-shadow: + 0 0 0 1px #2d60e3 inset, + 0 0 0 3px rgba(45, 96, 227, 0.12); + } + + :deep(.el-button--primary) { + border-radius: 8px; + font-weight: 600; + border: none; + box-shadow: none; + } + + .login-form__extras { + display: flex; + justify-content: space-between; + align-items: center; + gap: 12px; + width: 100%; + flex-shrink: 0; + margin-bottom: 14px; + } + + :deep(.login-form__extras .el-checkbox) { + margin-right: 0; + height: auto; + } + + :deep(.login-form__extras .el-checkbox__label) { + color: #374151; + font-size: 14px; + } + + :deep(.login-form__extras .el-button.is-link) { + padding: 0; + height: auto; + font-size: 14px; + vertical-align: baseline; + } + .el-input { height: 40px; input { @@ -276,19 +463,6 @@ onMounted(() => { color: #bfbfbf; } -.login-form :deep(.el-input__wrapper) { - background-color: rgba(255, 255, 255, 0.9); -} - -.login-form :deep(.el-input__wrapper.is-focus) { - box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); -} - -//.login-form :deep(.el-button--primary) { -// border-radius: var(--app-radius-md); -// box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25); -//} - .login-form :deep(.el-button.is-circle) { background: rgba(15, 23, 42, 0.04); border: 1px solid rgba(15, 23, 42, 0.08); @@ -340,6 +514,11 @@ onMounted(() => { } :global(html.dark) { + .login-brand { + background: linear-gradient(165deg, #2563eb 0%, #1d4ed8 55%, #1e3a8a 100%); + box-shadow: 0 24px 48px rgba(15, 23, 42, 0.45); + } + .login-form { background: rgba(17, 24, 39, 0.9); border-color: rgba(148, 163, 184, 0.2);