From 4f802e460cb63cfcb891202747a848d647928a87 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 10 May 2022 19:18:56 +0800
Subject: [PATCH] 新增农场管理页面

---
 src/store/modules/common.js |  188 ++++++++++++++++++++++++-----------------------
 1 files changed, 96 insertions(+), 92 deletions(-)

diff --git a/src/store/modules/common.js b/src/store/modules/common.js
index ec24a59..23bec72 100644
--- a/src/store/modules/common.js
+++ b/src/store/modules/common.js
@@ -1,99 +1,103 @@
 import {
-  setStore,
-  getStore,
-  removeStore
+    setStore,
+    getStore,
+    removeStore
 } from '@/util/store'
 import website from '@/config/website'
 
 const common = {
-
-  state: {
-    language: getStore({name: 'language'}) || 'zh',
-    isCollapse: false,
-    isFullScren: false,
-    isMenu: true,
-    isShade: false,
-    screen: -1,
-    isLock: getStore({name: 'isLock'}) || false,
-    showTag: true,
-    showDebug: true,
-    showCollapse: true,
-    showSearch: true,
-    showLock: true,
-    showFullScren: true,
-    showTheme: true,
-    showMenu: true,
-    showColor: true,
-    colorName: getStore({name: 'colorName'}) || '#409EFF',
-    themeName: getStore({name: 'themeName'}) || 'theme-default',
-    lockPasswd: getStore({name: 'lockPasswd'}) || '',
-    website: website,
-  },
-  mutations: {
-    SET_LANGUAGE: (state, language) => {
-      state.language = language
-      setStore({
-        name: 'language',
-        content: state.language
-      })
+    state: {
+        language: getStore({ name: 'language' }) || 'zh',
+        isCollapse: false,
+        isFullScren: false,
+        isMenu: true,
+        isShade: false,
+        screen: -1,
+        isLock: getStore({ name: 'isLock' }) || false,
+        showTag: true,
+        showDebug: true,
+        showCollapse: true,
+        showSearch: true,
+        showLock: true,
+        showFullScren: true,
+        showTheme: true,
+        showMenu: true,
+        showColor: true,
+        colorName: getStore({ name: 'colorName' }) || '#409EFF',
+        themeName: getStore({ name: 'themeName' }) || 'theme-default',
+        lockPasswd: getStore({ name: 'lockPasswd' }) || '',
+        website: website,
+        //面的集和点
+        polygons: [],
     },
-    SET_SHADE: (state, active) => {
-      state.isShade = active;
-    },
-    SET_COLLAPSE: (state) => {
-      state.isCollapse = !state.isCollapse;
-    },
-    SET_FULLSCREN: (state) => {
-      state.isFullScren = !state.isFullScren;
-    },
-    SET_IS_MENU: (state, menu) => {
-      state.isMenu = menu;
-    },
-    SET_LOCK: (state) => {
-      state.isLock = true;
-      setStore({
-        name: 'isLock',
-        content: state.isLock,
-        type: 'session'
-      })
-    },
-    SET_SCREEN: (state, screen) => {
-      state.screen = screen;
-    },
-    SET_COLOR_NAME: (state, colorName) => {
-      state.colorName = colorName;
-      setStore({
-        name: 'colorName',
-        content: state.colorName,
-      })
-    },
-    SET_THEME_NAME: (state, themeName) => {
-      state.themeName = themeName;
-      setStore({
-        name: 'themeName',
-        content: state.themeName,
-      })
-    },
-    SET_LOCK_PASSWD: (state, lockPasswd) => {
-      state.lockPasswd = lockPasswd;
-      setStore({
-        name: 'lockPasswd',
-        content: state.lockPasswd,
-        type: 'session'
-      })
-    },
-    CLEAR_LOCK: (state) => {
-      state.isLock = false;
-      state.lockPasswd = '';
-      removeStore({
-        name: 'lockPasswd',
-        type: 'session'
-      });
-      removeStore({
-        name: 'isLock',
-        type: 'session'
-      });
-    },
-  }
+    mutations: {
+        setpolygon: (state, data) => {
+            state.polygons = data;
+        },
+        SET_LANGUAGE: (state, language) => {
+            state.language = language
+            setStore({
+                name: 'language',
+                content: state.language
+            })
+        },
+        SET_SHADE: (state, active) => {
+            state.isShade = active;
+        },
+        SET_COLLAPSE: (state) => {
+            state.isCollapse = !state.isCollapse;
+        },
+        SET_FULLSCREN: (state) => {
+            state.isFullScren = !state.isFullScren;
+        },
+        SET_IS_MENU: (state, menu) => {
+            state.isMenu = menu;
+        },
+        SET_LOCK: (state) => {
+            state.isLock = true;
+            setStore({
+                name: 'isLock',
+                content: state.isLock,
+                type: 'session'
+            })
+        },
+        SET_SCREEN: (state, screen) => {
+            state.screen = screen;
+        },
+        SET_COLOR_NAME: (state, colorName) => {
+            state.colorName = colorName;
+            setStore({
+                name: 'colorName',
+                content: state.colorName,
+            })
+        },
+        SET_THEME_NAME: (state, themeName) => {
+            state.themeName = themeName;
+            setStore({
+                name: 'themeName',
+                content: state.themeName,
+            })
+        },
+        SET_LOCK_PASSWD: (state, lockPasswd) => {
+            state.lockPasswd = lockPasswd;
+            setStore({
+                name: 'lockPasswd',
+                content: state.lockPasswd,
+                type: 'session'
+            })
+        },
+        CLEAR_LOCK: (state) => {
+            state.isLock = false;
+            state.lockPasswd = '';
+            removeStore({
+                name: 'lockPasswd',
+                type: 'session'
+            });
+            removeStore({
+                name: 'isLock',
+                type: 'session'
+            });
+        },
+    }
 }
-export default common
+export default common
\ No newline at end of file

--
Gitblit v1.9.3