From 22229c67d87f0fae4c4bc90db106b8a1e2c49b53 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 20 八月 2026 15:50:11 +0800
Subject: [PATCH] feat(permission): 为多个模块添加管理员权限控制功能
---
src/views/basicData/customerFile/index.vue | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index 77206ed..3385fef 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -659,7 +659,7 @@
</template>
<script setup>
- import { onMounted, ref, reactive, getCurrentInstance, toRefs } from "vue";
+ import { onMounted, ref, reactive, getCurrentInstance, toRefs, computed } from "vue";
import { Search, Paperclip, Upload } from "@element-plus/icons-vue";
import {
addCustomerPrivate,
@@ -682,6 +682,9 @@
import { getToken } from "@/utils/auth.js";
const { proxy } = getCurrentInstance();
const userStore = useUserStore();
+ const isAdminUser = computed(() =>
+ ["admin", "鏅��2", "鏈�楂�1"].some(r => (userStore.roles || []).includes(r))
+ );
// 鍥炶鎻愰啋鐩稿叧
const reminderDialogVisible = ref(false);
@@ -1194,7 +1197,7 @@
let ids = [];
if (selectedRows.value.length > 0) {
const unauthorizedData = selectedRows.value.filter(
- item => item.type === 1 || item.type === "1"
+ item => (item.type === 1 || item.type === "1") && !isAdminUser.value
);
if (unauthorizedData.length > 0) {
proxy.$modal.msgWarning("鍏捣鍒嗛厤鐨勫鎴蜂笉鑳藉垹闄�");
--
Gitblit v1.9.3