From 71f6ff079016ae42264c8614bfc4cd7cd8534916 Mon Sep 17 00:00:00 2001
From: "851673013@qq.com" <851673013@qq.com>
Date: Thu, 16 Jun 2022 10:29:32 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E8=B4=B9=E6=A0=87=E5=87=86=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/AlgorithmDeploymentUse.vue | 24 +++++-----
.../Algorithm/AlgorithmChargingStandard.vue | 45 ++++++++++++++++---
2 files changed, 52 insertions(+), 17 deletions(-)
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)
})