fix: 修复Default组织ID的问题

This commit is contained in:
Orange
2021-03-05 13:58:21 +08:00
committed by 老广
parent 5371faf019
commit 22904ba421
3 changed files with 7 additions and 4 deletions

View File

@@ -2,7 +2,7 @@ import { hasUUID, BASE_URL } from '@/utils/common'
import { getOrgDetail } from '@/api/orgs'
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'
function getPropOrg() {
@@ -59,5 +59,6 @@ async function changeOrg(orgId) {
export default {
hasCurrentOrgPermission,
changeOrg,
DEFAULT_ORG_ID,
change2PropOrg
}

View File

@@ -9,6 +9,7 @@
<script>
import { GenericCreateUpdatePage } from '@/layout/components'
import Select2 from '@/components/Select2'
import { DEFAULT_ORG_ID } from '@/utils/org'
import { getDaysFuture } from '@/utils/common'
import { Required } from '@/components/DataForm/rules'
export default {
@@ -150,7 +151,7 @@ export default {
multiple: true,
value: [],
ajax: {
url: `/api/v1/tickets/assignees/?org_id=DEFAULT`,
url: `/api/v1/tickets/assignees/?org_id=${DEFAULT_ORG_ID}`,
transformOption: (item) => {
return { label: item.name + '(' + item.username + ')', value: item.id }
}

View File

@@ -4,6 +4,7 @@
<script>
import { GenericCreateUpdatePage } from '@/layout/components'
import { DEFAULT_ORG_ID } from '@/utils/org'
import Select2 from '@/components/Select2'
import { getDaysFuture } from '@/utils/common'
import AssetPermissionFormActionField from '@/views/perms/AssetPermission/components/AssetPermissionFormActionField'
@@ -26,7 +27,7 @@ export default {
apply_date_start: date_start,
apply_actions: ['all', 'connect', 'updownload', 'upload_file', 'download_file']
},
org_id: 'DEFAULT',
org_id: DEFAULT_ORG_ID,
type: 'apply_asset'
},
fields: [
@@ -76,7 +77,7 @@ export default {
multiple: true,
value: [],
ajax: {
url: `/api/v1/tickets/assignees/?org_id=DEFAULT`,
url: `/api/v1/tickets/assignees/?org_id=${DEFAULT_ORG_ID}`,
transformOption: (item) => {
return { label: item.name + '(' + item.username + ')', value: item.id }
}