WXL (wul)
3 天以前 5df476ae693d7577c7a0031ae12c67558b9832a7
src/views/patient/questionnaire/index.vue
@@ -64,9 +64,8 @@
    </div> -->
    <statistics-cards
      :cardlist="cardlist"
      :ycvalue="ycvalue"
      :jgvalue="jgvalue"
      :show-warning-condition="orgname == '省立同德翠苑院区'"
      :show-extra="false"
      :show-warning-condition="false"
    />
    <el-row :gutter="20">
      <!--用户数据-->
@@ -258,7 +257,54 @@
          key="remark"
          prop="remark" -->
        />
<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"
@@ -803,39 +849,17 @@
      ],
      cardlist: [
        {
          name: "出院服务总量",
          name: "患者服务总量",
          value: 0,
        },
        {
          name: "患者过滤",
          name: "待随访",
          value: 0,
        },
        {
          name: "应随访",
          name: "已完成",
          value: 0,
        },
        // {
        //   name: "异常",
        //   value: 0,
        // },
        {
          name: "发送失败",
          value: 0,
        },
        {
          name: "待执行",
          value: 0,
        },
        // {
        //   name: "已发送",
        //   value: 0,
        // },
        // {
        //   name: "表单已发送",
        //   value: 0,
        // },
      ],
      // 表单参数
@@ -946,7 +970,7 @@
    async getList(refresh) {
      // 默认全部
      this.applyDeptWardScope();
      if (this.endOut == 0) {
      if (this.endOut == 0 && !this.topqueryParams.endSendDateTime) {
        this.topqueryParams.endSendDateTime = this.formatDateToYYYYMMDDHHMMSS(
          this.getEndOfDay()
        );
@@ -996,12 +1020,8 @@
        if (refresh) {
          this.cardlist[0].value =
            Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
          this.cardlist[1].value = response.rows[0].wxsf || 0;
          this.ycvalue = Number(response.rows[0].yc) || 0;
          this.jgvalue = response.rows[0].jg;
          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.cardlist[1].value = response.rows[0].dsf || 0;
          this.cardlist[2].value = response.rows[0].ywc || 0;
          this.yfsvalue = response.rows[0].yfs;
        }
@@ -1044,6 +1064,35 @@
        this.isRestoring = false;
      }
    },
     applyDeptWardScope() {
      const value = this.topqueryParams.scopetype || [];
      const deptCodes = [];
      const wardCodes = [];
      let isAll = false;
      value.forEach((item) => {
        const type = item[0];
        if (type == 3) {
          isAll = true;
        } else if (type == 1) {
          deptCodes.push(item[item.length - 1]);
        } else if (type == 2) {
          wardCodes.push(item[item.length - 1]);
        }
      });
      // 选了全部 或 未选择 → 用户全部科室/病区
      if (isAll || (!deptCodes.length && !wardCodes.length)) {
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      } else {
        this.topqueryParams.leaveldeptcodes = deptCodes;
        this.topqueryParams.leavehospitaldistrictcodes = wardCodes;
      }
    },
    // 查看影像随访详情
    Referencequestion(row) {
      this.previewVisible = true;