diff --git a/src/api/login.js b/src/api/login.js index c1a9d19..97c0dfa 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -1,12 +1,13 @@ import request from '@/utils/request' // 登录方法 -export function login(username, password, code, uuid) { +export function login(username, password, code, uuid,loginParam) { const data = { username, password, code, - uuid + uuid, + loginParam } return request({ url: '/login', @@ -28,6 +29,17 @@ export function loginAnonymous(data) { }) } +export function getLocalconfig(data) { + return request({ + url: '/getLocalconfig', + headers: { + isToken: false + }, + method: 'get', + params: data, + timeout: 20000 + }) +} // 注册方法 export function register(data) { return request({ diff --git a/src/assets/images/logo_new.png b/src/assets/images/logo_new.png new file mode 100644 index 0000000..74849a2 Binary files /dev/null and b/src/assets/images/logo_new.png differ diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 3db2202..117fb57 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -1,54 +1,67 @@ + + diff --git a/src/store/modules/user.js b/src/store/modules/user.js index cbbc5a1..f8ef7a8 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -17,6 +17,8 @@ const useUserStore = defineStore( token: getToken(), id: '', name: '', + nickName: '', + roleName: '', avatar: '', roles: [], permissions: [] @@ -42,8 +44,9 @@ const useUserStore = defineStore( const password = userInfo.password const code = userInfo.code const uuid = userInfo.uuid + const loginParam=userInfo.loginParam return new Promise((resolve, reject) => { - login(username, password, code, uuid).then(res => { + login(username, password, code, uuid,loginParam).then(res => { setToken(res.token) this.token = res.token resolve() @@ -57,6 +60,10 @@ const useUserStore = defineStore( return new Promise((resolve, reject) => { getInfo().then(res => { const user = res.user + const rolelist = user.roles + if (rolelist && rolelist.length > 0) { + this.roleName=rolelist[0].roleName + } const avatar = (user.avatar == "" || user.avatar == null) ? defAva : import.meta.env.VITE_APP_BASE_API + user.avatar; if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 @@ -67,6 +74,7 @@ const useUserStore = defineStore( } this.id = user.userId this.name = user.userName + this.nickName= user.nickName this.avatar = avatar resolve(res) }).catch(error => { diff --git a/src/views/liswork/work/components/labresult.vue b/src/views/liswork/work/components/labresult.vue index 6e332cf..447e310 100644 --- a/src/views/liswork/work/components/labresult.vue +++ b/src/views/liswork/work/components/labresult.vue @@ -907,6 +907,7 @@ const handleWarningSuccess = async () => { const unShHandle = () => { uncheck2({ ...tableKey.value, yhdh: props.labPat.yhdh }).then(res => { + console.log('res',res); if (res.code == "4") { tableKey.value.problemId = res.problemId; reasonText.value = res.msg; diff --git a/src/views/login.vue b/src/views/login.vue index b9b62aa..2aa2d01 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -1,103 +1,173 @@ + +.login-logo img { + height: 40px; + width: auto; +} + +.login-split { + width: 1px; + height: 30px; + background-color: #ccc; + margin: 0 15px; +} + +.login-title h1 { + margin: 0; + font-size: 24px; + color: #1989fa; + font-weight: 500; +} + +/* Tab容器样式(修复冲突) */ +.login-tabs { + width: 100%; + height: 350px; + overflow: hidden; + border-radius: 8px; + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + border: 1px solid rgba(255, 255, 255, 0.1); + padding: 1px 10px 10px; + background: transparent; + + :deep(.el-tabs__header) { + background: transparent; + margin: 0; + } + + :deep(.el-tabs__nav-prev), + :deep(.el-tabs__nav-next) { + display: none !important; // 隐藏Tab左右箭头 + } + + :deep(.el-tabs__nav-wrap) { + overflow: visible !important; + } +} + +.custom-select { + margin-top: 20px; /* 可根据需求调整数值 */ +} + +/* Tab占位样式 */ +.tab-placeholder { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 40px 0; + color: #666; + height: calc(100% - 40px); // 适配Tab容器高度 + + .placeholder-icon { + font-size: 48px; + margin-bottom: 20px; + color: #ccc; + } + + .wechat-login-btn { + margin-top: 20px; + width: 200px; + } +} + +/* 隐藏必填项星号 */ +:deep(.el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap .el-form-item__asterisk) { + display: none !important; +} + \ No newline at end of file diff --git a/src/views/logincopy.vue b/src/views/logincopy.vue new file mode 100644 index 0000000..c6201db --- /dev/null +++ b/src/views/logincopy.vue @@ -0,0 +1,448 @@ + + + + + \ No newline at end of file