From e06cd3953ba8a6e0eee11c235bce9ced419a2800 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 03 六月 2026 14:05:08 +0800
Subject: [PATCH] 测试完成

---
 src/views/sfstatistics/percentage/index.vue |  456 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 450 insertions(+), 6 deletions(-)

diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index cab048c..dd731d8 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -1,17 +1,461 @@
 <template>
-  <div>闅忚缁熻</div>
+  <div class="follow-up-statistics">
+    <!-- 鎼滅储琛ㄥ崟鍖哄煙 -->
+    <div class="search-section">
+      <el-form
+        :model="queryParams"
+        ref="queryForm"
+        size="small"
+        :inline="true"
+        v-show="showSearch"
+        label-width="98px"
+      >
+        <el-form-item label="缁熻绫诲瀷" prop="userName">
+          <el-select
+            v-model="queryParams.statisticaltype"
+            placeholder="璇烽�夋嫨缁熻绫诲瀷"
+          >
+            <el-option
+              v-for="item in Statisticallist"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
+          <el-select
+            style="margin-left: 10px"
+            v-if="queryParams.statisticaltype == 1"
+            v-model="queryParams.leavehospitaldistrictcodes"
+            size="medium"
+            multiple
+            filterable
+            placeholder="璇烽�夋嫨鐥呭尯"
+          >
+            <el-option
+              v-for="item in flatArrayhospit"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
+          <el-select
+            v-else-if="queryParams.statisticaltype == 2"
+            v-model="queryParams.deptcodes"
+            size="medium"
+            multiple
+            filterable
+            placeholder="璇烽�夋嫨绉戝"
+          >
+            <el-option
+              v-for="item in flatArraydept"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="鏈嶅姟绫诲瀷" prop="userName">
+          <el-select
+            v-model="queryParams.serviceType"
+            multiple
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label-width="200" label="搴旈殢璁挎椂闂磋寖鍥�" prop="userName">
+          <el-date-picker
+            v-model="queryParams.dateRange"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            type="daterange"
+            range-separator="鑷�"
+            start-placeholder="寮�濮嬫棩鏈�"
+            end-placeholder="缁撴潫鏃ユ湡"
+            :default-time="['00:00:00', '23:59:59']"
+          />
+        </el-form-item>
+
+        <el-form-item>
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            size="medium"
+            @click="handleQuery"
+            >鎼滅储</el-button
+          >
+          <el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
+            >閲嶇疆</el-button
+          >
+        </el-form-item>
+
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="medium"
+          @click="handleExport"
+          >瀵煎嚭</el-button
+        >
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-data-line"
+          size="medium"
+          @click="showChartDialog"
+          >缁熻瓒嬪娍鍥�</el-button
+        >
+      </el-form>
+    </div>
+
+    <!-- Tab鍒囨崲鍖哄煙 -->
+    <div class="tab-section">
+      <el-tabs v-model="activeTab" @tab-click="handleTabClick">
+        <el-tab-pane label="棣栨闅忚" name="first">
+          <FirstFollowUp
+            ref="firstFollowUp"
+            :query-params="queryParams"
+            :flat-array-hospit="flatArrayhospit"
+            :flat-array-dept="flatArraydept"
+            :options="options"
+            :orgname="orgname"
+            @view-details="viewDetails"
+            @see-details="Seedetails"
+          />
+        </el-tab-pane>
+
+        <el-tab-pane label="鍐嶆闅忚" name="second">
+          <SecondFollowUp
+            ref="secondFollowUp"
+            :query-params="queryParams"
+            :flat-array-hospit="flatArrayhospit"
+            :flat-array-dept="flatArraydept"
+            :options="options"
+            :orgname="orgname"
+            @view-details="viewDetails"
+          />
+        </el-tab-pane>
+
+        <el-tab-pane
+          label="寤剁画鎶ょ悊缁熻"
+          name="continued"
+          v-if="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+        >
+          <ContinuedCare
+            ref="continuedCare"
+            :query-params="queryParams"
+            :flat-array-hospit="flatArrayhospit"
+            :flat-array-dept="flatArraydept"
+            :options="options"
+            :orgname="orgname"
+            @view-details="viewDetails"
+          />
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+
+    <!-- 寮圭獥鍖哄煙 -->
+    <ChartDialog
+      :visible="chartDialogVisible"
+      :data="chartData"
+      :active-tab="activeTab"
+      @close="chartDialogVisible = false"
+    />
+
+    <DetailDialog
+      :visible="infotitleVisible"
+      :title="infotitle"
+      :data="infotitlelist"
+      :search-name="searchName"
+      @close="infotitleVisible = false"
+      @search="handleSearch"
+      @details-go="SeedetailsgGo"
+    />
+
+    <TimelyRateDialog
+      :visible="SeedetailsVisible"
+      :loading="Seedloading"
+      :data="logsheetlist"
+      :total="patienttotal"
+      :query-params="patientqueryParams"
+      @close="SeedetailsVisible = false"
+      @search="Seedetailstion"
+      @details-go="SeedetailsgGo"
+    />
+  </div>
 </template>
 
 <script>
+import FirstFollowUp from "./components/FirstFollowUp.vue";
+import SecondFollowUp from "./components/SecondFollowUp.vue";
+import ContinuedCare from "./components/ContinuedCare.vue";
+import ChartDialog from "./components/ChartDialog.vue";
+import DetailDialog from "./components/DetailDialog.vue";
+import TimelyRateDialog from "./components/TimelyRateDialog.vue";
+
+import { getSfStatisticsHyperlink } from "@/api/AiCentre/index";
+
 export default {
-  data() {
-    return {};
+  name: "FollowUpStatistics",
+  components: {
+    FirstFollowUp,
+    SecondFollowUp,
+    ContinuedCare,
+    ChartDialog,
+    DetailDialog,
+    TimelyRateDialog,
   },
+  data() {
+    return {
+      activeTab: "first",
+      orgname: localStorage.getItem("orgname") || "",
+      Statisticallist: [
+        { label: "鐥呭尯缁熻", value: 1 },
+        { label: "绉戝缁熻", value: 2 },
+      ],
+      options: this.$store.getters.tasktypes,
+      queryParams: {
+        serviceType: [2],
+        dateRange: [],
+        statisticaltype: 1,
+        leavehospitaldistrictcodes: ["all"],
+        deptcodes: [],
+      },
+      flatArrayhospit: [],
+      flatArraydept: [],
+      allDeptCodes: [],
+      allWardCodes: [],
+      showSearch: true,
 
-  created() {},
+      // 寮圭獥鐩稿叧鐘舵��
+      chartDialogVisible: false,
+      chartData: [],
+      infotitleVisible: false,
+      SeedetailsVisible: false,
+      searchName: "",
+      infotitle: "",
+      infotitlelist: [],
+      patienttotal: 0,
+      logsheetlist: [],
+      Seedloading: false,
+      patientqueryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+    };
+  },
+  created() {
+    this.getDeptTree();
+    this.loadCurrentTabData();
+  },
+  methods: {
+    getDeptTree() {
+      // 绉戝鍒楄〃
+      this.flatArraydept = this.$store.getters.belongDepts.map((dept) => {
+        return {
+          label: dept.deptName,
+          value: dept.deptCode,
+        };
+      });
+      this.allDeptCodes = this.$store.getters.belongDepts.map(
+        (dept) => dept.deptCode
+      );
 
-  methods: {},
+      // 鐥呭尯鍒楄〃
+      this.flatArrayhospit = this.$store.getters.belongWards.map((ward) => {
+        return {
+          label: ward.districtName,
+          value: ward.districtCode,
+        };
+      });
+      this.allWardCodes = this.$store.getters.belongWards.map(
+        (ward) => ward.districtCode
+      );
+
+      this.flatArraydept.push({ label: "鍏ㄩ儴", value: "all" });
+      this.flatArrayhospit.push({ label: "鍏ㄩ儴", value: "all" });
+    },
+
+    handleTabClick(tab) {
+      this.activeTab = tab.name;
+      this.loadCurrentTabData();
+    },
+
+    loadCurrentTabData() {
+      switch (this.activeTab) {
+        case "first":
+          this.$refs.firstFollowUp.loadData();
+          break;
+        case "second":
+          this.$refs.secondFollowUp.loadData();
+          break;
+        case "continued":
+          this.$refs.continuedCare.loadData();
+          break;
+      }
+    },
+
+    handleQuery() {
+      this.queryParams.startTime = this.parseTime(
+        this.queryParams.dateRange[0]
+      );
+      this.queryParams.endTime = this.parseTime(this.queryParams.dateRange[1]);
+
+      if (this.queryParams.statisticaltype == 1) {
+        this.queryParams.deptcodes = [];
+      } else if (this.queryParams.statisticaltype == 2) {
+        this.queryParams.leavehospitaldistrictcodes = [];
+      }
+
+      this.loadCurrentTabData();
+    },
+
+    resetQuery() {
+      this.queryParams.dateRange = [];
+      this.queryParams.leavehospitaldistrictcodes = [];
+      this.handleQuery();
+    },
+
+    async handleExport() {
+      switch (this.activeTab) {
+        case "first":
+          await this.$refs.firstFollowUp.exportTable();
+          break;
+        case "second":
+          await this.$refs.secondFollowUp.exportTable();
+          break;
+        case "continued":
+          await this.$refs.continuedCare.exportTable();
+          break;
+      }
+    },
+
+    showChartDialog() {
+      this.chartData = this.getCurrentTabData();
+      this.chartDialogVisible = true;
+    },
+
+    getCurrentTabData() {
+      switch (this.activeTab) {
+        case "first":
+          return this.$refs.firstFollowUp.tableData;
+        case "second":
+          return this.$refs.secondFollowUp.tableData;
+        case "continued":
+          return this.$refs.continuedCare.tableData;
+        default:
+          return [];
+      }
+    },
+
+    viewDetails(row, infoKey, title, type) {
+      this.infotitle = title;
+
+      let obj = {
+        hyperLinkInfoType: infoKey,
+        leavehospitaldistrictcodes: this.queryParams.leavehospitaldistrictcodes,
+        serviceType: this.queryParams.serviceType,
+      };
+      if (type == 1) {
+        obj.drcode = row.drcode;
+      }
+      if (this.queryParams.statisticaltype == 1) {
+        obj.leavehospitaldistrictcodes = [row.leavehospitaldistrictcode];
+        obj.deptcodes = [];
+      } else {
+        obj.deptcodes = [row.deptcode];
+        obj.leavehospitaldistrictcodes = [];
+      }
+
+      getSfStatisticsHyperlink(obj).then((response) => {
+        this.infotitlelist = response.data;
+      });
+
+      this.infotitleVisible = true;
+    },
+
+    Seedetails(row) {
+      this.SeedetailsVisible = true;
+      this.Seedloading = true;
+
+      this.$refs.firstFollowUp
+        .selectTimelyRate(row, this.queryParams)
+        .then((response) => {
+          this.logsheetlist = response.data.detail;
+          this.patienttotal = response.data.total;
+          this.Seedloading = false;
+        });
+    },
+
+    Seedetailstion() {
+      console.log(this.patientqueryParams);
+
+      this.$refs.firstFollowUp
+        .selectTimelyRates(this.patientqueryParams)
+        .then((response) => {
+          this.logsheetlist = response.data.detail;
+          this.patienttotal = response.data.total;
+        });
+    },
+
+    SeedetailsgGo(row) {
+      this.SeedetailsVisible = false;
+      let type = "";
+      if (row.preachformson && row.preachformson.includes("3")) {
+        type = 1;
+      }
+      setTimeout(() => {
+        this.$router.push({
+          path: "/followvisit/record/detailpage/",
+          query: {
+            taskid: row.taskid,
+            patid: row.patid,
+            id: row.id,
+            Voicetype: type,
+          },
+        });
+      }, 300);
+    },
+
+    handleSearch() {
+      // 鎼滅储閫昏緫
+    },
+  },
 };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.follow-up-statistics {
+  padding: 20px;
+  background: #ffff;
+  border: 1px solid #dcdfe6;
+  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
+
+  .search-section {
+    margin-bottom: 20px;
+  }
+
+  .tab-section {
+    ::v-deep .el-tabs__header {
+      margin-bottom: 20px;
+    }
+
+    ::v-deep .el-tabs__item {
+      font-size: 16px;
+      padding: 0 20px;
+      height: 40px;
+      line-height: 40px;
+    }
+
+    ::v-deep .el-tabs__active-bar {
+      height: 3px;
+    }
+  }
+}
+</style>

--
Gitblit v1.9.3