2 Commits eda348269d ... 9b9f9eda43

Author SHA1 Message Date
  userName 9b9f9eda43 Merge branch 'master' of http://gogs.gisvg.com/YDM/museums-ui 2 months ago
  lmm 0aac5830d0 Merge remote-tracking branch 'origin/master' 2 months ago
2 changed files with 93 additions and 1076 deletions
  1. 12 192
      src/views/Home/Index.vue
  2. 81 884
      src/views/Home/echarts-data.ts

+ 12 - 192
src/views/Home/Index.vue

@@ -152,7 +152,7 @@
             <div class="title"><img src="/@/assets/imgs/tj3.png" alt="" /><span>历年标本来源增减统计</span></div>
 
             <el-skeleton :loading="loading" animated>
-              <Echart :options="originOptions111Data" :height="340" />
+              <Echart :options="originOptionsData" :height="340" />
             </el-skeleton>
           </el-card>
           <!-- 历年标本来源增减统计 -->
@@ -174,17 +174,9 @@
 
 </template>
 <script lang="ts" setup>
-import { set } from 'lodash-es'
 import { EChartsOption } from 'echarts'
-// import { formatTime } from '@/utils'
-import * as echarts from 'echarts';
-import Echarts from '/@/components/Echarts/index.vue';
-
-import { useUserStore } from '@/store/modules/user'
-import { useWatermark } from '@/hooks/web/useWatermark'
-import type { WorkplaceTotal, Project, Shortcut } from './types'
-import { pieOptions, barOptions, barOptions1, outOptions, enterOptions, backOptions, yearOptions, originOptions, enterRatioOptions, originOptions111, mouthOptions, outRatioOptions, returnRatioOptions } from './echarts-data'
-// import MyChart from '/@/components/Echarts/echarts.vue';
+import type { WorkplaceTotal } from './types'
+import { pieOptions,  yearOptions, enterRatioOptions, originOptions, mouthOptions, outRatioOptions, returnRatioOptions } from './echarts-data'
 defineOptions({ name: 'Home' })
 
 
@@ -214,15 +206,13 @@ onMounted(async () => {
   fossilCount.value = samples['化石'];
   meteoriteCount.value = samples['陨石'];
   rockOreCount.value = samples['岩石矿石'];
-
-
+  
   const month = `${new Date().getMonth() + 1}月`
   console.log('month', month);
   const enterSpecimen = ref();
   const outSpecimen = ref();
   const returnSpecimen = ref();
   const year = new Date().getFullYear()
-  // 使用 await 获取数据
   //本月出、入、回库数
   enterSpecimen.value = await WorkbenchApi.getEnterSpecimenList(year);
   outSpecimen.value = await WorkbenchApi.getOutSpecimenList(year);
@@ -242,16 +232,7 @@ onMounted(async () => {
 })
 
 
-
-
-
-const { t } = useI18n()
-const userStore = useUserStore()
-const { setWatermark } = useWatermark()
 const loading = ref(true)
-const avatar = userStore.getUser.avatar
-const username = userStore.getUser.nickname
-const pieOptionsData = reactive<EChartsOption>(pieOptions) as EChartsOption
 // 获取统计数
 let totalSate = reactive<WorkplaceTotal>({
   project: 0,
@@ -268,187 +249,33 @@ const getCount = async () => {
   totalSate = Object.assign(totalSate, data)
 }
 
-// 获取项目数
-let projects = reactive<Project[]>([])
-const getProject = async () => {
-  const data = [
-    {
-      name: 'ruoyi-vue-pro',
-      icon: 'akar-icons:github-fill',
-      message: 'https://github.com/YunaiV/ruoyi-vue-pro',
-      personal: 'Spring Boot 单体架构',
-      time: new Date()
-    },
-    {
-      name: 'yudao-ui-admin-vue3',
-      icon: 'logos:vue',
-      message: 'https://github.com/yudaocode/yudao-ui-admin-vue3',
-      personal: 'Vue3 + element-plus',
-      time: new Date()
-    },
-    {
-      name: 'yudao-ui-admin-vben',
-      icon: 'logos:vue',
-      message: 'https://github.com/yudaocode/yudao-ui-admin-vben',
-      personal: 'Vue3 + vben(antd)',
-      time: new Date()
-    },
-    {
-      name: 'yudao-cloud',
-      icon: 'akar-icons:github',
-      message: 'https://github.com/YunaiV/yudao-cloud',
-      personal: 'Spring Cloud 微服务架构',
-      time: new Date()
-    },
-    {
-      name: 'yudao-ui-mall-uniapp',
-      icon: 'logos:vue',
-      message: 'https://github.com/yudaocode/yudao-ui-admin-uniapp',
-      personal: 'Vue3 + uniapp',
-      time: new Date()
-    },
-    {
-      name: 'yudao-ui-admin-vue2',
-      icon: 'logos:vue',
-      message: 'https://github.com/yudaocode/yudao-ui-admin-vue2',
-      personal: 'Vue2 + element-ui',
-      time: new Date()
-    }
-  ]
-  projects = Object.assign(projects, data)
-}
-
-
-
-// 获取快捷入口
-let shortcut = reactive<Shortcut[]>([])
-
-const getShortcut = async () => {
-  const data = [
-    {
-      name: 'Github',
-      icon: 'akar-icons:github-fill',
-      url: 'github.io'
-    },
-    {
-      name: 'Vue',
-      icon: 'logos:vue',
-      url: 'vuejs.org'
-    },
-    {
-      name: 'Vite',
-      icon: 'vscode-icons:file-type-vite',
-      url: 'https://vitejs.dev/'
-    },
-    {
-      name: 'Angular',
-      icon: 'logos:angular-icon',
-      url: 'github.io'
-    },
-    {
-      name: 'React',
-      icon: 'logos:react',
-      url: 'github.io'
-    },
-    {
-      name: 'Webpack',
-      icon: 'logos:webpack',
-      url: 'github.io'
-    }
-  ]
-  shortcut = Object.assign(shortcut, data)
-}
-
-const barOptionsData = reactive<EChartsOption>(barOptions) as EChartsOption
-
-// 周活跃量
-const getWeeklyUserActivity = async () => {
-  const data = [
-    { value: 13253, name: 'analysis.monday' },
-    { value: 34235, name: 'analysis.tuesday' },
-    { value: 26321, name: 'analysis.wednesday' },
-    { value: 12340, name: 'analysis.thursday' },
-    { value: 24643, name: 'analysis.friday' },
-    { value: 1322, name: 'analysis.saturday' },
-    { value: 1324, name: 'analysis.sunday' }
-  ]
-  set(
-    barOptionsData,
-    'xAxis.data',
-    data.map((v) => t(v.name))
-  )
-  set(barOptionsData, 'series', [
-    {
-      name: t('analysis.activeQuantity'),
-      data: data.map((v) => v.value),
-      type: 'bar'
-    }
-  ])
-}
-
-const barOptionsData1 = reactive<EChartsOption>(barOptions1) as EChartsOption
-
-// 周活跃量
-const getWeeklyUserActivity1 = async () => {
-  const data = [
-    { value: 13253, name: 'analysis.monday' },
-    { value: 34235, name: 'analysis.tuesday' },
-    { value: 26321, name: 'analysis.wednesday' },
-    { value: 12340, name: 'analysis.thursday' },
-    { value: 24643, name: 'analysis.friday' },
-    { value: 1322, name: 'analysis.saturday' },
-    { value: 1324, name: 'analysis.sunday' }
-  ]
-  set(
-    barOptionsData1,
-    'xAxis.data',
-    data.map((v) => t(v.name))
-  )
-  set(barOptionsData1, 'series', [
-    {
-      name: t('analysis.activeQuantity'),
-      data: data.map((v) => v.value),
-      type: 'line'
-    }
-  ])
-}
 
 
 const getAllApi = async () => {
   await Promise.all([
     getCount(),
-    getProject(),
-    // getNotice(),
-    getShortcut(),
-    // getUserAccessSource(),
-    getWeeklyUserActivity(),
-    getWeeklyUserActivity1(),
   ])
   loading.value = false
 }
 
 
 
-//出库
-const outOptionsData = reactive<EChartsOption>(outOptions) as EChartsOption
-//入库
-const enterOptionsData = reactive<EChartsOption>(enterOptions) as EChartsOption
-//回库backOptions
-const backOptionsData = reactive<EChartsOption>(backOptions) as EChartsOption
-//历年标本数量统计yearOptions
+
+//历年标本数量统计
 const yearOptionsData = reactive<EChartsOption>(yearOptions) as EChartsOption
-//历年标本来源统计originOptions
-const originOptionsData = reactive<EChartsOption>(originOptions) as EChartsOption
 //本月入库数
 const enterRatioOptionsData = reactive<EChartsOption>(enterRatioOptions) as EChartsOption
 //本月出库数
 const outRatioOptionsData = reactive<EChartsOption>(outRatioOptions) as EChartsOption
 //本月回库数
 const returnRatioOptionsData = reactive<EChartsOption>(returnRatioOptions) as EChartsOption
-//历年来源originOptions111
-const originOptions111Data = reactive<EChartsOption>(originOptions111) as EChartsOption
-//历年来源originOptions111
+//历年标本来源增减统计
+const originOptionsData = reactive<EChartsOption>(originOptions) as EChartsOption
+//本年标本数量统计
 const mouthOptionsData = reactive<EChartsOption>(mouthOptions) as EChartsOption
+//按标本类型统计
+const pieOptionsData = reactive<EChartsOption>(pieOptions) as EChartsOption
+
 getAllApi()
 
 
@@ -545,9 +372,6 @@ getAllApi()
   /* margin-top: 10%; */
 }
 
-.introduce-text {
-  /* text-align: center; */
-}
 
 .introduce-text div:nth-child(1) {
   font-size: 1.4rem;
@@ -633,8 +457,4 @@ getAllApi()
   }
 }
 
-
-.multiple-text-shadow {
-  /* -webkit-text-stroke: 0.3px #fff; */
-}
 </style>

+ 81 - 884
src/views/Home/echarts-data.ts

@@ -1,14 +1,9 @@
 import { EChartsOption } from 'echarts'
-import * as echarts from 'echarts';
-// import request from '@/config/axios'
 //获取标本类型数
 import * as WorkbenchApi from '@/api/workbench'
 const { samples } = await WorkbenchApi.getSpecimenTypeList();
 
-
 const { t } = useI18n()
-const colorList = ["#9E87FF", '#73DDFF', '#fe9a8b', '#F56948', '#9E87FF']
-// const percentage = 0.3;
 const dataStyle = {
   normal: {
     label: {
@@ -51,8 +46,6 @@ sourceList.value = await WorkbenchApi.getSpecimenSourceList();
 enterSpecimen.value = await WorkbenchApi.getEnterSpecimenList(year);
 outSpecimen.value = await WorkbenchApi.getOutSpecimenList(year);
 returnSpecimen.value = await WorkbenchApi.getReturnSpecimenList(year);
-console.log('Year',year);
-console.log('outSpecimen.value',outSpecimen.value.data);
 
 //获取各类标本数据
 mineralCount.value = samples['矿物'];
@@ -154,720 +147,99 @@ export const lineOptions: EChartsOption = {
     data: [t('analysis.estimate'), t('analysis.actual')],
     top: 50
   },
-  series: [
-    {
-      name: t('analysis.estimate'),
-      smooth: true,
-      type: 'line',
-      data: [100, 120, 161, 134, 105, 160, 165, 114, 163, 185, 118, 123],
-      animationDuration: 2800,
-      animationEasing: 'cubicInOut'
-    },
-    {
-      name: t('analysis.actual'),
-      smooth: true,
-      type: 'line',
-      itemStyle: {},
-      data: [120, 82, 91, 154, 162, 140, 145, 250, 134, 56, 99, 123],
-      animationDuration: 2800,
-      animationEasing: 'quadraticOut'
-    }
-  ]
-}
-
-export const pieOptions: EChartsOption = {
-  // color: ['#1F78B4', '#A6CEE3', '#B2DF8A', '#33A02C', '#FB9A99', '#E31A1C'],
-  // color: ['#fba980', '#fada8b', '#fdf5e1', '#dedede'],
-  color: [ '#90cedd', '#fbf5bf','#fecb70', '#ce6116'],
-    // color: ['rgba(206,97,22,.7)', 'rgba(247,235,182,.7)', 'rgba(162,214,201,.7)', 'rgba(51,143,180,.7)'],
-    // color: ['rgba(206,97,22,.7)', 'rgba(247,235,182,.7)', 'rgba(162,214,201,.7)', 'rgba(51,143,180,.7)'],
-
-  legend: {
-    icon: "circle",
-    top: "2%",
-    textStyle: {
-      color: "#556677",
-    },
-  },
-  
-  tooltip: {
-    trigger: "item",
-    axisPointer: {
-      label: {
-        show: true,
-        backgroundColor: "#fff",
-        color: "#556677",
-        borderColor: "rgba(0,0,0,0)",
-        shadowColor: "rgba(0,0,0,0)",
-        shadowOffsetY: 0,
-      },
-      lineStyle: {
-        width: 0,
-      },
-    },
-    backgroundColor: "#fff",
-    textStyle: {
-      color: "#5c6c7c",
-    },
-    padding: [10, 10],
-    extraCssText: "box-shadow: 1px 0 2px 0 rgba(163,163,163,0.5)",
-  },
-  series: [{
-    type: 'pie',
-    radius: ['35%', '66%'],
-    center: ['50%', '55%'],
-    // label: {
-    //     fontSize: 16,
-    //     formatter: '{b} {d}%',
-    // },
-    // startAngle: 180,
-    // endAngle: 360,
-    data: [{
-      value: mineralCount.value,
-      name: '矿物'
-    },
-    {
-      value: rockOreCount.value,
-      name: '岩石矿石'
-    },
-    {
-      value: fossilCount.value,
-      name: '化石'
-    },
-    {
-      value: meteoriteCount.value,
-      name: '陨石'
-    }
-    ],
-  }]
-};
-
-export const barOptions: EChartsOption = {
-  title: {
-    text: t('analysis.weeklyUserActivity'),
-    left: 'center'
-  },
-  tooltip: {
-    trigger: 'axis',
-    axisPointer: {
-      type: 'shadow'
-    }
-  },
-  grid: {
-    left: 50,
-    right: 20,
-    bottom: 20
-  },
-  xAxis: {
-    type: 'category',
-    data: [
-      t('analysis.monday'),
-      t('analysis.tuesday'),
-      t('analysis.wednesday'),
-      t('analysis.thursday'),
-      t('analysis.friday'),
-      t('analysis.saturday'),
-      t('analysis.sunday')
-    ],
-    axisTick: {
-      alignWithLabel: true
-    }
-  },
-  yAxis: {
-    type: 'value'
-  },
-  series: [
-    {
-      name: t('analysis.activeQuantity'),
-      data: [13253, 34235, 26321, 12340, 24643, 1322, 1324],
-      type: 'bar'
-    }
-  ]
-}
-export const barOptions1: EChartsOption = {
-
-  tooltip: {
-    trigger: 'axis',
-    axisPointer: {
-      type: 'shadow'
-    }
-  },
-  grid: {
-    left: 50,
-    right: 20,
-    bottom: 20
-  },
-  xAxis: {
-    type: 'category',
-    data: [
-      t('analysis.monday'),
-      t('analysis.tuesday'),
-      t('analysis.wednesday'),
-      t('analysis.thursday'),
-      t('analysis.friday'),
-      t('analysis.saturday'),
-      t('analysis.sunday')
-    ],
-    axisTick: {
-      alignWithLabel: true
-    }
-  },
-  yAxis: {
-    type: 'value'
-  },
-  series: [
-    {
-      name: t('analysis.activeQuantity'),
-      data: [13, 34235, 26321, 12340, 24643, 1322, 1324],
-      type: 'line'
-    }
-  ]
-}
-export const radarOption: EChartsOption = {
-  legend: {
-    data: [t('workplace.personal'), t('workplace.team')]
-  },
-  radar: {
-    // shape: 'circle',
-    indicator: [
-      { name: t('workplace.quote'), max: 65 },
-      { name: t('workplace.contribution'), max: 160 },
-      { name: t('workplace.hot'), max: 300 },
-      { name: t('workplace.yield'), max: 130 },
-      { name: t('workplace.follow'), max: 100 }
-    ]
-  },
-  series: [
-    {
-      name: `xxx${t('workplace.index')}`,
-      type: 'radar',
-      data: [
-        {
-          value: [42, 30, 20, 35, 80],
-          name: t('workplace.personal')
-        },
-        {
-          value: [50, 140, 290, 100, 90],
-          name: t('workplace.team')
-        }
-      ]
-    }
-  ]
-}
-//出库
-export const outOptions: EChartsOption = {
-  backgroundColor: "#fff",
-  legend: {
-    icon: "circle",
-    // top: "5%",
-    right: "5%",
-    textStyle: {
-      color: "#556677",
-    },
-  },
-  tooltip: {
-    trigger: "axis",
-    axisPointer: {
-      label: {
-        show: true,
-        backgroundColor: "#fff",
-        color: "#556677",
-        borderColor: "rgba(0,0,0,0)",
-        shadowColor: "rgba(0,0,0,0)",
-        shadowOffsetY: 0,
-      },
-      lineStyle: {
-        width: 0,
-      },
-    },
-    backgroundColor: "#fff",
-    textStyle: {
-      color: "#5c6c7c",
-    },
-    padding: [10, 10],
-    extraCssText: "box-shadow: 1px 0 2px 0 rgba(163,163,163,0.5)",
-  },
-  grid: {
-    left: '3%',
-    right: '3%',
-    bottom: '0%', // 减少底部边距,让 X 轴更靠近底部
-    containLabel: true
-  },
-  xAxis: [
-    {
-      type: "category",
-      data: outMonth,
-      axisLine: {
-        lineStyle: {
-          color: "#DCE2E8",
-        },
-      },
-      axisTick: {
-        show: false,
-      },
-      axisLabel: {
-        interval: 0,
-        textStyle: {
-          color: "#556677",
-        },
-        // 默认x轴字体大小
-        fontSize: 12,
-        // margin:文字到x轴的距离
-        margin: 15,
-      },
-      axisPointer: {
-        label: {
-          // padding: [11, 5, 7],
-          padding: [0, 0, 10, 0],
-          margin: 15,
-          // 移入时的字体大小
-          fontSize: 12,
-          backgroundColor: {
-            type: "linear",
-            x: 0,
-            y: 0,
-            x2: 0,
-            y2: 1,
-            colorStops: [
-              {
-                offset: 0,
-                color: "#fff", // 0% 处的颜色
-              },
-              {
-                offset: 0.86,
-                color: "#fff", // 0% 处的颜色
-              },
-              {
-                offset: 0.86,
-                color: "#dcb86b", // 0% 处的颜色
-              },
-              {
-                offset: 1,
-                color: "#dcb86b", // 100% 处的颜色
-              },
-            ],
-            global: false, // 缺省为 false
-          },
-        },
-      },
-      boundaryGap: false,
-    },
-  ],
-  yAxis: [
-    {
-      type: "value",
-      axisTick: {
-        show: false,
-      },
-      axisLine: {
-        show: true,
-        lineStyle: {
-          color: "#DCE2E8",
-        },
-      },
-      axisLabel: {
-        textStyle: {
-          color: "#556677",
-        },
-      },
-      splitLine: {
-        show: false,
-      },
-    },
-    {
-      type: "value",
-      position: "right",
-      axisTick: {
-        show: false,
-      },
-      axisLabel: {
-        textStyle: {
-          color: "#556677",
-        },
-        formatter: "{value}",
-      },
-      axisLine: {
-        show: true,
-        lineStyle: {
-          color: "#DCE2E8",
-        },
-      },
-      splitLine: {
-        show: false,
-      },
-    },
-  ],
-  series: [
-    {
-      name: "出库",
-      type: "line",
-      data: outNum,
-      symbolSize: 1,
-      symbol: "circle",
-      smooth: true,
-      yAxisIndex: 0,
-      
-      showSymbol: false,
-      lineStyle: {
-        width: 4,
-        color: "rgba(247, 203, 107, 1)",
-        // shadowColor: "rgba(247, 203, 107, 0.3)",
-        // shadowBlur: 10,
-        // shadowOffsetY: 20,
-      },
-      itemStyle: {
-        normal: {
-          color: "rgba(247, 203, 107, 1)",
-          borderColor: "rgba(247, 203, 107, 1)",
-        },
-      },
-    },
-
-  ],
-};
-//入库
-export const enterOptions: EChartsOption = {
-  backgroundColor: "#fff",
-  legend: {
-    icon: "circle",
-    // top: "5%",
-    right: "5%",
-    textStyle: {
-      color: "#556677",
-    },
-  },
-  tooltip: {
-    trigger: "axis",
-    axisPointer: {
-      label: {
-        show: true,
-        backgroundColor: "#fff",
-        color: "#556677",
-        borderColor: "rgba(0,0,0,0)",
-        shadowColor: "rgba(0,0,0,0)",
-        shadowOffsetY: 0,
-      },
-      lineStyle: {
-        width: 0,
-      },
-    },
-    backgroundColor: "#fff",
-    textStyle: {
-      color: "#5c6c7c",
-    },
-    padding: [10, 10],
-    extraCssText: "box-shadow: 1px 0 2px 0 rgba(163,163,163,0.5)",
-  },
-  grid: {
-    left: '3%',
-    right: '3%',
-    bottom: '0%', // 减少底部边距,让 X 轴更靠近底部
-    containLabel: true
-  },
-  xAxis: [
-    {
-      type: "category",
-      data: enterMonth,//['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
-      axisLine: {
-        lineStyle: {
-          color: "#DCE2E8",
-        },
-      },
-      axisTick: {
-        show: false,
-      },
-      axisLabel: {
-        interval: 0,
-        textStyle: {
-          color: "#556677",
-        },
-        // 默认x轴字体大小
-        fontSize: 12,
-        // margin:文字到x轴的距离
-        margin: 15,
-      },
-      axisPointer: {
-        label: {
-          // padding: [11, 5, 7],
-          padding: [0, 0, 10, 0],
-          margin: 15,
-          // 移入时的字体大小
-          fontSize: 12,
-          backgroundColor: {
-            type: "linear",
-            x: 0,
-            y: 0,
-            x2: 0,
-            y2: 1,
-            colorStops: [
-              {
-                offset: 0,
-                color: "#fff", // 0% 处的颜色
-              },
-              {
-                offset: 0.86,
-                color: "#fff", // 0% 处的颜色
-              },
-              {
-                offset: 0.86,
-                color: "#dcb86b", // 0% 处的颜色
-              },
-              {
-                offset: 1,
-                color: "#dcb86b", // 100% 处的颜色
-              },
-            ],
-            global: false, // 缺省为 false
-          },
-        },
-      },
-      boundaryGap: false,
-    },
-  ],
-  yAxis: [
-    {
-      type: "value",
-      axisTick: {
-        show: false,
-      },
-      axisLine: {
-        show: true,
-        lineStyle: {
-          color: "#DCE2E8",
-        },
-      },
-      axisLabel: {
-        textStyle: {
-          color: "#556677",
-        },
-      },
-      splitLine: {
-        show: false,
-      },
-    },
-    {
-      type: "value",
-      position: "right",
-      axisTick: {
-        show: false,
-      },
-      axisLabel: {
-        textStyle: {
-          color: "#556677",
-        },
-        formatter: "{value}",
-      },
-      axisLine: {
-        show: true,
-        lineStyle: {
-          color: "#DCE2E8",
-        },
-      },
-      splitLine: {
-        show: false,
-      },
-    },
-  ],
-  series: [
-
-    {
-      name: "入库",
-      type: "line",
-      data: enterNum,
-      symbolSize: 1,
-      symbol: "circle",
-      smooth: true,
-      yAxisIndex: 0,
-      showSymbol: false,
-      lineStyle: {
-        width: 4,
-        color:" rgba(251, 169, 128, 1)",
-        // shadowColor: "rgba(251, 169, 128, 0.3)",
-        // shadowBlur: 10,
-        // shadowOffsetY: 20,
-      },
-      itemStyle: {
-        normal: {
-          color: "rgba(251, 169, 128, 1)",
-          borderColor: "rgba(251, 169, 128, 1)",
-        },
-      },
-    }
-  ],
-};
-//回库
-export const backOptions: EChartsOption = {
-  backgroundColor: "#fff",
-  legend: {
-    icon: "circle",
-    // top: "5%",
-    right: "5%",
-    textStyle: {
-      color: "#556677",
-    },
-  },
-  tooltip: {
-    trigger: "axis",
-    axisPointer: {
-      label: {
-        show: true,
-        backgroundColor: "#fff",
-        color: "#556677",
-        borderColor: "rgba(0,0,0,0)",
-        shadowColor: "rgba(0,0,0,0)",
-        shadowOffsetY: 0,
-      },
-      lineStyle: {
-        width: 0,
-      },
-    },
-    backgroundColor: "#fff",
-    textStyle: {
-      color: "#5c6c7c",
-    },
-    padding: [10, 10],
-    extraCssText: "box-shadow: 1px 0 2px 0 rgba(163,163,163,0.5)",
-  },
-  grid: {
-    left: '3%',
-    right: '3%',
-    bottom: '0%', // 减少底部边距,让 X 轴更靠近底部
-    containLabel: true
-  },
-  xAxis: [
-    {
-      type: "category",
-      data: returnMonth,
-      axisLine: {
-        lineStyle: {
-          color: "#DCE2E8",
-        },
-      },
-      axisTick: {
-        show: false,
-      },
-      axisLabel: {
-        interval: 0,
-        textStyle: {
-          color: "#556677",
-        },
-        // 默认x轴字体大小
-        fontSize: 12,
-        // margin:文字到x轴的距离
-        margin: 15,
-      },
-      axisPointer: {
-        label: {
-          // padding: [11, 5, 7],
-          padding: [0, 0, 10, 0],
-          margin: 15,
-          // 移入时的字体大小
-          fontSize: 12,
-          backgroundColor: {
-            type: "linear",
-            x: 0,
-            y: 0,
-            x2: 0,
-            y2: 1,
-            colorStops: [
-              {
-                offset: 0,
-                color: "#fff", // 0% 处的颜色
-              },
-              {
-                offset: 0.86,
-
-                color: "#fff", // 0% 处的颜色
-              },
-              {
-                offset: 0.86,
-                color: "#dcb86b", // 0% 处的颜色
-              },
-              {
-                offset: 1,
-                color: "#dcb86b", // 100% 处的颜色
-              },
-            ],
-            global: false, // 缺省为 false
-          },
-        },
-      },
-      boundaryGap: false,
+  series: [
+    {
+      name: t('analysis.estimate'),
+      smooth: true,
+      type: 'line',
+      data: [100, 120, 161, 134, 105, 160, 165, 114, 163, 185, 118, 123],
+      animationDuration: 2800,
+      animationEasing: 'cubicInOut'
     },
-  ],
-  yAxis: [
     {
-      type: "value",
-      axisTick: {
-        show: false,
-      },
-      axisLine: {
+      name: t('analysis.actual'),
+      smooth: true,
+      type: 'line',
+      itemStyle: {},
+      data: [120, 82, 91, 154, 162, 140, 145, 250, 134, 56, 99, 123],
+      animationDuration: 2800,
+      animationEasing: 'quadraticOut'
+    }
+  ]
+}
+//按标本类型统计
+export const pieOptions: EChartsOption = {
+  // color: ['#1F78B4', '#A6CEE3', '#B2DF8A', '#33A02C', '#FB9A99', '#E31A1C'],
+  // color: ['#fba980', '#fada8b', '#fdf5e1', '#dedede'],
+  color: [ '#90cedd', '#fbf5bf','#fecb70', '#ce6116'],
+    // color: ['rgba(206,97,22,.7)', 'rgba(247,235,182,.7)', 'rgba(162,214,201,.7)', 'rgba(51,143,180,.7)'],
+    // color: ['rgba(206,97,22,.7)', 'rgba(247,235,182,.7)', 'rgba(162,214,201,.7)', 'rgba(51,143,180,.7)'],
+
+  legend: {
+    icon: "circle",
+    top: "2%",
+    textStyle: {
+      color: "#556677",
+    },
+  },
+  
+  tooltip: {
+    trigger: "item",
+    axisPointer: {
+      label: {
         show: true,
-        lineStyle: {
-          color: "#DCE2E8",
-        },
-      },
-      axisLabel: {
-        textStyle: {
-          color: "#556677",
-        },
+        backgroundColor: "#fff",
+        color: "#556677",
+        borderColor: "rgba(0,0,0,0)",
+        shadowColor: "rgba(0,0,0,0)",
+        shadowOffsetY: 0,
       },
-      splitLine: {
-        show: false,
+      lineStyle: {
+        width: 0,
       },
     },
+    backgroundColor: "#fff",
+    textStyle: {
+      color: "#5c6c7c",
+    },
+    padding: [10, 10],
+    extraCssText: "box-shadow: 1px 0 2px 0 rgba(163,163,163,0.5)",
+  },
+  series: [{
+    type: 'pie',
+    radius: ['35%', '66%'],
+    center: ['50%', '55%'],
+    // label: {
+    //     fontSize: 16,
+    //     formatter: '{b} {d}%',
+    // },
+    // startAngle: 180,
+    // endAngle: 360,
+    data: [{
+      value: mineralCount.value,
+      name: '矿物'
+    },
     {
-      type: "value",
-      position: "left",
-      axisTick: {
-        show: false,
-      },
-      axisLabel: {
-        textStyle: {
-          color: "#556677",
-        },
-        formatter: "{value}",
-      },
-      axisLine: {
-        show: true,
-        lineStyle: {
-          color: "#DCE2E8",
-        },
-      },
-      splitLine: {
-        show: false,
-      },
+      value: rockOreCount.value,
+      name: '岩石矿石'
     },
-  ],
-  series: [
-
     {
-      name: "回库",
-      type: "line",
-      data: returnNum,
-      symbolSize: 1,
-      yAxisIndex: 1,
-      symbol: "circle",
-      smooth: true,
-      showSymbol: false,
-      lineStyle: {
-        width: 4,
-        color: "rgba(222,184,135, .9)",
-        // shadowColor: "rgba(222,184,135, 0.3)",
-        // shadowBlur: 10,
-        // shadowOffsetY: 20,
-      },
-      itemStyle: {
-        normal: {
-          color: "rgba(222,184,135, 1)",
-          borderColor: "rgba(222,184,135, 1)",
-        },
-      },
+      value: fossilCount.value,
+      name: '化石'
     },
-  ],
+    {
+      value: meteoriteCount.value,
+      name: '陨石'
+    }
+    ],
+  }]
 };
+
+
+
+
 //历年标本来源增减统计
-export const originOptions111: EChartsOption = {
+export const originOptions: EChartsOption = {
   backgroundColor: 'transparent', // 设置背景色为透明
   legend: {
     icon: "circle",
@@ -1799,178 +1171,3 @@ export const returnRatioOptions: EChartsOption = {
   }]
 }
 
-export const originOptions: EChartsOption = {
-  backgroundColor: '#fff',
-  grid: {
-    left: '3%',
-    right: '3%',
-    top: '0%',
-    bottom: '0%', // 减少底部边距,让 X 轴更靠近底部
-    containLabel: true
-  },
-  legend: {
-    icon: "circle",
-    // top: "5%",
-    right: "5%",
-    textStyle: {
-      color: "#556677",
-    },
-  },
-  // xAxis: {
-  //   type: 'category',
-
-  //   data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
-
-  // },
-  xAxis: {
-    position: 'bottom',
-    type: 'category',
-    //  boundaryGap: false,
-    axisLine: {
-      show: true,
-      lineStyle: {
-        color: '#ECF1F6'
-      }
-    },
-    axisTick: {
-      show: false,
-    },
-    axisLabel: {
-      show: true,
-      rotate: 0,
-      fontSize: 12,
-      color: 'rgba(0, 0, 0, 1)'
-    },
-    splitLine: {
-      show: true,
-      lineStyle: {
-        color: 'rgba(193, 207, 220, 1)',
-        width: 0,
-        type: 'dashed'
-      }
-    },
-    gridIndex: 0,
-    data: ['12', '13', '14', '15', '16', '17', '18日'],
-  },
-  yAxis: [
-    {
-      type: "value",
-      axisTick: {
-        show: false,
-      },
-      axisLine: {
-        show: true,
-        lineStyle: {
-          color: "#DCE2E8",
-        },
-      },
-      axisLabel: {
-        textStyle: {
-          color: "#556677",
-        },
-      },
-      splitLine: {
-        show: false,
-      },
-    },
-    {
-      type: "value",
-      position: "right",
-      axisTick: {
-        show: false,
-      },
-      axisLabel: {
-        textStyle: {
-          color: "#556677",
-        },
-        formatter: "{value}",
-      },
-      axisLine: {
-        show: true,
-        lineStyle: {
-          color: "#DCE2E8",
-        },
-      },
-      splitLine: {
-        show: false,
-      },
-    },
-  ],
-  series: [
-    {
-      data: [820, 932, 901, 934, 1290, 1330, 1320],
-      type: 'line',
-      areaStyle: {
-        normal: {
-          color: new echarts.graphic.LinearGradient(
-            0,
-            0,
-            0,
-            1,
-            [
-              {
-                offset: 0,
-                color: 'rgba(145, 118, 215,0.5)',
-              },
-              {
-                offset: 1,
-                color: 'rgba(145, 118, 215,0)',
-              },
-            ],
-            false
-          ),
-        },
-      },
-    },
-    {
-      data: [520, 232, 501, 834, 490, 630, 920],
-      type: 'line',
-      areaStyle: {
-        normal: {
-          color: new echarts.graphic.LinearGradient(
-            0,
-            0,
-            0,
-            1,
-            [
-              {
-                offset: 0,
-                color: 'rgba(145, 118, 215,0.5)',
-              },
-              {
-                offset: 1,
-                color: 'rgba(145, 118, 215,0)',
-              },
-            ],
-            false
-          ),
-        },
-      },
-    },
-    {
-      data: [620, 832, 1001, 354, 345, 150, 320],
-      type: 'line',
-      areaStyle: {
-        normal: {
-          color: new echarts.graphic.LinearGradient(
-            0,
-            0,
-            0,
-            1,
-            [
-              {
-                offset: 0,
-                color: 'rgba(145, 118, 215,0.5)',
-              },
-              {
-                offset: 1,
-                color: 'rgba(145, 118, 215,0)',
-              },
-            ],
-            false
-          ),
-        },
-      },
-    }
-  ]
-};