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 @@ - +