Browse Source

Merge branch 'develop6.0-tmd' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop6.0-tmd

CrazyIter_Bin 3 years ago
parent
commit
d45b1ac81a

+ 2 - 2
TEAMModelOS/ClientApp/src/common/BaseUpload.vue

@@ -110,7 +110,7 @@
 								blobFile.duration = await this.$tools.getVideoDuration(file)
 							}
 							if (blobFile.type === 'video' && blobFile.extension.toLowerCase() !== 'mp4') {
-								this.$Message.warning(blobFile.name + '资源暂不支持播放')
+								this.$Message.warning(blobFile.name + this.$t('syllabus.playFailTip'))
 							}
 							let fileMD5 = await this.$tools.getFileMD5(file)
 							blobFile.hash = this.$tools.convertFileMD5ToString(fileMD5)
@@ -126,7 +126,7 @@
 				Promise.all(promiseArr).then(result => {
 					this.$emit('uploadFinish',result)
 				}).catch(e => {
-					this.$Message.error('上传失败!')
+					this.$Message.error('upload Fail!')
 				}).finally(() => {
 					this.fileArr = []
 					this.progressArr = []

+ 1 - 1
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventList.vue

@@ -101,7 +101,7 @@
                                 </p>
                                 <p style="font-size:12px; margin-top: 5px;">
                                     <span style="border: 1px solid #c4937b; padding: 0 5px; border-radius: 3px; color: #c4937b;" v-if="item.source">
-                                        {{ item.source === '0' ? "线上评测" : (item.source === '1' ? "课中评测" : "阅卷评测")}}
+                                        {{ item.source === '0' ? $t("studentWeb.exam.source.evMode1") : (item.source === '1' ? $t("studentWeb.exam.source.evMode3") : $t("studentWeb.exam.source.evMode2"))}}
                                     </span>
                                     
                                 </p>

+ 5 - 0
TEAMModelOS/ClientApp/src/locale/lang/en-US/studentWeb.js

@@ -560,6 +560,11 @@ export default {
         delOk: "Delete",
         delCancel: "Cancel",
         examError: "There is an issue with the exam file, it cannot be opened properly",
+        source: {
+            evMode1: '線上評量',
+            evMode2: '課中評量',
+            evMode3: '閱卷評量',
+        },
     },
     queNaire: {
         submitSuccess: 'Submitted successfully',

+ 144 - 140
TEAMModelOS/ClientApp/src/locale/lang/en-US/syllabus.js

@@ -1,141 +1,145 @@
-export default{
-	shareSyllabus:'分享個人課綱',
-	chooseShareChapter:'選擇分享的章節',
-	allShare:'整冊分享',
-	chooseTeacher:'選擇分享的教師',
-	saveSyllabus:'收藏分享課綱',
-	chooseSaveSyllabus:'選擇要收藏的章節',
-	allSave:'整冊收藏',
-	chooseSavePos:'選擇收藏位置',
-	pos1:'已有冊別',
-	pos2:'新建冊別',
-	chooseVolume:'選擇一個冊別',
-	newVolume:'輸入新冊別名稱',
-	confirmSave:'確認收藏',
-	save:'收藏',
-	ignore:'忽略',
-	delTip1:'冊別已被分享者',
-	download:'Download',
-	orderUpdateTip:'Book order has been updated',
-	noSaveShare:'This topic has not been saved yet. Please save it before operation!',
-	noShareMyself:'Cannot share to yourself',
-	copyChapter:'copy Chapter',
-	ignoreChapter:'ignore Chapter',
-	from:'From',
-	share:'Share',
-	noPreview:'This type of file does not support preview!',
-	praviteSyllabus:'Personal Syllabus',
-	fromCreate:'Syllabus I created',
-	fromShare:'Syllabus shared by others',
-	btnSave:'Save Changes',
-	volumeList:'Book List',
-	search:'Search',
-	edit:'Edit',
-	delete:'Delete',
-	add:'Create Book',
-	place1:'Enter Book Name...',
-	isDel:'No longer valid',
-	deleteDelV:'Delete Invalid Book',
-	syllabusMenu:'Syllabus Outline',
-	relate:'Related Resources',
-	addResource:'Add Resource',
-	type1:'Material',
-	type2:'Test Question',
-	type3:'Exam File',
-	type4:'Local File',
-	type5:'Hyperlink',
-	preview:'View',
-	remove:'Delete',
-	upload:'Upload Local File',
-	editVolume:'Edit Book',
-	addVolume:'Add Book',
-	grade:'Grade',
-	semester:'Semester',
-	name:'Name', 
-	canEdit:'Co-editable',
-	authorsTitle:'Authorized Teacher',
-	noAuth:'No authorized Teacher information yet',
-	authors:'Authorized Teacher (multiple choice)',
-	latestId:'Last Modified by',
-	latestTime:'Last modified time',
-	place4:'Select the teacher authorized to manage the book...',
-	place2:'Not required, default consists of grade + subject + semester...',
-	place3:'Enter Book Name',
-	confirm:'Confirm',
-	addLink:'Add Hyperlink',
-	linkName:'Hyperlink Name',
-	linkUrl:'Hyperlink Address',
-	chooseCoTeacher:'Select co-editing teacher',
-	chooseShareTeacher:'Select who to share with',
-	score:'Allocated Point',
-	count:'Quetsion Number',
-	deleteVolume:'Delete Book',
-	deleteConfirm:'Are you sure to delete this book?',
-	deleteIsDelConfirm:'Are you sure to delete this invalid book?',
-	deleteSuc:'Delete successfully',
-	deleteFail:'Failed to delete',
-	isDelTip:'This book has been removed by the creator',
-	uploadSuc:'Upload successfully',
-	tip:'Reminder',
-	copyTip1:'Exam file name',
-	copyTip2:'Exam file name already exists in the school exam file bank, do you want to overwrite it?',
-	removeConfirm:'Are you sure to remove this resource?',
-	doSuc:'Operate successfully',
-	saveFailTip:'Failed to save',
-	isExistVolume:'The same book name already exists',
-	unSaveTip:'You have not saved the changes, are you sure to leave?',
-    tree:{
-		hasResource:'Related Resource',
-		hasCoEdit:'With co-editing authorization',
-		edit:'Edit',
-		add:'Add',
-		remove:'Delete',
-		coEdit:'Co-editing the topic',
-		share:'Share the topic',
-		editTitle:'Edit Topic',
-		addTitle:'Add Topic',
-		parent:'Created Under',
-		nodeName:'Topic Name',
-		addChapterTitle:'Add Topic',
-		chapterName:'Topic Name',
-		place1:'Please enter topic name...',
-		confirm:'Confirm',
-		removeTitle:'Delete Topic',
-		removeConfirm:'Are you sure to delete the topic?',
-		cancel:'Cancel',
-		removeSucTip:'Delete successfully',
-		nodeNameTip:'Topic name cannot be empty',
-		editSucTip:'Edit successfully',
-		addSucTip:'Add successfully',
-		copyNode:'Copy Topic',
-		curChapter:'Current Topic',
-		targetV:'Target Book',
-		ignoreTip:'Are you sure to ignore the topic?',
-		noVTip:'Please create your personal syllabus first!',
-		hasItemTip:'The topic has information on the associated question/exam file, do you need to synchronize to your personal question/exam file bank?',
-		okText:'Synchronize and copy',
-		cancelText:'No need',
-		copySuc:'Copy successfully',
-		nodeCountTip:'You can only create up to 3 levels of topics under each book!'
+export default {
+	emptyTip: '空目錄冊別無法進行分享!',
+	chooseChapterTip: '請先選擇需要收藏的章節!',
+	chooseVolumeTip: '請選擇已創建的冊別或者新建冊別!',
+	playFailTip: '資源暫不支持播放',
+	shareSyllabus: '分享個人課綱',
+	chooseShareChapter: '選擇分享的章節',
+	allShare: '整冊分享',
+	chooseTeacher: '選擇分享的教師',
+	saveSyllabus: '收藏分享課綱',
+	chooseSaveSyllabus: '選擇要收藏的章節',
+	allSave: '整冊收藏',
+	chooseSavePos: '選擇收藏位置',
+	pos1: '已有冊別',
+	pos2: '新建冊別',
+	chooseVolume: '選擇一個冊別',
+	newVolume: '輸入新冊別名稱',
+	confirmSave: '確認收藏',
+	save: '收藏',
+	ignore: '忽略',
+	delTip1: '冊別已被分享者',
+	download: 'Download',
+	orderUpdateTip: 'Book order has been updated',
+	noSaveShare: 'This topic has not been saved yet. Please save it before operation!',
+	noShareMyself: 'Cannot share to yourself',
+	copyChapter: 'copy Chapter',
+	ignoreChapter: 'ignore Chapter',
+	from: 'From',
+	share: 'Share',
+	noPreview: 'This type of file does not support preview!',
+	praviteSyllabus: 'Personal Syllabus',
+	fromCreate: 'Syllabus I created',
+	fromShare: 'Syllabus shared by others',
+	btnSave: 'Save Changes',
+	volumeList: 'Book List',
+	search: 'Search',
+	edit: 'Edit',
+	delete: 'Delete',
+	add: 'Create Book',
+	place1: 'Enter Book Name...',
+	isDel: 'No longer valid',
+	deleteDelV: 'Delete Invalid Book',
+	syllabusMenu: 'Syllabus Outline',
+	relate: 'Related Resources',
+	addResource: 'Add Resource',
+	type1: 'Material',
+	type2: 'Test Question',
+	type3: 'Exam File',
+	type4: 'Local File',
+	type5: 'Hyperlink',
+	preview: 'View',
+	remove: 'Delete',
+	upload: 'Upload Local File',
+	editVolume: 'Edit Book',
+	addVolume: 'Add Book',
+	grade: 'Grade',
+	semester: 'Semester',
+	name: 'Name',
+	canEdit: 'Co-editable',
+	authorsTitle: 'Authorized Teacher',
+	noAuth: 'No authorized Teacher information yet',
+	authors: 'Authorized Teacher (multiple choice)',
+	latestId: 'Last Modified by',
+	latestTime: 'Last modified time',
+	place4: 'Select the teacher authorized to manage the book...',
+	place2: 'Not required, default consists of grade + subject + semester...',
+	place3: 'Enter Book Name',
+	confirm: 'Confirm',
+	addLink: 'Add Hyperlink',
+	linkName: 'Hyperlink Name',
+	linkUrl: 'Hyperlink Address',
+	chooseCoTeacher: 'Select co-editing teacher',
+	chooseShareTeacher: 'Select who to share with',
+	score: 'Allocated Point',
+	count: 'Quetsion Number',
+	deleteVolume: 'Delete Book',
+	deleteConfirm: 'Are you sure to delete this book?',
+	deleteIsDelConfirm: 'Are you sure to delete this invalid book?',
+	deleteSuc: 'Delete successfully',
+	deleteFail: 'Failed to delete',
+	isDelTip: 'This book has been removed by the creator',
+	uploadSuc: 'Upload successfully',
+	tip: 'Reminder',
+	copyTip1: 'Exam file name',
+	copyTip2: 'Exam file name already exists in the school exam file bank, do you want to overwrite it?',
+	removeConfirm: 'Are you sure to remove this resource?',
+	doSuc: 'Operate successfully',
+	saveFailTip: 'Failed to save',
+	isExistVolume: 'The same book name already exists',
+	unSaveTip: 'You have not saved the changes, are you sure to leave?',
+	tree: {
+		hasResource: 'Related Resource',
+		hasCoEdit: 'With co-editing authorization',
+		edit: 'Edit',
+		add: 'Add',
+		remove: 'Delete',
+		coEdit: 'Co-editing the topic',
+		share: 'Share the topic',
+		editTitle: 'Edit Topic',
+		addTitle: 'Add Topic',
+		parent: 'Created Under',
+		nodeName: 'Topic Name',
+		addChapterTitle: 'Add Topic',
+		chapterName: 'Topic Name',
+		place1: 'Please enter topic name...',
+		confirm: 'Confirm',
+		removeTitle: 'Delete Topic',
+		removeConfirm: 'Are you sure to delete the topic?',
+		cancel: 'Cancel',
+		removeSucTip: 'Delete successfully',
+		nodeNameTip: 'Topic name cannot be empty',
+		editSucTip: 'Edit successfully',
+		addSucTip: 'Add successfully',
+		copyNode: 'Copy Topic',
+		curChapter: 'Current Topic',
+		targetV: 'Target Book',
+		ignoreTip: 'Are you sure to ignore the topic?',
+		noVTip: 'Please create your personal syllabus first!',
+		hasItemTip: 'The topic has information on the associated question/exam file, do you need to synchronize to your personal question/exam file bank?',
+		okText: 'Synchronize and copy',
+		cancelText: 'No need',
+		copySuc: 'Copy successfully',
+		nodeCountTip: 'You can only create up to 3 levels of topics under each book!'
 	},
-	curChapter:'Current Selected Topic',
-	sharedTeacher:'Teachers who have been shared the current topic',
-	noData:'No data yet',
-	itPlace1:'Enter teacher name or ID to search...',
-	itPlace2:'Search for teachers...',
-	searchResult:'Search Results',
-	noSearchResult:'No results found',
-	reSearch:'Search Again',
-	confirmShare:'Confirm Sharing',
-	isCoEdit:'Confirm Co-editing',
-	modifyTip:'Confirm Modification',
-	modifyText:'Are you sure to modify the co-editing status of the current user?',
-	authSuc:'Authorized successfully',
-	authFail:'Cancel authorization successfully',
-	shareSuc:'Share successfully',
-	shareFail:'Cancel Share Success',
-	cancelShare:'Cancel Share',
-	cancelTip1:'Are you sure to cancel share with',
-	cancelTip2:'?',
-	
-}
+	curChapter: 'Current Selected Topic',
+	sharedTeacher: 'Teachers who have been shared the current topic',
+	noData: 'No data yet',
+	itPlace1: 'Enter teacher name or ID to search...',
+	itPlace2: 'Search for teachers...',
+	searchResult: 'Search Results',
+	noSearchResult: 'No results found',
+	reSearch: 'Search Again',
+	confirmShare: 'Confirm Sharing',
+	isCoEdit: 'Confirm Co-editing',
+	modifyTip: 'Confirm Modification',
+	modifyText: 'Are you sure to modify the co-editing status of the current user?',
+	authSuc: 'Authorized successfully',
+	authFail: 'Cancel authorization successfully',
+	shareSuc: 'Share successfully',
+	shareFail: 'Cancel Share Success',
+	cancelShare: 'Cancel Share',
+	cancelTip1: 'Are you sure to cancel share with',
+	cancelTip2: '?',
+
+}

+ 5 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/studentWeb.js

@@ -560,6 +560,11 @@ export default {
         delOk: "删除",
         delCancel: "取消",
         examError: "试卷存在问题,无法正常打开",
+        source: {
+            evMode1: '线上评测',
+            evMode2: '课中评测',
+            evMode3: '阅卷评测',
+        },
     },
     queNaire: {
         submitSuccess: '提交成功',

+ 4 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/syllabus.js

@@ -1,4 +1,8 @@
 export default{
+	emptyTip:'空目录册别无法进行分享!',
+	chooseChapterTip:'请先选择需要收藏的章节!',
+	chooseVolumeTip:'请选择已创建的册别或者新建册别!',
+	playFailTip:'资源暂不支持播放',
 	shareSyllabus:'分享个人课纲',
 	chooseShareChapter:'选择分享的章节',
 	allShare:'整册分享',

+ 5 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/studentWeb.js

@@ -560,6 +560,11 @@ export default {
         delOk: "刪除",
         delCancel: "取消",
         examError: "試卷存在問題,無法正常打開",
+        source: {
+            evMode1: '線上評量',
+            evMode2: '課中評量',
+            evMode3: '閱卷評量',
+        },
     },
     queNaire: {
         submitSuccess: '提交成功',

+ 4 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/syllabus.js

@@ -1,4 +1,8 @@
 export default {
+	emptyTip: '空目錄冊別無法進行分享!',
+	chooseChapterTip: '請先選擇需要收藏的章節!',
+	chooseVolumeTip: '請選擇已創建的冊別或者新建冊別!',
+	playFailTip: '資源暫不支持播放',
 	shareSyllabus: '分享個人課綱',
 	chooseShareChapter: '選擇分享的章節',
 	allShare: '整冊分享',

+ 7 - 68
TEAMModelOS/ClientApp/src/utils/js-fn.js

@@ -1,6 +1,8 @@
 
 import store from '@/store'
-
+import {
+	app
+} from '@/boot-app.js'
 /*
  * 根据某个属性进行分组
  */
@@ -51,64 +53,6 @@ function getIndex(_arr, _obj) {
 function getBtwRandom(start, end) {
     return Math.floor(Math.random() * (end - start)) + start
 }
-/*
- * 根据学段编码获取对应学段信息
- */
-function getPeriod(data, periodCode) {
-    if (data == undefined) {
-        return {
-            name: '暂无数据',
-            id: '00',
-            grades: [],
-            subjects: []
-        }
-    } else {
-        let result = JSONPath.query(data, "$..[?(@.id=='" + periodCode + "')]")
-        if (result.length == 0) {
-            return {
-                name: '暂无数据',
-                id: '00',
-                grades: [],
-                subjects: []
-            }
-        } else {
-            return result[0]
-        }
-    }
-}
-/*
- * 根据年级编码获取对应Name
- */
-function getGradeName(data, gradeCode) {
-    let result = JSONPath.query(data, "$..[?(@.id=='" + gradeCode + "')]")
-    if (result.length == 0) {
-        return '暂无数据'
-    } else {
-        return result[0].name
-    }
-}
-/*
- * 根据学科编码获取对应Name
- */
-function getSubjectName(data, subjectCode) {
-    let result = JSONPath.query(data, "$..[?(@.id=='" + subjectCode + "')]")
-    if (result.length == 0) {
-        return '暂无数据'
-    } else {
-        return result[0].name
-    }
-}
-/*
- * 根据学科编码获取对应Name
- */
-function getClassroomByCode(data, classroomCode) {
-    let result = JSONPath.query(data, "$..[?(@.classroomCode=='" + classroomCode + "')]")
-    if (result.length == 0) {
-        return {}
-    } else {
-        return result[0]
-    }
-}
 
 /*
  *根据图片链接压缩图片得到缩略图 
@@ -303,15 +247,14 @@ function getGradeNameByYear(data, curPd, year) {
             }
             let res = pData.grades[curYear - year]
             if (curYear - year >= pData.grades.length) {
-                return '已毕业'
+                return app.$t('schoolBaseInfo.graduated')
             }
-            return res ? res : '未到入学时间'
+            return res ? res : app.$t('schoolBaseInfo.untimed')
         } else {
-            return '- -'
+            return '--'
         }
     } else {
-        // console.error('参数错误:Func getGradeNameByYear')
-        return '- -'
+        return '--'
     }
 }
 /**
@@ -388,10 +331,6 @@ export default {
     isObjEqual,
     getIndex,
     getBtwRandom,
-    getPeriod,
-    getGradeName,
-    getSubjectName,
-    getClassroomByCode,
     compressImgByUrl,
     createVideoPoster,
     dataURLtoFile,

+ 2 - 6
TEAMModelOS/ClientApp/src/view/learnactivity/ManualPaper.vue

@@ -45,10 +45,10 @@
                         <span>{{(index + 1) + '.  ' + item.name}}</span>
                     </div>
                     <div class="paper-item-info">
-                        <span class="info-item" v-show="scope == $store.state.userInfo.schoolCode">
+                        <!-- <span class="info-item" v-show="scope == $store.state.userInfo.schoolCode">
                             {{$t('learnActivity.manual.fitPd')}}
                             <span class="info-bold">{{$jsFn.getPeriod(schoolBase.period,item.periodId).name}}</span>
-                        </span>
+                        </span> -->
                         <span class="info-item" v-show="scope == $store.state.userInfo.schoolCode">
                             {{$t('learnActivity.manual.fitSubject')}}
                             <span class="info-bold">{{item.subjectName}}</span>
@@ -57,10 +57,6 @@
                             {{$t('learnActivity.manual.quCount')}}
                             <span class="info-bold">{{ item.scoring.length > 0 ? item.scoring.length : 0 }}</span>
                         </span>
-                        <!-- <span class="info-item">
-                            {{$t('learnActivity.manual.useCount')}}
-                            <span class="info-bold">{{item.useCount}}</span>
-                        </span> -->
                         <span class="info-item">
                             <Icon type="md-time" style="margin-right:8px" size="14"/>
                             <span class="info-bold">{{$jsFn.dateFormat(item.createTime)}}</span>

+ 4 - 2
TEAMModelOS/ClientApp/src/view/student-account/class/ClassMgt.vue

@@ -141,7 +141,7 @@
                                 <FormItem v-if="schoolBase && schoolBase.type == 2" prop="marjorId" @click.native.stop class="requird-color">
                                     <span slot="label" class="class-attr-wrap-label">{{$t('schoolBaseInfo.profession')}}</span>
                                     <Select @on-change="watchUpdate" :disabled="editStatus" v-model="classListShow[curClassIndex].marjorId" clearable :not-found-text="$t('schoolBaseInfo.noProfession')">
-                                        <Option v-for="(item,index) in $jsFn.getPeriod($store.state.user.schoolProfile.school_base,classListShow[curClassIndex].periodId).majors" :value="item.id" :key="index">
+                                        <Option v-for="(item,index) in majorList" :value="item.id" :key="index">
                                             {{ item.name }}
                                         </Option>
                                     </Select>
@@ -216,7 +216,7 @@
                 <FormItem v-if="schoolBase && schoolBase.type == 2" prop="marjorId" @click.native.stop class="requird-color">
                     <span slot="label" class="class-attr-wrap-label">{{$t('schoolBaseInfo.profession')}}</span>
                     <Select @on-change="watchUpdate" :disabled="editStatus" v-model="classInfo.marjorId" clearable :not-found-text="$t('schoolBaseInfo.noProfession')">
-                        <Option v-for="(item,index) in $jsFn.getPeriod($store.state.user.schoolProfile.school_base,filterPeriod).majors" :value="item.id" :key="index">
+                        <Option v-for="(item,index) in majorList" :value="item.id" :key="index">
                             {{ item.name }}
                         </Option>
                     </Select>
@@ -307,6 +307,7 @@ export default {
             callback()
         }
         return {
+            majorList:[],
             editIrs: 1,
             editNo: 1,
             btnLoading: false,
@@ -1077,6 +1078,7 @@ export default {
                 if (n) {
                     this.filterPeriod = n.id
                     this.filterByPeriod()
+                    this.majorList = n.majors
                 }
             }
         },

+ 3 - 3
TEAMModelOS/ClientApp/src/view/syllabus/Syllabus.vue

@@ -1190,7 +1190,7 @@
 						this.isShareModal = true
 					}
 				} else {
-					this.$Message.warning('空目录册别无法进行分享!')
+					this.$Message.warning(this.$t('syllabus.emptyTip'))
 				}
 			},
 			/* 点击收藏复制分享的课纲 */
@@ -1201,11 +1201,11 @@
 			/* 执行册别的复制操作 */
 			async sendCopyApi() {
 				if (!this.selectedChapters.length) {
-					this.$Message.warning('请先选择需要收藏的章节!')
+					this.$Message.warning(this.$t('syllabus.chooseChapterTip'))
 					return
 				}
 				if(!this.myVolumeList.length && this.activeCopyIndex === 0){
-					this.$Message.warning('请选择已创建的册别或者新建册别!')
+					this.$Message.warning(this.$t('syllabus.chooseVolumeTip'))
 					return
 				}
 				// 要复制到的目标册别