Parcourir la source

...LF will be replaced by CRLF

WANG il y a 6 ans
Parent
commit
40ca4c86cf
1 fichiers modifiés avec 88 ajouts et 88 suppressions
  1. 88 88
      src/modules/portal/views/home/HomeMain.vue

+ 88 - 88
src/modules/portal/views/home/HomeMain.vue

@@ -1,106 +1,106 @@
 <template>
-    <el-main style="display: flex; align-items: center">
-        <div class="main-content">
-            <div
-                    class="module-card"
-                    v-for="menu in menuList.filter(m => m.parentId === null)"
-                    :key="menu.id"
-                    @click="() => $router.push('/' + menu.ext4)"
-            >
-                {{ menu.name }}
-            </div>
-        </div>
-    </el-main>
+  <el-main style="display: flex; align-items: center">
+    <div class="main-content">
+      <div
+        class="module-card"
+        v-for="menu in menuList.filter(m => m.parentId === null)"
+        :key="menu.id"
+        @click="() => $router.push('/' + menu.ext4)"
+      >
+        {{ menu.name }}
+      </div>
+    </div>
+  </el-main>
 </template>
 
 <script>
-    import { mapState } from "vuex";
-    import { CORE_API } from "@/constants/constants";
+import { mapState } from "vuex";
+import { CORE_API } from "@/constants/constants";
 
-    export default {
-        name: "HomeMain",
-        data() {
-            return {
-                menuList: []
-            };
-        },
-        components: {},
-        computed: {
-            ...mapState({ user: state => state.user })
-        },
-        methods: {
-            async getUserPrivileges(groupCode) {
-                var url = CORE_API + "/rolePrivilege/getUserPrivileges";
-                const params = new URLSearchParams();
-                params.append("groupCode", groupCode);
-                params.append("full", false);
-                const res = await this.$httpWithMsg.post(url, params, {
-                    headers: { "content-type": "application/x-www-form-urlencoded" }
-                });
-
-                return res.data;
-            }
-        },
-        async created() {
-            this.menuList = await this.getUserPrivileges("PORTAL_MENUS");
-        }
+export default {
+  name: "HomeMain",
+  data() {
+    return {
+      menuList: []
     };
+  },
+  components: {},
+  computed: {
+    ...mapState({ user: state => state.user })
+  },
+  methods: {
+    async getUserPrivileges(groupCode) {
+      var url = CORE_API + "/rolePrivilege/getUserPrivileges";
+      const params = new URLSearchParams();
+      params.append("groupCode", groupCode);
+      params.append("full", false);
+      const res = await this.$httpWithMsg.post(url, params, {
+        headers: { "content-type": "application/x-www-form-urlencoded" }
+      });
+
+      return res.data;
+    }
+  },
+  async created() {
+    this.menuList = await this.getUserPrivileges("PORTAL_MENUS");
+  }
+};
 </script>
 
 <style scoped>
-    .el-main {
-        background-color: #e9eef3;
-        color: #333;
-        text-align: center;
-        line-height: 60px;
-    }
+.el-main {
+  background-color: #e9eef3;
+  color: #333;
+  text-align: center;
+  line-height: 60px;
+}
 
-    .main-content {
-        display: flex;
-        flex-direction: row;
-        flex-wrap: wrap;
-        /* align-items: center;
+.main-content {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
+  /* align-items: center;
         justify-items: center; */
-        /* justify-content: space-between; */
-        /* align-content: space-between; */
-        justify-content: center;
+  /* justify-content: space-between; */
+  /* align-content: space-between; */
+  justify-content: center;
 
-        height: 100%;
-    }
+  height: 100%;
+}
 
-    .module-card {
-        width: 200px;
-        height: 150px;
-        margin-bottom: 50px;
-        margin-right: 20px;
-        cursor: pointer;
-        background-color: white;
-        display: flex;
-        /* justify-items: center; */
-        align-items: center;
-        justify-content: space-around;
+.module-card {
+  width: 200px;
+  height: 150px;
+  margin-bottom: 50px;
+  margin-right: 20px;
+  cursor: pointer;
+  background-color: white;
+  display: flex;
+  /* justify-items: center; */
+  align-items: center;
+  justify-content: space-around;
 
-        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
-        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
-    }
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
+  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
+}
 
-    .module-card:hover {
-        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
+.module-card:hover {
+  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
 
-        font-size: 30px;
-        color: #fff;
-        text-align: center;
-        animation: glow 1s ease-in-out infinite alternate;
-    }
+  font-size: 30px;
+  color: #fff;
+  text-align: center;
+  animation: glow 1s ease-in-out infinite alternate;
+}
 
-    @keyframes glow {
-        from {
-            text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #e60073,
-            0 0 40px #e60073, 0 0 50px #e60073, 0 0 60px #e60073, 0 0 70px #e60073;
-        }
-        to {
-            text-shadow: 0 0 20px #fff, 0 0 30px #ff4da6, 0 0 40px #ff4da6,
-            0 0 50px #ff4da6, 0 0 60px #ff4da6, 0 0 70px #ff4da6, 0 0 80px #ff4da6;
-        }
-    }
+@keyframes glow {
+  from {
+    text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #e60073,
+      0 0 40px #e60073, 0 0 50px #e60073, 0 0 60px #e60073, 0 0 70px #e60073;
+  }
+  to {
+    text-shadow: 0 0 20px #fff, 0 0 30px #ff4da6, 0 0 40px #ff4da6,
+      0 0 50px #ff4da6, 0 0 60px #ff4da6, 0 0 70px #ff4da6, 0 0 80px #ff4da6;
+  }
+}
 </style>