|
@@ -1,12 +1,18 @@
|
|
|
<template>
|
|
|
<div class="screen-common-component">
|
|
|
<ScreenComHeader :module-id="moduleId" title="关重件生产进度" />
|
|
|
- <dv-capsule-chart :config="config" class="charts-container" />
|
|
|
+ <dv-capsule-chart
|
|
|
+ :config="config"
|
|
|
+ class="charts-container"
|
|
|
+ style="width: calc(100% - 20px)"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import ScreenComHeader from "@/views/screens/configs/screenComHeader.vue";
|
|
|
+import { productionSchedule } from "@/api/screens";
|
|
|
+import { allChartColors } from "@/views/screens/configs/chartsConfig";
|
|
|
|
|
|
const config = ref({});
|
|
|
|
|
@@ -17,22 +23,20 @@ const props = defineProps({
|
|
|
},
|
|
|
});
|
|
|
|
|
|
-onMounted(() => {
|
|
|
+onMounted(async () => {
|
|
|
+ let res = await productionSchedule();
|
|
|
+ let { data } = res;
|
|
|
+ let bigData: any[] = [];
|
|
|
+ data?.forEach((item: any) => {
|
|
|
+ bigData.push({
|
|
|
+ name: item.materialName,
|
|
|
+ value: item.count,
|
|
|
+ });
|
|
|
+ });
|
|
|
config.value = {
|
|
|
- data: [
|
|
|
- {
|
|
|
- name: "关重件1",
|
|
|
- value: 167,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "关重件2",
|
|
|
- value: 67,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "关重件3",
|
|
|
- value: 123,
|
|
|
- },
|
|
|
- ],
|
|
|
+ colors: allChartColors,
|
|
|
+ data: bigData,
|
|
|
+ showValue: true,
|
|
|
};
|
|
|
});
|
|
|
</script>
|