From 5adc07dbfed43d7cabec2ac5d8555864f12d937e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E5=86=A0=E5=AD=A6?= <1109935898@qq.com> Date: Thu, 13 Jun 2024 09:52:25 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=80=BB=E8=BE=91&=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=9B=BE=E7=89=87=E3=80=91=E7=BC=96=E8=BE=91=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E5=90=8E=E5=AF=8C=E6=96=87=E6=9C=AC=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Logical/fragment/AutoFill.vue | 32 ++++----- .../Logical/fragment/CheckBox.vue | 6 +- .../Logical/fragment/Classify.vue | 8 +-- .../Logical/fragment/FileUpload.vue | 4 +- .../planetDesign/Logical/fragment/HotArea.vue | 6 +- .../Logical/fragment/LogicList.vue | 65 ++++++++++--------- .../Logical/fragment/MatrixCheckBox.vue | 12 ++-- .../Logical/fragment/MatrixCompletion.vue | 8 +-- .../Logical/fragment/MatrixRadio.vue | 14 ++-- .../Logical/fragment/MatrixRate.vue | 8 +-- .../planetDesign/Logical/fragment/Nps.vue | 2 +- .../planetDesign/Logical/fragment/Radio.vue | 6 +- .../planetDesign/Logical/fragment/Rate.vue | 4 +- .../planetDesign/Logical/fragment/Sort.vue | 4 +- 14 files changed, 92 insertions(+), 87 deletions(-) diff --git a/src/views/planetDesign/Logical/fragment/AutoFill.vue b/src/views/planetDesign/Logical/fragment/AutoFill.vue index f52d591d..6420db85 100644 --- a/src/views/planetDesign/Logical/fragment/AutoFill.vue +++ b/src/views/planetDesign/Logical/fragment/AutoFill.vue @@ -34,7 +34,7 @@ @change="selectHandleOpt" > -
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
{ tempOpt.id = uuidv4(); - tempOpt.option = `${tempOpt.option}[关联自${temp.title}]`; + tempOpt.optionStr = `${tempOpt.option}[关联自${temp.title}]`; return tempOpt; }); if (temp.type === 0) { @@ -952,7 +952,7 @@ function util(store, copyQuesInfo) { return ids ? options ?.filter((opt) => ids.includes(opt.id)) - .map((opt) => opt.option) + .map((opt) => opt.optionStr) .join(",") : ""; }; diff --git a/src/views/planetDesign/Logical/fragment/CheckBox.vue b/src/views/planetDesign/Logical/fragment/CheckBox.vue index e83f984a..bef121e4 100644 --- a/src/views/planetDesign/Logical/fragment/CheckBox.vue +++ b/src/views/planetDesign/Logical/fragment/CheckBox.vue @@ -32,7 +32,7 @@ :key="opt.id" :value="opt.id" > -
+
diff --git a/src/views/planetDesign/Logical/fragment/FileUpload.vue b/src/views/planetDesign/Logical/fragment/FileUpload.vue index 321ac78a..0af605aa 100644 --- a/src/views/planetDesign/Logical/fragment/FileUpload.vue +++ b/src/views/planetDesign/Logical/fragment/FileUpload.vue @@ -38,7 +38,7 @@
@@ -71,7 +71,7 @@ export default { const filterOptionHandle = (value, option, optionList) => { let result = false; const curOpt = optionList.find((opt) => opt.id === option.key); - if (curOpt.option.includes(value)) { + if (curOpt.optionStr.includes(value)) { result = true; } return result; diff --git a/src/views/planetDesign/Logical/fragment/LogicList.vue b/src/views/planetDesign/Logical/fragment/LogicList.vue index e6ad4d40..e850338c 100644 --- a/src/views/planetDesign/Logical/fragment/LogicList.vue +++ b/src/views/planetDesign/Logical/fragment/LogicList.vue @@ -117,14 +117,14 @@ :value="ques.question_index" >
跳到
@@ -145,7 +145,7 @@ v-for="ques in data.afterQuesList" :key="ques.id" :value="ques.question_index" - >{{ ques.title }}{{ ques.stem }}{{ ques.title }}{{ ques.stemStr }}
@@ -160,7 +160,7 @@ data.afterQuesList.find( (val) => val.question_index === item.skip_question_index - )?.stem + )?.stemStr }}
@@ -183,14 +183,14 @@ :value="ques.question_index" >
@@ -223,7 +223,7 @@ >
@@ -238,7 +238,7 @@ }${ hasLogicQuesList.find( (val) => val.question_index === child.question_index - )?.stem || '' + )?.stemStr || '' }` " >
@@ -416,14 +416,14 @@ :value="ques.question_index" >
跳到
@@ -446,7 +446,7 @@ :value="ques.question_index" >
@@ -463,7 +463,7 @@ data.afterQuesList.find( (val) => val.question_index === item.skip_question_index - )?.stem || '' + )?.stemStr || '' }` " >
@@ -490,14 +490,14 @@ :value="ques.question_index" >
@@ -613,14 +613,14 @@ :value="ques.question_index" >
跳到
@@ -643,7 +643,7 @@ :value="ques.question_index" >
@@ -660,7 +660,7 @@ data.afterQuesList.find( (val) => val.question_index === item.skip_question_index - )?.stem || '' + )?.stemStr || '' }` " >
@@ -682,14 +682,14 @@ :value="ques.question_index" >
opt.find((x) => x.type === 0))[0] || [] ).map((opt) => { opt.parent_question_index = 0; - opt.option = nodeHandle(opt.option); + opt.optionStr = nodeHandle(opt.option); return opt; }); const rowOptionsList = ( curQues?.options.filter((opt) => opt.find((x) => x.type === 1))[0] || [] ).map((opt) => { opt.parent_question_index = 0; - opt.option = nodeHandle(opt.option); + opt.optionStr = nodeHandle(opt.option); return opt; }); const colOptionsList = ( curQues?.options.filter((opt) => opt.find((x) => x.type === 2))[0] || [] ).map((opt) => { opt.parent_question_index = 0; - opt.option = nodeHandle(opt.option); + opt.optionStr = nodeHandle(opt.option); return opt; }); const classifyOptionsList = ( curQues?.options.filter((opt) => opt.find((x) => x.type === 3))[0] || [] ).map((opt) => { opt.parent_question_index = 0; - opt.option = nodeHandle(opt.option); + opt.optionStr = nodeHandle(opt.option); return opt; }); const getRelationOption = (info) => { @@ -1773,7 +1775,7 @@ function getOptionListAndConfig(questionIndex, questionList, allQuesList) { const newOpt = newQues.options .filter((opt) => opt.find((x) => x.type === ass.cite_type))?.[0]?.map((opt) => { opt.parent_question_index = newQues.question_index; - opt.option = nodeHandle(opt.option); + opt.optionStr = nodeHandle(opt.option); return opt; }) || []; tempObj.relatedList.push(...newOpt); @@ -1794,7 +1796,7 @@ function getOptionListAndConfig(questionIndex, questionList, allQuesList) { const newOpt = newQues.options .filter((opt) => opt.find((x) => x.type === ass.cite_type))?.[0]?.map((opt) => { opt.parent_question_index = newQues.question_index; - opt.option = nodeHandle(opt.option); + opt.optionStr = nodeHandle(opt.option); return opt; }) || []; temp.relatedList.push(...newOpt); @@ -1802,7 +1804,7 @@ function getOptionListAndConfig(questionIndex, questionList, allQuesList) { temp.relatedList = JSON.parse(JSON.stringify(temp.relatedList)).map( (tempOpt) => { tempOpt.id = uuidv4(); - tempOpt.option = `${tempOpt.option}[关联自${temp.title}]`; + tempOpt.optionStr = `${tempOpt.option}[关联自${temp.title}]`; return tempOpt; } ); @@ -1838,7 +1840,7 @@ function getSkipQuesList(questionInfo, info, filterQues) { quesList = questionInfo.questions .filter((x) => x.id && ![6, 18].includes(x.question_type)) .map((ques) => { - ques.stem = nodeHandle(ques.stem); + ques.stemStr = nodeHandle(ques.stem); return ques; }); // 如果是自动填写逻辑需要过滤掉指定题型 @@ -1874,7 +1876,7 @@ function getShowQuesList(questionInfo, info, filterQues) { quesList = questionInfo.questions .filter((x) => x.id && ![6, 18].includes(x.question_type)) .map((ques) => { - ques.stem = nodeHandle(ques.stem); + ques.stemStr = nodeHandle(ques.stem); return ques; }); // 如果是自动填写逻辑需要过滤掉指定题型 @@ -1911,25 +1913,28 @@ function getQuesOptionListAfter(questionInfo, info) { question_index: -1, title: "正常完成", stem: "", + stemStr: "", }); afterSkipLogicQuesList.push({ id: -2, question_index: -2, title: "提前终止", stem: "", + stemStr: "", }); afterSkipLogicQuesList.push({ id: -3, question_index: -3, title: "配额超限", stem: "", + stemStr: "", }); const quesList = questionInfo.questions.filter((x) => x.id); afterSkipLogicQuesList.push( ...quesList .filter((ques) => ques.id !== info.id) .map((ques) => { - ques.stem = nodeHandle(ques.stem); + ques.stemStr = nodeHandle(ques.stem); return ques; }) ); diff --git a/src/views/planetDesign/Logical/fragment/MatrixCheckBox.vue b/src/views/planetDesign/Logical/fragment/MatrixCheckBox.vue index a15d3a17..5283bb6c 100644 --- a/src/views/planetDesign/Logical/fragment/MatrixCheckBox.vue +++ b/src/views/planetDesign/Logical/fragment/MatrixCheckBox.vue @@ -17,7 +17,7 @@ :key="opt.id" :value="opt.id" > -
+
-
+
@@ -131,7 +131,7 @@ export default { context.emit("update:child", copyChild.value); context.emit("changes"); }; - + const changeHandleGroup = () => { copyChild.value.option_index = copyChild.value.group_index; context.emit("update:child", copyChild.value); diff --git a/src/views/planetDesign/Logical/fragment/Rate.vue b/src/views/planetDesign/Logical/fragment/Rate.vue index a60509b0..931db040 100644 --- a/src/views/planetDesign/Logical/fragment/Rate.vue +++ b/src/views/planetDesign/Logical/fragment/Rate.vue @@ -17,7 +17,7 @@ :key="opt.id" :value="opt.id" > -
+