From c70f5e1d471ddf002ef0ebd5f4c6a5ed1c865d0d Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 21 十月 2026 17:47:58 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/record/detailpage/index.vue |  336 ++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 292 insertions(+), 44 deletions(-)

diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index 4f97c69..1f704a4 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -127,6 +127,29 @@
               </el-tooltip>
             </template>
           </el-table-column>
+                <el-table-column
+            v-if="
+              orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�' ||
+              orgname == '涓芥按甯備腑鍖婚櫌'
+            "
+            label="鎷ㄥ彿鐘舵��"
+            width="120"
+            align="center"
+            key="isManuallyCalled"
+            prop="isManuallyCalled"
+          >
+            <template slot-scope="scope">
+              <el-tag
+                v-if="Number(scope.row.isManuallyCalled) > 0"
+                type="success"
+                :disable-transitions="false"
+                >鎷ㄩ�歿{ scope.row.isManuallyCalled }}娆�</el-tag
+              >
+              <el-tag v-else type="info" :disable-transitions="false"
+                >鏈嫧閫�</el-tag
+              >
+            </template>
+          </el-table-column>
           <el-table-column
             prop="finishtime"
             align="center"
@@ -283,6 +306,8 @@
           >
           </el-table-column>
 
+
+
           <el-table-column
             prop="bankcardno"
             align="center"
@@ -336,7 +361,8 @@
             v-if="
               (orgname == '鍗楀崕澶у闄勫睘绗竴鍖婚櫌' ||
                 orgname == '涓芥按甯傜浜屼汉姘戝尰闄�' ||
-                orgname == '缂欎簯鍘夸汉姘戝尰闄�'||
+                orgname == '缂欎簯鍘夸汉姘戝尰闄�' ||
+                orgname == '涓芥按甯傚骞间繚鍋ラ櫌' ||
                 orgname == '鏉鹃槼鍘夸腑鍖诲尰闄�') &&
               !Voicetype
             "
@@ -382,14 +408,25 @@
                         type="primary"
                         round
                         @click="smsSubTask"
-                        v-if="orgname != '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+                        v-if="
+                          orgname != '鐪佺珛鍚屽痉缈犺嫅闄㈠尯' &&
+                          orgname != '涓芥按甯備腑鍖婚櫌'
+                        "
                       >
                         闂嵎鐭俊鎺ㄩ��
+                      </el-button>
+                      <el-button
+                        type="primary"
+                        round
+                        @click="weChatSubTask"
+                        v-if="orgname == '涓芥按甯備腑鍖婚櫌'"
+                      >
+                        闂嵎寰俊鎺ㄩ��
                       </el-button>
                     </span>
                   </div>
 
-                  <div class="preview-left" v-if="!Voicetype">
+                  <div class="preview-left" v-if="showQuestionnaireForm">
                     <div
                       class="topic-dev"
                       v-for="(item, index) in tableDatatop"
@@ -600,12 +637,12 @@
                     </div>
                   </div>
                   <el-button
-                    v-if="Voicetype"
+                    v-if="showQuestionnaireForm"
                     type="primary"
-                    @click="yuyingetdetail"
+                    @click="getdetail"
                     >淇濆瓨闂嵎璇︽儏</el-button
                   >
-                  <el-button v-else type="primary" @click="getdetail"
+                  <el-button v-else type="primary" @click="yuyingetdetail"
                     >淇濆瓨闂嵎璇︽儏</el-button
                   >
                 </div>
@@ -705,6 +742,15 @@
                   v-if="(form.isVisitAgain == 1) & (visitAgain == 2)"
                 >
                   鍐嶆闅忚
+                </el-button>
+                <!-- 瓒呮椂鏈嶅姟锛氱鐞嗗憳鍙皢瀹屾垚鏃堕棿鏀逛负搴旈殢璁挎椂闂淬�佺姸鎬佹敼涓哄凡瀹屾垚 -->
+                <el-button
+                  type="danger"
+                  plain
+                  @click="handleTimeoutComplete"
+                  v-if="form.sendstate == 7 && isAdmin"
+                >
+                  瓒呮椂鏍囪宸插畬鎴�
                 </el-button>
               </div>
 
@@ -989,16 +1035,29 @@
           <div class="collapse-section">
             <el-collapse v-model="collapseActive" accordion>
               <el-collapse-item title="鎮h�呮。妗堜俊鎭�" name="patient">
-                <el-form ref="userform2" :model="userform" label-width="90px" size="small">
+                <el-form
+                  ref="userform2"
+                  :model="userform"
+                  label-width="90px"
+                  size="small"
+                >
                   <el-row :gutter="16">
                     <el-col :span="12">
                       <el-form-item label="鎮h�呭鍚�">
-                        <el-input v-model="userform.name" placeholder="璇疯緭鍏ュ鍚�" maxlength="30"></el-input>
+                        <el-input
+                          v-model="userform.name"
+                          placeholder="璇疯緭鍏ュ鍚�"
+                          maxlength="30"
+                        ></el-input>
                       </el-form-item>
                     </el-col>
                     <el-col :span="12">
                       <el-form-item label="鎬у埆">
-                        <el-select v-model="userform.sex" placeholder="璇烽�夋嫨" style="width: 100%">
+                        <el-select
+                          v-model="userform.sex"
+                          placeholder="璇烽�夋嫨"
+                          style="width: 100%"
+                        >
                           <el-option label="鐢�" :value="1"></el-option>
                           <el-option label="濂�" :value="2"></el-option>
                         </el-select>
@@ -1008,53 +1067,78 @@
                   <el-row :gutter="16">
                     <el-col :span="12">
                       <el-form-item label="骞撮緞">
-                        <el-input v-model="userform.age" placeholder="璇疯緭鍏ュ勾榫�" maxlength="20"></el-input>
+                        <el-input
+                          v-model="userform.age"
+                          placeholder="璇疯緭鍏ュ勾榫�"
+                          maxlength="20"
+                        ></el-input>
                       </el-form-item>
                     </el-col>
                     <el-col :span="12">
                       <el-form-item label="鑱旂郴鏂瑰紡">
-                        <el-input v-model="userform.telcode" placeholder="璇疯緭鍏ヨ仈绯绘柟寮�" maxlength="20"></el-input>
+                        <el-input
+                          v-model="userform.telcode"
+                          placeholder="璇疯緭鍏ヨ仈绯绘柟寮�"
+                          maxlength="20"
+                        ></el-input>
                       </el-form-item>
                     </el-col>
                   </el-row>
                   <el-row :gutter="16">
                     <el-col :span="24">
                       <el-form-item label="浜插睘鐢佃瘽">
-                        <el-input v-model="userform.relativetelcode" placeholder="璇疯緭鍏ヤ翰灞炶仈绯绘柟寮�" maxlength="20"></el-input>
+                        <el-input
+                          v-model="userform.relativetelcode"
+                          placeholder="璇疯緭鍏ヤ翰灞炶仈绯绘柟寮�"
+                          maxlength="20"
+                        ></el-input>
                       </el-form-item>
                     </el-col>
                   </el-row>
                   <el-row :gutter="16">
                     <el-col :span="24">
                       <el-form-item label="璇婃柇鍚嶇О">
-                        <el-input v-model="form.leavediagname" placeholder="璇疯緭鍏ヨ瘖鏂�" maxlength="50"></el-input>
+                        <el-input
+                          v-model="form.leavediagname"
+                          placeholder="璇疯緭鍏ヨ瘖鏂�"
+                          maxlength="50"
+                        ></el-input>
                       </el-form-item>
                     </el-col>
                   </el-row>
                   <el-row :gutter="16">
                     <el-col :span="24">
                       <el-form-item label="鍑虹敓鍦�">
-                        <el-input v-model="userform.birthplace" placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑" maxlength="50"></el-input>
+                        <el-input
+                          v-model="userform.birthplace"
+                          placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑"
+                          maxlength="50"
+                        ></el-input>
                       </el-form-item>
                     </el-col>
                   </el-row>
                   <el-row :gutter="16">
                     <el-col :span="24">
                       <el-form-item label="灞呬綇鍦�">
-                        <el-input v-model="userform.placeOfResidence" placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑" maxlength="50"></el-input>
+                        <el-input
+                          v-model="userform.placeOfResidence"
+                          placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑"
+                          maxlength="50"
+                        ></el-input>
                       </el-form-item>
                     </el-col>
                   </el-row>
                 </el-form>
               </el-collapse-item>
-              <el-collapse-item title="鎶曡瘔寤鸿" name="advice" v-if="orgname=='缂欎簯鍘夸汉姘戝尰闄�'">
+              <el-collapse-item
+                title="鎶曡瘔寤鸿"
+                name="advice"
+                v-if="orgname == '缂欎簯鍘夸汉姘戝尰闄�'"
+              >
                 <AdviceList :subid="taskid" :taskid="id" :patid="patid" />
               </el-collapse-item>
             </el-collapse>
           </div>
-
-
-
         </div>
       </div>
     </div>
@@ -1073,7 +1157,7 @@
           <!-- 娉ㄦ剰杩欓噷鍙兘浣跨敤 userform.telcode -->
         </el-form-item>
         <el-form-item label="绉戝">
-          <el-input style="width: 400px" v-model="form.deptname"></el-input>
+          <el-input style="width: 400px" v-model="form.leaveldeptname"></el-input>
         </el-form-item>
         <el-form-item label="鐥呭尯">
           <el-input
@@ -1096,9 +1180,9 @@
       title="鎮h�呭啀娆¢殢璁�"
       v-dialogDrags
       :visible.sync="dialogFormVisible"
-      width="700px"
+      width="900px"
     >
-      <el-form ref="zcform" :rules="zcrules" :model="form" label-width="80px">
+      <el-form ref="zcform" :rules="zcrules" :model="form" label-width="120px">
         <!-- 鍩虹鏈嶅姟淇℃伅 - 榛樿鎶樺彔 -->
         <el-collapse v-model="activeNames" @change="handleCollapseChange">
           <el-collapse-item title="鍩虹鏈嶅姟淇℃伅" name="basic">
@@ -1127,7 +1211,7 @@
               <el-input
                 style="width: 100%"
                 disabled
-                v-model="form.deptname"
+                v-model="form.leaveldeptname"
               ></el-input>
             </el-form-item>
             <el-form-item label="鐥呭尯">
@@ -1198,6 +1282,13 @@
 
           <!-- 涓嬫闅忚淇℃伅 - 榛樿灞曞紑 -->
           <el-collapse-item title="涓嬫闅忚" name="next">
+            <el-form-item label="鍐嶆闅忚浠诲姟">
+              <el-input
+                disabled
+                v-model="nextTaskName"
+                placeholder="鍐嶆闅忚浠诲姟"
+              ></el-input>
+            </el-form-item>
             <el-row>
               <el-col :span="12">
                 <el-form-item label="闅忚鏂瑰紡" prop="visitType">
@@ -1245,6 +1336,12 @@
             <el-form-item label="闅忚璁板綍" :required="form.resource == '2'">
               <el-input type="textarea" v-model="form.remark"></el-input>
             </el-form-item>
+            <el-form-item label="鍖荤敓澶勭悊鎰忚" prop="doctorOpinion">
+              <el-input
+                type="textarea"
+                v-model="form.doctorOpinion"
+              ></el-input>
+            </el-form-item>
           </el-collapse-item>
         </el-collapse>
       </el-form>
@@ -1264,7 +1361,11 @@
         :visible.sync="CaldialogVisible"
         width="60%"
       >
-        <CallCenterLs ref="CallCenterLs" :initial-phone="currentPhoneNumber" />
+        <CallCenterLs
+          ref="CallCenterLs"
+          :initial-phone="currentPhoneNumber"
+          @call-connected="recordCallConnected"
+        />
       </el-dialog>
     </div>
   </div>
@@ -1288,8 +1389,10 @@
   query360PatInfonh,
   sendMsg,
   smsSubTask,
+  weChatSubTask,
   getconfigKey,
 } from "@/api/AiCentre/index";
+import { getIvrtask } from "@/api/smartor/ivrtask";
 import {
   messagelistpatient,
   alterpatient,
@@ -1439,6 +1542,7 @@
       input: "浠婂ぉ韬綋杩樹笉閿�",
       radio: "2",
       taskname: "",
+      nextTaskName: "",
       activeName: "wj",
       voice: "",
       templateid: "",
@@ -1534,6 +1638,9 @@
             },
             trigger: "change",
           },
+        ],
+        doctorOpinion: [
+          { required: true, message: "璇疯緭鍏ュ尰鐢熷鐞嗘剰瑙�", trigger: "blur" },
         ],
       },
       userrules: {
@@ -1657,6 +1764,15 @@
         failed: "error",
       };
       return typeMap[this.callStatus];
+    },
+    // 鏄惁浠ラ棶鍗峰舰寮忓睍绀猴紙闈炶闊虫湇鍔★紝鎴栬闊虫湇鍔′絾鏃犲畬鏁磋闊虫暟鎹渶鎵嬪姩濉姤锛�
+    showQuestionnaireForm() {
+      return !this.Voicetype;
+    },
+    // 鏄惁涓虹鐞嗗憳瑙掕壊
+    isAdmin() {
+      const roles = this.$store.getters.roles || [];
+      return roles.includes("admin") || roles.includes("sysadmin");
     },
   },
   created() {
@@ -1992,7 +2108,7 @@
         if (res.code == 200) {
           this.voiceDatatop = res.data.serviceSubtaskDetails;
           this.voice = res.data.voice;
-          this.activeName = "yy";
+          this.activeName = this.voice ? "yy" : "wj";
           this.taskname = res.data.taskName;
           // 闂嵎灞曠ず鏁版嵁澶勭悊
           this.tableDatatop = res.data.filteredDetails;
@@ -2027,9 +2143,12 @@
                 .map((obj) => obj.targetvalue)
                 .join("&");
             }
+            console.log(item.targetvalue, "item.targetvalue");
+
             if (item.targetvalue) {
               item.scriptResult = item.targetvalue.split("&");
             }
+            console.log(item.scriptResult);
           });
         }
       });
@@ -2095,8 +2214,11 @@
           this.$modal.msgSuccess("鏈嶅姟淇濆瓨鎴愬姛");
           this.Editsingletasksonyic(this.serviceStates);
           const orgName = localStorage.getItem("orgname");
-
-          if (this.form.isVisitAgain != 1 || this.visitAgain == 1) {
+          if (
+            this.form.isVisitAgain != 1 ||
+            orgName == "涓芥按甯備腑鍖婚櫌" ||
+            this.visitAgain == 1
+          ) {
             this.Torouter();
             return;
           }
@@ -2153,7 +2275,8 @@
           });
         }
       } else {
-        location.reload();
+        // location.reload();
+        this.$router.go(-1);
       }
     },
     // 鐢佃瘽============================
@@ -2236,6 +2359,22 @@
           console.log(err);
         });
     },
+    weChatSubTask() {
+      this.$modal
+        .confirm("鏄惁鍚戞偅鑰呴�氳繃寰俊鎺ㄩ�侀棶鍗峰唴瀹癸紵")
+        .then(() => {
+          weChatSubTask(this.id).then((res) => {
+            if (String(res.code) === "200") {
+              this.$modal.msgSuccess(res.msg || "鍙戦�佹垚鍔�");
+            } else {
+              this.$modal.msgError(res.message || res.msg || "鍙戦�佸け璐�");
+            }
+          });
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
     handleConfirmReplace() {
       // 閬嶅巻鎵�鏈夐鐩紙tableDatatop锛�
       this.tableDatatop.forEach((item) => {
@@ -2286,7 +2425,7 @@
         this.CaldialogVisible = true;
         return;
       }
-      // 涓嬫柟鏄腑鍖婚櫌鍛煎彨
+      // 涓嬫柟鏄附姘村競涓尰闄�
       if (this.isSipRegistering) {
         this.$message.warning("绯荤粺姝e湪鍒濆鍖栵紝璇风◢鍊�...");
         return;
@@ -2316,11 +2455,15 @@
       this.callStatus = status.type;
 
       if (status.type === "connected") {
-        this.currentCall = {
-          phone: this.currentPhoneNumber,
-          type: this.callType,
-          startTime: new Date(),
-        };
+        if (!this.currentCall) {
+          this.currentCall = {
+            phone: this.currentPhoneNumber,
+            type: this.callType,
+            startTime: new Date(),
+          };
+          // 涓芥按甯備腑鍖婚櫌锛氱數璇濇帴閫氬悗璁板綍鎷ㄦ墦鎴愬姛娆℃暟
+          this.recordCallConnected();
+        }
       } else if (status.type === "ended" || status.type === "failed") {
         this.currentCall = null;
       }
@@ -2329,6 +2472,39 @@
       if (status.type === "failed") {
         this.$message.error(`鍛煎彨澶辫触: ${status.text}`);
       }
+    },
+    // 鐢佃瘽鎷ㄦ墦鎴愬姛鍚庯紙鎺ラ�氾級娆℃暟 +1锛屽苟閫氳繃 Editsingletaskson 鏇存柊鏈嶅姟鏁版嵁
+    // 浠呴檺鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄笌涓芥按甯備腑鍖婚櫌
+    recordCallConnected() {
+      const allowedOrgs = ["鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�", "涓芥按甯備腑鍖婚櫌"];
+      if (!allowedOrgs.includes(this.orgname)) return;
+
+      getTaskservelist({
+        patid: this.patid,
+        subId: this.id,
+      }).then((res) => {
+        if (res.code == 200) {
+          const objson = res.rows[0].serviceSubtaskList.find(
+            (item) => item.id == this.id
+          );
+          if (!objson) return;
+          objson.isManuallyCalled = (Number(objson.isManuallyCalled) || 0) + 1;
+          Editsingletaskson(objson).then((r) => {
+            if (r.code == 200) {
+              // 鍙婃椂鏇存柊椤堕儴鏈嶅姟鍒楄〃涓庤〃鍗曚腑鐨勬嫧鍙风姸鎬�
+              const localRow = (this.logsheetlist || []).find(
+                (item) => item.id == this.id
+              );
+              if (localRow) {
+                localRow.isManuallyCalled = objson.isManuallyCalled;
+              }
+              if (this.form && this.form.id == this.id) {
+                this.form.isManuallyCalled = objson.isManuallyCalled;
+              }
+            }
+          });
+        }
+      });
     },
     // 缁撴潫褰撳墠閫氳瘽
     endCurrentCall() {
@@ -2384,7 +2560,7 @@
       savequestiondetail(obj).then((res) => {
         if (res.code == 200) {
           this.$modal.msgSuccess("鏈嶅姟淇濆瓨鎴愬姛");
-          // this.Torouter();
+
           if (
             this.form.isVisitAgain != 1 ||
             orgName == "涓芥按甯備腑鍖婚櫌" ||
@@ -2395,6 +2571,7 @@
             this.Torouter();
             return;
           }
+
           this.$modal
             .confirm(
               '浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
@@ -2458,6 +2635,7 @@
           console.log(this.form.templatename, "templatename");
 
           this.form.remark = this.form.remark || "";
+          this.form.doctorOpinion = this.form.doctorOpinion || "";
           this.logsheetlist = res.rows[0].serviceSubtaskList;
           this.templateid = this.form.templateid;
           this.selectedTag = this.form.excep;
@@ -2491,7 +2669,7 @@
         name: this.form.sendname,
         age: this.form.age,
         phone: this.userform.telcode,
-        deptName: this.form.deptname,
+        deptName: this.form.leaveldeptname,
         wardName: this.form.leavehospitaldistrictname,
         smsTemplate: `灏婃暚鐨�${this.form.sendname}锛屾偍濂斤紒`,
       });
@@ -2576,6 +2754,36 @@
         }
       });
     },
+    // 瓒呮椂鏈嶅姟锛氱鐞嗗憳灏嗗畬鎴愭椂闂存敼涓哄簲闅忚鏃堕棿銆佺姸鎬佹敼涓哄凡瀹屾垚
+    handleTimeoutComplete() {
+      this.$modal
+        .confirm(
+          "鏄惁灏嗚瓒呮椂鏈嶅姟鐨勯殢璁垮畬鎴愭椂闂磋皟鏁翠负搴旈殢璁挎椂闂达紝骞跺皢闅忚鐘舵�佹敼涓哄凡瀹屾垚锛�"
+        )
+        .then(() => {
+          getTaskservelist({
+            patid: this.patid,
+            subId: this.id,
+          }).then((res) => {
+            if (res.code == 200) {
+              const objson = res.rows[0].serviceSubtaskList.find(
+                (item) => item.id == this.id
+              );
+              if (objson) {
+                objson.finishtime = objson.visitTime;
+                objson.sendstate = 6;
+                Editsingletaskson(objson).then((res) => {
+                  if (res.code) {
+                    this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+                    this.getTaskservelist();
+                  }
+                });
+              }
+            }
+          });
+        })
+        .catch(() => {});
+    },
     alterpatient(sendstate) {
       this.Editsingletasksonyic(this.serviceStates);
       // alterpatient(this.userform).then((res) => {
@@ -2617,12 +2825,33 @@
       return tag ? tag.description : "";
     },
 
+    // 鑾峰彇鍐嶆闅忚浠诲姟淇℃伅锛堜笅娆¢殢璁块儴鍒嗗睍绀猴級
+    fetchNextTaskInfo() {
+      const taskid = this.form.taskid || this.taskid;
+      if (!taskid) {
+        this.nextTaskName = "";
+        return;
+      }
+      getIvrtask(taskid).then((r) => {
+        const task = r.data || {};
+        const nextid = task.nexttaskid;
+        if (nextid) {
+          getIvrtask(nextid).then((r2) => {
+            this.nextTaskName =
+              (r2.data && r2.data.taskName) || task.nexttaskname || "";
+          });
+        } else {
+          this.nextTaskName = task.nexttaskname || "";
+        }
+      });
+    },
     // 璋冭捣鍐嶆鍙戦��
     sendAgain() {
+      this.fetchNextTaskInfo();
       getTaskservelist({
         patid: this.patid,
         visitCount: 2,
-        leaveldeptcodes: [this.form.deptcode],
+        leaveldeptcodes: [this.form.leaveldeptcode],
       }).then((res) => {
         if (res.rows[0].serviceSubtaskList.length) {
           if (
@@ -2632,7 +2861,7 @@
             this.$modal
               .confirm(
                 '鏈偅鑰呭湪"' +
-                  res.rows[0].serviceSubtaskList[0].deptname +
+                  res.rows[0].serviceSubtaskList[0].leaveldeptname +
                   '"绉戝涓嬪凡鏈夊啀娆¢殢璁挎湇鍔¤繘琛屼腑鏄惁缁х画鍒涘缓锛�'
               )
               .then(() => {
@@ -2697,6 +2926,7 @@
         // 鍚屾椂閲嶇疆涓庨�夐」鐩稿叧鐨勭姸鎬�
         // questionItem.isabnormal = false;
         questionItem.showAppendInput = false;
+        questionItem.score = null; // 鍙栨秷閫変腑鍚庢竻绌洪鐩垎鏁�
         // 娉ㄦ剰锛氬彇娑堥�変腑鏃讹紝鎴戜滑閫氬父涓嶅笇鏈涜Е鍙戦鐩烦杞�昏緫锛屾墍浠ョ洿鎺ヨ繑鍥�
         // 濡傛灉闇�瑕侊紝鍙互鍦ㄨ繖閲屾坊鍔犲彇娑堥�変腑鍚庣殑鐗瑰畾閫昏緫锛屼緥濡傞噸缃鐩簭鍒�
       } else {
@@ -2734,6 +2964,9 @@
       // 澶勭悊寮傚父鐘舵�侀珮浜�
       this.tableDatatop[questionIndex].isabnormal =
         selectedOptionObj.isabnormal;
+
+      // 澶勭悊鍒嗘暟锛氭妸閫変腑閫夐」鐨� score 甯﹀埌棰樼洰 score 涓�
+      this.tableDatatop[questionIndex].score = selectedOptionObj.score;
 
       // 澶勭悊闄勫姞杈撳叆妗嗘樉绀�
 
@@ -2828,6 +3061,10 @@
           if (obj.isabnormal) {
             this.tableDatatop[index].isabnormal = obj.isabnormal;
           }
+          // 鍥炴樉鍗曢�夐鐩垎鏁帮細鎶婂凡閫変腑閫夐」鐨� score 甯﹀埌棰樼洰 score 涓�
+          if (obj.score !== undefined && obj.score !== null) {
+            this.tableDatatop[index].score = obj.score;
+          }
           this.$forceUpdate();
         }
       });
@@ -2853,11 +3090,11 @@
             if (form.resource == 2) {
               form.visitDeptCode = localStorage.getItem("deptCode")
                 ? localStorage.getItem("deptCode")
-                : form.deptcode;
+                : form.leaveldeptcode;
               form.visitDeptName = "闅忚涓績";
             } else {
-              form.visitDeptCode = form.deptcode;
-              form.visitDeptName = form.deptname;
+              form.visitDeptCode = form.leaveldeptcode;
+              form.visitDeptName = form.leaveldeptname;
             }
           } else {
             this.$modal.msgError("鏈�夋嫨闅忚鏂瑰紡");
@@ -2899,7 +3136,18 @@
 
       return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
     },
-    updateScore(a, b, c) {},
+    // 澶氶�夛細鎶婇�変腑閫夐」鐨勫垎鏁扮疮鍔犲埌棰樼洰 score 涓�
+    updateScore(selectedValues, questionIndex, question) {
+      const options = question.svyTaskTemplateTargetoptions || [];
+      const score = options.reduce((sum, opt) => {
+        if (selectedValues && selectedValues.includes(opt.optioncontent)) {
+          return sum + (Number(opt.score) || 0);
+        }
+        return sum;
+      }, 0);
+      question.score = score;
+      this.$forceUpdate();
+    },
     // 鍚堝苟淇敼鐩稿叧=============================
     toggleMergeMode() {
       this.isMergeMode = !this.isMergeMode;
@@ -3540,14 +3788,14 @@
   margin-top: 20px;
 }
 
-.el-input.is-disabled .el-input__inner {
+::v-deep .el-input.is-disabled .el-input__inner {
   background-color: #fff;
   border-color: #dcdfe6;
   color: #080808 !important;
   cursor: not-allowed;
 }
 
-.el-textarea.is-disabled .el-textarea__inner {
+::v-deep .el-textarea.is-disabled .el-textarea__inner {
   background-color: #fff;
   border-color: #dcdfe6;
   color: #080808 !important;

--
Gitblit v1.9.3