WXL (wul)
昨天 e06cd3953ba8a6e0eee11c235bce9ced419a2800
src/views/followvisit/record/detailpage/index.vue
@@ -95,43 +95,45 @@
          >
          </el-table-column>
          <el-table-column
            prop="sendstate"
            label="随访状态"
            align="center"
            width="200"
            label="任务状态"
            key="sendstateView"
            prop="sendstateView"
            width="120"
          >
            <template slot-scope="scope">
              <div v-if="scope.row.sendstate == 1">
                <el-tag type="primary" :disable-transitions="false"
                  >表单已领取</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 2">
                <el-tag type="primary" :disable-transitions="false"
                  >待随访</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 3">
                <el-tag type="success" :disable-transitions="false"
                  >表单已发送</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 4">
                <el-tag type="info" :disable-transitions="false">不执行</el-tag>
              </div>
              <div v-if="scope.row.sendstate == 5">
                <el-tag type="danger" :disable-transitions="false"
                  >发送失败</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 6">
                <el-tag type="success" :disable-transitions="false"
                  >已完成</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 7">
                <el-tag type="danger" :disable-transitions="false">超时</el-tag>
              </div>
              <el-tooltip
                class="item"
                effect="dark"
                :content="scope.row.remark"
                placement="top-start"
              >
                <div v-if="scope.row.sendstateView == 1">
                  <el-tag type="primary" :disable-transitions="false"
                    >待随访</el-tag
                  >
                </div>
                <div v-if="scope.row.sendstateView == 2">
                  <el-tag type="primary" :disable-transitions="false"
                    >随访中</el-tag
                  >
                </div>
                <div v-if="scope.row.sendstateView == 3">
                  <el-tag type="warning" :disable-transitions="false"
                    >未完成</el-tag
                  >
                </div>
                <div v-if="scope.row.sendstateView == 4">
                  <el-tag type="success" :disable-transitions="false"
                    >已完成</el-tag
                  >
                </div>
                <div v-if="scope.row.sendstateView == 5">
                  <el-tag type="danger" :disable-transitions="false"
                    >无需随访</el-tag
                  >
                </div>
              </el-tooltip>
            </template>
          </el-table-column>
          <el-table-column
@@ -262,10 +264,15 @@
      <!-- 随访内容 -->
      <div class="call-action">
        <div class="call-container">
          <!-- <div class="call-header">
            <h2>一键呼叫功能</h2>
          </div> -->
          <template-selector
            v-if="orgname == '南华大学附属第一医院' && !Voicetype"
            v-model="form.templateid"
            :templateName="form.templatename"
            :service-type="form.serviceType"
            :is-editable="form.sendState !== 2"
            @select="handleTemplateSelect"
            @clear="handleTemplateClear"
          />
          <div class="headline">
            <div>随访内容</div>
          </div>
@@ -291,9 +298,14 @@
                        v-if="item.scriptType == 1 && !item.astrict"
                      >
                        <div class="dev-text">
                          {{ index + 1 }}、[单选]<span>{{
                            item.scriptContent
                          }}</span>
                          {{ index + 1 }}. [单选]
                          <span> {{ item.scriptContent }}</span>
                          <span style="margin-left: 20px"
                            ><dict-tag
                              :options="dict.type.dimensionality_type"
                              :value="item.dimension"
                          /></span>
                        </div>
                        <div class="dev-xx">
                          <el-radio-group v-model="item.scriptResult">
@@ -344,9 +356,14 @@
                        v-if="item.scriptType == 2 && !item.astrict"
                      >
                        <div class="dev-text">
                          {{ index + 1 }}、[多选]<span>{{
                          {{ index + 1 }}. [多选]<span>{{
                            item.scriptContent
                          }}</span>
                          <span style="margin-left: 20px"
                            ><dict-tag
                              :options="dict.type.dimensionality_type"
                              :value="item.dimension"
                          /></span>
                        </div>
                        <div class="dev-xx">
                          <el-checkbox-group
@@ -378,9 +395,14 @@
                        v-if="item.scriptType == 4 && !item.astrict"
                      >
                        <div class="dev-text">
                          {{ index + 1 }}、[问答]<span>{{
                          {{ index + 1 }}. [问答]<span>{{
                            item.scriptContent
                          }}</span>
                          <span style="margin-left: 20px"
                            ><dict-tag
                              :options="dict.type.dimensionality_type"
                              :value="item.dimension"
                          /></span>
                          <span v-if="item.valueType == 3">(只能输入数字)</span>
                        </div>
                        <div class="dev-xx" v-if="item.valueType == 3">
@@ -414,9 +436,8 @@
                    >
                      <div v-if="item.targetvalue">
                        <div class="dev-text">
                          {{ index + 1 }}、[单选]<span>{{
                            item.questiontext
                          }}</span>
                          {{ index + 1 }}. [单选]
                          <span>{{ item.questiontext }}</span>
                        </div>
                        <div class="dev-xx">
                          <el-radio-group
@@ -447,7 +468,7 @@
                      <div class="scriptTopic-dev" :key="index" v-else>
                        <div class="dev-text">
                          {{ index + 1 }}、[问答]<span>{{
                          {{ index + 1 }}. [问答]<span>{{
                            item.questiontext
                          }}</span>
                          <span v-if="item.valueType == 3">(只能输入数字)</span>
@@ -793,7 +814,13 @@
              </el-form-item>
              <!-- 随访情况 -->
              <el-form-item label="随访情况" v-if="orgname == '丽水市中医院'">
              <el-form-item
                label="随访情况"
                v-if="
                  orgname == '丽水市中医院' ||
                  orgname == '景宁畲族自治县人民医院'
                "
              >
                <el-radio-group v-model="form.taskSituation">
                  <el-radio
                    v-for="city in cities"
@@ -1157,6 +1184,8 @@
  savequestiondetail,
  addPersonVoices,
  query360PatInfo,
  updateTemplate,
  query360PatInfonh,
  sendMsg,
} from "@/api/AiCentre/index";
import {
@@ -1165,6 +1194,7 @@
  listcontactinformation,
} from "@/api/patient/homepage";
import CallButton from "@/components/CallButton";
import TemplateSelector from "@/components/optionalModule";
import MergeAndModify from "./MergeAndModify.vue";
import CallCenterLs from "@/components/CallCenterLs";
import store from "@/store";
@@ -1173,6 +1203,7 @@
    CallButton,
    MergeAndModify,
    CallCenterLs,
    TemplateSelector,
  },
  directives: {
    numericOnly: {
@@ -1237,6 +1268,7 @@
  },
  dicts: [
    "sys_normal_disable",
    "dimensionality_type",
    "quickfollow_up",
    "sys_user_sex",
    "sys_yujing",
@@ -1295,6 +1327,7 @@
      showContinuationCareBtn: false, // 控制延续护理按钮显示
      // 路由监听相关
      routeWatcher: null,
      lastRoutePath: this.$route.path,
      input: "今天身体还不错",
      radio: "2",
@@ -1577,7 +1610,6 @@
    this.visitAgain = store.getters.visitAgain;
    console.log(store.getters.visitAgain);
    this.orgname = localStorage.getItem("orgname");
    if (this.orgname == "省立同德翠苑院区") {
      this.showContinuationCareBtn = true;
@@ -1728,8 +1760,8 @@
      const orgname = localStorage.getItem("orgname");
      if (orgname == "南华大学附属第一医院") {
        query360PatInfonh(id).then((res) => {
          if (res.url) {
            window.open(res.url, "_blank");
          if (res.data) {
            window.open(res.data, "_blank");
          } else {
            this.$modal.msgWarning("360查询无结果");
          }
@@ -1952,7 +1984,11 @@
          this.Editsingletasksonyic(this.serviceStates);
          const orgName = localStorage.getItem("orgname");
          if (this.form.isVisitAgain != 1 || orgName == "丽水市中医院"||this.visitAgain==1) {
          if (
            this.form.isVisitAgain != 1 ||
            orgName == "丽水市中医院" ||
            this.visitAgain == 1
          ) {
            this.Torouter();
            return;
          }
@@ -2036,6 +2072,35 @@
          message: "请输入正确的电话号码(手机号或带区号的固定电话)",
        };
      }
    },
    handleTemplateSelect(templateData) {
      console.log("选择了模板:", templateData);
      // 处理模板选择逻辑
      let templateobj = templateData.templateData;
      templateobj.templateid = templateobj.svyid;
      templateobj.taskid = this.form.taskid;
      templateobj.isoperation = 1;
      templateobj.svyTaskTemplateScriptVOS = templateobj.svyTemplateLibScripts;
      templateobj.svyTaskTemplateScriptVOS.forEach((item) => {
        item.taskid = this.form.taskid;
        item.templateid = item.svyid;
        item.svyTaskTemplateTargetoptions = item.svyLibTemplateTargetoptions;
      });
      let obj = {
        subId: this.form.id,
        svyTaskTemplateVO: templateobj,
      };
      updateTemplate(obj).then((res) => {
        if (res.code) {
          location.reload();
          this.$modal.msgSuccess("模板修改成功");
        } else {
        }
      });
    },
    handleTemplateClear() {
      console.log("清除了模板选择");
    },
    // 使用示例
    isValidPhone(phone) {
@@ -2149,7 +2214,11 @@
      const orgName = localStorage.getItem("orgname");
      console.log(orgName, "orgName");
      if (this.form.isVisitAgain != 1 || orgName == "丽水市中医院"||this.visitAgain==1) {
      if (
        this.form.isVisitAgain != 1 ||
        orgName == "丽水市中医院" ||
        this.visitAgain == 1
      ) {
        this.Torouter();
        return;
      }
@@ -2214,14 +2283,16 @@
          this.form = res.rows[0].serviceSubtaskList.find(
            (item) => item.id == this.id
          );
          console.log(this.form.templatename, "templatename");
          this.form.remark = this.form.remark || "";
          this.logsheetlist = res.rows[0].serviceSubtaskList;
          this.templateid = this.form.templateid;
          this.selectedTag = this.form.excep;
          const targetDate = new Date(this.form.visitTime); // 目标日期
          const now = new Date(); // 当前时间
          console.log(now,'当前时间');
          console.log(targetDate,'目标日期');
          console.log(now, "当前时间");
          console.log(targetDate, "目标日期");
          if (now < targetDate && this.form.sendstate == 2) {
            this.$confirm("当前服务未到发送时间请谨慎修改", "提示", {
@@ -2278,6 +2349,8 @@
        if (res.code == 200) {
          objson = res.rows[0].serviceSubtaskList[0];
          objson.suggest = son;
          objson.remark = this.form.remark;
          objson.taskSituation = this.form.taskSituation;
          Editsingletaskson(objson).then((res) => {
            if (res.code) {
              this.$modal.msgSuccess("服务记录成功");
@@ -3052,6 +3125,7 @@
    .dev-text {
      margin-bottom: 10px;
      display: flex;
    }
  }
}