diff --git a/public/theme/element-extra.css b/public/theme/element-extra.css index 63178e29f..04a457f1e 100644 --- a/public/theme/element-extra.css +++ b/public/theme/element-extra.css @@ -14,7 +14,7 @@ .el-button--text:hover { background-color: rgba(0, 0, 0, .05); } - + .el-button--success { background-color: success; border-color: success; @@ -200,15 +200,9 @@ td .el-button.el-button--mini { font-weight: 400; } -.el-select-dropdown.is-multiple .el-select-dropdown__item.selected { - color: #606266; - background-color: #ddd; - font-weight: 400; -} - -.el-select-dropdown__item.hover, .el-select-dropdown__item:hover { +.el-select-dropdown__item.hover { background-color: primary; - color: white!important; + color: white; } .el-select-dropdown__item.is-disabled:hover{ @@ -418,6 +412,15 @@ td .el-button.el-button--mini { .el-dialog .el-dialog__body { max-height: 90vh; overflow: auto; + padding: 30px; +} + +.el-dialog .el-dialog__body form { + padding-right: 20px; +} + +.el-dialog .el-dialog__footer { + padding: 10px 30px 30px; } .el-cascader { diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 07d1fb96a..dada9281d 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -1530,7 +1530,7 @@ "NoLicense": "暂无许可证", "Node": "节点", "Organization": { - "AllOrganization": "所有组织", + "AllOrganization": "组织列表", "OrganizationCreate": "创建组织", "OrganizationLists": "组织列表", "OrganizationDetail": "组织详情", diff --git a/src/layout/components/GenericDetailPage/index.vue b/src/layout/components/GenericDetailPage/index.vue index 33e65f5c9..f70de513b 100644 --- a/src/layout/components/GenericDetailPage/index.vue +++ b/src/layout/components/GenericDetailPage/index.vue @@ -197,6 +197,10 @@ export default { if (typeof route === 'string') { route = { name: route, params: {}} } + route = { + ...route, + query: this.$route.query || {} + } route.params.id = id this.$router.push(route) }, diff --git a/src/store/getters.js b/src/store/getters.js index f095f6bc6..6e491a8eb 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -7,7 +7,7 @@ const getters = { consoleOrgs: state => state.users.consoleOrgs, auditOrgs: state => state.users.auditOrgs, workbenchOrgs: state => state.users.workbenchOrgs, - notRootWorkbenchOrgs: state => state.users.notRootWorkbenchOrgs, + noRootWorkbenchOrgs: state => state.users.noRootWorkbenchOrgs, usingOrgs: state => state.users.usingOrgs, currentOrg: state => state.users.currentOrg, currentOrgIsDefault: state => state.users.currentOrg['is_default'], diff --git a/src/store/modules/users.js b/src/store/modules/users.js index 3878a3e32..3069a71cd 100644 --- a/src/store/modules/users.js +++ b/src/store/modules/users.js @@ -17,7 +17,7 @@ const getDefaultState = () => { auditOrgs: [], consoleOrgs: [], workbenchOrgs: [], - notRootWorkbenchOrgs: [], + noRootWorkbenchOrgs: [], usingOrgs: [], perms: [], MFAVerifyAt: null, @@ -43,7 +43,7 @@ const mutations = { state.perms = profile.perms state.consoleOrgs = profile['console_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' }) state.auditOrgs = profile['audit_orgs'] diff --git a/src/utils/common.js b/src/utils/common.js index 70e04abbf..4c260272c 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -155,8 +155,12 @@ export function formatDate(inputTime) { const uuidPattern = /[0-9a-zA-Z\-]{36}/ -export function hasUUID(s) { - return s.search(uuidPattern) !== -1 +export function hasUUID(path) { + const index = path.indexOf('?') + if (index !== -1) { + path = path.substring(0, index) + } + return path.search(uuidPattern) !== -1 } export function replaceUUID(s, n) { diff --git a/src/utils/org.js b/src/utils/org.js index 4eb18ba71..6cd0a5d3d 100644 --- a/src/utils/org.js +++ b/src/utils/org.js @@ -26,6 +26,10 @@ async function changeOrg(org) { path = _.trimEnd(path, '/') location.href = path } else { + const index = path.indexOf('?') + if (index !== -1) { + location.href = path.substring(0, index) + } setTimeout(() => location.reload(), 400) } } diff --git a/src/views/perms/components/PermissionFormActionField.vue b/src/views/perms/components/PermissionFormActionField.vue index 32c640c39..2598273b3 100644 --- a/src/views/perms/components/PermissionFormActionField.vue +++ b/src/views/perms/components/PermissionFormActionField.vue @@ -3,7 +3,7 @@ :data="iData" show-checkbox node-key="id" - :default-expand-all="false" + :default-expand-all="true" :default-checked-keys="value" :props="defaultProps" v-bind="$attrs" diff --git a/src/views/settings/Message/SelectDialog.vue b/src/views/settings/Message/SelectDialog.vue index 2964ff46b..706341665 100644 --- a/src/views/settings/Message/SelectDialog.vue +++ b/src/views/settings/Message/SelectDialog.vue @@ -2,8 +2,8 @@ { + options: this.$store.state.users.noRootWorkbenchOrgs?.map((item) => { 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_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: { ...mapState({ - workbenchOrgs: state => state.users.notRootWorkbenchOrgs + workbenchOrgs: state => state.users.noRootWorkbenchOrgs }), ...mapGetters(['currentOrg']) }, diff --git a/src/views/tickets/RequestAssetPerm/CreateUpdate.vue b/src/views/tickets/RequestAssetPerm/CreateUpdate.vue index e50244dc4..848481eae 100644 --- a/src/views/tickets/RequestAssetPerm/CreateUpdate.vue +++ b/src/views/tickets/RequestAssetPerm/CreateUpdate.vue @@ -105,7 +105,7 @@ export default { component: Select2, el: { 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 } }) }, @@ -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_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']}` + }, + on: { + change: ([event], updateForm) => { + updateForm({ + apply_nodes: [], + apply_assets: [], + apply_system_users: [] + }) + } } } }, @@ -135,7 +144,7 @@ export default { }, computed: { ...mapState({ - workbenchOrgs: state => state.users.notRootWorkbenchOrgs + workbenchOrgs: state => state.users.noRootWorkbenchOrgs }), ...mapGetters(['currentOrg']) },