From 917b4cbe663dd840492bb47842be0f1ed422a4f8 Mon Sep 17 00:00:00 2001
From: 阳洁 <2077506045@qq.com>
Date: 星期三, 17 一月 2024 15:20:04 +0800
Subject: [PATCH] 修改VAQ取消选择后图片分类错误问题、调整VAQ提交页面

---
 src/lang/zh.js                  |    2 +-
 src/lang/en.js                  |    2 +-
 src/views/exam/paper/values.vue |   22 ++++++++++++++++++----
 3 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/lang/en.js b/src/lang/en.js
index ffd93ab..7161da6 100644
--- a/src/lang/en.js
+++ b/src/lang/en.js
@@ -104,6 +104,6 @@
 	values_mostUnLikeMe:'Most unlike me',
 	values_no_select:'No picture left',
 	values_pic_tmpArea:'Picture Staging Area',
-	values_pic_tmpArea_desc:'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is your opportunity to review the categories in which you have created based on your picture selections.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;As a reminder, the order of the images you place in each category from left to right does not matter.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If you feel that you would like to move pictures around, you must drag them to the staging area before placing them into a new category. In order to replace one picture in a category with another, both pictures must be dragged into the staging area.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Once you are satisfied with your choices, click "Submit," and your choices will be finalized.',
+	values_pic_tmpArea_desc:'This is your opportunity to review the categories in which you have created based on your picture selections.<br/>As a reminder, the order of the images you place in each category from left to right does not matter.<br/>If you feel that you would like to move pictures around, you must drag them to the staging area before placing them into a new category. In order to replace one picture in a category with another, both pictures must be dragged into the staging area.<br/>Once you are satisfied with your choices, click "Submit," and your choices will be finalized.',
 	values_nextStepTips_tips:'Please refine the sort and rank the images by selecting them into the nine categories. Please note that the number of images you can put in each of the categories is fixed.'
 }
diff --git a/src/lang/zh.js b/src/lang/zh.js
index cc45b65..fde8a25 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -105,7 +105,7 @@
 	values_mostUnLikeMe:'鏈�涓嶅儚鎴�',
 	values_no_select:'鏃犲彲閫夊浘鐗�',
 	values_pic_tmpArea:'鍥剧墖鏁寸悊鍖�',
-	values_pic_tmpArea_desc:'鐜板湪浣犲彲浠ュ浣犲垰鎵嶅鍥剧墖鍋氬嚭鐨勫垎绫昏繘琛屼慨鏀广�傚啀娆℃彁閱掍竴涓嬶紝姣忎釜绫诲埆鍐呴儴鍥剧墖浠庡乏鍒板彸鐨勯『搴忔槸鏃犲叧绱ц鐨勩�傚鏋滀綘鎯虫洿鏀规煇浜涘浘鐗囩殑绫诲埆锛屼綘闇�瑕佸厛鎶婅繖浜涘浘鐗囨嫋鎷芥斁鍏モ�滃浘鐗囨暣鐞嗗尯鈥濓紝鐒跺悗鍐嶆嫋鍏ユ柊鐨勭被鍒�傚鏋滀綘鎯虫洿鎹袱寮犲浘鐗囩殑绫诲埆锛岄偅涔堜綘闇�瑕佹妸杩欎袱寮犲浘鐗囬兘鎷栧叆鈥滃浘鐗囨暣鐞嗗尯鈥濄�傚湪浣犵‘瀹氳嚜宸遍�夊ソ浜嗕箣鍚庯紝璇风偣鍑烩�滄彁浜も�濄��',
+	values_pic_tmpArea_desc:'鐜板湪浣犲彲浠ュ浣犲垰鎵嶅鍥剧墖鍋氬嚭鐨勫垎绫昏繘琛屼慨鏀广��<br/>鍐嶆鎻愰啋涓�涓嬶紝姣忎釜绫诲埆鍐呴儴鍥剧墖浠庡乏鍒板彸鐨勯『搴忔槸鏃犲叧绱ц鐨勩��<br/>濡傛灉浣犳兂鏇存敼鏌愪簺鍥剧墖鐨勭被鍒紝浣犻渶瑕佸厛鎶婅繖浜涘浘鐗囨嫋鎷芥斁鍏モ�滃浘鐗囨暣鐞嗗尯鈥濓紝鐒跺悗鍐嶆嫋鍏ユ柊鐨勭被鍒��<br/>濡傛灉浣犳兂鏇存崲涓ゅ紶鍥剧墖鐨勭被鍒紝閭d箞浣犻渶瑕佹妸杩欎袱寮犲浘鐗囬兘鎷栧叆鈥滃浘鐗囨暣鐞嗗尯鈥濄��<br/>鍦ㄤ綘纭畾鑷繁閫夊ソ浜嗕箣鍚庯紝璇风偣鍑烩�滄彁浜も�濄��',
 	values_nextStepTips_tips:'璇烽�氳繃灏嗗浘鍍忓垎涓轰節绫绘潵缁嗗寲鍥惧儚鐨勬帓搴忓拰鎺掑悕銆傝娉ㄦ剰锛屾偍鍙互鍦ㄦ瘡涓被鍒腑鏀剧疆鐨勫浘鍍忔暟閲忔槸鍥哄畾鐨勩��'
 
 }
diff --git a/src/views/exam/paper/values.vue b/src/views/exam/paper/values.vue
index 3fe33f4..f0667b2 100644
--- a/src/views/exam/paper/values.vue
+++ b/src/views/exam/paper/values.vue
@@ -312,7 +312,7 @@
 							<div v-html="$t('values_pic_tmpArea_desc')">
 
 							</div>
-							<el-button type="primary" round style="height: fit-content;margin: 0 10px;"
+							<el-button type="primary" round style="height: fit-content;margin-top:5px"
 								@click="step3_commit" :disabled="submitDisable">
 								{{$t('commit')}}
 							</el-button>
@@ -337,7 +337,7 @@
 					</div>
 				</div>
 				<div style="display:flex;margin-top: 200px;">
-					<div style="display: inline-block;min-width: 150px;text-align: right;padding-right: 5px;">
+					<div style="display: inline-block;min-width: 160px;text-align: right;padding-right: 5px;">
 						<div class="mul-inlinediv-row mul-inlinediv-lineheight"
 							v-for="(item,index) in step2ScoreRanges">
 							<span v-if="item.stepName=='涓嶇‘瀹氭槸鍚︾浉浼�'">
@@ -955,8 +955,19 @@
 			resetQuestionItemsSubjectIdById(id, value) {
 				for (let item of this.questionItems) {
 					if (item.id == id) {
-						item["subjectId"] = value
-						item['content'] = this.getLikeTypeByScoreRangeItemOrder(value)
+						// 濡傛灉涓簄ull锛屽氨鏄粠閫夋嫨涓彇娑�
+						if (value == null) {
+							item["subjectId"] = value
+							item['content'] = item['tempContent']
+						} else {
+							if (item['content'] != null && item['content'] != undefined) {
+								item['tempContent'] = item['content']
+							}
+							item["subjectId"] = value
+							item['content'] = this.getLikeTypeByScoreRangeItemOrder(value)
+						}
+
+						console.log("鏇存敼content:", item)
 					}
 				}
 				//console.log('resetQuestionItems...', id, value, this.questionItems)
@@ -967,6 +978,9 @@
 					if (this.isNull(item[key])) {
 						item[key] = value
 						if ("subjectId" == key) {
+							if (item['content'] != null && item['content'] != undefined) {
+								item['tempContent'] = item['content']
+							}
 							item['content'] = this.getLikeTypeByScoreRangeItemOrder(value)
 						}
 					}

--
Gitblit v1.9.1