liuchen864 1 year ago
parent
commit
eb446a3de2
  1. 2
      src/layout/Layout.vue
  2. 4
      src/layout/components/UserInfo/src/UserInfo.vue
  3. 17
      src/views/Login/components/LoginForm.vue
  4. 4
      src/views/Profile/Index.vue
  5. 4
      src/views/system/menu/index.vue

2
src/layout/Layout.vue

@ -59,7 +59,7 @@ export default defineComponent({
<Backtop></Backtop> <Backtop></Backtop>
<Setting></Setting> {/* <Setting></Setting> */}
</section> </section>
) )
} }

4
src/layout/components/UserInfo/src/UserInfo.vue

@ -64,10 +64,10 @@ const toDocument = () => {
<Icon icon="ep:tools" /> <Icon icon="ep:tools" />
<div @click="toProfile">{{ t('common.profile') }}</div> <div @click="toProfile">{{ t('common.profile') }}</div>
</ElDropdownItem> </ElDropdownItem>
<ElDropdownItem> <!-- <ElDropdownItem>
<Icon icon="ep:menu" /> <Icon icon="ep:menu" />
<div @click="toDocument">{{ t('common.document') }}</div> <div @click="toDocument">{{ t('common.document') }}</div>
</ElDropdownItem> </ElDropdownItem> -->
<ElDropdownItem divided @click="loginOut"> <ElDropdownItem divided @click="loginOut">
<Icon icon="ep:switch-button" /> <Icon icon="ep:switch-button" />
<div>{{ t('common.loginOut') }}</div> <div>{{ t('common.loginOut') }}</div>

17
src/views/Login/components/LoginForm.vue

@ -15,6 +15,17 @@
<LoginFormTitle style="width: 100%" /> <LoginFormTitle style="width: 100%" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">
<el-input
v-model="loginData.loginForm.tenantName"
:placeholder="t('login.tenantNamePlaceholder')"
:prefix-icon="iconHouse"
link
type="primary"
/>
</el-form-item>
</el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px"> <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
@ -60,17 +71,17 @@
:title="t('login.login')" :title="t('login.login')"
class="w-[100%]" class="w-[100%]"
type="primary" type="primary"
@click="getCode()" @click="handleLogin"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<Verify <!-- <Verify
ref="verify" ref="verify"
:captchaType="captchaType" :captchaType="captchaType"
:imgSize="{ width: '400px', height: '200px' }" :imgSize="{ width: '400px', height: '200px' }"
mode="pop" mode="pop"
@success="handleLogin" @success="handleLogin"
/> /> -->
</el-row> </el-row>
</el-form> </el-form>
</template> </template>

4
src/views/Profile/Index.vue

@ -22,9 +22,9 @@
<el-tab-pane :label="t('profile.info.resetPwd')" name="resetPwd"> <el-tab-pane :label="t('profile.info.resetPwd')" name="resetPwd">
<ResetPwd /> <ResetPwd />
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="t('profile.info.userSocial')" name="userSocial"> <!-- <el-tab-pane :label="t('profile.info.userSocial')" name="userSocial">
<UserSocial /> <UserSocial />
</el-tab-pane> </el-tab-pane> -->
</el-tabs> </el-tabs>
</div> </div>
</el-card> </el-card>

4
src/views/system/menu/index.vue

@ -84,6 +84,7 @@ import { handleTree } from '@/utils/tree'
import * as MenuApi from '@/api/system/menu' import * as MenuApi from '@/api/system/menu'
import MenuForm from './MenuForm.vue' import MenuForm from './MenuForm.vue'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { getInfo } from '@/api/login'
defineOptions({ name: 'SystemMenu' }) defineOptions({ name: 'SystemMenu' })
@ -107,6 +108,9 @@ const getList = async () => {
try { try {
const data = await MenuApi.getMenuList(queryParams) const data = await MenuApi.getMenuList(queryParams)
list.value = handleTree(data) list.value = handleTree(data)
let userInfo = await getInfo()
wsCache.set(CACHE_KEY.USER, userInfo)
wsCache.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus)
} finally { } finally {
loading.value = false loading.value = false
} }

Loading…
Cancel
Save