WXL (wul)
3 天以前 5df476ae693d7577c7a0031ae12c67558b9832a7
src/views/patient/ycquestionnaire/index.vue
@@ -1,67 +1,10 @@
<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"
      :show-extra="false"
      :show-warning-condition="false"
    />
    <el-row :gutter="20">
      <!--用户数据-->
      <el-form
@@ -108,16 +51,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>
@@ -154,6 +96,7 @@
                icon="el-icon-upload2"
                size="medium"
                @click="handleExport"
                v-hasPermi="['system:user:export']"
                >导出</el-button
              >
            </div>
@@ -191,7 +134,7 @@
      <el-table
        v-loading="loading"
        :data="userList"
        height="808"
        height="660"
        :row-class-name="tableRowClassName"
        @selection-change="handleSelectionChange"
      >
@@ -207,12 +150,43 @@
        <!-- <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="sendstateView"
          prop="sendstateView"
          width="120"
        >
          <template slot-scope="scope">
            <el-tooltip
              class="item"
              effect="dark"
              :content="scope.row.remark"
              placement="top-start"
            >
              <div v-if="scope.row.sendstateView == 1">
                <el-tag type="primary" :disable-transitions="false"
                  >待随访</el-tag
                >
              </div>
              <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>
          </template>
        </el-table-column>
        <el-table-column
          label="任务状态"
          align="center"
@@ -228,7 +202,7 @@
            </div>
            <div v-if="scope.row.sendstate == 2">
              <el-tag type="primary" :disable-transitions="false"
                >待随访</el-tag
                >待执行</el-tag
              >
            </div>
            <div v-if="scope.row.sendstate == 3">
@@ -247,6 +221,9 @@
            <div v-if="scope.row.sendstate == 6">
              <el-tag type="danger" :disable-transitions="false">已完成</el-tag>
            </div>
            <div v-if="scope.row.sendstate == 7">
              <el-tag type="danger" :disable-transitions="false">超时</el-tag>
            </div>
          </template>
        </el-table-column>
        <!-- <el-table-column
@@ -258,7 +235,7 @@
        />
        <el-table-column
          label="处理意见"
          label="人工处理意见"
          align="center"
          key="suggest"
          prop="suggest"
@@ -274,12 +251,12 @@
        <el-table-column
          label="随访人员"
          align="center"
          key="updateBy"
          prop="updateBy"
          key="createBy"
          prop="createBy"
          width="120"
        />
        <el-table-column
          label="随访完成时间"
          label="随访时间"
          sortable
          align="center"
          prop="finishtime"
@@ -361,7 +338,7 @@
        /> -->
        <!-- <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="sex" prop="sex" /> -->
        <!-- <el-table-column label="床号" align="center" key="badNo" prop="badNo" /> -->
        <el-table-column
          label="科室"
@@ -639,11 +616,12 @@
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import StatisticsCards from "@/components/StatisticsCards";
export default {
  name: "Discharge",
  dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
  components: { Treeselect },
  components: { Treeselect, StatisticsCards },
  data() {
    return {
      // 遮罩层
@@ -656,6 +634,7 @@
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      jgvalue: 0,
      // 总条数
      total: 0,
      // 用户表格数据
@@ -677,9 +656,10 @@
      ruleForm: {
        type: [],
      },
      ycvalue: 0,
      jgvalue: 0,
      dynamicTags: ["选项一", "选项二", "选项三"], //选项
      inputVisible: false,
      ycvalue: "",
      yfsvalue: "",
      inputValue: "",
      preachform: "",
@@ -695,6 +675,7 @@
      },
      value: [],
      list: [],
      orgname: "",
      sourcetype: [
        {
@@ -715,24 +696,7 @@
      loading: false,
      cardlist: [
        {
          name: "出院服务总量",
          value: 0,
        },
        // {
        //   name: "患者过滤",
        //   value: 0,
        // },
        {
          name: "应随访",
          value: 0,
        },
        // {
        //   name: "异常",
        //   value: 0,
        // },
        {
          name: "发送失败",
          name: "患者服务总量",
          value: 0,
        },
        {
@@ -740,14 +704,44 @@
          value: 0,
        },
        {
          name: "已发送",
          name: "已完成",
          value: 0,
        },
      ],
        // {
        //   name: "表单已发送",
        //   value: 0,
        // },
      serviceStatusValue: null,
      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: "不执行" }],
        },
      ],
      // 表单参数
@@ -763,9 +757,10 @@
      topqueryParams: {
        pageNum: 1,
        pageSize: 10,
        serviceType: 9,
        serviceType: 20,
        searchscope: 3,
        sendstate:2,
        sendstateView: null,
        sendstate: null,
        scopetype: [],
        leaveldeptcodes: [],
        leavehospitaldistrictcodes: [],
@@ -780,7 +775,7 @@
        },
        {
          value: 2,
          label: "待随访",
          label: "待执行",
        },
        {
          value: 3,
@@ -824,6 +819,8 @@
    this.errtype = this.$route.query.errtype;
    this.leavehospitaldistrictcode =
      this.$route.query.leavehospitaldistrictcode;
    this.orgname = localStorage.getItem("orgname");
    this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
      return {
        label: dept.deptName,
@@ -866,24 +863,23 @@
        );
        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;
      if (
        this.topqueryParams.leavehospitaldistrictcodes[0] &&
        this.topqueryParams.leaveldeptcodes[0]
      ) {
        this.topqueryParams.deptOrDistrict = 2;
      } else {
        this.topqueryParams.deptOrDistrict = 1;
      }
      this.loading = true;
      getTaskservelist(this.topqueryParams).then((response) => {
        this.userList = response.rows[0].serviceSubtaskList;
        this.total = response.total;
        if (refresh) {
          this.cardlist[0].value =
            Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
          // this.cardlist[1].value = response.rows[0].wzx;
          this.cardlist[1].value = response.rows[0].ysf;
          this.ycvalue = response.rows[0].yc;
          this.cardlist[2].value = response.rows[0].fssb;
          this.cardlist[3].value = response.rows[0].dfs;
          this.cardlist[4].value = response.rows[0].yfs2;
            Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
          this.cardlist[1].value = response.rows[0].dsf || 0;
          this.cardlist[2].value = response.rows[0].ywc || 0;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
@@ -983,6 +979,35 @@
      this.getList(refresh);
    },
    // 随访状态变更处理
    handleServiceStatusChange(value) {
      // 清空选择
      if (value === null || value === undefined || value === "") {
        this.topqueryParams.sendstateView = null;
        this.topqueryParams.sendstate = null;
        return;
      }
      // 一级节点的值(大于等于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;
      }
    },
    // 患者范围处理
    handleChange(value) {
      let type = value[0];
@@ -1005,12 +1030,14 @@
    /** 重置按钮操作 */
    resetQuery() {
      this.dateRange = [];
      this.serviceStatusValue = null;
      this.topqueryParams = {
        pageNum: 1,
        pageSize: 10,
        serviceType: 9,
        serviceType: 20,
        searchscope: 2,
        sendstate:2,
        sendstateView: null,
        sendstate: null,
      };
      this.handleQuery(1);
    },
@@ -1046,7 +1073,7 @@
        path: "/followvisit/QuestionnaireTask",
        query: {
          type: 2,
          serviceType: 9,
          serviceType: 20,
        },
      });
    },
@@ -1180,7 +1207,7 @@
      this.topqueryParams.pageNum = null;
      this.topqueryParams.pageSize = null;
      this.download(
        "smartor/serviceSubtask/patItemExport",
        "smartor/serviceSubtask/export",
        {
          ...this.topqueryParams,
        },