Просмотр исходного кода

Merge branch 'develop-rc' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop-rc

XW 2 лет назад
Родитель
Сommit
6dc0de4b0e

+ 6 - 5
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -1341,6 +1341,7 @@ const LANG_EN_US = {
     },
     // 试题试卷
     evaluation: {
+        exchange: 'Replace',
         fixTip1: 'Supplement Explanation',
         fixTip2: 'Are the changes updated to the exam file bank simultaneously?',
         currentItem: "This question's",
@@ -1535,7 +1536,7 @@ const LANG_EN_US = {
             itemCount: 'Question No.',
             paperAnalysis: 'Exam File Analysis',
             totalScore: 'Total Points',
-            score: '',
+            score: ' point(s)',
             paperErrorTip: 'Failed to get exam file data!',
             confirmDelete: 'Are you sure you want to delete the file?',
             editPaper: 'Edit Exam File',
@@ -3991,10 +3992,10 @@ const LANG_EN_US = {
         setNoErr1: "Please set the student's class",
         setNoErr2: 'The seat number is repeated in the class',
         sltStuTips: 'Please select student first',
-        imeiErr1:'E-Student ID Number can only be numbers',
-        imeiErr2:'E-Student ID Number is 15 digits',
-        imeiErr3:'Please enter student ID',
-        imeiErr4:" has bound this number, if the current student binds this number, the original student's binding will be cancelled automatically.",
+        imeiErr1: 'E-Student ID Number can only be numbers',
+        imeiErr2: 'E-Student ID Number is 15 digits',
+        imeiErr3: 'Please enter student ID',
+        imeiErr4: " has bound this number, if the current student binds this number, the original student's binding will be cancelled automatically.",
         addOk: 'Added successfully',
         updOk: 'Modified successfully',
         addErr: 'Failed to add',

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -1341,6 +1341,7 @@ const LANG_ZH_CN = {
     },
     // 试题试卷
     evaluation: {
+        exchange: '置换',
         fixTip1: '补充解析',
         fixTip2: '是否将改动同步更新到试卷库?',
         currentItem: '当前试题',

+ 5 - 4
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -1341,6 +1341,7 @@ const LANG_ZH_TW = {
     },
     // 试题试卷
     evaluation: {
+        exchange: '置換',
         fixTip1: '補充解析',
         fixTip2: '是否將改動同步更新到試卷庫?',
         currentItem: '當前試題',
@@ -3991,10 +3992,10 @@ const LANG_ZH_TW = {
         setNoErr1: '請設定學生班級',
         setNoErr2: '座號在班級中重複',
         sltStuTips: '請先選擇學生',
-        imeiErr1:'電子學生證只能為數字',
-        imeiErr2:'電子學生證為15位數字',
-        imeiErr3:'請輸入學生ID',
-        imeiErr4:'已經綁定此編號,如果當前學生綁定此編號,原來學生的將會自動取消綁定。',
+        imeiErr1: '電子學生證只能為數字',
+        imeiErr2: '電子學生證為15位數字',
+        imeiErr3: '請輸入學生ID',
+        imeiErr4: '已經綁定此編號,如果當前學生綁定此編號,原來學生的將會自動取消綁定。',
         addOk: '增加成功',
         updOk: '修改成功',
         addErr: '增加失敗',

+ 1 - 1
TEAMModelOS/ClientApp/src/components/homework/BaseHwForm.vue

@@ -380,7 +380,7 @@ export default {
         this.$emit('onAddFail')
         return
       }
-      let hasTargets = this.voteForm.classes.length
+      let hasTargets = this.$refs.classSelectRef.defaultArr.length
       this.$refs[name].validate(async (valid) => {
         if (valid && this.getSimpleText(this.voteForm.description) && hasTargets) {
           console.log(this.voteForm)

+ 4 - 2
TEAMModelOS/ClientApp/src/components/questionnaire/BaseQnForm.vue

@@ -263,7 +263,8 @@ export default {
     handleSubmit(name) {
       return new Promise((resolve, reject) => {
         this.$refs[name].validate((valid) => {
-          let hasTargets = (!this.isAreaSurvey && this.qnForm.classes.length) || (this.isAreaSurvey && this.schoolTarget.length)
+          // let hasTargets = (!this.isAreaSurvey && this.qnForm.classes.length) || (this.isAreaSurvey && this.schoolTarget.length)
+          let hasTargets = this.$refs.classSelectRef.defaultArr.length
           if (valid && this.getSimpleText(this.qnForm.description) && hasTargets) {
             let params = JSON.parse(JSON.stringify(this.defaultParams))
             let areaParams = null
@@ -278,7 +279,7 @@ export default {
             // 如果个人问卷的班级是校本班级 那么也要把scope置为school
             params.scope = isPersonal ? 'private' : 'school'
             params.name = this.qnForm.name
-			params.startTime = this.qnForm.startTime ? new Date(this.qnForm.startTime).getTime() : new Date().getTime()
+            params.startTime = this.qnForm.startTime ? new Date(this.qnForm.startTime).getTime() : new Date().getTime()
             params.endTime = new Date(this.qnForm.endTime).getTime()
             params.description = this.qnForm.description
             params.targets = this.qnForm.targets
@@ -352,6 +353,7 @@ export default {
             console.log(finalParams)
             resolve(finalParams)
           } else {
+            this.$emit('onAddFail')
             if (!hasTargets) {
               this.$Message.error(this.$t('survey.form.ruleClasses'))
             } else if (!this.getSimpleText(this.qnForm.description)) {

+ 4 - 6
TEAMModelOS/ClientApp/src/components/vote/BaseVoteForm.vue

@@ -289,9 +289,7 @@ export default {
     },
     /* 提交保存 */
     async handleSubmit(name, progress) {
-      this.isBtnLoading = true
-      let hasTargets = (!this.isAreaVote && this.voteForm.classes.length) || (this.isAreaVote && this
-        .schoolTarget.length)
+      let hasTargets = this.$refs.classSelectRef.defaultArr.length
       let optionComplete = this.voteOptionsContent.length && this.voteOptionsContent.every(i => i.value !==
         '')
       this.$refs[name].validate(async (valid) => {
@@ -300,7 +298,7 @@ export default {
           if (this.voteForm.selectMax > this.voteOptionsContent.length && this.voteForm
             .repeat.indexOf('repeat') === -1) {
             this.$Message.warning(this.$t('vote.optionMaxTip'))
-            this.isBtnLoading = false
+            this.$emit('onAddFail')
           } else {
             if (this.voteForm.selectMax === 1) {
               this.voteForm.repeat = []
@@ -411,12 +409,12 @@ export default {
               this.$emit('onAddSuccess')
               this.isBtnLoading = false
             }).catch(error => {
-              this.isBtnLoading = false
+              this.$emit('onAddFail')
               console.log(error)
             })
           }
         } else {
-          this.isBtnLoading = false
+          this.$emit('onAddFail')
           if (!optionComplete) {
             this.$Message.error(this.$t('vote.form.noOptionTip'))
           } else if (!hasTargets) {

+ 2 - 2
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseExerciseList.vue

@@ -24,7 +24,7 @@
               <Icon type="md-create" />{{$t('evaluation.editItem')}}
             </div>
             <div class="item-tools-t flex-row-center" v-show="isAutoMode" @click.stop="handleToolChange(typeItem.list,item,index)">
-              <Icon type="md-repeat" />置换
+              <Icon type="md-repeat" />{{$t('evaluation.exchange')}}
             </div>
             <div class="item-tools-t flex-row-center" v-show="isShowTools && !isExamPaper &&noAnswerList.indexOf(item) > -1" @click.stop="onSetAnswer(item,exerciseList.indexOf(item),typeItem.list,index)">
               <Icon type="ios-brush-outline" />{{$t('evaluation.exerciseList.setAnswer')}}
@@ -998,7 +998,7 @@ export default {
         if (that.typeSummaryInfo && that.typeSummaryInfo[typeItem.type]) {
           return that.typeSummaryInfo[typeItem.type]
         } else {
-          return `${this.$t('answerSheet.tip9')}${typeItem.list.length}${this.$t('answerSheet.tip17')}${typeItem.score || 0}${this.$t('evaluation.paperList.score')}`
+          return `${this.$t('answerSheet.tip9')} ${typeItem.list.length}${this.$t('answerSheet.tip17')}${typeItem.score || 0}${this.$t('evaluation.paperList.score')}`
         }
       }
     },

+ 1 - 1
TEAMModelOS/ClientApp/src/view/homework/ManageHomeWork.vue

@@ -451,7 +451,7 @@ export default {
           code: this.$store.state.userInfo.TEAMModelId,
           classes: classInfo && classInfo.classId ? [classInfo.classId] : [],
           stuLists: classInfo && classInfo.stulist ? [classInfo.stulist] : [],
-          targets: [classInfo.classId || classInfo.stulist],
+          targets: (classInfo.classId || classInfo.stulist) ? [classInfo.classId || classInfo.stulist] : [],
           endTime: new Date(new Date().toLocaleDateString()).getTime() + 2 * 24 * 60 * 60 * 1000 - 1,
           startTime: null,
           description: '',

+ 2 - 2
TEAMModelOS/ClientApp/src/view/questionnaire/ManageQuestionnaire.vue

@@ -78,7 +78,7 @@
                     <div v-show="qnList.length === 0">
                       <EmptyData :top="50"></EmptyData>
                     </div>
-                    <BaseQnForm :editItem="currentQn" @onAddSuccess="onAddSuccess" ref="qnForm" v-show="qnList.length"></BaseQnForm>
+                    <BaseQnForm :editItem="currentQn" @onAddSuccess="onAddSuccess" @onAddFail="isBtnLoading = false" ref="qnForm" v-show="qnList.length"></BaseQnForm>
                   </div>
                 </vuescroll>
               </div>
@@ -424,7 +424,7 @@ export default {
           name: this.$t('survey.defaultName'),
           classes: classInfo && classInfo.classId ? [classInfo.classId] : [],
           stuLists: classInfo && classInfo.stulist ? [classInfo.stulist] : [],
-          targets: [classInfo.classId || classInfo.stulist],
+          targets: (classInfo.classId || classInfo.stulist) ? [classInfo.classId || classInfo.stulist] : [],
           endTime: new Date(new Date().toLocaleDateString()).getTime() + 2 * 24 * 60 * 60 * 1000 - 1,
           startTime: null,
           description: "",

Разница между файлами не показана из-за своего большого размера
+ 2679 - 2728
TEAMModelOS/ClientApp/src/view/syllabus/Syllabus.vue


+ 2 - 2
TEAMModelOS/ClientApp/src/view/vote/ManageVote.vue

@@ -93,7 +93,7 @@
                   <EmptyData :top="50"></EmptyData>
                 </div>
                 <div class="hw-info-wrap" v-show="voteList.length !== 0">
-                  <BaseVoteForm :editItem="currentVote" @onAddSuccess="onAddSuccess" ref="voteForm" @onCancelVote="onCancelVote"></BaseVoteForm>
+                  <BaseVoteForm :editItem="currentVote" @onAddSuccess="onAddSuccess" @onAddFail="isBtnLoading = false" ref="voteForm" @onCancelVote="onCancelVote"></BaseVoteForm>
                 </div>
               </vuescroll>
             </div>
@@ -480,7 +480,7 @@ export default {
             .TEAMModelId,
           classes: classInfo && classInfo.classId ? [classInfo.classId] : [],
           stuLists: classInfo && classInfo.stulist ? [classInfo.stulist] : [],
-          targets: [classInfo.classId || classInfo.stulist],
+          targets: (classInfo.classId || classInfo.stulist) ? [classInfo.classId || classInfo.stulist] : [],
           owner: this.isAreaVote ? 'area' : this.isPrivate ? 'teacher' : 'school',
           options: [{
             code: 'A',