WXL (wul)
8 天以前 ffa22cc18c75c0a73a3fd987e2b62fbf55316db2
src/views/followvisit/again/index.vue
@@ -1,67 +1,11 @@
<template>
  <div class="app-container">
    <div class="leftvlue" style="margin-bottom: 20px">
      <el-row :gutter="10">
        <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
          <el-card
            shadow="hover"
            :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
          >
            <div style="padding: 8px" @click="$router.push(item.router)">
              <span>{{ item.name }}</span>
              <div
                style="
                  text-align: center;
                  font-size: 18px;
                  margin-top: 10px;
                  font-weight: 600;
                "
              >
                {{ item.value ? item.value : 0 }}
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="2.5">
          <div class="ysfleftvlue">
            <el-card shadow="hover">
              <div style="padding: 8px">
                <span>表单已发送</span>
                <div
                  style="
                    text-align: center;
                    font-size: 18px;
                    margin-top: 10px;
                    font-weight: 600;
                  "
                >
                  {{ yfsvalue }}
                </div>
              </div>
            </el-card>
          </div>
        </el-col>
        <el-col :span="2.5">
          <div class="errleftvlue">
            <el-card shadow="hover">
              <div style="padding: 8px">
                <span>异常</span>
                <div
                  style="
                    text-align: center;
                    font-size: 18px;
                    margin-top: 10px;
                    font-weight: 600;
                  "
                >
                  {{ ycvalue }}
                </div>
              </div>
            </el-card>
          </div>
        </el-col>
      </el-row>
    </div>
    <statistics-cards
      :cardlist="cardlist"
      :ycvalue="ycvalue"
      :jgvalue="jgvalue"
      :show-warning-condition="orgname == '省立同德翠苑院区'"
    />
    <el-row :gutter="20">
      <!--用户数据-->
      <el-form
@@ -125,16 +69,15 @@
          ></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 label="随访状态" prop="status">
          <el-cascader
            v-model="serviceStatusValue"
            placeholder="请选择"
            :options="serviceStatusOptions"
            :props="cascaderProps"
            @change="handleServiceStatusChange"
            clearable
          ></el-cascader>
        </el-form-item>
        <el-form-item label="排序方式" prop="status">
          <el-select v-model="topqueryParams.sort" placeholder="请选择">
@@ -177,15 +120,15 @@
            </div>
          </div>
        </el-col>
        <el-col :span="1.5">
        <!-- <el-col :span="1.5">
          <el-button
            type="primary"
                        icon="el-icon-plus"
            icon="el-icon-plus"
            size="medium"
            @click="handleAdd"
            >新增</el-button
          >
        </el-col>
        </el-col> -->
        <el-col :span="1.5">
          <div class="documentf">
@@ -245,7 +188,7 @@
          <div class="documentf">
            <div class="document">
              <el-button type="success" size="medium" @click="onthatday()"
                >当日服务</el-button
                >今日服务</el-button
              >
            </div>
          </div>
@@ -280,7 +223,12 @@
              size="medium"
              type="text"
              @click="
                gettoken360(scope.row.sfzh, scope.row.drcode, scope.row.drname)
                gettoken360(
                  scope.row.sfzh,
                  scope.row.drcode,
                  scope.row.drname,
                  scope.row.patid
                )
              "
              ><span class="button-textsc">{{
                scope.row.sendname
@@ -289,10 +237,20 @@
          </template>
        </el-table-column>
        <el-table-column
          label="任务状态"
          label="诊断名称"
          align="center"
          key="sendstate"
          prop="sendstate"
          key="leavediagname"
          prop="leavediagname"
          width="120"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="随访状态"
          align="center"
          key="sendstateView"
          prop="sendstateView"
          width="120"
        >
          <template slot-scope="scope">
@@ -302,32 +260,19 @@
              :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">
              <div v-if="scope.row.sendstateView == 1">
                <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">
              <div v-if="scope.row.sendstateView == 2">
                <el-tag type="success" :disable-transitions="false"
                  >已完成</el-tag
                >
              </div>
              <div v-if="scope.row.sendstateView == 3">
                <el-tag type="warning" :disable-transitions="false"
                  >无需随访</el-tag
                >
              </div>
            </el-tooltip>
@@ -369,7 +314,7 @@
        </el-table-column>
        <el-table-column
          label="出院日期"
          width="200"
          width="146"
          align="center"
          key="endtime"
          prop="endtime"
@@ -380,15 +325,16 @@
        >
        <el-table-column
          label="应随访日期"
          width="200"
          width="146"
          align="center"
          key="longSendTime"
          prop="longSendTime"
          key="visitTime"
          prop="visitTime"
        >
          <template slot-scope="scope">
            <span>{{ formatTime(scope.row.longSendTime) }}</span>
            <span>{{ formatTime(scope.row.visitTime) }}</span>
          </template></el-table-column
        >
        <el-table-column
          label="主治医生"
          width="120"
@@ -468,15 +414,6 @@
        </el-table-column>
        <el-table-column
          label="诊断名称"
          align="center"
          key="leavediagname"
          prop="leavediagname"
          width="120"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="随访人员"
          align="center"
          key="updateBy"
@@ -491,6 +428,55 @@
          prop="templatename"
          width="200"
        />
        <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="任务执行方式"
          align="center"
@@ -644,7 +630,7 @@
            </el-form-item>
          </el-col>
        </el-row>
<el-row >
        <el-row>
          <el-col :span="8">
            <el-form-item label="过滤医生" width="100" prop="filterDrname">
              <el-input
@@ -655,17 +641,22 @@
            </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-row>
  <el-col :span="24">
    <el-form-item label="过滤原因">
      <el-input
        v-model="form.notrequiredreason"
        type="textarea"
        placeholder="请输入过滤原因"
      ></el-input>
      <!-- 提醒文字 -->
      <div class="filter-warning">
        <i class="el-icon-warning-outline"></i>
        该功能适用于死亡、列入医院黑名单、明确拒绝随访等患者的过滤排除,过滤后该患者所有进行中任务全部停止且无法匹配新的随访任务,请谨慎操作!
      </div>
    </el-form-item>
  </el-col>
</el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -835,16 +826,19 @@
  buidegetTasklist,
  addserviceSubtask,
  query360PatInfo,
  query360PatInfonh,
} from "@/api/AiCentre/index";
import { alterpatient, particularpatient } from "@/api/patient/homepage";
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import StatisticsCards from "@/components/StatisticsCards";
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 },
  components: { Treeselect, StatisticsCards },
  data() {
    return {
      // 遮罩层
@@ -900,7 +894,41 @@
      },
      value: [],
      list: [],
      // 级联选择器绑定值
      serviceStatusValue: 10,
      cascaderProps: {
        expandTrigger: "hover", // 悬停展开
        checkStrictly: true, // ✅ 关键:允许选中任意一级
        emitPath: false, // ✅ 只返回选中的值,不返回路径数组
      },
      // 服务状态选项(一级和二级值不冲突)
      serviceStatusOptions: [
        {
          value: null,
          label: "全部",
        },
        {
          value: 10, // 一级:待随访
          label: "待随访",
          children: [
            { value: 1, label: "被领取" },
            { value: 2, label: "待发送" },
            { value: 3, label: "已发送" },
            { value: 5, label: "发送失败" },
            { value: 7, label: "超时" },
          ],
        },
        {
          value: 20, // 一级:已完成
          label: "已完成",
          children: [{ value: 6, label: "已完成" }],
        },
        {
          value: 30, // 一级:无需随访
          label: "无需随访",
          children: [{ value: 4, label: "不执行" }],
        },
      ],
      sourcetype: [
        {
          value: 1,
@@ -920,34 +948,26 @@
      loading: false,
      cardlist: [
        {
          name: "出院服务总量",
          name: "患者服务总量",
          value: 0,
        },
        // {
        //   name: "患者过滤",
        //   value: 0,
        // },
        {
          name: "无需随访",
          value: 0,
        },
        {
          name: "需随访",
          value: 0,
        },
        {
          name: "发送失败",
          value: 0,
        },
        {
          name: "待随访",
          value: 0,
        },
        // {
        //   name: "已发送",
        //   value: 0,
        // },
        // {
        //   name: "表单已发送",
        //   value: 0,
        // },
        {
          name: "已完成",
          value: 0,
        },
      ],
      zcrules: {
        date1: [
@@ -996,14 +1016,14 @@
      topqueryParams: {
        pageNum: 1,
        pageSize: 10,
        sendstate: 2,
        sendstateView:1,
        sort: localStorage.getItem("orgname") == "丽水市中医院" ? 8 : 2, //0 出院时间(正序)    1 出院时间(倒序)   2 发送时间(正序)    3 发送时间(倒序)  7应随访日期(倒序) 应随访日期(正序)
        serviceType: 2,
        searchscope: 3,
        visitCount: 2,
        scopetype: [],
        visitDeptCodes: [],
        leaveldeptcodes:[],
        // leaveldeptcodes:[],
        leavehospitaldistrictcodes: [],
      },
      propss: { multiple: true },
@@ -1016,27 +1036,23 @@
        },
        {
          value: 1,
          label: "表单已领取",
        },
        {
          value: 2,
          label: "待随访",
        },
        {
          value: 2,
          label: "随访中",
        },
        {
          value: 3,
          label: "表单已发送",
          label: "未完成",
        },
        {
          value: 4,
          label: "不执行",
          label: "已完成",
        },
        {
          value: 5,
          label: "发送失败",
        },
        {
          value: 6,
          label: "已完成",
          label: "无需随访",
        },
      ],
      sextype: [
@@ -1142,9 +1158,9 @@
        this.topqueryParams.visitDeptCodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        // this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
        //   (obj) => obj.deptCode
        // );
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
@@ -1158,24 +1174,29 @@
      this.loading = true;
      if (
        this.topqueryParams.leavehospitaldistrictcodes[0] &&
        this.topqueryParams.visitDeptCodes[0]&&this.topqueryParams.leaveldeptcodes[0]
        this.topqueryParams.visitDeptCodes[0]
      ) {
        this.topqueryParams.deptOrDistrict = 2;
        this.topqueryParams.deptOrDistrict = 4;
      } else {
        this.topqueryParams.deptOrDistrict = 1;
      }
      if (!this.followupAuthority()) {
        this.$message.warning("未配置科室/病区相关权限不可查询");
        return Promise.reject(new Error("无权限查询"));
      }
      getTaskservelist(this.topqueryParams).then((response) => {
        this.userList = response.rows[0].serviceSubtaskList;
        this.total = response.total;
        if (refresh) {
          this.cardlist[0].value =
            Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
         this.cardlist[0].value =
            Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
          // this.cardlist[1].value = response.rows[0].wzx;
          this.cardlist[1].value = response.rows[0].ysf;
          this.cardlist[1].value = response.rows[0].wxsf || 0;
          this.ycvalue = response.rows[0].yc;
          this.cardlist[2].value = response.rows[0].fssb;
          this.cardlist[3].value = response.rows[0].dsf;
          // this.cardlist[4].value = response.rows[0].yfs2;
          this.cardlist[2].value = response.rows[0].xsf || 0;
          this.cardlist[3].value = response.rows[0].dsf || 0;
          this.cardlist[4].value = response.rows[0].ywc || 0;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
@@ -1205,7 +1226,7 @@
      });
    },
    affiliation() {
      this.topqueryParams.managementDoctorCode= store.getters.hisUserId;
      this.topqueryParams.managementDoctorCode = store.getters.hisUserId;
      this.getList(1);
    },
@@ -1223,9 +1244,9 @@
        this.topqueryParams.visitDeptCodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
          this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        //   this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
        //   (obj) => obj.deptCode
        // );
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
@@ -1242,14 +1263,14 @@
          this.topqueryParams.leavehospitaldistrictcodes,
        sendstates: [2, 3],
        visitDeptCodes: this.topqueryParams.visitDeptCodes,
        leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
        // leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
      };
      buidegetTasklist(obj).then((response) => {
        this.userList = response.rows[0].serviceSubtaskList;
        this.total = response.total;
        if (refresh) {
          this.cardlist[0].value =
            Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
         this.cardlist[0].value =
            Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
          this.cardlist[1].value = response.rows[0].wzx;
          this.cardlist[2].value = response.rows[0].ysf;
          this.ycvalue = response.rows[0].yc;
@@ -1342,9 +1363,9 @@
        this.topqueryParams.visitDeptCodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        // this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
        //   (obj) => obj.deptCode
        // );
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
@@ -1362,36 +1383,69 @@
      let code = value.slice(-1)[0];
      this.topqueryParams.leavehospitaldistrictcodes = [];
      this.topqueryParams.visitDeptCodes = [];
      this.topqueryParams.leaveldeptcodes = [];
      // this.topqueryParams.leaveldeptcodes = [];
      if (type == 1) {
        this.topqueryParams.visitDeptCodes.push(code);
        this.topqueryParams.leaveldeptcodes.push(code);
        // this.topqueryParams.leaveldeptcodes.push(code);
        this.topqueryParams.leavehospitaldistrictcodes = [];
        this.topqueryParams.searchscope = 1;
      } else if (type == 2) {
        this.topqueryParams.leavehospitaldistrictcodes.push(code);
        this.topqueryParams.visitDeptCodes = [];
        this.topqueryParams.leaveldeptcodes = [];
        // this.topqueryParams.leaveldeptcodes = [];
        this.topqueryParams.searchscope = 2;
      } else {
        this.topqueryParams.searchscope = 3;
      }
    },
    // 随访状态变更处理
    handleServiceStatusChange(value) {
      // 清空选择
      if (value === null || value === undefined || value === "") {
        this.topqueryParams.sendstateView = null;
        this.topqueryParams.sendstate = null;
        return;
      }
      console.log(value, "value");
      // 一级节点的值(大于等于10)
      if (value >= 10) {
        // 选中了一级
        switch (value) {
          case 10:
            this.topqueryParams.sendstateView = 1; // 待随访
            break;
          case 20:
            this.topqueryParams.sendstateView = 2; // 已完成
            break;
          case 30:
            this.topqueryParams.sendstateView = 3; // 无需随访
            break;
        }
        this.topqueryParams.sendstate = null;
      } else {
        // 选中了二级(具体状态)
        this.topqueryParams.sendstateView = null;
        this.topqueryParams.sendstate = value;
      }
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.dateRange = [];
      this.dateRangefs = [];
      this.serviceStatusValue = 10;
      this.topqueryParams = {
        pageNum: 1,
        pageSize: 10,
        sendstate: 2,
        sendstateView:1,
        sort: 2, //0 出院时间(正序)    1 出院时间(倒序)   2 发送时间(正序)    3 发送时间(倒序)
        serviceType: 2,
        searchscope: 3,
        visitCount: 2,
        scopetype: [],
        visitDeptCodes: [],
        leaveldeptcodes:[],
        // leaveldeptcodes:[],
        leavehospitaldistrictcodes: [],
      };
      this.handleQuery(1);
@@ -1433,8 +1487,25 @@
      });
    },
    //患者360跳转
    gettoken360(sfzh, drcode, drname) {
      // // this.$modal.msgWarning('360功能暂未开通');
    gettoken360(sfzh, drcode, drname, id) {
      const orgname = localStorage.getItem("orgname");
      if (orgname == "南华大学附属第一医院") {
        query360PatInfonh(id).then((res) => {
          if (res.data) {
            window.open(res.data, "_blank");
          } else {
            this.$modal.msgWarning("360查询无结果");
          }
        });
        return;
      } else if (
        orgname == "第一人民医院湖滨院区" ||
        orgname == "第一人民医院吴山院区"
      ) {
        let url = `http://192.200.81.189:9100/blj/view?BINGRENID=${id}&YONGHUID=DBA`;
        window.open(url, "_blank");
        return;
      }
      this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
@@ -1479,7 +1550,7 @@
            .then((response) => {
              console.log(response);
            })
              .then(() => {
            .then(() => {
              this.getList(1);
              this.$modal.msgSuccess("患者过滤成功");
            });
@@ -1550,10 +1621,8 @@
    Seedetails(row) {
      let type = "";
      console.log(row, "rwo");
      if (row.preachformson) {
        if (row.preachformson.includes("3")) {
          type = 1;
        }
      if (row.type == 1) {
        type = 1;
      }
      this.$router.push({
        path: "/followvisit/record/detailpage/",
@@ -1648,7 +1717,7 @@
          this.zcform.remark =
            this.zcform.remark + "【" + this.getCurrentTime() + "】";
          let form = structuredClone(this.zcform);
          form.longSendTime = this.formatTime(form.date1);
          form.visitTime = this.formatTime(form.date1);
          form.finishtime = "";
          if (form.resource) {
            if (form.resource == 2) {
@@ -1780,11 +1849,11 @@
  }
}
::v-deep.leftvlue .el-card__body {
  background: #F2F8FF;
  color: #324A9B;
  background: #f2f8ff;
  color: #324a9b;
}
::v-deep.leftvlue .el-card__body:hover {
  background: #3664D9;
  background: #3664d9;
  color: #fff;
  cursor: pointer; /* 鼠标悬浮时变为手形 */
}
@@ -1838,7 +1907,26 @@
    font-size: 24px;
  }
}
.filter-warning {
  margin-top: 8px;
  padding: 10px 14px;
  background: #fff7e6;
  border: 1px solid #ffe58f;
  border-radius: 6px;
  color: #d46b08;
  font-size: 18px;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.filter-warning .el-icon-warning-outline {
  font-size: 16px;
  color: #faad14;
  flex-shrink: 0;
  margin-top: 2px;
}
// 选项字体放大
// ::v-deep.el-checkbox-group {
//   span {