mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-26 15:07:04 +00:00
fix: 修复平台详情中更新协议,协议不能添加问题
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import Dialog from '@/components/Dialog'
|
import Dialog from '@/components/Dialog'
|
||||||
import { GenericCreateUpdateForm } from '@/layout/components'
|
import { GenericCreateUpdateForm } from '@/layout/components'
|
||||||
import { platformFieldsMeta, setAutomations } from '../const'
|
import { platformFieldsMeta } from '../const'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -56,9 +56,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
setAutomations(this)
|
try {
|
||||||
|
this.setOptions()
|
||||||
|
} finally {
|
||||||
|
this.iVisible = true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async setOptions() {
|
||||||
|
const { category, type } = this.object
|
||||||
|
const url = `/api/v1/assets/categories/constraints/?category=${category.value}&type=${type.value}`
|
||||||
|
const res = await this.$axios.get(url)
|
||||||
|
this.fieldsMeta.protocols.el.choices = res['protocols'] || []
|
||||||
|
},
|
||||||
submitSuccess() {
|
submitSuccess() {
|
||||||
this.iVisible = false
|
this.iVisible = false
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user