| | |
| | | <template> |
| | | <div> |
| | | <PanelHeader title="供应商采购排名" /> |
| | | <PanelHeader title="供应商采购排名" :to="headerTo" /> |
| | | <div class="panel-item-customers"> |
| | | <div class="switch-container"> |
| | | <DateTypeSwitch v-model="radio1" @change="handleDateTypeChange" /> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, onMounted, computed } from 'vue' |
| | | import { ref, onMounted, computed, inject, watch } from 'vue' |
| | | import Echarts from '@/components/Echarts/echarts.vue' |
| | | import PanelHeader from '../PanelHeader.vue' |
| | | import DateTypeSwitch from '../DateTypeSwitch.vue' |
| | | import { supplierPurchaseRanking } from '@/api/viewIndex.js' |
| | | |
| | | defineProps({ |
| | | headerTo: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }) |
| | | |
| | | const chartStyle = { |
| | | width: '100%', |
| | | height: '100%', |
| | | } |
| | | |
| | | const radio1 = ref(1) |
| | | const radio1 = ref(3) |
| | | |
| | | // 飞机图标 SVG path |
| | | const aircraft = |
| | |
| | | textStyle: { fontSize: '100%' }, |
| | | formatter: function (params) { |
| | | let result = params[0].axisValueLabel + '<br/>' |
| | | result += `<div>${params[0].marker}${params[0].value}</div>` |
| | | result += `<div>${params[0].marker}${params[0].value}元</div>` |
| | | return result |
| | | }, |
| | | } |
| | |
| | | fetchSupplierRanking() |
| | | } |
| | | |
| | | const dataDashboardRefreshTick = inject('dataDashboardRefreshTick', null) |
| | | if (dataDashboardRefreshTick) { |
| | | watch(dataDashboardRefreshTick, () => { |
| | | fetchSupplierRanking() |
| | | }) |
| | | } |
| | | |
| | | onMounted(() => { |
| | | fetchSupplierRanking() |
| | | }) |