Forráskód Böngészése

1、租户配置通用租户,不可修改非本租户数据、租户id设置mybatsplus
2、超级管理员可以夸租户更改套餐
3、清理首页假数据
4、思维导图初始数据整理

liyanbo 7 hónapja
szülő
commit
05af56f2b8
63 módosított fájl, 214 hozzáadás és 229 törlés
  1. 1 0
      src/api/ai/chat/conversation/index.ts
  2. 1 0
      src/api/ai/chat/message/index.ts
  3. 1 0
      src/api/ai/image/index.ts
  4. 1 0
      src/api/ai/knowledge/document/index.ts
  5. 1 0
      src/api/ai/knowledge/knowledge/index.ts
  6. 1 0
      src/api/ai/knowledge/segment/index.ts
  7. 1 0
      src/api/ai/mindmap/index.ts
  8. 1 0
      src/api/ai/model/apiKey/index.ts
  9. 1 0
      src/api/ai/model/chatRole/index.ts
  10. 1 0
      src/api/ai/model/model/index.ts
  11. 1 0
      src/api/ai/model/tool/index.ts
  12. 1 0
      src/api/ai/music/index.ts
  13. 1 0
      src/api/ai/tts/index.ts
  14. 1 0
      src/api/ai/write/index.ts
  15. 1 0
      src/api/bjdx/course/index.ts
  16. 1 0
      src/api/bjdx/courseconfig/index.ts
  17. 1 0
      src/api/bjdx/courselabel/index.ts
  18. 1 0
      src/api/bjdx/coursequestion/index.ts
  19. 1 0
      src/api/bjdx/coursequestoption/index.ts
  20. 4 3
      src/api/bjdx/coursetype/index.ts
  21. 1 0
      src/api/bjdx/questionnaire/index.ts
  22. 1 0
      src/api/bjdxReport/reportmanage/index.ts
  23. 2 1
      src/api/bjdxResult/questionnaireresult/index.ts
  24. 2 1
      src/api/bjdxResult/questionnaireresultdetails/index.ts
  25. 1 0
      src/config/axios/index.ts
  26. 15 142
      src/views/Home/Index.vue
  27. 1 0
      src/views/Login/components/LoginForm.vue
  28. 4 2
      src/views/ai/chat/index/components/conversation/ConversationUpdateForm.vue
  29. 3 0
      src/views/ai/chat/manager/ChatConversationList.vue
  30. 3 0
      src/views/ai/chat/manager/ChatMessageList.vue
  31. 3 0
      src/views/ai/image/manager/index.vue
  32. 4 0
      src/views/ai/knowledge/document/index.vue
  33. 4 0
      src/views/ai/knowledge/knowledge/index.vue
  34. 4 0
      src/views/ai/knowledge/segment/index.vue
  35. 3 0
      src/views/ai/mindmap/manager/index.vue
  36. 4 0
      src/views/ai/model/apiKey/index.vue
  37. 4 0
      src/views/ai/model/chatRole/index.vue
  38. 4 0
      src/views/ai/model/model/index.vue
  39. 4 0
      src/views/ai/model/tool/index.vue
  40. 3 0
      src/views/ai/music/manager/index.vue
  41. 4 0
      src/views/ai/tts/index.vue
  42. 31 60
      src/views/ai/utils/constants.ts
  43. 4 0
      src/views/ai/workflow/index.vue
  44. 3 0
      src/views/ai/write/manager/index.vue
  45. 4 2
      src/views/bjdx/course/CourseForm.vue
  46. 4 0
      src/views/bjdx/course/index.vue
  47. 3 1
      src/views/bjdx/courseconfig/CourseConfigForm.vue
  48. 4 0
      src/views/bjdx/courseconfig/index.vue
  49. 2 1
      src/views/bjdx/courselabel/CourseLabelForm.vue
  50. 4 0
      src/views/bjdx/courselabel/index.vue
  51. 4 2
      src/views/bjdx/coursequestion/CourseQuestionForm.vue
  52. 4 0
      src/views/bjdx/coursequestion/index.vue
  53. 4 2
      src/views/bjdx/coursequestoption/CourseQuestOptionForm.vue
  54. 4 0
      src/views/bjdx/coursequestoption/index.vue
  55. 4 2
      src/views/bjdx/coursetype/CourseTypeForm.vue
  56. 4 0
      src/views/bjdx/coursetype/index.vue
  57. 8 2
      src/views/bjdx/questionnaire/ConfigQuestion.vue
  58. 4 0
      src/views/bjdx/questionnaire/index.vue
  59. 4 2
      src/views/bjdxReport/reportmanage/ManageForm.vue
  60. 4 0
      src/views/bjdxReport/reportmanage/index.vue
  61. 5 3
      src/views/bjdxResult/questionnaireresult/QuestionnaireResultForm.vue
  62. 5 3
      src/views/bjdxResult/questionnaireresultdetails/QuestionnaireResultDetailsForm.vue
  63. 4 0
      src/views/bjdxResult/questionnaireresultdetails/index.vue

+ 1 - 0
src/api/ai/chat/conversation/index.ts

@@ -21,6 +21,7 @@ export interface ChatConversationVO {
   roleAvatar?: string // 角色头像
   modelMaxTokens?: string // 模型的单条回复的最大 Token 数量
   modelMaxContexts?: string // 模型的上下文的最大 Message 数量
+  tenantId: number // 租户id
 }
 
 // AI 聊天对话 API

+ 1 - 0
src/api/ai/chat/message/index.ts

@@ -24,6 +24,7 @@ export interface ChatMessageVO {
   createTime: Date // 创建时间
   roleAvatar: string // 角色头像
   userAvatar: string // 用户头像
+  tenantId: Number // 租户id
 }
 
 // AI chat 聊天

+ 1 - 0
src/api/ai/image/index.ts

@@ -17,6 +17,7 @@ export interface ImageVO {
   buttons: ImageMidjourneyButtonsVO[] // mj 操作按钮
   createTime: Date // 创建时间
   finishTime: Date // 完成时间
+  tenantId: Number // 租户id
 }
 
 export interface ImageDrawReqVO {

+ 1 - 0
src/api/ai/knowledge/document/index.ts

@@ -10,6 +10,7 @@ export interface KnowledgeDocumentVO {
   segmentMaxTokens: number // 分片最大 token 数
   retrievalCount: number // 召回次数
   status: number // 是否启用
+  tenantId: number // 租户id
 }
 
 // AI 知识库文档 API

+ 1 - 0
src/api/ai/knowledge/knowledge/index.ts

@@ -8,6 +8,7 @@ export interface KnowledgeVO {
   embeddingModelId: number // 嵌入模型编号,高质量模式时维护
   topK: number // topK
   similarityThreshold: number // 相似度阈值
+  tenantId: number // 租户id
 }
 
 // AI 知识库 API

+ 1 - 0
src/api/ai/knowledge/segment/index.ts

@@ -12,6 +12,7 @@ export interface KnowledgeSegmentVO {
   retrievalCount: number // 召回次数
   status: number // 文档状态
   createTime: number // 创建时间
+  tenantId: number // 租户id
 }
 
 // AI 知识库分段 API

+ 1 - 0
src/api/ai/mindmap/index.ts

@@ -12,6 +12,7 @@ export interface MindMapVO {
   platform: string // 平台
   model: string // 模型
   errorMessage: string // 错误信息
+  tenantId: number // 租户id
 }
 
 // AI 思维导图生成 VO

+ 1 - 0
src/api/ai/model/apiKey/index.ts

@@ -8,6 +8,7 @@ export interface ApiKeyVO {
   platform: string // 平台
   url: string // 自定义 API 地址
   status: number // 状态
+  tenantId: number // 租户id
 }
 
 // AI API 密钥 API

+ 1 - 0
src/api/ai/model/chatRole/index.ts

@@ -17,6 +17,7 @@ export interface ChatRoleVO {
   status: number // 状态
   knowledgeIds?: number[] // 引用的知识库 ID 列表
   toolIds?: number[] // 引用的工具 ID 列表
+  tenantId: number // 租户id
 }
 
 // AI 聊天角色 分页请求 vo

+ 1 - 0
src/api/ai/model/model/index.ts

@@ -13,6 +13,7 @@ export interface ModelVO {
   temperature?: number // 温度参数
   maxTokens?: number // 单条回复的最大 Token 数量
   maxContexts?: number // 上下文的最大 Message 数量
+  tenantId: number // 租户id
 }
 
 // AI 模型 API

+ 1 - 0
src/api/ai/model/tool/index.ts

@@ -6,6 +6,7 @@ export interface ToolVO {
   name: string // 工具名称
   description: string // 工具描述
   status: number // 状态
+  tenantId: number // 租户id
 }
 
 // AI 工具 API

+ 1 - 0
src/api/ai/music/index.ts

@@ -20,6 +20,7 @@ export interface MusicVO {
   publicStatus: boolean // 是否发布
   taskId: string // 任务id
   errorMessage: string // 错误信息
+  tenantId: number // 租户id
 }
 
 // AI 音乐 API

+ 1 - 0
src/api/ai/tts/index.ts

@@ -12,6 +12,7 @@ export interface TtsVO {
   speechRate: number // 语速
   volume: number // 语调
   pitchRate: number // 音量
+  tenantId: Number // 租户id
 }
 
 // AI TTS文转音 API

+ 1 - 0
src/api/ai/write/index.ts

@@ -19,6 +19,7 @@ export interface WriteVO {
   generatedContent?: string // 生成的内容
   errorMessage?: string // 错误信息
   createTime?: Date // 创建时间
+  tenantId: number // 租户id
 }
 
 export interface AiWritePageReqVO extends PageParam {

+ 1 - 0
src/api/bjdx/course/index.ts

@@ -20,6 +20,7 @@ export interface CourseVO {
   courseLabel: string // 课程标签
   courseOrder: number // 课程排序
   courseStatus: "0" // 课程状态
+  tenantId: Number // 租户id
 }
 
 // 课程 API

+ 1 - 0
src/api/bjdx/courseconfig/index.ts

@@ -14,6 +14,7 @@ export interface CourseConfigVO {
   ccQuestOption: undefined  // 问题选项
   ccAiAnswer: undefined  // AI答案
   ccAnswer: undefined  // 答案
+  tenantId: Number // 租户id
 }
 
 // 课程配置 API

+ 1 - 0
src/api/bjdx/courselabel/index.ts

@@ -5,6 +5,7 @@ export interface CourseLabelVO {
   id: number // 课程标签关联id
   clCourseId: number // 课程id
   clCourseLabelId: string // 课程标签id(字典)
+  tenantId: Number // 租户id
 }
 
 // 课程-标签 API

+ 1 - 0
src/api/bjdx/coursequestion/index.ts

@@ -7,6 +7,7 @@ export interface CourseQuestionVO {
   cqQuestAnalysis: string // 试题解析
   cqQuestType: string // 试题类型
   cqQuestAnswerId: number // 试题答案id
+  tenantId: Number // 租户id
 }
 
 // 课程-试题 API

+ 1 - 0
src/api/bjdx/coursequestoption/index.ts

@@ -9,6 +9,7 @@ export interface CourseQuestOptionVO {
   cqoOption: string // 选项内容
   cqoSocre: number // 选项分值
   cqoIsAnswer: string // 答案
+  tenantId: Number // 租户id
 }
 
 // 课程-试题-选项 API

+ 4 - 3
src/api/bjdx/coursetype/index.ts

@@ -3,11 +3,12 @@ import request from '@/config/axios'
 // 课程-类型 VO
 export interface CourseTypeVO {
   id: number // 课程类型id
-  ctType: string // 课程类型名称
+  ctType: string, // 课程类型名称
   ctTypeNode: undefined, // 课程类型节点
   ctTypeSort: undefined, // 课程类型排序
-  ctParentId: number // 课程类型父级id
-  ctTypeDescribe: string // 课程类型描述
+  ctParentId: number, // 课程类型父级id
+  ctTypeDescribe: string, // 课程类型描述
+  tenantId: Number // 租户id
 }
 
 // 课程-类型 API

+ 1 - 0
src/api/bjdx/questionnaire/index.ts

@@ -9,6 +9,7 @@ export interface QuestionnaireVO {
   bqStartInfo: string // 问卷开始指导语
   bqEndInfo: string // 问卷结束指导语
   bqQuestIds: string // 问题id集
+  tenantId: Number // 租户id
 }
 // 课程-试题 VO
 export interface CourseQuestionVO {

+ 1 - 0
src/api/bjdxReport/reportmanage/index.ts

@@ -11,6 +11,7 @@ export interface ManageVO {
   brcReportAiCountMax: number // ai问答次数最大
   brcReportLevel: string // 等级
   brcReportComment: string // 评语
+  tenantId: Number // 租户id
 }
 
 // 评估报告-评语 API

+ 2 - 1
src/api/bjdxResult/questionnaireresult/index.ts

@@ -10,6 +10,7 @@ export interface QuestionnaireResultVO {
   bqrStartTime: Date // 答题开始时间
   bqrEndTime: Date // 答题结束时间
   bqrQuestTime: number // 答题耗时
+  tenantId: Number // 租户id
 }
 
 // 北京大学-问卷结果 API
@@ -43,4 +44,4 @@ export const QuestionnaireResultApi = {
   exportQuestionnaireResult: async (params) => {
     return await request.download({ url: `/bjdxResult/questionnaire-result/export-excel`, params })
   }
-}
+}

+ 2 - 1
src/api/bjdxResult/questionnaireresultdetails/index.ts

@@ -10,6 +10,7 @@ export interface QuestionnaireResultDetailsVO {
   bqrdQuestOptionId: number // 选择
   bqrdIsCorrect: string // 是否答对
   bqrdQuestSorce: number // 试题得分
+  tenantId: Number // 租户id
 }
 
 // 问卷结果-详情 API
@@ -43,4 +44,4 @@ export const QuestionnaireResultDetailsApi = {
   exportQuestionnaireResultDetails: async (params) => {
     return await request.download({ url: `/bjdxResult/questionnaire-result-details/export-excel`, params })
   }
-}
+}

+ 1 - 0
src/config/axios/index.ts

@@ -14,6 +14,7 @@ const request = (option: any) => {
     ...otherOption,
     headers: {
       'Content-Type': headersType || default_headers,
+      "tenant_id": option.data?.tenantId,
       ...headers
     }
   })

+ 15 - 142
src/views/Home/Index.vue

@@ -13,101 +13,18 @@
                   {{ t('workplace.welcome') }} {{ username }} {{ t('workplace.happyDay') }}
                 </div>
                 <div class="mt-10px text-14px text-gray-500">
-                  {{ t('workplace.toady') }},20℃ - 32℃!
+                  {{ t('workplace.toady') }}
                 </div>
               </div>
             </div>
           </el-col>
-          <el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
-            <div class="h-70px flex items-center justify-end lt-sm:mt-10px">
-<!--              <div class="px-8px text-right">
-                <div class="mb-16px text-14px text-gray-400">{{ t('workplace.project') }}</div>
-                <CountTo
-                  class="text-20px"
-                  :start-val="0"
-                  :end-val="totalSate.project"
-                  :duration="2600"
-                />
-              </div>
-              <el-divider direction="vertical" />-->
-              <div class="px-8px text-right">
-                <div class="mb-16px text-14px text-gray-400">{{ t('workplace.toDo') }}</div>
-                <CountTo
-                  class="text-20px"
-                  :start-val="0"
-                  :end-val="totalSate.todo"
-                  :duration="2600"
-                />
-              </div>
-              <el-divider direction="vertical" border-style="dashed" />
-              <div class="px-8px text-right">
-                <div class="mb-16px text-14px text-gray-400">{{ t('workplace.access') }}</div>
-                <CountTo
-                  class="text-20px"
-                  :start-val="0"
-                  :end-val="totalSate.access"
-                  :duration="2600"
-                />
-              </div>
-            </div>
-          </el-col>
         </el-row>
       </el-skeleton>
     </el-card>
   </div>
 
   <el-row class="mt-8px" :gutter="8" justify="space-between">
-    <el-col :xl="16" :lg="16" :md="24" :sm="24" :xs="24" class="mb-8px">
-<!--      <el-card shadow="never">
-        <template #header>
-          <div class="h-3 flex justify-between">
-            <span>{{ t('workplace.project') }}</span>
-            <el-link
-              type="primary"
-              :underline="false"
-              href="https://github.com/yudaocode"
-              target="_blank"
-            >
-              {{ t('action.more') }}
-            </el-link>
-          </div>
-        </template>
-        <el-skeleton :loading="loading" animated>
-          <el-row>
-            <el-col
-              v-for="(item, index) in projects"
-              :key="`card-${index}`"
-              :xl="8"
-              :lg="8"
-              :md="8"
-              :sm="24"
-              :xs="24"
-            >
-              <el-card
-                shadow="hover"
-                class="mr-5px mt-5px cursor-pointer"
-                @click="handleProjectClick(item.message)"
-              >
-                <div class="flex items-center">
-                  <Icon
-                    :icon="item.icon"
-                    :size="25"
-                    class="mr-8px"
-                    :style="{ color: item.color }"
-                  />
-                  <span class="text-16px">{{ item.name }}</span>
-                </div>
-                <div class="mt-12px text-12px text-gray-400">{{ t(item.message) }}</div>
-                <div class="mt-12px flex justify-between text-12px text-gray-400">
-                  <span>{{ item.personal }}</span>
-                  <span>{{ formatTime(item.time, 'yyyy-MM-dd') }}</span>
-                </div>
-              </el-card>
-            </el-col>
-          </el-row>
-        </el-skeleton>
-      </el-card>-->
-
+    <el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24" class="mb-8px">
       <el-card shadow="never">
         <template #header>
           <div class="h-3 flex justify-between">
@@ -127,28 +44,8 @@
           </el-row>
         </el-skeleton>
       </el-card>
-      <el-card shadow="never" class="mt-8px">
-        <el-skeleton :loading="loading" animated>
-          <el-row :gutter="20" justify="space-between">
-            <el-col :xl="10" :lg="10" :md="24" :sm="24" :xs="24">
-              <el-card shadow="hover" class="mb-8px">
-                <el-skeleton :loading="loading" animated>
-                  <Echart :options="pieOptionsData" :height="280" />
-                </el-skeleton>
-              </el-card>
-            </el-col>
-            <el-col :xl="14" :lg="14" :md="24" :sm="24" :xs="24">
-              <el-card shadow="hover" class="mb-8px">
-                <el-skeleton :loading="loading" animated>
-                  <Echart :options="barOptionsData" :height="280" />
-                </el-skeleton>
-              </el-card>
-            </el-col>
-          </el-row>
-        </el-skeleton>
-      </el-card>
     </el-col>
-    <el-col :xl="8" :lg="8" :md="24" :sm="24" :xs="24" class="mb-8px">
+    <el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24" class="mb-8px">
       <el-card shadow="never" class="mt-8px">
         <template #header>
           <div class="h-3 flex justify-between">
@@ -277,18 +174,18 @@ const getProject = async () => {
 let notice = reactive<Notice[]>([])
 const getNotice = async () => {
   const data = [
-    {
-      title: 'Ai实验室接入平台豆包ai',
-      type: '系统升级',
-      keys: ['豆包ai'],
-      date: "2025-06-03"
-    },
-    {
-      title: 'Ai实验室接入平台DeekSeepAi',
-      type: '系统升级',
-      keys: ['DeekSeep'],
-      date: "2025-06-01"
-    },
+    // {
+    //   title: 'Ai实验室接入平台豆包ai',
+    //   type: '系统升级',
+    //   keys: ['豆包ai'],
+    //   date: "2025-06-03"
+    // },
+    // {
+    //   title: 'Ai实验室接入平台DeekSeepAi',
+    //   type: '系统升级',
+    //   keys: ['DeekSeep'],
+    //   date: "2025-06-01"
+    // },
   ]
   notice = Object.assign(notice, data)
 }
@@ -304,36 +201,12 @@ const getShortcut = async () => {
       url: '/',
       color: '#1fdaca'
     },
-    // {
-    //   name: '商城中心',
-    //   icon: 'ep:shop',
-    //   url: '/mall/home',
-    //   color: '#ff6b6b'
-    // },
     {
       name: 'AI 大模型',
       icon: 'tabler:ai',
       url: '/ai/chat',
       color: '#7c3aed'
     },
-    // {
-    //   name: 'ERP 系统',
-    //   icon: 'simple-icons:erpnext',
-    //   url: '/erp/home',
-    //   color: '#3fb27f'
-    // },
-    // {
-    //   name: 'CRM 系统',
-    //   icon: 'simple-icons:civicrm',
-    //   url: '/crm/backlog',
-    //   color: '#4daf1bc9'
-    // },
-    // {
-    //   name: 'IoT 物联网',
-    //   icon: 'fa-solid:hdd',
-    //   url: '/iot/home',
-    //   color: '#1a73e8'
-    // }
   ]
   shortcut = Object.assign(shortcut, data)
 }

+ 1 - 0
src/views/Login/components/LoginForm.vue

@@ -208,6 +208,7 @@ const getCode = async () => {
 const getTenantId = async () => {
   if (loginData.tenantEnable === 'true') {
     const res = await LoginApi.getTenantIdByName(loginData.loginForm.tenantName)
+    console.log('获取租户 ID', res)
     authUtil.setTenantId(res)
   }
 }

+ 4 - 2
src/views/ai/chat/index/components/conversation/ConversationUpdateForm.vue

@@ -78,7 +78,8 @@ const formData = ref({
   modelId: undefined,
   temperature: undefined,
   maxTokens: undefined,
-  maxContexts: undefined
+  maxContexts: undefined,
+  tenantId: undefined
 })
 const formRules = reactive({
   modelId: [{ required: true, message: '模型不能为空', trigger: 'blur' }],
@@ -141,7 +142,8 @@ const resetForm = () => {
     modelId: undefined,
     temperature: undefined,
     maxTokens: undefined,
-    maxContexts: undefined
+    maxContexts: undefined,
+    tenantId: undefined
   }
   formRef.value?.resetFields()
 }

+ 3 - 0
src/views/ai/chat/manager/ChatConversationList.vue

@@ -78,6 +78,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:chat-conversation:delete']"
           >
@@ -100,6 +101,8 @@
 import { dateFormatter } from '@/utils/formatTime'
 import { ChatConversationApi, ChatConversationVO } from '@/api/ai/chat/conversation'
 import * as UserApi from '@/api/system/user'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 const message = useMessage() // 消息弹窗
 const { t } = useI18n() // 国际化

+ 3 - 0
src/views/ai/chat/manager/ChatMessageList.vue

@@ -88,6 +88,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:chat-message:delete']"
           >
@@ -111,6 +112,8 @@ import { dateFormatter } from '@/utils/formatTime'
 import { ChatMessageApi, ChatMessageVO } from '@/api/ai/chat/message'
 import * as UserApi from '@/api/system/user'
 import { DICT_TYPE } from '@/utils/dict'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 const message = useMessage() // 消息弹窗
 const { t } = useI18n() // 国际化

+ 3 - 0
src/views/ai/image/manager/index.vue

@@ -142,6 +142,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:image:delete']"
           >
@@ -166,6 +167,8 @@ import { dateFormatter } from '@/utils/formatTime'
 import { ImageApi, ImageVO } from '@/api/ai/image'
 import * as UserApi from '@/api/system/user'
 import { AiImageStatusEnum } from '@/views/ai/utils/constants'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** AI 绘画 列表 */
 defineOptions({ name: 'AiImageManager' })

+ 4 - 0
src/views/ai/knowledge/document/index.vue

@@ -74,6 +74,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleUpdate(scope.row.id)"
             v-hasPermi="['ai:knowledge:update']"
           >
@@ -90,6 +91,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:knowledge:delete']"
           >
@@ -118,6 +120,8 @@ import { KnowledgeDocumentApi, KnowledgeDocumentVO } from '@/api/ai/knowledge/do
 import { useRoute, useRouter } from 'vue-router'
 import { checkPermi } from '@/utils/permission'
 import { CommonStatusEnum } from '@/utils/constants'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 // import KnowledgeDocumentForm from './KnowledgeDocumentForm.vue'
 
 /** AI 知识库文档 列表 */

+ 4 - 0
src/views/ai/knowledge/knowledge/index.vue

@@ -83,6 +83,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['ai:knowledge:update']"
           >
@@ -107,6 +108,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:knowledge:delete']"
           >
@@ -134,6 +136,8 @@ import { dateFormatter } from '@/utils/formatTime'
 import { KnowledgeApi, KnowledgeVO } from '@/api/ai/knowledge/knowledge'
 import KnowledgeForm from './KnowledgeForm.vue'
 import { useRouter } from 'vue-router'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** AI 知识库列表 */
 defineOptions({ name: 'Knowledge' })

+ 4 - 0
src/views/ai/knowledge/segment/index.vue

@@ -107,6 +107,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['ai:knowledge:update']"
           >
@@ -115,6 +116,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:knowledge:delete']"
           >
@@ -143,6 +145,8 @@ import { KnowledgeSegmentApi, KnowledgeSegmentVO } from '@/api/ai/knowledge/segm
 import KnowledgeSegmentForm from './KnowledgeSegmentForm.vue'
 import { CommonStatusEnum } from '@/utils/constants'
 import { checkPermi } from '@/utils/permission'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** AI 知识库分段 列表 */
 defineOptions({ name: 'KnowledgeSegment' })

+ 3 - 0
src/views/ai/mindmap/manager/index.vue

@@ -77,6 +77,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:mind-map:delete']"
           >
@@ -111,6 +112,8 @@ import { dateFormatter } from '@/utils/formatTime'
 import { AiMindMapApi, MindMapVO } from '@/api/ai/mindmap'
 import * as UserApi from '@/api/system/user'
 import Right from '@/views/ai/mindmap/index/components/Right.vue'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** AI 思维导图 列表 */
 defineOptions({ name: 'AiMindMapManager' })

+ 4 - 0
src/views/ai/model/apiKey/index.vue

@@ -79,6 +79,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['ai:api-key:update']"
           >
@@ -87,6 +88,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:api-key:delete']"
           >
@@ -112,6 +114,8 @@
 import { getIntDictOptions, DICT_TYPE, getStrDictOptions } from '@/utils/dict'
 import { ApiKeyApi, ApiKeyVO } from '@/api/ai/model/apiKey'
 import ApiKeyForm from './ApiKeyForm.vue'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** AI API 密钥 列表 */
 defineOptions({ name: 'AiApiKey' })

+ 4 - 0
src/views/ai/model/chatRole/index.vue

@@ -103,6 +103,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['ai:chat-role:update']"
           >
@@ -111,6 +112,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:chat-role:delete']"
           >
@@ -137,6 +139,8 @@ import { getBoolDictOptions, DICT_TYPE } from '@/utils/dict'
 import { ChatRoleApi, ChatRoleVO } from '@/api/ai/model/chatRole'
 import ChatRoleForm from './ChatRoleForm.vue'
 import { TtsApi} from '@/api/ai/tts'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** AI 聊天角色 列表 */
 defineOptions({ name: 'AiChatRole' })

+ 4 - 0
src/views/ai/model/model/index.vue

@@ -85,6 +85,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['ai:model:update']"
           >
@@ -93,6 +94,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:model:delete']"
           >
@@ -119,6 +121,8 @@ import { ModelApi, ModelVO } from '@/api/ai/model/model'
 import ModelForm from './ModelForm.vue'
 import { DICT_TYPE } from '@/utils/dict'
 import { ApiKeyApi, ApiKeyVO } from '@/api/ai/model/apiKey'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** API 模型列表 */
 defineOptions({ name: 'AiModel' })

+ 4 - 0
src/views/ai/model/tool/index.vue

@@ -72,6 +72,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['ai:tool:update']"
           >
@@ -80,6 +81,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:tool:delete']"
           >
@@ -106,6 +108,8 @@ import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
 import { dateFormatter } from '@/utils/formatTime'
 import { ToolApi, ToolVO } from '@/api/ai/model/tool'
 import ToolForm from './ToolForm.vue'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** AI 工具 列表 */
 defineOptions({ name: 'AiTool' })

+ 3 - 0
src/views/ai/music/manager/index.vue

@@ -183,6 +183,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:music:delete']"
           >
@@ -207,6 +208,8 @@ import { dateFormatter } from '@/utils/formatTime'
 import { MusicApi, MusicVO } from '@/api/ai/music'
 import * as UserApi from '@/api/system/user'
 import { AiMusicStatusEnum } from '@/views/ai/utils/constants'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** AI 音乐 列表 */
 defineOptions({ name: 'AiMusicManager' })

+ 4 - 0
src/views/ai/tts/index.vue

@@ -174,6 +174,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['ai:tts:update']"
           >
@@ -182,6 +183,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:tts:delete']"
           >
@@ -209,6 +211,8 @@ import { dateFormatter } from '@/utils/formatTime'
 import download from '@/utils/download'
 import { TtsApi, TtsVO } from '@/api/ai/tts'
 import TtsForm from './TtsForm.vue'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** AI TTS文转音 列表 */
 defineOptions({ name: 'AiTts' })

+ 31 - 60
src/views/ai/utils/constants.ts

@@ -420,63 +420,34 @@ export const WriteExample = {
 // ========== 【思维导图 UI】相关的枚举 ==========
 
 /** 思维导图已有内容生成示例 **/
-export const MindMapContentExample = `# Java 技术栈
-
-## 核心技术
-### Java SE
-### Java EE
-
-## 框架
-### Spring
-#### Spring Boot
-#### Spring MVC
-#### Spring Data
-### Hibernate
-### MyBatis
-
-## 构建工具
-### Maven
-### Gradle
-
-## 版本控制
-### Git
-### SVN
-
-## 测试工具
-### JUnit
-### Mockito
-### Selenium
-
-## 应用服务器
-### Tomcat
-### Jetty
-### WildFly
-
-## 数据库
-### MySQL
-### PostgreSQL
-### Oracle
-### MongoDB
-
-## 消息队列
-### Kafka
-### RabbitMQ
-### ActiveMQ
-
-## 微服务
-### Spring Cloud
-### Dubbo
-
-## 容器化
-### Docker
-### Kubernetes
-
-## 云服务
-### AWS
-### Azure
-### Google Cloud
-
-## 开发工具
-### IntelliJ IDEA
-### Eclipse
-### Visual Studio Code`
+export const MindMapContentExample = `# 人工智能通识课平台
+
+## 小学低年级
+### 01 AI新朋友
+### 02 AI时光旅行
+### 03 神奇的机器人伙伴
+### 04 AI智能在身边
+### 05 芯片王国大冒险
+### 06 AI数据大做战
+### 07 AI如何学习
+### 08 如何正确使用AI
+
+## 小学中年级
+### 01 AI初体验
+### 02 AI发展历史
+### 03 AI与机器人
+### 04 AI的智能应用
+### 05 AI的超级大脑-芯片
+### 06 AI数据表征与感知智能
+### 07 AI如何学习
+### 08 AI伦理安全
+
+## 小学高年级
+### 01 什么是人工智能
+### 02 AI发展历程
+### 03 AI与机器人
+### 04 AI智能应用体验
+### 05 芯片算力:AI加速器
+### 06 AI数据表征
+### 07 AI算法原理
+### 08 AI伦理安全`

+ 4 - 0
src/views/ai/workflow/index.vue

@@ -85,6 +85,7 @@
           <el-button
             type="primary"
             link
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['ai:workflow:update']"
           >
@@ -93,6 +94,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:workflow:delete']"
           >
@@ -117,6 +119,8 @@
 import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 import * as WorkflowApi from '@/api/ai/workflow'
 import { dateFormatter } from '@/utils/formatTime'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 defineOptions({ name: 'AiWorkflow' })
 

+ 3 - 0
src/views/ai/write/manager/index.vue

@@ -134,6 +134,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['ai:write:delete']"
           >
@@ -158,6 +159,8 @@ import { dateFormatter } from '@/utils/formatTime'
 import { useRouter } from 'vue-router'
 import { WriteApi, AiWritePageReqVO, AiWriteRespVo } from '@/api/ai/write'
 import * as UserApi from '@/api/system/user'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** AI 写作列表 */
 defineOptions({ name: 'AiWriteManager' })

+ 4 - 2
src/views/bjdx/course/CourseForm.vue

@@ -292,7 +292,8 @@ const formData = ref({
   courseType: undefined,
   courseLabel: undefined,
   courseOrder: undefined,
-  courseStatus: "0"
+  courseStatus: "0",
+  tenantId: undefined,
 })
 
 const formRules = reactive({
@@ -393,7 +394,8 @@ const resetForm = () => {
     courseType: undefined,
     courseLabel: undefined,
     courseOrder: undefined,
-    courseStatus: "0"
+    courseStatus: "0",
+    tenantId: undefined,
   }
   formRef.value?.resetFields()
 }

+ 4 - 0
src/views/bjdx/course/index.vue

@@ -171,6 +171,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['bjdx:course:update']"
           >
@@ -193,6 +194,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['bjdx:course:delete']"
           >
@@ -226,6 +228,8 @@ import CoursePreview from '@/views/bjdx/course/CoursePreview.vue'
 import { useRouter } from 'vue-router'
 import { defaultProps, handleTree } from '@/utils/tree'
 import { CourseTypeApi } from '@/api/bjdx/coursetype'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** 课程 列表 */
 defineOptions({ name: 'Course' })

+ 3 - 1
src/views/bjdx/courseconfig/CourseConfigForm.vue

@@ -191,6 +191,7 @@ const formData = ref({
   ccAiQuestTip: undefined,  // AI问题提示
   ccAiAnswer: undefined,  // AI答案
   ccAnswer: undefined,  // 答案
+  tenantId: undefined,
 })
 const formRules = reactive({
   ccTime: [{ required: true, message: t('common.required'), trigger: 'blur' }],
@@ -307,7 +308,8 @@ const resetForm = () => {
     ccQuestOption: undefined,  // 问题选项
     ccAiQuestTip: undefined,  // AI问题提示
     ccAiAnswer: undefined,  // AI答案
-    ccAnswer: undefined,  // 答案
+    ccAnswer: undefined,  // 答案,
+    tenantId: undefined,
   }
   formRef.value?.resetFields()
   selectedQuestIds.value = []

+ 4 - 0
src/views/bjdx/courseconfig/index.vue

@@ -104,6 +104,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id, queryParams.ccCourseId, queryParams.courseName)"
             v-hasPermi="['bjdx:course-config:update']"
           >
@@ -112,6 +113,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['bjdx:course-config:delete']"
           >
@@ -139,6 +141,8 @@ import download from '@/utils/download'
 import { useRoute } from 'vue-router'
 import { CourseConfigApi, CourseConfigVO } from '@/api/bjdx/courseconfig'
 import CourseConfigForm from './CourseConfigForm.vue'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** 课程配置 列表 */
 defineOptions({ name: 'CourseConfig' })

+ 2 - 1
src/views/bjdx/courselabel/CourseLabelForm.vue

@@ -36,7 +36,8 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改
 const formData = ref({
   id: undefined,
   clCourseId: undefined,
-  clCourseLabelId: undefined
+  clCourseLabelId: undefined,
+  tenantId: undefined,
 })
 const formRules = reactive({
 })

+ 4 - 0
src/views/bjdx/courselabel/index.vue

@@ -61,6 +61,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['bjdx:course-label:update']"
           >
@@ -69,6 +70,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['bjdx:course-label:delete']"
           >
@@ -94,6 +96,8 @@
 import download from '@/utils/download'
 import { CourseLabelApi, CourseLabelVO } from '@/api/bjdx/courselabel'
 import CourseLabelForm from './CourseLabelForm.vue'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** 课程-标签 列表 */
 defineOptions({ name: 'CourseLabel' })

+ 4 - 2
src/views/bjdx/coursequestion/CourseQuestionForm.vue

@@ -60,7 +60,8 @@ const formData = ref({
   cqQuestion: undefined,
   cqQuestAnalysis: undefined,
   cqQuestType: undefined,
-  cqQuestAnswerId: undefined
+  cqQuestAnswerId: undefined,
+  tenantId: undefined,
 })
 
 //试题选项列表
@@ -122,7 +123,8 @@ const resetForm = () => {
     cqQuestion: undefined,
     cqQuestAnalysis: undefined,
     cqQuestType: undefined,
-    cqQuestAnswerId: undefined
+    cqQuestAnswerId: undefined,
+    tenantId: undefined,
   }
   formRef.value?.resetFields()
 }

+ 4 - 0
src/views/bjdx/coursequestion/index.vue

@@ -80,6 +80,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['bjdx:course-question:update']"
           >
@@ -88,6 +89,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['bjdx:course-question:delete']"
           >
@@ -123,6 +125,8 @@ import { CourseQuestionApi, CourseQuestionVO } from '@/api/bjdx/coursequestion'
 import CourseQuestionForm from './CourseQuestionForm.vue'
 import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
 import { useRouter } from 'vue-router'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** 课程-试题 列表 */
 defineOptions({ name: 'CourseQuestion' })

+ 4 - 2
src/views/bjdx/coursequestoption/CourseQuestOptionForm.vue

@@ -59,7 +59,8 @@ const formData = ref({
   cqoValue: undefined,
   cqoOption: undefined,
   cqoSocre: undefined,
-  cqoIsAnswer: undefined
+  cqoIsAnswer: undefined,
+  tenantId: undefined,
 })
 const formRules = reactive({
 })
@@ -117,7 +118,8 @@ const resetForm = () => {
     cqoValue: undefined,
     cqoOption: undefined,
     cqoSocre: undefined,
-    cqoIsAnswer: undefined
+    cqoIsAnswer: undefined,
+    tenantId: undefined,
   }
   formRef.value?.resetFields()
 }

+ 4 - 0
src/views/bjdx/coursequestoption/index.vue

@@ -96,6 +96,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id, queryParams.cqoQuestId)"
             v-hasPermi="['bjdx:course-quest-option:update']"
           >
@@ -104,6 +105,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['bjdx:course-quest-option:delete']"
           >
@@ -131,6 +133,8 @@ import download from '@/utils/download'
 import { CourseQuestOptionApi, CourseQuestOptionVO } from '@/api/bjdx/coursequestoption'
 import CourseQuestOptionForm from './CourseQuestOptionForm.vue'
 import { useRoute } from 'vue-router'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** 课程-试题-选项 列表 */
 defineOptions({ name: 'CourseQuestOption' })

+ 4 - 2
src/views/bjdx/coursetype/CourseTypeForm.vue

@@ -70,7 +70,8 @@ const formData = ref({
   ctTypeNode: 0,
   ctTypeSort: undefined,
   ctParentId: 0,
-  ctTypeDescribe: undefined
+  ctTypeDescribe: undefined,
+  tenantId: undefined,
 })
 const formRules = reactive({
   ctParentId: [{ required: true, message: '父级节点不能为空', trigger: 'blur' }],
@@ -135,7 +136,8 @@ const resetForm = () => {
     ctTypeNode: 0,
     ctTypeSort: undefined,
     ctParentId: 0,
-    ctTypeDescribe: undefined
+    ctTypeDescribe: undefined,
+    tenantId: undefined,
   }
   formRef.value?.resetFields()
 }

+ 4 - 0
src/views/bjdx/coursetype/index.vue

@@ -98,6 +98,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['bjdx:course-type:update']"
           >
@@ -106,6 +107,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('create', undefined, scope.row.id)"
             v-hasPermi="['bjdx:course-type:create']"
           >
@@ -114,6 +116,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['bjdx:course-type:delete']"
           >
@@ -142,6 +145,7 @@ import { CourseTypeApi, CourseTypeVO } from '@/api/bjdx/coursetype'
 import CourseTypeForm from './CourseTypeForm.vue'
 import { ElButton } from 'element-plus'
 import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
+import { getTenantId } from '@/utils/auth'
 
 /** 课程-类型 列表 */
 defineOptions({ name: 'CourseType' })

+ 8 - 2
src/views/bjdx/questionnaire/ConfigQuestion.vue

@@ -82,6 +82,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['bjdx:course-question:update']"
           >
@@ -90,6 +91,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['bjdx:course-question:delete']"
           >
@@ -196,6 +198,8 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
 import { useRoute, useRouter } from 'vue-router'
 import { useI18n } from 'vue-i18n'
 import CourseQuestionForm from '@/views/bjdx/coursequestion/CourseQuestionForm.vue'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 
 /** 课程-试题 列表 */
@@ -214,7 +218,8 @@ const queryParams = reactive({
   questionIds: [], // 题id
   questionnaire: undefined, // 试卷名称
   cqQuestion: undefined, // 试题内容
-  cqQuestType: undefined // 试题类型
+  cqQuestType: undefined, // 试题类型
+  tenantId: undefined,
 })
 const queryFormRef = ref() // 搜索的表单
 const route = useRoute()
@@ -230,7 +235,8 @@ const selectQueryParams = reactive({
   questionnaireId: undefined, // 试题id
   questionIds: [], // 试题id
   cqQuestion: undefined, // 试题内容
-  cqQuestType: undefined // 试题类型
+  cqQuestType: undefined, // 试题类型,
+  tenantId: undefined,
 })
 const selectQueryFormRef = ref()
 const selectTableRef = ref()

+ 4 - 0
src/views/bjdx/questionnaire/index.vue

@@ -86,6 +86,7 @@
           <el-button
             type="primary"
             link
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['bjdx:questionnaire:update']"
           >
@@ -94,6 +95,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['bjdx:questionnaire:delete']"
           >
@@ -128,6 +130,8 @@ import download from '@/utils/download'
 import { QuestionnaireApi, QuestionnaireVO } from '@/api/bjdx/questionnaire'
 import QuestionnaireForm from './QuestionnaireForm.vue'
 import { useRouter } from 'vue-router'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** 问卷 列表 */
 defineOptions({ name: 'Questionnaire' })

+ 4 - 2
src/views/bjdxReport/reportmanage/ManageForm.vue

@@ -60,7 +60,8 @@ const formData = ref({
   brcReportAiCountMin: undefined,
   brcReportAiCountMax: undefined,
   brcReportLevel: undefined,
-  brcReportComment: undefined
+  brcReportComment: undefined,
+  tenantId: undefined,
 })
 const formRules = reactive({
 })
@@ -119,7 +120,8 @@ const resetForm = () => {
     brcReportAiCountMin: undefined,
     brcReportAiCountMax: undefined,
     brcReportLevel: undefined,
-    brcReportComment: undefined
+    brcReportComment: undefined,
+    tenantId: undefined,
   }
   formRef.value?.resetFields()
 }

+ 4 - 0
src/views/bjdxReport/reportmanage/index.vue

@@ -139,6 +139,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.brcId)"
             v-hasPermi="['report:manage:update']"
           >
@@ -147,6 +148,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.brcId)"
             v-hasPermi="['report:manage:delete']"
           >
@@ -174,6 +176,8 @@ import download from '@/utils/download'
 // 修复导入路径,使用 @ 别名代替 src/
 import { ManageApi, ManageVO } from '@/api/bjdxReport/reportmanage'
 import ManageForm from './ManageForm.vue'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** 评估报告-评语 列表 */
 defineOptions({ name: 'ReportManage' })

+ 5 - 3
src/views/bjdxResult/questionnaireresult/QuestionnaireResultForm.vue

@@ -80,7 +80,8 @@ const formData = ref({
   bqrSorce: undefined,
   bqrStartTime: undefined,
   bqrEndTime: undefined,
-  bqrQuestTime: undefined
+  bqrQuestTime: undefined,
+  tenantId: undefined,
 })
 const formRules = reactive({
 })
@@ -138,8 +139,9 @@ const resetForm = () => {
     bqrSorce: undefined,
     bqrStartTime: undefined,
     bqrEndTime: undefined,
-    bqrQuestTime: undefined
+    bqrQuestTime: undefined,
+    tenantId: undefined,
   }
   formRef.value?.resetFields()
 }
-</script>
+</script>

+ 5 - 3
src/views/bjdxResult/questionnaireresultdetails/QuestionnaireResultDetailsForm.vue

@@ -65,7 +65,8 @@ const formData = ref({
   bqrdQuestionId: undefined,
   bqrdQuestOptionId: undefined,
   bqrdIsCorrect: undefined,
-  bqrdQuestSorce: undefined
+  bqrdQuestSorce: undefined,
+  tenantId: undefined,
 })
 const formRules = reactive({
 })
@@ -123,8 +124,9 @@ const resetForm = () => {
     bqrdQuestionId: undefined,
     bqrdQuestOptionId: undefined,
     bqrdIsCorrect: undefined,
-    bqrdQuestSorce: undefined
+    bqrdQuestSorce: undefined,
+    tenantId: undefined,
   }
   formRef.value?.resetFields()
 }
-</script>
+</script>

+ 4 - 0
src/views/bjdxResult/questionnaireresultdetails/index.vue

@@ -130,6 +130,7 @@
           <el-button
             link
             type="primary"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="openForm('update', scope.row.id)"
             v-hasPermi="['bjdxResult:questionnaire-result-details:update']"
           >
@@ -138,6 +139,7 @@
           <el-button
             link
             type="danger"
+            v-if="scope.row.tenantId === getTenantId()"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['bjdxResult:questionnaire-result-details:delete']"
           >
@@ -165,6 +167,8 @@ import { dateFormatter } from '@/utils/formatTime'
 import download from '@/utils/download'
 import { QuestionnaireResultDetailsApi, QuestionnaireResultDetailsVO } from '@/api/bjdxResult/questionnaireresultdetails'
 import QuestionnaireResultDetailsForm from './QuestionnaireResultDetailsForm.vue'
+import { getTenantId } from '@/utils/auth'
+import { ElButton } from 'element-plus'
 
 /** 问卷结果-详情 列表 */
 defineOptions({ name: 'QuestionnaireResultDetails' })