diff --git a/front/src/views/capacityOnTheShelf/components/AlgorithmDeploymentUse.vue b/front/src/views/capacityOnTheShelf/components/AlgorithmDeploymentUse.vue index 2df46475..891261f5 100644 --- a/front/src/views/capacityOnTheShelf/components/AlgorithmDeploymentUse.vue +++ b/front/src/views/capacityOnTheShelf/components/AlgorithmDeploymentUse.vue @@ -85,12 +85,14 @@
计费标准 +
@@ -217,15 +219,15 @@ const question = ref('') const answer = ref('') const plainOptions = ['一次性买断', '按调用次数', '按并发路数', '按年计费'] - const limitNumber = (value) => { - if (typeof value === 'string') { - return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0 - } else if (typeof value === 'number') { - return !isNaN(value) ? String(value).replace(/\./g, '') : 0 - } else { - return 0 - } - } + // const limitNumber = (value) => { + // if (typeof value === 'string') { + // return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0 + // } else if (typeof value === 'number') { + // return !isNaN(value) ? String(value).replace(/\./g, '') : 0 + // } else { + // return 0 + // } + // } const add = () => { if (type.value.length > 0 && price.value > 0 && desc.value.length > 0) { data.value.freightBasis.push({ diff --git a/front/src/views/detailsAll/components/Algorithm/AlgorithmChargingStandard.vue b/front/src/views/detailsAll/components/Algorithm/AlgorithmChargingStandard.vue index 43cb9ebd..c21adfeb 100644 --- a/front/src/views/detailsAll/components/Algorithm/AlgorithmChargingStandard.vue +++ b/front/src/views/detailsAll/components/Algorithm/AlgorithmChargingStandard.vue @@ -60,12 +60,45 @@ obj.attrValue = JSON.parse(obj.attrValue) // dataFrom.value = obj obj.attrValue.map((item) => { - let params = { - title: item.type, - content: item.desc, - value: item.price, - time: '/年起', - unit: '¥', + let params = {} + switch (item.type) { + case '一次性买断': + params = { + title: item.type, + content: item.desc, + value: item.price, + time: '/元', + unit: '¥', + } + break + case '按调用次数': + params = { + title: item.type, + content: item.desc, + value: item.price, + time: '/次', + unit: '¥', + } + break + + case '按并发路数': + params = { + title: item.type, + content: item.desc, + value: item.price, + time: '/路', + unit: '¥', + } + break + case '按年计费': + params = { + title: item.type, + content: item.desc, + value: item.price, + time: '/年', + unit: '¥', + } + break } dataFrom.value.push(params) })