29 lines
947 B
JavaScript
29 lines
947 B
JavaScript
import { defineStore } from 'pinia'
|
|
|
|
const useOptionsStore = defineStore('options', {
|
|
state: () => ({
|
|
allPositionAndInspectionStationOptions: [], // 运检站和岗位在一起的选项
|
|
positionOptions: [], // 人员岗位
|
|
personNatureOptions: [], // 人员性质
|
|
personCategoryOptions: [], // 人员分类
|
|
inspectionStationOptions: [], // 运检站
|
|
personnelCommonOptions: [], // 人员列表
|
|
majorTypeCategoryOptions: [], // 专业
|
|
planBusinessTypeOptions: [], // 业务类型
|
|
planCategoryOptions: [], // 类别
|
|
planWorkLoadCategoryOptions: [], // 工作量类别
|
|
}),
|
|
actions: {
|
|
// 通用的设置方法,方便 Hook 调用
|
|
setOptions(type, options) {
|
|
this[type] = options
|
|
},
|
|
// 清空特定缓存
|
|
clearOptions(type) {
|
|
this[type] = []
|
|
},
|
|
},
|
|
})
|
|
|
|
export default useOptionsStore
|