From 6ad528944f24daec8547126bf591868a00b1176a Mon Sep 17 00:00:00 2001
From: yj <2077506045@qq.com>
Date: 星期二, 07 五月 2024 18:12:37 +0800
Subject: [PATCH] 人格测试类型增加演示功能
---
src/lang/th.js | 5 +
src/lang/zh.js | 4 +
dist-20240411.zip | 0
src/lang/en.js | 5 +
src/layout/index.vue | 5 +
src/views/exam/paper/guide.vue | 4
src/views/demography/login.vue | 1
src/views/exam/paper/exercise.vue | 117 +++++++++++++-------------------------
8 files changed, 61 insertions(+), 80 deletions(-)
diff --git a/dist-20240411.zip b/dist-20240411.zip
new file mode 100644
index 0000000..6e10915
--- /dev/null
+++ b/dist-20240411.zip
Binary files differ
diff --git a/src/lang/en.js b/src/lang/en.js
index f8c20b5..4fde788 100644
--- a/src/lang/en.js
+++ b/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鈥檚 testing website.',
diff --git a/src/lang/th.js b/src/lang/th.js
index 7b1d119..b1cff6e 100644
--- a/src/lang/th.js
+++ b/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鈥檚 testing website.',
diff --git a/src/lang/zh.js b/src/lang/zh.js
index f45dc7b..339824d 100644
--- a/src/lang/zh.js
+++ b/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鈥檚 testing website.',
diff --git a/src/layout/index.vue b/src/layout/index.vue
index 9dfe0b4..2e6a7e1 100644
--- a/src/layout/index.vue
+++ b/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">
diff --git a/src/views/demography/login.vue b/src/views/demography/login.vue
index 1c35be9..33851d6 100644
--- a/src/views/demography/login.vue
+++ b/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') {
diff --git a/src/views/exam/paper/exercise.vue b/src/views/exam/paper/exercise.vue
index 8c70b0b..0edbffc 100644
--- a/src/views/exam/paper/exercise.vue
+++ b/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
diff --git a/src/views/exam/paper/guide.vue b/src/views/exam/paper/guide.vue
index f0c4667..32b922f 100644
--- a/src/views/exam/paper/guide.vue
+++ b/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>
--
Gitblit v1.9.1