diff --git a/src/pages/system/types.ts b/src/pages/system/types.ts
index abfc809..bf9aa64 100644
--- a/src/pages/system/types.ts
+++ b/src/pages/system/types.ts
@@ -16,7 +16,9 @@ export type orgCascaderType = {
}
export type systemItem = {
+ id?:string | number;
code?: string;
name?: string;
value?: string;
-}
\ No newline at end of file
+}
+
diff --git a/src/store/index.ts b/src/store/index.ts
index 5ae86cd..c39f325 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -6,6 +6,8 @@ import contextSlice from "./features/contextSlice";
import deviceStateSlice from "./device/deviceState";
import orgStateSlice from "./ktj/orgState";
import measureStateSlice from "./measure/measureState";
+import systemStateSlice from "./system/systemSlice";
+
// configureStore创建一个redux数据
const store = configureStore({
// 合并多个Slice
@@ -14,7 +16,8 @@ const store = configureStore({
context: contextSlice,
deviceState: deviceStateSlice,
orgState: orgStateSlice,
- measureState:measureStateSlice
+ measureState:measureStateSlice,
+ systemState:systemStateSlice
},
});
diff --git a/src/store/system/systemSlice.ts b/src/store/system/systemSlice.ts
new file mode 100644
index 0000000..6321803
--- /dev/null
+++ b/src/store/system/systemSlice.ts
@@ -0,0 +1,36 @@
+// counterSlice.ts 文件
+import { createSlice } from "@reduxjs/toolkit";
+const initialState = {
+ systemInfo:[],
+ orgInfo:{
+ id:'',
+ name:'',
+ value:'',
+ code:''
+ },
+ accountInfo:{
+ id:'',
+ name:'',
+ value:'',
+ code:''
+ }
+};
+// 创建一个 Slice
+export const systemStateSlice = createSlice({
+ name: "systemState",
+ initialState,
+ reducers: {
+ updateSystemAllState: (state, { payload }) => {
+ state.systemInfo = payload
+ },
+ updateSystemOrgState: (state, { payload }) => {
+ state.orgInfo = payload
+ },
+ updateSystemAccountState: (state, { payload }) => {
+ state.accountInfo = payload
+ },
+ },
+});
+export const {updateSystemAllState, updateSystemOrgState, updateSystemAccountState } = systemStateSlice.actions;
+// 默认导出
+export default systemStateSlice.reducer;
diff --git a/src/types.ts b/src/types.ts
new file mode 100644
index 0000000..0bc6849
--- /dev/null
+++ b/src/types.ts
@@ -0,0 +1,6 @@
+export type system = {
+ id?:string;
+ name?:string;
+ value?:string;
+ code?:string;
+}
\ No newline at end of file