WXL (wul)
2 天以前 43017c316ab6a2e11305a7f016b12d13736e8cc1
src/views/followvisit/record/detailpage/index.vue
@@ -52,6 +52,7 @@
        <el-table
          :data="logsheetlist"
          :row-class-name="tableRowClassName"
          :max-height="350"
          style="width: 100%"
          @selection-change="handleSelectionChange"
        >
@@ -281,11 +282,7 @@
                    >
                      <!-- 单选 -->
                      <div
                        :class="
                          item.isabnormal
                            ? 'scriptTopic-isabnormal'
                            : 'scriptTopic-dev'
                        "
                        :class="getTopicClass(item)"
                        :key="index"
                        v-if="item.scriptType == 1 && !item.astrict"
                      >
@@ -295,24 +292,22 @@
                          }}</span>
                        </div>
                        <div class="dev-xx">
                          <el-radio-group
                            v-model="item.scriptResult"
                            @change="
                              handleOptionChange(
                                $event,
                                index,
                                item.svyLibTemplateTargetoptions,
                                item
                              )
                            "
                          >
                          <el-radio-group v-model="item.scriptResult">
                            <el-radio
                              v-for="(
                                items, indexs
                              ) in item.svyLibTemplateTargetoptions"
                              :class="items.isabnormal ? 'red-star' : ''"
                              ) in item.svyTaskTemplateTargetoptions"
                              :class="getOptionClass(items)"
                              :key="indexs"
                              :label="items.optioncontent"
                              @click.native.prevent="
                                handleRadioToggle(
                                  item,
                                  index,
                                  item.svyTaskTemplateTargetoptions,
                                  items.optioncontent
                                )
                              "
                              >{{ items.optioncontent }}</el-radio
                            >
                          </el-radio-group>
@@ -359,7 +354,7 @@
                              @change="$forceUpdate()"
                              v-for="(
                                items, indexs
                              ) in item.svyLibTemplateTargetoptions"
                              ) in item.svyTaskTemplateTargetoptions"
                              :key="indexs"
                              :label="items.optioncontent"
                            >
@@ -433,8 +428,9 @@
                          >
                            <el-radio
                              v-for="(items, index) in item.scriptResult"
                              :key="items"
                              :key="index"
                              :label="items"
                              :class="items.isabnormal ? 'red-star' : ''"
                              >{{ items }}</el-radio
                            >
                          </el-radio-group>
@@ -632,8 +628,8 @@
                        icon="el-icon-phone"
                        @click="handleCall(userform.telcode, 'tel')"
                        :disabled="!isValidPhone(userform.telcode)"
                      ></el-button
                    ></el-input> </el-form-item
                      ></el-button>
                    </el-input> </el-form-item
                ></el-col>
              </el-row>
              <el-row>
@@ -668,29 +664,65 @@
                  style="display: none"
                />
                <div v-if="callStatus === 'connected'" class="hangup-btn">
                <!-- 挂断按钮样式优化 -->
                <div v-if="callStatus === 'connected'" class="hangup-container">
                  <el-button
                    type="danger"
                    icon="el-icon-phone"
                    @click="endCurrentCall"
                    :loading="isEndingCall"
                    class="hangup-btn"
                    size="medium"
                  >
                    挂断电话
                    {{ isEndingCall ? "挂断中..." : "挂断电话" }}
                  </el-button>
                  <!-- 通话计时显示 -->
                  <div class="call-timer" v-if="callStartTime">
                    通话时长: {{ formatCallTime }}
                  </div>
                </div>
                <div class="call-status" v-if="callStatus !== 'idle'">
                <!-- 状态提示优化 -->
                <div class="call-status-container" v-if="callStatus !== 'idle'">
                  <el-alert
                    :title="callStatusText"
                    :type="callStatusType"
                    :closable="false"
                    show-icon
                    :class="['status-alert', `status-${callStatus}`]"
                  />
                </div>
                <!-- SIP注册状态提示 -->
                <div v-if="isSipRegistering&&orgname == '丽水市中医院'" class="sip-registering">
                  <el-alert
                    title="呼叫座机初始化中,请稍候..."
                    type="info"
                    :closable="false"
                    show-icon
                    class="registering-alert"
                  />
                </div>
              </div>
              <el-form-item label="随访记录">
              <el-form-item label="随访内容" v-if="orgname == '丽水市中医院'">
                <el-input type="textarea" v-model="form.remark"></el-input>
              </el-form-item>
              <el-form-item label="随访记录" v-else>
                <el-input type="textarea" v-model="form.remark"></el-input>
              </el-form-item>
              <el-form-item label="随访情况" v-if="orgname == '丽水市中医院'">
                <el-radio-group v-model="form.taskSituation">
                  <el-radio
                    v-for="city in cities"
                    :label="city.value"
                    :value="city.value"
                    :key="city.value"
                    >{{ city.label }}</el-radio
                  >
                </el-radio-group>
              </el-form-item>
              <el-form-item label="处理意见">
                <div>
                  <el-button
@@ -736,6 +768,24 @@
                </el-row>
                <el-row :gutter="20">
                  <el-col :span="12"
                    ><el-form-item label="性别" prop="telcode">
                      <el-select v-model="userform.sex" placeholder="请选择">
                        <el-option label="男" :value="1"> </el-option>
                        <el-option label="女" :value="2"> </el-option>
                      </el-select> </el-form-item
                  ></el-col>
                  <el-col :span="12">
                    <el-form-item label="年龄" prop="name">
                      <el-input
                        v-model="userform.age"
                        placeholder="请输入姓名"
                        maxlength="20"
                      ></el-input> </el-form-item
                  ></el-col>
                </el-row>
                <el-row :gutter="20">
                  <el-col :span="12"
                    ><el-form-item label="联系方式" prop="telcode">
                      <el-input
                        v-model="userform.telcode"
@@ -749,6 +799,16 @@
                        v-model="userform.relativetelcode"
                        placeholder="请输入姓名"
                        maxlength="20"
                      ></el-input> </el-form-item
                  ></el-col>
                </el-row>
                <el-row :gutter="20">
                  <el-col :span="24">
                    <el-form-item label="诊断名称" prop="name">
                      <el-input
                        v-model="form.leavediagname"
                        placeholder="请输入诊断"
                        maxlength="50"
                      ></el-input> </el-form-item
                  ></el-col>
                </el-row>
@@ -920,14 +980,14 @@
        <el-divider></el-divider>
        <el-row>
          <el-col :span="12">
            <el-form-item label="随访方式" prop="date1">
            <el-form-item label="随访方式" prop="visitType">
              <el-select
                v-model="form.visitType"
                filterable
                allow-create
                default-first-option
                @change="visitChange"
                placeholder="请选择随访方式(依出院时间技计算)"
                placeholder="请选择随访方式(依出院时间计算)"
              >
                <el-option
                  v-for="item in options"
@@ -948,6 +1008,8 @@
                align="right"
                v-model="form.date1"
                class="custom-disabled"
                value-format="yyyy-MM-dd"
                @change="checkFollowupDate"
              ></el-date-picker>
            </el-form-item>
          </el-col>
@@ -970,6 +1032,18 @@
        <el-button type="primary" @click="setupsubtask">确认创建服务</el-button>
      </div>
    </el-dialog>
    <div class="main-content" v-if="orgname == '景宁畲族自治县人民医院'">
      <!-- <el-button @click="CaldialogVisible = true">打开弹框</el-button> -->
      <!-- 弹框调用 -->
      <el-dialog
        title="呼叫功能框"
        :visible.sync="CaldialogVisible"
        width="60%"
      >
        <CallCenterLs ref="CallCenterLs" :initial-phone="currentPhoneNumber" />
      </el-dialog>
    </div>
  </div>
</template>
@@ -995,10 +1069,12 @@
} from "@/api/patient/homepage";
import CallButton from "@/components/CallButton";
import MergeAndModify from "./MergeAndModify.vue";
import CallCenterLs from "@/components/CallCenterLs";
export default {
  components: {
    CallButton,
    MergeAndModify,
    CallCenterLs,
  },
  directives: {
    numericOnly: {
@@ -1079,10 +1155,15 @@
      userid: "",
      currentPhoneNumber: "",
      callType: "", // 用于区分是哪个电话
      isSipRegistering: true, // SIP注册状态
      // 已有数据...
      callStatus: "idle", // idle, calling, connected, ended, failed
      isEndingCall: false,
      CaldialogVisible: false,
      currentCall: null, // 当前通话对象
      // 路由监听相关
      routeWatcher: null,
      lastRoutePath: this.$route.path,
      input: "今天身体还不错",
      radio: "2",
      taskname: "",
@@ -1090,8 +1171,39 @@
      voice: "",
      templateid: "",
      again: "",
      orgname: "",
      zcform: {},
      form: {},
      cities: [
        {
          label: "正常语音",
          value: "1",
        },
        {
          label: "患者拒接或拒访",
          value: "2",
        },
        {
          label: "面访或者接诊",
          value: "3",
        },
        {
          label: "微信随访",
          value: "4",
        },
        {
          label: "随访电话不正确",
          value: "5",
        },
        {
          label: "不宜随访被过滤",
          value: "6",
        },
        {
          label: "其他",
          value: "7",
        },
      ],
      tableDatatop: [], //题目表
      voiceDatatop: [], //题目表
      dynamicTags: [],
@@ -1126,7 +1238,23 @@
        resource: [
          { required: true, message: "请选择随访方式", trigger: "change" },
        ],
        date1: [{ required: true, message: "请选择随访时间", trigger: "blur" }],
        date1: [
          { required: true, message: "请选择随访时间", trigger: "blur" },
          {
            validator: (rule, value, callback) => {
              if (!value) {
                return callback(new Error("请选择随访时间"));
              }
              const selectedDate = new Date(value);
              const now = new Date();
              if (selectedDate < now) {
                return callback(new Error("随访时间不能早于当前日期"));
              }
              callback();
            },
            trigger: "change",
          },
        ],
      },
      userrules: {
        telcode: [{ validator: validatePhone, trigger: "blur" }],
@@ -1158,8 +1286,8 @@
          YongHuXX: {
            XiTongID: "SUIFANGXT",
            XiTongMC: "随访系统",
            YongHuID: "1400466972205912064",
            YongHuXM: "JNRMYY",
            YongHuID: localStorage.getItem("YongHuID"),
            YongHuXM: localStorage.getItem("YongHuXM"),
            ZuZhiJGID: localStorage.getItem("orgid"),
            ZuZhiJGMC: localStorage.getItem("orgname"),
            idp: "lyra",
@@ -1171,56 +1299,56 @@
          // 禁用今天及之前的日期
          return time.getTime() < Date.now() - 24 * 60 * 60 * 1000;
        },
        shortcuts: [
          {
            text: "七天后",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
            },
          },
          {
            text: "15天后",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() + 3600 * 1000 * 24 * 15);
              picker.$emit("pick", date);
            },
          },
          {
            text: "一个月后",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() + 3600 * 1000 * 24 * 30);
              picker.$emit("pick", date);
            },
          },
          {
            text: "三个月后",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() + 3600 * 1000 * 24 * 90);
              picker.$emit("pick", date);
            },
          },
          {
            text: "六个月后",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() + 3600 * 1000 * 24 * 180);
              picker.$emit("pick", date);
            },
          },
          {
            text: "一年后",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() + 3600 * 1000 * 24 * 365);
              picker.$emit("pick", date);
            },
          },
        ],
        // shortcuts: [
        //   {
        //     text: "七天后",
        //     onClick(picker) {
        //       const date = new Date();
        //       date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
        //       picker.$emit("pick", date);
        //     },
        //   },
        //   {
        //     text: "15天后",
        //     onClick(picker) {
        //       const date = new Date();
        //       date.setTime(date.getTime() + 3600 * 1000 * 24 * 15);
        //       picker.$emit("pick", date);
        //     },
        //   },
        //   {
        //     text: "一个月后",
        //     onClick(picker) {
        //       const date = new Date();
        //       date.setTime(date.getTime() + 3600 * 1000 * 24 * 30);
        //       picker.$emit("pick", date);
        //     },
        //   },
        //   {
        //     text: "三个月后",
        //     onClick(picker) {
        //       const date = new Date();
        //       date.setTime(date.getTime() + 3600 * 1000 * 24 * 90);
        //       picker.$emit("pick", date);
        //     },
        //   },
        //   {
        //     text: "六个月后",
        //     onClick(picker) {
        //       const date = new Date();
        //       date.setTime(date.getTime() + 3600 * 1000 * 24 * 180);
        //       picker.$emit("pick", date);
        //     },
        //   },
        //   {
        //     text: "一年后",
        //     onClick(picker) {
        //       const date = new Date();
        //       date.setTime(date.getTime() + 3600 * 1000 * 24 * 365);
        //       picker.$emit("pick", date);
        //     },
        //   },
        // ],
      },
      options: [
        {
@@ -1264,6 +1392,7 @@
      patid: null,
    };
  },
  computed: {
    callStatusText() {
      const statusMap = {
@@ -1295,11 +1424,48 @@
    this.Voicetype = this.$route.query.Voicetype;
    this.visitCount = this.$route.query.visitCount;
    this.serviceType = this.$route.query.serviceType;
    this.orgname = localStorage.getItem("orgname");
    this.getTaskservelist();
  },
mounted() {
    // 监听子组件的sipStatus属性变化
    if (this.$refs.callButton) {
      this.$watch(
        () => this.$refs.callButton.sipStatus,
        (newStatus) => {
          if (newStatus === '已注册') {
            this.isSipRegistering = false;
          } else if (newStatus === '注册失败' || newStatus === '未连接') {
            this.isSipRegistering = true;
          }
        },
        { immediate: true } // 立即执行一次以获取初始值
      );
    }
  },
  methods: {
    // 获取主题样式类
    getTopicClass(item) {
      // 根据状态值返回对应的样式类
      if (item.isabnormal == 1) {
        return "scriptTopic-isabnormal"; // 异常 - 红色
      } else if (item.isabnormal == 2) {
        return "scriptTopic-warning"; // 警告 - 黄色
      } else {
        return "scriptTopic-dev"; // 正常 - 默认样式
      }
    },
    // 获取选项样式类
    getOptionClass(items) {
      if (items.isabnormal == 1) {
        return "red-star"; // 异常 - 红色星号
      } else if (items.isabnormal == 2) {
        return "yellow-star"; // 警告 - 黄色星号
      }
      return ""; // 正常 - 无特殊样式
    },
    // 获取问卷数据
    getsearchrResults(id) {
      getsearchrResults({
@@ -1339,13 +1505,10 @@
    },
    //患者360跳转
    gettoken360(sfzh, drcode, drname) {
      this.$modal.msgWarning("360功能暂未开通");
      return; // 阻止后续代码执行
      // this.$modal.msgWarning("360功能暂未开通");
      this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
      if (this.postData.XiaoXiTou.ZuHuMC == "丽水市中医院") {
        this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
        this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
      }
      query360PatInfo(this.postData).then((res) => {
        if (res.data.url) {
          window.open(res.data.url, "_blank");
@@ -1378,35 +1541,64 @@
    },
    // 再次随访时间选取
    visitChange(value) {
      // 根据选择的随访方式设置时间
      if (!this.form.endtime) {
        this.$message.warning("请先确认出院时间");
        this.form.visitType = "";
        this.$refs.zcform.clearValidate(["visitType"]);
        return;
      }
      const dischargeDate = new Date(this.form.endtime);
      const now = new Date();
      let followupDate = new Date(dischargeDate);
      // 根据选择的随访方式计算随访日期
      if (value.includes("七天后")) {
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 7
        );
        followupDate.setDate(dischargeDate.getDate() + 7);
      } else if (value.includes("15天后")) {
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 15
        );
        followupDate.setDate(dischargeDate.getDate() + 15);
      } else if (value.includes("一个月后")) {
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 30
        );
        followupDate.setMonth(dischargeDate.getMonth() + 1);
      } else if (value.includes("三个月后")) {
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 90
        );
        followupDate.setMonth(dischargeDate.getMonth() + 3);
      } else if (value.includes("六个月后")) {
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 180
        );
        followupDate.setMonth(dischargeDate.getMonth() + 6);
      } else if (value.includes("一年后")) {
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 365
        followupDate.setFullYear(dischargeDate.getFullYear() + 1);
      }
      if (followupDate < now) {
        this.$message.warning(
          `计算出的随访时间 ${this.formatTime(followupDate)} 已过期`
        );
        this.form.visitType = "";
        this.$refs.zcform.clearValidate(["visitType", "date1"]);
        return;
      }
      this.form.date1 = this.formatTime(followupDate);
      this.$refs.zcform.clearValidate(["date1"]);
    },
    // 检查随访日期是否有效
    checkFollowupDate(date) {
      console.log(date);
      if (!date) {
        this.form.date1 = "";
        this.$refs.zcform.clearValidate(["date1"]);
        return;
      }
      const selectedDate = new Date(date);
      const now = new Date();
      if (selectedDate < now) {
        this.$message.warning("随访时间不能早于当前日期");
        this.form.date1 = "";
        this.$refs.zcform.validateField("date1"); // 触发验证
      }
    },
    // 获取语音数据
    getPersonVoices(id) {
      let obj = {
@@ -1473,14 +1665,18 @@
            return;
          }
        }
        var objs = item.svyLibTemplateTargetoptions.find(
        var objs = item.svyTaskTemplateTargetoptions.find(
          (items) => items.optioncontent == item.scriptResult
        );
        if (obj) {
          if (objs.isabnormal) {
            excep = 1;
        if (objs) {
          if (excep != 1 && objs.isabnormal) {
            excep = objs.isabnormal;
            this.selectedTag = objs.isabnormal;
          }
        }
        console.log(excep, "excep");
        let obj = {
          asrtext: null,
          patid: this.patid,
@@ -1518,7 +1714,7 @@
          this.$modal
            .confirm(
              '任务保存成功是否针对患者:"' +
                this.logsheetlist[0].sendname +
                this.userform.name +
                '"再次随访?',
              "确认",
              {
@@ -1605,17 +1801,34 @@
        this.$message.error("请输入正确的手机号码");
        return;
      }
      // 检查SIP是否已注册
      this.currentPhoneNumber = phone;
      // 是否景宁呼叫
      if (this.orgname == "景宁畲族自治县人民医院") {
        this.CaldialogVisible = true;
        return;
      }
      // 下方是中医院呼叫
      if (this.isSipRegistering) {
        this.$message.warning("系统正在初始化,请稍候...");
        return;
      }
      this.callType = type;
      this.callStatus = "calling";
      this.$nextTick(() => {
        this.$refs.callButton.startCall();
        // 监听通话状态变化
        this.$refs.callButton.$on("call-status-change", (status) => {
          this.handleCallStatusChange(status);
          // 监听注册状态变化
          if (status.type === "registered") {
            this.isSipRegistering = false;
          }
          if (status.type === "failed" || status.type === "disconnected") {
            this.isSipRegistering = true;
          }
        });
      });
    },
@@ -1653,7 +1866,11 @@
      }, 3000);
    },
    yuyingetdetail() {
      this.tableDatatop.forEach((item, index) => {
      const dataToSubmit = JSON.parse(JSON.stringify(this.tableDatatop));
      console.log(dataToSubmit, "dataToSubmit");
      // return;
      dataToSubmit.forEach((item, index) => {
        // 对拷贝的数据进行操作,不影响原始的 scriptResult 数组
        item.scriptResult = item.scriptResult.join("&");
        item.templatequestionnum = index + 1;
        item.subId = this.id;
@@ -1665,8 +1882,9 @@
        item.patid = this.patid;
        item.templateid = item.templateID;
      });
      let obj = {
        serviceSubtaskDetailList: this.tableDatatop,
        serviceSubtaskDetailList: dataToSubmit, // 提交处理后的副本
        param1: this.taskid,
        param2: this.patid,
        subId: this.id,
@@ -1725,7 +1943,16 @@
    formtidy() {
      this.form.visitType2 = this.form.visitType;
      this.form.date2 = this.form.longSendTime;
      // this.form.date1 = this.setCurrentDate();
      this.form.remark2 = this.form.remark;
    },
    setCurrentDate() {
      // 获取当前日期并格式化为 yyyy-MM-dd
      const today = new Date();
      const year = today.getFullYear();
      const month = String(today.getMonth() + 1).padStart(2, "0");
      const day = String(today.getDate()).padStart(2, "0");
      return `${year}-${month}-${day}`;
    },
    // 获取患者记录
    getTaskservelist(id) {
@@ -1738,16 +1965,17 @@
      getTaskservelist({
        patid: this.patid,
        subId: id,
        pageSize: 100,
      }).then((res) => {
        if (res.code == 200) {
          this.form = res.rows[0].serviceSubtaskList.find(
            (item) => item.id == this.id
          );
          console.log(this.form.serviceType, "serviceType");
          console.log(this.form, "serviceType");
          this.logsheetlist = res.rows[0].serviceSubtaskList;
          this.templateid = this.logsheetlist[0].templateid;
          this.selectedTag = this.logsheetlist[0].excep;
          this.templateid = this.form.templateid;
          this.selectedTag = this.form.excep;
          const targetDate = new Date(this.form.longSendTime); // 目标日期
          const now = new Date(); // 当前时间
          if (now < targetDate && this.form.sendstate == 2) {
@@ -1825,6 +2053,7 @@
            (item) => item.id == this.id
          );
          objson.remark = this.form.remark;
          objson.taskSituation = this.form.taskSituation;
          objson.excep = this.selectedTag;
          if (sendstate) objson.sendstate = sendstate;
          Editsingletaskson(objson).then((res) => {
@@ -1876,20 +2105,44 @@
    // 调起再次发送
    sendAgain() {
      document.querySelector("#app").scrollTo(0, 0);
      // scrollTo(0, 0)
      this.formtidy();
      this.dialogFormVisible = true;
      getTaskservelist({
        patid: this.patid,
        visitCount: 2,
        leaveldeptcodes: [this.form.deptcode],
      }).then((res) => {
        if (res.rows[0].serviceSubtaskList.length) {
          if (
            res.rows[0].serviceSubtaskList[0].sendstate != 5 &&
            res.rows[0].serviceSubtaskList[0].sendstate != 6
          ) {
            this.$modal
              .confirm(
                '本患者在"' +
                  res.rows[0].serviceSubtaskList[0].deptname +
                  '"科室下已有再次随访服务进行中是否继续创建?'
              )
              .then(() => {
                document.querySelector("#app").scrollTo(0, 0);
                this.formtidy();
                this.dialogFormVisible = true;
              });
          }
        } else {
          document.querySelector("#app").scrollTo(0, 0);
          this.formtidy();
          this.dialogFormVisible = true;
        }
      });
    },
    // 查看详情
    Seedetails(row) {
      this.$modal
        .confirm('是否查看任务为"' + row.taskName + '"的服务详情数据?')
        .then(() => {
          if (row.preachformson) {
            if (row.preachformson.includes("3")) {
              this.Voicetype = 1;
            }
          let type = "";
          console.log(row, "rwo");
          if (row.type == 1) {
            type = 1;
          }
          this.taskid = row.taskid;
          this.id = row.id;
@@ -1917,7 +2170,7 @@
          (item) => item.optioncontent == a
        );
      } else {
        var obj = this.tableDatatop[b].svyLibTemplateTargetoptions.find(
        var obj = this.tableDatatop[b].svyTaskTemplateTargetoptions.find(
          (item) => item.optioncontent == a
        );
      }
@@ -1928,8 +2181,47 @@
      }
      this.$forceUpdate();
    },
    handleRadioToggles(questionItem, optionValue) {
      if (!questionItem.matchedtext) {
        questionItem.matchedtext == "";
      }
      // 如果点击的是当前已选中的选项,则取消选中
      if (questionItem.matchedtext == optionValue) {
        this.$set(questionItem, "matchedtext", "");
        // 同时重置与选项相关的状态
        // questionItem.isabnormal = false;
        questionItem.showAppendInput = false;
        // 注意:取消选中时,我们通常不希望触发题目跳转逻辑,所以直接返回
        // 如果需要,可以在这里添加取消选中后的特定逻辑,例如重置题目序列
      } else {
        // 如果点击的是未选中的选项,则通过更改绑定值来触发原始的 handleOptionChange 方法
        // 这里只需要改变 v-model 绑定的值,change事件会自动触发
        this.$set(questionItem, "matchedtext", optionValue); // 后续的跳转等复杂逻辑会在 handleOptionChange 中正常执行
      }
    },
    // 新增的切换选中/取消选中方法
    handleRadioToggle(questionItem, index, options, optionValue) {
      // 如果点击的是当前已选中的选项,则取消选中
      if (questionItem.scriptResult === optionValue) {
        questionItem.scriptResult = ""; // 清空选中值
        // 同时重置与选项相关的状态
        // questionItem.isabnormal = false;
        questionItem.showAppendInput = false;
        // 注意:取消选中时,我们通常不希望触发题目跳转逻辑,所以直接返回
        // 如果需要,可以在这里添加取消选中后的特定逻辑,例如重置题目序列
      } else {
        // 如果点击的是未选中的选项,则通过更改绑定值来触发原始的 handleOptionChange 方法
        // 这里只需要改变 v-model 绑定的值,change事件会自动触发
        questionItem.scriptResult = optionValue;
        this.handleOptionChange(optionValue, index, options, questionItem);
        // 后续的跳转等复杂逻辑会在 handleOptionChange 中正常执行
      }
    },
    // 在methods部分,修改handleOptionChange方法:
    handleOptionChange(selectedOption, questionIndex, options, a) {
      console.log(selectedOption, questionIndex, options, a, "888");
      if (document.activeElement) {
        document.activeElement.blur();
      }
@@ -1941,7 +2233,7 @@
      // 处理异常状态高亮
      this.tableDatatop[questionIndex].isabnormal =
        !!selectedOptionObj.isabnormal;
        selectedOptionObj.isabnormal;
      // 处理附加输入框显示
      this.tableDatatop[questionIndex].showAppendInput =
@@ -2017,19 +2309,18 @@
          hiddenByEnd: index === questionIndex + 1 ? false : item.hiddenByEnd,
        }));
      }
      2;
      this.$forceUpdate();
    },
    overdata() {
      this.tableDatatop.forEach((item, index) => {
        var obj = item.svyLibTemplateTargetoptions.find(
        var obj = item.svyTaskTemplateTargetoptions.find(
          (items) => items.optioncontent == item.scriptResult
        );
        if (obj) {
          if (obj.isabnormal) {
            this.tableDatatop[index].isabnormal = true;
          } else {
            this.tableDatatop[index].isabnormal = false;
            this.tableDatatop[index].isabnormal = obj.isabnormal;
          }
          this.$forceUpdate();
        }
@@ -2157,6 +2448,11 @@
  // },
  beforeRouteLeave(to, from, next) {
    this.$refs.callButton.cleanupResources();
    if (this.$refs.CallCenterLs) {
      console.log(1);
      this.$refs.CallCenterLs.handleSeatLogout();
    }
    next(); // 确保调用 nex
  },
  // beforeRouteUpdate() {
@@ -2181,15 +2477,18 @@
  .manual-action {
    flex: 1;
    min-width: 0;
    height: 100%; /* 确保高度继承 */
    height: 100%;
    /* 确保高度继承 */
  }
  .call-action {
    width: 60%;
    min-width: 0;
    height: 100%; /* 确保高度继承 */
    height: 100%;
    /* 确保高度继承 */
  }
}
.numeric-input {
  position: relative;
}
@@ -2206,6 +2505,7 @@
  padding: 2px 6px;
  border-radius: 4px;
}
.call-container {
  padding: 20px;
  background: #fff;
@@ -2235,11 +2535,13 @@
    margin-top: 20px;
  }
}
.merge-controls {
  background: #f5f7fa;
  border-radius: 4px;
  margin-left: 20px;
}
.Followuserinfo {
  margin: 10px 10px 0 10px;
  align-items: center;
@@ -2273,8 +2575,10 @@
  background: #ffff;
  border: 1px solid #dcdfe6;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
  height: 100%; /* 确保高度继承 */
  min-height: 880px; /* 最小高度与随访内容一致 */
  height: 100%;
  /* 确保高度继承 */
  min-height: 880px;
  /* 最小高度与随访内容一致 */
  display: flex;
  flex-direction: column;
@@ -2294,11 +2598,15 @@
  .el-form {
    flex: 1;
    overflow-y: auto; /* 内容超过高度时显示滚动条 */
    max-height: calc(880px - 60px); /* 减去padding */
    padding-right: 10px; /* 防止滚动条遮挡内容 */
    overflow-y: auto;
    /* 内容超过高度时显示滚动条 */
    max-height: calc(880px - 60px);
    /* 减去padding */
    padding-right: 10px;
    /* 防止滚动条遮挡内容 */
  }
}
.append-input-container {
  margin-top: 15px;
  padding: 10px;
@@ -2306,6 +2614,7 @@
  border-radius: 4px;
  border: 1px solid #dcdfe6;
}
.borderdiv {
  min-height: 60vh;
  font-size: 20px;
@@ -2344,14 +2653,111 @@
    }
  }
}
.topic-dev[inert] {
  opacity: 0.5;
  pointer-events: none;
}
/* 挂断容器样式 */
.hangup-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
}
.hangup-btn {
  width: 120px;
  height: 40px;
  font-size: 14px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
  transition: all 0.3s ease;
}
.hangup-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}
/* 通话计时器 */
.call-timer {
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  padding: 4px 12px;
  border-radius: 12px;
  font-family: "Courier New", monospace;
}
/* 状态提示容器 */
.call-status-container {
  margin: 10px 0;
}
.status-alert {
  border-radius: 8px;
  transition: all 0.3s ease;
}
.status-alert.status-calling {
  border-left: 4px solid #e6a23c;
}
.status-alert.status-connected {
  border-left: 4px solid #67c23a;
  animation: pulse 2s infinite;
}
.status-alert.status-ended {
  border-left: 4px solid #909399;
}
/* SIP注册提示 */
.sip-registering {
  margin: 10px 0;
}
.registering-alert {
  border-radius: 8px;
  background-color: #f4f4f5;
  border-left: 4px solid #909399;
}
/* 动画效果 */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}
/* 响应式设计 */
@media (max-width: 768px) {
  .hangup-container {
    margin: 10px 0;
  }
  .hangup-btn {
    width: 100%;
    max-width: 200px;
  }
  .status-alert {
    font-size: 12px;
  }
}
.CONTENT {
  padding: 10px;
  height: 100%;
  min-height: 660px; /* 设置最小高度 */
  min-height: 738px;
  /* 设置最小高度 */
  .title {
    font-size: 22px;
@@ -2366,8 +2772,10 @@
  padding: 30px;
  border: 1px solid #dcdfe6;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
  max-height: 580px; /* 设置最大高度 */
  overflow-y: auto; /* 内容超过高度时显示滚动条 */
  max-height: 618px;
  /* 设置最大高度 */
  overflow-y: auto;
  /* 内容超过高度时显示滚动条 */
  .topic-dev {
    margin-bottom: 25px;
@@ -2416,6 +2824,18 @@
  }
}
/* 异常状态样式 - 红色 (保持不变) */
.scriptTopic-isabnormal {
  color: red;
}
/* 新增:警告状态样式 - 黄色 */
.scriptTopic-warning {
  color: #d4be00;
  /* 您指定的黄色 */
}
/* 异常选项样式 - 红色星号 (保持不变) */
.red-star {
  ::v-deep.el-radio__label {
    position: relative;
@@ -2429,25 +2849,45 @@
    right: -5px;
    top: 0;
  }
}
  ::v-deep.el-input-group__textarea {
    white-space: pre-wrap;
    word-break: break-all;
  }
  ::v-deep.el-checkbox__label {
/* 新增:警告选项样式 - 黄色星号 */
.yellow-star {
  ::v-deep.el-radio__label {
    position: relative;
    padding-right: 10px;
  }
  ::v-deep.el-checkbox__label::after {
  ::v-deep.el-radio__label::after {
    content: "*";
    color: red;
    color: #ffe202;
    /* 黄色星号 */
    position: absolute;
    right: -5px;
    top: 0;
    font-weight: bold;
  }
}
/* 共用样式保持不变 */
::v-deep.el-input-group__textarea {
  white-space: pre-wrap;
  word-break: break-all;
}
::v-deep.el-checkbox__label {
  position: relative;
  padding-right: 10px;
}
::v-deep.el-checkbox__label::after {
  content: "*";
  color: red;
  position: absolute;
  right: -5px;
  top: 0;
}
.tag-selector-container {
  display: flex;
  align-items: center;
@@ -2484,9 +2924,11 @@
.tag-normal {
  background-color: #7ff5e1;
}
.tag-abnormal {
  background-color: #f75c5c;
}
.tag-warning {
  background-color: #fbfb4a;
}
@@ -2496,6 +2938,7 @@
  color: #909399;
  cursor: pointer;
}
::v-deep.offside-value .el-radio__label {
  color: #fff;
}
@@ -2545,6 +2988,7 @@
  color: #080808 !important;
  cursor: not-allowed;
}
/* 原有的样式保持不变,添加以下响应式代码 */
.Followupdetailspage {
@@ -2556,12 +3000,13 @@
.action-container {
  display: flex;
  flex-direction: row; /* 默认横向排列 */
  flex-direction: row;
  /* 默认横向排列 */
  gap: 20px;
  margin: 0 10px 20px 10px;
  /* 当缩放比例大于100%或屏幕宽度较小时改为上下排列 */
  @media screen and (max-width: 1200px), (min-resolution: 1.1dppx) {
  @media screen and (min-resolution: 1.5dppx) {
    flex-direction: column;
    .call-action,
@@ -2699,7 +3144,8 @@
/* 确保内容在缩放时保持可读性 */
.headline {
  font-size: clamp(18px, 2vw, 24px); /* 使用clamp函数确保字体大小在合理范围内 */
  font-size: clamp(18px, 2vw, 24px);
  /* 使用clamp函数确保字体大小在合理范围内 */
}
/* 为移动设备优化滚动体验 */
@@ -2717,9 +3163,8 @@
}
/* 缩放检测样式 */
@media screen and (min-resolution: 1.1dppx),
  screen and (-webkit-min-device-pixel-ratio: 1.1),
  screen and (max-width: 1200px) {
@media screen and (min-resolution: 1.5dppx),
  screen and (-webkit-min-device-pixel-ratio: 1.5) {
  .action-container {
    flex-direction: column;
  }