WXL
2025-03-11 0516a6bf61d07b035e1a7c361d1566963a313fdd
src/views/followvisit/discharge/index.vue
@@ -26,7 +26,7 @@
          <div class="ysfleftvlue">
            <el-card shadow="hover">
              <div style="padding: 8px">
                <span>已发送未领取</span>
                <span>表单已发送</span>
                <div
                  style="
                    text-align: center;
@@ -188,6 +188,19 @@
            </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-row>
      <el-table
        v-loading="loading"
@@ -221,32 +234,41 @@
          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
@@ -635,7 +657,7 @@
  resetUserPwd,
  changeUserStatus,
} from "@/api/system/user";
import { getTaskservelist } from "@/api/AiCentre/index";
import { getTaskservelist, buidegetTasklist } from "@/api/AiCentre/index";
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -736,7 +758,7 @@
          value: 0,
        },
        {
          name: "待发送",
          name: "待执行",
          value: 0,
        },
        {
@@ -745,7 +767,7 @@
        },
        // {
        //   name: "已发送未领取",
        //   name: "表单已发送",
        //   value: 0,
        // },
      ],
@@ -775,15 +797,15 @@
      topicoptions: [
        {
          value: 1,
          label: "被领取",
          label: "表单已领取",
        },
        {
          value: 2,
          label: "待发送",
          label: "待执行",
        },
        {
          value: 3,
          label: "已发送未领取",
          label: "表单已发送",
        },
        {
          value: 4,
@@ -866,7 +888,73 @@
        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.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].dfs;
          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;
      });
    },
    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) {
@@ -1003,7 +1091,7 @@
        pageNum: 1,
        pageSize: 10,
        serviceType: 2,
        searchscope: 2,
        searchscope: 3,
      };
      this.handleQuery(1);
    },