|
@@ -1,188 +1,290 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <el-card shadow="never">
|
|
|
- <el-skeleton :loading="loading" animated>
|
|
|
- <el-row :gutter="16" justify="space-between">
|
|
|
- <el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
|
|
|
- <div class="flex items-center">
|
|
|
- <el-avatar :src="avatar" :size="70" class="mr-16px">
|
|
|
- <img src="@/assets/imgs/avatar.gif" alt="" />
|
|
|
- </el-avatar>
|
|
|
- <div>
|
|
|
- <div class="text-20px">
|
|
|
- {{ t('workplace.welcome') }} {{ username }} {{ t('workplace.happyDay') }}
|
|
|
- </div>
|
|
|
- <div class="mt-10px text-14px text-gray-500">
|
|
|
- {{ t('workplace.toady') }},20℃ - 32℃!
|
|
|
+ <div class="bg">
|
|
|
+ <!-- <div>
|
|
|
+ <el-card shadow="never">
|
|
|
+ <el-skeleton :loading="loading" animated>
|
|
|
+ <el-row :gutter="16" justify="space-between">
|
|
|
+ <el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
|
|
|
+ <div class="flex items-center">
|
|
|
+ <el-avatar :src="avatar" :size="70" class="mr-16px">
|
|
|
+ <img src="@/assets/imgs/avatar.gif" alt="" />
|
|
|
+ </el-avatar>
|
|
|
+ <div>
|
|
|
+ <div class="text-20px">
|
|
|
+ {{ t('workplace.welcome') }} {{ username }} {{ t('workplace.happyDay') }}
|
|
|
+ </div>
|
|
|
+ <div class="mt-10px text-14px text-gray-500">
|
|
|
+ {{ t('workplace.toady') }},20℃ - 32℃!
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
|
|
|
- <div class="h-70px flex items-center justify-end lt-sm:mt-10px">
|
|
|
- <div class="px-8px text-right">
|
|
|
- <div class="mb-16px text-14px text-gray-400">{{ t('workplace.project') }}</div>
|
|
|
- <CountTo
|
|
|
- class="text-20px"
|
|
|
- :start-val="0"
|
|
|
- :end-val="totalSate.project"
|
|
|
- :duration="2600"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <el-divider direction="vertical" />
|
|
|
- <div class="px-8px text-right">
|
|
|
- <div class="mb-16px text-14px text-gray-400">{{ t('workplace.toDo') }}</div>
|
|
|
- <CountTo
|
|
|
- class="text-20px"
|
|
|
- :start-val="0"
|
|
|
- :end-val="totalSate.todo"
|
|
|
- :duration="2600"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <el-divider direction="vertical" border-style="dashed" />
|
|
|
- <div class="px-8px text-right">
|
|
|
- <div class="mb-16px text-14px text-gray-400">{{ t('workplace.access') }}</div>
|
|
|
- <CountTo
|
|
|
- class="text-20px"
|
|
|
- :start-val="0"
|
|
|
- :end-val="totalSate.access"
|
|
|
- :duration="2600"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-skeleton>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
+ </el-col>
|
|
|
|
|
|
- <el-row class="mt-8px" :gutter="8" justify="space-between">
|
|
|
- <el-col :xl="16" :lg="16" :md="24" :sm="24" :xs="24" class="mb-8px">
|
|
|
- <el-card shadow="never">
|
|
|
- <template #header>
|
|
|
- <div class="h-3 flex justify-between">
|
|
|
- <span>{{ t('workplace.project') }}</span>
|
|
|
- <el-link
|
|
|
- type="primary"
|
|
|
- :underline="false"
|
|
|
- href="https://github.com/yudaocode"
|
|
|
- target="_blank"
|
|
|
- >
|
|
|
- {{ t('action.more') }}
|
|
|
- </el-link>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <el-skeleton :loading="loading" animated>
|
|
|
- <el-row>
|
|
|
- <el-col
|
|
|
- v-for="(item, index) in projects"
|
|
|
- :key="`card-${index}`"
|
|
|
- :xl="8"
|
|
|
- :lg="8"
|
|
|
- :md="8"
|
|
|
- :sm="24"
|
|
|
- :xs="24"
|
|
|
- >
|
|
|
- <el-card shadow="hover" class="mr-5px mt-5px">
|
|
|
- <div class="flex items-center">
|
|
|
- <Icon :icon="item.icon" :size="50" class="mr-8px" />
|
|
|
- <span class="text-16px">{{ item.name }}</span>
|
|
|
+ <el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
|
|
|
+ <div class="h-70px flex items-center justify-end lt-sm:mt-10px">
|
|
|
+ <div class="px-8px text-right">
|
|
|
+ <div class="mb-16px text-14px text-gray-400">{{ t('workplace.project') }}</div>
|
|
|
+ <CountTo class="text-20px" :start-val="0" :end-val="totalSate.project" :duration="2600" />
|
|
|
+ </div>
|
|
|
+ <el-divider direction="vertical" />
|
|
|
+ <div class="px-8px text-right">
|
|
|
+ <div class="mb-16px text-14px text-gray-400">{{ t('workplace.toDo') }}</div>
|
|
|
+ <CountTo class="text-20px" :start-val="0" :end-val="totalSate.todo" :duration="2600" />
|
|
|
</div>
|
|
|
- <div class="mt-12px text-9px text-gray-400">{{ t(item.message) }}</div>
|
|
|
- <div class="mt-12px flex justify-between text-12px text-gray-400">
|
|
|
- <span>{{ item.personal }}</span>
|
|
|
- <span>{{ formatTime(item.time, 'yyyy-MM-dd') }}</span>
|
|
|
+ <el-divider direction="vertical" border-style="dashed" />
|
|
|
+ <div class="px-8px text-right">
|
|
|
+ <div class="mb-16px text-14px text-gray-400">{{ t('workplace.access') }}</div>
|
|
|
+ <CountTo class="text-20px" :start-val="0" :end-val="totalSate.access" :duration="2600" />
|
|
|
</div>
|
|
|
- </el-card>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-skeleton>
|
|
|
</el-card>
|
|
|
+ </div> -->
|
|
|
|
|
|
- <el-card shadow="never" class="mt-8px">
|
|
|
- <el-skeleton :loading="loading" animated>
|
|
|
- <el-row :gutter="20" justify="space-between">
|
|
|
- <el-col :xl="10" :lg="10" :md="24" :sm="24" :xs="24">
|
|
|
- <el-card shadow="hover" class="mb-8px">
|
|
|
- <el-skeleton :loading="loading" animated>
|
|
|
- <Echart :options="pieOptionsData" :height="280" />
|
|
|
- </el-skeleton>
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- <el-col :xl="14" :lg="14" :md="24" :sm="24" :xs="24">
|
|
|
- <el-card shadow="hover" class="mb-8px">
|
|
|
- <el-skeleton :loading="loading" animated>
|
|
|
- <Echart :options="barOptionsData" :height="280" />
|
|
|
- </el-skeleton>
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-skeleton>
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- <el-col :xl="8" :lg="8" :md="24" :sm="24" :xs="24" class="mb-8px">
|
|
|
- <el-card shadow="never">
|
|
|
- <template #header>
|
|
|
- <div class="h-3 flex justify-between">
|
|
|
- <span>{{ t('workplace.shortcutOperation') }}</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <el-skeleton :loading="loading" animated>
|
|
|
- <el-row>
|
|
|
- <el-col v-for="item in shortcut" :key="`team-${item.name}`" :span="8" class="mb-8px">
|
|
|
- <div class="flex items-center">
|
|
|
- <Icon :icon="item.icon" class="mr-8px" />
|
|
|
- <el-link type="default" :underline="false" @click="setWatermark(item.name)">
|
|
|
- {{ item.name }}
|
|
|
- </el-link>
|
|
|
+ <el-skeleton :loading="loading" animated>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col>
|
|
|
+ <div class="introduce">
|
|
|
+ <div class="introduce-num" shadow="hover">
|
|
|
+ <div class="introduce-img">
|
|
|
+ <img src="/@/assets/imgs/zs2.png" alt="" />
|
|
|
</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-skeleton>
|
|
|
- </el-card>
|
|
|
- <el-card shadow="never" class="mt-8px">
|
|
|
- <template #header>
|
|
|
- <div class="h-3 flex justify-between">
|
|
|
- <span>{{ t('workplace.notice') }}</span>
|
|
|
- <el-link type="primary" :underline="false">{{ t('action.more') }}</el-link>
|
|
|
+ <div class="introduce-text">
|
|
|
+ <div>标本总数</div>
|
|
|
+ <div class="multiple-text-shadow">{{ totalSamples }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="introduce-num">
|
|
|
+ <div class="introduce-img">
|
|
|
+ <img src="/@/assets/imgs/kw5.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div class="introduce-text">
|
|
|
+ <div>矿物</div>
|
|
|
+ <div>{{ mineralCount }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="introduce-num">
|
|
|
+ <div class="introduce-img">
|
|
|
+ <img src="/@/assets/imgs/kw4.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div class="introduce-text">
|
|
|
+ <div>岩石矿石</div>
|
|
|
+ <div>{{ fossilCount }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="introduce-num">
|
|
|
+ <div class="introduce-img">
|
|
|
+ <img style="width: 90px;height: 90px;" src="/@/assets/imgs/hs4.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div class="introduce-text">
|
|
|
+ <div>化石</div>
|
|
|
+ <div>{{ meteoriteCount }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="introduce-num">
|
|
|
+ <div class="introduce-img">
|
|
|
+ <img style="width: 90px;height: 100px;" src="/@/assets/imgs/ys5.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div class="introduce-text">
|
|
|
+ <div>陨石</div>
|
|
|
+ <div>{{ rockOreCount }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
- </template>
|
|
|
- <el-skeleton :loading="loading" animated>
|
|
|
- <div v-for="(item, index) in notice" :key="`dynamics-${index}`">
|
|
|
- <div class="flex items-center">
|
|
|
- <el-avatar :src="avatar" :size="35" class="mr-16px">
|
|
|
- <img src="@/assets/imgs/avatar.gif" alt="" />
|
|
|
- </el-avatar>
|
|
|
- <div>
|
|
|
- <div class="text-14px">
|
|
|
- <Highlight :keys="item.keys.map((v) => t(v))">
|
|
|
- {{ item.type }} : {{ item.title }}
|
|
|
- </Highlight>
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-skeleton>
|
|
|
+ <!-- 本年标本出入回库情况new -->
|
|
|
+ <el-skeleton :loading="loading" animated>
|
|
|
+ <el-row>
|
|
|
+ <!-- 本年标本出库 -->
|
|
|
+ <el-col :xl="5" :lg="5" :md="5" :sm="24" :xs="24">
|
|
|
+ <el-card shadow="hover" class="mr-5px mt-5px">
|
|
|
+ <div class="title"><img style="width: 25px;height: 25px;" src="/@/assets/imgs/ck5.png" alt="" /><span>本月出库数</span></div>
|
|
|
+ <div class="specimen-month">
|
|
|
+ <div class="month">
|
|
|
+ <div class="month-bottom">
|
|
|
+ <div>{{outNumber}}</div>
|
|
|
+ <div>月环比 <span>{{outRatio.toFixed(0)}}%</span></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="month1">
|
|
|
+ <Echart :options="outRatioOptionsData" :height="280" :width="'140%'" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <!-- 本年标本入库 -->
|
|
|
+ <el-col :xl="5" :lg="5" :md="5" :sm="24" :xs="24">
|
|
|
+
|
|
|
+ <el-card shadow="hover" class="mr-5px mt-5px">
|
|
|
+ <div class="title"><img style="width: 30px;height: 30px;" src="/@/assets/imgs/rk3.png" alt="" /><span>本月入库数</span></div>
|
|
|
+ <div class="specimen-month">
|
|
|
+ <div class="month">
|
|
|
+ <div class="month-bottom">
|
|
|
+ <div>{{enterNumber}}</div>
|
|
|
+ <div>月环比 <span>{{enterRatio.toFixed(0)}}%</span></div>
|
|
|
</div>
|
|
|
- <div class="mt-16px text-12px text-gray-400">
|
|
|
- {{ formatTime(item.date, 'yyyy-MM-dd') }}
|
|
|
+ </div>
|
|
|
+ <div class="month1">
|
|
|
+ <Echart :options="enterRatioOptionsData" :height="280" :width="'140%'" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <!-- 本年标本回库 -->
|
|
|
+ <el-col :xl="5" :lg="5" :md="5" :sm="24" :xs="24">
|
|
|
+
|
|
|
+ <el-card shadow="hover" class="mr-5px mt-5px">
|
|
|
+ <div class="title"><img style="width: 25px;height: 25px;" src="/@/assets/imgs/hk2.png" alt="" /><span>本月回库数</span></div>
|
|
|
+ <div class="specimen-month">
|
|
|
+ <div class="month">
|
|
|
+ <div class="month-bottom">
|
|
|
+ <div>{{returnNumber}}</div>
|
|
|
+ <div>月环比 <span>{{returnRatio.toFixed(0)}}%</span></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="month1">
|
|
|
+ <Echart :options="returnRatioOptionsData" :height="280" :width="'140%'" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <el-divider />
|
|
|
- </div>
|
|
|
- </el-skeleton>
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xl="9" :lg="9" :md="9" :sm="24" :xs="24">
|
|
|
+ <el-card shadow="hover">
|
|
|
+ <template #header>
|
|
|
+ <div class="title"><img src="/@/assets/imgs/tj3.png" alt="" /><span>本年标本数量统计</span></div>
|
|
|
+ </template>
|
|
|
+ <el-skeleton :loading="loading" animated>
|
|
|
+ <Echart :options="mouthOptionsData" :height="250" />
|
|
|
+ </el-skeleton>
|
|
|
+ </el-card>
|
|
|
+ <!-- 历年标本来源增减统计 -->
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-skeleton>
|
|
|
+
|
|
|
+ <!-- 本年标本出入回库情况2 -->
|
|
|
+ <el-skeleton :loading="loading" animated>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xl="9" :lg="9" :md="9" :sm="24" :xs="24">
|
|
|
+ <el-card shadow="hover">
|
|
|
+ <template #header>
|
|
|
+ <div class="title"><img src="/@/assets/imgs/tj3.png" alt="" /><span>历年标本数量统计</span></div>
|
|
|
+ </template>
|
|
|
+ <el-skeleton :loading="loading" animated>
|
|
|
+ <Echart :options="yearOptionsData" :height="310" />
|
|
|
+ </el-skeleton>
|
|
|
+ </el-card>
|
|
|
+ <!-- 历年标本来源增减统计 -->
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ <el-col :xl="9" :lg="9" :md="9" :sm="24" :xs="24">
|
|
|
+ <el-card shadow="hover">
|
|
|
+ <template #header>
|
|
|
+ <div class="title"><img src="/@/assets/imgs/tj3.png" alt="" /><span>历年标本来源增减统计</span></div>
|
|
|
+ </template>
|
|
|
+ <el-skeleton :loading="loading" animated>
|
|
|
+ <Echart :options="originOptions111Data" :height="310" />
|
|
|
+ </el-skeleton>
|
|
|
+ </el-card>
|
|
|
+ <!-- 历年标本来源增减统计 -->
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ <!-- 本年标本回库 -->
|
|
|
+ <el-col :xl="6" :lg="6" :md="6" :sm="24" :xs="24">
|
|
|
+
|
|
|
+ <el-card shadow="hover" class="mr-5px mt-5px">
|
|
|
+ <div class="title"><img src="/@/assets/imgs/tj3.png" alt="" /><span>按标本类型统计</span></div>
|
|
|
+ <Echart :options="pieOptionsData" :height="335" />
|
|
|
+
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ </el-skeleton>
|
|
|
+ </div>
|
|
|
+
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
import { set } from 'lodash-es'
|
|
|
import { EChartsOption } from 'echarts'
|
|
|
-import { formatTime } from '@/utils'
|
|
|
+// 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, Notice, Shortcut } from './types'
|
|
|
-import { pieOptions, barOptions } from './echarts-data'
|
|
|
-
|
|
|
+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';
|
|
|
defineOptions({ name: 'Home' })
|
|
|
|
|
|
+
|
|
|
+//获取标本类型数
|
|
|
+import * as WorkbenchApi from '@/api/workbench'
|
|
|
+// const workbenchList = ref([] as WorkbenchApi.WorkbenchVO[]) //标本列表
|
|
|
+const totalSamples = ref(0);
|
|
|
+const mineralCount = ref(0);
|
|
|
+const fossilCount = ref(0);
|
|
|
+const meteoriteCount = ref(0);
|
|
|
+const rockOreCount = ref(0);
|
|
|
+const enterNumber = ref(0);
|
|
|
+const outNumber = ref(0);
|
|
|
+const returnNumber = ref(0);
|
|
|
+const enterNumber1 = ref(0);
|
|
|
+const outNumber1 = ref(0);
|
|
|
+const returnNumber1 = ref(0);
|
|
|
+const enterRatio = ref(0);
|
|
|
+const outRatio = ref(0);
|
|
|
+const returnRatio = ref(0);
|
|
|
+
|
|
|
+//初始化
|
|
|
+onMounted(async () => {
|
|
|
+ const { samples } = await WorkbenchApi.getSpecimenTypeList();
|
|
|
+ totalSamples.value = samples['标本总数'];
|
|
|
+ mineralCount.value = samples['矿物'];
|
|
|
+ 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);
|
|
|
+ returnSpecimen.value = await WorkbenchApi.getReturnSpecimenList(year);
|
|
|
+ const enter = enterSpecimen.value.data
|
|
|
+ const out = outSpecimen.value.data
|
|
|
+ const return1 = returnSpecimen.value.data
|
|
|
+ enterNumber.value = enter[enter.length - 1].number;
|
|
|
+ outNumber.value = out[out.length - 1].number;
|
|
|
+ returnNumber.value = return1[return1.length - 1].number;
|
|
|
+ enterNumber1.value = enter[enter.length - 2].number;
|
|
|
+ outNumber1.value = out[out.length - 2].number;
|
|
|
+ returnNumber1.value = return1[return1.length - 2].number;
|
|
|
+ console.log(enterNumber.value,outNumber,returnNumber);
|
|
|
+ enterRatio.value = (enterNumber.value-enterNumber1.value)/enterNumber.value*100;
|
|
|
+ outRatio.value = (outNumber.value-outNumber1.value)/outNumber.value*100;
|
|
|
+ returnRatio.value = (returnNumber.value-returnNumber1.value)/returnNumber.value*100;
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
const { t } = useI18n()
|
|
|
const userStore = useUserStore()
|
|
|
const { setWatermark } = useWatermark()
|
|
@@ -256,37 +358,7 @@ const getProject = async () => {
|
|
|
projects = Object.assign(projects, data)
|
|
|
}
|
|
|
|
|
|
-// 获取通知公告
|
|
|
-let notice = reactive<Notice[]>([])
|
|
|
-const getNotice = async () => {
|
|
|
- const data = [
|
|
|
- {
|
|
|
- title: '系统支持 JDK 8/17/21,Vue 2/3',
|
|
|
- type: '通知',
|
|
|
- keys: ['通知', '8', '17', '21', '2', '3'],
|
|
|
- date: new Date()
|
|
|
- },
|
|
|
- {
|
|
|
- title: '后端提供 Spring Boot 2.7/3.2 + Cloud 双架构',
|
|
|
- type: '公告',
|
|
|
- keys: ['公告', 'Boot', 'Cloud'],
|
|
|
- date: new Date()
|
|
|
- },
|
|
|
- {
|
|
|
- title: '全部开源,个人与企业可 100% 直接使用,无需授权',
|
|
|
- type: '通知',
|
|
|
- keys: ['通知', '无需授权'],
|
|
|
- date: new Date()
|
|
|
- },
|
|
|
- {
|
|
|
- title: '国内使用最广泛的快速开发平台,超 300+ 人贡献',
|
|
|
- type: '公告',
|
|
|
- keys: ['公告', '最广泛'],
|
|
|
- date: new Date()
|
|
|
- }
|
|
|
- ]
|
|
|
- notice = Object.assign(notice, data)
|
|
|
-}
|
|
|
+
|
|
|
|
|
|
// 获取快捷入口
|
|
|
let shortcut = reactive<Shortcut[]>([])
|
|
@@ -328,30 +400,57 @@ const getShortcut = async () => {
|
|
|
}
|
|
|
|
|
|
// 用户来源
|
|
|
-const getUserAccessSource = async () => {
|
|
|
+// const getUserAccessSource = async () => {
|
|
|
+// const data = [
|
|
|
+// { value: 335, name: 'analysis.directAccess' },
|
|
|
+// { value: 310, name: 'analysis.mailMarketing' },
|
|
|
+// { value: 234, name: 'analysis.allianceAdvertising' },
|
|
|
+// { value: 135, name: 'analysis.videoAdvertising' },
|
|
|
+// { value: 1548, name: 'analysis.searchEngines' }
|
|
|
+// ]
|
|
|
+// set(
|
|
|
+// pieOptionsData,
|
|
|
+// 'legend.data',
|
|
|
+// data.map((v) => t(v.name))
|
|
|
+// )
|
|
|
+// pieOptionsData!.series![0].data = data.map((v) => {
|
|
|
+// return {
|
|
|
+// name: t(v.name),
|
|
|
+// value: v.value
|
|
|
+// }
|
|
|
+// })
|
|
|
+// }
|
|
|
+const barOptionsData = reactive<EChartsOption>(barOptions) as EChartsOption
|
|
|
+
|
|
|
+// 周活跃量
|
|
|
+const getWeeklyUserActivity = async () => {
|
|
|
const data = [
|
|
|
- { value: 335, name: 'analysis.directAccess' },
|
|
|
- { value: 310, name: 'analysis.mailMarketing' },
|
|
|
- { value: 234, name: 'analysis.allianceAdvertising' },
|
|
|
- { value: 135, name: 'analysis.videoAdvertising' },
|
|
|
- { value: 1548, name: 'analysis.searchEngines' }
|
|
|
+ { 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(
|
|
|
- pieOptionsData,
|
|
|
- 'legend.data',
|
|
|
+ barOptionsData,
|
|
|
+ 'xAxis.data',
|
|
|
data.map((v) => t(v.name))
|
|
|
)
|
|
|
- pieOptionsData!.series![0].data = data.map((v) => {
|
|
|
- return {
|
|
|
- name: t(v.name),
|
|
|
- value: v.value
|
|
|
+ set(barOptionsData, 'series', [
|
|
|
+ {
|
|
|
+ name: t('analysis.activeQuantity'),
|
|
|
+ data: data.map((v) => v.value),
|
|
|
+ type: 'bar'
|
|
|
}
|
|
|
- })
|
|
|
+ ])
|
|
|
}
|
|
|
-const barOptionsData = reactive<EChartsOption>(barOptions) as EChartsOption
|
|
|
+
|
|
|
+const barOptionsData1 = reactive<EChartsOption>(barOptions1) as EChartsOption
|
|
|
|
|
|
// 周活跃量
|
|
|
-const getWeeklyUserActivity = async () => {
|
|
|
+const getWeeklyUserActivity1 = async () => {
|
|
|
const data = [
|
|
|
{ value: 13253, name: 'analysis.monday' },
|
|
|
{ value: 34235, name: 'analysis.tuesday' },
|
|
@@ -362,30 +461,253 @@ const getWeeklyUserActivity = async () => {
|
|
|
{ value: 1324, name: 'analysis.sunday' }
|
|
|
]
|
|
|
set(
|
|
|
- barOptionsData,
|
|
|
+ barOptionsData1,
|
|
|
'xAxis.data',
|
|
|
data.map((v) => t(v.name))
|
|
|
)
|
|
|
- set(barOptionsData, 'series', [
|
|
|
+ set(barOptionsData1, 'series', [
|
|
|
{
|
|
|
name: t('analysis.activeQuantity'),
|
|
|
data: data.map((v) => v.value),
|
|
|
- type: 'bar'
|
|
|
+ type: 'line'
|
|
|
}
|
|
|
])
|
|
|
}
|
|
|
|
|
|
+
|
|
|
const getAllApi = async () => {
|
|
|
await Promise.all([
|
|
|
getCount(),
|
|
|
getProject(),
|
|
|
- getNotice(),
|
|
|
+ // getNotice(),
|
|
|
getShortcut(),
|
|
|
- getUserAccessSource(),
|
|
|
- getWeeklyUserActivity()
|
|
|
+ // 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
|
|
|
+//水位waterOptions
|
|
|
+const enterRatioOptionsData = reactive<EChartsOption>(enterRatioOptions) as EChartsOption
|
|
|
+//水位waterOptions
|
|
|
+const outRatioOptionsData = reactive<EChartsOption>(outRatioOptions) as EChartsOption
|
|
|
+//水位waterOptions
|
|
|
+const returnRatioOptionsData = reactive<EChartsOption>(returnRatioOptions) as EChartsOption
|
|
|
+//历年来源originOptions111
|
|
|
+const originOptions111Data = reactive<EChartsOption>(originOptions111) as EChartsOption
|
|
|
+//历年来源originOptions111
|
|
|
+const mouthOptionsData = reactive<EChartsOption>(mouthOptions) as EChartsOption
|
|
|
getAllApi()
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
+<style scoped>
|
|
|
+.bg {
|
|
|
+ background-image: url("/@/asset/imgs/bg.jpg");
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-attachment: fixed;
|
|
|
+ background-size: cover;
|
|
|
+ /* background-color: #f8f3e0; */
|
|
|
+}
|
|
|
+
|
|
|
+.el-card {
|
|
|
+ --el-card-border-color: #fff !important;
|
|
|
+ margin: 0 10px 20px 10px;
|
|
|
+ --el-card-border-radius: .625rem;
|
|
|
+}
|
|
|
+
|
|
|
+.title {
|
|
|
+ font-size: 22px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.title img {
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+}
|
|
|
+
|
|
|
+.title span {
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.specimen-month {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin: 0 5%;
|
|
|
+}
|
|
|
+
|
|
|
+.month {
|
|
|
+ width: 40%;
|
|
|
+ /* padding: 0 10px; */
|
|
|
+}
|
|
|
+
|
|
|
+.month1 {
|
|
|
+ width: 60%;
|
|
|
+ padding: 0 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.month-bottom {
|
|
|
+ /* display: flex;
|
|
|
+ justify-content: space-between; */
|
|
|
+ /* margin-top: 24%; */
|
|
|
+}
|
|
|
+
|
|
|
+.month-bottom div:nth-child(1) {
|
|
|
+
|
|
|
+ font-size: 40px;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+
|
|
|
+.month-bottom span {
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #f7cb6b;
|
|
|
+ /* color: #e7a13f; */
|
|
|
+}
|
|
|
+
|
|
|
+.introduce {
|
|
|
+ display: flex;
|
|
|
+ margin: 0 10px 20px 10px;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.introduce-num {
|
|
|
+ width: 19%;
|
|
|
+ padding: 20px 0;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ /* background-color: antiquewhite; */
|
|
|
+ /* background-color: #fdf5e1; */
|
|
|
+ background-color: #f9f2ec;
|
|
|
+
|
|
|
+ justify-content: space-around;
|
|
|
+ border-radius: .625rem;
|
|
|
+ border: 3px solid #fff;
|
|
|
+ /* background-image:url("/@/assets/imgs/introduce.jpg"); */
|
|
|
+}
|
|
|
+
|
|
|
+/* .introduce-num:nth-child(1) {
|
|
|
+ background-color: rgba(152,83,74,0.3);
|
|
|
+}
|
|
|
+.introduce-num:nth-child(2) {
|
|
|
+ background-color: rgba(199,89,51,0.3);
|
|
|
+}
|
|
|
+.introduce-num:nth-child(3) {
|
|
|
+ background-color: rgba(217,133,102,0.3);
|
|
|
+}
|
|
|
+.introduce-num:nth-child(4) {
|
|
|
+ background-color: rgba(238,204,147,0.3);
|
|
|
+}
|
|
|
+.introduce-num:nth-child(5) {
|
|
|
+ background-color: rgba(159,180,207,0.3);
|
|
|
+} */
|
|
|
+.introduce-img img {
|
|
|
+ width: 80px;
|
|
|
+ height: 80px;
|
|
|
+ /* margin-top: 10%; */
|
|
|
+}
|
|
|
+
|
|
|
+.introduce-text {
|
|
|
+ /* text-align: center; */
|
|
|
+}
|
|
|
+
|
|
|
+.introduce-text div:nth-child(1) {
|
|
|
+ font-size: 1.4rem;
|
|
|
+}
|
|
|
+
|
|
|
+.introduce-text div:nth-child(2) {
|
|
|
+ font-size: 2.8rem;
|
|
|
+ color: rgba(143, 53, 36, 0.7);
|
|
|
+ /* color: #deb887; */
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+
|
|
|
+@media (min-width: 100px) {
|
|
|
+ .introduce {
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+ .introduce-num{
|
|
|
+ width: 100%;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+@media (min-width: 400px) {
|
|
|
+ .introduce {
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+ .introduce-num{
|
|
|
+ width: 100%;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+@media (min-width: 800px) {
|
|
|
+ .introduce {
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+ .introduce-num{
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .introduce-num:nth-child(5){
|
|
|
+ width: 100%;
|
|
|
+ margin-bottom: 0px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+@media (min-width:1000px) {
|
|
|
+ .introduce {
|
|
|
+ flex-direction: row;
|
|
|
+ }
|
|
|
+ .introduce-num{
|
|
|
+ width: 19%;
|
|
|
+ margin-bottom: 0px;
|
|
|
+ }
|
|
|
+ .introduce-num:nth-child(5){
|
|
|
+ width: 19%;
|
|
|
+ margin-bottom: 0px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+@media (min-width:2560px) {
|
|
|
+ .introduce {
|
|
|
+ flex-direction: row;
|
|
|
+ }
|
|
|
+ .introduce-num{
|
|
|
+ width: 19%;
|
|
|
+ margin-bottom: 0px;
|
|
|
+ }
|
|
|
+ .introduce-num:nth-child(5){
|
|
|
+ width: 19%;
|
|
|
+ margin-bottom: 0px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+.multiple-text-shadow {
|
|
|
+ /* -webkit-text-stroke: 0.3px #fff; */
|
|
|
+}
|
|
|
+</style>
|