From c038a6890f14fc168f36daa3dd4598585f2ec9e2 Mon Sep 17 00:00:00 2001 From: joshen Date: Sun, 9 Mar 2025 14:00:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=A2=E6=8E=88=E8=AE=B2=E5=B8=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useOrgName.js | 23 +++++++++++++++++ src/views/investigat/InvestigatPage.vue | 33 ++++++++++++++++++++++--- 2 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 src/hooks/useOrgName.js diff --git a/src/hooks/useOrgName.js b/src/hooks/useOrgName.js new file mode 100644 index 0000000..8793564 --- /dev/null +++ b/src/hooks/useOrgName.js @@ -0,0 +1,23 @@ +/**截取机构名称路径namePath最后两段,不包含第一个 */ +const useOrgName = (namePath) => { + let newName = namePath; + if (newName) { + let names = newName.split('/'); + let len = names.length; + //使用最后两们 + if (len > 1) { + newName = names[1]; + if (!newName) { + newName = names[0] + } + } + } + return newName; +}; + + + + +export { + useOrgName +} \ No newline at end of file diff --git a/src/views/investigat/InvestigatPage.vue b/src/views/investigat/InvestigatPage.vue index f0d66f8..13b27ca 100644 --- a/src/views/investigat/InvestigatPage.vue +++ b/src/views/investigat/InvestigatPage.vue @@ -223,7 +223,11 @@
您已完成评估 -
+ +
+ 将于{{ deadline }}秒后跳转到首页 +
+