cop-web/src/views/resource-apply/disk/index.vue

59 lines
1.8 KiB
Vue
Raw Normal View History

2024-03-14 03:36:22 +00:00
/**
* Created by HaijunZhang on 2019/4/28.
*/
<template>
<div>
<op :type="type" v-if="type == 'OPENSTACK'" @type="setType" :item-data="itemData" :disabled="disabled" ref="node"></op>
<huawei :type="type" v-if="type == 'HUAWEI'" @type="setType" :item-data="itemData" :disabled="disabled" ref="node"></huawei>
<tencent :type="type" v-if="type == 'TENCENT'" @type="setType" :item-data="itemData" :disabled="disabled" ref="node"></tencent>
<tce :type="type" v-if="type == 'TCE'" @type="setType" :item-data="itemData" :disabled="disabled" ref="node"></tce>
<ali :type="type" v-if="type == 'ALIYUN'" @type="setType" :item-data="itemData" :disabled="disabled" ref="node"></ali>
<aws :type="type" v-if="type == 'AWS'" @type="setType" :item-data="itemData" :disabled="disabled" ref="node"></aws>
<bingoCloudOS :type="type" v-if="type == 'BINGOCLOUDOS'" @type="setType" :item-data="itemData" :disabled="disabled" ref="node"></bingoCloudOS>
2024-03-14 03:36:22 +00:00
</div>
</template>
<script>
import ali from './ali.vue'
import huawei from './huawei.vue'
import tencent from './tencent.vue'
import tce from './tce.vue'
import op from './op.vue'
import aws from './aws.vue'
import bingoCloudOS from './bingoCloudOS.vue'
2024-03-14 03:36:22 +00:00
export default {
props: {
itemData: {
type: [Object, Boolean]
},
disabled: {
type: Boolean
}
},
components: { ali, op, huawei, tencent, aws, bingoCloudOS, tce },
2024-03-14 03:36:22 +00:00
data () {
return {
type: ''
}
},
created () {
if (!this.itemData) {
this.type = this.$route.params.type
} else {
this.type = this.itemData.location.vendorType
}
},
methods: {
setType (data) {
this.type = data
},
getApplyData () {
return this.$refs.node.getPostData()
}
}
}
</script>
<style scoped lang="scss">
</style>