diff options
author | 2022-09-08 15:32:27 +0800 | |
---|---|---|
committer | 2022-09-08 15:32:27 +0800 | |
commit | 7bdeb7cc89a8d60e4c3199f1922a6bf73a9d83c1 (patch) | |
tree | bfa45c3c2e02f3f07d760065654d5c3af7ae52c2 /usecaseui-portal/src/app/shared/utils/utils.ts | |
parent | a6d5ef22e8874a33fbee58ec6813be4299b04d67 (diff) |
Intent analysis frontend
Issue-ID: USECASEUI-711
Signed-off-by: zoulingli128 <zll_1208@126.com>
Change-Id: I8f8636f6b47c5ba25e6f342c484fd8ffb5ed1d6d
Diffstat (limited to 'usecaseui-portal/src/app/shared/utils/utils.ts')
-rw-r--r-- | usecaseui-portal/src/app/shared/utils/utils.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/shared/utils/utils.ts b/usecaseui-portal/src/app/shared/utils/utils.ts index a8fdd76f..c3f38e52 100644 --- a/usecaseui-portal/src/app/shared/utils/utils.ts +++ b/usecaseui-portal/src/app/shared/utils/utils.ts @@ -134,4 +134,18 @@ export class Util { intersection(inputs: any[]) : any[]{ return inputs.reduce((a, b) => a.filter(c => b.includes(c))) } + + getUuid() { + let s = [] + let hexDigits = '0123456789abcdef' + for (let i = 0; i < 36; i++) { + let _temp=Math.floor(Math.random() * 0x10) + s[i] = hexDigits.substring(_temp, _temp + 1) + } + s[14] = '4' + let _temp2=(s[19] & 0x3) | 0x8 + s[19] = hexDigits.substring(_temp2, _temp2 + 1) + s[8] = s[13] = s[18] = s[23] = '-' + return s.join('') + } }
\ No newline at end of file |