WXL (wul)
2026-05-07 ecbcc059d43f64877551756de129c653d31d0032
测试完成
已修改21个文件
已添加3个文件
5778 ■■■■ 文件已修改
src/api/AiCentre/indicator.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/CallButton/index.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/getters.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/beHospitalized/followUp.vue 2294 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/beHospitalized/publicity.vue 1232 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/discharge/index.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/record/detailpage/index.vue 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/tasklist/index.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/education/index.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/questionbank/particulars/index.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/questionnaire/index.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login-ls.vue 322 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/outsideChainxj.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/outsideChainxjnew.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/Missioncreation.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/QuestionnaireTask.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/particty.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sfstatistics/percentage/components/FirstFollowUp.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sfstatistics/percentage/components/SecondFollowUp.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sfstatistics/percentage/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sfstatistics/propaganda/index.vue 1541 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/AiCentre/indicator.js
@@ -47,6 +47,14 @@
    method: "get",
   });
   }
// å®£æ•™ç»Ÿè®¡
export function gethelibraryCount(data) {
  return request({
    url: "/smartor/serviceSubtask/gethelibraryCount",
      method: "post",
    data: data,
  });
}
// åˆ é™¤æŒ‡æ ‡
export function deletetarget(userId) {
@@ -156,4 +164,3 @@
    data:data,
  });
}
src/components/CallButton/index.vue
@@ -51,6 +51,7 @@
      isRegistering: true, // åˆå§‹ä¸ºæ³¨å†Œä¸­çŠ¶æ€
      randomNum: randomNum,
      randomID: null,
      orgname: localStorage.getItem("orgname"),
      callStatus: "idle", // idle, calling, connected, ended
      sipStatus: "未连接",
      sipStatusClass: "status-disconnected",
@@ -98,6 +99,15 @@
    },
  },
  created() {
    if (
      this.orgname == "第一人民医院湖滨院区" ||
      this.orgname == "第一人民医院吴山院区"
    ) {
      this.sipConfig.password = "heskj@1234";
    } else {
      this.sipConfig.password = "Smartor@2023";
    }
    // CallgetList();
  },
@@ -200,7 +210,10 @@
          this.sipConfig.sipUri = `${this.randomNum}@192.168.10.124`;
        } else if (orgName == "龙泉市人民医院") {
          this.sipConfig.sipUri = `${this.randomNum}@10.10.0.220`;
        } else if (orgName == "第一人民医院湖滨院区"||orgName == "第一人民医院吴山院区") {
        } else if (
          orgName == "第一人民医院湖滨院区" ||
          orgName == "第一人民医院吴山院区"
        ) {
          this.sipConfig.sipUri = `${this.randomNum}@192.169.129.198`;
        }
      } catch (error) {
src/store/getters.js
@@ -755,13 +755,29 @@
    //   },
    // },
    {
      value: "13",
      value: 13,
      label: "专病随访",
      raw: {
      cssClass: "",
      listClass: "",
    },
    },
     {
      value: 17,
      label: "宣教关怀(入院)",
      raw: {
      cssClass: "",
      listClass: "",
    },
    },
     {
      value: 18,
      label: "入院随访",
      raw: {
      cssClass: "",
      listClass: "",
    },
    },
  ],
};
src/store/modules/user.js
@@ -132,7 +132,8 @@
      const campusid = userInfo.campusid;
      const orgid = userInfo.orgid;
      console.log(orgid, campusid, "88");
      const orgname = userInfo.orgname;
      console.log(orgname, campusid, "88");
      return new Promise((resolve, reject) => {
        login(username, password, code, orgid, campusid)
@@ -195,7 +196,10 @@
              localStorage.setItem("YongHuID", "1478905109432766464");
              localStorage.setItem("YongHuXM", "LQRMYY");
            } else if (orgid == "20001001") {
              localStorage.setItem("orgname", "省立同德翠苑院区");
              orgname == "南华附一"
                ? localStorage.setItem("orgname", "南华大学附属第一医院")
                : localStorage.setItem("orgname", "省立同德翠苑院区");
              localStorage.setItem("ZuHuID", "");
              localStorage.setItem("deptCode", "");
              localStorage.setItem("YongHuID", "");
src/views/followvisit/beHospitalized/followUp.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,2294 @@
<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-col :span="2.5" v-if="orgname == '省立同德翠苑院区'">
          <div class="jgleftvlue">
            <el-card shadow="hover ">
              <div style="padding: 8px">
                <span>警告</span>
                <div
                  style="
                    text-align: center;
                    font-size: 18px;
                    margin-top: 10px;
                    font-weight: 600;
                  "
                >
                  {{ jgvalue }}
                </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="updateBy">
          <el-input
            v-model="topqueryParams.updateBy"
            placeholder="请输入随访人员"
          ></el-input>
        </el-form-item>
        <el-form-item label="主治医生" prop="drname">
          <el-input
            v-model="topqueryParams.drname"
            placeholder="请输入主治医生"
          ></el-input>
        </el-form-item>
        <el-form-item label="经管医生" prop="managementDoctor">
          <el-input
            v-model="topqueryParams.managementDoctor"
            placeholder="请输入主治医生"
          ></el-input>
        </el-form-item>
        <el-form-item label="日期限制" prop="status">
          <el-select v-model="endOut" placeholder="请选择">
            <el-option
              v-for="item in endOuts"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </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" 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-col :span="1.5" v-if="orgname == '景宁畲族自治县人民医院'">
          <div class="documentf">
            <div class="document">
              <el-tooltip
                content="请先选中服务"
                placement="top"
                :disabled="!multiple"
              >
                <div class="tooltip-wrapper">
                  <el-button
                    type="primary"
                    :disabled="multiple"
                    class="purple-button"
                    @click="scoreDialogVisible = true"
                  >
                    æ»¡æ„åº¦è°ƒæŸ¥
                  </el-button>
                </div>
              </el-tooltip>
            </div>
          </div>
        </el-col>
      </el-row>
      <el-table
        v-loading="loading"
        ref="userform"
        :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="leavediagname"
          prop="leavediagname"
          width="120"
          :show-overflow-tooltip="true"
        >
        </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>
              <div v-if="scope.row.sendstate == 7">
                <el-tag type="danger" :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="visitTime"
          prop="visitTime"
        >
          <template slot-scope="scope">
            <span>{{ formatTime(scope.row.visitTime) }}</span>
          </template></el-table-column
        >
        <!-- åŽŸ -->
        <el-table-column
          label="主治医生"
          width="120"
          align="center"
          key="drname"
          prop="drname"
        />
        <el-table-column
          v-if="orgname != '丽水市中医院'"
          label="随访人员"
          align="center"
          key="updateBy"
          prop="updateBy"
          width="120"
        />
        <el-table-column
          v-if="orgname != '丽水市中医院'"
          label="经管医生"
          align="center"
          key="managementDoctor"
          prop="managementDoctor"
          width="120"
        />
        <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="leavehospitaldistrictname"
          prop="leavehospitaldistrictname"
          width="120"
        >
        </el-table-column>
        <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="随访满意度评分"
      :visible.sync="scoreDialogVisible"
      width="80%"
      :close-on-click-modal="false"
    >
      <el-table :data="selectedRows" border style="width: 100%">
        <el-table-column
          label="姓名"
          width="100"
          align="center"
          prop="sendname"
        />
        <el-table-column
          label="任务名称"
          width="180"
          align="center"
          prop="taskName"
        />
        <!-- æ–°å¢žè¯„分列 -->
        <el-table-column
          label="真实性(20)"
          align="center"
          key="authenticity"
          prop="authenticity"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.authenticity"
              :min="0"
              :max="20"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="一周内完成(20)"
          align="center"
          key="weekFinish"
          prop="weekFinish"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.weekFinish"
              :min="0"
              :max="20"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="规范性(10)"
          align="center"
          key="standard"
          prop="standard"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.standard"
              :min="0"
              :max="10"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="及时性(10)"
          align="center"
          key="timeliness"
          prop="timeliness"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.timeliness"
              :min="0"
              :max="10"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="宣教情况(10)"
          align="center"
          key="library"
          prop="library"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.library"
              :min="0"
              :max="10"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="环境满意度(10)"
          align="center"
          key="environment"
          prop="environment"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.environment"
              :min="0"
              :max="10"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="医生满意度(10)"
          align="center"
          key="doctorSatisfaction"
          prop="doctorSatisfaction"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.doctorSatisfaction"
              :min="0"
              :max="10"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="护士满意度(10)"
          align="center"
          key="nurseSatisfaction"
          prop="nurseSatisfaction"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.nurseSatisfaction"
              :min="0"
              :max="10"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="总分"
          align="center"
          key="total"
          prop="total"
          fixed="right"
        >
          <template slot-scope="scope">
            <span>{{ calculateTotal(scope.row) }}</span>
          </template>
        </el-table-column>
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button @click="scoreDialogVisible = false">取消</el-button>
        <el-button type="primary" @click="saveScores">保存</el-button>
      </div>
    </el-dialog>
    <!-- æ·»åŠ æˆ–ä¿®æ”¹å½±åƒéšè®¿å¯¹è¯æ¡† -->
    <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,
  addsatisfaction,
} 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: "",
      jgvalue: "",
      yfsvalue: "",
      inputValue: "",
      preachform: "",
      previewVisible: false, //影像随访预览弹框
      radio: "",
      radios: [],
      previewtype: 2, //预览影像随访类型
      total: 0, // æ€»æ¡æ•°
      // æ»¡æ„åº¦è°ƒæŸ¥æ•°æ®
      scoreDialogVisible: false,
      selectedRows: [],
      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: "",
      },
      // endOut: 1,
      endOut: localStorage.getItem("orgname") == "丽水市中医院" ? 0 : 1, //0 å‡ºé™¢æ—¶é—´(正序)    1 å‡ºé™¢æ—¶é—´(倒序)   2 å‘送时间(正序)    3 å‘送时间(倒序)  7应随访日期(倒序) åº”随访日期(正序)
      endOuts: [
        {
          value: 0,
          label: "截止至当日服务",
        },
        {
          value: 1,
          label: "全部服务",
        },
      ],
      topicoptionssort: [
        {
          value: 0,
          label: "出院时间(正序)",
        },
        {
          value: 1,
          label: "出院时间(倒序)",
        },
        {
          value: 2,
          label: "发送时间(正序)",
        },
        {
          value: 3,
          label: "发送时间(倒序)",
        },
        {
          value: 7,
          label: "应随访日期(正序)",
        },
        {
          value: 8,
          label: "应随访日期(倒序)",
        },
         {
          value: 9,
          label: "按照患者排序",
        },
      ],
      // æŸ¥è¯¢å‚æ•°
      topqueryParams: {
        pageNum: 1,
        pageSize: 10,
        sendstate:
          localStorage.getItem("orgname") == "省立同德翠苑院区" ? null : 2,
        sort: localStorage.getItem("orgname") == "丽水市中医院" ? 8 : 2, //0 å‡ºé™¢æ—¶é—´(正序)    1 å‡ºé™¢æ—¶é—´(倒序)   2 å‘送时间(正序)    3 å‘送时间(倒序)  7应随访日期(倒序) åº”随访日期(正序)
        serviceType: 18,
        searchscope: 3,
        visitCount: 1,
        scopetype: [],
        leaveldeptcodes: [],
        leavehospitaldistrictcodes: [],
      },
      orgname: "",
      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: "已完成",
        },
         {
          value: 7,
          label: "超时",
        },
      ],
      sextype: [
        {
          value: 1,
          label: "男",
        },
        {
          value: 2,
          label: "女",
        },
      ],
      topicoptionsyj: [
        {
          value: 1,
          label: "异常",
        },
        {
          value: 2,
          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: {
    // ç›‘听路由参数变化
    "$route.query": {
      handler(newQuery, oldQuery) {
        if (newQuery.errtype !== oldQuery.errtype) {
          console.log(22);
          this.loadData(); // é‡æ–°åŠ è½½æ•°æ®
        }
      },
      immediate: true,
    },
  },
  created() {
    this.serviceState = store.getters.serviceState;
    this.checkboxlist = store.getters.checkboxlist;
    this.orgname = localStorage.getItem("orgname");
    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 == 1) {
      this.toleadExport(2);
    } else if (this.errtype == 2) {
      // å¾…随访
      this.toleadExport(3);
    } else if (this.errtype == 3) {
      // å¤±è´¥
      this.toleadExport(4);
    } else if (this.errtype == 4) {
      // å¼‚常
      this.toleadExport(2);
    } else if (this.errtype == 5) {
      // å…¨éƒ¨
      this.toleadExport(5);
    } else {
      this.getList(1);
    }
    this.getConfigKey("sys.user.initPassword").then((response) => {
      this.initPassword = response.msg;
    });
  },
  activated() {
    this.errtype = this.$route.query.errtype;
    if (this.errtype == 1) {
      this.toleadExport(2);
    } else if (this.errtype == 2) {
      // å¾…随访
      this.toleadExport(3);
    } else if (this.errtype == 3) {
      // å¤±è´¥
      this.toleadExport(4);
    } else if (this.errtype == 4) {
      // å¼‚常
      this.toleadExport(2);
    } else if (this.errtype == 5) {
      // å…¨éƒ¨
      this.toleadExport(5);
    } else {
      this.getList(1);
    }
  },
  methods: {
    /** æŸ¥è¯¢éšè®¿æœåŠ¡åˆ—è¡¨ */
    getList(refresh) {
      // é»˜è®¤å…¨éƒ¨
      if (this.topqueryParams.searchscope == 3) {
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        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.errtype) {
        this.topqueryParams.leavehospitaldistrictcodes.push(
          this.leavehospitaldistrictcode
        );
      }
      this.loading = true;
      if (
        this.topqueryParams.leavehospitaldistrictcodes[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) +
            Number(response.rows[0].fssb);
          // this.cardlist[1].value = response.rows[0].wzx;
          this.cardlist[1].value = response.rows[0].ysf;
          this.ycvalue = response.rows[0].yc;
          this.jgvalue = response.rows[0].jg;
          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;
      });
    },
    loadData() {
      this.errtype = this.$route.query.errtype;
      if (this.errtype == 1) {
        this.toleadExport(2);
      } else if (this.errtype == 2) {
        // å¾…随访
        this.toleadExport(3);
      } else if (this.errtype == 3) {
        // å¤±è´¥
        this.toleadExport(4);
      } else if (this.errtype == 4) {
        // å¼‚常
        this.toleadExport(2);
      } else if (this.errtype == 5) {
        // å…¨éƒ¨
        this.toleadExport(5);
      } else {
        this.getList(1);
      }
    },
    // æ—¶é—´
    getEndOfDay() {
      const date = new Date(); // åˆ›å»ºä¸€ä¸ªè¡¨ç¤ºå½“前时间的Date对象
      date.setHours(23, 59, 59, 0); // å°†æ—¶é—´è®¾ç½®ä¸º23:59:59.000
      return date;
    },
    formatDateToYYYYMMDDHHMMSS(date) {
      const year = date.getFullYear();
      const month = String(date.getMonth() + 1).padStart(2, "0"); // æœˆä»½è¡¥é›¶
      const day = String(date.getDate()).padStart(2, "0"); // æ—¥æœŸè¡¥é›¶
      const hours = String(date.getHours()).padStart(2, "0");
      const minutes = String(date.getMinutes()).padStart(2, "0");
      const seconds = String(date.getSeconds()).padStart(2, "0");
      return `${year}-${month}-${day}`;
    },
    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.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],
        leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
      };
      buidegetTasklist(obj).then((response) => {
        this.userList = response.rows[0].serviceSubtaskList;
        this.total = response.total;
        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.jgvalue = response.rows[0].jg;
        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.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      this.topqueryParams.pageNum = 1;
      // åˆ¤æ–­æ˜¯ä¸æ˜¯å·¥ä½œå°å¿«æ·æŸ¥è¯¢
      if (this.errtype != 2) {
        this.topqueryParams.startOutHospTime = this.dateRange[0];
        this.topqueryParams.endOutHospTime = this.dateRange[1];
        this.topqueryParams.startSendDateTime = this.dateRangefs[0];
        this.topqueryParams.endSendDateTime = this.dateRangefs[1];
      }
      this.getList(refresh);
    },
    // æ‚£è€…范围处理
    handleChange(value) {
      let type = value[0];
      let code = value.slice(-1)[0];
      this.topqueryParams.leavehospitaldistrictcodes = [];
      this.topqueryParams.leaveldeptcodes = [];
      if (type == 1) {
        this.topqueryParams.leaveldeptcodes.push(code);
        this.topqueryParams.leavehospitaldistrictcodes = [];
        this.topqueryParams.searchscope = 1;
      } else if (type == 2) {
        this.topqueryParams.leavehospitaldistrictcodes.push(code);
        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: 18,
        searchscope: 3,
        visitCount: 1,
        scopetype: [],
        leaveldeptcodes: [],
        leavehospitaldistrictcodes: [],
      };
      this.handleQuery(1);
    },
    handleSelectionChange(rows) {
      this.selectedRows = rows.map((row) => {
        // åˆå§‹åŒ–评分字段
        return {
          ...row,
          authenticity: row.authenticity || 0,
          weekFinish: row.weekFinish || 0,
          standard: row.standard || 0,
          timeliness: row.timeliness || 0,
          library: row.library || 0,
          environment: row.environment || 0,
          doctorSatisfaction: row.doctorSatisfaction || 0,
          nurseSatisfaction: row.nurseSatisfaction || 0,
        };
      });
      if (this.selectedRows.length > 0) {
        this.multiple = false;
      } else {
        this.multiple = true;
      }
    },
    // è®¡ç®—总分
    calculateTotal(row) {
      return (
        (row.authenticity || 0) +
        (row.weekFinish || 0) +
        (row.standard || 0) +
        (row.timeliness || 0) +
        (row.library || 0) +
        (row.environment || 0) +
        (row.doctorSatisfaction || 0) +
        (row.nurseSatisfaction || 0)
      );
    },
    // ä¿å­˜è¯„分
    saveScores() {
      this.selectedRows.forEach((item) => {
        item.createBy = null;
        item.patName = item.sendname;
        item.hospitaldistrictname = item.leavehospitaldistrictname;
      });
      addsatisfaction(this.selectedRows).then((res) => {
        if (res.code == 200) {
          this.$message.success("评分保存成功");
          this.scoreDialogVisible = false;
          this.selectedRows = [];
          this.$refs.userform.clearSelection();
        } else {
          this.$modal.msgWarning("评分保存失败");
          this.scoreDialogVisible = false;
          this.selectedRows = [];
          this.$refs.userform.clearSelection();
        }
      });
      // è¿™é‡Œå¯ä»¥æ·»åŠ ä¿å­˜é€»è¾‘ï¼Œå¦‚è°ƒç”¨API保存评分
    },
    //删除选项
    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: 18,
        },
      });
    },
    //患者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) {
      console.log(too, "too");
      if (too == 1) {
        this.topqueryParams.sendstate = 4;
        this.topqueryParams.excep = null;
      } else if (too == 2) {
        this.topqueryParams.excep = 1;
        this.topqueryParams.sendstate = null;
      } else if (too == 3) {
        this.topqueryParams.endSendDateTime = this.formatDateToYYYYMMDDHHMMSS(
          this.getEndOfDay()
        );
        console.log(1111, this.topqueryParams.endSendDateTime);
        this.topqueryParams.excep = null;
        this.topqueryParams.sendstate = 2;
        this.topqueryParams.scopetype = null;
      } else if (too == 4) {
        this.topqueryParams.excep = null;
        this.topqueryParams.sendstate = 5;
        this.topqueryParams.scopetype = null;
      } else if (too == 5) {
        this.topqueryParams.excep = null;
        this.topqueryParams.sendstate = null;
        this.topqueryParams.scopetype = null;
      }
      this.handleQuery(1);
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    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";
      } else if (row.excep == 2) {
        return "remind-row";
      }
      return "";
    },
    // åˆ›å»ºå†æ¬¡éšè®¿æœåŠ¡
    setupsubtask() {
      this.$refs["zcform"].validate((valid) => {
        if (valid) {
          this.zcform.remark =
            this.zcform.remark + "【" + this.getCurrentTime() + "】";
          let form = structuredClone(this.zcform);
          form.visitTime = 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;
}
::v-deep.el-table .remind-row {
  background: #fcf5aa;
}
.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.jgleftvlue .el-card__body:hover {
  background: #f7f075;
  cursor: pointer; /* é¼ æ ‡æ‚¬æµ®æ—¶å˜ä¸ºæ‰‹å½¢ */
}
::v-deep.ysfleftvlue .el-card__body {
  background: #d0fdd8;
}
::v-deep.ysfleftvlue .el-card__body:hover {
  background: #0abc54;
  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: #324a9b;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
}
::v-deep.el-radio-group {
  span {
    font-size: 24px;
  }
}
.purple-button {
  background-color: #7e22ce;
  border-color: #7e22ce;
  color: #fff;
}
.purple-button:hover,
.purple-button:focus {
  background-color: #9333ea;
  border-color: #9333ea;
}
.purple-button:active {
  background-color: #6b21a8;
  border-color: #6b21a8;
}
.button-textxga {
  color: #de7897;
}
.purple-button.is-disabled {
  background-color: #d8b4fe;
  border-color: #d8b4fe;
  opacity: 1; /* ä¿æŒç¦ç”¨çŠ¶æ€é€æ˜Žåº¦ */
}
// é€‰é¡¹å­—体放大
// ::v-deep.el-checkbox-group {
//   span {
//     font-size: 24px;
//   }
// }
</style>
src/views/followvisit/beHospitalized/publicity.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1232 @@
<template>
  <div class="app-container">
    <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-input v-model="topqueryParams.createBy"></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="患者姓名" prop="sendname">
          <el-input
            v-model="topqueryParams.sendname"
            placeholder="请输入患者姓名"
          ></el-input>
        </el-form-item>
        <!-- <el-form-item label="患者范围" prop="status">
          <el-select
            v-model="topqueryParams.searchscope"
            placeholder="请选择患者范围"
          >
            <el-option
              v-for="item in source"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </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.excep" placeholder="请选择">
            <el-option
              v-for="item in topicoptionsyj"
              :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"
            >搜索</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">
          <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-upload2"
                size="medium"
                @click="handleExport"
                >导出</el-button
              >
            </div>
          </div>
        </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-row>
      <el-table
        v-loading="loading"
        :data="userList"
        height="560"
        @selection-change="handleSelectionChange"
      >
        <el-table-column
          label="任务名称"
          fixed
          align="center"
          key="taskName"
          prop="taskName"
          width="180"
        />
        <!-- <el-table-column label="序号" fixed align="center" key="id" prop="id" /> -->
        <el-table-column
          label="姓名"
          width="100"
          fixed
          align="center"
          key="sendname"
          prop="sendname"
        />
        <el-table-column
          label="宣教状态"
          align="center"
          key="sendstate"
          prop="sendstate"
          width="120"
        >
          <template slot-scope="scope">
            <div v-if="scope.row.sendstate == 1">
              <el-tag type="primary" :disable-transitions="false"
                >表单已领取</el-tag
              >
            </div>
            <div v-if="scope.row.sendstate == 2">
              <el-tag type="primary" :disable-transitions="false"
                >待随访</el-tag
              >
            </div>
            <div v-if="scope.row.sendstate == 3">
              <el-tag type="success" :disable-transitions="false"
                >表单已发送</el-tag
              >
            </div>
            <div v-if="scope.row.sendstate == 4">
              <el-tag type="info" :disable-transitions="false">不执行</el-tag>
            </div>
            <div v-if="scope.row.sendstate == 5">
              <el-tag type="danger" :disable-transitions="false"
                >发送失败</el-tag
              >
            </div>
            <div v-if="scope.row.sendstate == 6">
              <el-tag type="danger" :disable-transitions="false">已完成</el-tag>
            </div>
          </template>
        </el-table-column>
        <el-table-column
          label="结果状态"
          align="center"
          key="excep"
          prop="excep"
          width="120"
        >
          <template slot-scope="scope">
            <div v-if="scope.row.sendstate == 6">
              <dict-tag
                :options="dict.type.sys_yujing"
                :value="scope.row.excep"
              />
            </div>
            <div v-else>
              <span></span>
            </div>
          </template>
        </el-table-column>
        <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="出院日期"
          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="visitTime"
          prop="visitTime"
        >
          <template slot-scope="scope">
            <span>{{ formatTime(scope.row.visitTime) }}</span>
          </template></el-table-column
        >
        <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="120"
          align="center"
          key="nurseName"
          prop="nurseName"
        />
        <el-table-column
          label="主治医生"
          width="120"
          align="center"
          key="drname"
          prop="drname"
        />
        <!-- <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="leavehospitaldistrictname"
          prop="leavehospitaldistrictname"
          width="120"
        >
        </el-table-column>
        <!-- <el-table-column
          label="疾病名称"
          align="center"
          key="icdName"
          prop="icdName"
          width="120"
          :show-overflow-tooltip="true"
        >
        </el-table-column> -->
        <el-table-column
          label="模板名称"
          align="center"
          key="templatename"
          prop="templatename"
          :show-overflow-tooltip="true"
          width="200"
        />
        <el-table-column
          label="宣教人员"
          align="center"
          key="createBy"
          prop="createBy"
          width="120"
        />
        <!-- <el-table-column
        fixed="right"
          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
          fixed="right"
          label="任务结果记录"
          width="120"
          align="center"
          key="remark"
          prop="remark"
        >
          <template slot-scope="scope" v-if="scope.row.remark">
            <el-tag
              type="success"
              v-if="
                scope.row.sendstate != 5 &&
                scope.row.sendstate != 4 &&
                scope.row.remark
              "
              >{{ scope.row.remark }}</el-tag
            >
            <el-tag type="warning" v-else>{{ scope.row.remark }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column
          fixed="right"
          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="宣教状态"
          fixed="right"
          align="center"
          key="sendstate"
          prop="sendstate"
          width="120"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <dict-tag :options="serviceState" :value="scope.row.sendstate" />
          </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="title"
      :visible.sync="addalteropen"
      width="700px"
      append-to-body
    >
      <el-form ref="form" :model="form" label-width="100px">
        <el-row :gutter="20">
          <el-col :span="12"
            ><el-form-item label="任务名称">
              <el-input v-model="form.name"></el-input> </el-form-item
          ></el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24"
            ><el-form-item label="所属科室">
              <el-select v-model="form.region" placeholder="请选择科室">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select> </el-form-item></el-col
        ></el-row>
        <el-row :gutter="20">
          <el-col :span="24"
            ><el-form-item label="宣教类型">
              <el-select v-model="form.region" placeholder="请选择宣教类型">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select> </el-form-item
          ></el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="服务模块">
              <el-select v-model="form.region" placeholder="请选择模块">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="门诊宣教要求">
              <el-input type="textarea" v-model="form.desc"></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>
  </div>
</template>
<script>
import {
  listUser,
  getUser,
  delUser,
  addUser,
  updateUser,
  resetUserPwd,
  changeUserStatus,
} from "@/api/system/user";
import { getTaskservelist } from "@/api/AiCentre/index";
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,
      // æ€»æ¡æ•°
      total: 0,
      // ç”¨æˆ·è¡¨æ ¼æ•°æ®
      userList: null,
      // å¼¹å‡ºå±‚标题
      title: "新增门诊宣教",
      // æ˜¯å¦æ˜¾ç¤ºä¿®æ”¹ã€æ·»åŠ å¼¹å‡ºå±‚
      addalteropen: false,
      // ä¿®æ”¹å‘送时间对话框
      modificationVisible: false,
      // éƒ¨é—¨åç§°
      deptName: undefined,
      // é»˜è®¤å¯†ç 
      initPassword: undefined,
      // æ—¥æœŸèŒƒå›´
      dateRange: [],
      // å²—位选项
      postOptions: [],
      ruleForm: {
        type: [],
      },
      sourcetype: [
        {
          value: 1,
          label: "科室",
          children: [],
        },
        {
          value: 2,
          label: "病区",
          children: [],
        },
        {
          value: 3,
          label: "全部",
        },
      ],
      dynamicTags: ["选项一", "选项二", "选项三"], //选项
      inputVisible: false,
      inputValue: "",
      previewVisible: false, //门诊宣教预览弹框
      radio: "",
      radios: [],
      previewtype: 2, //预览门诊宣教类型
      total: 0, // æ€»æ¡æ•°
      ImportQuantity: 999, //导门诊宣教数量
      //预览门诊宣教信息
      previewvalue: {
        username: "这个医生对你怎么样",
      },
      value: [],
      list: [],
      source: [
        {
          value: 0,
          label: "所属患者",
        },
        {
          value: 1,
          label: "科室患者",
        },
        {
          value: 2,
          label: "病区患者",
        },
      ],
      loading: false,
      states: [
        "Alabama",
        "Alaska",
        "Arizona",
        "Arkansas",
        "California",
        "Colorado",
        "Connecticut",
        "Delaware",
        "Florida",
        "Georgia",
        "Hawaii",
        "Idaho",
        "Illinois",
        "Indiana",
        "Iowa",
        "Kansas",
        "Kentucky",
        "Louisiana",
        "Maine",
        "Maryland",
        "Massachusetts",
        "Michigan",
        "Minnesota",
        "Mississippi",
        "Missouri",
        "Montana",
        "Nebraska",
        "Nevada",
        "New Hampshire",
        "New Jersey",
        "New Mexico",
        "New York",
        "North Carolina",
        "North Dakota",
        "Ohio",
        "Oklahoma",
        "Oregon",
        "Pennsylvania",
        "Rhode Island",
        "South Carolina",
        "South Dakota",
        "Tennessee",
        "Texas",
        "Utah",
        "Vermont",
        "Virginia",
        "Washington",
        "West Virginia",
        "Wisconsin",
        "Wyoming",
      ],
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now();
        },
        shortcuts: [
          {
            text: "今天",
            onClick(picker) {
              picker.$emit("pick", new Date());
            },
          },
          {
            text: "昨天",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", date);
            },
          },
          {
            text: "一周前",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
            },
          },
        ],
      },
      // è¡¨å•参数
      form: {
        phonenumber: "",
        totagid: "",
        types: "",
        nickName: "",
        qystatus: "",
        btstatus: "",
      },
      // æŸ¥è¯¢å‚æ•°
      topqueryParams: {
        pageNum: 1,
        pageSize: 10,
        serviceType: 17,
        searchscope: 3,
        sendstate: 2,
        leaveldeptcodes: [],
        leavehospitaldistrictcodes: [],
      },
      propss: { multiple: true },
      options: [],
      topicoptions: [
        {
          value: 1,
          label: "表单已领取",
        },
        {
          value: 2,
          label: "待随访",
        },
        {
          value: 3,
          label: "表单已发送",
        },
        {
          value: 4,
          label: "不执行",
        },
        {
          value: 5,
          label: "发送失败",
        },
        {
          value: 6,
          label: "已完成",
        },
        {
          value: 7,
          label: "超时",
        },
      ],
      topicoptionsyj: [
        {
          value: 1,
          label: "异常",
        },
        {
          value: 0,
          label: "正常",
        },
      ],
      serviceState: [],
      // è¡¨å•校验
      rules: {},
    };
  },
  watch: {},
  created() {
    this.serviceState = store.getters.serviceState;
    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.getConfigKey("sys.user.initPassword").then((response) => {
      this.initPassword = response.msg;
    });
  },
  activated() {
    this.getList();
  },
  // æœç´¢
  mounted() {
    this.list = this.states.map((item) => {
      return { value: `value:${item}`, label: `label:${item}` };
    });
  },
  methods: {
    /** æŸ¥è¯¢é—¨è¯Šå®£æ•™æœåŠ¡åˆ—è¡¨ */
    getList() {
      if (this.topqueryParams.searchscope == 3) {
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      this.loading = true;
      console.log(this.topqueryParams.leavehospitaldistrictcodes, "123");
      console.log(this.topqueryParams.leaveldeptcodes, "344");
      if (
        this.topqueryParams.leavehospitaldistrictcodes[0] &&
        this.topqueryParams.leaveldeptcodes[0]
      ) {
        this.topqueryParams.deptOrDistrict = 2;
      } else {
        this.topqueryParams.deptOrDistrict = 1;
      }
      console.log(55);
      getTaskservelist(this.topqueryParams).then((response) => {
        this.userList = response.rows[0].serviceSubtaskList;
        this.userList.forEach((item) => {
          if (item.endtime) {
            item.endDay = this.daysBetween(item.endtime);
          }
        });
        this.total = response.total;
        this.loading = false;
      });
    },
    // æŸ¥çœ‹é—¨è¯Šå®£æ•™è¯¦æƒ…
    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 = [];
      }
    },
    // æ‚£è€…范围处理
    handleChange(value) {
      let type = value[0];
      let code = value.slice(-1)[0];
      this.topqueryParams.leavehospitaldistrictcodes = [];
      this.topqueryParams.leaveldeptcodes = [];
      if (type == 1) {
        this.topqueryParams.leaveldeptcodes.push(code);
        this.topqueryParams.leavehospitaldistrictcodes = [];
        this.topqueryParams.searchscope = 1;
      } else if (type == 2) {
        this.topqueryParams.leavehospitaldistrictcodes.push(code);
        this.topqueryParams.leaveldeptcodes = [];
        this.topqueryParams.searchscope = 2;
      } else {
        this.topqueryParams.searchscope = 3;
      }
    },
    // é—¨è¯Šå®£æ•™çŠ¶æ€ä¿®æ”¹
    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";
        });
    },
    // å–消按钮
    cancel() {
      this.addalteropen = false;
      this.reset();
    },
    // è¡¨å•重置
    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() {
      if (this.topqueryParams.searchscope == 1) {
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leavehospitaldistrictcodes = null;
      } else if (this.topqueryParams.searchscope == 2) {
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
        this.topqueryParams.leaveldeptcodes = null;
      } else {
        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.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.dateRange = [];
      this.topqueryParams = {
        pageNum: 1,
        pageSize: 10,
        serviceType: 17,
        sendstate: 2,
      };
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    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/Missioncreation",
        query: {
          type: 3,
          serviceType: 17,
        },
      });
    },
    /** æäº¤æŒ‰é’® */
    submitForm: function () {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.userId != undefined) {
            updateUser(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addUser(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    // å…¨éƒ¨åœæ­¢
    AllStop() {
      this.$modal
        .confirm("是否停止全部任务?")
        .then(function () {
          return console.log("停止成功");
        })
        .then(() => {
          this.getList();
          this.$modal.msgWarning("停止成功");
        })
        .catch(() => {});
    },
    // å…¨éƒ¨å¼€å§‹
    AllStarted() {
      this.$modal
        .confirm("是否开启全部任务?")
        .then(function () {
          return console.log("开启成功");
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("开启成功");
        })
        .catch(() => {});
    },
    // è®¾ç½®å‘送时间
    Sendtimesetting() {
      this.modificationVisible = 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() {
      const originalPageNum = this.topqueryParams.pageNum;
      const originalPageSize = this.topqueryParams.pageSize;
this.topqueryParams.pageNum = null;
      this.topqueryParams.pageSize = null;
      this.download(
        "smartor/serviceSubtask/patItemExport",
        {
          ...this.topqueryParams,
        },
        `user_${new Date().getTime()}.xlsx`
      ).finally(() => {
        // å¯¼å‡ºåŽæ¢å¤åˆ†é¡µå‚æ•°
        this.topqueryParams.pageNum = originalPageNum;
        this.topqueryParams.pageSize = originalPageSize;
        this.getList()
      });
    },
  },
};
</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);
}
.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;
    }
  }
}
.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: #dd302a;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
}
.button-zx {
  background: #4fabe9;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
}
::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
@@ -2040,6 +2040,8 @@
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      const originalPageNum = this.topqueryParams.pageNum;
      const originalPageSize = this.topqueryParams.pageSize;
      this.topqueryParams.pageNum = null;
      this.topqueryParams.pageSize = null;
      this.download(
@@ -2047,8 +2049,13 @@
        {
          ...this.topqueryParams,
        },
        `user_${new Date().getTime()}.xlsx`,
      );
        `user_${new Date().getTime()}.xlsx`
      ).finally(() => {
        // å¯¼å‡ºåŽæ¢å¤åˆ†é¡µå‚æ•°
        this.topqueryParams.pageNum = originalPageNum;
        this.topqueryParams.pageSize = originalPageSize;
        this.getList()
      });
    },
    // å¼‚常列渲染
    tableRowClassName({ row, rowIndex }) {
src/views/followvisit/record/detailpage/index.vue
@@ -558,11 +558,7 @@
            <div class="header-actions">
              <!-- åŸºç¡€æ“ä½œæŒ‰é’®ç»„ -->
              <div class="action-group basic-actions">
                <el-button
                  type="primary"
                  plain
                  @click="alterpatient('')"
                >
                <el-button type="primary" plain @click="alterpatient('')">
                  ä¿å­˜åŸºç¡€ä¿¡æ¯
                </el-button>
@@ -755,12 +751,44 @@
                  />
                </div>
              </div>
              <el-form-item label="任务处理状态">
                <el-select
                  v-model="serviceStates"
                  placeholder="请选择状态"
                  clearable
                  style="width: 150px; margin-right: 10px"
                >
                  <el-option
                    v-for="item in serviceState"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  />
                </el-select>
              </el-form-item>
              <!-- éšè®¿å†…容/记录 -->
              <el-form-item
                :label="orgname == '丽水市中医院' ? '随访内容' : '随访记录'"
              >
                <el-input type="textarea" v-model="form.remark"></el-input>
                <!-- å¿«æ·çŸ­è¯­æ ‡ç­¾ -->
                <div style="margin-bottom: 8px">
                  <el-tag
                    v-for="(item, index) in dict.type.quickfollow_up"
                    :key="index"
                    style="margin-right: 8px; cursor: pointer"
                    @click="insertText(item.value)"
                  >
                    {{ item.value }}
                  </el-tag>
                </div>
                <!-- æ–‡æœ¬åŸŸ -->
                <el-input
                  type="textarea"
                  :rows="4"
                  v-model="form.remark"
                  ref="textareaRef"
                  placeholder="可点击上方快捷标签或手动输入"
                ></el-input>
              </el-form-item>
              <!-- éšè®¿æƒ…况 -->
@@ -1205,7 +1233,13 @@
      },
    },
  },
  dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
  dicts: [
    "sys_normal_disable",
    "quickfollow_up",
    "sys_user_sex",
    "sys_yujing",
    "sys_suggest",
  ],
  data() {
    const validatePhone = (rule, value, callback) => {
      if (!value) {
@@ -1230,6 +1264,29 @@
      isEndingCall: false,
      CaldialogVisible: false,
      currentCall: null, // å½“前通话对象
      serviceStates: 6,
      serviceState: [
        {
          value: 2,
          label: "待随访",
        },
        {
          value: 3,
          label: "表单已发送",
        },
        {
          value: 5,
          label: "发送失败",
        },
        {
          value: 6,
          label: "已完成",
        },
        {
          value: 4,
          label: "不执行",
        },
      ],
      // æ–°å¢žåŠŸèƒ½æ•°æ®
      showPatientInfo: true,
      showContinuationCareBtn: false, // æŽ§åˆ¶å»¶ç»­æŠ¤ç†æŒ‰é’®æ˜¾ç¤º
@@ -1275,6 +1332,14 @@
          label: "其他",
          value: "7",
        },
      ],
      quickContents: [
        "病情稳定,继续当前治疗",
        "患者已死亡",
        "患者不需要随访",
        "按时服药,注意休息",
        "饮食清淡,忌辛辣",
        "预约下次复诊",
      ],
      tableDatatop: [], //题目表
      voiceDatatop: [], //题目表
@@ -1506,6 +1571,7 @@
    this.Voicetype = this.$route.query.Voicetype;
    this.visitCount = this.$route.query.visitCount;
    this.serviceType = this.$route.query.serviceType;
    this.orgname = localStorage.getItem("orgname");
    if (this.orgname == "省立同德翠苑院区") {
      this.showContinuationCareBtn = true;
@@ -1588,6 +1654,29 @@
        return "yellow-star"; // è­¦å‘Š - é»„色星号
      }
      return ""; // æ­£å¸¸ - æ— ç‰¹æ®Šæ ·å¼
    },
    insertText(text) {
      const textarea = this.$refs.textareaRef;
      console.log(textarea);
      if (!textarea) return;
      const target = textarea.$el.querySelector("textarea");
      const start = target.selectionStart;
      const end = target.selectionEnd;
      const original = this.form.remark;
      console.log(original, 11);
      // åœ¨å…‰æ ‡å¤„插入,并更新光标位置
      this.form.remark =
        original.substring(0, start) + text + original.substring(end);
      // ä¿æŒç„¦ç‚¹å¹¶ç§»åŠ¨å…‰æ ‡åˆ°æ’å…¥å†…å®¹åŽ
      this.$nextTick(() => {
        target.focus();
        const newPos = start + text.length;
        target.setSelectionRange(newPos, newPos);
      });
    },
    // èŽ·å–é—®å·æ•°æ®
    getsearchrResults(id) {
@@ -1837,7 +1926,7 @@
      savequestiondetail(obj).then((res) => {
        if (res.code == 200) {
          this.$modal.msgSuccess("服务保存成功");
          this.Editsingletasksonyic(6);
          this.Editsingletasksonyic(this.serviceStates);
          const orgName = localStorage.getItem("orgname");
          if (this.form.isVisitAgain != 1 || orgName == "丽水市中医院") {
@@ -2102,7 +2191,7 @@
          this.form = res.rows[0].serviceSubtaskList.find(
            (item) => item.id == this.id
          );
          this.form.remark = this.form.remark || "";
          this.logsheetlist = res.rows[0].serviceSubtaskList;
          this.templateid = this.form.templateid;
          this.selectedTag = this.form.excep;
src/views/followvisit/tasklist/index.vue
@@ -462,6 +462,7 @@
      previewtype: 2, //预览影像随访类型
      total: 0, // æ€»æ¡æ•°
      ImportQuantity: 999, //导影像随访数量
      orgname: null,
      //预览影像随访信息
      previewvalue: {
        username: "这个医生对你怎么样",
@@ -585,6 +586,8 @@
        pageNum: 1,
        pageSize: 10,
        type: 2,
        leaveldeptcodes: [],
        leavehospitaldistrictcodes: [],
        userName: undefined,
        tagid: undefined,
        topic: undefined,
@@ -642,11 +645,14 @@
  },
  watch: {},
  created() {
    // this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
    //   (obj) => obj.deptCode
    // );
    // this.topqueryParams.leavehospitaldistrictcodes =
    //   store.getters.belongWards.map((obj) => obj.districtCode);
    this.orgname = localStorage.getItem("orgname");
    if (this.orgname == "南华大学附属第一医院") {
      this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
        (obj) => obj.deptCode
      );
      this.topqueryParams.leavehospitaldistrictcodes =
        store.getters.belongWards.map((obj) => obj.districtCode);
    }
    this.tasktopic = this.$route.query.tasktopic
      ? this.$route.query.tasktopic
      : this.tasktopic;
@@ -678,6 +684,7 @@
        this.tasktopic == 1 ||
        this.tasktopic == 7 ||
        this.tasktopic == 5 ||
        this.tasktopic == 18 ||
        this.tasktopic == 6
      ) {
        if (!this.topqueryParams.type) this.topqueryParams.type = "2";
@@ -692,7 +699,11 @@
          },
        ];
        // this.topqueryParams.type = 2;
      } else if (this.tasktopic == 4 || this.tasktopic == 8) {
      } else if (
        this.tasktopic == 4 ||
        this.tasktopic == 8 ||
        this.tasktopic == 17
      ) {
        if (!this.topqueryParams.type) this.topqueryParams.type = "3";
        this.longtermlist = [
          {
src/views/knowledge/education/index.vue
@@ -1,6 +1,5 @@
<template>
  <div class="educationmanagement">
    <!-- å·¦ä¾§æ  -->
    <div class="sidecolumn">
      <div class="sidecolumn-top">
@@ -785,9 +784,9 @@
      });
    },
         Newcategory(){
      this.classifyform= {}, //类别表单
      this.radio = "主分类";
     this.dialogFormVisible = true
      (this.classifyform = {}), //类别表单
        (this.radio = "主分类");
      this.dialogFormVisible = true;
     this.zifon = true;
      this.zufon = true;
    },
@@ -800,9 +799,8 @@
        .then((response) => {
          console.log(response.data, "数据"); // è¾“出获取到的文件内容
          this.htmlRichText = response.data;
          // this.htmlRichText = this.addStyleToImages(this.htmlRichText);
          console.log(this.htmlRichText);
          this.htmlRichText = this.addStyleToImages(this.htmlRichText);
          // console.log(this.htmlRichText);
        })
        .catch((error) => {
          this.$modal.msgError("获取富文本失败");
@@ -810,10 +808,21 @@
        });
    },
    addStyleToImages(html) {
      return html.replace(
      if (!html) return html;
      // 1. å…ˆä¿®å¤è·¯å¾„
      let processedHtml = html.replace(
        /\/aifollowup\/aifollowup\//g,
        "/aifollowup/"
      );
      // 2. å†ä¿®å¤æ ·å¼
      processedHtml = processedHtml.replace(
        /<img([^>]*)style=(['"])(?:(?!\2).)*\2([^>]*)>/g,
        '<img$1style="width:100%;height:auto;"$3>'
      );
      return processedHtml;
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
src/views/knowledge/questionbank/particulars/index.vue
@@ -928,28 +928,28 @@
        this.drawer = true;
      });
    },
    //     categoryidChange(id) {
    //   // éåŽ†æ‰€æœ‰åˆ†ç»„ï¼Œåœ¨æ¯ä¸ªåˆ†ç»„çš„ svyLibScriptCategoryList ä¸­æŸ¥æ‰¾
    //   let targetOption = null;
    //   for (const group of this.classifylist) {
    //     targetOption = group.svyLibScriptCategoryList.find(item => item.id == id);
    //     if (targetOption) break;
    //   }
        categoryidChange(id) {
      // éåŽ†æ‰€æœ‰åˆ†ç»„ï¼Œåœ¨æ¯ä¸ªåˆ†ç»„çš„ svyLibScriptCategoryList ä¸­æŸ¥æ‰¾
      let targetOption = null;
      for (const group of this.classifylist) {
        targetOption = group.svyLibScriptCategoryList.find(item => item.id == id);
        if (targetOption) break;
      }
    //   if (targetOption) {
    //     console.log('选中的选项:', targetOption);
    //     // æ³¨æ„ï¼šè¿™é‡Œ targetOption.name æ˜¯é€‰é¡¹åï¼Œå¦‚“住院满意度调查”
    //     if (targetOption.name.includes('住院')) {
    //       this.topicobj.type = "zymyd";
    //     } else if (targetOption.name.includes('门诊')) {
    //       this.topicobj.type = "mzmyd";
    //     } else if (targetOption.name.includes('出院')) {
    //       this.topicobj.type = "cymyd";
    //     } else if (targetOption.name.includes('常用')) {
    //       this.topicobj.type = "cymyd"; // æ³¨æ„ï¼šè¿™é‡Œå’Œâ€œå‡ºé™¢â€é‡å¤äº†ï¼Œç¡®è®¤æ˜¯å¦éœ€åŒºåˆ†
    //     }
    //   }
    // },
      if (targetOption) {
        console.log('选中的选项:', targetOption);
        // æ³¨æ„ï¼šè¿™é‡Œ targetOption.name æ˜¯é€‰é¡¹åï¼Œå¦‚“住院满意度调查”
        if (targetOption.name.includes('住院')) {
          this.topicobj.type = "zymyd";
        } else if (targetOption.name.includes('门诊')) {
          this.topicobj.type = "mzmyd";
        } else if (targetOption.name.includes('出院')) {
          this.topicobj.type = "cymyd";
        } else if (targetOption.name.includes('常用')) {
          this.topicobj.type = "cymyd"; // æ³¨æ„ï¼šè¿™é‡Œå’Œâ€œå‡ºé™¢â€é‡å¤äº†ï¼Œç¡®è®¤æ˜¯å¦éœ€åŒºåˆ†
        }
      }
    },
    // æ–°å¢žæˆ–修改详情
    compileissue() {
      this.$refs["topicobj"].validate((valid) => {
src/views/knowledge/questionnaire/index.vue
@@ -421,7 +421,7 @@
              {{ item.sort }}、[多选]<span>{{ item.scriptContent }}</span>
            </div>
            <div class="dev-xx">
              <el-checkbox-group v-model="qremark">
              <el-checkbox-group v-model="item.qremark">
                <el-checkbox
                  v-for="(items, index) in item.svyLibTemplateTargetoptions"
                  :key="index"
@@ -581,6 +581,11 @@
    goQRCode(row) {
      getQtemplateobj({ svyid: row.svyid }).then((res) => {
        this.topicform = res.rows[0];
        if (this.topicform.svyTemplateLibScripts) {
          this.topicform.svyTemplateLibScripts.forEach(item=>{
            item.qremark=[]
          })
        }
        console.log(this.topicform);
        this.topicVisible = true;
      });
src/views/login-ls.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,322 @@
<template>
  <div class="login">
    <el-form
      ref="loginForm"
      :model="loginForm"
      :rules="loginRules"
      class="login-form"
    >
      <h3 class="title">智慧随访系统</h3>
      <el-form-item prop="username">
        <el-input
          v-model="loginForm.username"
          type="text"
          auto-complete="off"
          placeholder="账号"
        >
          <svg-icon
            slot="prefix"
            icon-class="user"
            class="el-input__icon input-icon"
          />
        </el-input>
      </el-form-item>
      <el-form-item prop="password">
        <el-input
          v-model="loginForm.password"
          type="password"
          auto-complete="off"
          placeholder="密码"
          @keyup.enter.native="handleLogin"
        >
          <svg-icon
            slot="prefix"
            icon-class="password"
            class="el-input__icon input-icon"
          />
        </el-input>
      </el-form-item>
      <!-- ä¸½===================æ°´ -->
      <el-form-item prop="orgid">
        <el-select
          style="width: 100%"
          v-model="loginForm.orgid"
          placeholder="请选择院区"
        >
          <el-option
            v-for="item in options"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
          <i slot="prefix" class="el-icon-mobile"></i>
        </el-select>
      </el-form-item>
      <!-- <el-form-item prop="code" v-if="captchaEnabled">
        <el-input
          v-model="loginForm.code"
          auto-complete="off"
          placeholder="验证码"
          style="width: 63%"
          @keyup.enter.native="handleLogin"
        >
          <svg-icon
            slot="prefix"
            icon-class="validCode"
            class="el-input__icon input-icon"
          />
        </el-input>
        <div class="login-code">
          <img :src="codeUrl" @click="getCode" class="login-code-img" />
        </div>
      </el-form-item> -->
      <el-checkbox
        v-model="loginForm.rememberMe"
        style="margin: 0px 0px 25px 0px"
        >记住密码</el-checkbox
      >
      <el-form-item style="width: 100%">
        <el-button
          :loading="loading"
          size="medium"
          type="primary"
          style="width: 100%"
          @click.native.prevent="handleLogin"
        >
          <span v-if="!loading">登 å½•</span>
          <span v-else>登 å½• ä¸­...</span>
        </el-button>
        <div style="float: right" v-if="register">
          <router-link class="link-type" :to="'/register'"
            >立即注册1</router-link
          >
        </div>
      </el-form-item>
    </el-form>
    <!--  åº•部  -->
    <!-- <div class="el-login-footer">
      <span style="color: #568FBD; font-size: 25px;">Copyright Â© 2018-2022 ruoyi.vip All Rights Reserved.</span>
    </div> -->
  </div>
</template>
<script>
import { getCodeImg } from "@/api/login";
import Cookies from "js-cookie";
import { encrypt, decrypt } from "@/utils/jsencrypt";
import { getorganization } from "@/api/AiCentre/index";
export default {
  name: "Login",
  data() {
    return {
      codeUrl: "",
      loginForm: {
        username: "",
        password: "",
        rememberMe: false,
        code: "",
        orgid: "H41010500003",
      },
      options: [],
      loginRules: {
        username: [
          { required: true, trigger: "blur", message: "请输入您的账号" },
        ],
        password: [
          { required: true, trigger: "blur", message: "请输入您的密码" },
        ],
        orgid: [{ required: true, trigger: "blur", message: "请选择院区" }],
      },
      loading: false,
      // éªŒè¯ç å¼€å…³
      captchaEnabled: true,
      // æ³¨å†Œå¼€å…³
      register: false,
      redirect: undefined,
    };
  },
  watch: {
    $route: {
      handler: function (route) {
        this.redirect = route.query && route.query.redirect;
      },
      immediate: true,
    },
  },
  created() {
    this.getorganization();
    this.getCode();
    this.getCookie();
    // if (localStorage.getItem('orgid')) {
    //   this.loginForm.orgid = localStorage.getItem('orgid');
    // }
  },
  methods: {
    getCode() {
      getCodeImg().then((res) => {
        this.captchaEnabled =
          res.captchaEnabled === undefined ? true : res.captchaEnabled;
        if (this.captchaEnabled) {
          this.codeUrl = "data:image/gif;base64," + res.img;
          this.loginForm.uuid = res.uuid;
        }
      });
    },
    getorganization() {
      getorganization({ pageSize: 30 }).then((res) => {
        if (res.code == 200) {
          this.options = res.rows.map((item) => ({
            value: item.orgid,
            label: item.organizationName,
            campusid: item.organizationID,
          }));
        }
      });
    },
    getCookie() {
      const username = Cookies.get("username");
      const password = Cookies.get("password");
      const rememberMe = Cookies.get("rememberMe");
      this.loginForm = {
        username: username === undefined ? this.loginForm.username : username,
        password:
          password === undefined ? this.loginForm.password : decrypt(password),
        rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
      };
    },
    handleLogin() {
      this.$refs.loginForm.validate((valid) => {
        if (valid) {
          this.loading = true;
          if (this.loginForm.rememberMe) {
            Cookies.set("username", this.loginForm.username, { expires: 30 });
            Cookies.set("password", encrypt(this.loginForm.password), {
              expires: 30,
            });
            Cookies.set("rememberMe", this.loginForm.rememberMe, {
              expires: 30,
            });
          } else {
            Cookies.remove("username");
            Cookies.remove("password");
            Cookies.remove("rememberMe");
          }
          // åŠ¨æ€è®¾ç½® campusid å‚æ•°
          const selectedOrg = this.options.find(
            (item) => item.value === this.loginForm.orgid
          );
          console.log(selectedOrg,'selectedOrg');
          this.loginForm.campusid = selectedOrg.campusid || 1;
          // å¸‚一处理-----------------
          // if (selectedOrg) {
          //   if (selectedOrg.label.includes("湖滨")) {
          //     this.loginForm.campusid = 1;
          //   } else if (selectedOrg.label.includes("吴山")) {
          //     this.loginForm.campusid = 2;
          //   } else {
          //     this.loginForm.campusid = 1; // é»˜è®¤å€¼æˆ–其他处理
          //   }
          // }
          // --------------------------------
          this.$store
            .dispatch("Login", this.loginForm)
            .then((res) => {
              if (this.loginForm.username == "admin") {
                this.$router.push({ path: "/index" }).catch(() => {});
              } else {
                this.$router
                  .push({ path: "/followvisit/discharge" })
                  .catch(() => {});
              }
            })
            .catch(() => {
              this.loading = false;
              if (this.captchaEnabled) {
                this.getCode();
              }
            });
        }
      });
    },
  },
};
</script>
<style rel="stylesheet/scss" lang="scss">
.login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  overflow: hidden !important;
  background-position: center center;
  /* èƒŒæ™¯å›¾ä¸å¹³é“º */
  background-repeat: no-repeat;
  /* å½“内容高度大于图片高度时,背景图像的位置相对于viewport固定 */
  background-attachment: fixed;
  /* è®©èƒŒæ™¯å›¾åŸºäºŽå®¹å™¨å¤§å°ä¼¸ç¼© */
  background-size: cover;
  /* è®¾ç½®èƒŒæ™¯é¢œè‰²ï¼ŒèƒŒæ™¯å›¾åŠ è½½è¿‡ç¨‹ä¸­ä¼šæ˜¾ç¤ºèƒŒæ™¯è‰² */
  background-color: #464646;
  background-image: url("../assets/images/login-background.jpg");
  background-size: cover;
}
.title {
  margin: 0px auto 30px auto;
  text-align: center;
  color: #707070;
}
.login-form {
  border-radius: 6px;
  background: #ffffff;
  width: 400px;
  padding: 25px 25px 5px 25px;
  .el-input {
    height: 38px;
    input {
      height: 38px;
    }
  }
  .input-icon {
    height: 39px;
    width: 14px;
    margin-left: 2px;
  }
}
.login-tip {
  font-size: 13px;
  text-align: center;
  color: #bfbfbf;
}
.login-code {
  width: 33%;
  height: 38px;
  float: right;
  img {
    cursor: pointer;
    vertical-align: middle;
  }
}
.el-login-footer {
  height: 40px;
  line-height: 40px;
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  font-family: Arial;
  font-size: 12px;
  letter-spacing: 1px;
}
.login-code-img {
  height: 38px;
}
</style>
src/views/login.vue
@@ -1,3 +1,5 @@
<template>
  <div class="login">
    <el-form
@@ -37,16 +39,16 @@
        </el-input>
      </el-form-item>
      <!-- ä¸½===================æ°´ -->
      <el-form-item prop="orgid">
      <el-form-item prop="campusid">
        <el-select
          style="width: 100%"
          v-model="loginForm.orgid"
          v-model="loginForm.campusid"
          placeholder="请选择院区"
        >
          <el-option
            v-for="item in options"
            :label="item.label"
            :value="item.value"
            :value="item.campusid"
          >
          </el-option>
          <i slot="prefix" class="el-icon-mobile"></i>
@@ -206,11 +208,11 @@
          // åŠ¨æ€è®¾ç½® campusid å‚æ•°
          const selectedOrg = this.options.find(
            (item) => item.value === this.loginForm.orgid
            (item) => item.campusid === this.loginForm.campusid
          );
          console.log(selectedOrg,'selectedOrg');
          this.loginForm.campusid = selectedOrg.campusid || 1;
          this.loginForm.orgid = selectedOrg.value || 1;
          this.loginForm.orgname = selectedOrg.label || '';
          // å¸‚一处理-----------------
          // if (selectedOrg) {
          //   if (selectedOrg.label.includes("湖滨")) {
src/views/outsideChainxj.vue
@@ -123,10 +123,21 @@
    },
    addStyleToImages(html) {
      return html.replace(
      if (!html) return html;
      // 1. å…ˆä¿®å¤è·¯å¾„
      let processedHtml = html.replace(
        /\/aifollowup\/aifollowup\//g,
        "/aifollowup/"
      );
      // 2. å†ä¿®å¤æ ·å¼
      processedHtml = processedHtml.replace(
        /<img([^>]*)style=(['"])(?:(?!\2).)*\2([^>]*)>/g,
        '<img$1style="width:100%;height:auto;"$3>'
      );
      return processedHtml;
    },
    // åŠ å¯†å‡½æ•°
    encrypt(txt) {
src/views/outsideChainxjnew.vue
@@ -11,11 +11,7 @@
      <div class="preview-left">
        <div class="toptitle">
          <div class="title">
            {{
              taskname
                ? taskname
                : "医护知识宣教"
            }}
            {{ taskname ? taskname : "医护知识宣教" }}
          </div>
          <div style="font-size: 22px; margin-bottom: 20px; line-height: 1.5">
            {{
@@ -160,10 +156,21 @@
      );
    },
    addStyleToImages(html) {
      return html.replace(
      if (!html) return html;
      // 1. å…ˆä¿®å¤è·¯å¾„
      let processedHtml = html.replace(
        /\/aifollowup\/aifollowup\//g,
        "/aifollowup/"
      );
      // 2. å†ä¿®å¤æ ·å¼
      processedHtml = processedHtml.replace(
        /<img([^>]*)style=(['"])(?:(?!\2).)*\2([^>]*)>/g,
        '<img$1style="width:100%;height:auto;"$3>'
      );
      return processedHtml;
    },
    // åŠ å¯†å‡½æ•°
    encrypt(txt) {
src/views/patient/propaganda/Missioncreation.vue
@@ -870,6 +870,8 @@
      questionList: [],
      uploadingData: [],
      deptcodesWards: [], //科室数据
      deptlist: [],
      hosplist: [],
      leavehospitaldistrictcodes: [], //病区数据
      operationcodes: [], //手术数据
      illnesscodes: [], //疾病数据
@@ -1041,6 +1043,10 @@
          "的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,观看这份宣教资讯。",
        jsy: "生活上要劳逸结合,注意休息和营养,适当锻炼,戒烟限酒,保持心情舒畅,定期复诊。那本次宣教内容就到这里,祝您身体健康!",
      },
      queryParamsdept: {
        tempid: "",
        type: 2,
      },
      taskoptions: [
        {
          value: "4",
@@ -1147,7 +1153,7 @@
      this.currenttype = this.$route.query.type;
      this.title = "宣教内容列表";
      this.tableLabel = this.tableLabelxj;
      if (this.form.serviceType == 4) {
      if (this.form.serviceType == 4 || this.form.serviceType == 17) {
        this.checkboxlist = [
          {
            value: "2",
@@ -1362,10 +1368,21 @@
      });
    },
    addStyleToImages(html) {
      return html.replace(
      if (!html) return html;
      // 1. å…ˆä¿®å¤è·¯å¾„
      let processedHtml = html.replace(
        /\/aifollowup\/aifollowup\//g,
        "/aifollowup/"
      );
      // 2. å†ä¿®å¤æ ·å¼
      processedHtml = processedHtml.replace(
        /<img([^>]*)style=(['"])(?:(?!\2).)*\2([^>]*)>/g,
        '<img$1style="width:100%;height:auto;"$3>'
      );
      return processedHtml;
    },
    // å­ä»»åŠ¡äºŒçº§å¼¹æ¡†
@@ -1635,6 +1652,9 @@
                this.time1 = this.form.showTimeMorn.split(",");
              }
            }
            if (this.form.taskid) {
              this.listDept();
            }
            if (this.form.showTimeNoon)
              this.time2 = this.form.showTimeNoon.split(",");
            if (this.form.showTimeNight)
@@ -1721,14 +1741,20 @@
      this.leavehospitaldistrictcodes = [];
      this.deptcodesWards = [];
      this.queryParamsdept.taskId = this.form.taskid;
      console.log(1, this.queryParamsdept);
      taskdepthospgetsonlist(this.queryParamsdept).then((res) => {
        if (res.code == 200) {
          let arr = res.rows;
          arr.forEach((item) => {
            if (item.deptType == 1) {
              console.log(1);
              this.deptlist.push(item);
              this.deptcodesWards.push(item.deptCode);
            } else if (item.deptType == 2) {
              console.log(2, this.hosplist);
              this.hosplist.push(item);
              this.leavehospitaldistrictcodes.push(item.deptCode);
            }
src/views/patient/propaganda/QuestionnaireTask.vue
@@ -1369,6 +1369,7 @@
        this.form.serviceType == 3 ||
        this.form.serviceType == 5 ||
        this.form.serviceType == 16 ||
        this.form.serviceType == 18 ||
        this.form.serviceType == 4
      ) {
        this.checkboxlist = [
src/views/patient/propaganda/particty.vue
@@ -1402,6 +1402,7 @@
        ];
      } else if (
        this.form.serviceType == 2 ||
        this.form.serviceType == 18 ||
        this.form.serviceType == 3 ||
        this.form.serviceType == 16 ||
        this.form.serviceType == 4
src/views/sfstatistics/percentage/components/FirstFollowUp.vue
@@ -111,18 +111,21 @@
                  </template>
                </el-table-column>
                <el-table-column
                 v-if="orgname != '丽水市中医院'"
                  label="人工"
                  align="center"
                  key="manual"
                  prop="manual"
                />
                <el-table-column
                 v-if="orgname != '丽水市中医院'"
                  label="短信"
                  align="center"
                  key="sms"
                  prop="sms"
                />
                <el-table-column
                 v-if="orgname != '丽水市中医院'"
                  label="微信"
                  align="center"
                  key="weChat"
@@ -285,6 +288,7 @@
            </template>
          </el-table-column>
          <el-table-column
          v-if="orgname != '丽水市中医院'"
            label="人工"
            align="center"
            key="manual"
@@ -302,7 +306,7 @@
              </el-button>
            </template>
          </el-table-column>
          <el-table-column label="短信" align="center" key="sms" prop="sms">
          <el-table-column v-if="orgname != '丽水市中医院'" label="短信" align="center" key="sms" prop="sms">
            <template slot-scope="scope">
              <el-button
                size="medium"
@@ -314,6 +318,7 @@
            </template>
          </el-table-column>
          <el-table-column
          v-if="orgname != '丽水市中医院'"
            label="微信"
            align="center"
            key="weChat"
@@ -1117,8 +1122,8 @@
      return isNaN(num) ? null : num;
    },
    selectTimelyRate(row, dateRange) {
      console.log(row, dateRange, 88);
    selectTimelyRate(row, queryParams) {
      console.log(row, queryParams, 88);
      // const params = {
      //   ...this.patientqueryParams,
@@ -1126,9 +1131,20 @@
      //   endtime: this.parseTime(dateRange[1]),
      //   deptcode: row.deptcode,
      // };
      this.patientqueryParams.starttime = this.parseTime(dateRange[0]);
      this.patientqueryParams.endtime = this.parseTime(dateRange[1]);
      this.patientqueryParams.starttime = this.parseTime(
        queryParams.dateRange[0]
      );
      this.patientqueryParams.endtime = this.parseTime(
        queryParams.dateRange[1]
      );
      this.patientqueryParams.deptcode = row.deptcode;
      console.log(1);
      this.patientqueryParams.serviceTypes = queryParams.serviceType
        ? queryParams.serviceType.join(",")
        : null;
      console.log(2);
      return selectTimelyRate(this.patientqueryParams);
    },
    selectTimelyRates(dateRange) {
src/views/sfstatistics/percentage/components/SecondFollowUp.vue
@@ -37,9 +37,9 @@
                <el-table-column label="随访成功" align="center" key="followUpSuccessAgain" prop="followUpSuccessAgain" />
                <el-table-column label="随访失败" align="center" key="followUpFailAgain" prop="followUpFailAgain" />
                <el-table-column label="随访率" align="center" width="120" key="followUpRateAgain" prop="followUpRateAgain" />
                <el-table-column label="人工" align="center" key="manualAgain" prop="manualAgain" />
                <el-table-column label="短信" align="center" key="smsAgain" prop="smsAgain" />
                <el-table-column label="微信" align="center" key="weChatAgain" prop="weChatAgain" />
                <el-table-column  v-if="orgname != '丽水市中医院'" label="人工" align="center" key="manualAgain" prop="manualAgain" />
                <el-table-column  v-if="orgname != '丽水市中医院'" label="短信" align="center" key="smsAgain" prop="smsAgain" />
                <el-table-column  v-if="orgname != '丽水市中医院'" label="微信" align="center" key="weChatAgain" prop="weChatAgain" />
              </el-table-column>
            </el-table>
          </template>
@@ -91,21 +91,21 @@
            </template>
          </el-table-column>
          <el-table-column label="随访率" align="center" width="120" key="followUpRateAgain" prop="followUpRateAgain" />
          <el-table-column label="人工" align="center" key="manualAgain" prop="manualAgain">
          <el-table-column v-if="orgname != '丽水市中医院'" label="人工" align="center" key="manualAgain" prop="manualAgain">
            <template slot-scope="scope">
              <el-button size="medium" type="text" @click="handleViewDetails(scope.row, 'manualAgainInfo', '再次随访人工随访列表')">
                <span class="button-zx">{{ scope.row.manualAgain }}</span>
              </el-button>
            </template>
          </el-table-column>
          <el-table-column label="短信" align="center" key="smsAgain" prop="smsAgain">
          <el-table-column v-if="orgname != '丽水市中医院'" label="短信" align="center" key="smsAgain" prop="smsAgain">
            <template slot-scope="scope">
              <el-button size="medium" type="text" @click="handleViewDetails(scope.row, 'smsAgainInfo', '再次随访短信随访列表')">
                <span class="button-zx">{{ scope.row.smsAgain }}</span>
              </el-button>
            </template>
          </el-table-column>
          <el-table-column label="微信" align="center" key="weChatAgain" prop="weChatAgain">
          <el-table-column v-if="orgname != '丽水市中医院'" label="微信" align="center" key="weChatAgain" prop="weChatAgain">
            <template slot-scope="scope">
              <el-button size="medium" type="text" @click="handleViewDetails(scope.row, 'weChatAgainInfo', '再次随访微信随访列表')">
                <span class="button-zx">{{ scope.row.weChatAgain }}</span>
src/views/sfstatistics/percentage/index.vue
@@ -297,7 +297,7 @@
      this.SeedetailsVisible = true
      this.Seedloading = true
      this.$refs.firstFollowUp.selectTimelyRate(row, this.queryParams.dateRange)
      this.$refs.firstFollowUp.selectTimelyRate(row, this.queryParams)
        .then(response => {
          this.logsheetlist = response.data.detail
          this.patienttotal = response.data.total
src/views/sfstatistics/propaganda/index.vue
@@ -1,112 +1,93 @@
<template>
  <div class="Questionnairemanagement">
    <!-- å·¦ä¾§æ  -->
    <div class="sidecolumn">
      <div class="sidecolumn-top">
        <div class="top-wj">患者范围</div>
      </div>
      <div class="bottom-fl">
        <el-tabs
          tab-position="right"
          v-model="activeName"
          @tab-click="handleClick"
        >
          <el-tab-pane label="全部" name="first"></el-tab-pane>
          <el-tab-pane label="住院" name="bhospitalized"></el-tab-pane>
          <el-tab-pane label="在院" name="Inhospital"></el-tab-pane>
          <el-tab-pane label="门诊" name="outpatient"></el-tab-pane>
          <el-tab-pane label="体检" name="physical"></el-tab-pane>
        </el-tabs>
      </div>
    </div>
    <!-- å³ä¾§æ•°æ® -->
    <div class="leftvlue">
      <div class="leftvlue-top">
        <el-tabs v-model="topactiveName" @tab-click="tophandleClick">
          <el-tab-pane name="Local">
            <span class="mulsz" slot="label">按出院病区统计 </span>
          </el-tab-pane>
          <el-tab-pane name="sharing">
            <span class="mulsz" slot="label">按出院科室统计 </span>
          </el-tab-pane>
        </el-tabs>
      </div>
      <div class="leftvlue-bg">
        <el-row :gutter="20">
          <!--标签数据-->
          <el-col :span="24" :xs="24">
  <div class="education-statistics">
    <!-- æœç´¢åŒºåŸŸ -->
    <div class="search-container">
            <el-form
              :model="queryParams"
              ref="queryForm"
              size="small"
              :inline="true"
              v-show="showSearch"
              label-width="98px"
        label-width="100px"
            >
              <el-form-item label="医院" prop="userName">
        <el-form-item label="统计维度" prop="groupType">
                <el-select
                  v-model="queryParams.value1"
                  placeholder="默认是该账号所属医院"
            v-model="queryParams.groupType"
            placeholder="请选择统计维度"
            @change="handleGroupTypeChange"
            style="width: 180px"
          >
            <el-option label="按科室统计" value="1"></el-option>
            <el-option label="按病区统计" value="2"></el-option>
          </el-select>
          <el-select
            style="margin-left: 10px"
            v-if="queryParams.groupType == '2'"
            v-model="queryParams.hospitaldistrictcodes"
            size="medium"
            multiple
            filterable
            placeholder="请选择病区"
                >
                  <el-option
                    v-for="item in options"
              v-for="item in flatArrayhospit"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
            />
                </el-select>
              </el-form-item>
              <el-form-item label="出院病区" prop="userName">
                <el-select v-model="queryParams.value2" placeholder="请选择">
          <el-select
            v-else-if="queryParams.groupType == '1'"
            v-model="queryParams.deptcodes"
            size="medium"
            multiple
            filterable
            placeholder="请选择科室"
          >
                  <el-option
                    v-for="item in options"
              v-for="item in flatArraydept"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
            />
                </el-select>
              </el-form-item>
              <el-form-item label="管理方案" prop="userName">
                <el-select v-model="queryParams.value3" placeholder="请选择">
                  <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
        <el-form-item label="就诊类型" prop="hospType">
          <el-select
            v-model="queryParams.hospType"
            placeholder="请选择就诊类型"
            clearable
            style="width: 150px"
                  >
                  </el-option>
            <el-option label="门诊" value="1"></el-option>
            <el-option label="出院" value="2"></el-option>
            <el-option label="专病" value="3"></el-option>
            <el-option label="入院/外部导入" value="4"></el-option>
            <el-option label="体检" value="5"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="出院日期" prop="userName">
        <el-form-item label="入院时间" prop="dateRange">
                <el-date-picker
                  v-model="queryParams.valuetime1"
                  align="right"
                  type="date"
                  placeholder="选择日期"
                  :picker-options="pickerOptionsa"
            v-model="queryParams.dateRange"
            type="daterange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            value-format="yyyy-MM-dd"
            style="width: 280px"
            :picker-options="datePickerOptions"
                >
                </el-date-picker>
              </el-form-item>
              <el-form-item label="计划执行日期" prop="userName">
        <el-form-item label="宣教发送时间" prop="visittime">
                <el-date-picker
                  v-model="queryParams.valuetime2"
                  align="right"
            v-model="queryParams.visittime"
                  type="date"
                  placeholder="选择日期"
                  :picker-options="pickerOptions"
                >
                </el-date-picker>
              </el-form-item>
              <el-form-item label="实际完成日期" prop="userName">
                <el-date-picker
                  v-model="queryParams.valuetime2"
                  align="right"
                  type="date"
                  placeholder="选择日期"
                  :picker-options="pickerOptions"
            value-format="yyyy-MM-dd"
            style="width: 180px"
                >
                </el-date-picker>
              </el-form-item>
@@ -117,835 +98,815 @@
                  icon="el-icon-search"
                  size="medium"
                  @click="handleQuery"
            :loading="loading"
                  >搜索</el-button
                >
                <el-button
                  icon="el-icon-refresh"
                  size="medium"
                  @click="resetQuery"
          <el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
                  >重置</el-button
                >
              </el-form-item>
            </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="addladeltag"
                  v-hasPermi="['system:user:add']"
                  >新增</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">
                <div class="documentf">
                  <div class="document">
                    <el-button
                      type="warning"
                      plain
                      icon="el-icon-download"
                      size="medium"
                      @click="handleExport"
                      v-hasPermi="['system:user:export']"
            v-hasPermi="['system:statistics:export']"
                      >导出</el-button
                    >
        </el-form-item>
      </el-form>
                  </div>
    <!-- ç»Ÿè®¡æ•°æ®æ¦‚览 -->
    <div class="summary-cards" v-if="statisticsData.total > 0">
      <el-row :gutter="20">
        <el-col :span="6">
          <div class="summary-card">
            <div class="card-title">发送总量</div>
            <div class="card-value">{{ totalCount }}</div>
            <div class="card-desc">总宣教发送次数</div>
                </div>
              </el-col>
              <!-- <el-col :span="1.5"> </el-col> -->
        <el-col :span="6">
          <div class="summary-card">
            <div class="card-title">发送成功量</div>
            <div class="card-value">{{ sendSuccessCount }}</div>
            <div class="card-desc">已成功发送的宣教</div>
          </div>
        </el-col>
        <el-col :span="6">
          <div class="summary-card">
            <div class="card-title">已读量</div>
            <div class="card-value">{{ readCount }}</div>
            <div class="card-desc">患者已阅读的宣教</div>
          </div>
        </el-col>
        <el-col :span="6">
          <div class="summary-card">
            <div class="card-title">平均发送成功率</div>
            <div class="card-value">{{ avgSendSuccessRate }}%</div>
            <div class="card-desc">整体发送成功比例</div>
          </div>
        </el-col>
            </el-row>
            <!-- <right-toolbar
          :showSearch.sync="showSearch"
          @queryTable="getList"
          :columns="columns"
        ></right-toolbar> -->
    </div>
    <!-- æ•°æ®è¡¨æ ¼ -->
    <div class="table-container">
            <el-table
              v-loading="loading"
              :data="userList"
        :data="statisticsData.list"
              :border="true"
              @selection-change="handleSelectionChange"
        style="width: 100%"
        :default-sort="{ prop: 'totalCount', order: 'descending' }"
        @sort-change="handleSortChange"
            >
              <el-table-column type="selection" width="50" align="center" />
              <el-table-column
                fixed
                label="序号"
                align="center"
                key="tagid"
                prop="tagid"
                width="50"
              />
              <el-table-column
                fixed
                label="出院病区"
                align="center"
                key="tagname"
                prop="tagname"
                width="100"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="宣教"
                align="center"
                key="updateTime"
                prop="updateTime"
              >
        <el-table-column prop="groupName" label="分组名称" align="center" fixed>
          <!-- <template slot-scope="scope">
            <span class="group-name" @click="handleGroupDetail(scope.row)">
              {{ scope.row.groupName }}
            </span>
          </template> -->
              </el-table-column>
              <el-table-column
                label="宣教更新日期"
          prop="groupCode"
          label="分组编码"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="110"
              >
              </el-table-column>
              <el-table-column
                label="管理方案"
                align="center"
                key="isupload"
                prop="isupload"
              >
              </el-table-column>
              <el-table-column
                label="随访任务数"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="100"
              >
              </el-table-column>
              <el-table-column
                label="随访完成数"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="100"
              >
              </el-table-column>
              <el-table-column
                label="随访完成率"
                align="center"
                key="isupload"
                prop="isupload"
                width="100"
              >
              </el-table-column>
              <el-table-column
                label="AI外呼次数"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="100"
              >
              </el-table-column>
              <el-table-column
                label="AI随访完成数"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="120"
              >
              </el-table-column>
              <el-table-column
                label="AI随访完成率"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="120"
              >
              </el-table-column>
              <el-table-column
                label="微信发送次数"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="100"
              >
              </el-table-column>
              <el-table-column
                label="微信随访完成数"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="120"
              >
              </el-table-column>
              <el-table-column
                label="微信随访完成率"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="120"
              >
              </el-table-column>
              <el-table-column
                label="短信发送次数"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="100"
              >
              </el-table-column>
              <el-table-column
                label="短信随访完成数"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="120"
              >
              </el-table-column>
              <el-table-column
                label="短信随访完成率"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="120"
              >
              </el-table-column>
              <el-table-column
                label="人工随访次数"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="100"
              >
              </el-table-column>
              <el-table-column
                label="人工随访完成数"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="120"
              >
              </el-table-column>
              <el-table-column
                label="人工随访完成率"
                align="center"
                key="tagdescription"
                prop="tagdescription"
                width="120"
              >
              </el-table-column>
        ></el-table-column>
              <el-table-column
                label="操作"
          prop="totalCount"
          label="宣教发送总量"
                align="center"
                width="300"
                class-name="small-padding fixed-width"
          sortable="custom"
              >
                <template slot-scope="scope">
                  <el-button
                    size="medium"
                    type="text"
                    @click="handleUpdate(scope.row)"
                    v-hasPermi="['system:user:edit']"
                    ><span class="button-textxg"
                      ><i class="el-icon-s-data"></i>单题统计</span
                    ></el-button
            <span class="count-highlight">{{ scope.row.totalCount }}</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="sendSuccessCount"
          label="发送成功量"
          align="center"
          sortable="custom"
                  >
                  <el-button
                    size="medium"
                    type="text"
                    @click="handleDelete(scope.row)"
                    v-hasPermi="['system:user:remove']"
                    ><span class="button-textsc"
                      ><i class="el-icon-share"></i>随访结果明细</span
                    ></el-button
          <template slot-scope="scope">
            <span class="success-count">{{ scope.row.sendSuccessCount }}</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="readCount"
          label="已读量"
          align="center"
          sortable="custom"
        >
          <template slot-scope="scope">
            <span class="read-count">{{ scope.row.readCount }}</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="sendSuccessRate"
          label="发送成功率"
          align="center"
          width="200"
          sortable="custom"
        >
          <template slot-scope="scope">
            <el-progress
              :percentage="scope.row.sendSuccessRate * 100"
              :stroke-width="8"
              :show-text="false"
              style="width: 80px; margin: 0 auto"
              :color="getRateColor(scope.row.sendSuccessRate)"
            />
            <span class="rate-text"
              >{{ (scope.row.sendSuccessRate * 100).toFixed(1) }}%</span
                  >
                </template>
              </el-table-column>
        <el-table-column
          prop="readRate"
          label="已读率"
          align="center"
          width="200"
          sortable="custom"
        >
          <template slot-scope="scope">
            <el-progress
              :percentage="scope.row.readRate * 100"
              :stroke-width="8"
              :show-text="false"
              style="width: 80px; margin: 0 auto"
              :color="getRateColor(scope.row.readRate)"
            />
            <span class="rate-text"
              >{{ (scope.row.readRate * 100).toFixed(1) }}%</span
            >
          </template>
        </el-table-column>
        <!-- <el-table-column label="操作" align="center" width="200" fixed="right">
          <template slot-scope="scope">
            <el-button
              type="text"
              size="small"
              @click="handleDetail(scope.row)"
              icon="el-icon-document"
              v-hasPermi="['system:statistics:detail']"
              >详细数据</el-button
            >
            <el-button
              type="text"
              size="small"
              @click="handleExportGroup(scope.row)"
              icon="el-icon-download"
              v-hasPermi="['system:statistics:export']"
              >导出</el-button
            >
          </template>
        </el-table-column> -->
            </el-table>
      <!-- åˆ†é¡µ -->
            <pagination
              v-show="total > 0"
              :total="total"
        v-show="statisticsData.total > 0"
        :total="statisticsData.total"
              :page.sync="queryParams.pageNum"
              :limit.sync="queryParams.pageSize"
              @pagination="getList"
            />
    </div>
    <!-- åˆ†ç»„详情弹窗 -->
    <el-dialog
      :title="detailTitle"
      :visible.sync="detailVisible"
      width="80%"
      :before-close="handleCloseDetail"
    >
      <div v-loading="detailLoading">
        <el-row :gutter="20" class="detail-header">
          <el-col :span="6">
            <div class="detail-item">
              <label>分组名称:</label>
              <span>{{ currentGroup.groupName }}</span>
            </div>
          </el-col>
          <el-col :span="6">
            <div class="detail-item">
              <label>分组编码:</label>
              <span>{{ currentGroup.groupCode }}</span>
            </div>
          </el-col>
          <el-col :span="6">
            <div class="detail-item">
              <label>发送成功率:</label>
              <span class="rate-highlight"
                >{{ (currentGroup.sendSuccessRate * 100).toFixed(1) }}%</span
              >
            </div>
          </el-col>
          <el-col :span="6">
            <div class="detail-item">
              <label>已读率:</label>
              <span class="rate-highlight"
                >{{ (currentGroup.readRate * 100).toFixed(1) }}%</span
              >
            </div>
          </el-col>
        </el-row>
        <el-tabs v-model="detailActiveTab" class="detail-tabs">
          <el-tab-pane label="趋势分析" name="trend">
            <!-- è¿™é‡Œå¯ä»¥æ”¾ç½®å›¾è¡¨ç»„ä»¶ -->
            <div class="chart-placeholder">
              è¶‹åŠ¿å›¾è¡¨ï¼ˆå¯æ ¹æ®éœ€æ±‚æŽ¥å…¥ECharts)
      </div>
    </div>
    <!-- å•题展示弹框 -->
    <el-dialog :visible.sync="topicVisible" width="45%">
      <div class="topicdia">
        <div class="top-text">{{ topicvalue.name }}</div>
        <div class="top-mintext">随访完成数{{ topicvalue.number }}</div>
        <div style="overflow-x: hidden; overflow-y: auto; max-height: 65vh">
          <div class="ttaabbcc" v-for="item in topiclist" :key="item.name">
            <div class="describe">
              ç¬¬{{ item.number }}题: {{ item.name }}?<span
                >[{{ item.type == 1 ? "单选题" : "多选题" }}]</span
          </el-tab-pane>
          <el-tab-pane label="明细数据" name="detail">
            <el-table
              :data="detailList"
              border
              style="width: 100%; margin-top: 20px"
              >
            </div>
            <div>
              <el-table :data="tableData" style="width: 100%">
                <el-table-column prop="date" label="问题选项">
                </el-table-column>
                <el-table-column prop="name" label="选择人数">
                </el-table-column>
                <el-table-column prop="address" label="比例"> </el-table-column>
              </el-table>
            </div>
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="topicVisible = false">关 é—­</el-button>
      </span>
    </el-dialog>
    <!-- ç»“果统计弹框 -->
    <el-dialog title="提示" :visible.sync="consequenceVisible" width="50%">
      <div class="topicdia">
        <div class="top-text" style="margin-bottom: 20px">宣教统计结果</div>
        <div>
          <el-table :data="tableData" style="width: 100%">
            <el-table-column prop="date" label="患者姓名"> </el-table-column>
            <el-table-column prop="namea" label="性别"width="100"> </el-table-column>
            <el-table-column prop="namec" label="年龄"> </el-table-column>
            <el-table-column prop="named" label="联系方式"> </el-table-column>
            <el-table-column prop="namee" label="计划执行时间" width="120">
            </el-table-column>
            <el-table-column prop="namex" label="实际完成时间" width="120">
            </el-table-column>
            <el-table-column prop="namez" label="完成方式"> </el-table-column>
            <el-table-column prop="nameh" label="宣教"> </el-table-column>
            <el-table-column prop="namej" label="得分"> </el-table-column>
            <!-- æˆªå–几列选项属性名维护数组遍历 -->
            <!-- <el-table-column prop="namet">
              <template slot="header" slot-scope="scope">
                <div>{{ scope.row.name }}<span>[单选题]</span></div>
              <el-table-column
                prop="patientName"
                label="患者姓名"
                align="center"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="patientNo"
                label="患者编号"
                align="center"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="sendTime"
                label="发送时间"
                align="center"
                width="180"
              ></el-table-column>
              <el-table-column
                prop="readTime"
                label="阅读时间"
                align="center"
                width="180"
              ></el-table-column>
              <el-table-column
                prop="educationTitle"
                label="宣教标题"
                align="center"
              ></el-table-column>
              <el-table-column
                prop="status"
                label="状态"
                align="center"
                width="100"
              >
                <template slot-scope="scope">
                  <el-tag
                    :type="
                      scope.row.status === '已读'
                        ? 'success'
                        : scope.row.status === '发送成功'
                        ? 'info'
                        : 'danger'
                    "
                    size="small"
                  >
                    {{ scope.row.status }}
                  </el-tag>
              </template>
            </el-table-column> -->
              </el-table-column>
          </el-table>
        </div>
          </el-tab-pane>
        </el-tabs>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="consequenceVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="consequenceVisible = false"
          >ç¡® å®š</el-button
        >
        <el-button @click="detailVisible = false">关 é—­</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  toamendtag,
  addapitag,
  deletetag,
  changetagcategory,
  listtag,
} from "@/api/system/label";
import { gethelibraryCount } from "@/api/AiCentre/index";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
  name: "questionnaire",
  dicts: ["sys_normal_disable", "sys_user_sex"],
  components: { Treeselect },
  name: "EducationStatistics",
  data() {
    return {
      topactiveName: "Local", //顶部选择
      activeName: "first",
      // é®ç½©å±‚
      loading: false,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•个禁用
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      idds: "", //分类id
      // æ€»æ¡æ•°
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 1000,
        groupType: "1", // 1-科室,2-病区
        deptcodes: ['all'], // ç§‘室code数组
        hospitaldistrictcodes: [], // ç—…区code数组
        hospType: undefined, // å°±è¯Šç±»åž‹
        starttime: undefined, // å…¥é™¢å¼€å§‹æ—¶é—´
        endtime: undefined, // å…¥é™¢ç»“束时间
        visittime: undefined, // å®£æ•™å‘送时间
        dateRange: [], // å…¥é™¢æ—¶é—´èŒƒå›´
        orderBy: "totalCount", // æŽ’序字段
        order: "descending", // æŽ’序方式
      },
      // ç»Ÿè®¡æ•°æ®
      statisticsData: {
      total: 0,
      lstamendtag: false, //是否修改标签
      topicVisible: false, //控制单题弹框
      consequenceVisible: false, //控制结果弹框
      //修改添加标签弹框数据
      tagform: {
        isupload: "",
        tagname: "",
        tagcategoryid: "",
        tagdescription: "",
        list: [],
      },
      topicvalue: {
        name: "骨科随访模板",
        number: 222,
      },
      classifyform: {
        categoryname: "",
      },
      topiclist: [
        {
          name: "您的身体康复情况如何",
          number: 1,
          type: 1,
        },
        {
          name: "您的饮食情况如何",
          number: 2,
          type: 2,
        },
        {
          name: "您的恢复情况如何",
          number: 3,
          type: 1,
        },
      ],
      tableData: [
        {
          date: "好",
          name: 12,
          address: "50%",
        },
        {
          date: "一般",
          name: 2,
          address: "6.2%",
        },
        {
          date: "å·®",
          name: 0,
          address: "0%",
        },
      ],
      // æ ‡ç­¾è¡¨æ ¼æ•°æ®
      userList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æ—¥æœŸèŒƒå›´
      dateRange: [],
      // å²—位选项
      postOptions: [],
      // è§’色选项
      roleOptions: [],
      // è¡¨å•参数
      form: {},
      forms: {
        name: "",
      },
      numberlb: 22,
      dialogFormVisible: false, //添加、修改类别弹框
      lstamendtagVisible: false, //添加、修改标签弹框
      goQRCodeVisible: false, //二维码弹框
      sidecolumnval: "", //类别搜索
      propss: { multiple: true },
      topqueryParams: {}, //导出筛选条件
      options: [
        {
          value: 1,
          label: "东南",
        },
        {
          value: 2,
          label: "西北",
        },
        {
          value: 3,
          label: "仨仨仨",
        },
        {
          value: 4,
          label: "六飒飒飒",
        },
      ],
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() < Date.now() - 3600 * 1000 * 24;
        },
        shortcuts: [
          {
            text: "今天",
            onClick(picker) {
              picker.$emit("pick", new Date());
            },
          },
          {
            text: "昨天",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", date);
            },
          },
          {
            text: "一周前",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
            },
          },
        ],
      },
      pickerOptionsa: {
      // ä¸‹æ‹‰é€‰é¡¹
      flatArraydept: [],
      flatArrayhospit: [],
      // åŠ è½½çŠ¶æ€
      loading: false,
      detailLoading: false,
      // è¯¦æƒ…弹窗
      detailVisible: false,
      detailTitle: "",
      detailActiveTab: "trend",
      currentGroup: {},
      detailList: [],
      // æ—¥æœŸé€‰æ‹©å™¨é…ç½®
      datePickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now();
        },
        shortcuts: [
          {
            text: "今天",
            text: "最近一周",
            onClick(picker) {
              picker.$emit("pick", new Date());
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "昨天",
            text: "最近一个月",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", date);
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "一周前",
            text: "最近三个月",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit("pick", [start, end]);
            },
          },
        ],
      },
      // æŸ¥è¯¢æ ‡ç­¾åˆ—表参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        tagname: undefined,
        tagdescription: undefined,
      },
      // åˆ—信息
      columns: [
        { key: 0, label: `标签编号`, visible: true },
        { key: 1, label: `标签名称`, visible: true },
        { key: 2, label: `标签昵称`, visible: true },
        { key: 3, label: `部门`, visible: true },
        { key: 4, label: `手机号码`, visible: true },
        { key: 5, label: `状态`, visible: true },
        { key: 6, label: `创建时间`, visible: true },
      ],
      // è¡¨å•校验
      // 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: {},
  computed: {
    // è®¡ç®—总发送量
    totalCount() {
      return this.statisticsData.list.reduce(
        (sum, item) => sum + item.totalCount,
        0
      );
    },
    // è®¡ç®—总发送成功量
    sendSuccessCount() {
      return this.statisticsData.list.reduce(
        (sum, item) => sum + item.sendSuccessCount,
        0
      );
    },
    // è®¡ç®—总已读量
    readCount() {
      return this.statisticsData.list.reduce(
        (sum, item) => sum + item.readCount,
        0
      );
    },
    // è®¡ç®—平均发送成功率
    avgSendSuccessRate() {
      if (this.statisticsData.list.length === 0) return 0;
      const totalRate = this.statisticsData.list.reduce(
        (sum, item) => sum + item.sendSuccessRate,
        0
      );
      return ((totalRate / this.statisticsData.list.length) * 100).toFixed(1);
    },
  },
  created() {
    this.flatArrayhospit = this.$store.getters.belongWards.map((ward) => {
      return {
        label: ward.districtName,
        value: ward.districtCode,
      };
    });
    this.flatArraydept = this.$store.getters.belongDepts.map((dept) => {
      return {
        label: dept.deptName,
        value: dept.deptCode,
      };
    });
    console.log(this.flatArrayhospit,'this.flatArrayhospit');
    this.flatArraydept.push({ label: "全部", value: "all" });
    this.flatArrayhospit.push({ label: "全部", value: "all" });
    this.getList();
    this.gitclasify();
  },
  methods: {
    /** æŸ¥è¯¢æ ‡ç­¾åˆ—表 */
    getList() {
      listtag(this.addDateRange(this.queryParams)).then((response) => {
        console.log(response);
        this.total = response.total;
        this.userList = response.rows;
      });
    },
    /** ä¿®æ”¹æ ‡ç­¾ */
    handleUpdate(row) {
      console.log(row, "修改标签");
      this.lstamendtagVisible = true;
      this.lstamendtag = true;
      this.tagform = {
        isupload: row.isupload,
        tagname: row.tagname,
        tagcategoryid: row.tagcategoryid,
        tagdescription: row.tagdescription,
        tagid: row.tagid,
    // èŽ·å–ç»Ÿè®¡æ•°æ®åˆ—è¡¨
    async getList() {
      this.loading = true;
      try {
        console.log(this.queryParams.hospitaldistrictcodes);
        // æž„建请求参数
        const params = {
          pageNum: this.queryParams.pageNum,
          pageSize: this.queryParams.pageSize,
          hospitaldistrictcodes:
            this.queryParams.hospitaldistrictcodes.includes("all")
              ? this.getAllWardCodes()
              : this.queryParams.hospitaldistrictcodes,
          deptcodes: this.queryParams.deptcodes.includes("all")
            ? this.getAllDeptCodes()
            : this.queryParams.deptcodes,
      };
    },
    addladeltag() {
      this.lstamendtagVisible = true;
      this.lstamendtag = false;
      this.tagform = {
        isupload: "",
        tagname: "",
        tagcategoryid: "",
        tagdescription: "",
        tagid: "",
      };
    },
    // æ·»åŠ /修改标签
    Maintenancetag() {
      if (this.lstamendtag) {
        toamendtag(this.addDateRange(this.tagform)).then((response) => {
          console.log(response);
          this.getList();
        });
      } else {
        addapitag(this.addDateRange(this.tagform)).then((response) => {
          console.log(response);
          this.getList();
        });
        // æ ¹æ®ç»Ÿè®¡ç»´åº¦è®¾ç½®å‚æ•°
        if (this.queryParams.groupType == "1") {
          params.hospitaldistrictcodes = [];
        } else if (this.queryParams.groupType == "2") {
          params.deptcodes = [];
      }
      this.tagform = {
        isupload: "",
        tagname: "",
        tagcategoryid: "",
        tagdescription: "",
        tagid: "",
        // è®¾ç½®æ—¶é—´å‚æ•°
        if (
          this.queryParams.dateRange &&
          this.queryParams.dateRange.length === 2
        ) {
          params.starttime = this.queryParams.dateRange[0];
          params.endtime = this.queryParams.dateRange[1];
        }
        // è®¾ç½®å…¶ä»–参数
        if (this.queryParams.hospType) {
          params.hospType = this.queryParams.hospType;
        }
        if (this.queryParams.visittime) {
          params.visittime = this.queryParams.visittime;
        }
        // è°ƒç”¨æŽ¥å£
        const response = await gethelibraryCount(params);
        this.statisticsData = {
          total: response.total || 0,
          list: response.list || [],
      };
      } catch (error) {
        console.error("获取统计数据失败:", error);
        this.$message.error("获取统计数据失败");
        this.statisticsData = { total: 0, list: [] };
      } finally {
        this.loading = false;
      }
    },
    getAllWardCodes() {
      return this.flatArrayhospit
        .filter((item) => item.value !== "all")
        .map((item) => item.value);
    },
    // è¡¨å•重置
    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");
    getAllDeptCodes() {
      return this.flatArraydept
        .filter((item) => item.value !== "all")
        .map((item) => item.value);
    },
    //单题弹框
    handleUpdate() {
      this.topicVisible = true;
    // ç»Ÿè®¡ç»´åº¦å˜æ›´
    handleGroupTypeChange(value) {
      // åˆ‡æ¢ç»´åº¦æ—¶æ¸…空对应的选择
      if (value === "dept") {
        this.queryParams.hospitaldistrictcodes = [];
      } else if (value === "ward") {
        this.queryParams.deptcodes = [];
      }
    },
    //结果弹框
    handleDelete() {
      this.consequenceVisible = true;
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    // å¤„理搜索
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    // é‡ç½®æœç´¢æ¡ä»¶
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.queryParams.tagname = "";
      this.$refs.tree.setCurrentKey(null);
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.tagid);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
      this.queryParams = {
        pageNum: 1,
        pageSize: 10,
        groupType: "dept",
        deptcodes: [],
        hospitaldistrictcodes: [],
        hospType: undefined,
        starttime: undefined,
        endtime: undefined,
        visittime: undefined,
        dateRange: [],
        orderBy: "totalCount",
        order: "descending",
      };
      this.getList();
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download(
        "base/tag/export",
        {
          ...this.topqueryParams,
    // è¡¨æ ¼æŽ’序
    handleSortChange({ column, prop, order }) {
      if (prop) {
        this.queryParams.orderBy = prop;
        this.queryParams.order = order;
        this.getList();
      }
        },
        `user_${new Date().getTime()}.xlsx`
      );
    // æ ¹æ®æˆåŠŸçŽ‡èŽ·å–è¿›åº¦æ¡é¢œè‰²
    getRateColor(rate) {
      const percentage = rate * 100;
      if (percentage >= 90) return "#67C23A";
      if (percentage >= 80) return "#E6A23C";
      if (percentage >= 60) return "#409EFF";
      return "#F56C6C";
    },
    // æŸ¥çœ‹åˆ†ç»„详情
    handleGroupDetail(row) {
      this.currentGroup = row;
      this.detailTitle = `${row.groupName} - å®£æ•™ç»Ÿè®¡è¯¦æƒ…`;
      this.detailActiveTab = "trend";
      this.detailVisible = true;
      this.loadDetailData();
    },
    // åŠ è½½è¯¦æƒ…æ•°æ®
    async loadDetailData() {
      this.detailLoading = true;
      try {
        // è¿™é‡Œåº”该调用获取详情的接口
        // æ¨¡æ‹Ÿæ•°æ®
        setTimeout(() => {
          this.detailList = [
            {
              patientName: "张三",
              patientNo: "P202312001",
              sendTime: "2023-12-01 10:30:00",
              readTime: "2023-12-01 14:20:00",
              educationTitle: "骨科术后康复指导",
              status: "已读",
            },
            {
              patientName: "李四",
              patientNo: "P202312002",
              sendTime: "2023-12-01 11:15:00",
              readTime: "",
              educationTitle: "心血管疾病预防",
              status: "发送成功",
            },
            {
              patientName: "王五",
              patientNo: "P202312003",
              sendTime: "2023-12-02 09:45:00",
              readTime: "2023-12-02 16:10:00",
              educationTitle: "糖尿病饮食指导",
              status: "已读",
            },
          ];
          this.detailLoading = false;
        }, 500);
      } catch (error) {
        console.error("加载详情数据失败:", error);
        this.$message.error("加载详情数据失败");
        this.detailLoading = false;
      }
    },
    // æŸ¥çœ‹è¯¦æƒ…
    handleDetail(row) {
      this.currentGroup = row;
      this.detailTitle = `${row.groupName} - æ˜Žç»†æ•°æ®`;
      this.detailActiveTab = "detail";
      this.detailVisible = true;
      this.loadDetailData();
    },
    // å¯¼å‡ºå½“前分组数据
    handleExportGroup(row) {
      this.$confirm(`确定要导出 "${row.groupName}" çš„统计数据吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          // è¿™é‡Œè°ƒç”¨å¯¼å‡ºæŽ¥å£
          this.$message.success("导出任务已开始,请稍后在下载中心查看");
        })
        .catch(() => {});
    },
    // å¯¼å‡ºå…¨éƒ¨æ•°æ®
    handleExport() {
      this.$confirm("确定要导出全部统计数据吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          // æž„建导出参数
          const exportParams = { ...this.queryParams };
          delete exportParams.pageNum;
          delete exportParams.pageSize;
          // è¿™é‡Œè°ƒç”¨å¯¼å‡ºæŽ¥å£
          this.$message.success("导出任务已开始,请稍后在下载中心查看");
        })
        .catch(() => {});
    },
    // å…³é—­è¯¦æƒ…弹窗
    handleCloseDetail(done) {
      this.$confirm("确认关闭?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          done();
        })
        .catch(() => {});
    },
  },
};
</script>
<style lang="scss" scoped>
.Questionnairemanagement {
  display: flex;
}
.sidecolumn {
  width: 180px;
  min-height: 100vh;
  text-align: center;
  //   display: flex;
  margin-top: 20px;
  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);
  .sidecolumn-top {
    display: flex;
    justify-content: space-between;
    .top-wj {
      font-size: 20px;
    }
    .top-tj {
      font-size: 18px;
.education-statistics {
  padding: 20px;
  background: #fff;
  min-height: calc(100vh - 84px);
      color: rgb(0, 89, 255);
  .search-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #ebeef5;
  }
  .summary-cards {
    margin-bottom: 20px;
    .summary-card {
      background: #fff;
      border-radius: 8px;
      padding: 20px;
      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
      text-align: center;
      border: 1px solid #ebeef5;
      transition: all 0.3s ease;
      &:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
      }
      .card-title {
        font-size: 14px;
        color: #909399;
        margin-bottom: 10px;
      }
      .card-value {
        font-size: 28px;
        font-weight: 600;
        color: #409eff;
        margin-bottom: 5px;
      }
      .card-desc {
        font-size: 12px;
        color: #c0c4cc;
      }
    }
  }
  .table-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #ebeef5;
    .group-name {
      color: #409eff;
      cursor: pointer;
    }
  }
  .center-ss {
    margin-top: 30px;
    .input-with-select {
      height: 40px !important;
    }
  }
  .bottom-fl {
    margin-top: 30px;
    display: center !important;
  }
}
.topicdia {
  text-align: center;
  margin: 0 20px;
      text-decoration: underline;
      transition: color 0.3s;
  // overflow: scroll;
      &:hover {
        color: #66b1ff;
      }
    }
  .top-text {
    font-size: 25px;
    .count-highlight {
      font-weight: 600;
      color: #606266;
    }
    .success-count {
      color: #67c23a;
    font-weight: 600;
  }
  .top-mintext {
    color: #bdae25;
    font-size: 15px;
    margin: 10px 0;
    .read-count {
      color: #e6a23c;
      font-weight: 600;
  }
  .ttaabbcc {
    // 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);
    margin: 15px 0;
    margin-top: 30px;
    padding: 30px;
  }
  .describe {
    text-align: left;
    margin-bottom: 20px;
    span {
      color: rgb(23, 140, 235);
      margin-left: 5px;
    }
  }
}
::v-deep.el-tabs--left,
.el-tabs--right {
  overflow: hidden;
  align-items: center;
  display: flex;
}
::v-deep.el-input--medium .el-input__inner {
  height: 40px !important;
}
::v-deep.el-tabs--right .el-tabs__active-bar.is-right {
  height: 40px;
  width: 5px;
  left: 0;
}
::v-deep.el-tabs--right .el-tabs__item.is-right {
    .rate-text {
  display: block;
  text-align: left;
  font-size: 20px;
      margin-top: 5px;
      font-size: 12px;
      color: #606266;
    }
}
.leftvlue {
  //   display: flex;
  //   flex: 1;
  width: 80%;
  .detail-header {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    .detail-item {
      label {
        color: #909399;
        font-size: 14px;
      }
      span {
        font-size: 16px;
        font-weight: 500;
        color: #303133;
      }
      .rate-highlight {
        color: #409eff;
        font-weight: 600;
      }
    }
  }
  .detail-tabs {
  margin-top: 20px;
  //   margin: 20px;
  padding: 30px;
  background: #ffff;
  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);
  .mulsz {
    font-size: 20px;
  }
}
.document {
  width: 100px;
  height: 50px;
}
.documentf {
  display: flex;
  justify-content: flex-end;
}
.button-text {
  color: rgb(70, 204, 238);
}
.button-textck {
  color: rgb(39, 167, 67);
}
.button-textxg {
  font-size: 18px;
  color: rgb(35, 81, 233);
}
.button-textsc {
  font-size: 18px;
  color: rgb(23, 140, 235);
  .chart-placeholder {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    color: #909399;
    border: 1px dashed #dcdfe6;
  }
}
// å“åº”式调整
@media (max-width: 1200px) {
  .education-statistics {
    padding: 10px;
  }
  .summary-cards {
    .el-col {
      margin-bottom: 10px;
    }
  }
}
</style>
vue.config.js
@@ -36,11 +36,11 @@
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      [process.env.VUE_APP_BASE_API]: {
        // target: `https://www.health-y.cn/lssf`,
        // target: `http://192.168.100.10:8096`,
        target: `http://192.168.100.10:8096`,
        // target: `http://192.168.100.10:8094`,//省立同德
        // target: `http://192.168.100.10:8095`,//新华
        // target: `http://192.168.100.10:8098`,//市一
        target:`http://localhost:8095`,
        // target:`http://localhost:8095`,
        // target:`http://35z1t16164.qicp.vip`,
        // target: `http://192.168.100.172:8095`,
        // target: `http://192.168.101.166:8093`,