Merge branch 'lichang' into lite
This commit is contained in:
@@ -272,7 +272,7 @@ function fnUnlock() {
|
||||
hide();
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('views.system.log.login.unlockSure', {
|
||||
content: t('views.system.log.login.unlockSuss', {
|
||||
userName: username,
|
||||
}),
|
||||
duration: 3,
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
import { stepState, fnToStepName } from '../hooks/useStep';
|
||||
import { Modal } from 'ant-design-vue/es';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { removeToken } from '@/plugins/auth-token';
|
||||
import { delAccessToken, delRefreshToken } from '@/plugins/auth-token';
|
||||
import { useRouter } from 'vue-router';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { bootloaderDone } from '@/api/system/quick-start/bootloader';
|
||||
@@ -56,8 +55,9 @@ function fnGuideDone() {
|
||||
bootloaderDone()
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
removeToken();
|
||||
// useAppStore().bootloader = false;
|
||||
delAccessToken();
|
||||
delRefreshToken();
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
import { onMounted } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { TOKEN_RESPONSE_FIELD } from '@/constants/token-constants';
|
||||
import { getToken, setToken } from '@/plugins/auth-token';
|
||||
import { getAccessToken, setAccessToken } from '@/plugins/auth-token';
|
||||
import { bootloaderStart } from '@/api/system/quick-start/bootloader';
|
||||
import { fnToStepName } from '../hooks/useStep';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
@@ -19,11 +18,10 @@ function fnChangeLocale(e: any) {
|
||||
|
||||
/**引导开始 */
|
||||
function fnGuideStart() {
|
||||
if (getToken()) return;
|
||||
if (getAccessToken()) return;
|
||||
bootloaderStart().then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
||||
const token = res.data[TOKEN_RESPONSE_FIELD];
|
||||
setToken(token);
|
||||
setAccessToken(res.data.accessToken, res.data.expiresIn);
|
||||
} else {
|
||||
router.push({ name: 'Login' });
|
||||
}
|
||||
|
||||
@@ -32,8 +32,10 @@ import { hasPermissions } from '@/plugins/auth-user';
|
||||
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const routePath = route.path;
|
||||
@@ -732,7 +734,7 @@ function fnGetList(pageNum?: number) {
|
||||
queryParams.beginTime = queryRangePicker.value[0];
|
||||
queryParams.endTime = queryRangePicker.value[1];
|
||||
listRole(toRaw(queryParams)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 取消勾选
|
||||
if (tableState.selectedRowKeys.length > 0) {
|
||||
tableState.selectedRowKeys = [];
|
||||
@@ -941,6 +943,7 @@ onMounted(() => {
|
||||
v-if="
|
||||
dict.sysNormalDisable.length > 0 &&
|
||||
record.roleId !== 1 &&
|
||||
!userStore.roles?.includes(record.roleKey) &&
|
||||
hasPermissions(['system:role:edit'])
|
||||
"
|
||||
v-model:checked="record.statusFlag"
|
||||
@@ -969,7 +972,12 @@ onMounted(() => {
|
||||
<template #icon><ProfileOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip v-if="record.roleId !== 1">
|
||||
<a-tooltip
|
||||
v-if="
|
||||
record.roleId !== 1 &&
|
||||
!userStore.roles?.includes(record.roleKey)
|
||||
"
|
||||
>
|
||||
<template #title>{{ t('common.editText') }}</template>
|
||||
<a-button
|
||||
type="link"
|
||||
@@ -979,7 +987,12 @@ onMounted(() => {
|
||||
<template #icon><FormOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip v-if="record.roleId !== 1">
|
||||
<a-tooltip
|
||||
v-if="
|
||||
record.roleId !== 1 &&
|
||||
!userStore.roles?.includes(record.roleKey)
|
||||
"
|
||||
>
|
||||
<template #title>{{ t('common.deleteText') }}</template>
|
||||
<a-button
|
||||
type="link"
|
||||
@@ -1001,7 +1014,7 @@ onMounted(() => {
|
||||
<template #icon><SecurityScanOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip placement="topRight" v-if="record.roleId !== 1">
|
||||
<a-tooltip placement="topRight" v-if="false">
|
||||
<template #title>{{
|
||||
t('views.system.role.distributeUser')
|
||||
}}</template>
|
||||
|
||||
Reference in New Issue
Block a user