fix: 修复资产更多信息更新失败的问题

This commit is contained in:
Orange
2021-04-06 11:31:51 +08:00
committed by 老广
parent 3bb6549d75
commit 45d294ac93

View File

@@ -1,5 +1,5 @@
<template>
<GenericCreateUpdatePage v-bind="$data" />
<GenericCreateUpdatePage v-bind="$data" :perform-submit="performSubmit" />
</template>
<script>
@@ -94,6 +94,19 @@ export default {
updateSuccessNextRoute: { name: 'AssetList' },
createSuccessNextRoute: { name: 'AssetList' }
}
},
methods: {
getUrl() {
const params = this.$route.params
let url = this.url
if (params.id) {
url = `${url}${params.id}/`
}
return url
},
performSubmit(validValues) {
return this.$axios['patch'](this.getUrl(), validValues)
}
}
}
</script>