tanghaolin
2025-03-07 95b61d104bced72ff0786668abeeb0e5122fcdd8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { defineStore } from 'pinia';
import db from './db';
export const chartConfigStore = defineStore('chartConfig', {
    state: () => ({
        isDispDesignPoint: db.get('Chart_IsDispDesignPoint'),//值是 0 和 1
        isMonorColor: db.get('Chart_IsMonorColor'),//值是 0 和 1
        isDispSpectrum: db.get('Chart_IsDispSpectrum'),//值是 0 和 1
        designPointStyle: db.get('Chart_DesignPointStyle'),//设计点
        isDispEquipCurve: db.get('Chart_IsDispEquipCurve')
    }),
    actions: {
        IsMonorColor(val) {
            this.isMonorChartColor = val
            db.set('Chart_IsMonorColor', val)
        },
        IsDispSpectrum(val) {
            this.isDispSpectrum = val
            db.set('Chart_IsDispSpectrum', val)
        },
        DesignPointStyle(val) {
            this.designPointStyle = val
            db.set('Chart_DesignPointStyle', val)
        },
        IsDispEquipCurve(val) {
            this.designPointStyle = val
            db.set('Chart_IsDispEquipCurve', val)
        },
        IsDispDesignPoint(val){
            this.isDispDesignPoint = val
            db.set('Chart_IsDispDesignPoint',val)
        }
    }
})