From a5cba9ab040f6f97558046885dce3017f9bab7e9 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 11 八月 2026 14:12:29 +0800
Subject: [PATCH] 提交

---
 src/views/outsideChainwtnew.vue |  283 +++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 189 insertions(+), 94 deletions(-)

diff --git a/src/views/outsideChainwtnew.vue b/src/views/outsideChainwtnew.vue
index ffcee9d..4d5e662 100644
--- a/src/views/outsideChainwtnew.vue
+++ b/src/views/outsideChainwtnew.vue
@@ -23,7 +23,9 @@
                   : "浜茬埍鐨勬偅鑰�-瀹跺睘锛屾垜浠槸鍖婚櫌鐨勫尰鎶や汉鍛橈紝涓轰簡鏇村ソ鍦颁簡瑙f偍鐨勫悍澶嶆儏鍐碉紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瀹屾垚杩欎唤闅忚闂嵎銆�"
               }}
             </div>
-            <div v-if="orgname" class="questionnaire-signature">鈥斺�斺�攞{ orgname }}</div>
+            <div v-if="orgname" class="questionnaire-signature">
+              鈥斺�斺�攞{ orgname }}
+            </div>
           </div>
 
           <el-divider class="custom-divider"></el-divider>
@@ -327,6 +329,7 @@
         <div class="completion-content">
           <div class="completion-icon">鉁�</div>
           <h2 class="completion-title">鎰熻阿鎮ㄧ殑閰嶅悎!</h2>
+          <h2 class="completion-title">绁濇偍鍋ュ悍蹇箰!</h2>
           <p class="completion-message">
             {{
               jsy
@@ -357,11 +360,13 @@
       taskid: 355,
       patid: 265823,
       kcb: "",
+      subtaskid: null,
       excep: 0,
       isabnormal: 0,
       taskname: "",
       orgname: "",
       questionList: [],
+      permanentlyHidden: [], // 瀛樺偍琚案涔呴殣钘忕殑棰樼洰绱㈠紩
       param6: null,
       jsy: null,
       dialogVisible: false,
@@ -497,6 +502,7 @@
       console.log(url, "url");
       // let url = 'http://218.108.11.22:8093/sf/003';
       // let urlid = this.extractLastSegmentFromUrl(url);
+      console.log("妫掓2");
 
       geturlinfo(url).then((res) => {
         if (res.code == 200) {
@@ -504,9 +510,18 @@
             res.data.param1,
             res.data.param2,
             res.data.param3,
-            res.data.param5
+            res.data.param5,
+            res.data.param6
           );
-          this.orgname = res.data.orgname;
+          if (
+            res.data.orgname == "鐪佺珛鍚屽痉缈犺嫅闄㈠尯" ||
+            res.data.orgname == "鐪佺珛鍚屽痉涔嬫睙闄㈠尯" ||
+            res.data.orgname == "鐪佺珛鍚屽痉闂叉灄闄㈠尯"
+          ) {
+            this.orgname = "娴欐睙鐪佺珛鍚屽痉鍖婚櫌";
+          } else {
+            this.orgname = res.data.orgname;
+          }
 
           this.param6 = res.data.param6;
         }
@@ -541,10 +556,11 @@
     // },
 
     // 鑾峰彇鏁版嵁
-    getQuestionnaire(param1, param2, param3) {
+    getQuestionnaire(param1, param2, param3, param5, param6) {
       this.taskid = decodeURIComponent(param1);
       this.patid = decodeURIComponent(param2);
       this.taskname = decodeURIComponent(param3);
+      this.subtaskid = decodeURIComponent(param6);
       this.loading = true;
 
       // let taskid =
@@ -556,7 +572,11 @@
       // let taskids = this.encrypt(this.taskid);
       // let patids = this.encrypt(this.patid);
       // 鍏堝彇缂撳瓨
-      getCachequestionnaire({ param1: this.taskid, param2: this.patid })
+      getCachequestionnaire({
+        param1: this.taskid,
+        param2: this.patid,
+        param6: param6,
+      })
         .then((res) => {
           if (res.code == 200) {
             this.questionList = res.data.result;
@@ -583,12 +603,18 @@
     },
     // 鑾峰彇鏁版嵁
     getExternalfollowup() {
-      getExternalfollowup({ param1: this.taskid, param2: this.patid })
+      getExternalfollowup({
+        param1: this.taskid,
+        param2: this.patid,
+        param6: this.subtaskid,
+      })
         .then((res) => {
           if (res.code == 200) {
             this.questionList = res.data.script;
             this.jsy = res.data.jsy;
             this.kcb = res.data.kcb;
+            if (res.data.taskName) this.taskname = res.data.taskName;
+
             // 澶勭悊棰樼洰鏀堕泦缁撴灉鏍煎紡
             this.questionList.forEach((item) => {
               item.nextScriptno = Number(item.nextScriptno);
@@ -727,9 +753,10 @@
     // 鏂板鐨勫垏鎹㈤�変腑/鍙栨秷閫変腑鏂规硶
     handleRadioToggle(questionItem, globalIndex, options, optionValue) {
       // 淇濆瓨褰撳墠鐘舵�佷互渚垮悗缁瘮杈�
-      const previousState = JSON.parse(JSON.stringify(this.questionList));
+      this.permanentlyHidden = this.permanentlyHidden.filter(
+        (idx) => idx <= globalIndex
+      );
 
-      // 鍘熸湁鐨勫鐞嗛�昏緫
       if (questionItem.scriptResult == optionValue) {
         questionItem.scriptResult = "";
         questionItem.isabnormal = 0;
@@ -743,20 +770,15 @@
           questionItem
         );
       }
-
-      // 澶勭悊瀹屾垚鍚庯紝纭繚閲嶆柊璁$畻鍙棰樼洰鐨勫簭鍙�
       this.$forceUpdate();
     },
 
     // 鍦╩ethods閮ㄥ垎锛屼慨鏀筯andleOptionChange鏂规硶:
     handleOptionChange(selectedOption, questionIndex, options, a) {
-      console.log(selectedOption, questionIndex, options, a, "888");
-
       if (document.activeElement) {
         document.activeElement.blur();
       }
 
-      // 鎵惧埌琚�変腑鐨勯�夐」瀵硅薄
       const selectedOptionObj = options.find(
         (item) => item.optioncontent == selectedOption
       );
@@ -766,90 +788,93 @@
         this.questionList[questionIndex].score = selectedOptionObj.score;
         this.questionList[questionIndex].prompt = selectedOptionObj.prompt;
       }
-      // 澶勭悊寮傚父鐘舵�侀珮浜�
+      console.log(
+        this.questionList[questionIndex].nextScriptno,
+        "this.questionList[questionIndex].nextScriptno"
+      );
+      console.log(questionIndex, "questionIndex");
+
       this.questionList[questionIndex].isabnormal =
         selectedOptionObj.isabnormal;
-      // 澶勭悊闄勫姞杈撳叆妗嗘樉绀�
-
       this.questionList[questionIndex].showAppendInput =
         selectedOptionObj.appendflag == 1;
-      console.log(this.questionList);
-      console.log(selectedOptionObj.appendflag);
 
-      // if (!this.questionList[questionIndex].showAppendInput) {
-      //   this.questionList[questionIndex].answerps = ""; // 娓呴櫎闄勫姞淇℃伅
-      // }
-      // 淇濆瓨褰撳墠棰樼洰涔嬪墠宸茬粡闅愯棌鐨勯鐩姸鎬�
+      // 璁板綍褰撳墠棰樹箣鍓嶅凡闅愯棌鐨勯鐩储寮曪紙涓嶆敼鍙橈級
       const previouslyHiddenBeforeCurrent = this.questionList
         .slice(0, questionIndex)
         .map((item, index) => (item.ishide ? index : -1))
-        .filter((index) => index !== -1);
+        .filter((idx) => idx !== -1);
 
-      // 淇濆瓨涔嬪墠鍥爊extQuestion=0鑰岄殣钘忕殑棰樼洰鑼冨洿
-      const previouslyHiddenByEnd = this.questionList
-        .map((item, index) => (item.hiddenByEnd ? index : -1))
-        .filter((index) => index !== -1);
-
-      // 濡傛灉branchFlag涓�1锛屽鐞嗛鐩烦杞�
       if (a.branchFlag == 1) {
         if (selectedOptionObj.nextQuestion == 0) {
-          // 缁撴潫闂瓟 - 闅愯棌鍚庨潰鎵�鏈夐鐩苟鏍囪
+          // 銆愮粨鏉熼棶绛斻�戦殣钘忔墍鏈夊悗缁鐩紝骞惰褰曟案涔呴殣钘�
           this.questionList = this.questionList.map((item, index) => ({
             ...item,
             ishide: index > questionIndex,
-            hiddenByEnd: index > questionIndex, // 鏍囪杩欎簺棰樼洰鏄缁撴潫闂瓟闅愯棌鐨�
+            hiddenByEnd: index > questionIndex,
           }));
+          // 灏嗗悗缁殣钘忕殑棰樼洰鍔犲叆姘镐箙闅愯棌
+          this.questionList.forEach((item, idx) => {
+            if (idx > questionIndex && !this.permanentlyHidden.includes(idx)) {
+              this.permanentlyHidden.push(idx);
+            }
+          });
         } else {
-          // 姝e父璺宠浆閫昏緫
+          // 銆愭甯歌烦杞��
           const nextQuestionIndex = selectedOptionObj.nextQuestion - 1;
-          console.log(nextQuestionIndex, 4);
-          console.log(selectedOptionObj);
-
           this.questionList = this.questionList.map((item, index) => {
-            // 淇濈暀褰撳墠棰樼洰涔嬪墠鐨勯殣钘忕姸鎬�
             if (index < questionIndex) {
               return {
                 ...item,
                 ishide: previouslyHiddenBeforeCurrent.includes(index),
-                hiddenByEnd: false, // 娓呴櫎缁撴潫鏍囪
+                hiddenByEnd: false,
               };
             }
-
-            // 褰撳墠棰樼洰鎬绘槸鍙
             if (index == questionIndex) {
               return { ...item, ishide: 0, hiddenByEnd: false };
             }
-
-            // 鏄剧ず鐩爣涓嬩竴棰�
+            // 鐩爣棰橈細鑻ュ湪姘镐箙闅愯棌鍒楄〃涓紝寮哄埗闅愯棌
             if (index == nextQuestionIndex) {
-              return { ...item, ishide: 0, hiddenByEnd: false };
+              const shouldShow = !this.permanentlyHidden.includes(index);
+              return {
+                ...item,
+                ishide: shouldShow ? 0 : 1,
+                hiddenByEnd: false,
+              };
             }
-
-            // 濡傛灉鏄箣鍓嶈缁撴潫闂瓟闅愯棌鐨勯鐩紝鐜板湪搴旇鎭㈠鏄剧ず
+            // 涔嬪墠鍥犵粨鏉熼棶绛旈殣钘忕殑棰橈細鎭㈠鏄剧ず浣嗘鏌ユ案涔呴殣钘�
             if (item.hiddenByEnd) {
-              return { ...item, ishide: 0, hiddenByEnd: false };
+              const shouldShow = !this.permanentlyHidden.includes(index);
+              return {
+                ...item,
+                ishide: shouldShow ? 0 : 1,
+                hiddenByEnd: false,
+              };
             }
-
-            // 闅愯棌褰撳墠棰樺拰鐩爣棰樹箣闂寸殑棰樼洰
+            // 闅愯棌褰撳墠棰樺拰鐩爣棰樹箣闂寸殑棰樼洰锛屽苟璁板綍姘镐箙闅愯棌
             if (index > questionIndex && index < nextQuestionIndex) {
+              if (!this.permanentlyHidden.includes(index)) {
+                this.permanentlyHidden.push(index);
+              }
               return { ...item, ishide: 1, hiddenByEnd: false };
             }
-
-            // 鍏朵粬鎯呭喌淇濇寔鍘熺姸
             return item;
           });
         }
       } else {
-        // 濡傛灉娌℃湁璺宠浆锛屽彧闇�纭繚涓嬩竴棰樺彲瑙�
-        this.questionList = this.questionList.map((item, index) => ({
-          ...item,
-          ishide: index == questionIndex + 1 ? 0 : item.ishide,
-          hiddenByEnd: index == questionIndex + 1 ? false : item.hiddenByEnd,
-        }));
+        // 銆愭棤璺宠浆銆戜粎鏄剧ず涓嬩竴棰橈紝浣嗛渶妫�鏌ユ案涔呴殣钘�
+        // 濡傛灉娌℃湁璺宠浆锛屽彧闇�纭繚涓嬩竴棰樺彲瑙侊紝浣嗛渶妫�鏌ユ案涔呴殣钘�
+        this.questionList = this.questionList.map((item, index) => {
+          if (index == questionIndex + 1) {
+            const shouldShow = !this.permanentlyHidden.includes(index);
+            return { ...item, ishide: shouldShow ? 0 : 1, hiddenByEnd: false };
+          }
+          // 鍏朵粬棰樼洰淇濇寔涓嶅彉
+          return item;
+        });
       }
-      this.$forceUpdate();
 
-      // 鍦ㄥ鐞嗗畬棰樼洰鏄剧ず/闅愯棌鍚庯紝寮哄埗鏇存柊瑙嗗浘浠ョ‘淇濆簭鍙锋纭�
+      this.$forceUpdate();
       this.$nextTick(() => {
         this.$forceUpdate();
       });
@@ -886,32 +911,46 @@
 }
 
 .questionnaire-title {
-  color: #175997;
+  color: #0d3b6b; // 鍩虹娣辫摑鑹�
   font-size: 28px;
   font-weight: 700;
   margin-bottom: 15px;
   line-height: 1.3;
+  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.4);
+
+  // 閽堝澶滈棿妯″紡鐨勪紭鍖�
+  @media (prefers-color-scheme: dark) {
+    color: #4a90d9; // 澶滈棿妯″紡浣跨敤鏇翠寒鐨勮摑鑹�
+    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+  }
 }
 
 .questionnaire-description {
   font-size: 16px;
-  color: #5a6c84;
+  color: #303a47;
   line-height: 1.8;
   max-width: 720px;
   margin: 0;
   padding: 0 16px;
-  text-align: justify; /* 涓ょ瀵归綈锛屾洿缇庤 */
-  text-indent: 2em; /* 棣栬缂╄繘 */
+  text-align: justify;
+  /* 涓ょ瀵归綈锛屾洿缇庤 */
+  text-indent: 2em;
+  /* 棣栬缂╄繘 */
 }
+
 .questionnaire-signature {
-  font-size: 15px;
-  color: #8a9bb5; /* 姣旀鏂囬鑹茬◢娴咃紝浣撶幇闄勫睘鎰� */
-  text-align: right; /* 鍙冲榻� */
+  font-size: 16px;
+  color: #303a47;
+  text-align: right;
+  /* 鍙冲榻� */
   max-width: 720px;
-  margin: 8px 0 0 auto; /* 涓婅竟璺�8px锛屽彸杈归潬榻� */
+  margin: 8px 0 0 auto;
+  /* 涓婅竟璺�8px锛屽彸杈归潬榻� */
   padding: 0 16px;
-  letter-spacing: 1px; /* 瀛楅棿璺濈◢瀹斤紝鏇存湁钀芥鎰� */
+  letter-spacing: 1px;
+  /* 瀛楅棿璺濈◢瀹斤紝鏇存湁钀芥鎰� */
 }
+
 .custom-divider {
   margin: 25px 0;
   background-color: #eaeef2;
@@ -972,11 +1011,24 @@
 
 .question-stem {
   display: grid;
-  grid-template-columns: auto 1fr auto; /* 棰樺彿鑷�傚簲锛屾枃鏈崰婊″墿浣欑┖闂达紝棰樺瀷鏍囩鑷�傚簲 */
+  grid-template-columns: auto 1fr auto;
   gap: 3px;
-  align-items: center;
+  align-items: start;
+  /* 鏀逛负 start 閬垮厤灞呬腑瀵艰嚧鐨勮瑙夐棶棰� */
   margin-bottom: 20px;
   font-size: 18px;
+}
+
+.question-text {
+  line-height: 1.5;
+  color: #2c3e50;
+  font-weight: 500;
+  word-wrap: break-word;
+  overflow-wrap: break-word;
+  white-space: normal;
+  /* 纭繚鍏佽鎹㈣ */
+  min-width: 0;
+  /* 闃叉 grid 椤规孩鍑� */
 }
 
 .question-number {
@@ -985,14 +1037,14 @@
   min-width: 16px;
 }
 
-.question-text {
-  line-height: 1.5;
-  color: #2c3e50;
-  font-weight: 500;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
+// .question-text {
+//   line-height: 1.5;
+//   color: #2c3e50;
+//   font-weight: 500;
+//   overflow: hidden;
+//   text-overflow: ellipsis;
+//   white-space: nowrap;
+// }
 
 .question-type-tag {
   color: #3ba2f7;
@@ -1002,38 +1054,77 @@
 }
 
 .question-options {
-  margin: 15px 0;
+  margin: 12px 0;
+  padding: 0 4px;
 }
 
-.options-group {
-  display: flex;
-  flex-direction: column;
-  gap: 12px;
+::v-deep .el-radio-group.options-group,
+::v-deep .el-checkbox-group.options-group {
+  display: grid;
+  grid-template-columns: repeat(2, 1fr);
+  gap: 10px;
+  width: 100%;
 }
 
+// 鍚屾牱澶勭悊澶氶�夌殑鎯呭喌
+::v-deep .el-checkbox-group {
+  display: grid;
+  grid-template-columns: repeat(2, 1fr);
+  gap: 10px;
+  width: 100%;
+
+  @media (max-width: 420px) {
+    grid-template-columns: 1fr;
+  }
+}
+
+// 淇敼閫夐」鐨勬牱寮�
 .option-radio,
 .option-checkbox {
   margin: 0;
-  padding: 12px 15px;
+  padding: 10px 12px;
   border-radius: 6px;
   border: 1px solid #e0e0e0;
   transition: all 0.2s;
+  display: flex;
+  align-items: center;
+  width: 100%;
+  box-sizing: border-box;
 
   &:hover {
     border-color: #c0c4cc;
     background-color: #f8fafc;
   }
+
+  // 纭繚鍐呴儴鍐呭鑷�傚簲
+  :deep(.el-radio__label),
+  :deep(.el-checkbox__label) {
+    display: inline;
+    font-size: 15px;
+    line-height: 1.4;
+    word-break: break-all; // 鍏佽鍦ㄤ换鎰忓瓧绗﹀鎹㈣
+    white-space: normal; // 鍏佽鑷姩鎹㈣
+    padding-left: 6px;
+  }
+
+  // 纭繚 radio/checkbox 鍥炬爣涓嶅帇缂�
+  :deep(.el-radio__input),
+  :deep(.el-checkbox__input) {
+    flex-shrink: 0;
+  }
 }
 
-:deep(.option-radio .el-radio__label),
-:deep(.option-checkbox .el-checkbox__label) {
-  display: flex;
-  align-items: center;
-  font-size: 16px;
-}
+// :deep(.option-radio .el-radio__label),
+// :deep(.option-checkbox .el-checkbox__label) {
+//   display: flex;
+//   align-items: center;
+//   font-size: 16px;
+// }
 
 .option-text {
-  margin-right: 5px;
+  word-break: break-all;
+  white-space: normal;
+  line-height: 1.4;
 }
 
 .abnormal-indicator {
@@ -1065,6 +1156,7 @@
 .question-warning {
   margin-top: 15px;
 }
+
 .append-input-container {
   margin-top: 15px;
   padding: 10px;
@@ -1072,6 +1164,7 @@
   border-radius: 4px;
   border: 1px solid #dcdfe6;
 }
+
 .warning-alert {
   :deep(.el-alert__title) {
     font-size: 15px;
@@ -1162,11 +1255,11 @@
     font-size: 16px;
   }
 
-  .question-stem {
-    font-size: 16px;
-    flex-direction: column;
-    align-items: flex-start;
-  }
+  // .question-stem {
+  //   font-size: 16px;
+  //   flex-direction: column;
+  //   align-items: flex-start;
+  // }
 
   .question-type-tag {
     margin-left: 0;
@@ -1215,6 +1308,7 @@
     font-size: 16px;
   }
 }
+
 .loading-container {
   display: flex;
   justify-content: center;
@@ -1246,6 +1340,7 @@
   from {
     transform: rotate(0deg);
   }
+
   to {
     transform: rotate(360deg);
   }

--
Gitblit v1.9.3