[测评系统]--前端(用户答题页面)
yj
2024-05-07 6ad528944f24daec8547126bf591868a00b1176a
人格测试类型增加演示功能
1个文件已添加
7个文件已修改
141 ■■■■■ 已修改文件
dist-20240411.zip 补丁 | 查看 | 原始文档 | blame | 历史
src/lang/en.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/lang/th.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/lang/zh.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/demography/login.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/paper/exercise.vue 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/paper/guide.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
dist-20240411.zip
Binary files differ
src/lang/en.js
@@ -42,7 +42,12 @@
  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.',
  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.',
  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/th.js
@@ -42,7 +42,12 @@
  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.',
  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.',
  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,6 +44,10 @@
  pleaseAnswerCarefully: '*请认真作答',
  pleaseAnswerCarefully_exercise: '*当前为练习环节,练习结束后请点击“正式开始测试”按钮正式进行测试。',
  pleaseAnswerCarefullyCiaq: '*请认真作答。特别提示,本测验关注的是你对各类活动的兴趣或喜好,而非能力等其他因素!',
  exercise_note: '以下为工作行为/题目风格的例子',
  exercise_guide: '请仔细阅读下面的陈述,判断您在多大程度上同意每一陈述对您的描述,然后点击相应的选项。',
  exercise_note_1: '以下为基本技能过往经验题目的例子',
  exercise_guide_1: '您在过去一年中使用过这些基本技能的频度,并点击相应的选项。',
  submitTimeout: ':提交后台超时',
  submitExceptionInfo: '保存服务器网络异常,请关闭浏览重新点击链接答题',
  langWelcomeEnglish: 'Welcome to TAI’s testing website.',
src/layout/index.vue
@@ -7,8 +7,9 @@
        <!--<component :is="langSelect"></component>-->
      </div>
      <div class="head-user" style="float:left;">
        <span></span>
        <el-dropdown trigger="click" placement="bottom">
          <el-image v-if="productType==='API_Fan'" :style="{'width': isMobile?'120px':'150px','margin-top':'5px'}" :src="require('@/assets/logo-apifan.png')" fit="fill"></el-image>
          <el-image v-if="productType==='API_Fan'" :style="{'height': isMobile?'50px':'60px','margin-top':'5px'}" :src="require('@/assets/logo-apifan.png')" fit="fill"></el-image>
          <el-badge v-else style="height: 50px;">
            <el-avatar  class="el-dropdown-avatar" size="medium"  :src="userInfo.imagePath === null ? require('@/assets/logo-t.jpg') : userInfo.imagePath"></el-avatar>
          </el-badge>
@@ -18,7 +19,7 @@
        </el-dropdown>
      </div>
    </el-header>
    <el-main class="student-main">
    <el-main class="student-main" style="margin-top:20px;">
      <router-view/>
    </el-main>
    <el-footer height="340" class="student-footer">
src/views/demography/login.vue
@@ -31,6 +31,7 @@
    })
    // 已经答完了不能答题
    examPaperApi.selectTokenId(_this.paraMemberToken).then(re => {
      _this.setProductType(re.response.productType)
      if (re.response.finish === 1) {
        _this.$router.push({ path: '/exam/finish', query: { name: '', content: _this.$t('finishMsg'), tokenId: _this.paraMemberToken } })
      } else if (re.response.status !== '1') {
src/views/exam/paper/exercise.vue
@@ -1,18 +1,18 @@
<template>
  <div>
    <el-container  class="app-item-contain">
00      <el-main style="padding-top: 3%;">
      <el-main style="padding-top: 3%;">
        <el-form :model="form" ref="form" label-width="100%">
          <el-row :key="index"  v-for="(titleItem,index) in titleItems">
            <div class="q-content">{{titleItem.description}}</div>
            <el-card class="exampaper-item-box" v-if="titleItem.questionItems.length!==0"  style="border:2px solid #2b90ff;">
              <div class="align-center"><span style="font-size: small; float: left">{{$t('examinee')}}{{memberName}}</span><span style="margin-top: 0px;padding-right: 11%">●{{form.name}}●</span></div>
              <hr style="border : 1px dashed #b3d8ff;" />
              <el-row style="margin-left:7px;margin-bottom:10px;">{{ questionItem.note }}</el-row>
              <el-row style="margin-left:7px;margin-bottom:10px;">{{ questionItem.guide }}</el-row>
              <el-row style="margin-left:7px;margin-bottom:10px;">{{ questionItem.items.length != 4?note:note_1 }}</el-row>
              <el-row style="margin-left:7px;margin-bottom:10px;">{{ questionItem.items.length != 4?guide:guide_1 }}</el-row>
              <el-form-item :key="itemOrder" label-width="1px">
                <QuestionEdit @callNextSubject="nextSubject" :qType="questionItem.questionType" :question="questionItem"
                              :answer="answer.answerItems[questionItem.itemOrder-1]" :qLabel="itemOrder+'/'+itemSize"/>
                              :answer="answer.answerItems[itemOrder-1]" :qLabel="itemOrder+'/'+itemSize"/>
              </el-form-item>
              <hr style="border : 0.5px dashed #b3d8ff;" />
              <div style="color: red;font-size: smaller">{{$t('pleaseAnswerCarefully_exercise')}}</div>
@@ -62,64 +62,36 @@
  components: { QuestionEdit },
  data () {
    return {
      formDo: this.$route.query.formDo,
      memberName: this.$route.query.formDo.memberName,
      form: {
        name: this.$route.query.formDo.name
      },
      itemOrder: 1,
      itemSize: 2,
      description: '',
      guide: '',
      questionItem: {
        title: '我善于主动和陌生人交谈。',
        items: [
          { content: '非常不同意', prefix: '1', score: 0 },
          { content: '不同意', prefix: '2', score: 0 },
          { content: '不确定', prefix: '3', score: 0 },
          { content: '同意', prefix: '4', score: 0 },
          { content: '非常同意', prefix: '5', score: 0 }
        ],
        questionType: 1,
        note: '以下为工作行为/题目风格的例子',
        guide: '请仔细阅读下面的陈述,判断您在多大程度上同意每一陈述对您的描述,然后点击相应的选项。'
      },
      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: {
        questionId: null,
        doTime: 0,
        answerItems: [],
        verifyStatus: 2
        answerItems: [
          {
            content: '',
            readOnly: false
          },
          {
            content: '',
            readOnly: false
          }
        ]
      },
      titleItems: [
        {
          questionItems: [
            {
              title: '我善于主动和陌生人交谈。',
              items: [
                { content: '非常不同意', prefix: '1', score: 0 },
                { content: '不同意', prefix: '2', score: 0 },
                { content: '不确定', prefix: '3', score: 0 },
                { content: '同意', prefix: '4', score: 0 },
                { content: '非常同意', prefix: '5', score: 0 }
              ],
              questionType: 1
            },
            {
              title: '使用复印机。',
              items: [
                { content: '从来没有', prefix: '1', score: 0 },
                { content: '1-2次', prefix: '2', score: 0 },
                { content: '好几次', prefix: '3', score: 0 },
                { content: '经常', prefix: '4', score: 0 }
              ],
              questionType: 1
            }
          ]
        }
      ],
      titleItems: [],
      questionItem: {},
      isSubmit: false
    }
  },
  created: function () {
    this.initQuestion()
  },
  mounted () {
  },
@@ -128,42 +100,35 @@
  watch: {
  },
  methods: {
    // 初始化题目
    initQuestion () {
      this.titleItems = [
        {
          questionItems: [
            this.formDo.titleItems[0].questionItems[0],
            this.formDo.titleItems[0].questionItems[1]
          ]
        }
      ]
      this.questionItem = this.titleItems[0].questionItems[this.itemOrder - 1]
    },
    nextSubject () {
      console.log(this.answer)
      console.log('formDo')
      console.log(this.formDo)
      if (this.itemOrder === 2) {
        this.isSubmit = true
        return
      }
      this.questionItem = {
        title: '使用复印机。',
        items: [
          { content: '从来没有', prefix: '1', score: 0 },
          { content: '1-2次', prefix: '2', score: 0 },
          { content: '好几次', prefix: '3', score: 0 },
          { content: '经常', prefix: '4', score: 0 }
        ],
        questionType: 1,
        note: '以下为基本技能过往经验题目的例子',
        guide: '您在过去一年中使用过这些基本技能的频度,并点击相应的选项。'
      }
      this.itemOrder = 2
      this.answer.answerItems[this.itemOrder - 1].readOnly = false
      this.questionItem = this.titleItems[0].questionItems[this.itemOrder - 1]
    },
    preSubject () {
      this.isSubmit = false
      this.questionItem = {
        title: '我善于主动和陌生人交谈。',
        items: [
          { content: '非常不同意', prefix: '1', score: 0 },
          { content: '不同意', prefix: '2', score: 0 },
          { content: '不确定', prefix: '3', score: 0 },
          { content: '同意', prefix: '4', score: 0 },
          { content: '非常同意', prefix: '5', score: 0 }
        ],
        questionType: 1,
        note: '以下为工作行为/题目风格的例子',
        guide: '请仔细阅读下面的陈述,判断您在多大程度上同意每一陈述对您的描述,然后点击相应的选项。'
      }
      this.itemOrder = 1
      this.answer.answerItems[this.itemOrder - 1].readOnly = false
      this.questionItem = this.titleItems[0].questionItems[this.itemOrder - 1]
    },
    doExam () {
      let _this = this
src/views/exam/paper/guide.vue
@@ -7,9 +7,9 @@
      <el-main style="padding-top:0%">
        <div v-html="formDo.guide"></div>
        <el-row class="do-align-center">
          <el-button v-if="formDo.productType !== 'API_Fan'" @click="doExam" type="primary" round>{{$t('startDo')}}</el-button>
          <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.productType === 'API_Fan'" @click="openExercise" type="primary" round>继续</el-button>
          <el-button v-if="formDo.questionTemplateId === 'personality'" @click="openExercise" type="primary" round>继续</el-button>
        </el-row>
      </el-main>
    </el-container>