mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-20 02:31:43 +00:00
fix: app relation api
This commit is contained in:
@@ -33,7 +33,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
name: 'AppList',
|
name: 'AppList',
|
||||||
url: `/api/v1/applications/accounts/?systemuser=${this.object.id}`,
|
url: `/api/v1/applications/system-users-apps-relations/?systemuser=${this.object.id}`,
|
||||||
columns: ['app_display', 'actions'],
|
columns: ['app_display', 'actions'],
|
||||||
columnsMeta: {
|
columnsMeta: {
|
||||||
app_display: {
|
app_display: {
|
||||||
@@ -68,7 +68,7 @@ export default {
|
|||||||
type: 'danger',
|
type: 'danger',
|
||||||
can: !this.$store.getters.currentOrgIsRoot,
|
can: !this.$store.getters.currentOrgIsRoot,
|
||||||
callback: (val) => {
|
callback: (val) => {
|
||||||
this.$axios.delete(`/api/v1/applications/accounts/${val.row.id}/`).then(() => {
|
this.$axios.delete(`/api/v1/applications/system-users-apps-relations/${val.row.id}/`).then(() => {
|
||||||
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
||||||
this.$refs.ListTable.reloadTable()
|
this.$refs.ListTable.reloadTable()
|
||||||
})
|
})
|
||||||
@@ -98,7 +98,7 @@ export default {
|
|||||||
showHasObjects: false,
|
showHasObjects: false,
|
||||||
performAdd: (items) => {
|
performAdd: (items) => {
|
||||||
const objectId = this.object.id
|
const objectId = this.object.id
|
||||||
const relationUrl = `/api/v1/applications/accounts/`
|
const relationUrl = `/api/v1/applications/system-users-apps-relations/`
|
||||||
const appsId = items.map(v => v.value)
|
const appsId = items.map(v => v.value)
|
||||||
const data = []
|
const data = []
|
||||||
for (const appId of appsId) {
|
for (const appId of appsId) {
|
||||||
|
Reference in New Issue
Block a user