From c6a61bf9bf4d1ae57098aa26dcf2448ce6bb80e4 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 05 九月 2025 10:16:43 +0800
Subject: [PATCH] 测试完成
---
src/views/index.vue | 1236 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 1,171 insertions(+), 65 deletions(-)
diff --git a/src/views/index.vue b/src/views/index.vue
index 26519f3..ac2876e 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -1,87 +1,1193 @@
<template>
- <div class="app-container home">
-
+ <div id="home">
+ <div class="home" style="margin-top: 40px; margin-left: 20px">
+ <!-- 澶撮儴涓や釜 -->
+ <el-row :gutter="20">
+ <el-col :span="11">
+ <!-- 灏辫瘖缁熻鐩掑瓙 -->
+ <div class="grid-content bg-purple headerBox bgc1">
+ <div class="title">
+ 闂ㄨ瘖鏈嶅姟<span
+ style="
+ font-size: 25px;
+ font-weight: 600;
+ text-shadow: 2px 4px 7px rgb(85 132 255 / 50%);
+ color: black;
+ "
+ ></span>
+ <span>{{ endatd }} ~ {{ statd }}</span>
+ </div>
+ <el-row :gutter="20">
+ <el-col :span="10">
+ <div class="home-user-task-stats">
+ <p>{{ OutpatientData.rc }}</p>
+ <div class="text-color2">
+ <p>闂ㄨ瘖灏辫瘖閲忥紙浜烘锛�</p>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="10">
+ <div class="home-user-task-stats">
+ <p>{{ OutpatientData.rs }}</p>
+ <div class="text-color2">
+ <p>闂ㄨ瘖鏈嶅姟閲忥紙浜烘锛�</p>
+ </div>
+ </div>
+ </el-col>
+ <!-- <el-col :span="7">
+ <div class="home-user-task-stats">
+ <p>{{ 1209 }}</p>
+ <div class="text-color2">
+ <p>浣撴鎬绘暟锛堜汉锛�</p>
+ </div>
+ </div>
+ </el-col> -->
+ </el-row>
+ </div>
+ </el-col>
+ <el-col :span="9">
+ <div class="grid-content bg-purple headerBox bgc2">
+ <div class="title">
+ 鍑洪櫌鏈嶅姟
+ <span
+ style="
+ font-size: 25px;
+ text-shadow: 2px 4px 7px rgb(255 99 85 / 50%);
+ font-weight: 600;
+ color: red;
+ "
+ ></span>
+ <span>{{ endatd }} ~ {{ statd }}</span>
+ </div>
+ <el-row :gutter="20">
+ <el-col :span="10">
+ <div class="home-user-task-stats">
+ <p style="color: red">{{ DischargeData.rc }}</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">{{ DischargeData.rs }}</p>
+ <div class="text-color2">
+ <p>鍑洪櫌鏈嶅姟閲忥紙浜烘锛�</p>
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ </el-col>
+ </el-row>
+ <!-- 涓棿鍜屽彸杈� -->
+ <el-row :gutter="20">
+ <el-col :span="20">
+ <!-- echars鏁版嵁鍙鍖� -->
+ <div class="grid-content bg-purple" style="min-height: 365px">
+ <div class="title">
+ 鏈嶅姟缁熻
+ <span>{{ endatd }} ~ {{ statd }}</span>
+ <el-radio-group
+ v-model="radio1"
+ size="mini"
+ style="margin-left: 390px"
+ @change="changes"
+ >
+ <el-radio-button
+ label="杩戜竴鍛�"
+ @click="dyat = 7"
+ ></el-radio-button>
+ <el-radio-button
+ label="杩戜竴鏈�"
+ @click="dyat = 31"
+ ></el-radio-button>
+ <el-radio-button
+ label="杩戜竴骞�"
+ @click="dyat = 365"
+ ></el-radio-button>
+ <el-radio-button label="鑷畾涔�">
+ <el-date-picker
+ v-if="radio1 === '鑷畾涔�'"
+ v-model="customDateRange"
+ type="daterange"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ value-format="yyyy-MM-dd"
+ @change="handleCustomDateChange"
+ ></el-date-picker>
+ </el-radio-button>
+ </el-radio-group>
+ </div>
+ <!-- 涓儴绾挎�ф煴鐘跺浘 -->
+ <div class="boxEchars">
+ <div class="echars1" id="echars"></div>
+ </div>
+ </div>
+ </el-col>
+ <!-- 鍙宠竟鍒楄〃 -->
+ <el-col :span="4" class="aside">
+ <div class="grid-contentsa bg-purple" style="margin-top: -180px">
+ <div class="title">
+ 绉戝鏈嶅姟閲�
+ <span>{{ endatd }} ~ {{ statd }}</span>
+ </div>
+ <div class="dept-table-container">
+ <el-table
+ v-if="SkuTop.length > 0"
+ style="width: 100%"
+ :data="SkuTop"
+ :height="tableHeight"
+ >
+ <template v-for="(item, index) in SkuTop"></template>
+ <el-table-column
+ prop="order"
+ width="30"
+ style="background: url(~@/assets/order/4.png)"
+ type="index"
+ ></el-table-column>
+ <el-table-column
+ prop="deptname"
+ width="120"
+ class-name="name"
+ ></el-table-column>
+
+ <el-table-column prop="rc" class-name="rc">
+ <template slot-scope="scope"> {{ scope.row.rc }}娆� </template>
+ </el-table-column>
+ </el-table>
+ <div v-else class="empty-tip">
+ <el-empty description="鏆傛棤绉戝鏈嶅姟鏁版嵁"></el-empty>
+ </div>
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+ <!-- 搴曢儴涓�涓� -->
+ <el-row :gutter="20" style="margin-bottom: 20px">
+ <!-- <el-col :span="24">
+ <div class="grid-content bg-purple" style="min-height: 300px">
+ <div class="title">
+ 瀹f暀缁熻
+ <span class="el-icon-s-unfold moreIcon"></span>
+ </div>
+ <div class="cooperate">
+ <div class="pieChart" id="pieCharts"></div>
+ </div>
+ </div>
+ </el-col> -->
+ <!-- <el-col :span="9">
+ <div class="grid-content bg-purple" style="min-height: 300px">
+ <div class="title">
+ 鍚勯」鏈嶅姟缁熻
+ <span class="el-icon-s-unfold moreIcon2"></span>
+ </div>
+ <div class="empenty">
+ <el-row>
+ <el-col :span="3"
+ ><div class="grid-contents bg-purples">鍑洪櫌锛�</div></el-col
+ >
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">鍑洪櫌闅忚</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">鍑洪櫌瀹f暀</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">澶嶈瘖閫氱煡</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="3"
+ ><div class="grid-contents bg-purples"></div
+ ></el-col>
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">鍑洪櫌璇勪及</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">婊℃剰搴﹁皟鏌�</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">鍏朵粬閫氱煡</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+ </el-row>
+
+ <el-row>
+ <el-col :span="3"
+ ><div class="grid-contents bg-purples">闂ㄨ瘖锛�</div></el-col
+ >
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">褰卞儚闅忚</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">闂ㄨ瘖瀹f暀</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">澶嶈瘖閫氱煡</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="3"
+ ><div class="grid-contents bg-purples"></div
+ ></el-col>
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">婊℃剰搴﹁皟鏌�</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">鍏朵粬閫氱煡</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="3"
+ ><div class="grid-contents bg-purples">鍦ㄩ櫌锛�</div></el-col
+ >
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">鍦ㄩ櫌瀹f暀</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">鍦ㄩ櫌璇勪及</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+
+ <el-col :span="7">
+ <div style="display: flex">
+ <div class="subtitle">鍏朵粬閫氱煡</div>
+ <div class="grid-contents bg-purple-light">0娆�</div>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ </div>
+ </el-col> -->
+ </el-row>
+ </div>
</div>
</template>
<script>
+import {
+ getEChartsPatMedOuthospCount,
+ getechartsListCountdata,
+ getechartsMedOuthospList,
+ getechartsMedInhospList,
+ getServiceStatistics,
+ getDeptRanking,
+} from "@/api/AiCentre/index";
+import dayjs from "dayjs";
+
export default {
- name: "Index",
+ name: "home",
data() {
return {
- // 鐗堟湰鍙�
- version: "3.8.5"
+ NodeCount: "",
+ PrtnerCount: "",
+ NodeCount: "",
+ myChart2: null,
+ mypPieCharts: null,
+ lastWidth: window.innerWidth,
+ lastHeight: window.innerHeight,
+ radio1: "杩戜竴骞�",
+ ticketStatistics: {},
+ timeTypeMap: {
+ 鍛�: "day",
+ 鏈�: "month",
+ 骞�: "year",
+ },
+ DischargeData: {
+ rs: "",
+ rc: "",
+ },
+ OutpatientData: {
+ rs: "",
+ rc: "",
+ },
+ order: "",
+ Count: "",
+ datatni: [],
+ series: [],
+ tableData: [],
+ nodeCollect: [],
+ SkuTop: [],
+ cylinderSeries: [],
+ cylinderXAxis: [],
+ customDateRange: [], // 鑷畾涔夋棩鏈熻寖鍥�
+ dyat: 365,
+ intervalId: null,
};
},
- methods: {
- goTarget(href) {
- window.open(href, "_blank");
+
+ computed: {
+ // 鏃堕棿鍖哄煙
+ td() {
+ return dayjs().format("YYYY-MM-DD HH:mm:ss");
+ },
+ atd() {
+ return dayjs().subtract(this.dyat, "day").format("YYYY-MM-DD HH:mm:ss");
+ },
+ statd() {
+ if (this.radio1 === "鑷畾涔�" && this.customDateRange.length > 0) {
+ return this.customDateRange[1];
+ }
+ return dayjs().format("YYYY-MM-DD");
+ },
+ endatd() {
+ if (this.radio1 === "鑷畾涔�" && this.customDateRange.length > 0) {
+ return this.customDateRange[0];
+ }
+ return dayjs().subtract(this.dyat, "day").format("YYYY-MM-DD");
+ },
+ tableHeight() {
+ // 鏍规嵁鏁版嵁閲忓姩鎬佽绠楅珮搴�
+ const rowHeight = 40; // 姣忚澶х害楂樺害
+ const headerHeight = 40; // 琛ㄥご楂樺害
+ const minHeight = 500; // 鏈�灏忛珮搴�
+ const maxHeight = 600; // 鏈�澶ч珮搴�
+
+ const calculatedHeight = this.SkuTop.length * rowHeight + headerHeight;
+ return Math.min(Math.max(calculatedHeight, minHeight), maxHeight);
+ },
+ },
+ created() {
+ this.getTopdata();
+ this.getgraphdata();
+ // this.getranking();
+ this.$nextTick(function () {
+ this.myEcharts2();
+ this.getnodeCollect();
+ this.getSkuTop();
+ });
+ },
+ mounted() {
+ this.setInterval();
+ // window.addEventListener("resize", this.handleResize());
+ },
+ beforeDestroy() {
+ if (this.intervalId) {
+ clearInterval(this.intervalId); // 娓呴櫎瀹氭椂鍣�
}
- }
+ },
+ methods: {
+ // 鏀瑰彉鏃堕棿浜嬩欢
+ changes() {
+ switch (this.radio1) {
+ case "杩戜竴鍛�":
+ this.dyat = 7;
+ break;
+ case "杩戜竴鏈�":
+ this.dyat = 30;
+ break;
+ case "杩戜竴骞�":
+ this.dyat = 365;
+ break;
+ case "鑷畾涔�":
+ // 鑷畾涔夋棩鏈熷鐞嗗湪handleCustomDateChange鏂规硶涓�
+ return;
+ }
+ this.refreshData();
+ },
+
+ // 澶勭悊鑷畾涔夋棩鏈熷彉鍖�
+ handleCustomDateChange(range) {
+ if (!range || range.length !== 2) return;
+
+ this.customDateRange = range;
+ this.refreshData();
+ },
+
+ // 缁熶竴鍒锋柊鏁版嵁鐨勬柟娉�
+ refreshData() {
+ this.getgraphdata();
+ // this.getranking();
+ this.getTopdata();
+ this.myEcharts2();
+ this.getnodeCollect();
+ this.getSkuTop();
+ },
+
+ // 鍚堜綔鍟嗙偣浣嶆眹鎬荤粺璁¢ゼ鐘跺浘
+ async getnodeCollect() {
+ // const res = await getnodeCollect();
+ // this.nodeCollect = res.data;
+ this.nodeCollect = [
+ { name: "褰卞儚闅忚", value: 1232 },
+ { name: "鍑洪櫌闅忚", value: 342 },
+ ];
+ this.myPieChart();
+ },
+ // top鎺掕
+ async getSkuTop() {
+ 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" },
+ // ];
+ },
+ // 鑾峰彇澶撮儴鏁版嵁
+ 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;
+ }
+ });
+ },
+ // 鑾峰彇涓儴绾挎煴鍥炬暟鎹�
+ getranking() {},
+
+ async getgraphdata() {
+ let params = {
+ startDate: this.endatd,
+ endDate: this.statd,
+ timeType: this.getTimeType(),
+ };
+
+ try {
+ const res = await getServiceStatistics(params);
+ if (res.code === 200) {
+ this.processChartData(res.data);
+ }
+ } catch (error) {
+ console.error("鑾峰彇鍥捐〃鏁版嵁澶辫触:", error);
+ }
+ },
+
+ // 鑾峰彇鏃堕棿绫诲瀷
+ getTimeType() {
+ if (this.radio1 === "杩戜竴鍛�" || this.radio1 === "杩戜竴鏈�") {
+ return "day";
+ }
+
+ if (this.radio1 === "杩戜竴骞�") {
+ return "month";
+ }
+
+ // 鑷畾涔夋棩鏈熻寖鍥�
+ if (this.radio1 === "鑷畾涔�" && this.customDateRange.length === 2) {
+ const start = dayjs(this.customDateRange[0]);
+ const end = dayjs(this.customDateRange[1]);
+ const diffDays = end.diff(start, "day");
+
+ return diffDays > 60 ? "month" : "day";
+ }
+
+ return "day"; // 榛樿杩斿洖day绫诲瀷
+ },
+ processChartData(data) {
+ // 鎸夋椂闂存帓搴忕‘淇濇暟鎹『搴忔纭�
+ const sortedData = [...data].sort(
+ (a, b) => new Date(a.timePeriod) - new Date(b.timePeriod)
+ );
+
+ const xAxisData = [];
+ const dischargeFollowData = [];
+ const outpatientFollowData = [];
+ const pmiData = [];
+ const pmoData = [];
+
+ sortedData.forEach((item) => {
+ // 鏍规嵁鏃堕棿绫诲瀷鏍煎紡鍖栨樉绀�
+ const timeType = this.getTimeType();
+ const timeLabel =
+ timeType === "day"
+ ? dayjs(item.timePeriod).format("MM-DD")
+ : dayjs(item.timePeriod).format("YYYY-MM");
+
+ xAxisData.push(timeLabel);
+ dischargeFollowData.push(item.dischargeFollowCount);
+ outpatientFollowData.push(item.outpatientFollowCount);
+ pmiData.push(item.pmiCount);
+ pmoData.push(item.pmoCount);
+ });
+
+ // 鏇存柊鍥捐〃
+ this.updateChart(
+ xAxisData,
+ dischargeFollowData,
+ outpatientFollowData,
+ pmiData,
+ pmoData
+ );
+ },
+ updateChart(
+ xAxisData,
+ dischargeFollowData,
+ outpatientFollowData,
+ pmiData,
+ pmoData
+ ) {
+ if (!this.myChart2) {
+ this.myEcharts2();
+ return;
+ }
+
+ // 璁$畻闅忚閲忕殑鏈�澶у��
+ const maxFollow = Math.max(
+ ...dischargeFollowData,
+ ...outpatientFollowData
+ );
+ // 璁$畻鏈嶅姟浜烘鐨勬渶澶у��
+ const maxService = Math.max(...pmiData, ...pmoData);
+
+ // 鍔ㄦ�佽绠梚nterval鍊�
+ const followInterval = this.calculateOptimalInterval(maxFollow);
+ const serviceInterval = this.calculateOptimalInterval(maxService);
+
+ const option = {
+ xAxis: {
+ data: xAxisData,
+ },
+ yAxis: [
+ {
+ interval: followInterval,
+ max: Math.ceil(maxFollow / followInterval) * followInterval,
+ },
+ {
+ interval: serviceInterval,
+ max: Math.ceil(maxService / serviceInterval) * serviceInterval,
+ },
+ ],
+ series: [
+ { data: dischargeFollowData },
+ { data: outpatientFollowData },
+ { data: pmiData },
+ { data: pmoData },
+ ],
+ };
+
+ this.myChart2.setOption(option);
+ },
+
+ // 璁$畻鏈�浼樼殑interval鍊�
+ calculateOptimalInterval(maxValue) {
+ if (maxValue <= 0) return 50; // 榛樿鍊�
+
+ // 鏍规嵁鏈�澶у�艰绠楀悎閫傜殑闂撮殧
+ const magnitude = Math.pow(10, Math.floor(Math.log10(maxValue)));
+ const stepRatio = maxValue / magnitude;
+
+ let interval;
+ if (stepRatio > 5) {
+ interval = magnitude;
+ } else if (stepRatio > 2) {
+ interval = magnitude / 2;
+ } else {
+ interval = magnitude / 5;
+ }
+
+ // 纭繚interval鏄暣鏁�
+ interval = Math.round(interval);
+
+ // 闄愬埗鏈�灏忛棿闅�
+ return Math.max(interval, 50);
+ },
+ // 鑾峰彇绾跨姸鍥炬椂闂�
+ async getregionAmountCollect() {
+ //getregionAmountCollect(1, this.endatd, this.statd);
+ // this.xAxis = res.data.xAxis;
+ // this.series = res.data.series;
+ this.xAxis = ["1鏈�", "2鏈�", "3鏈�", "4鏈�", "5鏈�", "6鏈�", "7鏈�", "8鏈�"];
+ this.series = [123, 123, 223, 212, 432, 123, 442, 234];
+ this.myEcharts2();
+ },
+ // 绾挎�у浘鍙婃煴鐘跺浘
+ myEcharts2() {
+ var echarts = require("echarts");
+ var myChart2 = echarts.init(document.getElementById("echars"));
+ this.myChart2 = myChart2;
+
+ var option2 = {
+ tooltip: {
+ trigger: "axis",
+ axisPointer: {
+ type: "cross",
+ crossStyle: {
+ color: "#999",
+ },
+ },
+ },
+ toolbox: {
+ feature: {
+ dataView: { show: true, readOnly: false },
+ magicType: { show: true, type: ["line", "bar"] },
+ restore: { show: true },
+ saveAsImage: { show: true },
+ },
+ },
+ legend: {
+ data: ["鍑洪櫌鏈嶅姟閲�", "闂ㄨ瘖鏈嶅姟閲�", "鍑洪櫌灏辫瘖浜烘", "闂ㄨ瘖灏辫瘖浜烘"],
+ },
+ xAxis: [
+ {
+ type: "category",
+ data: [], // 鍒濆涓虹┖锛屽皢閫氳繃API鏁版嵁濉厖
+ axisPointer: {
+ type: "shadow",
+ },
+ },
+ ],
+ yAxis: [
+ {
+ type: "value",
+ name: "闅忚閲�",
+ min: 0,
+ axisLabel: {
+ formatter: "{value} 浜�",
+ },
+ },
+ {
+ type: "value",
+ name: "鏈嶅姟浜烘",
+ min: 0,
+ axisLabel: {
+ formatter: "{value} 娆�",
+ },
+ },
+ ],
+ grid: { top: "35%" },
+ series: [
+ {
+ name: "鍑洪櫌鏈嶅姟閲�",
+ type: "bar",
+ tooltip: {
+ valueFormatter: function (value) {
+ return value + " 浜�";
+ },
+ },
+ data: [], // 鍒濆涓虹┖锛屽皢閫氳繃API鏁版嵁濉厖
+ },
+ {
+ name: "闂ㄨ瘖鏈嶅姟閲�",
+ type: "bar",
+ tooltip: {
+ valueFormatter: function (value) {
+ return value + " 浜�";
+ },
+ },
+ data: [], // 鍒濆涓虹┖锛屽皢閫氳繃API鏁版嵁濉厖
+ },
+ {
+ name: "鍑洪櫌灏辫瘖浜烘",
+ type: "line",
+ smooth: 0.3,
+ yAxisIndex: 1,
+ tooltip: {
+ valueFormatter: function (value) {
+ return value + " 娆�";
+ },
+ },
+ data: [], // 鍒濆涓虹┖锛屽皢閫氳繃API鏁版嵁濉厖
+ },
+ {
+ name: "闂ㄨ瘖灏辫瘖浜烘",
+ type: "line",
+ smooth: 0.3,
+ yAxisIndex: 1,
+ tooltip: {
+ valueFormatter: function (value) {
+ return value + " 娆�";
+ },
+ },
+ data: [], // 鍒濆涓虹┖锛屽皢閫氳繃API鏁版嵁濉厖
+ },
+ ],
+ };
+
+ myChart2.setOption(option2);
+
+ // 鍒濆鍔犺浇鏁版嵁
+ this.getgraphdata();
+ },
+ // 楗肩姸鍥�
+ myPieChart() {
+ // 鍩轰簬鍑嗗濂界殑dom锛屽垵濮嬪寲echarts瀹炰緥
+ var echarts = require("echarts");
+ var mypPieCharts = echarts.init(document.getElementById("pieCharts"));
+ this.mypPieCharts = mypPieCharts;
+ // 鎸囧畾鍥捐〃鐨勯厤缃」鍜屾暟鎹�
+ var optionPie = {
+ legend: {},
+ tooltip: {
+ trigger: "axis",
+ showContent: true,
+ },
+ dataset: {
+ source: [
+ ["product", "2012", "2013", "2014", "2015", "2016", "2017"],
+ ["鍑洪櫌瀹f暀", 56, 82, 88, 70, 53, 85],
+ ["鍦ㄩ櫌瀹f暀", 51, 51, 55, 53, 73, 68],
+ ["闂ㄨ瘖瀹f暀", 40, 62, 69, 36, 45, 32],
+ ],
+ },
+ xAxis: { type: "category" },
+ yAxis: { gridIndex: 0 },
+ grid: { top: "25%", left: "10%", right: "40%", bottom: "10%" },
+ series: [
+ {
+ name: "鍑洪櫌瀹f暀",
+ type: "line",
+ smooth: true,
+ seriesLayoutBy: "row",
+ emphasis: { focus: "series" },
+ },
+ {
+ name: "鍦ㄩ櫌瀹f暀",
+ type: "line",
+ smooth: true,
+ seriesLayoutBy: "row",
+ emphasis: { focus: "series" },
+ },
+ {
+ name: "闂ㄨ瘖瀹f暀",
+ type: "line",
+ smooth: true,
+ seriesLayoutBy: "row",
+ emphasis: { focus: "series" },
+ },
+ {
+ type: "pie",
+ id: "pie",
+ radius: ["40%", "70%"],
+ center: ["80%", "50%"],
+ emphasis: {
+ focus: "self",
+ },
+ itemStyle: {
+ borderRadius: 10,
+ borderColor: "#fff",
+ borderWidth: 2,
+ },
+ label: {
+ formatter: "{b}: {@2012}",
+ },
+ encode: {
+ itemName: "product",
+ value: "2012",
+ tooltip: "2012",
+ },
+ },
+ ],
+ };
+ mypPieCharts.on("updateAxisPointer", function (event) {
+ const xAxisInfo = event.axesInfo[0];
+ if (xAxisInfo) {
+ const dimension = xAxisInfo.value + 1;
+ mypPieCharts.setOption({
+ series: {
+ id: "pie",
+ label: {
+ formatter: "{b}: {@[" + dimension + "]} ",
+ },
+ encode: {
+ value: dimension,
+ tooltip: dimension,
+ },
+ },
+ });
+ }
+ });
+
+ // 浣跨敤鍒氭寚瀹氱殑閰嶇疆椤瑰拰鏁版嵁鏄剧ず鍥捐〃銆�
+ mypPieCharts.setOption(optionPie);
+ },
+ // 椤甸潰鍙樺寲璋冩暣澶у皬
+ handleResize() {
+ console.log(111);
+ // 璋冩暣 ECharts 鍥捐〃澶у皬
+ if (this.myChart2) {
+ this.myChart2.resize();
+ }
+ if (this.mypPieCharts) {
+ this.mypPieCharts.resize();
+ }
+ },
+ setInterval() {
+ this.intervalId = setInterval(() => {
+ if (window.innerWidth != this.lastWidth) {
+ this.lastWidth = window.innerWidth;
+ console.log("绐楀彛澶у皬鍙兘琚墜鍔ㄨ皟鏁翠簡");
+ this.handleResize();
+ }
+ }, 1000);
+ },
+ },
};
</script>
-<style scoped lang="scss">
-.home {
- blockquote {
- padding: 10px 20px;
- margin: 0 0 20px;
- font-size: 17.5px;
- border-left: 5px solid #eee;
- }
- hr {
- margin-top: 20px;
- margin-bottom: 20px;
- border: 0;
- border-top: 1px solid #eee;
- }
- .col-item {
- margin-bottom: 20px;
- }
+<style lang="scss" scoped>
+* {
+ padding: 0;
+ margin: 0;
+}
- ul {
- padding: 0;
- margin: 0;
+.boxEchars {
+ width: 100%;
+ height: 40vh;
+ margin-top: 45px;
+ display: flex;
+ .echars1 {
+ flex: 1;
}
-
- font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 13px;
- color: #676a6c;
- overflow-x: hidden;
-
- ul {
- list-style-type: none;
- }
-
- h4 {
- margin-top: 0px;
- }
-
- h2 {
- margin-top: 10px;
- font-size: 26px;
- font-weight: 100;
- }
-
- p {
- margin-top: 10px;
-
- b {
- font-weight: 700;
+}
+.dept-table-container {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ min-height: 0; /* 閲嶈锛氬厑璁稿唴瀹规敹缂� */
+}
+::v-deep .el-table {
+ td:first-child {
+ .cell {
+ display: inline-block;
+ text-align: center;
+ width: 22px;
+ height: 20px;
+ margin-left: 2px;
+ padding-left: 6px;
+ text-align: center;
+ white-space: nowrap;
+ font-size: 12px;
+ font-family: zihun143-zhengkuchaojihei, zihun143;
+ font-weight: 400;
+ line-height: 14px;
+ background: url(~@/assets/order/4.png) no-repeat;
+ color: #e9b499;
}
}
-
- .update-log {
- ol {
- display: block;
- list-style-type: decimal;
- margin-block-start: 1em;
- margin-block-end: 1em;
- margin-inline-start: 0;
- margin-inline-end: 0;
- padding-inline-start: 40px;
+ td:nth-child(2) {
+ .cell {
+ height: 20px;
+ font-size: 14px;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 500;
+ color: #333;
+ line-height: 20px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+ }
+ td:last-child {
+ height: 20px;
+ font-size: 14px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #737589;
+ line-height: 20px;
+ text-align: right;
+ }
+}
+::v-deep .el-table {
+ tr:nth-child(1) {
+ td:nth-child(1) {
+ .cell {
+ background: url(~@/assets/order/1.png);
+ color: #8e5900;
+ }
+ }
+ }
+ tr:nth-child(2) {
+ td:nth-child(1) {
+ .cell {
+ background: url(~@/assets/order/2.png);
+ color: #494949;
+ }
+ }
+ }
+ tr:nth-child(3) {
+ td:nth-child(1) {
+ .cell {
+ background: url(~@/assets/order/3.png);
+ color: #cf6d3d;
+ }
}
}
}
-</style>
+.moreIcon {
+ font-size: 22px !important;
+ margin-left: 400px !important;
+ color: #5f84ff !important;
+ cursor: pointer;
+}
+.moreIcon2 {
+ font-size: 22px !important;
+ margin-left: 250px !important;
+ color: #5f84ff !important;
+ cursor: pointer;
+}
+.empenty {
+ width: 100%;
+ padding: 20px 0;
+ min-height: 280px;
+}
+.cooperate {
+ width: 100%;
+ height: 280px;
+ margin-top: 25px;
+ display: flex;
+ .pieChart {
+ flex: 1;
+ }
+ .Points {
+ width: 154px;
+ height: 230px;
+ text-align: center;
+ padding: 20px 0;
+ background: linear-gradient(135deg, transparent, #f8f8f9 0) 0 0,
+ linear-gradient(-135deg, transparent 12px, #f8f8f9 0) 100% 0,
+ linear-gradient(-45deg, transparent, #f8f8f9 0) 100% 100%,
+ linear-gradient(45deg, transparent 12px, #f8f8f9 0) 0 100%;
+ background-size: 50% 50%;
+ background-repeat: no-repeat;
+ p {
+ height: 33px;
+ margin-bottom: 10px;
+ font-size: 24px;
+ font-family: PingFangSC-Semibold, PingFang SC;
+ font-weight: 600;
+ color: #072074;
+ line-height: 33px;
+ }
+ span {
+ height: 17px;
+ margin-top: 6px;
+ font-size: 12px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #000412;
+ line-height: 17px;
+ }
+ }
+}
+.title {
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-flex: 1;
+ -ms-flex: 1;
+ flex: 1;
+ font-size: 16px;
+ font-family: PingFangSC-Semibold, PingFang SC;
+ font-weight: 600;
+ color: #333;
+ padding-top: 17px;
+ padding-bottom: -4px;
+ span {
+ margin-left: 10px;
+ font-size: 12px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #999;
+ }
+}
+.bgc2 {
+ background: #fbefe8 url(~@/assets/dashboard/bg33.png) no-repeat
+ calc(100% - 12px) 100% !important;
+
+ .home-user-task-stats {
+ margin-top: 10px;
+ height: 50px;
+ font-size: 36px;
+ font-family: PingFangSC-Semibold, PingFang SC;
+ font-weight: 600;
+ line-height: 50px;
+ text-shadow: 2px 4px 7px rgb(255 99 85 / 50%);
+ }
+ .text-color2 {
+ height: 17px;
+ margin-top: 3px;
+ font-size: 12px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #ff5757;
+ line-height: 17px;
+ }
+}
+.bgc1 {
+ background: #e9f3ff !important;
+ background-image: url(~@/assets/dashboard/bg11.png),
+ url(~@/assets/dashboard/bg22.png) !important;
+ background-repeat: no-repeat, no-repeat !important;
+ background-position: 0 0, calc(100% - 12px) 100% !important;
+ .title {
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-flex: 1;
+ -ms-flex: 1;
+ flex: 1;
+ font-size: 16px;
+ font-family: PingFangSC-Semibold, PingFang SC;
+ font-weight: 600;
+ color: #333;
+ span {
+ margin-left: 10px;
+ font-size: 12px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #999;
+ }
+ }
+ .home-user-task-stats {
+ margin-top: 10px;
+ height: 50px;
+ font-size: 36px;
+ font-family: PingFangSC-Semibold, PingFang SC;
+ font-weight: 600;
+ line-height: 50px;
+ text-shadow: 2px 4px 7px rgb(85 132 255 / 50%);
+ }
+ .text-color2 {
+ height: 17px;
+ margin-top: 3px;
+ font-size: 12px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #91a7dc;
+ line-height: 17px;
+ }
+}
+::v-deep.aside .el-table__header-wrapper {
+ overflow: hidden;
+ display: none;
+}
+.headerBox {
+ height: 150px;
+ padding: 25px;
+}
+.el-row {
+ margin-bottom: 20px;
+ &:last-child {
+ margin-bottom: 0;
+ }
+}
+.el-col {
+ border-radius: 4px;
+}
+.bg-purple-dark {
+ background: #99a9bf;
+}
+.bg-purple {
+ background: #fff;
+}
+.bg-purples {
+ color: #206abe;
+ font-size: 18px;
+}
+.bg-purple-light {
+ background: #e5e9f2;
+ text-align: center;
+ align-items: center;
+ line-height: 36px;
+ width: 6vw;
+}
+.subtitle {
+ text-align: center;
+ align-items: center;
+}
+.grid-content {
+ min-height: 36px;
+ border-radius: 20px;
+ padding: 0 10px;
+ text-align: center;
+}
+.grid-contentsa {
+ min-height: 600px;
+ border-radius: 20px;
+ padding: 0 10px;
+ text-align: center;
+}
+
+.grid-contents {
+ min-height: 36px;
+ border-radius: 20px;
+ padding: 0 10px;
+ padding-right: 0;
+}
+.row-bg {
+ padding: 10px 0;
+ background-color: #f9fafc;
+}
+</style>
--
Gitblit v1.9.3