| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- import { ref } from 'vue';
- import { dayjs, cloneDeep, getRandomIntBetween } from "./utils";
- import GroupLine from "~icons/ri/group-line";
- import Question from "~icons/ri/question-answer-line";
- import CheckLine from "~icons/ri/chat-check-line";
- import Smile from "~icons/ri/star-smile-line";
- const days = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
- /** 项目数量、人员数量、基站数量、标签数量 */
- const chartData = ref([
- {
- icon: Question,
- bgColor: "#effaff",
- color: "#41b6ff",
- duration: 2200,
- name: "项目总数",
- value: 36000,
- percent: "+88%",
- data: [2101, 5288, 4239, 4962, 6752, 5208, 7450] // 平滑折线图数据
- },
- {
- icon: CheckLine,
- bgColor: "#fff5f4",
- color: "#e85f33",
- duration: 1600,
- name: "运行项目",
- value: 16580,
- percent: "+70%",
- data: [2216, 1148, 1255, 788, 4821, 1973, 4379]
- },
- {
- icon: GroupLine,
- bgColor: "#eff8f4",
- color: "#26ce83",
- duration: 1500,
- name: "人员数量",
- value: 16499,
- percent: "+99%",
- data: [861, 1002, 3195, 1715, 3666, 2415, 3645]
- },
- {
- icon: CheckLine,
- bgColor: "#eff8f4",
- color: "#26ce83",
- duration: 1500,
- name: "基站数量",
- value: 16499,
- percent: "+99%",
- data: [861, 1002, 3195, 1715, 3666, 2415, 3645]
- },
- {
- icon: Smile,
- bgColor: "#f6f4fe",
- color: "#7846e5",
- duration: 100,
- name: "在线基站",
- value: 100,
- percent: "+100%",
- data: [100]
- },
- {
- icon: Smile,
- bgColor: "#f6f4fe",
- color: "#7846e5",
- duration: 100,
- name: "标签数量",
- value: 100,
- percent: "+100%",
- data: [100]
- }
- ]);
- /** 一周概览 */
- const barChartData = ref([
- {
- attendPerson: [2101, 5288, 4239, 4962, 6752, 5208, 7450],
- arrivePerson: [2216, 1148, 1255, 1788, 4821, 1973, 4379],
- onlinePerson: [2116, 3148, 3255, 3788, 4821, 4970, 5390]
-
- },
- {
- attendPerson: [2101, 3280, 4400, 4962, 5752, 6889, 7600],
- arrivePerson: [2116, 3148, 3255, 3788, 4821, 4970, 5390],
- onlinePerson: [2216, 1148, 1255, 1788, 4821, 1973, 4379]
- }
- ]);
- /** 基站在线分布 */
- const progressData = ref([
- {
- projName: "项目1",
- percentage: 85,
- duration: 5,
- color: "#41b6ff",
- ancNum: 0
- }
- ]);
- /** 数据统计 */
- const tableData_old = Array.from({ length: 30 }).map((_, index) => {
- return {
- id: index + 1,
- requiredNumber: getRandomIntBetween(13500, 19999),
- questionNumber: getRandomIntBetween(12600, 16999),
- resolveNumber: getRandomIntBetween(13500, 17999),
- satisfaction: getRandomIntBetween(95, 100),
- date: dayjs().subtract(index, "day").format("YYYY-MM-DD")
- };
- });
- const tableData = ref([
- {
- tm: new Date().getTime(),
- projName: '',
- locName: '',
- ancAddr: 0,
- attendPerson: 0,
- arrivePerson: 0,
- onlinePerson: 0,
- items: []
- }
- ]);
- export { chartData, barChartData, progressData, tableData };
|