mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 22:36:23 +00:00
fix: 修复平台详情中更新协议,协议不能添加问题
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<script>
|
||||
import Dialog from '@/components/Dialog'
|
||||
import { GenericCreateUpdateForm } from '@/layout/components'
|
||||
import { platformFieldsMeta, setAutomations } from '../const'
|
||||
import { platformFieldsMeta } from '../const'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -56,9 +56,19 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setAutomations(this)
|
||||
try {
|
||||
this.setOptions()
|
||||
} finally {
|
||||
this.iVisible = true
|
||||
}
|
||||
},
|
||||
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() {
|
||||
this.iVisible = false
|
||||
}
|
||||
|
Reference in New Issue
Block a user