[测评系统]--前端(用户答题页面)
yj
2024-05-24 99ce8c363068eb4076b4f7e9c4d505cc37eb3f78
1.修改文字 2.修改练习页面
6个文件已修改
102 ■■■■■ 已修改文件
src/lang/en.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/lang/th.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/lang/zh.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/index.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/paper/exercise.vue 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/paper/guide.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/lang/en.js
@@ -29,7 +29,7 @@
  finishSubmit: 'You have completed the work behavior questionnaire, and the data has been successfully uploaded to the server and saved. Thank you.',
  selectData: 'Date',
  startDo: 'Next',
  startDo_apifan: 'The test has officially started.',
  startDo_apifan: 'Start the Test',
  second: ' second ',
  min: ' minute ',
  hour: ' hour ',
@@ -42,12 +42,14 @@
  uploadInfo: 'Uploading, saving data, please wait, do not close the browser...',
  examinee: 'Test-taker:',
  pleaseAnswerCarefully: '*Please answer carefully',
  pleaseAnswerCarefully_exercise: '*This is a practice session, after the practice session, please click the "Start Test" button to take the test.',
  pleaseAnswerCarefully_exercise: '*This is the practice session. After you are done with practice, please click the "Start the Test" button.',
  pleaseAnswerCarefullyCiaq: '*请认真作答。特别提示,本测验关注的是你对各类活动的兴趣或喜好,而非能力等其他因素!',
  exercise_note: 'The following are examples of work behaviours/title styles',
  exercise_guide: 'Please read the statements below carefully, judge how far you agree with how each statement describes you, and then click on the appropriate option.',
  exercise_note_1: 'The following are examples of basic skills past experience questions',
  exercise_guide_1: 'How often you have used these basic skills in the past year and click on the appropriate option.',
  exercise_start: 'Begtin practice',
  exercise_note: 'Below are examples of work style items.',
  exercise_guide: 'Please read the following statements carefully and determine the extent to which you agree that each statement describes you. Then, click the corresponding option.',
  exercise_note_1: 'Below are examples of basic skills or past experience items.',
  exercise_guide_1: 'Indicate how often you have used these basic skills in the past year, and click the corresponding option.',
  exercise_submit_tip: 'You are done with the practice session. Please click the button to start the test.',
  submitTimeout: ':Submit background timeout',
  submitExceptionInfo: 'The server network is abnormal, please close the browser and click the link to answer the question',
  langWelcomeEnglish: 'Welcome to TAI’s testing website.',
@@ -59,8 +61,8 @@
  nextPartInfo: 'Please wait, please do not close the browser...',
  partRemailTime: 'Remaining Time:',
  finishIntelligenceInfo: 'You have completed the cognitive ability test questionnaire, the data has been successfully uploaded to the server, and has been saved. Thank you.',
  finishPersonalityInfo: 'You have completed the personality quetionnaire, and the data has been successfully uploaded to the server and saved. ',
  finishCareerInterestsInfo: 'You have completed the Career Interests quetionnaire, and the data has been successfully uploaded to the server and saved. ',
  finishPersonalityInfo: 'You have completed the personality questionnaire, and the data has been successfully uploaded to the server and saved. ',
  finishCareerInterestsInfo: 'You have completed the Career Interests questionnaire, and the data has been successfully uploaded to the server and saved. ',
  finishPersonalityDownInfo: 'You may click the button below to download your test report.',
  finishViewReportInfo: 'You can click on the button below to view your result report.',
  langWelcomeThai: 'ยินดีตอนรับสู่เว็บไซย์สำหรับทำแบบทดสอบของ',
src/lang/th.js
@@ -29,7 +29,7 @@
  finishSubmit: 'You have completed the work behavior questionnaire, and the data has been successfully uploaded to the server and saved. Thank you.',
  selectData: 'Date',
  startDo: 'Start the Test',
  startDo_apifan: 'The test has officially started.',
  startDo_apifan: 'Start the Test',
  second: ' second ',
  min: ' minute ',
  hour: ' hour ',
@@ -42,12 +42,14 @@
  uploadInfo: 'Uploading, saving data, please wait, do not close the browser...',
  examinee: 'Test-taker:',
  pleaseAnswerCarefully: '*Please answer carefully',
  pleaseAnswerCarefully_exercise: '*This is a practice session, after the practice session, please click the "Start Test" button to take the test.',
  pleaseAnswerCarefully_exercise: '*This is the practice session. After you are done with practice, please click the "Start the Test" button.',
  pleaseAnswerCarefullyCiaq: '*请认真作答。特别提示,本测验关注的是你对各类活动的兴趣或喜好,而非能力等其他因素!',
  exercise_note: 'The following are examples of work behaviours/title styles',
  exercise_guide: 'Please read the statements below carefully, judge how far you agree with how each statement describes you, and then click on the appropriate option.',
  exercise_note_1: 'The following are examples of basic skills past experience questions',
  exercise_guide_1: 'How often you have used these basic skills in the past year and click on the appropriate option.',
  exercise_start: 'Begtin practice',
  exercise_note: 'Below are examples of work style items.',
  exercise_guide: 'Please read the following statements carefully and determine the extent to which you agree that each statement describes you. Then, click the corresponding option.',
  exercise_note_1: 'Below are examples of basic skills or past experience items.',
  exercise_guide_1: 'Indicate how often you have used these basic skills in the past year, and click the corresponding option.',
  exercise_submit_tip: 'You are done with the practice session. Please click the button to start the test.',
  submitTimeout: ':Submit background timeout',
  submitExceptionInfo: 'The server network is abnormal, please close the browser and click the link to answer the question',
  langWelcomeEnglish: 'Welcome to TAI’s testing website.',
src/lang/zh.js
@@ -44,10 +44,12 @@
  pleaseAnswerCarefully: '*请认真作答',
  pleaseAnswerCarefully_exercise: '*当前为练习环节,练习结束后请点击“正式开始测试”按钮正式进行测试。',
  pleaseAnswerCarefullyCiaq: '*请认真作答。特别提示,本测验关注的是你对各类活动的兴趣或喜好,而非能力等其他因素!',
  exercise_start: '开始练习',
  exercise_note: '以下为工作行为/题目风格的例子',
  exercise_guide: '请仔细阅读下面的陈述,判断您在多大程度上同意每一陈述对您的描述,然后点击相应的选项。',
  exercise_note_1: '以下为基本技能过往经验题目的例子',
  exercise_guide_1: '您在过去一年中使用过这些基本技能的频度,并点击相应的选项。',
  exercise_submit_tip: '你已经完成了练习,点击按钮开始正式测试。',
  submitTimeout: ':提交后台超时',
  submitExceptionInfo: '保存服务器网络异常,请关闭浏览重新点击链接答题',
  langWelcomeEnglish: 'Welcome to TAI’s testing website.',
src/layout/index.vue
@@ -49,6 +49,8 @@
    }
  },
  created () {
    console.log('环境变量:')
    console.log(process.env)
  },
  watch: {
    logo: function (val) {
@@ -60,6 +62,7 @@
        this.logoUrl = require('@/assets/logo-t.png')
      } else if (val !== null) {
        this.logoUrl = val
        this.backgroundColor = '#fff'
      } else if (sessionLogoUrl !== null) {
        this.logoUrl = sessionLogoUrl
      }
src/views/exam/paper/exercise.vue
@@ -17,13 +17,10 @@
              <hr style="border : 0.5px dashed #b3d8ff;" />
              <div style="color: red;font-size: smaller">{{$t('pleaseAnswerCarefully_exercise')}}</div>
              
              <el-row class="do-align-center" v-if="itemOrder > 1">
                <el-button @click="doExam" type="success" round>{{$t('startDo_apifan')}}</el-button>
                <el-button @click="preSubject" type="warning" round>{{$t('lastQuestion')}}</el-button>
              </el-row>
              <el-row class="do-align-center" v-if="itemOrder <= 1">
                <el-button @click="doExam" type="success" round>{{$t('startDo_apifan')}}</el-button>
                <el-button @click="nextSubject" type="primary" round>{{$t('nextQuestion')}}</el-button>
              <el-row class="do-align-center">
                <el-button v-if="isSubmit" @click="doExam" type="success" round>{{$t('startDo_apifan')}}</el-button>
                <el-button v-if="isStart && !isLast" @click="preSubject" type="warning" round>{{$t('lastQuestion')}}</el-button>
                <el-button v-if="isStart && isLast" @click="nextSubject" type="primary" round>{{$t('nextQuestion')}}</el-button>
              </el-row>
            </el-card>
          </el-row>
@@ -68,26 +65,19 @@
        name: this.$route.query.formDo.name
      },
      itemOrder: 1,
      itemSize: 2,
      itemSize: 3,
      note: this.$t('exercise_note'),
      guide: this.$t('exercise_guide'),
      note_1: this.$t('exercise_note_1'),
      guide_1: this.$t('exercise_guide_1'),
      answer: {
        answerItems: [
          {
            content: '',
            readOnly: false
          },
          {
            content: '',
            readOnly: false
          }
        ]
        answerItems: []
      },
      titleItems: [],
      questionItem: {},
      isSubmit: false
      isSubmit: false,
      isStart: false,
      isLast: false
    }
  },
  created: function () {
@@ -104,29 +94,44 @@
    initQuestion () {
      this.titleItems = [
        {
          questionItems: [
            this.formDo.titleItems[0].questionItems[0],
            this.formDo.titleItems[0].questionItems[1]
          ]
          questionItems: []
        }
      ]
      for (let i = 0; i < this.itemSize; i++) {
        this.titleItems[0].questionItems.push(this.formDo.titleItems[0].questionItems[i])
      }
      this.questionItem = this.titleItems[0].questionItems[this.itemOrder - 1]
      for (let i = 0; i < this.itemSize; i++) {
        let data = {
          content: '',
          readOnly: false
        }
        this.answer.answerItems.push(data)
      }
    },
    nextSubject () {
      console.log(this.answer)
      console.log('formDo')
      console.log(this.formDo)
      if (this.itemOrder === 2) {
      this.isStart = true
      this.isLast = false
      if (this.itemOrder === this.itemSize) {
        this.isSubmit = true
        this.$message({
          message: this.$t('exercise_submit_tip'),
          type: 'success'
        })
        return
      }
      this.itemOrder = 2
      this.itemOrder += 1
      this.answer.answerItems[this.itemOrder - 1].readOnly = false
      this.questionItem = this.titleItems[0].questionItems[this.itemOrder - 1]
      if (this.itemOrder === this.itemSize && this.answer.answerItems[this.itemOrder - 1].content !== '') {
        this.isSubmit = true
      }
    },
    preSubject () {
      this.isLast = true
      this.isSubmit = false
      this.itemOrder = 1
      this.itemOrder -= 1
      this.answer.answerItems[this.itemOrder - 1].readOnly = false
      this.questionItem = this.titleItems[0].questionItems[this.itemOrder - 1]
    },
src/views/exam/paper/guide.vue
@@ -9,7 +9,7 @@
        <el-row class="do-align-center">
          <el-button v-if="formDo.questionTemplateId !== 'personality'" @click="doExam" type="primary" round>{{$t('startDo')}}</el-button>
          <el-button v-if="formDo.questionTemplateId === 'job'" @click="openExplain" type="danger" round>打开岗位说明</el-button>
          <el-button v-if="formDo.questionTemplateId === 'personality'" @click="openExercise" type="primary" round>继续</el-button>
          <el-button v-if="formDo.questionTemplateId === 'personality'" @click="openExercise" type="primary" round>{{$t('exercise_start')}}</el-button>
        </el-row>
      </el-main>
    </el-container>