li.shaoyi vor 2 Jahren
Ursprung
Commit
3182be7a20

+ 1 - 1
app/package.json

@@ -1,6 +1,6 @@
 {
   "name": "trading",
-  "version": "1.0.23",
+  "version": "1.0.14",
   "main": "main.js",
   "dependencies": {
     "electron-updater": "^6.1.4",

+ 2 - 2
oem/gstj/config/appconfig.json

@@ -1,8 +1,8 @@
 {
   "appId": "com.muchinfo.gstj",
   "appName": "甘肃碳交",
-  "version": "1.0.13",
-  "versionCode": "100013",
+  "version": "1.0.14",
+  "versionCode": "100014",
   "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204",
   "tradeChannel": "ws",
   "modules": [

+ 2 - 2
src/components/base/echarts/core.ts

@@ -3,7 +3,7 @@
  */
 import * as echarts from 'echarts/core'
 import { CandlestickChart, CandlestickSeriesOption, BarChart, BarSeriesOption, LineChart, LineSeriesOption } from 'echarts/charts'
-import { MarkLineComponent, DatasetComponent, DataZoomComponent, GridComponent, GridComponentOption, TooltipComponent } from 'echarts/components'
+import { MarkLineComponent, DatasetComponent, DataZoomComponent, GridComponent, GridComponentOption, TooltipComponent, DataZoomComponentOption } from 'echarts/components'
 import { CanvasRenderer } from 'echarts/renderers'
 
 echarts.use([
@@ -18,7 +18,7 @@ echarts.use([
     TooltipComponent
 ])
 
-type ECOption = echarts.ComposeOption<CandlestickSeriesOption | BarSeriesOption | LineSeriesOption | GridComponentOption>;
+type ECOption = echarts.ComposeOption<CandlestickSeriesOption | BarSeriesOption | LineSeriesOption | GridComponentOption | DataZoomComponentOption>
 
 export {
     echarts,

+ 6 - 0
src/components/base/echarts/index.ts

@@ -46,6 +46,12 @@ export function useEcharts() {
                 }
             })
 
+            // chart.on('dataZoom', () => {
+            //     const option: ECOption = chart.getOption()
+            //     const dataZoom = option.dataZoom
+            //     console.log(dataZoom)
+            // })
+
             // 图表重置大小
             const resize = timerInterceptor.setDebounce(() => {
                 chart.resize && chart.resize();

+ 8 - 5
src/hooks/echarts/candlestick/options.ts

@@ -71,6 +71,8 @@ export function useOptions(dataset: EchartsDataset) {
                 axisLabel: {
                     color: '#777',
                     margin: 12,
+                    showMaxLabel:true,
+                    showMinLabel:true,
                     formatter: (val: string) => {
                         if (val) {
                             switch (options.cycleType) {
@@ -89,8 +91,8 @@ export function useOptions(dataset: EchartsDataset) {
                     // }
                 },
                 max: (value) => {
-                    if (value.max < 60) {
-                        value.max = 60
+                    if (value.max < 30) {
+                        return 30
                     }
                     return value.max
                 },
@@ -124,14 +126,15 @@ export function useOptions(dataset: EchartsDataset) {
                 // },
             },
             yAxis: {
+                type: 'value',
                 scale: true,
                 splitLine: {
                     lineStyle: {
                         // 坐标分隔线颜色
                         color: yAxisLineColor,
-                    },
-                },
-            },
+                    }
+                }
+            }
         }
     }
 

+ 2 - 1
src/packages/pc/views/boot/index.vue

@@ -5,6 +5,7 @@
 <script lang="ts" setup>
 import { useRoute, useRouter } from 'vue-router'
 import { useLogin } from '@/business/login'
+import eventBus from '@/services/bus'
 
 const { initBaseData } = useLogin()
 const route = useRoute()
@@ -18,7 +19,7 @@ initBaseData().then(() => {
     router.replace('/')
   }
 }).catch(() => {
-  router.replace('/login')
+  eventBus.$emit('LogoutNotify')
 })
 </script>