Kaynağa Gözat

财务首页权限

yanghao 15 saat önce
ebeveyn
işleme
5cb5ab616a
2 değiştirilmiş dosya ile 62 ekleme ve 31 silme
  1. 60 29
      src/views/index.vue
  2. 2 2
      src/views/login.vue

+ 60 - 29
src/views/index.vue

@@ -233,36 +233,67 @@
               v-if="section.apps?.length"
               class="grid grid-cols-[repeat(2,minmax(0,1fr))] gap-2 p-6 px-3 md:px-4 md:grid-cols-[repeat(3,minmax(0,1fr))] xl:grid-cols-[repeat(3,minmax(0,1fr))]"
             >
-              <button
-                v-for="(app, appIndex) in section.apps"
-                :key="`${section.code}-${appIndex}-${app.label}`"
-                type="button"
-                :class="[
-                  'platform-app',
-                  boldLabes.includes(app.label)
-                    ? 'platform-app--active'
-                    : 'platform-app--ghost',
-                ]"
-                @click="handlePortalAppClick(app)"
-              >
-                <span class="platform-app__icon">
-                  <img
-                    v-if="app.image"
-                    :src="app.image"
-                    :alt="app.label"
-                    class="h-7 w-7 object-contain rounded-md"
-                  />
-                  <Icon
-                    v-else
-                    :icon="app.icon || 'mdi:dots-grid'"
-                    class="text-[24px]"
-                  />
-                </span>
-                <span
-                  class="platform-app__label md:text-sm text-[12px] text-left"
-                  >{{ app.label }}</span
+              <template v-for="(app, appIndex) in section.apps" :key="`${section.code}-${appIndex}-${app.label}`">
+                <button
+                  v-if="app.key === 'fm'"
+                  v-hasPermi="['portal:financial:view']"
+                  type="button"
+                  :class="[
+                    'platform-app',
+                    boldLabes.includes(app.label)
+                      ? 'platform-app--active'
+                      : 'platform-app--ghost',
+                  ]"
+                  @click="handlePortalAppClick(app)"
                 >
-              </button>
+                  <span class="platform-app__icon">
+                    <img
+                      v-if="app.image"
+                      :src="app.image"
+                      :alt="app.label"
+                      class="h-7 w-7 object-contain rounded-md"
+                    />
+                    <Icon
+                      v-else
+                      :icon="app.icon || 'mdi:dots-grid'"
+                      class="text-[24px]"
+                    />
+                  </span>
+                  <span
+                    class="platform-app__label md:text-sm text-[12px] text-left"
+                    >{{ app.label }}</span
+                  >
+                </button>
+                <button
+                  v-else
+                  type="button"
+                  :class="[
+                    'platform-app',
+                    boldLabes.includes(app.label)
+                      ? 'platform-app--active'
+                      : 'platform-app--ghost',
+                  ]"
+                  @click="handlePortalAppClick(app)"
+                >
+                  <span class="platform-app__icon">
+                    <img
+                      v-if="app.image"
+                      :src="app.image"
+                      :alt="app.label"
+                      class="h-7 w-7 object-contain rounded-md"
+                    />
+                    <Icon
+                      v-else
+                      :icon="app.icon || 'mdi:dots-grid'"
+                      class="text-[24px]"
+                    />
+                  </span>
+                  <span
+                    class="platform-app__label md:text-sm text-[12px] text-left"
+                    >{{ app.label }}</span
+                  >
+                </button>
+              </template>
             </div>
           </article>
         </div>

+ 2 - 2
src/views/login.vue

@@ -23,7 +23,7 @@
         </h1>
 
         <!-- 用户名密码登陆 -->
-        <!-- <div>
+        <div>
           <el-form
             :model="form"
             :rules="rules"
@@ -64,7 +64,7 @@
               >
             </div>
           </div>
-        </div> -->
+        </div>
 
         <!-- 钉钉登陆 -->
         <div class="text-center">