WXL (wul)
16 小时以前 d93ed5c5aadcf3d49f824339c26ebfac911be06d
测试完成
已修改17个文件
已重命名1个文件
已删除2个文件
已添加2个文件
4421 ■■■■■ 文件已修改
LiShui.zip 补丁 | 查看 | 原始文档 | blame | 历史
dist (2).zip 补丁 | 查看 | 原始文档 | blame | 历史
dist (4).zip 补丁 | 查看 | 原始文档 | blame | 历史
dist.zip 补丁 | 查看 | 原始文档 | blame | 历史
src/components/CallCenterLs/index.vue 133 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/OutpatientAgain/index.vue 1845 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/discharge/index.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/record/detailpage/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/education/compilequer/index copy.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/education/compilequer/index.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/education/index copy.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/education/index.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/questionnaire/compilequer/index.vue 431 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/questionnaire/index.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/outsideChainwtnew.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/outsideChainxjnew.vue 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/patient/AwaitingAdmission.vue 1274 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/patient/outpatient.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/Missioncreation.vue 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/particty.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sfstatistics/percentage/index.vue 364 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LiShui.zip
Binary files differ
dist (2).zip
Binary files differ
dist (4).zip
Binary files differ
dist.zip
Binary files differ
src/components/CallCenterLs/index.vue
@@ -25,7 +25,18 @@
              <span class="btn-icon">📞</span>
              {{ callButtonText }}
            </button>
            <button
              @click="handleSeatLogout"
              :class="[
                'seat-btn',
                'logout',
                { 'in-call': isInCall || isCalling },
              ]"
              :disabled="!canLogout"
            >
              <span class="btn-icon">🚪</span>
              {{ isInCall || isCalling ? "强制签出" : "签出" }}
            </button>
            <button
              @click="handleHangup"
              class="hangup-btn"
@@ -60,9 +71,7 @@
          <div class="status-item" v-if="callDuration">
            <span class="status-label">通话时长:</span>
            <span class="duration-display">
              â±ï¸ {{ callDuration }}
            </span>
            <span class="duration-display"> â±ï¸ {{ callDuration }} </span>
          </div>
        </div>
      </div>
@@ -131,7 +140,10 @@
    isInCall() {
      return this.callStatus === "connected";
    },
    canLogout() {
      // åªæœ‰åœ¨å·²ç­¾å…¥çŠ¶æ€æ‰å…è®¸ç­¾å‡ºï¼ˆæ— è®ºæ˜¯å¦åœ¨é€šè¯ä¸­ï¼‰
      return this.isSeatLoggedIn && !this.isSeatLoggingOut;
    },
    canMakeCall() {
      return (
        this.isSeatLoggedIn &&
@@ -204,7 +216,40 @@
      this.$refs.callComponent.callout(this.customerPhone);
      this.startCallTimer();
    },
    async handleSeatLogout() {
      if (!this.canLogout) return;
      try {
        // å¦‚果正在通话中,先挂断
        if (this.isInCall || this.isCalling) {
          // æ˜¾ç¤ºç¡®è®¤å¯¹è¯æ¡†
          const confirm = await this.$confirm(
            "确定要签出吗?签出将结束当前通话",
            "提示",
            {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning",
            }
          );
          await this.handleHangup();
        }
        console.log(2);
        // æ‰§è¡Œç­¾å‡º
        await this.$refs.callComponent.handleSeatLogout();
        console.log(3);
        this.isSeatLoggedIn = false;
        this.$message.success("座席签出成功");
      } catch (error) {
        if (error !== "cancel") {
          // å¿½ç•¥ç”¨æˆ·å–消的情况
          console.error("签出失败:", error);
          this.$message.error("座席签出失败");
        }
      }
    },
    handleHangup() {
      this.$refs.callComponent.hangup();
      this.stopCallTimer();
@@ -213,13 +258,19 @@
    onSeatStatusChange(status) {
      this.isSeatLoggedIn = status.isLoggedIn;
      // å¦‚果座席签出,重置通话状态
      if (!status.isLoggedIn) {
        this.callStatus = "idle";
        this.stopCallTimer();
      }
    },
    onCallStatusChange(status) {
      this.callStatus = status.status;
      if (status.status === "connected") {
      if (status.status == "connected") {
        this.startCallTimer();
      } else if (status.status === "idle") {
      } else if (status.status == "idle") {
        this.stopCallTimer();
      }
    },
@@ -283,6 +334,11 @@
  beforeUnmount() {
    this.stopCallTimer();
    // ç»„件销毁前尝试签出
    if (this.isSeatLoggedIn) {
      this.handleSeatLogout().catch(console.error);
    }
  },
};
</script>
@@ -310,6 +366,37 @@
  }
}
.seat-btn.logout {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  &:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
  }
  // é€šè¯ä¸­çš„特殊样式
  &.in-call {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: pulse 1.5s infinite;
    &:hover:not(:disabled) {
      box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
    }
  }
}
// é€šè¯ä¸­ç­¾å‡ºæŒ‰é’®çš„特殊动画
@keyframes pulse-red {
  0% {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
  }
  50% {
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.8);
  }
  100% {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
  }
}
.section-title {
  font-size: 16px;
  font-weight: 600;
@@ -407,7 +494,11 @@
}
.call-btn.calling {
  background: linear-gradient(135deg, #f59e0b, #d97706); /* å‘¼å«ä¸­çŠ¶æ€æ”¹ä¸ºæ©™è‰²æ¸å˜ */
  background: linear-gradient(
    135deg,
    #f59e0b,
    #d97706
  ); /* å‘¼å«ä¸­çŠ¶æ€æ”¹ä¸ºæ©™è‰²æ¸å˜ */
  animation: pulse 1.5s infinite; /* å‘¼å«ä¸­æ·»åŠ å‘¼å¸è„‰å†²åŠ¨ç”» */
}
@@ -432,9 +523,15 @@
/* è„‰å†²åŠ¨ç”»å®šä¹‰ */
@keyframes pulse {
  0% { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5); }
  50% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.8); }
  100% { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5); }
  0% {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
  }
  50% {
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.8);
  }
  100% {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
  }
}
// çŠ¶æ€æ˜¾ç¤ºæ ·å¼
@@ -513,7 +610,7 @@
}
.duration-display {
  font-family: 'Courier New', monospace;
  font-family: "Courier New", monospace;
  font-weight: 600;
  color: #059669;
  font-size: 14px;
@@ -570,9 +667,15 @@
// åŠ¨ç”»å®šä¹‰
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
// å“åº”式设计
src/views/followvisit/OutpatientAgain/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1845 @@
<template>
  <div class="app-container">
    <div class="leftvlue" style="margin-bottom: 20px">
      <el-row :gutter="10">
        <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
          <el-card
            shadow="hover"
            :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
          >
            <div style="padding: 8px" @click="$router.push(item.router)">
              <span>{{ item.name }}</span>
              <div
                style="
                  text-align: center;
                  font-size: 18px;
                  margin-top: 10px;
                  font-weight: 600;
                "
              >
                {{ item.value ? item.value : 0 }}
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="2.5">
          <div class="ysfleftvlue">
            <el-card shadow="hover">
              <div style="padding: 8px">
                <span>表单已发送</span>
                <div
                  style="
                    text-align: center;
                    font-size: 18px;
                    margin-top: 10px;
                    font-weight: 600;
                  "
                >
                  {{ yfsvalue }}
                </div>
              </div>
            </el-card>
          </div>
        </el-col>
        <el-col :span="2.5">
          <div class="errleftvlue">
            <el-card shadow="hover">
              <div style="padding: 8px">
                <span>异常</span>
                <div
                  style="
                    text-align: center;
                    font-size: 18px;
                    margin-top: 10px;
                    font-weight: 600;
                  "
                >
                  {{ ycvalue }}
                </div>
              </div>
            </el-card>
          </div>
        </el-col>
      </el-row>
    </div>
    <el-row :gutter="20">
      <!--用户数据-->
      <el-form
        :model="topqueryParams"
        ref="queryForm"
        size="small"
        :inline="true"
        v-show="showSearch"
        label-width="98px"
      >
        <el-form-item label="任务名称">
          <el-input
            v-model="topqueryParams.taskName"
            placeholder="请选择任务名称"
          ></el-input>
        </el-form-item>
        <el-form-item label="门诊时间">
          <el-date-picker
            v-model="dateRange"
            style="width: 240px"
            value-format="yyyy-MM-dd"
            type="daterange"
            range-separator="-"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="应随访时间">
          <el-date-picker
            v-model="dateRangefs"
            style="width: 240px"
            value-format="yyyy-MM-dd"
            type="daterange"
            range-separator="-"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="患者姓名" prop="sendname">
          <el-input
            v-model="topqueryParams.sendname"
            placeholder="请输入患者姓名"
          ></el-input>
        </el-form-item>
        <el-form-item label="诊断名称" prop="leavediagname">
          <el-input
            v-model="topqueryParams.leavediagname"
            placeholder="请输入诊断名称"
          ></el-input>
        </el-form-item>
        <el-form-item label="患者范围" prop="status">
          <el-cascader
            v-model="topqueryParams.scopetype"
            placeholder="默认全部"
            :options="sourcetype"
            :props="{ expandTrigger: 'hover' }"
            @change="handleChange"
          ></el-cascader>
        </el-form-item>
        <el-form-item label="任务状态" prop="status">
          <el-select v-model="topqueryParams.sendstate" placeholder="请选择">
            <el-option
              v-for="item in topicoptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="排序方式" prop="status">
          <el-select v-model="topqueryParams.sort" placeholder="请选择">
            <el-option
              v-for="item in topicoptionssort"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button
            type="primary"
            icon="el-icon-search"
            size="medium"
            @click="handleQuery(1)"
            >搜索</el-button
          >
          <el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
            >重置</el-button
          >
        </el-form-item>
      </el-form>
      <el-divider></el-divider>
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button
                type="warning"
                plain
                icon="el-icon-upload2"
                size="medium"
                @click="handleExport"
                >导出</el-button
              >
            </div>
          </div>
        </el-col>
        <el-col :span="1.5">
          <el-button
            type="primary"
                        icon="el-icon-plus"
            size="medium"
            @click="handleAdd"
            >新增</el-button
          >
        </el-col>
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button
                type="warning"
                plain
                icon="el-icon-warning-outline"
                size="medium"
                @click="toleadExport(1)"
                >执行失败</el-button
              >
            </div>
          </div>
        </el-col>
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button
                type="danger"
                plain
                icon="el-icon-warning"
                size="medium"
                @click="toleadExport(2)"
                >结果异常</el-button
              >
            </div>
          </div>
        </el-col>
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button
                type="success"
                plain
                size="medium"
                @click="buidegetTasklist()"
                >待办服务</el-button
              >
            </div>
          </div>
        </el-col>
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button
                type="primary"
                plain
                size="medium"
                @click="affiliation()"
                >本人所属服务</el-button
              >
            </div>
          </div>
        </el-col>
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button type="success" size="medium" @click="onthatday()"
                >今日服务</el-button
              >
            </div>
          </div>
        </el-col>
      </el-row>
      <el-table
        v-loading="loading"
        :data="userList"
        :row-class-name="tableRowClassName"
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="50" align="center" />
        <el-table-column
          label="任务名称"
          fixed
          width="150"
          show-overflow-tooltip
          align="center"
          key="taskName"
          prop="taskName"
        />
        <!-- <el-table-column label="序号" fixed align="center" key="id" prop="id" /> -->
        <el-table-column
          label="姓名"
          width="100"
          align="center"
          key="sendname"
          prop="sendname"
        >
          <template slot-scope="scope">
            <el-button
              size="medium"
              type="text"
              @click="
                gettoken360(scope.row.sfzh, scope.row.drcode, scope.row.drname)
              "
              ><span class="button-textsc">{{
                scope.row.sendname
              }}</span></el-button
            >
          </template>
        </el-table-column>
        <el-table-column
          label="任务状态"
          align="center"
          key="sendstate"
          prop="sendstate"
          width="120"
        >
          <template slot-scope="scope">
            <el-tooltip
              class="item"
              effect="dark"
              :content="scope.row.remark"
              placement="top-start"
            >
              <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>
            </el-tooltip>
          </template>
        </el-table-column>
        <!-- <el-table-column
          label="任务异常说明"
          width="120"
          align="center"
          key="remark"
          prop="remark" -->
        />
        <el-table-column
          label="处理意见"
          align="center"
          key="suggest"
          prop="suggest"
          width="120"
        >
          <template slot-scope="scope">
            <dict-tag
              :options="dict.type.sys_suggest"
              :value="scope.row.suggest"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="随访完成时间"
          sortable
          align="center"
          prop="finishtime"
          width="160"
        >
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.finishtime) }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="就诊日期"
          width="200"
          align="center"
          key="endtime"
          prop="endtime"
        >
          <template slot-scope="scope">
            <span>{{ formatTime(scope.row.endtime) }}</span>
          </template></el-table-column
        >
        <el-table-column
          label="应随访日期"
          width="200"
          align="center"
          key="longSendTime"
          prop="longSendTime"
        >
          <template slot-scope="scope">
            <span>{{ formatTime(scope.row.longSendTime) }}</span>
          </template></el-table-column
        >
        <el-table-column
          label="主治医生"
          width="120"
          align="center"
          key="drname"
          prop="drname"
        />
        <!-- <el-table-column
          label="门诊天数"
          width="120"
          align="center"
          key="endDay"
          prop="endDay"
        >
          <template slot-scope="scope">
            <span>{{ scope.row.endDay ? scope.row.endDay + "天" : "" }}</span>
          </template>
        </el-table-column> -->
        <el-table-column
          label="身份证号码"
          width="200"
          align="center"
          key="sfzh"
          prop="sfzh"
        />
        <el-table-column
          label="联系电话"
          width="200"
          align="center"
          key="phone"
          prop="phone"
        />
        <el-table-column
          label="责任护士"
          width="120"
          align="center"
          key="nurseName"
          prop="nurseName"
        />
        <!-- <el-table-column
          label="病历号"
          align="center"
          sortable
          key="medicalRecordNo"
          prop="medicalRecordNo"
          width="120"
        /> -->
        <!-- <el-table-column label="年龄" align="center" key="age" prop="age" /> -->
        <!-- <el-table-column label="性别"width="100" align="center" key="sex" prop="sex" /> -->
        <!-- <el-table-column label="床号" align="center" key="badNo" prop="badNo" /> -->
        <el-table-column
          label="首次随访科室"
          align="center"
          key="deptname"
          prop="deptname"
          width="120"
        >
        </el-table-column>
        <el-table-column
          label="本次科室"
          align="center"
          key="visitDeptName"
          prop="visitDeptName"
          width="120"
        >
        </el-table-column>
        <el-table-column
          label="病区"
          align="center"
          key="leavehospitaldistrictname"
          prop="leavehospitaldistrictname"
          width="120"
        >
        </el-table-column>
        <el-table-column
          label="诊断名称"
          align="center"
          key="leavediagname"
          prop="leavediagname"
          width="120"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="随访人员"
          align="center"
          key="updateBy"
          prop="updateBy"
          width="120"
        />
        <el-table-column
          label="门诊随访模板名称"
          align="center"
          key="templatename"
          prop="templatename"
          width="200"
        />
        <el-table-column
          label="任务执行方式"
          align="center"
          key="preachform"
          prop="preachform"
          width="160"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <span v-for="item in scope.row.preachform">{{ item }}、 </span>
          </template>
        </el-table-column>
        <!-- <el-table-column
          label="任务发送流程"
          align="center"
          key="serviceSubtaskRecordList"
          prop="serviceSubtaskRecordList"
          width="160"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <span v-for="item in scope.row.serviceSubtaskRecordList"
              >{{ item.remark }}、
            </span>
          </template>
        </el-table-column> -->
        <el-table-column
          label="任务结果说明"
          width="220"
          align="center"
          key="remark"
          prop="remark"
        >
          <template slot-scope="scope" v-if="scope.row.remark">
            <el-tooltip
              :content="scope.row.remark"
              placement="top"
              effect="dark"
            >
              <el-tag
                type="warning"
                v-if="scope.row.sendstate != 5 && scope.row.sendstate != 4"
                >{{ scope.row.remark }}</el-tag
              >
              <el-tag type="warning" v-else>{{ scope.row.remark }}</el-tag>
            </el-tooltip>
          </template>
        </el-table-column>
        <el-table-column
          label="操作"
          align="center"
          fixed="right"
          width="300"
          class-name="small-padding fixed-width"
        >
          <template slot-scope="scope">
            <!-- <el-tooltip
              class="item"
              effect="dark"
              content="再次随访"
              placement="top"
            >
              <el-button
                size="medium"
                type="text"
                v-if="scope.row.isVisitAgain!=2"
                @click="followupvisit(scope.row)"
                ><span class="button-bb"
                  ><i class="el-icon-s-promotion"></i>再次随访</span
                ></el-button
              >
            </el-tooltip>
            <el-tooltip
              v-if="scope.row.sendstate == 1 || scope.row.sendstate == 2"
              class="item"
              effect="dark"
              content="暂停服务"
              placement="top"
            >
              <el-button
                size="medium"
                type="text"
                @click="handlestop(scope.row)"
                v-hasPermi="['system:user:edit']"
                ><span class="button-sc"
                  ><i class="el-icon-remove-outline"></i>暂停服务</span
                ></el-button
              >
            </el-tooltip> -->
            <el-button size="medium" type="text" @click="Seedetails(scope.row)"
              ><span class="button-zx"
                ><i class="el-icon-s-order"></i>查看详情</span
              ></el-button
            >
            <el-button
              size="medium"
              type="text"
              @click="handleUpdate(scope.row)"
              ><span class="button-textxga"
                ><i class="el-icon-edit"></i>患者过滤</span
              ></el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="topqueryParams.pageNum"
        :limit.sync="topqueryParams.pageSize"
        @pagination="getList"
      />
    </el-row>
    <!-- æ·»åŠ æˆ–ä¿®æ”¹å½±åƒéšè®¿å¯¹è¯æ¡† -->
    <el-dialog
      :title="amendtag ? '修改患者信息' : '新增患者'"
      :visible.sync="Labelchange"
      width="900px"
    >
      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
        <el-row>
          <el-col :span="8">
            <el-form-item label="姓名" width="100" prop="name">
              <el-input
                v-model="form.name"
                placeholder="请输入姓名"
                maxlength="30"
              />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="性别" width="100" prop="sex">
              <el-select v-model="form.sex" placeholder="请选择性别">
                <el-option
                  v-for="dict in sextype"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="年龄" prop="age">
              <el-input
                v-model="form.age"
                placeholder="请输入年龄"
                maxlength="30"
              />
            </el-form-item>
          </el-col>
        </el-row>
<el-row >
          <el-col :span="8">
            <el-form-item label="过滤医生" width="100" prop="filterDrname">
              <el-input
                v-model="form.filterDrname"
                placeholder="请输入医生姓名"
                maxlength="30"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="过滤原因">
              <el-input
                v-model="form.notrequiredreason"
                type="textarea"
                placeholder="请输入过滤原因"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
    <!-- ä¿®æ”¹å‘送时间对话框 -->
    <el-dialog
      title="发送时间设置"
      :visible.sync="modificationVisible"
      width="45%"
    >
      <div style="margin-bottom: 20px; color: red">
        ç»Ÿä¸€ä¿®æ”¹å½“天未发送的任务时间
      </div>
      <el-form
        :model="ruleForm"
        :rules="rules"
        ref="ruleForm"
        label-width="120px"
        class="demo-ruleForm"
      >
        <el-form-item label="发送日期">
          <el-date-picker
            v-model="ruleForm.value1"
            type="date"
            placeholder="选择日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="时间段" prop="type">
          <el-checkbox-group v-model="ruleForm.type">
            <el-checkbox label="上午" name="type"></el-checkbox>
            <el-checkbox label="下午" name="type"></el-checkbox>
            <el-checkbox label="晚上" name="type"></el-checkbox>
          </el-checkbox-group>
        </el-form-item>
        <el-form-item label="上午时间区间" required>
          <el-time-picker
            is-range
            v-model="ruleForm.value2"
            range-separator="至"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            placeholder="选择时间范围"
          >
          </el-time-picker>
        </el-form-item>
        <el-form-item label="下午时间区间" required>
          <el-time-picker
            is-range
            v-model="ruleForm.value3"
            range-separator="至"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            placeholder="选择时间范围"
          >
          </el-time-picker>
        </el-form-item>
        <el-form-item label="晚上时间区间" required>
          <el-time-picker
            is-range
            v-model="ruleForm.value4"
            range-separator="至"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            placeholder="选择时间范围"
          >
          </el-time-picker>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="modificationVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="modificationVisible = false"
          >ç¡® å®š</el-button
        >
      </span>
    </el-dialog>
    <!-- å†æ¬¡éšè®¿ -->
    <el-dialog title="患者再次随访" :visible.sync="dialogFormVisible">
      <el-form ref="zcform" :rules="zcrules" :model="zcform" label-width="80px">
        <el-form-item label="任务名称">
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.taskName"
          ></el-input>
        </el-form-item>
        <el-form-item label="患者名称">
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.sendname"
          ></el-input>
        </el-form-item>
        <el-form-item label="年龄">
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.age"
          ></el-input>
        </el-form-item>
        <el-form-item label="科室">
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.deptname"
          ></el-input>
        </el-form-item>
        <el-form-item label="病区">
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.leavehospitaldistrictname"
          ></el-input>
        </el-form-item>
        <el-form-item label="随访方式" prop="resource">
          <el-radio-group v-model="zcform.resource">
            <el-radio label="1">本病区随访</el-radio>
            <el-radio label="2">随访中心随访</el-radio>
          </el-radio-group>
        </el-form-item>
        <!-- <el-form-item label="即刻发送">
          <el-switch v-model="zcform.delivery"></el-switch>
        </el-form-item> -->
        <el-form-item label="门诊时间">
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.endtime"
          ></el-input>
        </el-form-item>
        <el-form-item label="随访完成时间" prop="date1">
          <el-date-picker
            type="date"
            placeholder="选择日期"
            v-model="zcform.date1"
            style="width: 100%"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="随访记录">
          <el-input type="textarea" v-model="zcform.remark"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="setupsubtask">确认创建服务</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  delUser,
  addUser,
  updateUser,
  resetUserPwd,
  changeUserStatus,
} from "@/api/system/user";
import {
  getTaskservelist,
  buidegetTasklist,
  addserviceSubtask,
  query360PatInfo,
} from "@/api/AiCentre/index";
import { alterpatient, particularpatient } from "@/api/patient/homepage";
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
  name: "Discharge",
  dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
  components: { Treeselect },
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•个禁用
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      dialogFormVisible: false,
      // æ€»æ¡æ•°
      total: 0,
      // ç”¨æˆ·è¡¨æ ¼æ•°æ®
      userList: null,
      // å¼¹å‡ºå±‚标题
      title: "新增影像随访",
      // æ˜¯å¦æ˜¾ç¤ºä¿®æ”¹ã€æ·»åŠ å¼¹å‡ºå±‚
      addalteropen: false,
      // ä¿®æ”¹å‘送时间对话框
      modificationVisible: false,
      // éƒ¨é—¨åç§°
      deptName: undefined,
      // é»˜è®¤å¯†ç 
      initPassword: undefined,
      // æ—¥æœŸèŒƒå›´
      dateRange: [],
      dateRangefs: [],
      // å²—位选项
      postOptions: [],
      ruleForm: {
        type: [],
      },
      zcform: {},
      dynamicTags: ["选项一", "选项二", "选项三"], //选项
      inputVisible: false,
      Labelchange: false,
      ycvalue: "",
      yfsvalue: "",
      inputValue: "",
      preachform: "",
      previewVisible: false, //影像随访预览弹框
      radio: "",
      radios: [],
      total: 0, // æ€»æ¡æ•°
      ImportQuantity: 999, //导影像随访数量
      //预览影像随访信息
      previewvalue: {
        username: "这个医生对你怎么样",
      },
      value: [],
      list: [],
      sourcetype: [
        {
          value: 1,
          label: "科室",
          children: [],
        },
        {
          value: 2,
          label: "病区",
          children: [],
        },
        {
          value: 3,
          label: "全部",
        },
      ],
      loading: false,
      cardlist: [
        {
          name: "门诊服务总量",
          value: 0,
        },
        // {
        //   name: "患者过滤",
        //   value: 0,
        // },
        {
          name: "需随访",
          value: 0,
        },
        {
          name: "发送失败",
          value: 0,
        },
        {
          name: "待随访",
          value: 0,
        },
        // {
        //   name: "已发送",
        //   value: 0,
        // },
        // {
        //   name: "表单已发送",
        //   value: 0,
        // },
      ],
      zcrules: {
        date1: [
          { required: true, message: "请选择随访方式", trigger: "change" },
        ],
        resource: [
          { required: true, message: "请选择随访时间", trigger: "blur" },
        ],
      },
      // è¡¨å•参数
      form: {
        phonenumber: "",
        totagid: "",
        types: "",
        nickName: "",
        qystatus: "",
        btstatus: "",
      },
      topicoptionssort: [
        {
          value: 0,
          label: "门诊时间(正序)",
        },
        {
          value: 1,
          label: "门诊时间(倒序)",
        },
        {
          value: 2,
          label: "发送时间(正序)",
        },
        {
          value: 3,
          label: "发送时间(倒序)",
        },
        {
          value: 7,
          label: "应随访日期(正序)",
        },
        {
          value: 8,
          label: "应随访日期(倒序)",
        },
      ],
      // æŸ¥è¯¢å‚æ•°
      topqueryParams: {
        pageNum: 1,
        pageSize: 10,
        sendstate: 2,
        sort: localStorage.getItem("orgname") == "丽水市中医院" ? 8 : 2, //0 é—¨è¯Šæ—¶é—´(正序)    1 é—¨è¯Šæ—¶é—´(倒序)   2 å‘送时间(正序)    3 å‘送时间(倒序)  7应随访日期(倒序) åº”随访日期(正序)
        serviceType: 3,
        searchscope: 3,
        visitCount: 2,
        scopetype: [],
        visitDeptCodes: [],
        leaveldeptcodes:[],
        leavehospitaldistrictcodes: [],
      },
      propss: { multiple: true },
      options: [],
      topicoptions: [
        {
          value: null,
          label: "全部",
        },
        {
          value: 1,
          label: "表单已领取",
        },
        {
          value: 2,
          label: "待随访",
        },
        {
          value: 3,
          label: "表单已发送",
        },
        {
          value: 4,
          label: "不执行",
        },
        {
          value: 5,
          label: "发送失败",
        },
        {
          value: 6,
          label: "已完成",
        },
      ],
      sextype: [
        {
          value: 1,
          label: "男",
        },
        {
          value: 2,
          label: "女",
        },
      ],
      topicoptionsyj: [
        {
          value: 1,
          label: "异常",
        },
        {
          value: 0,
          label: "正常",
        },
      ],
      url: "http://9.208.2.190:8090/smartor/serviceExternal/query360PatInfo",
      postData: {
        XiaoXiTou: {
          FaSongFCSJC: "ZJHES",
          FaSongJGID: localStorage.getItem("orgid"),
          FaSongJGMC: localStorage.getItem("orgname"),
          FaSongSJ: "2025-01-09 17:29:36",
          FaSongXTJC: "SUIFANGXT",
          FaSongXTMC: "随访系统",
          XiaoXiID: "5FA92AFB-9833-4608-87C7-F56A654AC171",
          XiaoXiLX: "SC_LC_360STCX",
          XiaoXiMC: "360 视图查询",
          ZuHuID: localStorage.getItem("ZuHuID"),
          ZuHuMC: localStorage.getItem("orgname"),
        },
        YeWuXX: {
          BingRenXX: {
            ZhengJianHM: "",
            ZhengJianLXDM: "01",
            ZhengJianLXMC: "居民身份证",
            ZuZhiJGID: localStorage.getItem("orgid"),
            ZuZhiJGMC: localStorage.getItem("orgname"),
          },
          YongHuXX: {
            XiTongID: "SUIFANGXT",
            XiTongMC: "随访系统",
            YongHuID: localStorage.getItem("YongHuID"),
            YongHuXM: localStorage.getItem("YongHuXM"),
            ZuZhiJGID: localStorage.getItem("orgid"),
            ZuZhiJGMC: localStorage.getItem("orgname"),
            idp: "lyra",
          },
        },
      },
      amendtag: false,
      errtype: "",
      leavehospitaldistrictcode: "",
      serviceState: [],
      checkboxlist: [],
      // è¡¨å•校验
      rules: {},
    };
  },
  watch: {},
  created() {
    this.serviceState = store.getters.serviceState;
    this.checkboxlist = store.getters.checkboxlist;
    this.errtype = this.$route.query.errtype;
    this.leavehospitaldistrictcode =
      this.$route.query.leavehospitaldistrictcode;
    this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
      return {
        label: dept.deptName,
        value: dept.deptCode,
      };
    });
    this.sourcetype[1].children = store.getters.belongWards.map((dept) => {
      return {
        label: dept.districtName,
        value: dept.districtCode,
      };
    });
    if (this.errtype) {
      this.toleadExport(2);
    } else {
      this.getList(1);
    }
    this.getConfigKey("sys.user.initPassword").then((response) => {
      this.initPassword = response.msg;
    });
  },
  activated() {
    this.getList(1);
  },
  methods: {
    /** æŸ¥è¯¢éšè®¿æœåŠ¡åˆ—è¡¨ */
    getList(refresh) {
      // é»˜è®¤å…¨éƒ¨
      if (this.topqueryParams.searchscope == 3) {
        this.topqueryParams.visitDeptCodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      // æŽ¥å—异常跳转
      if (this.errtype) {
        this.topqueryParams.leavehospitaldistrictcodes.push(
          this.leavehospitaldistrictcode
        );
        console.log(this.topqueryParams.leavehospitaldistrictcodes, "11");
      }
      this.loading = true;
      if (
        this.topqueryParams.leavehospitaldistrictcodes[0] &&
        this.topqueryParams.visitDeptCodes[0]&&this.topqueryParams.leaveldeptcodes[0]
      ) {
        this.topqueryParams.deptOrDistrict = 2;
      } else {
        this.topqueryParams.deptOrDistrict = 1;
      }
      getTaskservelist(this.topqueryParams).then((response) => {
        this.userList = response.rows[0].serviceSubtaskList;
        this.total = response.total;
        if (refresh) {
          this.cardlist[0].value =
            Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
          // this.cardlist[1].value = response.rows[0].wzx;
          this.cardlist[1].value = response.rows[0].ysf;
          this.ycvalue = response.rows[0].yc;
          this.cardlist[2].value = response.rows[0].fssb;
          this.cardlist[3].value = response.rows[0].dsf;
          // this.cardlist[4].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
        this.userList.forEach((item) => {
          let idArray = null;
          if (item.endtime) {
            item.endDay = this.daysBetween(item.endtime);
          }
          if (item.preachform) {
            if (item.endtime) {
              item.preachformson = item.preachform;
              idArray = item.preachform.split(",");
            }
            item.preachform = idArray.map((value) => {
              // æŸ¥æ‰¾id对应的对象
              const item = this.checkboxlist.find(
                (item) => item.value == value
              );
              // å¦‚果找到对应的id,返回label值,否则返回null
              return item ? item.label : null;
            });
          }
        });
        this.total = response.total;
      });
    },
    affiliation() {
      this.topqueryParams.managementDoctorCode= store.getters.hisUserId;
      this.getList(1);
    },
    onthatday() {
      this.topqueryParams.startSendDateTime = this.getCurrentDate();
      this.topqueryParams.endSendDateTime = this.getCurrentDate();
      this.getList(1);
    },
    getCurrentDate() {
      const now = new Date();
      return now.toISOString().slice(0, 10); // æˆªå–前10个字符,即 YYYY-MM-DD
    },
    buidegetTasklist(type) {
      if (this.topqueryParams.searchscope == 3) {
        this.topqueryParams.visitDeptCodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
          this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      // æŽ¥å—异常跳转
      if (this.errtype) {
        this.topqueryParams.leavehospitaldistrictcodes.push(
          this.leavehospitaldistrictcode
        );
      }
      let obj = {
        pageNum: 1,
        pageSize: 10,
        leavehospitaldistrictcodes:
          this.topqueryParams.leavehospitaldistrictcodes,
        sendstates: [2, 3],
        visitDeptCodes: this.topqueryParams.visitDeptCodes,
        leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
      };
      buidegetTasklist(obj).then((response) => {
        this.userList = response.rows[0].serviceSubtaskList;
        this.total = response.total;
        if (refresh) {
          this.cardlist[0].value =
            Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
          this.cardlist[1].value = response.rows[0].wzx;
          this.cardlist[2].value = response.rows[0].ysf;
          this.ycvalue = response.rows[0].yc;
          this.cardlist[3].value = response.rows[0].fssb;
          this.cardlist[4].value = response.rows[0].dsf;
          // this.cardlist[5].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
        this.userList.forEach((item) => {
          let idArray = null;
          if (item.endtime) {
            item.endDay = this.daysBetween(item.endtime);
          }
          if (item.preachform) {
            if (item.endtime) {
              item.preachformson = item.preachform;
              idArray = item.preachform.split(",");
            }
            item.preachform = idArray.map((value) => {
              // æŸ¥æ‰¾id对应的对象
              const item = this.checkboxlist.find(
                (item) => item.value == value
              );
              // å¦‚果找到对应的id,返回label值,否则返回null
              return item ? item.label : null;
            });
          }
        });
        this.total = response.total;
      });
    },
    // æŸ¥çœ‹é—¨è¯Šéšè®¿è¯¦æƒ…
    Referencequestion(row) {
      this.previewVisible = true;
    },
    // æ·»åŠ å¼¹æ¡†æœç´¢
    remoteMethod(query) {
      if (query !== "") {
        this.loading = true;
        setTimeout(() => {
          this.loading = false;
          this.options = this.list.filter((item) => {
            return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
          });
        }, 200);
      } else {
        this.options = [];
      }
    },
    // å½±åƒéšè®¿çŠ¶æ€ä¿®æ”¹
    handleStatusChange(row) {
      let text = row.status === "0" ? "启用" : "停用";
      this.$modal
        .confirm('确认要"' + text + '""' + row.userName + '"用户吗?')
        .then(function () {
          return changeUserStatus(row.userId, row.status);
        })
        .then(() => {
          this.$modal.msgSuccess(text + "成功");
        })
        .catch(function () {
          row.status = row.status === "0" ? "1" : "0";
        });
    },
    // è¡¨å•重置
    reset() {
      this.form = {
        userId: undefined,
        deptId: undefined,
        userName: undefined,
        nickName: undefined,
        password: undefined,
        phonenumber: undefined,
        email: undefined,
        sex: undefined,
        status: "0",
        remark: undefined,
        postIds: [],
        roleIds: [],
      };
      this.resetForm("form");
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery(refresh) {
      if (this.topqueryParams.searchscope == 3) {
        this.topqueryParams.visitDeptCodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      this.topqueryParams.pageNum = 1;
      this.topqueryParams.startOutHospTime = this.dateRange[0];
      this.topqueryParams.endOutHospTime = this.dateRange[1];
      this.topqueryParams.startSendDateTime = this.dateRangefs[0];
      this.topqueryParams.endSendDateTime = this.dateRangefs[1];
      console.log("2");
      this.getList(refresh);
    },
    // æ‚£è€…范围处理
    handleChange(value) {
      let type = value[0];
      let code = value.slice(-1)[0];
      this.topqueryParams.leavehospitaldistrictcodes = [];
      this.topqueryParams.visitDeptCodes = [];
      this.topqueryParams.leaveldeptcodes = [];
      if (type == 1) {
        this.topqueryParams.visitDeptCodes.push(code);
        this.topqueryParams.leaveldeptcodes.push(code);
        this.topqueryParams.leavehospitaldistrictcodes = [];
        this.topqueryParams.searchscope = 1;
      } else if (type == 2) {
        this.topqueryParams.leavehospitaldistrictcodes.push(code);
        this.topqueryParams.visitDeptCodes = [];
        this.topqueryParams.leaveldeptcodes = [];
        this.topqueryParams.searchscope = 2;
      } else {
        this.topqueryParams.searchscope = 3;
      }
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.dateRange = [];
      this.dateRangefs = [];
      this.topqueryParams = {
        pageNum: 1,
        pageSize: 10,
        sendstate: 2,
        sort: 2, //0 é—¨è¯Šæ—¶é—´(正序)    1 é—¨è¯Šæ—¶é—´(倒序)   2 å‘送时间(正序)    3 å‘送时间(倒序)
        serviceType: 3,
        searchscope: 3,
        visitCount: 2,
        scopetype: [],
        visitDeptCodes: [],
        leaveldeptcodes:[],
        leavehospitaldistrictcodes: [],
      };
      this.handleQuery(1);
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.userId);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
    },
    //删除选项
    handleClose(tag) {
      this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
    },
    //触发新增输入
    showInput() {
      this.inputVisible = true;
      this.$nextTick((_) => {
        this.$refs.saveTagInput.$refs.input.focus();
      });
    },
    //获取失去焦点触发
    handleInputConfirm() {
      let inputValue = this.inputValue;
      if (inputValue) {
        this.dynamicTags.push(inputValue);
      }
      this.inputVisible = false;
      this.inputValue = "";
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    handleAdd() {
      this.$router.push({
        path: "/followvisit/QuestionnaireTask",
        query: {
          type: 2,
          serviceType: 3,
        },
      });
    },
    //患者360跳转
    gettoken360(sfzh, drcode, drname) {
      // // this.$modal.msgWarning('360功能暂未开通');
      this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
      query360PatInfo(this.postData).then((res) => {
        if (res.data.url) {
          window.open(res.data.url, "_blank");
          // this.linkUrl = res.data.url;
        } else {
          this.$modal.msgWarning("360查询无结果");
        }
      });
    },
    /** é‡ç½®å¯†ç æŒ‰é’®æ“ä½œ */
    handleResetPwd(row) {
      this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        closeOnClickModal: false,
        inputPattern: /^.{5,20}$/,
        inputErrorMessage: "用户密码长度必须介于 5 å’Œ 20 ä¹‹é—´",
      })
        .then(({ value }) => {
          resetUserPwd(row.userId, value).then((response) => {
            this.$modal.msgSuccess("修改成功,新密码是:" + value);
          });
        })
        .catch(() => {});
    },
    // å–消按钮
    cancel() {
      this.Labelchange = false;
      this.reset();
    },
    /** æäº¤æŒ‰é’® */
    submitForm: function () {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          this.form.isoperation = 2;
          this.form.notrequiredFlag = 1;
          alterpatient(this.form)
            .then((response) => {
              console.log(response);
            })
              .then(() => {
              this.getList(1);
              this.$modal.msgSuccess("患者过滤成功");
            });
          this.reset();
          this.Labelchange = false;
        }
      });
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const userIds = row.userId || this.ids;
      this.$modal
        .confirm('是否确认删除用户编号为"' + userIds + '"的数据项?')
        .then(function () {
          return delUser(userIds);
        })
        .then(() => {
          this.getList(1);
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    // å…¨éƒ¨åœæ­¢
    AllStop() {
      this.$modal
        .confirm("是否停止全部任务?")
        .then(function () {
          return console.log("停止成功");
        })
        .then(() => {
          this.getList(1);
          this.$modal.msgWarning("停止成功");
        })
        .catch(() => {});
    },
    // å…¨éƒ¨å¼€å§‹
    AllStarted() {
      this.$modal
        .confirm("是否开启全部任务?")
        .then(function () {
          return console.log("开启成功");
        })
        .then(() => {
          this.getList(1);
          this.$modal.msgSuccess("开启成功");
        })
        .catch(() => {});
    },
    // ä»»åŠ¡é‡ç½®
    TaskReset() {
      this.$modal
        .confirm("是否重置选中的任务项?")
        .then(function () {
          return console.log("选中成功");
        })
        .then(() => {
          this.getList(1);
          this.$modal.msgSuccess("重置成功");
        })
        .catch(() => {});
    },
    // è®¾ç½®å‘送时间
    Sendtimesetting() {
      this.modificationVisible = true;
    },
    // è·³è½¬è¯¦æƒ…页
    Seedetails(row) {
    let type = "";
      console.log(row, "rwo");
        if (row.type == 1) {
          type = 1;
        }
      this.$router.push({
        path: "/followvisit/record/detailpage/",
        query: {
          taskid: row.taskid,
          patid: row.patid,
          id: row.id,
          Voicetype: type,
          visitCount: this.topqueryParams.visitCount,
        },
      });
    },
    // å†æ¬¡éšè®¿
    followupvisit(row) {
      this.zcform = row;
      this.zcform.endtime = this.formatTime(this.zcform.endtime);
      this.dialogFormVisible = true;
    },
    onSubmit() {},
    // æš‚停服务
    handlestop(row) {
      let objson = row;
      this.$modal
        .confirm(
          '是否确认暂停任务名称为"' +
            row.taskName +
            '患者名称为"' +
            row.sendname +
            '"的数据项?'
        )
        .then(() => {
          getTaskservelist({
            patid: row.patid,
            taskid: row.taskid,
          }).then((res) => {
            if (res.code == 200) {
              objson.sendstate = 4;
              objson.remark = "服务暂停";
              Editsingletaskson(objson).then((res) => {
                if (res.code) {
                  this.$modal.msgSuccess("记录成功");
                  this.getList(1);
                }
              });
            }
          });
        })
        .catch(() => {});
    },
    // æ‚£è€…过滤触发
    handleUpdate(row) {
      particularpatient(row.patid).then((response) => {
        this.form = response.data;
        this.form.filterDrname = store.getters.nickName;
      });
      this.amendtag = true;
      this.Labelchange = true;
    },
    // ä¾¿æ·æŒ‰é’®
    toleadExport(too) {
      if (too == 1) {
        this.topqueryParams.sendstate = 4;
        this.topqueryParams.excep = null;
      } else if (too == 2) {
        this.topqueryParams.excep = 1;
      }
      this.handleQuery();
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.topqueryParams.pageNum = null;
      this.topqueryParams.pageSize = null;
      this.download(
        "smartor/serviceSubtask/patItemExport",
        {
          ...this.topqueryParams,
        },
        `user_${new Date().getTime()}.xlsx`
      );
    },
    // å¼‚常列渲染
    tableRowClassName({ row, rowIndex }) {
      if (row.excep == 1) {
        return "warning-row";
      }
      return "";
    },
    // åˆ›å»ºå†æ¬¡éšè®¿æœåŠ¡
    setupsubtask() {
      this.$refs["zcform"].validate((valid) => {
        if (valid) {
          this.zcform.remark =
            this.zcform.remark + "【" + this.getCurrentTime() + "】";
          let form = structuredClone(this.zcform);
          form.longSendTime = this.formatTime(form.date1);
          form.finishtime = "";
          if (form.resource) {
            if (form.resource == 2) {
              form.serviceType = 13;
            }
          } else {
            this.$modal.msgError("未选择随访方式");
          }
          form.id = null;
          form.sendstate = 2;
          form.preachform = form.preachformson;
          form.longTask = 0;
          addserviceSubtask(form).then((res) => {
            if (res.code == 200) {
              this.$modal.msgSuccess("创建成功");
            } else {
              this.$modal.msgError("创建失败");
            }
            this.dialogFormVisible = false;
          });
        }
      });
    },
    getCurrentTime() {
      const now = new Date();
      const year = now.getFullYear();
      const month = String(now.getMonth() + 1).padStart(2, "0");
      const day = String(now.getDate()).padStart(2, "0");
      const hours = String(now.getHours()).padStart(2, "0");
      const minutes = String(now.getMinutes()).padStart(2, "0");
      const seconds = String(now.getSeconds()).padStart(2, "0");
      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
    },
  },
};
</script>
<style lang="scss" scoped>
.el-button--primary.is-plain {
  color: #ffffff;
  background: #409eff;
  border-color: #4fabe9;
}
.document {
  // width: 100px;
  height: 50px;
}
::v-deep.el-table .warning-row {
  background: #eec4c4;
}
.documentf {
  display: flex;
  justify-content: flex-end;
}
.download {
  text-align: center;
  .el-upload__tip {
    font-size: 23px;
  }
  .el-upload__text {
    font-size: 23px;
  }
}
.uploading {
  margin-top: 20px;
  margin: 20px;
  padding: 30px;
  background: #ffffff;
  border: 1px solid #dcdfe6;
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
    0 0 6px 0 rgba(0, 0, 0, 0.04);
}
.el-tag + .el-tag {
  margin-left: 10px;
}
.button-new-tag {
  margin-left: 10px;
  height: 32px;
  line-height: 30px;
  padding-top: 0;
  padding-bottom: 0;
}
.input-new-tag {
  width: 90px;
  margin-left: 10px;
  vertical-align: bottom;
}
.drexamine {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: #daeaf5;
  img {
    width: 100px;
    height: 100px;
  }
}
.qrcode-dialo {
  // text-align: center;
  //   display: flex;
  margin: 20px;
  padding: 30px;
  background: #edf1f7;
  border: 1px solid #dcdfe6;
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
    0 0 6px 0 rgba(0, 0, 0, 0.04);
  .topic-dev {
    margin-bottom: 25px;
    font-size: 20px !important;
    .dev-text {
      margin-bottom: 10px;
    }
  }
}
::v-deep.leftvlue .el-card__body {
  background: #F2F8FF;
  color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
  background: #3664D9;
  color: #fff;
  cursor: pointer; /* é¼ æ ‡æ‚¬æµ®æ—¶å˜ä¸ºæ‰‹å½¢ */
}
::v-deep.errleftvlue .el-card__body {
  background: #fdd0d7;
}
::v-deep.errleftvlue .el-card__body:hover {
  background: #f88d96;
  cursor: pointer; /* é¼ æ ‡æ‚¬æµ®æ—¶å˜ä¸ºæ‰‹å½¢ */
}
::v-deep.ysfleftvlue .el-card__body {
  background: #d0fdd8;
}
::v-deep.ysfleftvlue .el-card__body:hover {
  background: #8df8a4;
  cursor: pointer; /* é¼ æ ‡æ‚¬æµ®æ—¶å˜ä¸ºæ‰‹å½¢ */
}
.button-bb {
  font-weight: 500;
  background-color: #2ba05c;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
}
.button-xq {
  font-weight: 500;
  background-color: #409eff;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
}
.button-sc {
  font-weight: 500;
  background-color: #b3a21f;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
}
.button-zx {
  background: #4fabe9;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
}
.button-textxga {
  color: #de7897;
}
::v-deep.el-radio-group {
  span {
    font-size: 24px;
  }
}
// é€‰é¡¹å­—体放大
// ::v-deep.el-checkbox-group {
//   span {
//     font-size: 24px;
//   }
// }
</style>
src/views/followvisit/discharge/index.vue
@@ -274,7 +274,7 @@
            </div>
          </div>
        </el-col>
        <!-- <el-col :span="1.5">
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-tooltip
@@ -295,7 +295,7 @@
              </el-tooltip>
            </div>
          </div>
        </el-col> -->
        </el-col>
      </el-row>
      <el-table
        v-loading="loading"
@@ -1288,6 +1288,10 @@
          label: "异常",
        },
        {
          value: 2,
          label: "警告",
        },
        {
          value: 0,
          label: "正常",
        },
@@ -1378,13 +1382,13 @@
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      if (this.endOut == 0) {
        this.topqueryParams.endSendDateTime = this.formatDateToYYYYMMDDHHMMSS(
          this.getEndOfDay()
        );
      } else {
        this.topqueryParams.endSendDateTime = null;
      }
      // if (this.endOut == 0) {
        // this.topqueryParams.endSendDateTime = this.formatDateToYYYYMMDDHHMMSS(
        //   this.getEndOfDay()
        // );
      // } else {
      //   this.topqueryParams.endSendDateTime = null;
      // }
      // æŽ¥å—异常跳转
      if (this.errtype) {
        this.topqueryParams.leavehospitaldistrictcodes.push(
src/views/followvisit/record/detailpage/index.vue
@@ -1032,7 +1032,7 @@
        width="60%"
      >
        <CallCenterLs
          ref="callCenterModal"
          ref="CallCenterLs"
          :initial-phone="currentPhoneNumber"
        />
      </el-dialog>
@@ -1153,6 +1153,9 @@
      isEndingCall: false,
      CaldialogVisible: false,
      currentCall: null, // å½“前通话对象
      // è·¯ç”±ç›‘听相关
      routeWatcher: null,
      lastRoutePath: this.$route.path,
      input: "今天身体还不错",
      radio: "2",
      taskname: "",
@@ -1377,6 +1380,8 @@
      patid: null,
    };
  },
  computed: {
    callStatusText() {
      const statusMap = {
@@ -2356,6 +2361,11 @@
  // },
  beforeRouteLeave(to, from, next) {
    this.$refs.callButton.cleanupResources();
    if (this.$refs.CallCenterLs) {
      console.log(1);
      this.$refs.CallCenterLs.handleSeatLogout();
    }
    next(); // ç¡®ä¿è°ƒç”¨ nex
  },
  // beforeRouteUpdate() {
@@ -2550,7 +2560,7 @@
.CONTENT {
  padding: 10px;
  height: 100%;
  min-height: 660px; /* è®¾ç½®æœ€å°é«˜åº¦ */
  min-height: 738px; /* è®¾ç½®æœ€å°é«˜åº¦ */
  .title {
    font-size: 22px;
@@ -2565,7 +2575,7 @@
  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; /* è®¾ç½®æœ€å¤§é«˜åº¦ */
  max-height: 618px; /* è®¾ç½®æœ€å¤§é«˜åº¦ */
  overflow-y: auto; /* å†…容超过高度时显示滚动条 */
  .topic-dev {
src/views/knowledge/education/compilequer/index copy.vue
@@ -599,7 +599,8 @@
      // å†…网的部分(文件)
      oldPatternhtml: "/http:\/\/192\.168\.191\.181:8095\/profile\/upload\//g",
      // å¤–网部分(文件)
      newPattern: "http://218.108.11.22:8093/profile-api/upload",
      // newPattern: "http://218.108.11.22:8093/profile-api/upload",
      newPattern: "http://m.zjtongde.com:13871/prod-api/profile/upload",
      xjxsoptions: [
        {
@@ -730,8 +731,8 @@
      var doc = parser.parseFromString(html, "text/html");
      // å®šä¹‰è¦æ›¿æ¢çš„æ–°æ—§URL
      var oldUrlBase = "http://192.168.191.181:8095/profile/upload";
      var newUrlBase = "http://218.108.11.22:8093/profile-api/upload";
      var oldUrlBase = this.oldPattern;
      var newUrlBase =this.newPattern;
      // èŽ·å–æ‰€æœ‰çš„video元素
      var videos = doc.querySelectorAll("video");
src/views/knowledge/education/compilequer/index.vue
@@ -400,9 +400,13 @@
                if (response.data && response.data.url) {
                  let imgUrl = response.data.url;
                  // imgUrl = imgUrl.replace(
                  //   "http://218.108.11.22:8093/profile-api/upload",
                  //   "http://192.88.117.236:8090/prod-api/profile/upload"
                  // );
                  imgUrl = imgUrl.replace(
                    "http://218.108.11.22:8093/profile-api/upload",
                    "http://192.168.191.181:8095/profile/upload"
                    "http://m.zjtongde.com:13871/prod-api/profile/upload",
                    "http://192.88.117.236:8090/prod-api/profile/upload"
                  );
                  insertFn(imgUrl);
                }
@@ -480,11 +484,13 @@
      options: [],
      optionstag: [],
      // å†…网的部分(文件)
      oldPattern: "http://192.168.191.181:8095/profile/upload",
      // oldPattern: "http://192.168.191.181:8095/profile/upload",
      oldPattern: "http://192.88.117.236:8090/prod-api/profile/upload",
      // å†…网的部分(文件)
      oldPatternhtml: "/http:\/\/192\.168\.191\.181:8095\/profile\/upload\//g",
      oldPatternhtml: "/http:\/\/192\.88\.117\.236:8095\/profile\/upload\//g",
      // å¤–网部分(文件)
      newPattern: "http://218.108.11.22:8093/profile-api/upload",
      // newPattern: "http://218.108.11.22:8093/profile-api/upload",、、新华
      newPattern: "http://m.zjtongde.com:13871/prod-api/profile/upload",
      xjxsoptions: [
        {
@@ -630,7 +636,7 @@
      // ------------------
      // let html =
      //   '<p>测试</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.168.191.181:8095/profile/upload/vadio/营养泵介绍.mp4"></video><p>测试111</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.168.191.181:8095/profile/upload/vadio/注射器推注.mp4"></video><p><br></p>';
      //   '<p>测试</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.88.117.236:8090/prod-api/profile/upload/vadio/营养泵介绍.mp4"></video><p>测试111</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.88.117.236:8090/prod-api/profile/upload/vadio/注射器推注.mp4"></video><p><br></p>';
      // // html = html.parserdom(this.oldPattern, this.newPattern);
      // html = this.parserdom(html);
      // console.log(html, "html");
@@ -645,17 +651,27 @@
      var doc = parser.parseFromString(html, "text/html");
      // å®šä¹‰è¦æ›¿æ¢çš„æ–°æ—§URL
      var oldUrlBase = "http://192.168.191.181:8095/profile/upload";
      var newUrlBase = "http://218.108.11.22:8093/profile-api/upload";
      var oldUrlBase = this.oldPattern;
      // var newUrlBase = "http://218.108.11.22:8093/profile-api/upload";
      var newUrlBase = this.newPattern;
      // èŽ·å–æ‰€æœ‰çš„video元素
      var videos = doc.querySelectorAll("video");
      var images = doc.querySelectorAll("img");
      // éåŽ†æ‰€æœ‰çš„video元素并替换src属性
      videos.forEach(function (video) {
        var src = video.getAttribute("src");
        if (src.startsWith(oldUrlBase)) {
          video.setAttribute("src", src.replace(oldUrlBase, newUrlBase));
        }
      });
      console.log(images,'images');
       images.forEach(function (img) {
        var src = img.getAttribute("src");
        if (src.startsWith(oldUrlBase)) {
          img.setAttribute("src", src.replace(oldUrlBase, newUrlBase));
        }
      });
@@ -685,6 +701,10 @@
        fileName: this.generateRandomHtmlFilename(),
      }).then((res) => {
        this.ruleForm.richText = res.msg;
        this.ruleForm.richText = res.msg.replace(
            this.oldPattern,
            this.newPattern
          );
        console.log(this.ruleForm.richText, "this.ruleForm.richText");
        // å¤„理内网html
        addrichText({
src/views/knowledge/education/index copy.vue
@@ -595,6 +595,7 @@
      queryParams: {
        pageNum: 1,
        pageSize: 20,
        hetype:1,
        isavailable: "",
      },
    };
src/views/knowledge/education/index.vue
@@ -5,7 +5,7 @@
    <div class="sidecolumn">
      <div class="sidecolumn-top">
        <div class="top-wj">宣教类型</div>
        <div class="top-tj" @click="dialogFormVisible = true">+添加类别</div>
        <div class="top-tj" @click="Newcategory">+添加类别</div>
      </div>
      <div class="center-ss">
        <el-input
@@ -596,6 +596,7 @@
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        hetype:1,
        isavailable: "",
      },
    };
@@ -783,6 +784,13 @@
        query: { id: row.id },
      });
    },
         Newcategory(){
      this.classifyform= {}, //类别表单
      this.radio = "主分类";
     this.dialogFormVisible = true
     this.zifon = true;
      this.zufon = true;
    },
    // æŸ¥çœ‹å®£æ•™
    Vieweducation(row) {
      this.htmlRichText = null;
@@ -792,7 +800,9 @@
        .then((response) => {
          console.log(response.data, "数据"); // è¾“出获取到的文件内容
          this.htmlRichText = response.data;
          this.htmlRichText = this.addStyleToImages(this.htmlRichText);
          // this.htmlRichText = this.addStyleToImages(this.htmlRichText);
          console.log(this.htmlRichText);
        })
        .catch((error) => {
          this.$modal.msgError("获取富文本失败");
@@ -855,7 +865,7 @@
    },
    // æŸ¥è¯¢æ ‘
    getDeptTree() {
      getheLibraryAssort({}).then((res) => {
      getheLibraryAssort({ hetype: 2 }).then((res) => {
        this.deptOptions = res.rows;
        this.dialogFormVisible = false;
      });
@@ -930,8 +940,12 @@
      this.dialogFormVisible = true;
      if (!b.pid) {
        this.radio = "主分类";
        this.title = "修改主分类";
        this.zufon = false;
      } else {
        this.radio = "子分类";
        this.title = "修改子分类";
        this.zifon = false;
      }
      this.classifyform = b;
      this.dialogFormVisible = true;
src/views/knowledge/questionnaire/compilequer/index.vue
@@ -671,19 +671,75 @@
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <el-row :gutter="10">
                      <el-form-item label="异常提醒">
                        <el-radio-group v-model="item.isabnormal">
                          <el-radio :label="1">是</el-radio>
                          <el-radio :label="0">否</el-radio>
                        </el-radio-group>
                    <el-row>
                      <el-form-item label="关联服务">
                        <div
                          v-if="item.sendTaskname"
                          class="service-tag-container"
                        >
                          <el-tag
                            type="success"
                            closable
                            @close="removeService(item)"
                            class="service-tag"
                          >
                            <i class="el-icon-connection service-icon"></i>
                            {{ item.sendTaskname }}
                          </el-tag>
                        </div>
                        <div v-else class="service-add-btn">
                          <el-button
                            type="success"
                            size="small"
                            icon="el-icon-plus"
                            @click="openServiceDialog(item)"
                            class="add-service-btn"
                          >
                            é€‰æ‹©ä»»åŠ¡
                          </el-button>
                        </div>
                      </el-form-item>
                    </el-row>
                    <el-row :gutter="10">
                      <el-col :span="11">
                        <!-- ä¿®æ”¹ï¼šå¼‚常提醒部分 -->
                        <el-form-item label="异常提醒">
                          <el-select
                            v-model="item.isabnormal"
                            placeholder="请选择状态"
                          >
                            <el-option
                              :value="0"
                              label="正常"
                              :style="{ color: '#67C23A' }"
                            >
                              <span style="color: #67c23a">● æ­£å¸¸</span>
                            </el-option>
                            <el-option
                              :value="1"
                              label="异常"
                              :style="{ color: '#E6A23C' }"
                            >
                              <span style="color: #e6a23c">● å¼‚常</span>
                            </el-option>
                            <el-option
                              :value="2"
                              label="警告"
                              :style="{ color: '#F56C6C' }"
                            >
                              <span style="color: #f56c6c">● è­¦å‘Š</span>
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                      <el-col :span="11">
                      <el-form-item label="是否选中收集附加信息">
                        <el-radio-group v-model="item.appendflag">
                          <el-radio label="1">是</el-radio>
                          <el-radio label="0">否</el-radio>
                        </el-radio-group>
                      </el-form-item>
                      </el-col>
                    </el-row>
                    <el-row :gutter="10" v-if="topicobj.branchFlag == 1">
                      <el-col :span="20"
@@ -1254,6 +1310,144 @@
        </el-tabs>
      </div>
    </el-drawer>
    <!-- é€‰æ‹©ä»»åŠ¡å¼¹çª— -->
    <el-dialog
      title="选择任务"
      :visible.sync="serviceDialogVisible"
      width="50%"
    >
      <div>
        <el-form
          :model="topqueryParams"
          ref="queryForm"
          size="small"
          :inline="true"
          label-width="98px"
        >
          <el-form-item label="任务名称">
            <el-input
              v-model="topqueryParams.taskName"
              @keyup.enter.native="handleQuery"
            ></el-input>
          </el-form-item>
          <el-form-item label="任务类型" prop="status">
            <el-select
              v-model="topqueryParams.serviceType"
              placeholder="请选择服务类型"
            >
              <el-option
                v-for="item in taskoptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-form>
        <el-table
          :data="filteredServiceList"
          v-loading="taskloading"
          @selection-change="handleServiceSelectionChange"
        >
          <el-table-column type="selection" width="55"></el-table-column>
          <el-table-column
            label="任务名称"
            fixed
            align="center"
            key="taskName"
            prop="taskName"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="任务描述"
            align="center"
            key="taskDesc"
            prop="taskDesc"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="服务项目"
            align="center"
            key="templatename"
            prop="templatename"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="总任务/已随访"
            align="center"
            key="nickName"
            width="120"
            prop="nickName"
          >
            <template slot-scope="scope">
              <span
                >{{
                  scope.row.wfs || scope.row.wfs == 0
                    ? scope.row.wfs + scope.row.yfs
                    : ""
                }}/{{ scope.row.yfs }}</span
              >
            </template>
          </el-table-column>
          <el-table-column
            label="是否长期任务"
            align="center"
            key="longTask"
            prop="longTask"
          >
            <template slot-scope="scope">
              <span>{{ scope.row.longTask ? "长期任务" : "非长期" }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="状态"
            align="center"
            key="sendState"
            prop="sendState"
          >
            <template slot-scope="scope">
              <dict-tag
                :options="dict.type.task_status"
                :value="scope.row.sendState"
              />
            </template>
          </el-table-column>
          <el-table-column
            label="创建人"
            align="center"
            key="createBy"
            prop="createBy"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="创建时间"
            sortable
            align="center"
            prop="createTime"
          >
            <template slot-scope="scope">
              <span>{{ formatTime(scope.row.createTime) }}</span>
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="tasktotal > 0"
          :total="tasktotal"
          :page.sync="topqueryParams.pageNum"
          :limit.sync="topqueryParams.pageSize"
          @pagination="gettaskList"
        />
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="serviceDialogVisible = false">取消</el-button>
        <el-button type="primary" @click="confirmServiceSelection"
          >确定</el-button
        >
      </span>
    </el-dialog>
    <!-- æ·»åŠ é€‚ç”¨ç–¾ç—…çª—å£ -->
    <Optional-Form
      ref="child"
@@ -1275,17 +1469,12 @@
  depthospgetsonlist,
  getQtemplateobj,
  compileQtemplate,
  Qtemplateinfo,
  compileissue,
  delQtemplateinfo,
  Followupinfo,
  issueinfo,
  getissuelist,
  depthospgetsondel,
  deltargetillness,
  addtargetillness,
  getillnesslist,
  illnesslistget,
  getTasklist,
  getillness,
} from "@/api/AiCentre/index";
import OptionalForm from "@/components/OptionalForm"; //正则组件
@@ -1294,7 +1483,7 @@
export default {
  name: "Questionnaireinfo",
  dicts: ["sys_normal_disable", "sys_user_sex", "task_status"],
  components: { OptionalForm },
  data() {
@@ -1317,8 +1506,39 @@
      dialogVisiblepatient: false, //适用疾病窗口
      inputValue: "",
      topicobj: {},
      topqueryParams: {
        pageNum: 1,
        pageSize: 10,
        type: 3,
      },
      tasktotal: 0,
      taskloading: false,
      taskoptions: [
        {
          value: 4,
          label: "宣教关怀",
          raw: {
            cssClass: "",
            listClass: "",
          },
        },
        {
          value: 5,
          label: "复诊通知",
          raw: {
            cssClass: "",
            listClass: "",
          },
        },
      ],
      // æ€»æ¡æ•°
      total: 1,
      serviceDialogVisible: false, // é€‰æ‹©ä»»åŠ¡å¼¹çª—æ˜¾ç¤ºæŽ§åˆ¶
      serviceSearch: "", // ä»»åŠ¡æœç´¢å…³é”®è¯
      serviceList: [], // ä»»åŠ¡åˆ—è¡¨
      filteredServiceList: [],
      selectedService: null, // é€‰ä¸­çš„任务
      currentOptionItem: null, // å½“前正在设置的任务选项项
      ruleForm: {
        svyTemplateLibScripts: [],
        tempDetpRelevances: [],
@@ -1767,6 +1987,62 @@
        });
      }
    },
    // ---------------选项任务绑定
    openServiceDialog(item) {
      this.gettaskList();
      this.currentOptionItem = item;
    },
    gettaskList() {
      getTasklist(this.topqueryParams).then((response) => {
        this.filteredServiceList = response.rows;
        this.tasktotal = response.total;
        this.serviceDialogVisible = true;
        this.$forceUpdate();
        this.taskloading = false;
      });
    },
    handleQuery() {
      this.topqueryParams.pageNum = 1;
      this.gettaskList();
    },
    // æ–°å¢žæ–¹æ³•:加载任务列表
    loadServiceList() {
      // è¿™é‡Œè°ƒç”¨API获取任务列表
      // ç¤ºä¾‹æ•°æ®ï¼Œå®žé™…使用时需要调用相应的API
      this.serviceList = [
        { id: 1, taskName: "随访任务1", taskType: "常规随访" },
        { id: 2, taskName: "健康评估任务", taskType: "健康评估" },
        { id: 3, taskName: "用药提醒任务", taskType: "用药管理" },
      ];
    },
    // æ–°å¢žæ–¹æ³•:处理任务选择变化
    handleServiceSelectionChange(selection) {
      this.selectedService = selection.length > 0 ? selection[0] : null;
    },
    // æ–°å¢žæ–¹æ³•:确认选择任务
    confirmServiceSelection() {
      console.log(this.selectedService);
      console.log(this.currentOptionItem);
      if (this.selectedService && this.currentOptionItem) {
        this.currentOptionItem.sendTaskname = this.selectedService.taskName;
        this.currentOptionItem.sendTaskid = this.selectedService.taskid;
        this.serviceDialogVisible = false;
        this.serviceSearch = "";
        this.selectedService = null;
      } else {
        this.$message.warning("请选择一个任务");
      }
    },
    // æ–°å¢žæ–¹æ³•:移除关联服务
    removeService(item) {
      item.sendTaskname = "";
      item.sendTaskid = "";
    },
    // ------------------------
    // ä¸‹ä¸€æ­¥
    nextstep() {
      if (this.Editprogress <= 2) {
@@ -2472,6 +2748,135 @@
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
    0 0 6px 0 rgba(0, 0, 0, 0.04);
}
.service-tag-container {
  display: inline-block;
  .service-tag {
    margin-right: 10px;
    max-width: 220px;
    height: 32px;
    line-height: 30px;
    padding: 0 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e1f3d8;
    background: linear-gradient(135deg, #f0f9eb, #e1f3d8);
    box-shadow: 0 2px 4px rgba(103, 194, 58, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    &:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(103, 194, 58, 0.15);
      border-color: #b3e19d;
    }
    .service-icon {
      margin-right: 4px;
      font-size: 12px;
    }
    ::v-deep .el-icon-close {
      margin-left: 6px;
      font-size: 12px;
      color: #67c23a;
      background-color: #f0f9eb;
      border-radius: 50%;
      width: 16px;
      height: 16px;
      line-height: 16px;
      &:hover {
        background-color: #67c23a;
        color: white;
      }
    }
  }
}
.service-add-btn {
  display: inline-block;
  .add-service-btn {
    height: 32px;
    padding: 0 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(135deg, #67c23a, #85ce61);
    border: none;
    box-shadow: 0 2px 4px rgba(103, 194, 58, 0.2);
    transition: all 0.3s ease;
    &:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(103, 194, 58, 0.3);
      background: linear-gradient(135deg, #5daf34, #7ac252);
    }
    &:active {
      transform: translateY(0);
      box-shadow: 0 2px 4px rgba(103, 194, 58, 0.2);
    }
    i {
      margin-right: 4px;
      font-size: 12px;
    }
  }
}
// å“åº”式设计
@media (max-width: 768px) {
  .service-tag-container .service-tag {
    max-width: 180px;
    font-size: 13px;
    padding: 0 10px;
  }
  .service-add-btn .add-service-btn {
    padding: 0 12px;
    font-size: 13px;
  }
}
// æ·»åŠ åŠ¨ç”»æ•ˆæžœ
@keyframes tagFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.service-tag {
  animation: tagFadeIn 0.3s ease-out;
}
// ä¸ºæ•´ä¸ªé€‰é¡¹åŒºåŸŸæ·»åŠ ç»Ÿä¸€æ ·å¼
.topicxq {
  .service-tag-container,
  .service-add-btn {
    margin: 8px 0;
  }
}
// ç¡®ä¿åœ¨è¡¨å•中的正确布局
.el-form-item {
  .el-form-item__content {
    .service-tag-container,
    .service-add-btn {
      vertical-align: middle;
    }
  }
}
.custom-width {
  width: 100px; /* è®¾ç½®å®½åº¦æ ·å¼ */
}
src/views/knowledge/questionnaire/index.vue
@@ -28,7 +28,7 @@
          @node-click="handleNodeClick"
        >
          <span class="custom-tree-node" slot-scope="{ node, data }">
            <span>{{ node.label }}</span>
            <span class="tree-node-label">{{ node.label }}</span>
            <span v-if="data.id > 0">
              <el-button
                type="text"
@@ -141,7 +141,6 @@
                  icon="el-icon-plus"
                  size="medium"
                  @click="handleAdd"
                  >新增</el-button
                >
              </el-col>
@@ -817,9 +816,9 @@
      this.dialogFormVisible = true;
    },
    Newcategory(){
      this.classifyform= {}, //类别表单
      this.radio = "主分类";
     this.dialogFormVisible = true
      (this.classifyform = {}), //类别表单
        (this.radio = "主分类");
      this.dialogFormVisible = true;
     this.zifon = true;
      this.zufon = true;
    },
@@ -896,7 +895,7 @@
  display: flex;
}
.sidecolumn {
  width: 400px;
  width: 380px;
  min-height: 100vh;
  text-align: center;
  //   display: flex;
@@ -920,6 +919,22 @@
      cursor: pointer;
    }
  }
  /* æ ¸å¿ƒï¼šè®¾ç½®å›ºå®šå®½åº¦ï¼Œè¶…出部分显示省略号 */
  .tree-node-label {
    display: inline-block; /* éœ€è¦è®¾ç½®ä¸ºè¡Œå†…块级元素才能设置宽度 */
    max-width: 160px; /* æœ€å¤§å®½åº¦ */
    overflow: hidden;
    white-space: nowrap; /* ä¸æ¢è¡Œ */
    text-overflow: ellipsis; /* æ˜¾ç¤ºçœç•¥å· */
    vertical-align: bottom; /* å¯é€‰çš„,用于对齐 */
  }
  /* å¯é€‰ï¼šé¼ æ ‡æ‚¬åœæ—¶å–消限制,显示全文(可能会撑开布局) */
  .custom-tree-node:hover .tree-node-label {
    max-width: none;
    white-space: normal;
    overflow: visible;
  }
  .center-ss {
    margin-top: 30px;
    .input-with-select {
src/views/outsideChainwtnew.vue
@@ -382,6 +382,7 @@
        param1: this.taskid,
        param2: this.patid,
        excep: this.excep,
        isabnormal: this.excep,
        serviceSubtaskDetailList: [],
      };
      const arr = structuredClone(this.questionList);
@@ -413,16 +414,26 @@
      const arr = structuredClone(this.questionList);
      console.log(arr, "srr");
      arr.forEach((item, index) => {
        if (item.scriptType == 1 && item.scriptResult) {
        var obj = item.svyTaskTemplateTargetoptions.find(
          (items) => items.optioncontent == item.scriptResult
        );
        console.log(obj, "obj");
          console.log(item);
          console.log(obj, "obj");
          if (obj.sendTaskid) {
            item.sendTaskname = obj.sendTaskname;
            item.sendTaskid = obj.sendTaskid;
            console.log(String(obj.sendTaskid).split(","));
            item.sendTaskids = String(obj.sendTaskid).split(",");
          }
        if (obj) {
          if (obj.isabnormal) {
            console.log(obj.isabnormal);
            form.excep = 1;
            this.excep = 1;
              form.excep = obj.isabnormal;
              this.excep = obj.isabnormal;
            }
          }
        }
      });
src/views/outsideChainxjnew.vue
@@ -10,12 +10,18 @@
    <div class="CONTENT" >
      <div class="preview-left">
        <div class="toptitle">
          <div class="title">{{ taskname ? taskname : ""+localStorage.getItem("orgname")+"医护知识宣教" }}</div>
          <div class="title">
            {{
              taskname
                ? taskname
                : "医护知识宣教"
            }}
          </div>
          <div style="font-size: 22px; margin-bottom: 20px; line-height: 1.5">
            {{
              kcb
                ? kcb
                : "亲爱的患者-家属,我们是"+localStorage.getItem("orgname")+"的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,观看这份宣教资讯。"
                : "亲爱的患者-家属,我们是医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,观看这份宣教资讯。"
            }}
            <!-- äº²çˆ±çš„æ‚£è€…/家属您好,为了更好的了解您出院后的康复情况,给您适当及时的健康指导,请您抽一点宝贵时间,完成这份出院随访问卷调查。 -->
          </div>
@@ -36,7 +42,8 @@
            jsy
              ? jsy
              : "生活上要劳逸结合,注意休息和营养,适当锻炼,戒烟限酒,保持心情舒畅,定期复诊。那本次宣教内容就到这里,祝您身体健康!"
          }}        </div>
          }}
        </div>
        <!-- <div style="font-size: 20px">
          {{
            jsy
@@ -53,7 +60,7 @@
import {
  getExternalfollowup,
  Submitaquestionnaire,
  geturlinfo
  geturlinfo,
} from "@/api/AiCentre/index";
import { getToken } from "@/utils/auth";
import axios from "axios";
@@ -76,15 +83,15 @@
        question3: "",
      },
      richText: "<p>Hello, <strong>world</strong>!</p>",
      url:'',
      taskname:'',
      kcb:'',
      jsy:'',
      url: "",
      taskname: "",
      kcb: "",
      jsy: "",
    };
  },
  created() {
    this.getQuestionnaire();
    this.geturlinfo();
  },
  methods: {
    // è§£æžurlid
@@ -96,25 +103,30 @@
      geturlinfo( url ).then((res) => {
       if (res.code==200) {
         this.getQuestionnaire(res.data.param1,res.data.param2,res.data.param3,res.data.param5,)
          this.getQuestionnaire(
            res.data.param1,
            res.data.param2,
            res.data.param3,
            res.data.param5
          );
       }
      });
    },
    extractLastSegmentFromUrl(url) {
    // æ‰¾åˆ°æœ€åŽä¸€ä¸ª'/'的位置
    const lastSlashIndex = url.lastIndexOf('/');
    // å¦‚果找到了'/',截取其后的所有字符
    if (lastSlashIndex !== -1) {
        return url.substring(lastSlashIndex + 1);
    }
    // å¦‚果没有找到'/',返回空字符串
    return '';
},
    //     extractLastSegmentFromUrl(url) {
    //     // æ‰¾åˆ°æœ€åŽä¸€ä¸ª'/'的位置
    //     const lastSlashIndex = url.lastIndexOf('/');
    //     // å¦‚果找到了'/',截取其后的所有字符
    //     if (lastSlashIndex !== -1) {
    //         return url.substring(lastSlashIndex + 1);
    //     }
    //     // å¦‚果没有找到'/',返回空字符串
    //     return '';
    // },
    // èŽ·å–æ•°æ®
    getQuestionnaire(param1,param2,param3) {
      this.taskid = param1;
      this.patid = param2;
      this.taskname = param3;
      this.taskid = decodeURIComponent(param1);
      this.patid = decodeURIComponent(param2);
      this.taskname = decodeURIComponent(param3);
      // // let taskid =
      // //   "OFp7tn/B6x7IzKJetvGWHdSWBj7msRlnlj6am9dyuHTH6sEt4uBbVCUXs5kcF/e4O2W6vqHf2Bz9K3/evbYDmw==";
      // // let patid =
@@ -126,7 +138,8 @@
      // // this.$modal.msgSuccess("任务id为" + this.taskid);
      // let taskids = this.encrypt(this.taskid);
      // let patids = this.encrypt(this.patid);
      getExternalfollowup({ param1: this.taskid, param2: this.patid }).then((res) => {
      getExternalfollowup({ param1: this.taskid, param2: this.patid }).then(
        (res) => {
        if (res.code == 200) {
          this.url = res.data.script[0].richText;
          this.jsy = res.data.jsy;
@@ -143,8 +156,8 @@
          console.error("Failed to fetch file:", error);
        });
        }
      });
        }
      );
    },
    addStyleToImages(html) {
      return html.replace(
@@ -201,7 +214,6 @@
</script>
<style lang="scss" scoped>
.questionnaire {
  background-image: url("../assets/images/chainbackground1.jpg");
  background-color: #f9f9fb;
src/views/patient/patient/AwaitingAdmission.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1274 @@
<template>
  <div class="app-container">
    <el-row :gutter="20">
      <!--用户数据-->
      <el-col :span="24" :xs="24">
        <el-form
          :model="queryParams"
          ref="queryForm"
          size="small"
          :inline="true"
          v-show="showSearch"
          label-width="98px"
        >
          <el-form-item label="姓名" width="100" prop="name">
            <el-input
              v-model="queryParams.patname"
              placeholder="请输入姓名"
              clearable
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="诊断" width="100" prop="name">
            <el-input
              v-model="queryParams.diagname"
              placeholder="请输入诊断"
              clearable
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="科室" width="100" prop="name">
            <el-input
              v-model="queryParams.deptname"
              placeholder="请输入科室名称"
              clearable
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="医生" width="100" prop="name">
            <el-input
              v-model="queryParams.drname"
              placeholder="请输入医生姓名"
              clearable
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="病案号" prop="outhospno">
            <el-input
              v-model="queryParams.outhospno"
              placeholder="请输入病案号"
              clearable
              style="width: 250px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="患者范围" prop="status">
            <el-cascader
              v-model="queryParams.scopetype"
              placeholder="默认全部"
              :options="sourcetype"
              :props="{ expandTrigger: 'hover' }"
              @change="handleChange"
            ></el-cascader>
          </el-form-item>
          <el-form-item label="就诊日期">
            <el-date-picker
              v-model="dateRange"
              style="width: 240px"
              value-format="yyyy-MM-dd"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
            ></el-date-picker>
            <!-- <el-date-picker
                v-model="dateRange"
                type="datetimerange"
                value-format="yyyy-MM-dd HH:mm:ss"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                :default-time="['12:00:00']"
              >
              </el-date-picker> -->
          </el-form-item>
          <el-row>
            <!-- <el-form-item label=" å°±è¯Šæ—¥æœŸ " prop="admitdate">
              <el-date-picker
                clearable
                v-model="queryParams.admitdate"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="请选择 å°±è¯Šæ—¥æœŸ "
              >
              </el-date-picker>
            </el-form-item> -->
            <el-form-item>
              <el-button
                type="primary"
                icon="el-icon-search"
                size="medium"
                @click="handleQuery"
                >搜索</el-button
              >
              <el-button
                icon="el-icon-refresh"
                size="medium"
                @click="resetQuery"
                >重置</el-button
              >
            </el-form-item>
          </el-row>
        </el-form>
        <el-row :gutter="10" class="mb8">
          <!-- <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-plus"
              size="medium"
              @click="handleAdd"
              v-hasPermi="['system:user:add']"
              >新增</el-button
            >
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="success"
              plain
              icon="el-icon-edit"
              size="medium"
              :disabled="single"
              @click="handleUpdate"
              v-hasPermi="['system:user:edit']"
              >修改</el-button
            >
          </el-col> -->
          <el-col :span="1.5">
            <el-button
              type="danger"
              plain
              icon="el-icon-delete"
              size="medium"
              :disabled="multiple"
              @click="handleDelete"
              v-hasPermi="['system:user:remove']"
              >删除</el-button
            >
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="warning"
              plain
              icon="el-icon-plus"
              size="medium"
              :disabled="multiple"
              @click="handleBatchAddTask"
            >
              æ‰¹é‡å‘送入院通知</el-button
            >
          </el-col>
          <el-col :span="19">
            <div class="documentf">
              <div class="document">
                <el-button
                  type="info"
                  plain
                  icon="el-icon-upload2"
                  size="medium"
                  @click="handleImport"
                  v-hasPermi="['system:user:import']"
                  >导入</el-button
                >
              </div>
              <div class="document">
                <el-button
                  type="warning"
                  plain
                  icon="el-icon-download"
                  size="medium"
                  @click="handleExport"
                  v-hasPermi="['system:user:export']"
                  >导出</el-button
                >
              </div>
            </div>
          </el-col>
          <!-- <el-col :span="1.5"> </el-col> -->
        </el-row>
        <el-table
          v-loading="loading"
          :data="userList"
          @selection-change="handleSelectionChange"
        >
          <el-table-column type="selection" width="50" align="center" />
          <!-- <el-table-column
            label="序号"
            fixed
            align="center"
            key="id"
            prop="id"
          /> -->
          <el-table-column
            label="就诊时间"
            align="center"
            key="admitdate"
            prop="admitdate"
            width="160"
          >
            <template slot-scope="scope">
              <span>{{ formatTime(scope.row.admitdate) }}</span>
            </template>
          </el-table-column>
          <!-- <el-table-column
            label="病案号"
            align="center"
            key="patno"
            prop="patno"
          /> -->
          <el-table-column
            label="病案号"
            align="center"
            key="outhospno"
            prop="outhospno"
          />
          <el-table-column
            label="姓名"
            width="100"
            align="center"
            key="patname"
            prop="patname"
          >
            <template slot-scope="scope">
              <el-button
                size="medium"
                type="text"
                @click="
                  gettoken360(
                    scope.row.idcardno,
                    scope.row.drcode,
                    scope.row.drname
                  )
                "
                ><span class="button-textsc">{{
                  scope.row.patname
                }}</span></el-button
              >
            </template>
          </el-table-column>
          <el-table-column
            label="性别"
            width="100"
            align="center"
            key="sex"
            prop="sex"
          >
            <template slot-scope="scope">
              <span>{{ scope.row.sex == 1 ? "男" : "女" }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="年龄"
            align="center"
            key="age"
            prop="age"
            width="120"
          />
          <el-table-column
            label="联系电话"
            align="center"
            key="telcode"
            prop="telcode"
            width="120"
          />
          <!-- <el-table-column
            label="患者标签(缺)"
            align="center"
            key="tagList"
            prop="tagList"
            width="160"
            :show-overflow-tooltip="true"
          >
            <template slot-scope="scope">
              <span v-for="item in scope.row.tagList">{{ item }} </span>
            </template>
          </el-table-column> -->
          <el-table-column
            label="诊断"
            align="center"
            key="diagname"
            prop="diagname"
            width="190"
          />
          <!-- <el-table-column
            label="主述"
            align="center"
            key="mainsuit"
            prop="mainsuit"
            width="120"
          /> -->
          <el-table-column
            label="就诊科室"
            align="center"
            key="deptname"
            prop="deptname"
            width="120"
          />
          <el-table-column
            label="接诊医生"
            align="center"
            key="drname"
            prop="drname"
            width="120"
          />
          <el-table-column
            label="是否存在任务"
            align="center"
            key="serverState"
            prop="serverState"
            width="100"
          >
            <template slot-scope="scope">
              <span
                :style="{
                  color: scope.row.serverState == 1 ? 'green' : 'gray',
                }"
              >
                {{ scope.row.serverState == 1 ? "是" : "无" }}
              </span>
            </template>
          </el-table-column>
          <el-table-column
            label="操作"
            fixed="right"
            align="center"
            width="160"
            class-name="small-padding fixed-width"
          >
            <template slot-scope="scope">
              <el-button
                size="medium"
                type="text"
                @click="
                  $router.push({
                    path: '/patient/patient/profile/',
                    query: { id: scope.row.patid },
                  })
                "
                v-hasPermi="['system:user:edit']"
                ><span class="button-textsc"
                  ><i class="el-icon-zoom-in"></i>查看</span
                ></el-button
              >
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getList"
        />
      </el-col>
    </el-row>
    <el-dialog
      title="批量添加任务"
      :visible.sync="batchTaskVisible"
      width="90%"
      append-to-body
    >
      <el-row :gutter="20">
        <!-- å·¦ä¾§ï¼šé€‰ä¸­æ‚£è€…列表 -->
        <el-col :span="12">
          <div class="batch-patient-section">
            <h4>选中患者({{ selectedPatients.length }}人)</h4>
            <el-table
              :data="selectedPatients"
              border
              style="width: 100%"
              size="small"
            >
              <el-table-column prop="patname" label="姓名" width="100" />
              <el-table-column prop="sex" label="性别" width="80">
                <template slot-scope="scope">
                  {{ scope.row.sex === 1 ? "男" : "女" }}
                </template>
              </el-table-column>
              <el-table-column
                label="就诊时间"
                align="center"
                key="admitdate"
                prop="admitdate"
              >
                <template slot-scope="scope">
                  <span>{{ formatTime(scope.row.admitdate) }}</span>
                </template>
              </el-table-column>
              <el-table-column prop="outhospno" label="病案号" />
              <el-table-column prop="deptname" label="科室" />
            </el-table>
          </div>
        </el-col>
        <!-- å³ä¾§ï¼šä»»åŠ¡åˆ—è¡¨ -->
        <el-col :span="12">
          <div class="batch-task-section">
            <h4>任务列表(请选择1个任务)</h4>
            <el-table
              :data="taskList"
              border
              style="width: 100%"
              size="small"
              @current-change="handleTaskSelectionChange"
              highlight-current-row
            >
              <el-table-column
                label="任务名称"
                fixed
                align="center"
                key="taskName"
                prop="taskName"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="服务项目"
                align="center"
                key="templatename"
                prop="templatename"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="创建人"
                align="center"
                key="createBy"
                prop="createBy"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="创建时间"
                sortable
                align="center"
                prop="createTime"
              >
                <template slot-scope="scope">
                  <span>{{ formatTime(scope.row.createTime) }}</span>
                </template>
              </el-table-column>
              <template #empty>
                <div class="empty-message">
                  <i class="el-icon-warning"></i>
                  <span>患者科室无匹配服务</span>
                </div>
              </template>
            </el-table>
          </div>
        </el-col>
      </el-row>
      <!-- åº•部按钮 -->
      <div slot="footer" class="dialog-footer">
        <el-button @click="batchTaskVisible = false">取 æ¶ˆ</el-button>
        <el-button
          type="primary"
          :loading="batchLoading"
          @click="submitBatchTask"
          >创建任务</el-button
        >
      </div>
    </el-dialog>
    <!-- ç”¨æˆ·å¯¼å…¥å¯¹è¯æ¡† -->
    <el-dialog
      :title="upload.title"
      :visible.sync="upload.open"
      width="70%"
      append-to-body
    >
      <el-steps :active="dractive" simple>
        <el-step title="上传导入文件" icon="el-icon-upload"></el-step>
        <el-step title="导入检查" icon="el-icon-picture"></el-step>
        <el-step title="导入结果" icon="el-icon-picture"></el-step>
      </el-steps>
      <!-- ä¸Šä¼ å¯¼å…¥æ–‡ä»¶ -->
      <div class="download" v-if="dractive == 1">
        <el-upload
          class="upload-demo"
          ref="upload"
          :limit="1"
          accept=".xlsx, .xls"
          :headers="upload.headers"
          :action="upload.url + '?updateSupport=' + upload.updateSupport"
          :disabled="upload.isUploading"
          :on-progress="handleFileUploadProgress"
          :on-success="handleFileSuccess"
          :auto-upload="false"
          drag
        >
          <i class="el-icon-upload"></i>
          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
          <div class="el-upload__tip text-center" slot="tip">
            <div class="el-upload__tip" slot="tip">
              <el-checkbox v-model="upload.updateSupport" />
              æ˜¯å¦æ›´æ–°å·²ç»å­˜åœ¨çš„用户数据
            </div>
            <span>仅允许导入xls、xlsx格式文件。</span>
            <el-link
              type="primary"
              :underline="false"
              style="font-size: 24px; vertical-align: baseline"
              @click="importTemplate"
              >下载模板</el-link
            >
          </div>
        </el-upload>
      </div>
      <!-- å¯¼å…¥æ£€æŸ¥ -->
      <div class="uploading" v-else-if="dractive == 2">
        <el-table :data="uploadingData" style="width: 100%">
          <el-table-column prop="serial" label="序号"> </el-table-column>
          <el-table-column prop="name" label="姓名" width="100">
          </el-table-column>
          <el-table-column prop="sex" label="性别" width="100">
          </el-table-column>
          <el-table-column prop="certificate" label="证件类型">
          </el-table-column>
          <el-table-column prop="certificatenum" label="证件号码">
          </el-table-column>
          <el-table-column prop="goday" label="出生日期"> </el-table-column>
          <el-table-column prop="menum" label="本人联系方式"> </el-table-column>
          <el-table-column prop="younum" label="亲属联系方式">
          </el-table-column>
          <el-table-column prop="tag" label="患者标签"> </el-table-column>
          <el-table-column prop="erry" label="错误原因"> </el-table-column>
        </el-table>
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="geterryList"
        />
      </div>
      <!-- å®Œæˆ -->
      <div class="drexamine" v-else-if="dractive == 3">
        <img
          src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
        />
        <p>导入患者成功!</p>
        <p>本次共计导入{{ ImportQuantity }}位患者</p>
      </div>
      <div slot="footer" class="dialog-footer" v-if="dractive == 3">
        <!-- <el-button type="primary" @click="submitFileForm">下一步</el-button> -->
        <el-button @click="submitclose">完成</el-button>
      </div>
      <div slot="footer" v-else>
        <el-button type="primary" @click="submitFileForm">下一步</el-button>
        <el-button @click="submitclose">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { delUser } from "@/api/system/user";
import {
  listPatouthosp,
  getPatouthosp,
  addPatouthosp,
  updatePatouthosp,
  delPatouthosp,
} from "@/api/smartor/patouthosp";
import { particularpatient } from "@/api/patient/homepage";
import { listtag } from "@/api/system/label";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { query360PatInfo, getTasklist, addSubtask } from "@/api/AiCentre/index";
import store from "@/store";
import { type } from "jquery";
export default {
  name: "Userhuanze",
  dicts: ["sys_normal_disable", "sys_user_sex"],
  components: { Treeselect },
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•个禁用
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // ç”¨æˆ·è¡¨æ ¼æ•°æ®
      userList: null,
      // å¼¹å‡ºå±‚标题
      title: "",
      // éƒ¨é—¨æ ‘选项
      deptOptions: undefined,
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // éƒ¨é—¨åç§°
      deptName: undefined,
      // é»˜è®¤å¯†ç 
      initPassword: undefined,
      amendtag: false, //是否修改
      // æ—¥æœŸèŒƒå›´
      dateRange: [],
      paperstypes: [
        { papersname: "身份证" },
        { papersname: "护照" },
        { papersname: "中国港澳居民身份证" },
        { papersname: "中国台湾居民身份证" },
      ],
      // è¡¨å•参数
      form: {
        name: "",
        age: "",
        sex: "",
        tagList: [],
        idcardno: "",
        telcode: "",
        idcardtype: "",
        relativetelcode: "",
      },
      //导入进度
      dractive: 1,
      // å¯¼å…¥å±•示表单
      uploadingData: {},
      total: 0, // æ€»æ¡æ•°
      ImportQuantity: 999, //导入患者数量
      Labelchange: false, //修改新增弹窗
      propss: { multiple: true },
      optionstag: [], //标签列表
      batchTaskVisible: false, // å¼¹çª—可见性
      selectedPatients: [], // é€‰ä¸­çš„æ‚£è€…列表
      taskList: [], // ä»»åŠ¡åˆ—è¡¨
      selectedTask: null, // é€‰ä¸­çš„任务列表
      batchLoading: false, // æ‰¹é‡æäº¤åŠ è½½çŠ¶æ€
      deptcode: "",
      Patientrange: [
        {
          name: "全部",
          id: 999,
        },
        {
          name: "当前科室",
          id: 1,
        },
      ],
      postData: {
        XiaoXiTou: {
          FaSongFCSJC: "ZJHES",
          FaSongJGID: localStorage.getItem("orgid"),
          FaSongJGMC: localStorage.getItem("orgname"),
          FaSongSJ: "2025-01-09 17:29:36",
          FaSongXTJC: "SUIFANGXT",
          FaSongXTMC: "随访系统",
          XiaoXiID: "5FA92AFB-9833-4608-87C7-F56A654AC171",
          XiaoXiLX: "SC_LC_360STCX",
          XiaoXiMC: "360 视图查询",
          ZuHuID: localStorage.getItem("ZuHuID"),
          ZuHuMC: localStorage.getItem("orgname"),
        },
        YeWuXX: {
          BingRenXX: {
            ZhengJianHM: "",
            ZhengJianLXDM: "01",
            ZhengJianLXMC: "居民身份证",
            ZuZhiJGID: localStorage.getItem("orgid"),
            ZuZhiJGMC: localStorage.getItem("orgname"),
          },
          YongHuXX: {
            XiTongID: "SUIFANGXT",
            XiTongMC: "随访系统",
            YongHuID: localStorage.getItem("YongHuID"),
            YongHuXM: localStorage.getItem("YongHuXM"),
            ZuZhiJGID: localStorage.getItem("orgid"),
            ZuZhiJGMC: localStorage.getItem("orgname"),
            idp: "lyra",
          },
        },
      },
      defaultProps: {
        children: "children",
        label: "label",
      },
      sourcetype: [
        {
          value: 1,
          label: "科室",
          children: [],
        },
        {
          value: 2,
          label: "病区",
          children: [],
        },
        {
          value: 3,
          label: "全部",
        },
      ],
      // ç”¨æˆ·å¯¼å…¥å‚æ•°
      upload: {
        // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚(用户导入)
        open: false,
        // å¼¹å‡ºå±‚标题(用户导入)
        title: "",
        // æ˜¯å¦ç¦ç”¨ä¸Šä¼ 
        isUploading: false,
        // æ˜¯å¦æ›´æ–°å·²ç»å­˜åœ¨çš„用户数据
        updateSupport: 0,
        // è®¾ç½®ä¸Šä¼ çš„请求头部
        headers: { Authorization: "Bearer " + getToken() },
        // ä¸Šä¼ çš„地址
        url: process.env.VUE_APP_BASE_API + "/system/user/importData",
      },
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        searchscope: 3,
        scopetype: [],
        deptcodes: [],
      },
      // è¡¨å•校验
      rules: {
        // userName: [
        //   { required: true, message: "用户名称不能为空", trigger: "blur" },
        //   {
        //     min: 2,
        //     max: 20,
        //     message: "用户名称长度必须介于 2 å’Œ 20 ä¹‹é—´",
        //     trigger: "blur",
        //   },
        // ],
        // nickName: [
        //   { required: true, message: "用户昵称不能为空", trigger: "blur" },
        // ],
        // password: [
        //   { required: true, message: "用户密码不能为空", trigger: "blur" },
        //   {
        //     min: 5,
        //     max: 20,
        //     message: "用户密码长度必须介于 5 å’Œ 20 ä¹‹é—´",
        //     trigger: "blur",
        //   },
        // ],
        // email: [
        //   {
        //     type: "email",
        //     message: "请输入正确的邮箱地址",
        //     trigger: ["blur", "change"],
        //   },
        // ],
        // phonenumber: [
        //   {
        //     pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
        //     message: "请输入正确的手机号码",
        //     trigger: "blur",
        //   },
        // ],
        // IDnumber: [
        //   {
        //     pattern:
        //       /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/,
        //     message: "请输入正确的身份证号码",
        //     trigger: "blur",
        //   },
        // ],
      },
    };
  },
  watch: {
    // æ ¹æ®åç§°ç­›é€‰éƒ¨é—¨æ ‘
    deptName(val) {
      this.$refs.tree.filter(val);
    },
  },
  created() {
    this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
      return {
        label: dept.deptName,
        value: dept.deptCode,
      };
    });
    this.sourcetype[1].children = store.getters.belongWards.map((dept) => {
      return {
        label: dept.districtName,
        value: dept.districtCode,
      };
    });
    this.getList();
    this.gettabList();
  },
  methods: {
    /** æŸ¥è¯¢æ‚£è€…列表 */
    getList() {
      this.loading = true;
      if (this.queryParams.searchscope == 3) {
        this.queryParams.deptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        // this.queryParams.leavehospitaldistrictcodes =
        //   store.getters.belongWards.map((obj) => obj.districtCode);
      }
      if (this.dateRange) {
        this.queryParams.beginTime = this.dateRange[0];
        this.queryParams.endTime = this.dateRange[1];
      } else {
        this.queryParams.beginTime = "";
        this.queryParams.endTime = "";
      }
      listPatouthosp(this.queryParams).then((response) => {
        this.userList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    /** æŸ¥è¯¢æ ‡ç­¾åˆ—表 */
    gettabList() {
      const tagqueryParams = {
        pageNum: 1,
        pageSize: 1000,
        tagname: undefined,
        tagdescription: undefined,
        tagcategoryid: "0",
      };
      listtag(tagqueryParams).then((response) => {
        console.log(response);
        this.optionstag = response.rows;
      });
    },
    // æ‚£è€…范围处理
    handleChange(value) {
      let type = value[0];
      let code = value.slice(-1)[0];
      // this.queryParams.leavehospitaldistrictcodes = [];
      this.queryParams.deptcodes = [];
      if (type == 1) {
        this.queryParams.deptcodes.push(code);
        // this.queryParams.leavehospitaldistrictcodes = [];
        this.queryParams.searchscope = 1;
      } else if (type == 2) {
        // this.queryParams.leavehospitaldistrictcodes.push(code);
        this.queryParams.deptcodes = [];
        this.queryParams.searchscope = 2;
      } else {
        this.queryParams.searchscope = 3;
      }
    },
    // æŸ¥è¯¢å¯¼å…¥å±•示列表
    geterryList() {
      this.loading = true;
      listJob(this.queryParams).then((response) => {
        this.jobList = 1;
        this.total = 1;
        this.loading = false;
      });
    },
    //患者360跳转
    gettoken360(sfzh, drcode, drname) {
      // this.$modal.msgWarning('360功能暂未开通');
      this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
      query360PatInfo(this.postData).then((res) => {
        if (res.data.url) {
          window.open(res.data.url, "_blank");
          // this.linkUrl = res.data.url;
        } else {
          this.$modal.msgWarning("360查询无结果");
        }
      });
    },
    // ç­›é€‰èŠ‚ç‚¹
    filterNode(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
    },
    // èŠ‚ç‚¹å•å‡»äº‹ä»¶
    handleNodeClick(data) {
      this.queryParams.deptId = data.id;
      this.handleQuery();
    },
    // å–消按钮
    cancel() {
      this.Labelchange = false;
      this.reset();
    },
    // è¡¨å•重置
    reset() {
      this.form = {
        name: "",
        age: "",
        sex: "",
        tagList: [],
        idcardno: "",
        telcode: "",
        idcardtype: "",
        relativetelcode: "",
      };
      // this.resetForm("form");
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.queryParams = {
        pageNum: 1,
        pageSize: 10,
        searchscope: 3,
        scopetype: [],
        deptcodes: [],
        // leavehospitaldistrictcodes: [],
      };
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.patid);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    handleAdd() {
      this.reset();
      this.Labelchange = true;
      this.amendtag = false;
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      console.log(row);
      const userIds = row.patid || this.ids;
      particularpatient(userIds).then((response) => {
        console.log(response);
        this.form = response.data;
      });
      this.amendtag = true;
      this.Labelchange = true;
    },
    //修改/新增患者
    submitForm() {
      if (this.amendtag) {
        console.log(22);
        this.form.isoperation = 2;
      } else {
        this.form.isoperation = 1;
      }
      alterpatient(this.form)
        .then((response) => {
          console.log(response);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("保存成功");
        });
      this.reset();
      // this.idds = "";
      this.Labelchange = false;
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const userIds = row.userId || this.ids;
      this.$modal
        .confirm('是否确认删除用户编号为"' + userIds + '"的数据项?')
        .then(function () {
          return deletepatient(userIds);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download(
        "smartor/patarchive/export",
        {
          ...this.queryParams,
        },
        `user_${new Date().getTime()}.xlsx`
      );
    },
    /** å¯¼å…¥æŒ‰é’®æ“ä½œ */
    handleImport() {
      this.upload.title = "用户导入";
      this.upload.open = true;
    },
    /** ä¸‹è½½æ¨¡æ¿æ“ä½œ */
    importTemplate() {
      this.download(
        "smartor/import/getImportPatTemplate",
        {},
        `user_template_${new Date().getTime()}.xlsx`
      );
    },
    // æ–‡ä»¶ä¸Šä¼ ä¸­å¤„理
    handleFileUploadProgress(event, file, fileList) {
      this.upload.isUploading = true;
    },
    // æ–‡ä»¶ä¸Šä¼ æˆåŠŸå¤„ç†
    handleFileSuccess(response, file, fileList) {
      this.upload.open = false;
      this.upload.isUploading = false;
      this.$refs.upload.clearFiles();
      this.$alert(
        "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
          response.msg +
          "</div>",
        "导入结果",
        { dangerouslyUseHTMLString: true }
      );
      this.getList();
    },
    // æäº¤ä¸Šä¼ æ–‡ä»¶
    submitFileForm() {
      // ä¸Šä¼ 
      if (this.dractive == 1) {
        this.$refs.upload.submit();
        this.dractive++;
      } else {
        this.dractive++;
      }
    },
    submitclose() {
      this.upload.open = false;
      this.dractive = 1;
    },
    /** æ‰¹é‡æ·»åŠ ä»»åŠ¡æŒ‰é’®ç‚¹å‡» */
    handleBatchAddTask() {
      // æ ¡éªŒæ˜¯å¦é€‰ä¸­æ‚£è€…
      if (this.ids.length === 0) {
        this.$modal.msgWarning("请至少选中1名患者");
        return;
      }
      // æ£€æŸ¥é€‰ä¸­çš„æ‚£è€…中是否有已有任务的
      const hasTaskPatients = this.userList.filter(
        (item) => this.ids.includes(item.patid) && item.serverState == 1
      );
      if (hasTaskPatients.length > 0) {
        const patientNames = hasTaskPatients.map((p) => p.patname).join("、");
        this.$modal.msgError(
          `选中的患者 ${patientNames} å·²æœ‰ä»»åŠ¡ï¼Œæ— æ³•é‡å¤æ·»åŠ `
        );
        return;
      }
      // èŽ·å–é€‰ä¸­æ‚£è€…çš„ç§‘å®¤ä¿¡æ¯ï¼ˆç”¨äºŽæ ¡éªŒåŒä¸€ç§‘å®¤ï¼‰
      const patientDepts = new Set();
      let deptcode = "";
      this.ids.forEach((patId) => {
        const patient = this.userList.find((item) => item.patid === patId);
        if (patient) {
          patientDepts.add(patient.deptname);
          deptcode = patient.deptcode;
        }
      });
      // æ ¡éªŒæ˜¯å¦åŒä¸€ç§‘室
      // if (patientDepts.size > 1) {
      //   this.$modal.msgError("选中的患者不属于同一科室,无法批量添加任务");
      //   return;
      // }
      // èŽ·å–é€‰ä¸­æ‚£è€…åˆ—è¡¨
      this.selectedPatients = this.userList.filter((item) =>
        this.ids.includes(item.patid)
      );
      // æ˜¾ç¤ºå¼¹çª—
      this.batchTaskVisible = true;
      // èŽ·å–ä»»åŠ¡åˆ—è¡¨
      this.loadTaskList(deptcode);
    },
    /** åŠ è½½ä»»åŠ¡åˆ—è¡¨ */
    loadTaskList(deptcode) {
      this.batchLoading = true;
      let topqueryParams = {
        pageNum: 1,
        pageSize: 10,
        serviceType: 3,
        type: 2,
      };
      //         deptcode: deptcode,取消科室限制
      getTasklist(topqueryParams).then((response) => {
        this.taskList = response.rows;
        this.batchLoading = false;
      });
    },
    /** å¤„理任务选择变化 */
    handleTaskSelectionChange(currentRow) {
      this.selectedTask = currentRow;
    },
    // é‡å†™æ‰¹é‡æäº¤æ–¹æ³•
    async submitBatchTask() {
      // æ ¡éªŒæ˜¯å¦é€‰ä¸­ä»»åŠ¡
      if (!this.selectedTask) {
        this.$modal.msgWarning("请选择1个任务");
        return;
      }
      this.batchLoading = true;
      const successPatients = [];
      const failedPatients = [];
      try {
        // éåŽ†é€‰ä¸­çš„æ‚£è€…ï¼Œé€ä¸ªè°ƒç”¨æŽ¥å£
        for (const patient of this.selectedPatients) {
          const params = {
            taskid: this.selectedTask.taskid,
            type: this.selectedTask.type,
            taskName: this.selectedTask.taskName,
            serviceType: this.selectedTask.serviceType,
            preachform: this.selectedTask.preachform,
            templateid: this.selectedTask.templateid,
            libtemplateid: this.selectedTask.libtemplateid,
            sendstate: 2,
            ...patient,
            sendname: patient.patname,
            endtime: patient.admitdate + " 00:00:00",
            leavediagname: patient.diagname,
            age: "",
          };
          try {
            await addSubtask(params);
            successPatients.push(patient.patname);
          } catch (error) {
            failedPatients.push(patient.patname);
          }
        }
        // æ˜¾ç¤ºå¤„理结果
        let message = `成功为 ${successPatients.length} åæ‚£è€…添加任务`;
        if (failedPatients.length > 0) {
          message += `,${failedPatients.length} åæ‚£è€…添加失败`;
        }
        this.$modal.msgSuccess(message);
        this.batchTaskVisible = false;
        this.getList(); // åˆ·æ–°æ‚£è€…列表
      } catch (error) {
        this.$modal.msgError("批量添加任务过程中出错");
      } finally {
        this.batchLoading = false;
      }
    },
    /** æ‰¹é‡æ·»åŠ æ‚£è€…ä»»åŠ¡æŽ¥å£ */
    batchAddPatientTask(params) {},
  },
};
</script>
<style lang="scss" scoped>
.el-button--primary.is-plain {
  color: #ffffff;
  background: #409eff;
  border-color: #4fabe9;
}
.document {
  width: 100px;
  height: 50px;
}
.documentf {
  display: flex;
  justify-content: flex-end;
}
.download {
  text-align: center;
  .el-upload__tip {
    font-size: 23px;
  }
  .el-upload__text {
    font-size: 23px;
  }
}
.uploading {
  margin-top: 20px;
  margin: 20px;
  padding: 30px;
  background: #ffffff;
  border: 1px solid #dcdfe6;
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
    0 0 6px 0 rgba(0, 0, 0, 0.04);
}
.drexamine {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: #daeaf5;
  img {
    width: 100px;
    height: 100px;
  }
}
.button-textsc {
  color: #3664d9;
}
.batch-patient-section,
.batch-task-section {
  padding: 15px;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  margin-bottom: 15px;
}
.el-table--enable-row-hover .el-table__body tr:hover > td {
  background-color: #f5f7fa;
}
.el-table__body tr.current-row > td {
  background-color: #e6f7ff;
}
/* ç¦ç”¨çŠ¶æ€ä¸‹æŒ‰é’®æ ·å¼ */
.el-button.is-disabled {
  cursor: not-allowed;
}
.batch-patient-section h4,
.batch-task-section h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #303133;
  font-size: 16px;
}
/* è¡¨æ ¼æ ·å¼ä¼˜åŒ– */
.el-table {
  margin-bottom: 10px;
}
/* å¼¹çª—底部按钮间距 */
.dialog-footer {
  text-align: right;
  padding: 10px 20px 20px;
}
</style>
src/views/patient/patient/outpatient.vue
@@ -1153,6 +1153,7 @@
            sendstate: 2,
            ...patient,
            sendname: patient.patname,
            endtime: patient.admitdate + " 00:00:00",
            leavediagname: patient.diagname,
            age: "",
          };
src/views/patient/propaganda/Missioncreation.vue
@@ -253,7 +253,7 @@
                      /> </el-form-item
                  ></el-col>
                </el-row>
                <el-form-item label="服务形式">
                <!-- <el-form-item label="服务形式">
                  <el-checkbox-group v-model="checkList">
                    <el-checkbox
                      v-for="(item, index) in checkboxlist"
@@ -263,6 +263,16 @@
                      {{ item.label }}</el-checkbox
                    >
                  </el-checkbox-group>
                </el-form-item> -->
                <el-form-item label="服务形式">
                  <SortCheckbox
                    v-model="checkList"
                    :options="checkboxlist"
                    :initialselectedOrder="selectedOrder"
                    value-key="value"
                    label-key="label"
                    @change="checkSelectionChange"
                  />
                </el-form-item>
              </el-form>
            </div>
@@ -520,7 +530,7 @@
            />
          </el-row>
          <pagination
            v-show="patienttotal > 0"
            v-show="patienttotal > 0 && this.patientqueryParams.allhosp != 6"
            :total="patienttotal"
            :page.sync="patientqueryParams.pageNum"
            :limit.sync="patientqueryParams.pageSize"
@@ -759,7 +769,7 @@
import store from "@/store";
import {
  getTaskpatient,
  getTaskpatientQC,
  getlibrarylist,
  getFollowuplist,
  getQtemplatelist,
@@ -773,6 +783,7 @@
import { listDept } from "@/api/system/dept";
import { getToken } from "@/utils/auth";
import SFtable from "@/components/SFtable"; //表格组件
import SortCheckbox from "@/components/SortCheckbox"; //表格组件
export default {
  name: "ServiceDetails",
@@ -796,6 +807,7 @@
      dialogVisiblepatient: false, //添加患者弹框
      radio: 1,
      checkboxlist: [],
      selectedOrder: [],
      // ç§‘室/病区
      belongWards: [],
      belongWards: [],
@@ -805,9 +817,10 @@
      htmlRichText: "<p>Hello, <strong>world</strong>!</p>",
      // æ‚£è€…表单
      tableLabelhz: [
        { label: "出院日期", width: "150", prop: "inhosptime" },
        { label: "出院日期", width: "150", prop: "endtime" },
        { label: "患者", width: "", prop: "name" },
        { label: "身份证", width: "200", prop: "sfzh" },
        { label: "身份证", width: "200", prop: "idcardno" },
        { label: "电话号码", width: "180", prop: "telcode" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "责任护士", width: "", prop: "nurseName" },
@@ -820,6 +833,7 @@
        { label: "出院日期", width: "150", prop: "endtime" },
        { label: "患者", width: "", prop: "name" },
        { label: "身份证", width: "200", prop: "sfzh" },
        { label: "电话号码", width: "180", prop: "telcode" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "责任护士", width: "", prop: "nurseName" },
@@ -966,11 +980,11 @@
      },
      taskoptions: [
        {
          value: "1",
          value: "4",
          label: "出院病人",
        },
        {
          value: "4",
          value: "1",
          label: "在院病人",
        },
        {
@@ -980,6 +994,14 @@
        {
          value: "3",
          label: "体检病人",
        },
        {
          value: "6",
          label: "院外患者",
        },
        {
          value: "5",
          label: "手术病人",
        },
      ],
      source: [
@@ -999,7 +1021,7 @@
      quote: false,
    };
  },
  components: { SFtable },
  components: { SFtable, SortCheckbox },
  created() {
    this.id = this.$route.query.id;
@@ -1134,6 +1156,15 @@
        this.$modal.msgError("未选择模板");
        return;
      }
      if (this.checkList) {
        this.form.preachform = this.checkList.join(",");
        this.form.preachformList = this.selectedOrder;
      } else {
        this.$modal.msgError("请选择服务类型");
        this.submitLoading = false;
        return;
      }
      const filteredArray = this.variableList.filter(
        (item) =>
          item.name !== "姓名" && item.name !== "电话" && item.name !== "地址"
@@ -1242,13 +1273,32 @@
      this.overallCase.forEach((item) => {
        this.allpids.push(item.patid);
      });
      if (this.patientqueryParams.allhosp == 1) {
      if (this.patientqueryParams.allhosp == 4) {
        this.tableLabelhz = [
          // { label: "入院日期", width: "170", prop: "starttime" },
          { label: "出院日期", width: "150", prop: "endtime" },
          { label: "患者", width: "", prop: "name" },
          { label: "身份证", width: "200", prop: "sfzh" },
          { label: "患者诊断", width: "", prop: "leavediagname" },
          { label: "身份证", width: "200", prop: "idcardno" },
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "电话", width: "180", prop: "telcode" },
          { label: "出院天数", width: "", prop: "endDay" },
          { label: "责任护士", width: "", prop: "nurseName" },
          { label: "医生", width: "", prop: "drname" },
          { label: "科室", width: "180", prop: "dept" },
          { label: "病区", width: "150", prop: "leavehospitaldistrictname" },
        ];
      } else if (this.patientqueryParams.allhosp == 1) {
        this.tableLabelhz = [
          { label: "入院日期", width: "150", prop: "starttime" },
          { label: "患者", width: "", prop: "name" },
          { label: "患者诊断", width: "", prop: "leavediagname" },
          { label: "身份证", width: "200", prop: "idcardno" },
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "电话", width: "180", prop: "telcode" },
          { label: "出院天数", width: "", prop: "endDay" },
          { label: "责任护士", width: "", prop: "nurseName" },
          { label: "医生", width: "", prop: "drname" },
          { label: "科室", width: "180", prop: "dept" },
@@ -1256,14 +1306,18 @@
        ];
      } else if (this.patientqueryParams.allhosp == 2) {
        this.tableLabelhz = [
          { label: "序号", width: "", prop: "patid" },
          { label: "患者名称", width: "", prop: "name" },
          { label: "就诊日期", width: "150", prop: "admitdate" },
          { label: "患者", width: "", prop: "name" },
          { label: "身份证", width: "200", prop: "idcardno" },
          { label: "电话号码", width: "180", prop: "telcode" },
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "诊断", width: "", prop: "diagname" },
          { label: "就诊科室", width: "", prop: "deptName" },
          { label: "入院日期", width: "", prop: "inhosptime" },
          { label: "创建人", width: "", prop: "createBy" },
          { label: "电话", width: "180", prop: "telcode" },
          { label: "出院天数", width: "", prop: "endDay" },
          { label: "责任护士", width: "", prop: "nurseName" },
          { label: "医生", width: "", prop: "drname" },
          { label: "科室", width: "180", prop: "dept" },
          { label: "病区", width: "150", prop: "leavehospitaldistrictname" },
        ];
      }
      if (this.allpids[0]) {
@@ -1271,33 +1325,26 @@
      } else {
        this.patientqueryParams.pids = null;
      }
      // ç±»åž‹åˆ¤æ–­
      if (this.patientqueryParams.allhosp == 1) {
        this.patientqueryParams.cry = 1;
      } else if (this.patientqueryParams.allhosp == 4) {
        this.patientqueryParams.cry = 0;
        this.patientqueryParams.allhosp = "1";
      }
      if (this.patientqueryParams.searchscope == 1) {
        this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
      if (this.patientqueryParams.allhosp == 4) {
        this.patientqueryParams.hospitaldistrictcodes = [];
        this.patientqueryParams.deptcodes = [];
      } else if (this.patientqueryParams.allhosp == 1) {
        this.patientqueryParams.deptcodes =
          this.patientqueryParams.leaveldeptcodes;
        this.patientqueryParams.hospitaldistrictcodes =
          this.patientqueryParams.leavehospitaldistrictcodes;
        this.patientqueryParams.leavehospitaldistrictcodes = [];
      } else if (this.patientqueryParams.searchscope == 2) {
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
        this.patientqueryParams.leaveldeptcodes = [];
      } else {
        this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      getTaskpatient(this.patientqueryParams).then((response) => {
      getTaskpatientQC(this.patientqueryParams).then((response) => {
        console.log(response);
        this.patientuserList = response.rows;
        this.patientuserList.forEach((item) => {
          if (item.endtime) {
            item.endDay = this.daysBetween(item.endtime);
          }
        });
        this.patienttotal = response.total;
        this.loading = false;
        this.Restorecheck();
@@ -1309,9 +1356,8 @@
    handleExport() {},
    // é€‰æ‹©æ‚£è€…表数据
    handleSelectionChange(selection, type) {
      console.log("多选患者");
      this.SelectPatientslist = selection;
    handleSelectionChange(selection) {
      this.SelectPatientslist = structuredClone(selection);
      this.multiple = !selection.length;
      // èµ‹å€¼ç»™æ•´ä½“选中数组
@@ -1320,13 +1366,22 @@
        if (!isExist) {
          item.isoperation = 1;
          item.patid = item.id;
          if (item.idcardno) {
            item.sfzh = item.idcardno;
          }
          if (type) {
            item.hospType = type;
          } else {
            item.hospType = this.patientqueryParams.allhosp;
          item.sfzh = item.idcardno;
          item.deptCode = item.deptcode;
          item.deptName = item.dept;
          item.admindate = item.inhosptime;
          item.diagname = item.leavediagname;
          item.sfzh = item.idcardno;
          if (this.patientqueryParams.allhosp == 6) {
            item.patfrom = 1;
          }
          if (this.patientqueryParams.allhosp == 1) {
            item.visittime = item.endtime;
          } else if (this.patientqueryParams.allhosp == 4) {
            item.visittime = item.starttime;
          } else if (this.patientqueryParams.allhosp == 2) {
            item.visittime = item.admitdate;
          }
          this.overallCase.push(item);
          this.form.patTaskRelevances.push(item);
@@ -1422,6 +1477,7 @@
              : [];
            this.overallCase = this.form.patTaskRelevances.concat();
            this.checkList = this.form.preachform.split(",");
            this.selectedOrder = this.form.preachformList;
            console.log(this.form.showDate, "this.form");
            if (this.form.daytime) this.daytime = this.form.showDate.split(",");
            console.log(this.newadd, "依照");
@@ -1448,6 +1504,11 @@
          }
        });
      }
    },
    checkSelectionChange(selectedValues, selectedOrder) {
      this.selectedOrder = selectedValues;
      console.log("当前选中:", selectedValues);
      console.log("选中顺序:", selectedOrder);
    },
    // ä¾ç…§æ–°å¢žæ—¶å¤„理
    neWaddfn() {
@@ -1581,6 +1642,7 @@
      TaskQuestioncomit(this.Tasktemplate).then((response) => {
        console.log(response);
        this.previewtf = false;
        this.drawermb =false;
        this.form.templateid = response.data;
        this.form.libtemplateid = this.libId;
        this.form.templatename = this.libName;
@@ -1839,7 +1901,7 @@
  }
}
.button-textsc {
  color: #3664D9;
  color: #3664d9;
}
.button-textxg {
  color: #de7897;
src/views/patient/propaganda/particty.vue
@@ -999,7 +999,6 @@
        { label: "电话号码", width: "180", prop: "telcode" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "电话", width: "180", prop: "telcode" },
        { label: "出院天数", width: "", prop: "endDay" },
        { label: "责任护士", width: "", prop: "nurseName" },
        { label: "主治医生", width: "", prop: "drname" },
src/views/sfstatistics/percentage/index.vue
@@ -126,6 +126,7 @@
                >
              </el-col>
            </el-form>
            <div class="your-table-container">
            <el-table
              v-loading="loading"
              :data="userList"
@@ -133,6 +134,8 @@
              @selection-change="handleSelectionChange"
              @expand-change="handleRowClick"
              :row-key="getRowKey"
                show-summary
                :summary-method="getSummaries"
              :expand-row-keys="expands"
            >
              <!-- å±•开行箭头列 -->
@@ -143,6 +146,8 @@
                    border
                    style="width: 95%; margin: 0 auto"
                    class="inner-table"
                      show-summary
                      :summary-method="getInnerSummaries"
                  >
                    <el-table-column
                      label="医生姓名"
@@ -436,7 +441,9 @@
                      type="text"
                      @click="Seedetails(scope.row)"
                      ><span class="button-zx"
                        >{{ (Number(scope.row.rate) * 100).toFixed(2) }}%</span
                          >{{
                            (Number(scope.row.rate) * 100).toFixed(2)
                          }}%</span
                      ></el-button
                    >
                  </template>
@@ -529,8 +536,11 @@
                >
                </el-table-column>
              </el-table-column>
              <el-table-column v-if="orgname=='丽水市中医院'" align="center" label="随访情况">
                <el-table-column
                  v-if="orgname == '丽水市中医院'"
                  align="center"
                  label="随访情况"
                >
                <el-table-column
                  label="正常语音"
                  align="center"
@@ -538,35 +548,40 @@
                  key="taskSituation1"
                  prop="taskSituation1"
                >
                </el-table-column><el-table-column
                  </el-table-column
                  ><el-table-column
                  label="患者拒接或拒访"
                  align="center"
                  width="100"
                  key="taskSituation2"
                  prop="taskSituation2"
                >
                </el-table-column><el-table-column
                  </el-table-column
                  ><el-table-column
                  label="面访或者接诊"
                  align="center"
                  width="100"
                  key="taskSituation3"
                  prop="taskSituation3"
                >
                </el-table-column><el-table-column
                  </el-table-column
                  ><el-table-column
                  label="微信随访"
                  align="center"
                  width="100"
                  key="taskSituation4"
                  prop="taskSituation4"
                >
                </el-table-column><el-table-column
                  </el-table-column
                  ><el-table-column
                  label="随访电话不正确"
                  align="center"
                  width="100"
                  key="taskSituation5"
                  prop="taskSituation5"
                >
                </el-table-column><el-table-column
                  </el-table-column
                  ><el-table-column
                  label="其他情况不宜随访"
                  align="center"
                  width="100"
@@ -576,6 +591,7 @@
                </el-table-column>
              </el-table-column>
            </el-table>
            </div>
            <!-- <pagination
              v-show="total > 0"
@@ -883,7 +899,7 @@
    return {
      topactiveName: "Local", //顶部选择
      activeName: "first", //侧边选择
      orgname:'',
      orgname: "",
      expands: [],
      // é®ç½©å±‚
      loading: false,
@@ -1003,7 +1019,6 @@
    this.getDeptTree();
    this.getList();
    this.orgname = localStorage.getItem("orgname");
  },
  methods: {
@@ -1064,6 +1079,162 @@
      } else {
        this.expands = [this.getRowKey(row)];
      }
    },
    getSummaries(param) {
      const { columns, data } = param;
      const sums = [];
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = "合计";
          return;
        }
         if (index === 1||index === 2) {
          sums[index] = "/";
          return;
        }
        // å¯¹ç™¾åˆ†æ¯”字段特殊处理 - å–平均值
        if (
          column.property === "followUpRate" ||
          column.property === "rate" ||
          column.property === "followUpRateAgain"
        ) {
          // æå–所有有效百分比值并转换为小数
          const percentageValues = data
            .map((item) => {
              const value = item[column.property];
              if (!value || value === "-" || value === "0%") return null;
              // å¤„理带百分号的数据
              if (typeof value === "string" && value.includes("%")) {
                // åŽ»é™¤ç™¾åˆ†å·å¹¶è½¬æ¢ä¸ºå°æ•°
                const numValue = parseFloat(value.replace("%", "")) / 100;
                return isNaN(numValue) ? null : numValue;
              } else {
                // å¤„理已经是小数的数据
                const numValue = parseFloat(value);
                return isNaN(numValue) ? null : numValue;
              }
            })
            .filter((value) => value !== null && value !== 0); // è¿‡æ»¤æŽ‰null和0值
          if (percentageValues.length > 0) {
            const average =
              percentageValues.reduce((sum, value) => sum + value, 0) /
              percentageValues.length;
            sums[index] = (average * 100).toFixed(2) + "%";
          } else {
            sums[index] = "0.00%";
          }
        } else {
          // æ™®é€šæ•°å­—字段 - æ±‚å’Œ
          const values = data.map((item) => {
            const value = item[column.property];
            if (value === "-" || value === "" || value === null) return 0;
            return Number(value) || 0;
          });
          if (!values.every((value) => isNaN(value))) {
            sums[index] = values.reduce((prev, curr) => prev + curr, 0);
            sums[index] = this.formatNumber(sums[index]);
          } else {
            sums[index] = "-";
          }
        }
      });
      return sums;
    },
    // å†…部表格合计行计算方法
    getInnerSummaries(param) {
      const { columns, data } = param;
      const sums = [];
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = "小计";
          return;
        }
        if (column.property === "drname" || column.property === "deptname") {
          sums[index] = "-";
          return;
        }
        // å¯¹ç™¾åˆ†æ¯”字段特殊处理 - å–平均值
        if (column.property === "followUpRate" || column.property === "rate") {
          // æå–所有有效百分比值并转换为小数
          const percentageValues = data
            .map((item) => {
              const value = item[column.property];
              if (!value || value === "-" || value === "0%") return null;
              // å¤„理带百分号的数据
              if (typeof value === "string" && value.includes("%")) {
                // åŽ»é™¤ç™¾åˆ†å·å¹¶è½¬æ¢ä¸ºå°æ•°
                const numValue = parseFloat(value.replace("%", "")) / 100;
                return isNaN(numValue) ? null : numValue;
              } else {
                // å¤„理已经是小数的数据
                const numValue = parseFloat(value);
                return isNaN(numValue) ? null : numValue;
              }
            })
            .filter((value) => value !== null && value !== 0);
          if (percentageValues.length > 0) {
            const average =
              percentageValues.reduce((sum, value) => sum + value, 0) /
              percentageValues.length;
            sums[index] = (average * 100).toFixed(2) + "%";
          } else {
            sums[index] = "0.00%";
          }
        } else {
          // æ™®é€šæ•°å­—字段 - æ±‚å’Œ
          const values = data.map((item) => {
            const value = item[column.property];
            if (value === "-" || value === "" || value === null) return 0;
            return Number(value) || 0;
          });
          if (!values.every((value) => isNaN(value))) {
            sums[index] = values.reduce((prev, curr) => prev + curr, 0);
            sums[index] = this.formatNumber(sums[index]);
          } else {
            sums[index] = "-";
          }
        }
      });
      return sums;
    },
    // è¾…助方法:提取百分比数值
    extractPercentageValue(value) {
      if (!value) return null;
      if (typeof value === "string") {
        // å¤„理带百分号的字符串
        if (value.includes("%")) {
          const num = parseFloat(value.replace("%", ""));
          return isNaN(num) ? null : num / 100;
        }
        // å¤„理纯数字字符串
        const num = parseFloat(value);
        return isNaN(num) ? null : num;
      }
      // å¤„理数字类型
      return typeof value === "number" ? value : null;
    },
    // æ•°å­—格式化方法
    formatNumber(num) {
      if (isNaN(num)) return "-";
      return Number.isInteger(num) ? num.toString() : num.toFixed(0);
    },
    /** ä¿®æ”¹æ ‡ç­¾ */
    handleUpdate(row) {
@@ -1355,9 +1526,9 @@
      text: "随访状态分布",
      left: "center",
      textStyle: {
        color: '#333',
        fontSize: 16
      }
            color: "#333",
            fontSize: 16,
          },
    },
    tooltip: {
      trigger: "item",
@@ -1368,10 +1539,10 @@
      left: "left",
      data: ["待随访", "随访成功", "随访失败"],
      textStyle: {
        color: '#666'
      }
            color: "#666",
    },
    color: ['#FF9D4D', '#36B37E', '#FF5C5C'], // æ–°çš„配色方案
        },
        color: ["#FF9D4D", "#36B37E", "#FF5C5C"], // æ–°çš„配色方案
    series: [
      {
        name: "随访状态",
@@ -1381,41 +1552,41 @@
        itemStyle: {
          borderRadius: 10,
          borderColor: "#fff",
          borderWidth: 2
              borderWidth: 2,
        },
        label: {
          show: true,
          formatter: "{b}: {c} ({d}%)",
          color: '#333'
              color: "#333",
        },
        emphasis: {
          label: {
            show: true,
            fontSize: "18",
            fontWeight: "bold"
                fontWeight: "bold",
          },
          itemStyle: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
          }
                shadowColor: "rgba(0, 0, 0, 0.5)",
              },
        },
        data: [
          {
            value: followUpData.pending,
            name: "待随访"
                name: "待随访",
          },
          {
            value: followUpData.success,
            name: "随访成功"
                name: "随访成功",
          },
          {
            value: followUpData.fail,
            name: "随访失败"
          }
        ]
      }
    ]
                name: "随访失败",
              },
            ],
          },
        ],
  };
  this.pieChart.setOption(pieOption);
@@ -1447,14 +1618,14 @@
  );
  // æ–°å¢žä¸¤æ¡æŠ˜çº¿æ•°æ®
 const followUpRateData = this.userList.map(item => {
      const followUpRateData = this.userList.map((item) => {
    if (!item.followUpRate) return 0;
    // åŽ»æŽ‰ç™¾åˆ†å·å¹¶è½¬ä¸ºæ•°å­—
    const rateStr = String(item.followUpRate).replace('%', '');
        const rateStr = String(item.followUpRate).replace("%", "");
    return parseFloat(rateStr) || 0;
  });
  const timelyRateData = this.userList.map(item =>
      const timelyRateData = this.userList.map((item) =>
    item.rate ? (Number(item.rate) * 100).toFixed(2) : 0
  );
@@ -1463,9 +1634,9 @@
      text: "科室/病区随访趋势",
      left: "center",
      textStyle: {
        color: '#333',
        fontSize: 16
      }
            color: "#333",
            fontSize: 16,
          },
    },
    tooltip: {
      trigger: "axis",
@@ -1480,23 +1651,23 @@
      data: ["出院人次", "应随访人次", "随访率(%)", "及时率(%)"],
      top: "bottom",
      textStyle: {
        color: '#666'
      }
            color: "#666",
    },
    color: ['#5470C6', '#91CC75', '#EE6666', '#9A60B4'], // æ–°å¢žç´«è‰²ç”¨äºŽåŠæ—¶çއ
        },
        color: ["#5470C6", "#91CC75", "#EE6666", "#9A60B4"], // æ–°å¢žç´«è‰²ç”¨äºŽåŠæ—¶çއ
    xAxis: {
      type: "category",
      data: categories,
      axisLabel: {
        interval: 0,
        rotate: 30,
        color: '#666'
            color: "#666",
      },
      axisLine: {
        lineStyle: {
          color: '#ddd'
        }
      }
              color: "#ddd",
            },
          },
    },
    yAxis: [
      {
@@ -1504,18 +1675,18 @@
        name: "人次",
        min: 0,
        axisLabel: {
          color: '#666'
              color: "#666",
        },
        axisLine: {
          lineStyle: {
            color: '#ddd'
          }
                color: "#ddd",
              },
        },
        splitLine: {
          lineStyle: {
            color: '#f0f0f0'
          }
        }
                color: "#f0f0f0",
              },
            },
      },
      {
        type: "value",
@@ -1523,18 +1694,18 @@
        min: 0,
        max: 100,
        axisLabel: {
          color: '#666',
          formatter: '{value}%'
              color: "#666",
              formatter: "{value}%",
        },
        axisLine: {
          lineStyle: {
            color: '#ddd'
          }
                color: "#ddd",
              },
        },
        splitLine: {
          show: false
        }
      }
              show: false,
            },
          },
    ],
    series: [
      {
@@ -1543,8 +1714,8 @@
        barWidth: "25%",
        data: dischargeData,
        itemStyle: {
          borderRadius: [4, 4, 0, 0]
        }
              borderRadius: [4, 4, 0, 0],
            },
      },
      {
        name: "应随访人次",
@@ -1552,8 +1723,8 @@
        barWidth: "25%",
        data: followUpData,
        itemStyle: {
          borderRadius: [4, 4, 0, 0]
        }
              borderRadius: [4, 4, 0, 0],
            },
      },
      {
        name: "随访率(%)",
@@ -1562,22 +1733,24 @@
        data: followUpRateData,
        symbolSize: 8,
        lineStyle: {
          width: 3
              width: 3,
        },
        markLine: {
          silent: true,
          data: [{
              data: [
                {
            yAxis: 80,
            lineStyle: {
              color: '#EE6666',
              type: 'dashed'
                    color: "#EE6666",
                    type: "dashed",
            },
            // label: {
            //   position: 'end',
            //   formatter: '目标80%'
            // }
          }]
        }
                },
              ],
            },
      },
      {
        name: "及时率(%)",
@@ -1587,31 +1760,33 @@
        symbolSize: 8,
        lineStyle: {
          width: 3,
          type: 'dotted' // ä½¿ç”¨è™šçº¿åŒºåˆ†
              type: "dotted", // ä½¿ç”¨è™šçº¿åŒºåˆ†
        },
        markLine: {
          silent: true,
          data: [{
              data: [
                {
            yAxis: 90,
            lineStyle: {
              color: '#9A60B4',
              type: 'dashed'
                    color: "#9A60B4",
                    type: "dashed",
            },
            // label: {
            //   position: 'end',
            //   formatter: '目标90%'
            // }
          }]
        }
      }
                },
              ],
            },
          },
    ],
    grid: {
      top: '15%',
      left: '3%',
      right: '4%',
      bottom: '15%',
      containLabel: true
    }
          top: "15%",
          left: "3%",
          right: "4%",
          bottom: "15%",
          containLabel: true,
        },
  };
  this.barLineChart.setOption(option);
@@ -1727,6 +1902,41 @@
  text-align: left;
  font-size: 20px;
}
// ç¾ŽåŒ–合计行样式
::v-deep .el-table__footer {
  .el-table__cell {
    background-color: #f5f7fa;
    font-weight: 600;
    color: #409eff;
    .cell {
      font-weight: 600;
      color: #409eff;
    }
  }
}
// å†…部表格合计行样式
::v-deep .inner-table .el-table__footer {
  .el-table__cell {
    background-color: #ecf5ff;
    font-weight: 500;
    color: #67c23a;
    .cell {
      font-weight: 500;
      color: #67c23a;
    }
  }
}
// ç™¾åˆ†æ¯”字段特殊样式
.your-table-container ::v-deep .el-table__footer .el-table__cell[data-field="followUpRate"] .cell,
.your-table-container ::v-deep .el-table__footer .el-table__cell[data-field="rate"] .cell,
.your-table-container ::v-deep .el-table__footer .el-table__cell[data-field="followUpRateAgain"] .cell {
  color: #e6a23c !important;
  font-weight: 700 !important;
}
.leftvlue {
  //   display: flex;
vue.config.js
@@ -37,8 +37,8 @@
      [process.env.VUE_APP_BASE_API]: {
        // target: `https://www.health-y.cn/lssf`,
        // target: `http://192.168.100.129:8095`,
        target: `http://192.168.100.10:8096`,
        // target:`http://localhost:8095`,
        // target: `http://192.168.100.10:8096`,
        target:`http://localhost:8095`,
        // target:`http://35z1t16164.qicp.vip`,
        // target: `http://192.168.100.193:8095`,
        // target: `http://192.168.101.166:8093`,