WXL
10 天以前 4413b4649c337dd65e27c7a4be0d5ca1294477ab
src/views/index.vue
@@ -14,14 +14,13 @@
                  text-shadow: 2px 4px 7px rgb(85 132 255 / 50%);
                  color: black;
                "
                ></span
              >
              ></span>
              <span>{{ endatd }} ~ {{ statd }}</span>
            </div>
            <el-row :gutter="20">
              <el-col :span="10">
                <div class="home-user-task-stats">
                  <p>{{ 11231 }}</p>
                  <p>{{ OutpatientData.rs }}</p>
                  <div class="text-color2">
                    <p>门诊就诊量(人次)</p>
                  </div>
@@ -29,7 +28,7 @@
              </el-col>
              <el-col :span="10">
                <div class="home-user-task-stats">
                  <p>{{ 9207 }}</p>
                  <p>{{ OutpatientData.rc }}</p>
                  <div class="text-color2">
                    <p>门诊服务量(人次)</p>
                  </div>
@@ -49,7 +48,7 @@
        <el-col :span="9">
          <div class="grid-content bg-purple headerBox bgc2">
            <div class="title">
              门诊服务
              出院服务
              <span
                style="
                  font-size: 25px;
@@ -57,23 +56,21 @@
                  font-weight: 600;
                  color: red;
                "
                ></span
              >
              ></span>
              <span>{{ endatd }} ~ {{ statd }}</span>
            </div>
            <el-row :gutter="20">
              <el-col :span="10">
                <div class="home-user-task-stats">
                  <p style="color: red">{{ 3453 }}</p>
                  <p style="color: red">{{ DischargeData.rs }}</p>
                </div>
                <div class="text-color2">
                  <p>出院就诊量(人次)</p>
                </div>
              </el-col>
              <el-col :span="10">
                <div class="home-user-task-stats">
                  <p style="color: red">{{ 4213 }}</p>
                  <p style="color: red">{{ DischargeData.rc }}</p>
                  <div class="text-color2">
                    <p>出院服务量(人次)</p>
                  </div>
@@ -131,14 +128,14 @@
                  type="index"
                ></el-table-column>
                <el-table-column
                  prop="skuName"
                  prop="deptname"
                  width="88"
                  class-name="name"
                ></el-table-column>
                <el-table-column prop="count" class-name="count">
                <el-table-column prop="rc" class-name="rc">
                  <template slot-scope="scope">
                    {{ scope.row.count }}次
                    {{ scope.row.rc }}次
                  </template>
                </el-table-column>
              </el-table>
@@ -291,10 +288,12 @@
<script>
import {
  getoutpatientamount,
  getInhospital,
  getBarchart,
  getQtemplateobj,
  getEChartsPatMedOuthospCount,
  getechartsListCountdata,
  getechartsMedOuthospList,
  getechartsMedInhospList,
  getechartsandData,
  getDeptRanking,
} from "@/api/AiCentre/index";
import dayjs from "dayjs";
@@ -311,6 +310,14 @@
      lastHeight: window.innerHeight,
      radio1: "周",
      ticketStatistics: {},
      DischargeData: {
        rs: "",
        rc: "",
      },
      OutpatientData: {
        rs: "",
        rc: "",
      },
      order: "",
      Count: "",
      datatni: [],
@@ -341,9 +348,9 @@
    },
  },
  created() {
    // this.getoutpatientamount();
    // this.getInhospital();
    // this.getBarchart();
    this.getTopdata();
    this.getgraphdata();
    this.getranking();
    this.$nextTick(function () {
      this.getregionAmountCollect();
      this.getnodeCollect();
@@ -369,10 +376,10 @@
      } else {
        this.dyat = 360;
      }
      this.getgraphdata();
      this.getranking();
      this.getTopdata();
      this.getregionAmountCollect();
      // this.getoutpatientamount();
      // this.getInhospital();
      // this.getBarchart();
      this.getnodeCollect();
      this.getSkuTop();
    },
@@ -389,37 +396,79 @@
    },
    // top排行
    async getSkuTop() {
      // const res = await getSkuTop(10, this.endatd, this.statd);
      // this.SkuTop = res.data;
      this.SkuTop = [
        { amount: 0, count: 123, skuId: "0", skuName: "心肺科" },
        { amount: 0, count: 122, skuId: "0", skuName: "肾脏科" },
        { amount: 0, count: 112, skuId: "0", skuName: "泌尿科" },
        { amount: 0, count: 111, skuId: "0", skuName: "男科" },
        { amount: 0, count: 102, skuId: "0", skuName: "妇产科" },
        { amount: 0, count: 98, skuId: "0", skuName: "外科" },
        { amount: 0, count: 89, skuId: "0", skuName: "急诊" },
        { amount: 0, count: 88, skuId: "0", skuName: "器械科" },
        { amount: 0, count: 87, skuId: "0", skuName: "骨科" },
        { amount: 0, count: 67, skuId: "0", skuName: "放射科" },
        { amount: 0, count: 89, skuId: "0", skuName: "急诊" },
        { amount: 0, count: 88, skuId: "0", skuName: "器械科" },
        { amount: 0, count: 87, skuId: "0", skuName: "骨科" },
        { amount: 0, count: 67, skuId: "0", skuName: "放射科1" },
        { amount: 0, count: 67, skuId: "0", skuName: "放射科2" },
      ];
       let Rankingdata = {
        startDate: this.endatd,
        endDate: this.statd,
        cy: 1,
      };
      await getDeptRanking(Rankingdata).then((res) => {
        if (res.code == 200) {
          this.SkuTop=res.rows.sort((a, b) => b.rc - a.rc);
          console.log(this.SkuTop,'this.SkuTop');
        }
      });
      // this.SkuTop = [
      //   { amount: 0, count: 123, skuId: "0", skuName: "心肺科" },
      //   { amount: 0, count: 122, skuId: "0", skuName: "肾脏科" },
      //   { amount: 0, count: 112, skuId: "0", skuName: "泌尿科" },
      //   { amount: 0, count: 111, skuId: "0", skuName: "男科" },
      //   { amount: 0, count: 102, skuId: "0", skuName: "妇产科" },
      //   { amount: 0, count: 98, skuId: "0", skuName: "外科" },
      //   { amount: 0, count: 89, skuId: "0", skuName: "急诊" },
      //   { amount: 0, count: 88, skuId: "0", skuName: "器械科" },
      //   { amount: 0, count: 87, skuId: "0", skuName: "骨科" },
      //   { amount: 0, count: 67, skuId: "0", skuName: "放射科" },
      //   { amount: 0, count: 89, skuId: "0", skuName: "急诊" },
      //   { amount: 0, count: 88, skuId: "0", skuName: "器械科" },
      //   { amount: 0, count: 87, skuId: "0", skuName: "骨科" },
      //   { amount: 0, count: 67, skuId: "0", skuName: "放射科1" },
      //   { amount: 0, count: 67, skuId: "0", skuName: "放射科2" },
      // ];
    },
    // 获取门诊基础数据
    getoutpatientamount() {
      getoutpatientamount().then((res) => {});
    // 获取头部数据
    getTopdata() {
      let hospCountdata = {
        startDate: this.endatd,
        endDate: this.statd,
        cy: 1,
      };
      let Countdata = {
        startDate: this.endatd,
        endDate: this.statd,
        cy: 1,
      };
      // 查询门诊看病人次和人数
      getEChartsPatMedOuthospCount(hospCountdata).then((res) => {
        if (res.code == 200) {
          this.OutpatientData = res.data;
        }
      });
      // 查询出、入院看病人次和人数
      getechartsListCountdata(Countdata).then((res) => {
        if (res.code == 200) {
          this.DischargeData = res.data;
        }
      });
    },
    // 获取就诊数量
    getBarchart() {
      getBarchart().then((res) => {});
    getranking() {
    },
    // 获取总量数量
    getInhospital() {
      getInhospital().then((res) => {});
    // 获取中部线柱图数据
    getgraphdata() {
      let Outhospdata = {
        startDate: this.endatd,
        endDate: this.statd,
        cy: 1,
      };
      let Inhospdata = {
        startDate: this.endatd,
        endDate: this.statd,
        cy: 1,
      };
      getechartsMedOuthospList(Outhospdata).then((res) => {});
      getechartsMedInhospList(Inhospdata).then((res) => {});
    },
    // 获取线状图时间