diff --git a/src/layout/components/notice/index.vue b/src/layout/components/notice/index.vue
index bab0cf7..a7d2c6e 100644
--- a/src/layout/components/notice/index.vue
+++ b/src/layout/components/notice/index.vue
@@ -15,7 +15,7 @@
-
+
diff --git a/src/store/modules/equipmentList.ts b/src/store/modules/equipmentList.ts
new file mode 100644
index 0000000..91c6e96
--- /dev/null
+++ b/src/store/modules/equipmentList.ts
@@ -0,0 +1,30 @@
+import { defineStore } from 'pinia';
+import { ref, computed } from 'vue';
+import { getDevicetList } from '@/api/equipmentList/index';
+
+export const useDeviceStore = defineStore('devices', () => {
+ // --- State (状态) ---
+ // 相当于 Vuex 中的 state,用 ref 或 reactive 定义
+ const deviceList = ref();
+
+ // --- Getters (计算属性) ---
+ // 相当于 Vuex 中的 getters,直接用 computed 定义
+
+ // --- Actions (动作) ---
+ // 相当于 Vuex 中的 actions/mutations,直接写同步或异步函数
+ async function getdeviceList(query?: any) {
+ try {
+ const response = await getDevicetList(query);
+ console.log('获取设备列表:', response);
+ deviceList.value = response.data;
+ } catch (error) {
+ console.error('获取设备列表失败', error);
+ }
+ }
+
+ // ⚠️ 核心点:必须把需要暴露出去的变量和方法 return 出去!
+ return {
+ deviceList,
+ getdeviceList
+ };
+});
diff --git a/src/views/WarningList/list.vue b/src/views/WarningList/list.vue
index 2d00aea..a6e71dd 100644
--- a/src/views/WarningList/list.vue
+++ b/src/views/WarningList/list.vue
@@ -118,6 +118,12 @@
diff --git a/src/views/systemList/base/base.vue b/src/views/systemList/base/base.vue
index 51d3c88..08d43e9 100644
--- a/src/views/systemList/base/base.vue
+++ b/src/views/systemList/base/base.vue
@@ -48,6 +48,7 @@ import type { UploadProps, UploadUserFile } from 'element-plus';
import { uploadDemo, getDemo, updateDemo } from '@/api/systemList/index';
import { ElMessage } from 'element-plus';
import { Plus } from '@element-plus/icons-vue';
+import router from '@/router';
const uploadUrl = import.meta.env.VITE_BASE_API + '/system/logo/upload';
@@ -84,6 +85,8 @@ const save = async () => {
.then((res) => {
console.log('保存成功', res);
ElMessage.success('保存成功');
+ // 刷新当前路由
+ router.go(0);
})
.catch((err) => {
console.error('保存失败', err);