1
0

2 کامیت‌ها f9bbafafd8 ... f6e1011b82

نویسنده SHA1 پیام تاریخ
  wangkeyi f6e1011b82 [Mod 0000]AI智能助手添加按钮权限 1 هفته پیش
  wangkeyi 546bd378ef [Mod 0000]修改通用表格的批量删除弹框字体颜色及逻辑 1 هفته پیش

+ 9 - 1
src/layouts/default/index.vue

@@ -14,7 +14,12 @@
     </Layout>
     </Layout>
 
 
     <!-- AI智能助手悬浮按钮(支持拖动,固定右侧) -->
     <!-- AI智能助手悬浮按钮(支持拖动,固定右侧) -->
-    <div class="ai-assistant-float" :style="{ right: aiBtnPosition.right, bottom: aiBtnPosition.bottom }" @mousedown="handleDragStart">
+    <div
+      v-if="hasPermission('show:ventAI')"
+      class="ai-assistant-float"
+      :style="{ right: aiBtnPosition.right, bottom: aiBtnPosition.bottom }"
+      @mousedown="handleDragStart"
+    >
       <div class="ai-float-icon" @click="openAiAssistant"></div>
       <div class="ai-float-icon" @click="openAiAssistant"></div>
     </div>
     </div>
 
 
@@ -40,6 +45,7 @@
   import { useAppStore } from '/@/store/modules/app';
   import { useAppStore } from '/@/store/modules/app';
 
 
   import { useAppInject } from '/@/hooks/web/useAppInject';
   import { useAppInject } from '/@/hooks/web/useAppInject';
+  import { usePermission } from '/@/hooks/web/usePermission';
   import { antPrefixCls } from '/@/settings/designSetting';
   import { antPrefixCls } from '/@/settings/designSetting';
 
 
   export default defineComponent({
   export default defineComponent({
@@ -58,6 +64,7 @@
       const { prefixCls } = useDesign('default-layout');
       const { prefixCls } = useDesign('default-layout');
       const { getIsMobile } = useAppInject();
       const { getIsMobile } = useAppInject();
       const { getShowSidebar, getIsMixSidebar, getShowMenu } = useMenuSetting();
       const { getShowSidebar, getIsMixSidebar, getShowMenu } = useMenuSetting();
+      const { hasPermission } = usePermission();
 
 
       // Create a lock screen monitor
       // Create a lock screen monitor
       const lockEvents = useLockPage();
       const lockEvents = useLockPage();
@@ -157,6 +164,7 @@
         getIsMixSidebar,
         getIsMixSidebar,
         layoutClass,
         layoutClass,
         lockEvents,
         lockEvents,
+        hasPermission,
         aiAssistantVisible,
         aiAssistantVisible,
         aiBtnPosition,
         aiBtnPosition,
         openAiAssistant,
         openAiAssistant,

+ 9 - 8
src/views/vent/deviceManager/comment/NormalTable.vue

@@ -31,7 +31,7 @@
         <slot name="filterCell" v-bind="{ column, record }"></slot>
         <slot name="filterCell" v-bind="{ column, record }"></slot>
       </template>
       </template>
     </BasicTable>
     </BasicTable>
-    <DeviceModal @register="registerModal" @saveOrUpdate="saveOrUpdateHandler" :showTab="showTab" :deviceType="deviceType" />
+    <DeviceModal @register="registerModal" @save-or-update="saveOrUpdateHandler" :showTab="showTab" :deviceType="deviceType" />
     <!-- <DeviceModal v-model:visible="modalVisible" @saveOrUpdate="saveOrUpdateHandler" @close-modal="closeModal" :showTab="showTab"  /> -->
     <!-- <DeviceModal v-model:visible="modalVisible" @saveOrUpdate="saveOrUpdateHandler" @close-modal="closeModal" :showTab="showTab"  /> -->
   </div>
   </div>
 </template>
 </template>
@@ -254,13 +254,6 @@
               reject(err);
               reject(err);
             }
             }
           );
           );
-          // 兜底:API 未触发任何回调时(如取消弹窗),自动结束 pending 状态
-          setTimeout(() => {
-            if (!done) {
-              done = true;
-              resolve(undefined);
-            }
-          }, 3000);
         }),
         }),
       { confirm: false }
       { confirm: false }
     );
     );
@@ -335,3 +328,11 @@
     }
     }
   }
   }
 </style>
 </style>
+<style lang="less">
+  .delete-confirm-modal {
+    .zxm-modal-confirm-title,
+    .zxm-modal-confirm-content {
+      color: #fff;
+    }
+  }
+</style>

+ 1 - 0
src/views/vent/deviceManager/deviceTable/device.api.ts

@@ -70,6 +70,7 @@ export const batchDeleteById = (params, handleSuccess, handleCancel) => {
     content: '是否删除选中数据',
     content: '是否删除选中数据',
     okText: '确认',
     okText: '确认',
     cancelText: '取消',
     cancelText: '取消',
+    wrapClassName: 'delete-confirm-modal',
     onOk: () => {
     onOk: () => {
       return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
       return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
         handleSuccess();
         handleSuccess();