|
|
@@ -5,7 +5,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { getMaterialsChangeStatistics } from '@/api/mes/statisticians'
|
|
|
+import { getMaterialsChangeStatistics } from '@/api/material/statistics/index'
|
|
|
import * as echarts from 'echarts'
|
|
|
|
|
|
defineOptions({ name: 'LockerChange' })
|
|
|
@@ -46,7 +46,8 @@ watch(
|
|
|
const getList = async () => {
|
|
|
try {
|
|
|
const response = await getMaterialsChangeStatistics(queryParams)
|
|
|
- cabinetData.value = response.data
|
|
|
+ console.log(response,'数据格式')
|
|
|
+ cabinetData.value = response
|
|
|
renderChart()
|
|
|
} catch (error) {
|
|
|
console.error('获取物资更换统计数据失败:', error)
|
|
|
@@ -168,6 +169,7 @@ onBeforeUnmount(() => {
|
|
|
|
|
|
/** 初始化 */
|
|
|
onMounted(() => {
|
|
|
+ getList()
|
|
|
if (props.startTime && props.endTime) {
|
|
|
queryParams.startTime = props.startTime
|
|
|
queryParams.endTime = props.endTime
|