|
@@ -23,22 +23,23 @@
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="platform__right__login">
|
|
<div class="platform__right__login">
|
|
|
- <span @click="handleLogin('login')" v-if="!userStore.info?.id">登录</span>
|
|
|
|
|
- <UserInfo v-else @switchAccount="handleLogin('switchAccount')" @modifyPassword="handleUpdatePwd" />
|
|
|
|
|
|
|
+ <span @click="userStore.showLogin = true" v-if="!userStore.info?.id">登录</span>
|
|
|
|
|
+ <UserInfo v-else />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</header>
|
|
</header>
|
|
|
<Login v-if="userStore.showLogin" @close="userStore.showLogin = false" class="fadeIn" />
|
|
<Login v-if="userStore.showLogin" @close="userStore.showLogin = false" class="fadeIn" />
|
|
|
|
|
+ <SwitchAccount v-if="userStore.showSwitchAccount" @close="userStore.showSwitchAccount = false" class="fadeIn" />
|
|
|
<UpdatePwd v-if="userStore.showUpdatePwd" @close="userStore.showUpdatePwd = false" class="fadeIn" />
|
|
<UpdatePwd v-if="userStore.showUpdatePwd" @close="userStore.showUpdatePwd = false" class="fadeIn" />
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { ref, computed } from 'vue';
|
|
import { ref, computed } from 'vue';
|
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
|
- import { ElMessage } from 'element-plus';
|
|
|
|
|
import UpdatePwd from '@/components/UpdatePwd.vue';
|
|
import UpdatePwd from '@/components/UpdatePwd.vue';
|
|
|
import UserInfo from '@/components/UserInfo.vue';
|
|
import UserInfo from '@/components/UserInfo.vue';
|
|
|
- import Login from '@/components/Login.vue';
|
|
|
|
|
|
|
+ import Login from '@/components/Login/Login.vue';
|
|
|
|
|
+ import SwitchAccount from '@/components/Login/SwitchAccount.vue';
|
|
|
import SwitchTenant from '@/layout/components/SwitchTenant.vue';
|
|
import SwitchTenant from '@/layout/components/SwitchTenant.vue';
|
|
|
import { useUserStore } from '@/store/modules/user';
|
|
import { useUserStore } from '@/store/modules/user';
|
|
|
import { useGlobSetting } from '@/hooks/setting';
|
|
import { useGlobSetting } from '@/hooks/setting';
|
|
@@ -51,21 +52,11 @@
|
|
|
const activeNav = ref(NAV_LIST[0].name);
|
|
const activeNav = ref(NAV_LIST[0].name);
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const searchValue = ref('');
|
|
const searchValue = ref('');
|
|
|
- const loginType = ref<'login' | 'switchAccount'>('login');
|
|
|
|
|
|
|
|
|
|
const handleSearch = () => {
|
|
const handleSearch = () => {
|
|
|
console.log('searchValue', searchValue.value);
|
|
console.log('searchValue', searchValue.value);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- const handleLogin = (type: 'login' | 'switchAccount') => {
|
|
|
|
|
- loginType.value = type;
|
|
|
|
|
- userStore.showLogin = true;
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- const handleUpdatePwd = () => {
|
|
|
|
|
- userStore.showUpdatePwd = true;
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
const currentRoute = useRoute();
|
|
const currentRoute = useRoute();
|
|
|
const { title } = useGlobSetting();
|
|
const { title } = useGlobSetting();
|
|
|
|
|
|
|
@@ -110,13 +101,11 @@
|
|
|
border: 1px solid transparent;
|
|
border: 1px solid transparent;
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
|
// transition: all 0.3s ease-in-out;
|
|
// transition: all 0.3s ease-in-out;
|
|
|
- &.active {
|
|
|
|
|
|
|
+ &.active,
|
|
|
|
|
+ &:hover {
|
|
|
background: linear-gradient(180deg, #33afff, $primary-color);
|
|
background: linear-gradient(180deg, #33afff, $primary-color);
|
|
|
color: $white-color;
|
|
color: $white-color;
|
|
|
}
|
|
}
|
|
|
- &:hover {
|
|
|
|
|
- border-color: $primary-color;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|