|
@@ -200,6 +200,7 @@
|
|
|
// 引入注入的全局
|
|
// 引入注入的全局
|
|
|
const session = inject('session')
|
|
const session = inject('session')
|
|
|
const reload = inject('reload')
|
|
const reload = inject('reload')
|
|
|
|
|
+ const pigeon = inject('pigeon')
|
|
|
|
|
|
|
|
// Vue 相关
|
|
// Vue 相关
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
@@ -321,7 +322,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const isQAlistGet = () => {
|
|
const isQAlistGet = () => {
|
|
|
- const display = safeGetDisplay(sessionStorage)
|
|
|
|
|
|
|
+ const display = safeGetDisplay(session)
|
|
|
if (display && display['R-System-QAList-Search'] && display['R-System-QAList-Search'].show) {
|
|
if (display && display['R-System-QAList-Search'] && display['R-System-QAList-Search'].show) {
|
|
|
isQAlist.value = true
|
|
isQAlist.value = true
|
|
|
} else {
|
|
} else {
|
|
@@ -331,7 +332,7 @@
|
|
|
|
|
|
|
|
// 退出登录
|
|
// 退出登录
|
|
|
const beforeLogout = () => {
|
|
const beforeLogout = () => {
|
|
|
- ElMessageBox.confirm('确定要退出登录吗?', '系统提示', {
|
|
|
|
|
|
|
+ pi.confirm('确定要退出登录吗?', '系统提示', {
|
|
|
confirmButtonText: '确认',
|
|
confirmButtonText: '确认',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
@@ -347,7 +348,7 @@
|
|
|
router.push({ path: '/signin' })
|
|
router.push({ path: '/signin' })
|
|
|
store.commit('InfoExpire', false)
|
|
store.commit('InfoExpire', false)
|
|
|
} else {
|
|
} else {
|
|
|
- ElMessage.error(res.msg)
|
|
|
|
|
|
|
+ pigeon.MessageError(res.msg)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -455,10 +456,10 @@
|
|
|
newPassword: dialogCheck_form.newPassword,
|
|
newPassword: dialogCheck_form.newPassword,
|
|
|
})
|
|
})
|
|
|
if (res.code == Code.StatusOK) {
|
|
if (res.code == Code.StatusOK) {
|
|
|
- ElMessage.success('修改成功')
|
|
|
|
|
|
|
+ pigeon.MessageOK(t('Msg.ModifySuccess'))
|
|
|
cancel()
|
|
cancel()
|
|
|
} else {
|
|
} else {
|
|
|
- ElMessage.error(res.msg)
|
|
|
|
|
|
|
+ pigeon.MessageError(res.msg)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -490,7 +491,7 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- ElMessage.error(res.msg)
|
|
|
|
|
|
|
+ pigeon.MessageError(res.msg)
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error('获取角色列表失败:', error)
|
|
console.error('获取角色列表失败:', error)
|
|
@@ -500,13 +501,16 @@
|
|
|
const switchRole = (item) => {
|
|
const switchRole = (item) => {
|
|
|
if (item.id === currentAttachId.value) return
|
|
if (item.id === currentAttachId.value) return
|
|
|
|
|
|
|
|
- ElMessageBox.confirm('是否切换身份?', '系统提示', {
|
|
|
|
|
- confirmButtonText: '确认',
|
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- }).then(async () => {
|
|
|
|
|
- await confirmSwitchRole(item.id)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ pigeon.MessageConfirm(
|
|
|
|
|
+ '是否切换身份?',
|
|
|
|
|
+ '系统提示',
|
|
|
|
|
+ '确认',
|
|
|
|
|
+ '取消',
|
|
|
|
|
+ async () => {
|
|
|
|
|
+ await confirmSwitchRole(item.id)
|
|
|
|
|
+ },
|
|
|
|
|
+ () => {}
|
|
|
|
|
+ )
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const confirmSwitchRole = async (attachId) => {
|
|
const confirmSwitchRole = async (attachId) => {
|
|
@@ -521,11 +525,11 @@
|
|
|
await nextTick()
|
|
await nextTick()
|
|
|
await getLoginInfo(attachId)
|
|
await getLoginInfo(attachId)
|
|
|
} else {
|
|
} else {
|
|
|
- ElMessage.error(res.msg)
|
|
|
|
|
|
|
+ pigeon.MessageError(res.msg)
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error('切换角色失败:', error)
|
|
console.error('切换角色失败:', error)
|
|
|
- ElMessage.error('切换角色失败')
|
|
|
|
|
|
|
+ pigeon.MessageError('切换角色失败')
|
|
|
} finally {
|
|
} finally {
|
|
|
loading.value = false
|
|
loading.value = false
|
|
|
}
|
|
}
|
|
@@ -537,15 +541,15 @@
|
|
|
store.commit('InitInfo', res.data)
|
|
store.commit('InitInfo', res.data)
|
|
|
store.commit('InfoExpire', false)
|
|
store.commit('InfoExpire', false)
|
|
|
sessionStorage.setItem('info', JSON.stringify(res.data))
|
|
sessionStorage.setItem('info', JSON.stringify(res.data))
|
|
|
- ElMessage.success('登录成功')
|
|
|
|
|
|
|
+ pigeon.MessageOK(t('Msg.LoginSuccess'))
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
loading.value = false
|
|
loading.value = false
|
|
|
- window.location.reload()
|
|
|
|
|
|
|
+ reload()
|
|
|
router.push({ path: '/' }).catch((arr) => arr)
|
|
router.push({ path: '/' }).catch((arr) => arr)
|
|
|
}, 1000)
|
|
}, 1000)
|
|
|
} else {
|
|
} else {
|
|
|
store.commit('InfoExpire', false)
|
|
store.commit('InfoExpire', false)
|
|
|
- ElMessage.error('系统错误')
|
|
|
|
|
|
|
+ pigeon.MessageError(t('Msg.SystemError'))
|
|
|
loading.value = false
|
|
loading.value = false
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -622,24 +626,25 @@
|
|
|
|
|
|
|
|
watch(expire, (val) => {
|
|
watch(expire, (val) => {
|
|
|
if (val) {
|
|
if (val) {
|
|
|
- ElMessageBox.confirm('登录已过期,请重新登录', '系统提示', {
|
|
|
|
|
- confirmButtonText: '确认',
|
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- })
|
|
|
|
|
- .then(async () => {
|
|
|
|
|
- const res = await Service.Logout({})
|
|
|
|
|
|
|
+ pigeon.MessageConfirm(
|
|
|
|
|
+ t('Msg.LogoutTime'),
|
|
|
|
|
+ t('Msg.SystemPrompt'),
|
|
|
|
|
+ t('Btn.Confirm'),
|
|
|
|
|
+ t('Btn.Cancel'),
|
|
|
|
|
+ async function () {
|
|
|
|
|
+ let res = await Service.Logout({})
|
|
|
if (res.code == Code.StatusOK) {
|
|
if (res.code == Code.StatusOK) {
|
|
|
sessionStorage.clear()
|
|
sessionStorage.clear()
|
|
|
- router.push({ path: '/signin' })
|
|
|
|
|
- store.commit('InfoExpire', false)
|
|
|
|
|
|
|
+ _this.$router.push({ path: '/signin' })
|
|
|
|
|
+ _this.$store.commit('InfoExpire', false)
|
|
|
} else {
|
|
} else {
|
|
|
- ElMessage.error(res.msg)
|
|
|
|
|
|
|
+ _this.$pigeon.MessageError(res.msg)
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
- .catch(() => {
|
|
|
|
|
- store.commit('InfoExpire', false)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ function () {
|
|
|
|
|
+ _this.$store.commit('InfoExpire', false)
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|