From 5f303821bd4052317db4b3e71342fb300ce5c3c9 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期二, 22 八月 2023 10:56:01 +0800
Subject: [PATCH] 大屏
---
screen_standard/src/stores/counter.js | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/screen_standard/src/stores/counter.js b/screen_standard/src/stores/counter.js
index 42f01ba..d4b3256 100644
--- a/screen_standard/src/stores/counter.js
+++ b/screen_standard/src/stores/counter.js
@@ -2,14 +2,23 @@
import { defineStore } from 'pinia';
export const useCounterStore = defineStore('enterprise', {
+
state: () => {
- return { count: 0 }
+ // 678
+ return { companyId: '8', departId: '132' };
},
- // 涔熷彲浠ュ畾涔変负
- // state: () => ({ count: 0 })
+
actions: {
- increment() {
- this.count++
+ // 璁剧疆浼佷笟id
+ setCompanyId(companyId) {
+ this.companyId = companyId;
+ window.sessionStorage.setItem('companyId', companyId);
},
+ // 璁剧疆缁勭粐id
+ setDepartId(departId) {
+ this.departId = departId;
+ window.sessionStorage.setItem('departId', departId);
+ }
}
+
})
--
Gitblit v1.9.3