mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-20 02:31:43 +00:00
fix: 修复Default组织ID的问题
This commit is contained in:
@@ -2,7 +2,7 @@ import { hasUUID, BASE_URL } from '@/utils/common'
|
|||||||
import { getOrgDetail } from '@/api/orgs'
|
import { getOrgDetail } from '@/api/orgs'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
|
|
||||||
const DEFAULT_ORG_ID = '00000000-0000-0000-0000-000000000001'
|
export const DEFAULT_ORG_ID = '00000000-0000-0000-0000-000000000001'
|
||||||
// const ROOT_ORG_ID = '00000000-0000-0000-0000-000000000000'
|
// const ROOT_ORG_ID = '00000000-0000-0000-0000-000000000000'
|
||||||
|
|
||||||
function getPropOrg() {
|
function getPropOrg() {
|
||||||
@@ -59,5 +59,6 @@ async function changeOrg(orgId) {
|
|||||||
export default {
|
export default {
|
||||||
hasCurrentOrgPermission,
|
hasCurrentOrgPermission,
|
||||||
changeOrg,
|
changeOrg,
|
||||||
|
DEFAULT_ORG_ID,
|
||||||
change2PropOrg
|
change2PropOrg
|
||||||
}
|
}
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||||
import Select2 from '@/components/Select2'
|
import Select2 from '@/components/Select2'
|
||||||
|
import { DEFAULT_ORG_ID } from '@/utils/org'
|
||||||
import { getDaysFuture } from '@/utils/common'
|
import { getDaysFuture } from '@/utils/common'
|
||||||
import { Required } from '@/components/DataForm/rules'
|
import { Required } from '@/components/DataForm/rules'
|
||||||
export default {
|
export default {
|
||||||
@@ -150,7 +151,7 @@ export default {
|
|||||||
multiple: true,
|
multiple: true,
|
||||||
value: [],
|
value: [],
|
||||||
ajax: {
|
ajax: {
|
||||||
url: `/api/v1/tickets/assignees/?org_id=DEFAULT`,
|
url: `/api/v1/tickets/assignees/?org_id=${DEFAULT_ORG_ID}`,
|
||||||
transformOption: (item) => {
|
transformOption: (item) => {
|
||||||
return { label: item.name + '(' + item.username + ')', value: item.id }
|
return { label: item.name + '(' + item.username + ')', value: item.id }
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||||
|
import { DEFAULT_ORG_ID } from '@/utils/org'
|
||||||
import Select2 from '@/components/Select2'
|
import Select2 from '@/components/Select2'
|
||||||
import { getDaysFuture } from '@/utils/common'
|
import { getDaysFuture } from '@/utils/common'
|
||||||
import AssetPermissionFormActionField from '@/views/perms/AssetPermission/components/AssetPermissionFormActionField'
|
import AssetPermissionFormActionField from '@/views/perms/AssetPermission/components/AssetPermissionFormActionField'
|
||||||
@@ -26,7 +27,7 @@ export default {
|
|||||||
apply_date_start: date_start,
|
apply_date_start: date_start,
|
||||||
apply_actions: ['all', 'connect', 'updownload', 'upload_file', 'download_file']
|
apply_actions: ['all', 'connect', 'updownload', 'upload_file', 'download_file']
|
||||||
},
|
},
|
||||||
org_id: 'DEFAULT',
|
org_id: DEFAULT_ORG_ID,
|
||||||
type: 'apply_asset'
|
type: 'apply_asset'
|
||||||
},
|
},
|
||||||
fields: [
|
fields: [
|
||||||
@@ -76,7 +77,7 @@ export default {
|
|||||||
multiple: true,
|
multiple: true,
|
||||||
value: [],
|
value: [],
|
||||||
ajax: {
|
ajax: {
|
||||||
url: `/api/v1/tickets/assignees/?org_id=DEFAULT`,
|
url: `/api/v1/tickets/assignees/?org_id=${DEFAULT_ORG_ID}`,
|
||||||
transformOption: (item) => {
|
transformOption: (item) => {
|
||||||
return { label: item.name + '(' + item.username + ')', value: item.id }
|
return { label: item.name + '(' + item.username + ')', value: item.id }
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user