From 1bf3dd6db80f0abd49647042e222ed3ea6304500 Mon Sep 17 00:00:00 2001 From: TangShan_DD Date: Tue, 28 May 2024 15:53:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20cloundTower=E4=BB=A3=E7=A0=81=E8=BF=81?= =?UTF-8?q?=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/filters/monitor.js | 2 + src/common/filters/personal.js | 1 + src/services/platform/index.js | 4 +- src/services/services/product.js | 7 + src/views/cosa/bills/list/OutSide.vue | 3 +- src/views/cosa/config/capacityHost.vue | 2 +- src/views/cosa/config/capacityVm.vue | 2 +- src/views/cosa/config/recycleResource.vue | 2 +- .../addWhitelist.vue | 187 +++++ .../CostOptimizationAllocation/checklist.vue | 237 ++++++ .../cost/CostOptimizationAllocation/index.vue | 32 + .../cost/CostOptimizationAllocation/rule.vue | 258 ++++++ .../CostOptimizationAllocation/whitelist.vue | 196 +++++ .../cost/CostOptimizationReport/CheckList.vue | 181 +++++ .../cost/CostOptimizationReport/index.vue | 130 +++ .../cosa/cost/GlobalResourceMonitoring.vue | 248 ++++++ src/views/cosa/cost/NewResourceReport.vue | 103 +++ src/views/cosa/cost/components/Block.js | 68 ++ src/views/cosa/cost/components/Block.scss | 9 + src/views/cosa/cost/components/TimeSelect.vue | 138 ++++ .../personal/apply/components/AddDiskCT.vue | 201 +++++ .../apply/components/attributeItem.vue | 14 +- .../components/CommonWrapper.vue | 16 +- .../resource-apply/components/RegionItem.vue | 7 +- src/views/resource-apply/data/EFCInit.js | 151 ++++ src/views/resource-apply/disk/cloudTower.vue | 292 +++++++ src/views/resource-apply/disk/index.vue | 5 +- src/views/resource-apply/ecs/EFCDataDisk.vue | 55 ++ src/views/resource-apply/ecs/EFCIppool.vue | 329 ++++++++ src/views/resource-apply/ecs/EFCVmList.vue | 763 ++++++++++++++++++ src/views/resource-apply/ecs/ImageItem.vue | 112 ++- .../ecs/cloudTower/DataDisk.vue | 177 ++++ .../resource-apply/ecs/cloudTower/index.vue | 303 +++++++ .../resource-apply/ecs/cloudTower/ippool.vue | 194 +++++ src/views/resource-apply/ecs/indexOld.vue | 76 ++ src/views/resource-apply/mixins/price.js | 6 + .../product/service_catalog/config.ts | 1 + vite.config.ts | 4 +- vue.config.js | 4 +- 39 files changed, 4477 insertions(+), 43 deletions(-) create mode 100644 src/views/cosa/cost/CostOptimizationAllocation/addWhitelist.vue create mode 100644 src/views/cosa/cost/CostOptimizationAllocation/checklist.vue create mode 100644 src/views/cosa/cost/CostOptimizationAllocation/index.vue create mode 100644 src/views/cosa/cost/CostOptimizationAllocation/rule.vue create mode 100644 src/views/cosa/cost/CostOptimizationAllocation/whitelist.vue create mode 100644 src/views/cosa/cost/CostOptimizationReport/CheckList.vue create mode 100644 src/views/cosa/cost/CostOptimizationReport/index.vue create mode 100644 src/views/cosa/cost/GlobalResourceMonitoring.vue create mode 100644 src/views/cosa/cost/NewResourceReport.vue create mode 100644 src/views/cosa/cost/components/Block.js create mode 100644 src/views/cosa/cost/components/Block.scss create mode 100644 src/views/cosa/cost/components/TimeSelect.vue create mode 100644 src/views/personal/apply/components/AddDiskCT.vue create mode 100644 src/views/resource-apply/data/EFCInit.js create mode 100644 src/views/resource-apply/disk/cloudTower.vue create mode 100644 src/views/resource-apply/ecs/EFCDataDisk.vue create mode 100644 src/views/resource-apply/ecs/EFCIppool.vue create mode 100644 src/views/resource-apply/ecs/EFCVmList.vue create mode 100644 src/views/resource-apply/ecs/cloudTower/DataDisk.vue create mode 100644 src/views/resource-apply/ecs/cloudTower/index.vue create mode 100644 src/views/resource-apply/ecs/cloudTower/ippool.vue create mode 100644 src/views/resource-apply/ecs/indexOld.vue diff --git a/src/common/filters/monitor.js b/src/common/filters/monitor.js index 5443662..4a5ac8b 100644 --- a/src/common/filters/monitor.js +++ b/src/common/filters/monitor.js @@ -39,6 +39,8 @@ export function resourceTypeMonitor(value) { MONITOR_OPENSTACK_HOST: 'OpenStack宿主机', MONITOR_OPENSTACK_VM: 'OpenStack云主机', MONITOR_OPENSTACK_SERVICE: 'OpenStack服务', + MONITOR_CLOUDTOWER_HOST: 'CloudTower宿主机', + MONITOR_CLOUDTOWER_VM: 'CloudTower云主机', MONITOR_FUSIONCLOUD_HOST: 'FUSIONCLOUD宿主机', MONITOR_FUSIONCLOUD_VM: 'FUSIONCLOUD云主机', MONITOR_MANAGEONE_HOST: 'ManageOne宿主机', diff --git a/src/common/filters/personal.js b/src/common/filters/personal.js index d672344..80635ef 100644 --- a/src/common/filters/personal.js +++ b/src/common/filters/personal.js @@ -179,6 +179,7 @@ export function categoryFilter(value) { ServiceSkuRevoke: '服务产品批量下架', ServiceSkuBatchRelease: '服务产品上架', ServiceSkuBatchRevoke: '服务产品批量下架', + EFCApplicationOperate: '服务使用申请', ApplicationOperate: '服务使用申请', AlterationOperate: '服务实例变更', ExtensionOperate: '服务实例延期', diff --git a/src/services/platform/index.js b/src/services/platform/index.js index 205da45..a9410a0 100644 --- a/src/services/platform/index.js +++ b/src/services/platform/index.js @@ -1835,7 +1835,9 @@ export function syncVm() { export function modifyVm(params) { return request.put(`${vmUrl}/${params.id}`, wrapperParams(params)) } - +export function modifyCloudTowerNetcard(params) { + return request.post(`${vmUrl}/updateVmNics`, params) +} export function removeVm(id) { const params = { id: id } return request.delete(`${vmUrl}/${id}`, params) diff --git a/src/services/services/product.js b/src/services/services/product.js index ef3a1bd..6a65801 100644 --- a/src/services/services/product.js +++ b/src/services/services/product.js @@ -51,3 +51,10 @@ export function unsubscribeService(params) { export function delayService(params) { return request.post('/cos/v1/resource/extension', wrapperParams(params)) } +export function modifyResourceEFC(params) { + return request.post('/cos/v1/resource/efc/alteration', wrapperParams({ workOrderTypeCode: 'CloudServerAlteration', ...params })) +} +// 服务退订 +export function unsubscribeServiceEFC(params) { + return request.post('/cos/v1/resource/efc/cancelation', wrapperParams({ workOrderTypeCode: 'CloudServerCancelation', ...params })) +} diff --git a/src/views/cosa/bills/list/OutSide.vue b/src/views/cosa/bills/list/OutSide.vue index 40ed8b4..36c5ea7 100644 --- a/src/views/cosa/bills/list/OutSide.vue +++ b/src/views/cosa/bills/list/OutSide.vue @@ -266,7 +266,8 @@ export default { conditionCloudVendor({ condition: JSON.stringify({ condition: 'listByTypes', - types: ['HUAWEI', 'ALIYUN'] + // types: ['HUAWEI', 'ALIYUN'] + types: ['OPENSTACK', 'VMWARE', 'CNWARE', 'EASYSTACK', 'ARCHEROS', 'CLOUDTOWER'] }) }).then((data) => { if (data.success) { diff --git a/src/views/cosa/config/capacityHost.vue b/src/views/cosa/config/capacityHost.vue index 8da4c04..f22ea08 100644 --- a/src/views/cosa/config/capacityHost.vue +++ b/src/views/cosa/config/capacityHost.vue @@ -514,7 +514,7 @@ export default { conditionCloudVendor({ condition: JSON.stringify({ condition: 'listByTypes', - types: ['OPENSTACK', 'VMWARE', 'MANAGEONE'] + types: ['OPENSTACK', 'VMWARE', 'INSPURRAIL', 'CNWARE', 'EASYSTACK', 'ARCHEROS', 'CLOUDTOWER', 'FUSIONSPHERE'] }) }).then((data) => { if (data.success) { diff --git a/src/views/cosa/config/capacityVm.vue b/src/views/cosa/config/capacityVm.vue index 505591e..a275ccf 100644 --- a/src/views/cosa/config/capacityVm.vue +++ b/src/views/cosa/config/capacityVm.vue @@ -509,7 +509,7 @@ export default { conditionCloudVendor({ condition: JSON.stringify({ condition: 'listByTypes', - types: ['OPENSTACK', 'VMWARE', 'MANAGEONE', 'TIANYI'] + types: ['OPENSTACK', 'VMWARE', 'INSPURRAIL', 'CECSTACK', 'CNWARE', 'EASYSTACK', 'ARCHEROS', 'CLOUDTOWER', 'FUSIONSPHERE'] }) }).then((data) => { if (data.success) { diff --git a/src/views/cosa/config/recycleResource.vue b/src/views/cosa/config/recycleResource.vue index 5fba594..106dabb 100644 --- a/src/views/cosa/config/recycleResource.vue +++ b/src/views/cosa/config/recycleResource.vue @@ -505,7 +505,7 @@ export default { conditionCloudVendor({ condition: JSON.stringify({ condition: 'listByTypes', - types: ['OPENSTACK', 'VMWARE', 'MANAGEONE', 'TIANYI'] + types: ['OPENSTACK', 'VMWARE', 'INSPURRAIL', 'CECSTACK', 'CNWARE', 'EASYSTACK', 'ARCHEROS', 'CLOUDTOWER', 'FUSIONSPHERE'] }) }).then((data) => { if (data.success) { diff --git a/src/views/cosa/cost/CostOptimizationAllocation/addWhitelist.vue b/src/views/cosa/cost/CostOptimizationAllocation/addWhitelist.vue new file mode 100644 index 0000000..8129435 --- /dev/null +++ b/src/views/cosa/cost/CostOptimizationAllocation/addWhitelist.vue @@ -0,0 +1,187 @@ + + + diff --git a/src/views/cosa/cost/CostOptimizationAllocation/checklist.vue b/src/views/cosa/cost/CostOptimizationAllocation/checklist.vue new file mode 100644 index 0000000..e658f90 --- /dev/null +++ b/src/views/cosa/cost/CostOptimizationAllocation/checklist.vue @@ -0,0 +1,237 @@ + + + diff --git a/src/views/cosa/cost/CostOptimizationAllocation/index.vue b/src/views/cosa/cost/CostOptimizationAllocation/index.vue new file mode 100644 index 0000000..853bc9d --- /dev/null +++ b/src/views/cosa/cost/CostOptimizationAllocation/index.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/views/cosa/cost/CostOptimizationAllocation/rule.vue b/src/views/cosa/cost/CostOptimizationAllocation/rule.vue new file mode 100644 index 0000000..6dae166 --- /dev/null +++ b/src/views/cosa/cost/CostOptimizationAllocation/rule.vue @@ -0,0 +1,258 @@ + + + diff --git a/src/views/cosa/cost/CostOptimizationAllocation/whitelist.vue b/src/views/cosa/cost/CostOptimizationAllocation/whitelist.vue new file mode 100644 index 0000000..f295040 --- /dev/null +++ b/src/views/cosa/cost/CostOptimizationAllocation/whitelist.vue @@ -0,0 +1,196 @@ + + + diff --git a/src/views/cosa/cost/CostOptimizationReport/CheckList.vue b/src/views/cosa/cost/CostOptimizationReport/CheckList.vue new file mode 100644 index 0000000..e199bdc --- /dev/null +++ b/src/views/cosa/cost/CostOptimizationReport/CheckList.vue @@ -0,0 +1,181 @@ + + + diff --git a/src/views/cosa/cost/CostOptimizationReport/index.vue b/src/views/cosa/cost/CostOptimizationReport/index.vue new file mode 100644 index 0000000..6f2506c --- /dev/null +++ b/src/views/cosa/cost/CostOptimizationReport/index.vue @@ -0,0 +1,130 @@ + + + + diff --git a/src/views/cosa/cost/GlobalResourceMonitoring.vue b/src/views/cosa/cost/GlobalResourceMonitoring.vue new file mode 100644 index 0000000..cb8e7f4 --- /dev/null +++ b/src/views/cosa/cost/GlobalResourceMonitoring.vue @@ -0,0 +1,248 @@ + + + + + diff --git a/src/views/cosa/cost/NewResourceReport.vue b/src/views/cosa/cost/NewResourceReport.vue new file mode 100644 index 0000000..75c386f --- /dev/null +++ b/src/views/cosa/cost/NewResourceReport.vue @@ -0,0 +1,103 @@ + + + + diff --git a/src/views/cosa/cost/components/Block.js b/src/views/cosa/cost/components/Block.js new file mode 100644 index 0000000..1d909c9 --- /dev/null +++ b/src/views/cosa/cost/components/Block.js @@ -0,0 +1,68 @@ +import Vue from 'vue' +let componentInstance, + MyComponent = null +export default { + data() {}, + beforeDestroy() { + if (componentInstance?.$destroy) { + componentInstance.$destroy() + } + MyComponent = null + componentInstance = null + }, + methods: { + CreateComponent(countData) { + return Vue.extend({ + data() { + return { + countData: countData + } + }, + render(h) { + return h( + 'el-row', + { + domProps: { + id: 'cus-block' + }, + props: { + gutter: 10 + }, + class: ['m-b'] + }, + this.countData.map((item) => + h( + 'el-col', + { + props: { + span: 6 + } + }, + [h('div', { class: ['text-center', 'item'] }, [h('div', item.name), h('div', item.value + item.unit)])] + ) + ) + ) + } + }) + }, + GeneratorBlockComponent(countData) { + if (!componentInstance) { + MyComponent = this.CreateComponent(countData) + // 现在,我们创建一个实例 + componentInstance = new MyComponent() + // 挂载实例到文档之外的元素上 + componentInstance.$mount() + } else { + componentInstance.countData = countData + } + this.insertComponent() + }, + insertComponent() { + // 找到需要插入新组件的DOM元素 + const referenceElement = document.getElementsByClassName('table-tools')[0] + if (!referenceElement) return + // 把Vue组件的DOM插入到找到的DOM元素之后 + referenceElement.parentNode.insertBefore(componentInstance.$el, referenceElement.nextSibling) + } + } +} diff --git a/src/views/cosa/cost/components/Block.scss b/src/views/cosa/cost/components/Block.scss new file mode 100644 index 0000000..917d6b2 --- /dev/null +++ b/src/views/cosa/cost/components/Block.scss @@ -0,0 +1,9 @@ +::v-deep #cus-block { + .item { + color: #fff; + background-color: #5a94ff; + font-size: 20px; + font-weight: 700; + padding: 10px 0; + } +} diff --git a/src/views/cosa/cost/components/TimeSelect.vue b/src/views/cosa/cost/components/TimeSelect.vue new file mode 100644 index 0000000..c0ed6c2 --- /dev/null +++ b/src/views/cosa/cost/components/TimeSelect.vue @@ -0,0 +1,138 @@ + + + + diff --git a/src/views/personal/apply/components/AddDiskCT.vue b/src/views/personal/apply/components/AddDiskCT.vue new file mode 100644 index 0000000..f366223 --- /dev/null +++ b/src/views/personal/apply/components/AddDiskCT.vue @@ -0,0 +1,201 @@ + + + + + diff --git a/src/views/personal/apply/components/attributeItem.vue b/src/views/personal/apply/components/attributeItem.vue index d880be3..fdb03f4 100644 --- a/src/views/personal/apply/components/attributeItem.vue +++ b/src/views/personal/apply/components/attributeItem.vue @@ -32,8 +32,8 @@ import UpgradePublicSpec from './UpgradePublicSpec.vue' import { defineComponent, ref } from '@vue/composition-api' import { componentMap } from './config' -function getApplicationComponent(service: string) { - if (service.includes('server')) { +function getApplicationComponent(service: string = '', workOrderTypeCode: string) { + if (service.includes('server') || workOrderTypeCode === 'CloudServerApplication') { return 'VmNode' } if (service.includes('volume')) { @@ -96,7 +96,10 @@ export default defineComponent({ function getAlterationComponent() { let { operation, preview, service } = itemData.value if (operation == 'AddDisk') { - return 'AddDisk' + if (operation === 'AddDisk') { + if (service === 'cloudtower.standard.server') return 'AddDiskCT' + return 'AddDisk' + } } if (operation == 'EditDisk') return 'EditDisk' if (operation == 'Upgrade' && (service == 'tencent.standard.server' || service == 'aliyun.standard.server' || service == 'aws.standard.server' || service == 'huawei.standard.server')) return 'UpgradePublicSpec' @@ -109,10 +112,11 @@ export default defineComponent({ } // 当前节点 const currentComponent = ref('') - const { service } = itemData.value + const { service, workOrderTypeCode } = itemData.value switch (ApplyCategory) { case 'ApplicationOperate': - currentComponent.value = getApplicationComponent(service) + case 'EFCApplicationOperate': + currentComponent.value = getApplicationComponent(service, workOrderTypeCode) break case 'UnsubscribeOperate': currentComponent.value = 'PreviewItem' diff --git a/src/views/resource-apply/components/CommonWrapper.vue b/src/views/resource-apply/components/CommonWrapper.vue index 966ec71..b7c0a79 100644 --- a/src/views/resource-apply/components/CommonWrapper.vue +++ b/src/views/resource-apply/components/CommonWrapper.vue @@ -206,7 +206,7 @@ export default { data.forEach((item) => { // 忽略此elements if (item.ignore) return - const { serviceCode, skuId, insAmount, elements, categoryId, categoryMap = {} } = item + const { serviceCode, skuId, insAmount, elements, categoryId, categoryMap = {}, skuList } = item // 如果存在子节点对子节点进行处理 if (elements) { const returnData = this.getSkuParams( @@ -233,6 +233,7 @@ export default { specs = [{ disk: insAmount }] break case 'smartx.standard.volume': + case 'cloudtower.standard.volume': if (item.name == '系统盘') { specs = [{ disk: insAmount }] result.props = { @@ -247,7 +248,7 @@ export default { default: specs = this.getSpec(item) } - if (item.name == '系统盘' && item.serviceCode == 'smartx.standard.volume') { + if (item.name == '系统盘' && item.serviceCode == 'cloudtower.standard.volume') { const arr = item.skuList.map((sku) => { return Number(sku.spec[0].specValue) }) @@ -257,6 +258,17 @@ export default { } result.specs = specs } + if (item.serviceCode === 'sangfor.standard.volume' && item.name === '系统盘') { + this.addData.configs.disks.forEach((diskItem, index) => { + const { + id, + spec: [{ specValue }] + } = skuList.find((sku) => sku.id === diskItem.size_mb) + this.$nextTick(() => { + diskItem.size_mb = specValue * 1024 + }) + }) + } params.push(result) }) return params diff --git a/src/views/resource-apply/components/RegionItem.vue b/src/views/resource-apply/components/RegionItem.vue index cded090..24b81dd 100644 --- a/src/views/resource-apply/components/RegionItem.vue +++ b/src/views/resource-apply/components/RegionItem.vue @@ -177,10 +177,13 @@ export default { }).then((data) => { if (data.success) { this.cacheAz = this.addData.location.az - const { vendorId, id, networkRelations } = data.data + const { vendorId, id, networkRelations, azUuid, groupId } = data.data this.addData.location.vendorId = vendorId this.addData.location.poolGroupId = id - if (this.addData.location.vendorType == 'VMWARE' || this.addData.location.vendorType == 'SMARTX' || this.addData.location.vendorType == 'FUSIONSPHERE') this.addData.networkRelations = networkRelations + this.addData.location.azUuid = azUuid + this.addData.location.groupUuid = groupId + if (['VMWARE', 'SANGFOR', 'CLOUDTOWER', 'CNWARE'].includes(this.addData.location.vendorType)) this.addData.networkRelations = networkRelations + // if (hasNsx) this.$set(this.addData.location, 'hasNsx', hasNsx) this.$emit('changeVendorId', vendorId, az) } else { diff --git a/src/views/resource-apply/data/EFCInit.js b/src/views/resource-apply/data/EFCInit.js new file mode 100644 index 0000000..6c517ea --- /dev/null +++ b/src/views/resource-apply/data/EFCInit.js @@ -0,0 +1,151 @@ +import { cloneDeep } from 'lodash-es' +import { nanoid } from 'nanoid' +export const GEN_UUID = () => nanoid(8) +const defaultCpu = 1 +const defaultMemory = 1 +const defaultSysDisk = 50 + +export const subApplicationParam = { + taskGroupUuid: GEN_UUID(), + taskTargetUuid: GEN_UUID(), + networkRelations: [], + imageData: {}, + osList: [], + versionList: [], + subLocation: { + region: '', + az: '', + vendorId: '', + poolGroupId: '', + vendorType: '', + purpose: '', + remark: '', + resourceLabel: [] + }, + emption: { + duration: { + mode: 'Hour', + amount: 1 + }, + count: 1 + }, + configs: { + // 云主机信息相关 + name: '', + nameRuleId: '', + vmHostName: '', + password: '', + confirm_password: '', + + // 镜像相关 + osCategory: '', + osVersion: '', + imageId: '', + templateDisk: '', // 前端用 + + // 规格相关 + categoryId: '', + cpu: defaultCpu, + memory: defaultMemory, + + // 系统盘 + sysDisk: { + categoryId: '', + disk: defaultSysDisk + }, + // 数据盘 + addDiskList: [], + + // 网卡相关 + networkCardConfigs: [ + { + networkCardId: '', + ipPolicy: 'Manual', + ipPoolId: '', + ipPoolName: '', + portGroupId: '', + address: [], + mask: '', + gateway: '', + dns: '' + } + ] + }, + elements: [ + { + isLoadData: true, + serviceCode: '', + categoryId: '', + category: '', + specs: [ + { + cpu: defaultCpu + }, + { + memory: defaultMemory + } + ], + serviceItem: {} + }, + { + isLoadData: true, + serviceCode: '', + categoryId: '', + category: '', + specs: [ + { + disk: defaultSysDisk + } + ], + serviceItem: {} + } + ], + service: '' +} +export const addNew = { + workOrderTypeCode: 'CloudServerApplication', // 工单类型编号 + location: { + name: '', + businessId: '', + businessName: '', + projectId: '', + projectName: '', + creatorId: '', + creatorName: '', + menderId: '', + menderName: '', + ownerId: '', + ownerName: '', + tenantId: '', + remark: '' + }, + subApplicationParams: [cloneDeep(subApplicationParam)], + tasks: [] +} +export const defaultTask = { + sceneId: '', + templateId: '', + taskGroupUuid: '', + taskName: '', + taskCode: 'standard' +} +export const ServiceCodeMap = { + server: { + VMWARE: 'vmware.standard.server', + CNWARE: 'cnware.standard.server', + ZSTACK: 'zstack.standard.server', + CLOUDTOWER: 'cloudtower.standard.server', + SANGFOR: 'sangfor.standard.server', + CECSTACK: 'cecstack.standard.server', + INSPURRAIL: 'inspurrail.standard.server' + }, + disk: { + VMWARE: 'vmware.storage.disk', + CNWARE: 'cnware.standard.volume', + ZSTACK: 'zstack.storage.disk', + CLOUDTOWER: 'cloudtower.standard.volume', + SANGFOR: 'sangfor.storage.disk', + CECSTACK: 'cecstack.standard.volume', + INSPURRAIL: 'inspurrail.standard.volume' + } +} diff --git a/src/views/resource-apply/disk/cloudTower.vue b/src/views/resource-apply/disk/cloudTower.vue new file mode 100644 index 0000000..cf967ed --- /dev/null +++ b/src/views/resource-apply/disk/cloudTower.vue @@ -0,0 +1,292 @@ +/** * Created by HaijunZhang on 2019/4/28. */ + + + + + diff --git a/src/views/resource-apply/disk/index.vue b/src/views/resource-apply/disk/index.vue index 41bdd61..2d2f1f9 100644 --- a/src/views/resource-apply/disk/index.vue +++ b/src/views/resource-apply/disk/index.vue @@ -11,6 +11,7 @@ + @@ -25,6 +26,8 @@ import aws from './aws.vue' import azure from './azure.vue' import smart from './smart.vue' import fusionSphere from './fusionSphere.vue' +import cloudTower from './cloudTower.vue' + export default { props: { itemData: { @@ -34,7 +37,7 @@ export default { type: Boolean } }, - components: { ali, op, huawei, tencent, aws, tce, azure, smart, fusionSphere, easyStack }, + components: { ali, op, huawei, tencent, aws, tce, azure, smart, fusionSphere, easyStack, cloudTower }, data() { return { type: '' diff --git a/src/views/resource-apply/ecs/EFCDataDisk.vue b/src/views/resource-apply/ecs/EFCDataDisk.vue new file mode 100644 index 0000000..bf6dbee --- /dev/null +++ b/src/views/resource-apply/ecs/EFCDataDisk.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/resource-apply/ecs/EFCIppool.vue b/src/views/resource-apply/ecs/EFCIppool.vue new file mode 100644 index 0000000..e9acc0b --- /dev/null +++ b/src/views/resource-apply/ecs/EFCIppool.vue @@ -0,0 +1,329 @@ + + diff --git a/src/views/resource-apply/ecs/EFCVmList.vue b/src/views/resource-apply/ecs/EFCVmList.vue new file mode 100644 index 0000000..54e0c01 --- /dev/null +++ b/src/views/resource-apply/ecs/EFCVmList.vue @@ -0,0 +1,763 @@ + + + + + diff --git a/src/views/resource-apply/ecs/ImageItem.vue b/src/views/resource-apply/ecs/ImageItem.vue index 1ce4db9..50b2170 100644 --- a/src/views/resource-apply/ecs/ImageItem.vue +++ b/src/views/resource-apply/ecs/ImageItem.vue @@ -13,7 +13,26 @@ + diff --git a/src/views/resource-apply/ecs/cloudTower/index.vue b/src/views/resource-apply/ecs/cloudTower/index.vue new file mode 100644 index 0000000..3dcd103 --- /dev/null +++ b/src/views/resource-apply/ecs/cloudTower/index.vue @@ -0,0 +1,303 @@ + + + + + diff --git a/src/views/resource-apply/ecs/cloudTower/ippool.vue b/src/views/resource-apply/ecs/cloudTower/ippool.vue new file mode 100644 index 0000000..09f9ff9 --- /dev/null +++ b/src/views/resource-apply/ecs/cloudTower/ippool.vue @@ -0,0 +1,194 @@ + + + diff --git a/src/views/resource-apply/ecs/indexOld.vue b/src/views/resource-apply/ecs/indexOld.vue new file mode 100644 index 0000000..0bd90d0 --- /dev/null +++ b/src/views/resource-apply/ecs/indexOld.vue @@ -0,0 +1,76 @@ +/** * Created by HaijunZhang on 2019/4/28. */ + + + + + diff --git a/src/views/resource-apply/mixins/price.js b/src/views/resource-apply/mixins/price.js index c2d6009..53cddf3 100644 --- a/src/views/resource-apply/mixins/price.js +++ b/src/views/resource-apply/mixins/price.js @@ -76,6 +76,12 @@ export default { } = this.addData // 代码容错处理 if (!sku && !serviceItem) return 0 + if (['cloudtower.standard.volume', 'cnware.standard.volume'].includes(serviceCode) && item.name === '系统盘') { + // cloudtower/cnware 系统盘根据基础定价来计算 + const basicPrice = JSON.parse(skuList[0]?.basicPrice || '[]') + if (insAmount === 1) return 0 + return basicPrice[0].monthPrice * insAmount + } const price = getPrice(sku || serviceItem, mode) // 集群部署多个实例 const { nodes = 1 } = this.addData diff --git a/src/views/service_operate/product/service_catalog/config.ts b/src/views/service_operate/product/service_catalog/config.ts index 753ab7f..ba2d2fc 100644 --- a/src/views/service_operate/product/service_catalog/config.ts +++ b/src/views/service_operate/product/service_catalog/config.ts @@ -9,6 +9,7 @@ export const statusList = [ } ] export const flowConfig = [ + { category: 'EFCApplicationOperate', flowId: null }, { category: 'ApplicationOperate', flowId: null }, { category: 'AlterationOperate', flowId: null }, { category: 'ExtensionOperate', flowId: null }, diff --git a/vite.config.ts b/vite.config.ts index 74b33df..07cca55 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,8 +7,8 @@ function resolve(dir) { return path.join(__dirname, dir) } -const httpType = 'http://' -const proxyUrl = '23.33.3.3:60006/' // 代理地址设置 +const httpType = 'https://' +const proxyUrl = '23.33.3.22:60006/' // 代理地址设置 export default defineConfig({ resolve: { diff --git a/vue.config.js b/vue.config.js index 948c603..26ed55c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -9,8 +9,8 @@ const CompressPlugin = require('compress-webpack-plugin') function resolve(dir) { return path.join(__dirname, dir) } -const httpType = 'http://' -const proxyUrl = '23.33.3.3:60006/' // 代理地址设置 +const httpType = 'https://' +const proxyUrl = '23.33.3.22:60006/' // 代理地址设置 // const proxyUrl = '10.20.51.92:7001' // 代理地址设置 // const proxyUrl = '10.10.2.60:50006/' 苏州代理地址 module.exports = {