2545307760@qq.com пре 7 месеци
родитељ
комит
05840160f9

+ 10 - 8
web/src/view/finance/financeAnalysis/components/charts.vue

@@ -34,14 +34,16 @@ onMounted(() => {
   getServerData()
   getServerData()
 })
 })
 const getServerData = () => {
 const getServerData = () => {
-  const res = {
-    series: [
-      {
-        data: list.charts
-      }
-    ]
-  }
-  drawCharts('kUcKFJZAycqcHLABIFFVWTVbCZOjgryF', res)
+  setTimeout(function() {
+    const res = {
+      series: [
+        {
+          data: list.charts
+        }
+      ]
+    }
+    drawCharts('kUcKFJZAycqcHLABIFFVWTVbCZOjgryF', res)
+  }, 500)
 }
 }
 const drawCharts = (id, data) => {
 const drawCharts = (id, data) => {
   const ctx = document.getElementById(id).getContext('2d')
   const ctx = document.getElementById(id).getContext('2d')

+ 4 - 1
web/src/view/finance/financeAnalysis/components/costSum.vue

@@ -89,7 +89,7 @@
 <script setup>
 <script setup>
 import { codeOperate } from '@/pinia/code/code'
 import { codeOperate } from '@/pinia/code/code'
 import { queryProjectMonthFee } from '@/api/cost'
 import { queryProjectMonthFee } from '@/api/cost'
-import { ref, defineExpose } from 'vue'
+import { ref, defineExpose, onMounted } from 'vue'
 import { chartsList } from '@/pinia/chartsData/chartsData'
 import { chartsList } from '@/pinia/chartsData/chartsData'
 import Charts from './charts.vue'
 import Charts from './charts.vue'
 defineOptions({
 defineOptions({
@@ -100,6 +100,9 @@ const yearData = ref('')
 const id = codeOperate()
 const id = codeOperate()
 const projectMonthFee = ref()
 const projectMonthFee = ref()
 const chartsStorage = chartsList()
 const chartsStorage = chartsList()
+onMounted(() => {
+  querySum()
+})
 const querySum = () => {
 const querySum = () => {
   queryProjectMonthFee(monthData.value, yearData.value, id.currentCode).then(res => {
   queryProjectMonthFee(monthData.value, yearData.value, id.currentCode).then(res => {
     if (res.code === 0) {
     if (res.code === 0) {