Browse Source

Merge branch 'develop5.0-tmd' of http://106.12.23.251:10000/TEAMMODEL/TEAMModelOS into develop5.0-tmd

XW 3 years ago
parent
commit
1dfa066949
1 changed files with 9 additions and 4 deletions
  1. 9 4
      TEAMModelOS/ClientApp/src/view/abilityMgmt/Index.vue

+ 9 - 4
TEAMModelOS/ClientApp/src/view/abilityMgmt/Index.vue

@@ -1604,14 +1604,15 @@
 						this.$Message.warning(this.$t('syllabus.noPreview'))
 						break;
 					case 'doc':
+					    let userProfile2 = JSON.parse(decodeURIComponent(localStorage.user_profile, "utf-8"))
 						let copyLink = JSON.parse(JSON.stringify(item.link))
-						let docSas = '?' + this.$store.state.user.osblob_sas
+						let docSas = '?' + userProfile2.osblob_sas
 						// if (item.code !== this.curTeammodelId) {
 						// 	docSas = await this.$evTools.getBlobPrivateSas(item.code)
 						// } else {
 						// 	docSas = sasObj.sas
 						// }
-						let fullLink = this.$store.state.user.osblob_uri  + item.link + docSas
+						let fullLink = userProfile2.osblob_uri  + item.link + docSas
 						console.log(fullLink)
 						if (this.getSuffix(item.title) === 'pdf') {
 							this.openPdf(fullLink, item.title)
@@ -1622,15 +1623,16 @@
 						}
 						break;
 					default:
+						let userProfile = JSON.parse(decodeURIComponent(localStorage.user_profile, "utf-8"))
 						let fileTmdId = item.code.replace('Item-', '')
-						let sas = '?' + this.$store.state.user.osblob_sas
+						let sas = '?' + userProfile.osblob_sas
 						// if (fileTmdId !== this.curTeammodelId) {
 						// 	sas = '?' + this.$store.state.user.osblob_sas
 						// } else {
 						// 	sas = sasObj.sas
 						// }
 						this.previewFile = JSON.parse(JSON.stringify(item))
-						this.previewFile.link = this.$store.state.user.osblob_uri  + item.link + sas
+						this.previewFile.link = userProfile.osblob_uri  + item.link + sas
 						this.previewStatus = true
 						break;
 				}
@@ -1879,6 +1881,9 @@
 			inSchoolAbility(){
 				return this.$route.name === 'abilityMgmt'
 			},
+			isAreaAbility(){
+				return this.$route.name === 'areaAbilityMgmt'
+			}
 		},
 		watch: {
 			volumeList: {