WXL (wul)
3 天以前 5df476ae693d7577c7a0031ae12c67558b9832a7
src/views/followvisit/record/detailpage/index.vue
@@ -336,7 +336,9 @@
            v-if="
              (orgname == '南华大学附属第一医院' ||
                orgname == '丽水市第二人民医院' ||
                orgname == '缙云县人民医院') &&
                orgname == '缙云县人民医院'||
                orgname == '丽水市妇幼保健院'||
                orgname == '松阳县中医医院') &&
              !Voicetype
            "
          >
@@ -388,7 +390,7 @@
                    </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"
@@ -599,12 +601,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>
@@ -704,6 +706,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>
@@ -1657,6 +1668,15 @@
      };
      return typeMap[this.callStatus];
    },
    // 是否以问卷形式展示(非语音服务,或语音服务但无完整语音数据需手动填报)
    showQuestionnaireForm() {
      return !this.Voicetype ;
    },
    // 是否为管理员角色
    isAdmin() {
      const roles = this.$store.getters.roles || [];
      return roles.includes("admin") || roles.includes("sysadmin");
    },
  },
  created() {
    this.taskid = this.$route.query.taskid;
@@ -1991,7 +2011,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;
@@ -2026,9 +2046,13 @@
                .map((obj) => obj.targetvalue)
                .join("&");
            }
            console.log(item.targetvalue,'item.targetvalue');
            if (item.targetvalue) {
              item.scriptResult = item.targetvalue.split("&");
            }
            console.log(item.scriptResult);
          });
        }
      });
@@ -2575,6 +2599,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) => {