diff --git a/src/components.d.ts b/src/components.d.ts index 276ffec..60aa0e7 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -31,6 +31,7 @@ ImagePreview: typeof import('./components/ImagePreview/index.vue')['default'] ImagesUpload: typeof import('./components/ImagesUpload/index.vue')['default'] ImageUpload: typeof import('./components/ImageUpload/index.vue')['default'] + LineChart: typeof import('./components/Echart/LineChart.vue')['default'] NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] @@ -38,6 +39,7 @@ PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] Pie: typeof import('./components/echarts/pie.vue')['default'] + PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/src/components.d.ts b/src/components.d.ts index 276ffec..60aa0e7 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -31,6 +31,7 @@ ImagePreview: typeof import('./components/ImagePreview/index.vue')['default'] ImagesUpload: typeof import('./components/ImagesUpload/index.vue')['default'] ImageUpload: typeof import('./components/ImageUpload/index.vue')['default'] + LineChart: typeof import('./components/Echart/LineChart.vue')['default'] NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] @@ -38,6 +39,7 @@ PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] Pie: typeof import('./components/echarts/pie.vue')['default'] + PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index bee1301..9297420 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -3,7 +3,7 @@ import { getCertificateStatistic, getStaffSStatistic, getStatistic, getTrainLogSStatistic } from '@/api/system/bench' import { getPlanList } from '@/api/system/plan' import { listPageApi } from '@/api/measure/file' -import Echarts from '@/components/echarts/index.vue' +import LineChart from '@/components/Echart/LineChart.vue' import EchartsPie from '@/components/echarts/pie.vue' import BenchCol from '@/components/benchCol/index.vue' import useUserStore from '@/store/modules/user' @@ -37,14 +37,16 @@ { text: '人员名称', value: 'name', width: '110' }, { text: '到期时间', value: 'validDate' }, ]) -const StatisticyAxis = ref([]) -const StatisticXAxis = ref([]) +const StatisticxAxis = ref([]) +const StatisticData = ref([]) const StaffSStatisticyAxis = ref([]) const StaffSStatisticxAxis = ref([]) const TrainLogSList = ref([]) const TrainLogTitle = ref('') const CertificateList = ref([]) const CertificateObject = ref({}) +const xAxis = ref([]) + // 获得权限 const { proxy } = getCurrentInstance() as any const getStatisticList = () => { @@ -61,13 +63,16 @@ tableData.value = res.data.rows }) getStatistic().then(async (res) => { - StatisticyAxis.value = await res.data.map((item) => { + StatisticxAxis.value = await res.data.map((item) => { return item.date }) - StatisticXAxis.value = await res.data.map((item) => { + StatisticData.value = await res.data.map((item) => { return Number(item.count) }) + StatisticData.value = [{ name: '', data: StatisticData.value }] }) + // StatisticData.value = [{ name: '出勤率', data: [1, 15, 10, 12, 6] }] + // StatisticxAxis.value = ['1月', '2月', '3月', '4月', '5月'] getStaffSStatistic().then(async (res) => { StaffSStatisticyAxis.value = await res.data.map(item => item.date) StaffSStatisticxAxis.value = await res.data.map(item => Number(item.count)) @@ -118,7 +123,7 @@ - +