fix: app relation api

This commit is contained in:
feng626
2022-03-14 16:48:25 +08:00
committed by 老广
parent 085a18e217
commit 326868880e

View File

@@ -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) {