Prechádzať zdrojové kódy

feat:修改地图数据,修改悬浮小数点

AmandaG 1 rok pred
rodič
commit
d6e9213a6c

+ 3 - 1
src/views/Dashboard/src/DashboardView.vue

@@ -284,6 +284,7 @@ const Top1OInterval_dest = reactive({
   interval: 0
 })
 const TopOriginLoading = ref(true)
+const Top10Originref = ref()
 const GetTop10ODEcharts = (val: any) => {
   dashboardObj.Top10faultData = val
   $api
@@ -292,6 +293,7 @@ const GetTop10ODEcharts = (val: any) => {
     })
     .then((res: any) => {
       if (res.code === 200) {
+        Top10Originref.value[0].updataMapObj(dashboardObj.Top10faultData)
         Top10Obj.DestinationData = res.data.seller_data_list_destination
         Top10Obj.OriginData = res.data.seller_data_list_origin
         Top1OInterval.Max = res.data.Max
@@ -1037,7 +1039,7 @@ const ClickParams = (val: any) => {
                     ></SellerChart>
                   </div>
                   <div class="map">
-                    <TopMap :obj="dashboardObj.Top10faultData"></TopMap>
+                    <TopMap :obj="dashboardObj.Top10faultData" ref="Top10Originref"></TopMap>
                   </div>
                 </div>
               </template>

+ 2 - 6
src/views/Dashboard/src/components/BarChart.vue

@@ -102,14 +102,10 @@ const initOption = reactive({
           item.marker +
           item.seriesName +
           ': ' +
-          item.value.toLocaleString() +
+          item.value +
           '</div>'
       })
-      str +=
-        '<div style= ' +
-        'color:#FFF;font-family: Lato-Light>Total: ' +
-        allnum.toLocaleString() +
-        '</div>'
+      str += '<div style= ' + 'color:#FFF;font-family: Lato-Light>Total: ' + allnum + '</div>'
       return str
     },
     textStyle: {

+ 9 - 0
src/views/Dashboard/src/components/TopMap.vue

@@ -135,6 +135,15 @@ const init = () => {
 onMounted(() => {
   init()
 })
+
+const updataMapObj = (val: any) => {
+  mapobj.value = val
+  init()
+}
+
+defineExpose({
+  updataMapObj
+})
 </script>
 <template>
   <div id="map" style="width: 100%; height: 272px"></div>