chenmy пре 2 година
родитељ
комит
6fba0f6046
1 измењених фајлова са 36 додато и 35 уклоњено
  1. 36 35
      TEAMModelOS/ClientApp/src/common/BaseLayout.vue

+ 36 - 35
TEAMModelOS/ClientApp/src/common/BaseLayout.vue

@@ -170,44 +170,44 @@ export default {
     },
     getSystemLevel () {
       if (this.$store.state.userInfo.hasSchool) {
-        // let prodInfo = this.$store.state.user?.schoolProfile?.svcStatus || {}
-        // // console.log(this.$store.state.user, '版本')
-        // //如果没有购买服务则为基础版、标准版、专业版
-        // let serviceList = this.$GLOBAL.PROD_CODE().filter(item => item.type === 'service')
-        // let count = 0
-        // serviceList.forEach(item => {
-        //   if (prodInfo[item.code]) count++
-        // })
-        // if (count > 0) {
-        //   this.isPro = true
-        //   this.edition = 'pro'
-        //   this.systemLevel = this.$t('system.flagship')
-        // } else {
-        //   this.isPro = false
-        //   let s = this.$store.state?.user?.schoolProfile?.school_base
-        //   if (s && (s.size > 100 || s.scale > 0)) {
-        //     this.edition = 'standard'
-        //     this.systemLevel = this.$t('system.advanced')
-        //   } else {
-        //     this.edition = 'basic'
-        //     this.systemLevel = this.$t('system.basic')
-        //   }
-        // }
-
-        //版本判断 根据edition的值
-        console.log(this.$store.state.user)
-        let nowEdition = this.$store.state.user?.schoolProfile?.school_base
-        if (nowEdition.edition.record === 1) {
-          this.edition = 'basic'
-          this.systemLevel = this.$t('system.basic')
-        } else if (nowEdition.edition.record === 2) {
-          this.edition = 'standard'
-          this.systemLevel = this.$t('system.advanced')
-        } else if (nowEdition.edition.record === 3) {
+        let prodInfo = this.$store.state.user?.schoolProfile?.svcStatus || {}
+        // console.log(this.$store.state.user, '版本')
+        //如果没有购买服务则为基础版、标准版、专业版
+        let serviceList = this.$GLOBAL.PROD_CODE().filter(item => item.type === 'service')
+        let count = 0
+        serviceList.forEach(item => {
+          if (prodInfo[item.code]) count++
+        })
+        if (count > 0) {
           this.isPro = true
           this.edition = 'pro'
           this.systemLevel = this.$t('system.flagship')
+        } else {
+          this.isPro = false
+          let s = this.$store.state?.user?.schoolProfile?.school_base
+          if (s && (s.size > 100 || s.scale > 0)) {
+            this.edition = 'standard'
+            this.systemLevel = this.$t('system.advanced')
+          } else {
+            this.edition = 'basic'
+            this.systemLevel = this.$t('system.basic')
+          }
         }
+
+        //版本判断 根据edition的值
+        // console.log(this.$store.state.user)
+        // let nowEdition = this.$store.state.user?.schoolProfile?.school_base
+        // if (nowEdition.edition.record === 1) {
+        //   this.edition = 'basic'
+        //   this.systemLevel = this.$t('system.basic')
+        // } else if (nowEdition.edition.record === 2) {
+        //   this.edition = 'standard'
+        //   this.systemLevel = this.$t('system.advanced')
+        // } else if (nowEdition.edition.record === 3) {
+        //   this.isPro = true
+        //   this.edition = 'pro'
+        //   this.systemLevel = this.$t('system.flagship')
+        // }
         localStorage.setItem('edition', this.edition)
         this.hasAnalysisAuth = this.getAnalysisAuth()
       }
@@ -262,6 +262,7 @@ export default {
       let schoolProfile = JSON.parse(decodeURIComponent(localStorage.school_profile || '{}', "utf-8"))
       let schoolArt = schoolProfile.schoolShows?.find(item => item.code == schoolCode && item.status === 1 && item.type === 'art')
       this.isShowArtMenu = !!schoolArt
+      this.schoolVersion()
     },
     /* 切换学校回调 */
     onSchoolChange (val) {
@@ -271,6 +272,7 @@ export default {
     //判断学校版本是否过期
     schoolVersion () {
       let nowEdition = this.$store.state.user?.schoolProfile?.school_base
+      console.log(nowEdition, '版本内容!!!')
       this.versionsPast = nowEdition.edition.record !== nowEdition.edition.current ? false : true
     }
   },
@@ -1067,7 +1069,6 @@ export default {
       }
       this.isShowLogo = cloudSetting.logoStatus === 'open'
     }
-    this.schoolVersion()
   },
   mounted () {
     this.refreshArtAuth()