修复账号ID导致的BUG
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item v-if="hasPerm('email:send')" @click="openSetName(item)">{{ $t('rename') }}
|
<el-dropdown-item v-if="hasPerm('email:send')" @click="openSetName(item)">{{ $t('rename') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item v-if="item.accountId !== userStore.user.accountId && hasPerm('account:delete')"
|
<el-dropdown-item v-if="item.accountId !== userStore.user.account.accountId && hasPerm('account:delete')"
|
||||||
@click="remove(item)">{{ $t('delete') }}
|
@click="remove(item)">{{ $t('delete') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
@@ -238,7 +238,7 @@ function setName() {
|
|||||||
account.name = name
|
account.name = name
|
||||||
setNameShow.value = false
|
setNameShow.value = false
|
||||||
|
|
||||||
if (account.accountId === userStore.user.accountId) {
|
if (account.accountId === userStore.user.account.accountId) {
|
||||||
userStore.user.name = name
|
userStore.user.name = name
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ function setAllReceive(account) {
|
|||||||
|
|
||||||
|
|
||||||
function showNullSetting(item) {
|
function showNullSetting(item) {
|
||||||
return !hasPerm('email:send') && !(item.accountId !== userStore.user.accountId && hasPerm('account:delete'))
|
return !hasPerm('email:send') && !(item.accountId !== userStore.user.account.accountId && hasPerm('account:delete'))
|
||||||
}
|
}
|
||||||
|
|
||||||
function itemBg(accountId) {
|
function itemBg(accountId) {
|
||||||
|
|||||||
@@ -486,7 +486,7 @@ function formatImage(content) {
|
|||||||
function open() {
|
function open() {
|
||||||
if (!accountStore.currentAccount.email) {
|
if (!accountStore.currentAccount.email) {
|
||||||
form.sendEmail = userStore.user.email;
|
form.sendEmail = userStore.user.email;
|
||||||
form.accountId = userStore.user.accountId;
|
form.accountId = userStore.user.account.accountId;
|
||||||
form.name = userStore.user.name;
|
form.name = userStore.user.name;
|
||||||
} else {
|
} else {
|
||||||
form.sendEmail = accountStore.currentAccount.email;
|
form.sendEmail = accountStore.currentAccount.email;
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ function setName() {
|
|||||||
|
|
||||||
userStore.user.name = accountName.value
|
userStore.user.name = accountName.value
|
||||||
|
|
||||||
accountSetName(userStore.user.accountId,name).then(() => {
|
accountSetName(userStore.user.account.accountId,name).then(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: t('saveSuccessMsg'),
|
message: t('saveSuccessMsg'),
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
|||||||
@@ -1306,7 +1306,7 @@ function editSetting(settingForm, refreshStatus = true) {
|
|||||||
plain: true
|
plain: true
|
||||||
})
|
})
|
||||||
if (setting.value.manyEmail === 1) {
|
if (setting.value.manyEmail === 1) {
|
||||||
accountStore.currentAccountId = userStore.user.accountId;
|
accountStore.currentAccountId = userStore.user.account.accountId;
|
||||||
}
|
}
|
||||||
if (refreshStatus) {
|
if (refreshStatus) {
|
||||||
getSettings()
|
getSettings()
|
||||||
|
|||||||
@@ -435,7 +435,7 @@ function deleteAccount(account) {
|
|||||||
userDeleteAccount(account.accountId).then(() => {
|
userDeleteAccount(account.accountId).then(() => {
|
||||||
getAccountList()
|
getAccountList()
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: t('删除成功'),
|
message: t('delSuccessMsg'),
|
||||||
type: "success",
|
type: "success",
|
||||||
plain: true
|
plain: true
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user