CzRger 2 tygodni temu
rodzic
commit
493bf3d53c
1 zmienionych plików z 11 dodań i 5 usunięć
  1. 11 5
      src/views/manage/center/user/index.vue

+ 11 - 5
src/views/manage/center/user/index.vue

@@ -113,11 +113,7 @@
               @click="onEdit(scope.row)"
             />
             <CzrButton
-              v-if="
-                AppStore.isSuperAdmin &&
-                state.query.form.tenantId === AppStore.tenantInfo.id &&
-                AppStore.hasPermission($route.name, 'del')
-              "
+              v-if="isDelCpt"
               type="table-del"
               @click="onDel(scope.row)"
             />
@@ -284,6 +280,16 @@ watch(
 const isPTGLCpt = computed(() => {
   return AppStore.tenantInfo?.id == (import.meta as any).env.VITE_TENANT_ID_PTGL
 })
+const isDelCpt = computed(() => {
+  return (
+    AppStore.isSuperAdmin &&
+    (state.query.form.tenantId === AppStore.tenantInfo?.id ||
+      (isPTGLCpt.value &&
+        state.query.form.tenantId ==
+          (import.meta as any).env.VITE_TENANT_ID_GGKJ)) &&
+    AppStore.hasPermission($route.name, 'del')
+  )
+})
 const onSort = ({ key, value }) => {
   state.query.sort[key] = value
   onSearch()