mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-16 02:47:25 +00:00
Compare commits
25 Commits
pr@dev@k8s
...
v2.27
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a808e1242 | ||
|
|
f651f65c4c | ||
|
|
a1f4f9a7e6 | ||
|
|
b87d3ba3ec | ||
|
|
fe36fa9390 | ||
|
|
ba109900ec | ||
|
|
ec7768267f | ||
|
|
cc58b374ab | ||
|
|
04ffbb8fd6 | ||
|
|
49880f6739 | ||
|
|
e6f98d58c4 | ||
|
|
fd1f16d43c | ||
|
|
968b2415b1 | ||
|
|
776090d6ba | ||
|
|
3a37952288 | ||
|
|
62b8fc0e3b | ||
|
|
b2028869cb | ||
|
|
5277a725f8 | ||
|
|
f137788c1a | ||
|
|
f7d17c8de7 | ||
|
|
feea70b0be | ||
|
|
04696ef3d6 | ||
|
|
1731f4f788 | ||
|
|
6f25d93909 | ||
|
|
46461ec324 |
11
src/App.vue
11
src/App.vue
@@ -1,19 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<router-view v-if="isRouterAlive" />
|
<router-view />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App'
|
||||||
computed: {
|
|
||||||
...mapState({
|
|
||||||
isRouterAlive: state => state.common.isRouterAlive
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ import { optionUrlMeta } from '@/api/common'
|
|||||||
|
|
||||||
const getDefaultState = () => {
|
const getDefaultState = () => {
|
||||||
return {
|
return {
|
||||||
metaMap: {},
|
metaMap: {}
|
||||||
isRouterAlive: true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12,12 +11,6 @@ const state = getDefaultState()
|
|||||||
const mutations = {
|
const mutations = {
|
||||||
SET_URL_META: (state, { url, meta }) => {
|
SET_URL_META: (state, { url, meta }) => {
|
||||||
state.metaMap[url] = meta
|
state.metaMap[url] = meta
|
||||||
},
|
|
||||||
reload: (state) => {
|
|
||||||
state.isRouterAlive = false
|
|
||||||
setTimeout(() => {
|
|
||||||
state.isRouterAlive = true
|
|
||||||
}, 0)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ async function changeOrg(org) {
|
|||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
location.href = path.substring(0, index)
|
location.href = path.substring(0, index)
|
||||||
}
|
}
|
||||||
setTimeout(() => store.commit('common/reload'), 400)
|
setTimeout(() => location.reload(), 400)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export default {
|
|||||||
that.iHasObjects = [...that.iHasObjects, ...objects]
|
that.iHasObjects = [...that.iHasObjects, ...objects]
|
||||||
that.$refs.select2.clearSelected()
|
that.$refs.select2.clearSelected()
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||||
this.$store.commit('common/reload')
|
window.location.reload()
|
||||||
this.$refs.listTable.$refs.ListTable.reloadTable()
|
this.$refs.listTable.$refs.ListTable.reloadTable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export default {
|
|||||||
onAddSuccess: (items, that) => {
|
onAddSuccess: (items, that) => {
|
||||||
this.$log.debug('AssetSelect value', that.assets)
|
this.$log.debug('AssetSelect value', that.assets)
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||||
this.$store.commit('common/reload')
|
window.location.reload()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
nodeRelationConfig: {
|
nodeRelationConfig: {
|
||||||
@@ -120,7 +120,7 @@ export default {
|
|||||||
that.iHasObjects = [...that.iHasObjects, ...objects]
|
that.iHasObjects = [...that.iHasObjects, ...objects]
|
||||||
that.$refs.select2.clearSelected()
|
that.$refs.select2.clearSelected()
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||||
this.$store.commit('common/reload')
|
window.location.reload()
|
||||||
},
|
},
|
||||||
performDelete: (item) => {
|
performDelete: (item) => {
|
||||||
const data = {
|
const data = {
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export default {
|
|||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||||
this.$refs.ListTable.reloadTable()
|
this.$refs.ListTable.reloadTable()
|
||||||
that.$refs.assetSelect.$refs.select2.clearSelected()
|
that.$refs.assetSelect.$refs.select2.clearSelected()
|
||||||
this.$store.commit('common/reload')
|
window.location.reload()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
nodeRelationConfig: {
|
nodeRelationConfig: {
|
||||||
|
|||||||
@@ -37,8 +37,7 @@ import DetailCard from '@/components/DetailCard'
|
|||||||
import QuickActions from '@/components/QuickActions'
|
import QuickActions from '@/components/QuickActions'
|
||||||
import UserConfirmDialog from '@/components/UserConfirmDialog'
|
import UserConfirmDialog from '@/components/UserConfirmDialog'
|
||||||
import { toSafeLocalDateStr } from '@/utils/common'
|
import { toSafeLocalDateStr } from '@/utils/common'
|
||||||
import { getProfile } from '@/api/users'
|
import store from '@/store'
|
||||||
import { mapState } from 'vuex'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProfileInfo',
|
name: 'ProfileInfo',
|
||||||
@@ -48,9 +47,14 @@ export default {
|
|||||||
QuickActions,
|
QuickActions,
|
||||||
UserConfirmDialog
|
UserConfirmDialog
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
object: {
|
||||||
|
type: Object,
|
||||||
|
default: () => store.state.users.profile
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
object: this.userProfile || {},
|
|
||||||
url: `/api/v1/users/profile/`,
|
url: `/api/v1/users/profile/`,
|
||||||
showPasswordDialog: false,
|
showPasswordDialog: false,
|
||||||
currentEdit: '',
|
currentEdit: '',
|
||||||
@@ -213,9 +217,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
|
||||||
userProfile: state => state.users.profile
|
|
||||||
}),
|
|
||||||
detailCardItems() {
|
detailCardItems() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
@@ -298,12 +299,6 @@ export default {
|
|||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
getProfile().then(res => {
|
|
||||||
this.object = res
|
|
||||||
this.$store.commit('users/SET_PROFILE', res)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
updateUserReceiveBackends(val) {
|
updateUserReceiveBackends(val) {
|
||||||
this.$axios.patch(
|
this.$axios.patch(
|
||||||
@@ -311,6 +306,7 @@ export default {
|
|||||||
{ 'receive_backends': this.getReceiveBackendList() }
|
{ 'receive_backends': this.getReceiveBackendList() }
|
||||||
).then(res => {
|
).then(res => {
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||||
|
this.$store.dispatch('users/getProfile', true)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + err))
|
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + err))
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export default {
|
|||||||
const msg = vm.$t('sessions.TerminateTaskSendSuccessMsg')
|
const msg = vm.$t('sessions.TerminateTaskSendSuccessMsg')
|
||||||
vm.$message.success(msg)
|
vm.$message.success(msg)
|
||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
this.$store.commit('common/reload')
|
window.location.reload()
|
||||||
}, 50000)
|
}, 50000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ export default {
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
restoreInterface().then(res => {
|
restoreInterface().then(res => {
|
||||||
this.$message.success(res.success)
|
this.$message.success(res.success)
|
||||||
this.$store.commit('common/reload')
|
location.reload()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
@@ -221,7 +221,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateInterface(form).then(res => {
|
updateInterface(form).then(res => {
|
||||||
this.$store.commit('common/reload')
|
location.reload()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,7 +140,6 @@ export default {
|
|||||||
window.open(url, '_blank')
|
window.open(url, '_blank')
|
||||||
},
|
},
|
||||||
importLicense() {
|
importLicense() {
|
||||||
const vm = this
|
|
||||||
if (this.licenseFile['file'] === undefined) {
|
if (this.licenseFile['file'] === undefined) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -149,7 +148,7 @@ export default {
|
|||||||
importLicense(formData).then(res => {
|
importLicense(formData).then(res => {
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
setTimeout(() => vm.$store.commit('common/reload'), 500)
|
setTimeout(() => location.reload(), 500)
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg)
|
this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ export default {
|
|||||||
return toSafeLocalDateStr(dataStr)
|
return toSafeLocalDateStr(dataStr)
|
||||||
},
|
},
|
||||||
reloadPage() {
|
reloadPage() {
|
||||||
this.$store.commit('common/reload')
|
window.location.reload()
|
||||||
},
|
},
|
||||||
handleApprove() {
|
handleApprove() {
|
||||||
if (this.object.approval_step === this.object.process_map.length) {
|
if (this.object.approval_step === this.object.process_map.length) {
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ export default {
|
|||||||
return toSafeLocalDateStr(dataStr)
|
return toSafeLocalDateStr(dataStr)
|
||||||
},
|
},
|
||||||
reloadPage() {
|
reloadPage() {
|
||||||
this.$store.commit('common/reload')
|
window.location.reload()
|
||||||
},
|
},
|
||||||
handleApprove() {
|
handleApprove() {
|
||||||
if (this.object.approval_step === this.object.process_map.length) {
|
if (this.object.approval_step === this.object.process_map.length) {
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export default {
|
|||||||
return toSafeLocalDateStr(dataStr)
|
return toSafeLocalDateStr(dataStr)
|
||||||
},
|
},
|
||||||
reloadPage() {
|
reloadPage() {
|
||||||
this.$store.commit('common/reload')
|
window.location.reload()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ export default {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
reloadPage() {
|
reloadPage() {
|
||||||
this.$store.commit('common/reload')
|
window.location.reload()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -171,6 +171,9 @@ export default {
|
|||||||
if (value.update_password !== undefined) {
|
if (value.update_password !== undefined) {
|
||||||
delete value.update_password
|
delete value.update_password
|
||||||
}
|
}
|
||||||
|
if (value.source !== 'local') {
|
||||||
|
delete value.need_update_password
|
||||||
|
}
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user