WXL
2 天以前 f3f72565dcacbb464ed70515ed3526237fe36da1
src/views/followvisit/record/index.vue
copy from src/views/patient/medtechnician/SpecializedService.vue copy to src/views/followvisit/record/index.vue
Îļþ´Ó src/views/patient/medtechnician/SpecializedService.vue ¸´ÖÆ
@@ -17,10 +17,48 @@
                  font-weight: 600;
                "
              >
                {{ item.value }}
                {{ 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>
@@ -34,10 +72,10 @@
        v-show="showSearch"
        label-width="98px"
      >
        <el-form-item label="任务组名称">
        <el-form-item label="任务名称">
          <el-input
            v-model="topqueryParams.taskName"
            placeholder="请选择任务组名称"
            placeholder="请选择任务名称"
          ></el-input>
        </el-form-item>
@@ -59,13 +97,21 @@
            placeholder="请输入患者姓名"
          ></el-input>
        </el-form-item>
        <el-form-item label="患者范围" prop="status">
          <el-select
            v-model="topqueryParams.searchscope"
            placeholder="请选择患者范围"
          >
          <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 source"
              v-for="item in topicoptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
@@ -73,11 +119,10 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="任务组状态" prop="status">
          <el-select v-model="topqueryParams.sendstate" placeholder="请选择">
        <el-form-item label="排序方式" prop="status">
          <el-select v-model="topqueryParams.sort" placeholder="请选择">
            <el-option
              v-for="item in topicoptions"
              v-for="item in topicoptionssort"
              :key="item.value"
              :label="item.label"
              :value="item.value"
@@ -91,7 +136,7 @@
            type="primary"
            icon="el-icon-search"
            size="medium"
            @click="handleQuery"
            @click="handleQuery(1)"
            >搜索</el-button
          >
          <el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
@@ -120,7 +165,6 @@
                icon="el-icon-upload2"
                size="medium"
                @click="handleExport"
                v-hasPermi="['system:user:export']"
                >导出</el-button
              >
            </div>
@@ -154,17 +198,38 @@
            </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="success" size="medium" @click="onthatday()"
                >当日服务</el-button
              >
            </div>
          </div>
        </el-col>
      </el-row>
      <el-table
        v-loading="loading"
        :data="userList"
        height="660"
        :row-class-name="tableRowClassName"
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="50" align="center" />
        <el-table-column
          label="任务组名称"
          label="任务名称"
          fixed
          align="center"
          key="taskName"
@@ -174,49 +239,71 @@
        <!-- <el-table-column label="序号" fixed align="center" key="id" prop="id" /> -->
        <el-table-column
          label="姓名"
          fixed
          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="任务组状态"
          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>
            <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="danger" :disable-transitions="false"
                  >已完成</el-tag
                >
              </div>
            </el-tooltip>
          </template>
        </el-table-column>
        <!-- <el-table-column
          label="任务组异常说明"
          label="任务异常说明"
          width="120"
          align="center"
          key="remark"
@@ -224,7 +311,7 @@
        />
        <el-table-column
          label="人工处理意见"
          label="处理意见"
          align="center"
          key="suggest"
          prop="suggest"
@@ -240,12 +327,12 @@
        <el-table-column
          label="随访人员"
          align="center"
          key="createBy"
          prop="createBy"
          key="updateBy"
          prop="updateBy"
          width="120"
        />
        <el-table-column
          label="随访时间"
          label="随访完成时间"
          sortable
          align="center"
          prop="finishtime"
@@ -285,9 +372,7 @@
          prop="endDay"
        >
          <template slot-scope="scope">
            <span>{{
              scope.row.endDay ? scope.row.endDay + "天" : "日期缺失"
            }}</span>
            <span>{{ scope.row.endDay ? scope.row.endDay + "天" : "" }}</span>
          </template>
        </el-table-column>
        <el-table-column
@@ -329,7 +414,7 @@
        /> -->
        <!-- <el-table-column label="年龄" align="center" key="age" prop="age" /> -->
        <!-- <el-table-column label="性别" align="center" key="sex" prop="sex" /> -->
        <!-- <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="科室"
@@ -366,8 +451,7 @@
          width="200"
        />
        <el-table-column
          label="任务组执行方式"
          label="任务执行方式"
          align="center"
          key="preachform"
          prop="preachform"
@@ -375,14 +459,11 @@
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <span v-for="item in scope.row.preachform"
              >{{ item }}、
            </span>
            <span v-for="item in scope.row.preachform">{{ item }}、 </span>
          </template>
        </el-table-column>
        <el-table-column
          label="任务组发送流程"
        <!-- <el-table-column
          label="任务发送流程"
          align="center"
          key="serviceSubtaskRecordList"
          prop="serviceSubtaskRecordList"
@@ -394,19 +475,17 @@
              >{{ item.remark }}、
            </span>
          </template>
        </el-table-column>
        </el-table-column> -->
        <el-table-column
          label="任务组结果说明"
          fixed="right"
          width="120"
          label="任务结果说明"
          width="200"
          align="center"
          key="remark"
          prop="remark"
        >
          <template slot-scope="scope" v-if="scope.row.remark">
            <el-tag
              type="success"
              type="warning"
              v-if="scope.row.sendstate != 5 && scope.row.sendstate != 4"
              >{{ scope.row.remark }}</el-tag
            >
@@ -415,8 +494,8 @@
        </el-table-column>
        <el-table-column
          label="操作"
          fixed="right"
          align="center"
          fixed="right"
          width="200"
          class-name="small-padding fixed-width"
        >
@@ -424,7 +503,7 @@
            <!-- <el-tooltip
              class="item"
              effect="dark"
              content="重新随访"
              content="再次随访"
              placement="top"
            >
              <el-button
@@ -433,13 +512,15 @@
                @click="followupvisit(scope.row)"
                v-hasPermi="['system:user:edit']"
                ><span class="button-bb"
                  ><i class="el-icon-s-promotion"></i></span
              ></el-button>
                  ><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="停止"
              content="暂停服务"
              placement="top"
            >
              <el-button
@@ -447,8 +528,10 @@
                type="text"
                @click="handlestop(scope.row)"
                v-hasPermi="['system:user:edit']"
                ><span class="button-sc"><i class="el-icon-delete"></i></span
              ></el-button>
                ><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"
@@ -467,7 +550,7 @@
        @pagination="getList"
      />
    </el-row>
    <!-- æ·»åŠ æˆ–ä¿®æ”¹é—¨è¯Šéšè®¿å¯¹è¯æ¡† -->
    <!-- æ·»åŠ æˆ–ä¿®æ”¹å½±åƒéšè®¿å¯¹è¯æ¡† -->
    <el-dialog
      :title="title"
      :visible.sync="addalteropen"
@@ -477,7 +560,7 @@
      <el-form ref="form" :model="form" label-width="100px">
        <el-row :gutter="20">
          <el-col :span="12"
            ><el-form-item label="任务组名称">
            ><el-form-item label="任务名称">
              <el-input v-model="form.name"></el-input> </el-form-item
          ></el-col>
        </el-row>
@@ -510,7 +593,7 @@
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="门诊随访要求">
            <el-form-item label="影像随访要求">
              <el-input type="textarea" v-model="form.desc"></el-input>
            </el-form-item>
          </el-col>
@@ -528,7 +611,7 @@
      width="45%"
    >
      <div style="margin-bottom: 20px; color: red">
        ç»Ÿä¸€ä¿®æ”¹å½“天未发送的任务组时间
        ç»Ÿä¸€ä¿®æ”¹å½“天未发送的任务时间
      </div>
      <el-form
@@ -596,6 +679,50 @@
        >
      </span>
    </el-dialog>
    <!-- å†æ¬¡éšè®¿ -->
    <el-dialog title="患者再次随访" :visible.sync="dialogFormVisible">
      <el-form ref="form" :model="zcform" label-width="80px">
        <el-form-item label="患者名称">
          <el-input style="width: 400px" v-model="zcform.name"></el-input>
        </el-form-item>
        <el-form-item label="任务名称">
          <el-input style="width: 400px" v-model="zcform.name"></el-input>
        </el-form-item>
        <el-form-item label="随访方式">
          <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="随访时间" v-if="!zcform.delivery">
          <el-col :span="11">
            <el-date-picker
              type="date"
              placeholder="选择日期"
              v-model="zcform.date1"
              style="width: 100%"
            ></el-date-picker>
          </el-col>
          <el-col class="line" :span="2">-</el-col>
          <el-col :span="11">
            <el-time-picker
              placeholder="选择时间"
              v-model="zcform.date2"
              style="width: 100%"
            ></el-time-picker>
          </el-col>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="dialogFormVisible = false"
          >ç¡® å®š</el-button
        >
      </div>
    </el-dialog>
  </div>
</template>
@@ -609,7 +736,11 @@
  resetUserPwd,
  changeUserStatus,
} from "@/api/system/user";
import { getTaskservelist } from "@/api/AiCentre/index";
import {
  getTaskservelist,
  buidegetTasklist,
  query360PatInfo,
} from "@/api/AiCentre/index";
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -630,12 +761,13 @@
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      dialogFormVisible: false,
      // æ€»æ¡æ•°
      total: 0,
      // ç”¨æˆ·è¡¨æ ¼æ•°æ®
      userList: null,
      // å¼¹å‡ºå±‚标题
      title: "新增门诊随访",
      title: "新增影像随访",
      // æ˜¯å¦æ˜¾ç¤ºä¿®æ”¹ã€æ·»åŠ å¼¹å‡ºå±‚
      addalteropen: false,
      // ä¿®æ”¹å‘送时间对话框
@@ -651,95 +783,113 @@
      ruleForm: {
        type: [],
      },
      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: "1400466972205912064",
            YongHuXM: "JNRMYY",
            ZuZhiJGID: localStorage.getItem("orgid"),
            ZuZhiJGMC: localStorage.getItem("orgname"),
            idp: "lyra",
          },
        },
      },
      zcform: {},
      dynamicTags: ["选项一", "选项二", "选项三"], //选项
      inputVisible: false,
      ycvalue: "",
      yfsvalue: "",
      inputValue: "",
      previewVisible: false, //门诊随访预览弹框
      preachform: "",
      previewVisible: false, //影像随访预览弹框
      radio: "",
      radios: [],
      previewtype: 2, //预览门诊随访类型
      previewtype: 2, //预览影像随访类型
      total: 0, // æ€»æ¡æ•°
      ImportQuantity: 999, //导门诊随访数量
      //预览门诊随访信息
      ImportQuantity: 999, //导影像随访数量
      //预览影像随访信息
      previewvalue: {
        username: "这个医生对你怎么样",
      },
      value: [],
      list: [],
      source: [
        {
          value: 0,
          label: "所属患者",
        },
      sourcetype: [
        {
          value: 1,
          label: "科室患者",
          label: "科室",
          children: [],
        },
        {
          value: 2,
          label: "病区患者",
          label: "病区",
          children: [],
        },
        {
          value: 3,
          label: "全部",
        },
      ],
      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: "被领取",
          name: "待随访",
          value: 0,
        },
        {
          name: "已发送未领取",
          name: "已发送",
          value: 0,
        },
        // {
        //   name: "表单已发送",
        //   value: 0,
        // },
      ],
      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: "",
@@ -753,24 +903,33 @@
      topqueryParams: {
        pageNum: 1,
        pageSize: 10,
        serviceType: 2,
        searchscope: 2,
        serviceType: 13,
        searchscope: 3,
        sendstate: 2,
        sort: 2,
        scopetype: [],
        leaveldeptcodes: [],
        leavehospitaldistrictcodes: [],
      },
      propss: { multiple: true },
      options: [],
      topicoptions: [
        {
          value: null,
          label: "全部",
        },
        {
          value: 1,
          label: "被领取",
          label: "表单已领取",
        },
        {
          value: 2,
          label: "待发送",
          label: "待随访",
        },
        {
          value: 3,
          label: "已发送未领取",
          label: "表单已发送",
        },
        {
          value: 4,
@@ -795,6 +954,26 @@
          label: "正常",
        },
      ],
      topicoptionssort: [
        {
          value: 0,
          label: "出院时间(正序)",
        },
        {
          value: 1,
          label: "出院时间(倒序)",
        },
        {
          value: 2,
          label: "发送时间(正序)",
        },
        {
          value: 3,
          label: "发送时间(倒序)",
        },
      ],
      errtype: "",
      leavehospitaldistrictcode: "",
      serviceState: [],
      checkboxlist: [],
      // è¡¨å•校验
@@ -805,59 +984,176 @@
  created() {
    this.serviceState = store.getters.serviceState;
    this.checkboxlist = store.getters.checkboxlist;
    this.getList();
    this.errtype = this.$route.query.errtype;
    this.leavehospitaldistrictcode =
      this.$route.query.leavehospitaldistrictcode;
    this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
      return {
        label: dept.deptName,
        value: dept.deptCode,
      };
    });
    this.sourcetype[1].children = store.getters.belongWards.map((dept) => {
      return {
        label: dept.districtName,
        value: dept.districtCode,
      };
    });
    if (this.errtype) {
      this.toleadExport(2);
    } else {
      this.getList(1);
    }
    this.getConfigKey("sys.user.initPassword").then((response) => {
      this.initPassword = response.msg;
    });
  },
  activated() {
    this.getList();
    this.getList(1);
  },
  methods: {
    /** æŸ¥è¯¢é—¨è¯Šéšè®¿æœåŠ¡åˆ—è¡¨ */
    getList() {
      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 {
    /** æŸ¥è¯¢å½±åƒéšè®¿æœåŠ¡åˆ—è¡¨ */
    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.errtype) {
        this.topqueryParams.leavehospitaldistrictcodes.push(
          this.leavehospitaldistrictcode
        );
        console.log(this.topqueryParams.leavehospitaldistrictcodes, "11");
      }
      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.cardlist[0].value =
          Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
        this.cardlist[1].value = response.rows[0].ysf;
        this.cardlist[2].value = response.rows[0].wzx;
        this.cardlist[3].value = response.rows[0].yc;
        this.cardlist[4].value = response.rows[0].fssb;
        this.cardlist[5].value = response.rows[0].blq;
        this.cardlist[6].value = response.rows[0].yfs;
        this.total = response.total;
        if (refresh) {
          this.cardlist[0].value =
            Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
          // this.cardlist[1].value = response.rows[0].wzx;
          this.cardlist[1].value = response.rows[0].ysf;
          this.ycvalue = response.rows[0].yc;
          this.cardlist[2].value = response.rows[0].fssb;
          this.cardlist[3].value = response.rows[0].dsf;
          this.cardlist[4].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
        this.userList.forEach((item) => {
          let idArray = null;
          if (item.endtime) {
            item.endDay = this.daysBetween(item.endtime);
          }
          const 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;
          });
          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;
      });
    },
    //患者360跳转
    gettoken360(sfzh, drcode, drname) {
      this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
      if (this.postData.XiaoXiTou.ZuHuMC == "丽水市中医院") {
        this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
        this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
      }
      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查询无结果");
        }
      });
    },
    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;
        if (refresh) {
          this.cardlist[0].value =
            Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
          this.cardlist[1].value = response.rows[0].wzx;
          this.cardlist[2].value = response.rows[0].ysf;
          this.ycvalue = response.rows[0].yc;
          this.cardlist[3].value = response.rows[0].fssb;
          this.cardlist[4].value = response.rows[0].dsf;
          this.cardlist[5].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
        this.userList.forEach((item) => {
          let idArray = null;
          if (item.endtime) {
            item.endDay = this.daysBetween(item.endtime);
          }
          if (item.preachform) {
            if (item.endtime) {
              item.preachformson = item.preachform;
              idArray = item.preachform.split(",");
            }
            item.preachform = idArray.map((value) => {
              // æŸ¥æ‰¾id对应的对象
              const item = this.checkboxlist.find(
                (item) => item.value == value
              );
              // å¦‚果找到对应的id,返回label值,否则返回null
              return item ? item.label : null;
            });
          }
        });
        this.total = response.total;
      });
    },
    // æŸ¥çœ‹é—¨è¯Šéšè®¿è¯¦æƒ…
@@ -878,7 +1174,7 @@
        this.options = [];
      }
    },
    // é—¨è¯Šéšè®¿çŠ¶æ€ä¿®æ”¹
    // å½±åƒéšè®¿çŠ¶æ€ä¿®æ”¹
    handleStatusChange(row) {
      let text = row.status === "0" ? "启用" : "停用";
      this.$modal
@@ -917,17 +1213,8 @@
      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 {
    handleQuery(refresh) {
      if (this.topqueryParams.searchscope == 3) {
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
@@ -938,7 +1225,26 @@
      this.topqueryParams.startOutHospTime = this.dateRange[0];
      this.topqueryParams.endOutHospTime = this.dateRange[1];
      this.getList();
      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() {
@@ -946,10 +1252,15 @@
      this.topqueryParams = {
        pageNum: 1,
        pageSize: 10,
        serviceType: 2,
        serviceType: 13,
        sort: 2,
        searchscope: 2,
        sendstate: 2,
        scopetype: [],
        leaveldeptcodes: [],
        leavehospitaldistrictcodes: [],
      };
      this.handleQuery();
      this.handleQuery(1);
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
@@ -968,6 +1279,15 @@
        this.$refs.saveTagInput.$refs.input.focus();
      });
    },
    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
    },
    //获取失去焦点触发
    handleInputConfirm() {
      let inputValue = this.inputValue;
@@ -983,7 +1303,7 @@
        path: "/followvisit/QuestionnaireTask",
        query: {
          type: 2,
          serviceType: 2,
          serviceType: 13,
        },
      });
    },
@@ -1013,13 +1333,13 @@
            updateUser(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
              this.getList(1);
            });
          } else {
            addUser(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
              this.getList(1);
            });
          }
        }
@@ -1034,7 +1354,7 @@
          return delUser(userIds);
        })
        .then(() => {
          this.getList();
          this.getList(1);
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
@@ -1042,12 +1362,12 @@
    // å…¨éƒ¨åœæ­¢
    AllStop() {
      this.$modal
        .confirm("是否停止全部任务组?")
        .confirm("是否停止全部任务?")
        .then(function () {
          return console.log("停止成功");
        })
        .then(() => {
          this.getList();
          this.getList(1);
          this.$modal.msgWarning("停止成功");
        })
        .catch(() => {});
@@ -1055,25 +1375,25 @@
    // å…¨éƒ¨å¼€å§‹
    AllStarted() {
      this.$modal
        .confirm("是否开启全部任务组?")
        .confirm("是否开启全部任务?")
        .then(function () {
          return console.log("开启成功");
        })
        .then(() => {
          this.getList();
          this.getList(1);
          this.$modal.msgSuccess("开启成功");
        })
        .catch(() => {});
    },
    // ä»»åŠ¡ç»„é‡ç½®
    // ä»»åŠ¡é‡ç½®
    TaskReset() {
      this.$modal
        .confirm("是否重置选中的任务组项?")
        .confirm("是否重置选中的任务项?")
        .then(function () {
          return console.log("选中成功");
        })
        .then(() => {
          this.getList();
          this.getList(1);
          this.$modal.msgSuccess("重置成功");
        })
        .catch(() => {});
@@ -1084,10 +1404,59 @@
    },
    // è·³è½¬è¯¦æƒ…页
    Seedetails(row) {
      let type = "";
      console.log(row, "rwo");
      if (row.preachformson) {
        if (row.preachformson.includes("3")) {
          type = 1;
          console.log(type, "rwo");
        }
      }
      this.$router.push({
        path: "/followvisit/record/detailpage/",
        query: { taskid: row.taskid, patid: row.patid, id: row.id },
        query: {
          taskid: row.taskid,
          patid: row.patid,
          id: row.id,
          Voicetype: type,
          again: 1,
        },
      });
    },
    // å†æ¬¡éšè®¿
    followupvisit() {
      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(() => {});
    },
    // ä¾¿æ·æŒ‰é’®
    toleadExport(too) {
@@ -1101,8 +1470,11 @@
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.topqueryParams.pageNum = null;
      this.topqueryParams.pageSize = null;
      this.download(
        "system/user/export",
        // "smartor/serviceSubtask/export",
        "smartor/serviceSubtask/patItemExport",
        {
          ...this.topqueryParams,
        },
@@ -1219,6 +1591,21 @@
  background: #8dc8f8;
  cursor: pointer; /* é¼ æ ‡æ‚¬æµ®æ—¶å˜ä¸ºæ‰‹å½¢ */
}
::v-deep.errleftvlue .el-card__body {
  background: #fdd0d7;
}
::v-deep.errleftvlue .el-card__body:hover {
  background: #f88d96;
  cursor: pointer; /* é¼ æ ‡æ‚¬æµ®æ—¶å˜ä¸ºæ‰‹å½¢ */
}
::v-deep.ysfleftvlue .el-card__body {
  background: #d0fdd8;
}
::v-deep.ysfleftvlue .el-card__body:hover {
  background: #8df8a4;
  cursor: pointer; /* é¼ æ ‡æ‚¬æµ®æ—¶å˜ä¸ºæ‰‹å½¢ */
}
.button-bb {
  font-weight: 500;
  background-color: #2ba05c;
@@ -1235,7 +1622,7 @@
}
.button-sc {
  font-weight: 500;
  background-color: #dd302a;
  background-color: #b3a21f;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;