فهرست منبع

Merge branch 'master' of http://173.18.12.196:3000/front/self-constructing_graph

cynthia-qin 3 هفته پیش
والد
کامیت
9f9ab0c1f6

+ 8 - 13
src/components/LayoutHeader.vue

@@ -35,7 +35,7 @@
 import { ref, computed, onMounted, onBeforeUnmount, getCurrentInstance } from 'vue'
 import { useMenuStore } from "@/stores/menu.js"
 import { useRoute, useRouter } from "vue-router";
-import { getSessionVar, clearSessionVar, saveSessionVar } from '@/utils/session'
+import { getSessionVar, clearSessionVar, saveSessionVar, deleteSessionVar } from '@/utils/session'
 import EditPasswordDialog from "@/components/EditPasswordDialog.vue"
 import { knowledgeGraphAddr } from "@/utils/config"
 import { isNotLogin } from "@/utils/app"
@@ -50,19 +50,14 @@ const menuRef = ref()
 const menuStore = useMenuStore()
 // console.log(operationPermissions)
 const user = ref({
-  id: "0",
-  full_name: 'John Doe',
-  username: 'johndoe',
-})
-user.value = {
   id: getSessionVar('user_id') || "0",
   full_name: getSessionVar('full_name') || 'John Doe',
   username: getSessionVar('username') || 'johndoe',
-}
+})
 
 // 机构相关
 const orgList = ref([])
-let currentOrg = ref(getSessionVar('org_id') || '') // 当前机构id
+let currentOrg = ref() // 当前机构id
 
 // 获取机构列表
 const fetchOrgList = async () => {
@@ -73,7 +68,7 @@ const fetchOrgList = async () => {
   const res = await proxy.$http.get('/open-platform/sys/currSURO')
   // console.log('当前机构11:', res)
   currentOrg.value = +res
-  saveSessionVar('org_id', +res)
+
 
   // console.log('机构列表:', orgList.value)
   // console.log('当前机构:', currentOrg.value)
@@ -84,11 +79,11 @@ const changeOrg = async (orgId) => {
   // 可调用后端切换机构接口
   const res = await proxy.$http.post(`/open-platform/sys/changeSURO/${orgId}`)
   // console.log('切换机构结果:', res)
-  saveSessionVar('org_id', orgId)
-  saveSessionVar("knowledageSystem", '');
-  saveSessionVar('routeList', '')
+  // saveSessionVar('org_id', orgId)
+  deleteSessionVar("knowledageSystem");
+  deleteSessionVar('routeList', '')
   // 可选:刷新页面或重新拉取权限/菜单等
-  menuStore.updateRouteList([]);
+  // menuStore.updateRouteList([]);
   let knowledageSystem = '';
   let routeList = [{
     path: '/kmplatform/home',

+ 4 - 0
src/utils/config.js

@@ -8,3 +8,7 @@ export const knowledgeGraphAddr = process.env.NODE_ENV === 'development' ? 'http
 
 export const pdfjsAddr = window.location.origin + '/static/pdfjs310/web/viewer.html'
 
+export default {
+  api, knowledgeGraphAddr, pdfjsAddr
+}
+

+ 16 - 2
src/views/KMPlatform/OpenPlatform/OpenPlatform.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-container class="main-container">
+  <div class="main-container">
     <el-container>
       <el-aside class="main-aside">
         <!-- 开放平台 -->
@@ -17,6 +17,8 @@
               <template #title>相关接口</template>
               <el-menu-item index="1-3-1" @click="handlePath('1')">实体查询</el-menu-item>
               <el-menu-item index="1-3-2" @click="handlePath('2')">实体关系查询</el-menu-item>
+              <el-menu-item index="1-3-3" @click="handlePath('3')">实体的属性查询</el-menu-item>
+              <el-menu-item index="1-3-4" @click="handlePath('4')">关系的属性查询</el-menu-item>
             </el-sub-menu>
           </el-sub-menu>
         </el-menu>
@@ -28,7 +30,7 @@
         </router-view>
       </el-main>
     </el-container>
-  </el-container>
+  </div>
 </template>
 
 <script setup>
@@ -45,6 +47,14 @@ const handlePath = (id) => {
 <style lang="less" scoped>
 .main-container {
   height: 100%;
+  max-width: 100%;
+  overflow: visible;
+
+  &>.el-container {
+    height: 100%;
+    width: 100%;
+    max-width: 100%;
+  }
 }
 
 .el-menu-open-platform {
@@ -60,5 +70,9 @@ const handlePath = (id) => {
 .content-area {
   box-sizing: border-box;
   padding-left: 305px;
+  box-sizing: border-box;
+  width: 100%;
+  min-width: 0px;
+  overflow: visible;
 }
 </style>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 252 - 28
src/views/KMPlatform/OpenPlatform/platformText.vue


+ 0 - 1
tsconfig.app.json

@@ -5,7 +5,6 @@
     "src/**/*",
     "src/**/*.vue",
     "js-modules.d.ts",
-    "js-modules.d.ts"
   ],
   "exclude": [
     "src/**/__tests__/*"