WXL (wul)
6 天以前 d90b45d7e9e38e34c044b772006004f2a4cb8b8e
src/views/followvisit/record/detailpage/index.vue
@@ -362,7 +362,14 @@
                  ><i class="el-icon-notebook-1"></i> 问卷随访结果</span
                >
                <div class="CONTENT">
                  <div class="title">{{ taskname ? taskname : "问卷" }}</div>
                  <div class="title">
                    {{ taskname ? taskname : "问卷" }}
                    <span style="margin-left: 50px">
                      <el-button type="primary" round @click="smsSubTask">
                        问卷短信推送
                      </el-button>
                    </span>
                  </div>
                  <div class="preview-left" v-if="!Voicetype">
                    <div
@@ -1253,6 +1260,7 @@
  updateTemplate,
  query360PatInfonh,
  sendMsg,
  smsSubTask,
  getconfigKey,
} from "@/api/AiCentre/index";
import {
@@ -2143,6 +2151,25 @@
    handleTemplateClear() {
      console.log("清除了模板选择");
    },
    smsSubTask() {
      this.$modal
        .confirm("是否向患者通过短信推送文件内容?")
        .then(() => {
          console.log(11, this.id);
          smsSubTask(this.id).then((res) => {
            console.log(11);
            if (res.code) {
              this.$modal.msgSuccess("文件已通过短信推送给患者");
            } else {
            }
          });
        })
        .catch((err) => {
          console.log(err);
        });
    },
    handleConfirmReplace() {
      // 遍历所有题目(tableDatatop)
      this.tableDatatop.forEach((item) => {
@@ -2468,7 +2495,7 @@
      });
    },
    alterpatient(sendstate) {
      this.Editsingletasksonyic(this.serviceStates)
      this.Editsingletasksonyic(this.serviceStates);
      // alterpatient(this.userform).then((res) => {
      //   if (res.code == 200) {
      //     this.$modal.msgSuccess("基础信息保存成功");
@@ -2867,38 +2894,38 @@
  //   console.log(11);
  // },
  beforeRouteLeave(to, from, next) {
  const callButton = this.$refs.callButton;
    const callButton = this.$refs.callButton;
  // 如果存在呼叫组件且正在通话中
  if (callButton && callButton.isCalling) {
    this.$confirm('当前正在通话中,确定要离开此页面吗?', '提示', {
      confirmButtonText: '挂断并离开',
      cancelButtonText: '继续通话',
      type: 'warning'
    })
      .then(() => {
        // 用户确认离开,主动挂断并清理
        callButton.cleanupResources();
        if (this.$refs.CallCenterLs) {
          this.$refs.CallCenterLs.handleSeatLogout();
        }
        next();
    // 如果存在呼叫组件且正在通话中
    if (callButton && callButton.isCalling) {
      this.$confirm("当前正在通话中,确定要离开此页面吗?", "提示", {
        confirmButtonText: "挂断并离开",
        cancelButtonText: "继续通话",
        type: "warning",
      })
      .catch(() => {
        // 用户取消,阻止路由跳转
        next(false);
      });
  } else {
    // 未通话或呼叫组件不存在,正常清理
    if (callButton) {
      callButton.cleanupResources();
        .then(() => {
          // 用户确认离开,主动挂断并清理
          callButton.cleanupResources();
          if (this.$refs.CallCenterLs) {
            this.$refs.CallCenterLs.handleSeatLogout();
          }
          next();
        })
        .catch(() => {
          // 用户取消,阻止路由跳转
          next(false);
        });
    } else {
      // 未通话或呼叫组件不存在,正常清理
      if (callButton) {
        callButton.cleanupResources();
      }
      if (this.$refs.CallCenterLs) {
        this.$refs.CallCenterLs.handleSeatLogout();
      }
      next();
    }
    if (this.$refs.CallCenterLs) {
      this.$refs.CallCenterLs.handleSeatLogout();
    }
    next();
  }
}
  },
  // beforeRouteUpdate() {
  //   console.log(33);
  // },