瀏覽代碼

名单模板多语系

liqk 4 年之前
父節點
當前提交
2d59b6c416

+ 0 - 2
TEAMModelOS/ClientApp/src/static/Global.js

@@ -5,7 +5,6 @@ import VueI18n from 'vue-i18n'
 const PRIVATE_SPACE = 1024 * 1024 * 1024 * 1 //教师Blob个人空间
 const SCHOOL_SPACE = 1024 * 1024 * 1024 * 10 //学校Blob空间
 const DEFAULT_SCHOOL_CODE = 'SYSTEM_NO_SCHOOL' //尚未归属学校的默认学校编码
-const BLOB_URL = 'https://teammodelstorage.blob.core.chinacloudapi.cn'  //(废弃) 大陆和国际站的host 不同,不能在这里统一获取,需要从登录信息里面获取
 
 //文件类型,对应内容模块Blob目录
 const CONTENT_TYPES = {
@@ -122,7 +121,6 @@ const GLOBAL = {
 	PRIVATE_SPACE,
 	SCHOOL_SPACE,
 	DEFAULT_SCHOOL_CODE,
-	BLOB_URL,
 	EXAM_TYPE,
 	EXERCISE_TYPES,
 	EXERCISE_DIFFS,

+ 19 - 3
TEAMModelOS/ClientApp/src/view/student-account/ImportStudent.vue

@@ -12,7 +12,7 @@
             </Upload>
             <p class="import-tips" style="margin-top:40px;">{{$t('stuAccount.importTips1')}}</p>
             <p class="import-tips">{{$t('stuAccount.importTips2') + $t('stuAccount.importTips3')}}</p>
-            <a style="margin-top:10px;color:turquoise;display:inline-block;" href="https://teammodelstorage.blob.core.chinacloudapi.cn/download/%E5%AD%A6%E7%94%9F%E5%90%8D%E5%8D%95%E6%A8%A1%E5%9D%97.xlsx">{{$t('stuAccount.downloadText')}}</a>
+            <span @click="downloadTemp" style="margin-top:10px;color:turquoise;display:inline-block;">{{$t('stuAccount.downloadText')}}</span>
         </div>
         <div class="form-body" style="background:none;" v-else>
             <div class="ivu-upload-list-file">
@@ -169,6 +169,22 @@ export default {
     watch: {
     },
     methods: {
+        //下载名单模板
+        downloadTemp() {
+            console.log(this.$i18n)
+            let lang = localStorage.getItem('local')
+            switch (lang) {
+                case 'zh-tw':
+                    window.location.href = 'https://teammodelstorage.blob.core.chinacloudapi.cn/download/%E5%AD%A6%E7%94%9F%E5%90%8D%E5%8D%95%E6%A8%A1%E6%9D%BF/%E5%AD%B8%E7%94%9F%E5%90%8D%E5%96%AE%E6%A8%A1%E6%9D%BF.xlsx'
+                    break
+                case 'en-us':
+                    window.location.href = 'https://teammodelstorage.blob.core.chinacloudapi.cn/download/%E5%AD%A6%E7%94%9F%E5%90%8D%E5%8D%95%E6%A8%A1%E6%9D%BF/Student%20List%20Template.xlsx'
+                    break
+                default:
+                    window.location.href = 'https://teammodelstorage.blob.core.chinacloudapi.cn/download/%E5%AD%A6%E7%94%9F%E5%90%8D%E5%8D%95%E6%A8%A1%E6%9D%BF/%E5%AD%A6%E7%94%9F%E5%90%8D%E5%8D%95%E6%A8%A1%E6%9D%BF.xlsx'
+                    break
+            }
+        },
         getSelectInfo() {
 
         },
@@ -428,7 +444,7 @@ export default {
                     title: this.$t('stuAccount.seatNo'),
                     key: 'no',
                     width: 80,
-                    align:'center'
+                    align: 'center'
                 },
                 {
                     title: this.$t('stuAccount.account'),
@@ -457,7 +473,7 @@ export default {
                 {
                     title: this.$t('stuAccount.classroomCode'),
                     key: 'classId',
-                    align:'center'
+                    align: 'center'
                 },
                 {
                     title: this.$t('stuAccount.abnormalStatus'),