WXL (wul)
昨天 acac65122fbac5295e4b7c8eed468e9b9181e366
src/views/Satisfaction/sfstatistics/components/components/SeedetailsDialog.vue
@@ -221,15 +221,12 @@
        <!-- 分页 -->
        <div class="pagination" v-if="patienttotal > 0">
          <el-pagination
            background
            layout="total, sizes, prev, pager, next, jumper"
            :current-page="patientqueryParams.pn"
            :page-size="patientqueryParams.ps"
            :page-sizes="[10, 20, 30]"
          <pagination
            v-show="patienttotal > 0"
            :total="patienttotal"
            @size-change="handleSizeChange"
            @current-change="handlePageChange"
            :page.sync="patientqueryParams.pn"
            :limit.sync="patientqueryParams.ps"
            @pagination="loadData"
          />
        </div>
      </div>
@@ -241,17 +238,17 @@
import { selectTimelyRate } from "@/api/system/user";
export default {
  name: 'SeedetailsDialog',
  dicts: ['sys_yujing', 'sys_suggest'],
  name: "SeedetailsDialog",
  dicts: ["sys_yujing", "sys_suggest"],
  props: {
    rowData: {
      type: Object,
      default: () => ({})
      default: () => ({}),
    },
    queryParams: {
      type: Object,
      default: () => ({})
    }
      default: () => ({}),
    },
  },
  data() {
    return {
@@ -259,8 +256,8 @@
      patientqueryParams: {
        pn: 1,
        ps: 10,
        name: '',
        leavediagname: ''
        name: "",
        leavediagname: "",
      },
      // 加载状态
@@ -270,7 +267,7 @@
      logsheetlist: [],
      // 总条数
      patienttotal: 0
      patienttotal: 0,
    };
  },
@@ -285,17 +282,22 @@
      try {
        const params = {
          ...this.patientqueryParams,
          deptcode: this.rowData.deptcode || '',
          starttime: this.queryParams.dateRange?.[0] ? this.parseTime(this.queryParams.dateRange[0]) : '',
          endtime: this.queryParams.dateRange?.[1] ? this.parseTime(this.queryParams.dateRange[1]) : ''
          deptcode: this.rowData.deptcode || "",
          starttime: this.queryParams.dateRange?.[0]
            ? this.parseTime(this.queryParams.dateRange[0])
            : "",
          endtime: this.queryParams.dateRange?.[1]
            ? this.parseTime(this.queryParams.dateRange[1])
            : "",
        };
        console.log(params, "params");
        const response = await selectTimelyRate(params);
        this.logsheetlist = response.data?.detail || [];
        this.patienttotal = response.data?.total || 0;
      } catch (error) {
        console.error('获取未及时随访详情失败:', error);
        this.$message.error('获取数据失败');
        console.error("获取未及时随访详情失败:", error);
        this.$message.error("获取数据失败");
      } finally {
        this.loading = false;
      }
@@ -312,16 +314,16 @@
      this.patientqueryParams = {
        pn: 1,
        ps: 10,
        name: '',
        leavediagname: ''
        name: "",
        leavediagname: "",
      };
      this.loadData();
    },
    // 处理分页大小变化
    handleSizeChange(size) {
      this.patientqueryParams.ps = size;
      this.patientqueryParams.pn = 1;
      console.log(this.patientqueryParams);
      this.loadData();
    },
@@ -333,19 +335,19 @@
    // 格式化时间
    formatTime(time) {
      if (!time) return '-';
      if (!time) return "-";
      return time;
    },
    // 解析时间
    parseTime(time) {
      if (!time) return '';
      if (!time) return "";
      return time;
    },
    // 查看详情
    handleViewDetail(row) {
      this.$emit('close');
      this.$emit("close");
      let type = "";
      if (row.preachformson && row.preachformson.includes("3")) {
@@ -359,12 +361,12 @@
            taskid: row.taskid,
            patid: row.patid,
            id: row.id,
            Voicetype: type
          }
            Voicetype: type,
          },
        });
      }, 300);
    }
  }
    },
  },
};
</script>