Browse Source

问题修改

zouxuan 1 year ago
parent
commit
039f309646
1 changed files with 7 additions and 3 deletions
  1. 7 3
      src/views/music-library/musicUtil.ts

+ 7 - 3
src/views/music-library/musicUtil.ts

@@ -1,3 +1,6 @@
+import {getMapValueByKey} from "@/utils/objectUtil";
+import {clientType,} from "@/utils/constant";
+
 export const getOwnerName = (musicSheetExtend: any, sourceType: string) => {
   let ownerName;
   if (musicSheetExtend?.userName) {
@@ -10,14 +13,15 @@ export const getOwnerName = (musicSheetExtend: any, sourceType: string) => {
   if (musicSheetExtend && musicSheetExtend.userName) {
     ownerName = musicSheetExtend.userName
     const appName = musicSheetExtend.applicationName;
-    const clientType = musicSheetExtend.clientType ? '-' + musicSheetExtend.clientType : '';
+    let typeName = getMapValueByKey(musicSheetExtend.clientType, new Map(Object.entries(clientType)));
+    typeName = typeName ? '-' + typeName : '';
     const organizationRole = musicSheetExtend.organizationRole ? '-' + musicSheetExtend.organizationRole : '';
     if (sourceType == 'ORG') {
       ownerName += ' (' + appName + organizationRole + ')'
     } else if (sourceType == 'PERSON') {
-      ownerName += ' (' + appName + clientType + ')'
+      ownerName += ' (' + appName + typeName + ')'
     } else if (sourceType == 'PLATFORM') {
-      ownerName += ' (' + appName + clientType + ')'
+      ownerName += ' (' + appName + typeName + ')'
     }
   }
   return ownerName;