feat(系统管理): 扫码登录样式权限修改

This commit is contained in:
guoyuqi 2024-09-02 18:45:49 +08:00 committed by Craftsman
parent 4034f48213
commit 916e7dec09
7 changed files with 23 additions and 23 deletions

View File

@ -48,10 +48,10 @@ export default {
userStore.getIsLogin() userStore.getIsLogin()
.then(res => { .then(res => {
this.getLanguage(res.data.language); this.getLanguage(res.data.language);
window.location.href = "/";
sessionStorage.setItem('loginSuccess', 'true'); sessionStorage.setItem('loginSuccess', 'true');
sessionStorage.setItem('changePassword', callback.message); sessionStorage.setItem('changePassword', callback.message);
localStorage.setItem('AuthenticateType', 'QRCODE'); localStorage.setItem('AuthenticateType', 'QRCODE');
this.checkRedirectUrl()
}) })
.catch(data => { .catch(data => {
// //
@ -60,7 +60,7 @@ export default {
if (lang) { if (lang) {
setLanguage(lang); setLanguage(lang);
} }
this.checkRedirectUrl() window.location.href = "/";
}); });
}, },
getLanguage(language) { getLanguage(language) {

View File

@ -49,7 +49,7 @@
{{ $t('commons.login') }} {{ $t('commons.login') }}
</el-button> </el-button>
</div> </div>
<el-divider class="login-divider"><span style="color: #959598; font-size: 12px">更多登录方式</span></el-divider> <el-divider v-if="orgOptions.length > 0" class="login-divider"><span style="color: #959598; font-size: 12px">更多登录方式</span></el-divider>
<div <div
v-if="orgOptions.length > 0" v-if="orgOptions.length > 0"
class="loginType" class="loginType"

View File

@ -26,7 +26,7 @@ export default{
goto: url, goto: url,
width: '300', width: '300',
height: '300', height: '300',
style: 'width:300px;height:300px', // htmlstyle style: 'width:300px;height:300px;border-width: 0px;', // htmlstyle
}); });
// function handleMessage // function handleMessage
@ -59,7 +59,6 @@ export default{
<style scoped> <style scoped>
.lark-qrName { .lark-qrName {
width: 300px;
height: 300px;
} }
</style> </style>

View File

@ -24,7 +24,7 @@ export default{
goto: url, goto: url,
width: '300', width: '300',
height: '300', height: '300',
style: 'width:300px;height:300px', // htmlstyle style: 'width:300px;height:300px;border-width: 0px;', // htmlstyle
}); });
// function handleMessage // function handleMessage
@ -55,7 +55,6 @@ export default{
<style scoped> <style scoped>
.lark-suite-qrName { .lark-suite-qrName {
width: 300px;
height: 300px;
} }
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="qrcode"> <div class="tab_qrcode">
<el-tabs v-model="activeName" type="border-card" class="tabPlatform" @tab-click="handleClick"> <el-tabs v-model="activeName" type="border-card" class="tabPlatform" @tab-click="handleClick">
<el-tab-pane <el-tab-pane
v-for="item of orgOptions" v-for="item of orgOptions"
@ -111,12 +111,18 @@ export default {
</script> </script>
<style scoped> <style scoped>
.qrcode{ .tab_qrcode{
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-around; justify-content: space-around;
} }
:deep(.el-tabs__nav){
width: 100%;
}
:deep(.el-tabs__item ){
width: 25%;
}
.ms-icon{ .ms-icon{
height: 24px; height: 24px;
@ -138,7 +144,6 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
overflow: hidden; overflow: hidden;
border-radius: 8px;
background: #ffffff; background: #ffffff;
flex-direction: column; flex-direction: column;
} }
@ -153,10 +158,6 @@ export default {
line-height: 26px; line-height: 26px;
margin-bottom: -24px; margin-bottom: -24px;
z-index: 100000; z-index: 100000;
.ed-icon {
margin-right: 8px;
font-size: 24px;
}
} }
} }
.radioOneButton{ .radioOneButton{

View File

@ -54,7 +54,6 @@
userStore.getIsLogin() userStore.getIsLogin()
.then(res => { .then(res => {
this.getLanguage(res.data.language); this.getLanguage(res.data.language);
window.location.href = "/";
sessionStorage.setItem('loginSuccess', 'true'); sessionStorage.setItem('loginSuccess', 'true');
sessionStorage.setItem('changePassword', weComCallback.message); sessionStorage.setItem('changePassword', weComCallback.message);
localStorage.setItem('AuthenticateType', 'QRCODE'); localStorage.setItem('AuthenticateType', 'QRCODE');
@ -66,8 +65,8 @@
if (lang) { if (lang) {
setLanguage(lang); setLanguage(lang);
} }
this.checkRedirectUrl()
}); });
this.checkRedirectUrl()
}, },
getLanguage(language) { getLanguage(language) {
if (!language) { if (!language) {
@ -97,6 +96,8 @@
onLoginSuccess(code) { onLoginSuccess(code) {
getWeComCallback(code).then(res=>{ getWeComCallback(code).then(res=>{
const weComCallback = res.data; const weComCallback = res.data;
console.log("weComCallback")
console.log(weComCallback)
this.doLogin(weComCallback) this.doLogin(weComCallback)
localStorage.setItem('loginType', 'WE_COM'); localStorage.setItem('loginType', 'WE_COM');
}); });

View File

@ -32,28 +32,28 @@
class="arco-btn-outline--secondary" class="arco-btn-outline--secondary"
size="mini" size="mini"
:disabled=" :disabled="
!item.hasConfig || !hasAnyPermission(['SYSTEM_PARAMETER_SETTING_QRCODE:READ+UPDATE']) !item.hasConfig || !checkPermission('SYSTEM_SETTING:READ+EDIT')
" "
@click="getValidateHandler(item.key)" @click="getValidateHandler(item.key)"
>{{ $t('qrcode.service_testLink') }}</el-button></span> >{{ $t('qrcode.service_testLink') }}</el-button></span>
</el-tooltip> </el-tooltip>
<el-button <el-button
v-else v-else
:disabled="!item.hasConfig || !checkPermission('SYSTEM_PARAMETER_SETTING_QRCODE:READ+UPDATE')" :disabled="!item.hasConfig || !checkPermission('SYSTEM_SETTING:READ+EDIT')"
size="mini" size="mini"
@click="getValidateHandler(item.key)" @click="getValidateHandler(item.key)"
>{{ $t('qrcode.service_testLink') }} >{{ $t('qrcode.service_testLink') }}
</el-button> </el-button>
<el-button <el-button
v-if="item.edit" v-if="item.edit"
v-permission="['SYSTEM_PARAMETER_SETTING_QRCODE:READ+UPDATE']" v-permission="['SYSTEM_SETTING:READ+EDIT']"
size="mini" size="mini"
@click="editHandler(item.key)" @click="editHandler(item.key)"
>{{ $t('qrcode.service_edit') }} >{{ $t('qrcode.service_edit') }}
</el-button> </el-button>
<el-button <el-button
v-else v-else
v-permission="['SYSTEM_PARAMETER_SETTING_QRCODE:READ+UPDATE']" v-permission="['SYSTEM_SETTING:READ+EDIT']"
size="mini" size="mini"
@click="editHandler(item.key)" @click="editHandler(item.key)"
>{{ $t('commons.add') }} >{{ $t('commons.add') }}
@ -73,7 +73,7 @@
v-else v-else
v-model="item.enable" v-model="item.enable"
size="small" size="small"
:disabled="!checkPermission('SYSTEM_PARAMETER_SETTING_QRCODE:READ+UPDATE')" :disabled="!checkPermission('SYSTEM_SETTING:READ+EDIT')"
@change="(v) => changeStatus(v, item.key)" @change="(v) => changeStatus(v, item.key)"
/> />
</span> </span>