From 86faa6878b7fa515649bcbfc276db937ee8b6427 Mon Sep 17 00:00:00 2001 From: haha Date: Sat, 17 Aug 2024 23:06:31 +0800 Subject: [PATCH] update code --- src/utils/index.ts | 8 ++ src/views/manage/calculate/edit.vue | 95 +++++++------------- src/views/manage/calculate/view.vue | 92 ++++++++----------- src/views/manage/calculateParam/dialog.vue | 52 ++++------- src/views/manage/datas/add.vue | 98 ++++++--------------- src/views/manage/equipment/addPcie.vue | 45 +++------- src/views/manage/equipment/index.vue | 65 +++----------- src/views/simulationEvaluation/addStep3.vue | 6 ++ 8 files changed, 147 insertions(+), 314 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 44bb588..348f7a9 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -39,3 +39,11 @@ export function isExternal(path: string) { const isExternal = /^(https?:|http?:|mailto:|tel:)/.test(path); return isExternal; } + +export function toJson(d:any){ + try { + return JSON.parse(d); + } catch (e) { + return {}; + } +} \ No newline at end of file diff --git a/src/views/manage/calculate/edit.vue b/src/views/manage/calculate/edit.vue index d7696d2..cf1cc19 100644 --- a/src/views/manage/calculate/edit.vue +++ b/src/views/manage/calculate/edit.vue @@ -3,78 +3,41 @@
-