mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-07 12:08:51 +00:00
commit
f7d17c8de7
@ -200,15 +200,9 @@ td .el-button.el-button--mini {
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
|
.el-select-dropdown__item.hover {
|
||||||
color: #606266;
|
|
||||||
background-color: #ddd;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover {
|
|
||||||
background-color: primary;
|
background-color: primary;
|
||||||
color: white!important;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-select-dropdown__item.is-disabled:hover{
|
.el-select-dropdown__item.is-disabled:hover{
|
||||||
@ -418,6 +412,15 @@ td .el-button.el-button--mini {
|
|||||||
.el-dialog .el-dialog__body {
|
.el-dialog .el-dialog__body {
|
||||||
max-height: 90vh;
|
max-height: 90vh;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
padding: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog .el-dialog__body form {
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog .el-dialog__footer {
|
||||||
|
padding: 10px 30px 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-cascader {
|
.el-cascader {
|
||||||
|
@ -1530,7 +1530,7 @@
|
|||||||
"NoLicense": "暂无许可证",
|
"NoLicense": "暂无许可证",
|
||||||
"Node": "节点",
|
"Node": "节点",
|
||||||
"Organization": {
|
"Organization": {
|
||||||
"AllOrganization": "所有组织",
|
"AllOrganization": "组织列表",
|
||||||
"OrganizationCreate": "创建组织",
|
"OrganizationCreate": "创建组织",
|
||||||
"OrganizationLists": "组织列表",
|
"OrganizationLists": "组织列表",
|
||||||
"OrganizationDetail": "组织详情",
|
"OrganizationDetail": "组织详情",
|
||||||
|
@ -197,6 +197,10 @@ export default {
|
|||||||
if (typeof route === 'string') {
|
if (typeof route === 'string') {
|
||||||
route = { name: route, params: {}}
|
route = { name: route, params: {}}
|
||||||
}
|
}
|
||||||
|
route = {
|
||||||
|
...route,
|
||||||
|
query: this.$route.query || {}
|
||||||
|
}
|
||||||
route.params.id = id
|
route.params.id = id
|
||||||
this.$router.push(route)
|
this.$router.push(route)
|
||||||
},
|
},
|
||||||
|
@ -7,7 +7,7 @@ const getters = {
|
|||||||
consoleOrgs: state => state.users.consoleOrgs,
|
consoleOrgs: state => state.users.consoleOrgs,
|
||||||
auditOrgs: state => state.users.auditOrgs,
|
auditOrgs: state => state.users.auditOrgs,
|
||||||
workbenchOrgs: state => state.users.workbenchOrgs,
|
workbenchOrgs: state => state.users.workbenchOrgs,
|
||||||
notRootWorkbenchOrgs: state => state.users.notRootWorkbenchOrgs,
|
noRootWorkbenchOrgs: state => state.users.noRootWorkbenchOrgs,
|
||||||
usingOrgs: state => state.users.usingOrgs,
|
usingOrgs: state => state.users.usingOrgs,
|
||||||
currentOrg: state => state.users.currentOrg,
|
currentOrg: state => state.users.currentOrg,
|
||||||
currentOrgIsDefault: state => state.users.currentOrg['is_default'],
|
currentOrgIsDefault: state => state.users.currentOrg['is_default'],
|
||||||
|
@ -17,7 +17,7 @@ const getDefaultState = () => {
|
|||||||
auditOrgs: [],
|
auditOrgs: [],
|
||||||
consoleOrgs: [],
|
consoleOrgs: [],
|
||||||
workbenchOrgs: [],
|
workbenchOrgs: [],
|
||||||
notRootWorkbenchOrgs: [],
|
noRootWorkbenchOrgs: [],
|
||||||
usingOrgs: [],
|
usingOrgs: [],
|
||||||
perms: [],
|
perms: [],
|
||||||
MFAVerifyAt: null,
|
MFAVerifyAt: null,
|
||||||
@ -43,7 +43,7 @@ const mutations = {
|
|||||||
state.perms = profile.perms
|
state.perms = profile.perms
|
||||||
state.consoleOrgs = profile['console_orgs']
|
state.consoleOrgs = profile['console_orgs']
|
||||||
state.workbenchOrgs = profile['workbench_orgs']
|
state.workbenchOrgs = profile['workbench_orgs']
|
||||||
state.notRootWorkbenchOrgs = profile['workbench_orgs'].filter(item => {
|
state.noRootWorkbenchOrgs = profile['workbench_orgs'].filter(item => {
|
||||||
return item.id !== '00000000-0000-0000-0000-000000000000'
|
return item.id !== '00000000-0000-0000-0000-000000000000'
|
||||||
})
|
})
|
||||||
state.auditOrgs = profile['audit_orgs']
|
state.auditOrgs = profile['audit_orgs']
|
||||||
|
@ -155,8 +155,12 @@ export function formatDate(inputTime) {
|
|||||||
|
|
||||||
const uuidPattern = /[0-9a-zA-Z\-]{36}/
|
const uuidPattern = /[0-9a-zA-Z\-]{36}/
|
||||||
|
|
||||||
export function hasUUID(s) {
|
export function hasUUID(path) {
|
||||||
return s.search(uuidPattern) !== -1
|
const index = path.indexOf('?')
|
||||||
|
if (index !== -1) {
|
||||||
|
path = path.substring(0, index)
|
||||||
|
}
|
||||||
|
return path.search(uuidPattern) !== -1
|
||||||
}
|
}
|
||||||
|
|
||||||
export function replaceUUID(s, n) {
|
export function replaceUUID(s, n) {
|
||||||
|
@ -26,6 +26,10 @@ async function changeOrg(org) {
|
|||||||
path = _.trimEnd(path, '/')
|
path = _.trimEnd(path, '/')
|
||||||
location.href = path
|
location.href = path
|
||||||
} else {
|
} else {
|
||||||
|
const index = path.indexOf('?')
|
||||||
|
if (index !== -1) {
|
||||||
|
location.href = path.substring(0, index)
|
||||||
|
}
|
||||||
setTimeout(() => location.reload(), 400)
|
setTimeout(() => location.reload(), 400)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
:data="iData"
|
:data="iData"
|
||||||
show-checkbox
|
show-checkbox
|
||||||
node-key="id"
|
node-key="id"
|
||||||
:default-expand-all="false"
|
:default-expand-all="true"
|
||||||
:default-checked-keys="value"
|
:default-checked-keys="value"
|
||||||
:props="defaultProps"
|
:props="defaultProps"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<Dialog
|
<Dialog
|
||||||
ref="myDialog"
|
ref="myDialog"
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
width="770px"
|
width="790px"
|
||||||
height="700px"
|
height="720px"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
@confirm="submit"
|
@confirm="submit"
|
||||||
v-on="$listeners"
|
v-on="$listeners"
|
||||||
|
@ -127,7 +127,7 @@ export default {
|
|||||||
component: Select2,
|
component: Select2,
|
||||||
el: {
|
el: {
|
||||||
multiple: false,
|
multiple: false,
|
||||||
options: this.$store.state.users.notRootWorkbenchOrgs?.map((item) => {
|
options: this.$store.state.users.noRootWorkbenchOrgs?.map((item) => {
|
||||||
return { label: item.name, value: item.id }
|
return { label: item.name, value: item.id }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -139,6 +139,14 @@ export default {
|
|||||||
fieldsMeta.apply_applications.el.ajax.url = `/api/v1/applications/applications/suggestions/?oid=${vm.org_id}&category=${apply_category_type[0]}&type=${apply_category_type[1]}`
|
fieldsMeta.apply_applications.el.ajax.url = `/api/v1/applications/applications/suggestions/?oid=${vm.org_id}&category=${apply_category_type[0]}&type=${apply_category_type[1]}`
|
||||||
fieldsMeta.apply_system_users.el.ajax.url = apply_category_type[0] === 'remote_app' ? `/api/v1/assets/system-users/suggestions/?oid=${vm.org_id}&protocol=rdp` : `/api/v1/assets/system-users/suggestions/?oid=${vm.org_id}&protocol=${apply_category_type[1]}`
|
fieldsMeta.apply_system_users.el.ajax.url = apply_category_type[0] === 'remote_app' ? `/api/v1/assets/system-users/suggestions/?oid=${vm.org_id}&protocol=rdp` : `/api/v1/assets/system-users/suggestions/?oid=${vm.org_id}&protocol=${apply_category_type[1]}`
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
on: {
|
||||||
|
change: ([event], updateForm) => {
|
||||||
|
updateForm({
|
||||||
|
apply_applications: [],
|
||||||
|
apply_system_users: []
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -161,7 +169,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
workbenchOrgs: state => state.users.notRootWorkbenchOrgs
|
workbenchOrgs: state => state.users.noRootWorkbenchOrgs
|
||||||
}),
|
}),
|
||||||
...mapGetters(['currentOrg'])
|
...mapGetters(['currentOrg'])
|
||||||
},
|
},
|
||||||
|
@ -105,7 +105,7 @@ export default {
|
|||||||
component: Select2,
|
component: Select2,
|
||||||
el: {
|
el: {
|
||||||
multiple: false,
|
multiple: false,
|
||||||
options: this.$store.state.users.notRootWorkbenchOrgs?.map((item) => {
|
options: this.$store.state.users.noRootWorkbenchOrgs?.map((item) => {
|
||||||
return { label: item.name, value: item.id }
|
return { label: item.name, value: item.id }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -114,6 +114,15 @@ export default {
|
|||||||
fieldsMeta.apply_system_users.el.ajax.url = `/api/v1/assets/system-users/suggestions/?oid=${form['org_id']}&protocol__in=rdp,ssh,vnc,telnet`
|
fieldsMeta.apply_system_users.el.ajax.url = `/api/v1/assets/system-users/suggestions/?oid=${form['org_id']}&protocol__in=rdp,ssh,vnc,telnet`
|
||||||
fieldsMeta.apply_assets.el.ajax.url = `/api/v1/assets/assets/suggestions/?oid=${form['org_id']}`
|
fieldsMeta.apply_assets.el.ajax.url = `/api/v1/assets/assets/suggestions/?oid=${form['org_id']}`
|
||||||
fieldsMeta.apply_nodes.el.ajax.url = `/api/v1/assets/nodes/suggestions/?oid=${form['org_id']}`
|
fieldsMeta.apply_nodes.el.ajax.url = `/api/v1/assets/nodes/suggestions/?oid=${form['org_id']}`
|
||||||
|
},
|
||||||
|
on: {
|
||||||
|
change: ([event], updateForm) => {
|
||||||
|
updateForm({
|
||||||
|
apply_nodes: [],
|
||||||
|
apply_assets: [],
|
||||||
|
apply_system_users: []
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -135,7 +144,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
workbenchOrgs: state => state.users.notRootWorkbenchOrgs
|
workbenchOrgs: state => state.users.noRootWorkbenchOrgs
|
||||||
}),
|
}),
|
||||||
...mapGetters(['currentOrg'])
|
...mapGetters(['currentOrg'])
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user