فهرست منبع

refactor entity class

allen 2 سال پیش
والد
کامیت
3d6f1ca1f9
45فایلهای تغییر یافته به همراه2155 افزوده شده و 5055 حذف شده
  1. 1 1
      public/config.js
  2. 0 0
      public/static/img/logo-base.svg
  3. 19 50
      src/App.vue
  4. 1 1
      src/api/graph/entityAttrEditor.js
  5. 1 1
      src/api/graph/entityClass.js
  6. 1 1
      src/api/graph/relationEditor.js
  7. 0 222
      src/api/temporary/attrClass new.js
  8. 0 157
      src/api/temporary/attrClass.js
  9. 0 52
      src/api/temporary/demo.js
  10. 0 700
      src/api/temporary/entity new.js
  11. 0 418
      src/api/temporary/entity.js
  12. 0 308
      src/api/temporary/entityAttrEditor new.js
  13. 0 185
      src/api/temporary/entityAttrEditor.js
  14. 0 582
      src/api/temporary/entityClass new.js
  15. 0 341
      src/api/temporary/entityClass.js
  16. 0 337
      src/api/temporary/relationClass new.js
  17. 0 202
      src/api/temporary/relationClass.js
  18. 0 196
      src/api/temporary/relationEditor new.js
  19. 0 113
      src/api/temporary/relationEditor.js
  20. 0 394
      src/api/temporary/search new.js
  21. 0 247
      src/api/temporary/search.js
  22. 0 99
      src/api/temporary/tag new.js
  23. 0 64
      src/api/temporary/tag.js
  24. 413 0
      src/assets/knowledge/config/config.js
  25. BIN
      src/assets/knowledge/kong-01.png
  26. 116 0
      src/assets/knowledge/logo-base.svg
  27. 0 0
      src/assets/kong-01.png
  28. 14 2
      src/main.js
  29. 153 143
      src/router/knowledge/index.js
  30. 1 1
      src/views/knowledge/common/blank.vue
  31. 1 1
      src/views/knowledge/common/navibar.vue
  32. 2 1
      src/views/knowledge/graphClass/attrEditor.vue
  33. 4 3
      src/views/knowledge/graphClass/entityClass.vue
  34. 2 2
      src/views/knowledge/graphClass/relationAttrEditor.vue
  35. 186 212
      src/views/knowledge/graphClass/relationEditor.vue
  36. 5 4
      src/views/knowledge/graphEntity/manager.vue
  37. 57 0
      src/views/knowledge/index.vue
  38. 320 0
      src/views/knowledge/modal/addAttrClassModal.vue
  39. 134 0
      src/views/knowledge/modal/addRelationAttrModal.vue
  40. 2 1
      src/views/knowledge/modal/addRootEntityClassModal.vue
  41. 271 0
      src/views/knowledge/modal/createRelationClassModal.vue
  42. 249 0
      src/views/knowledge/modal/editEntityClassTreeNameModal.vue
  43. 99 0
      src/views/knowledge/modal/editRelationClassNameModal.vue
  44. 89 0
      src/views/knowledge/modal/getRelationClsListModal.vue
  45. 14 14
      src/views/knowledge/modal/index.js

+ 1 - 1
public/config.js

@@ -2,7 +2,7 @@ window.global = {
 	env: 'dev',
 	baseUrl: function() {
 		return {
-			dev: 'http://localhost:82/dev-api',
+			dev: 'http://localhost/dev-api',
 			test: 'http://10.10.12.85:2004/graph',
 			local: 'http://localhost:2004',
 			prod: 'http://unigraph.xian.algmarket.com',

+ 0 - 0
public/static/img/logo-base.d7def382.svg → public/static/img/logo-base.svg


+ 19 - 50
src/App.vue

@@ -1,59 +1,28 @@
 <template>
-  <a-config-provider :locale="zh_CN">
-      <div id="app" class="flex-col">
-          <navibar class="menu-shi"></navibar>
-          <div class="app-body flex-row app_beijing">
-              <div class="container-width">
-                  <router-view/>
-              </div>
-          </div>
-      </div>
-  </a-config-provider>
+  <div id="app">
+    <router-view />
+    <theme-picker />
+  </div>
 </template>
-<script>
-import navibar from '@/views/knowledge/common/navibar'
 
-import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN';
-import 'moment/locale/zh-cn';
+<script>
+import ThemePicker from "@/components/ThemePicker";
 
 export default {
-  components: {
-    navibar
-  },
-  data() {
-    return {
-      zh_CN,
+  name: "App",
+  components: { ThemePicker },
+    metaInfo() {
+        return {
+            title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
+            titleTemplate: title => {
+                return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
+            }
+        }
     }
-  }
-}
+};
 </script>
 <style scoped>
-  #app {
-      position: absolute;
-      top: 0;
-      left: 0;
-      right: 0;
-      bottom: 0;
-      background-color: #f5f7fa;
-  }
-
-  .app-body {
-      height: calc(100% - 50px);
-      overflow: scroll;
-      overflow-y: hidden;
-  }
-
-  .container-width {
-      top: 62px;
-      height: 100%;
-  }
-
-  .menu-shi {
-      background-color: white;
-      box-shadow: 0 2px 8px #c8ebdf82;
-      border: 0;
-      text-align: center;
-  }
-
-
+#app .theme-picker {
+  display: none;
+}
 </style>

+ 1 - 1
src/api/graph/entityAttrEditor.js

@@ -92,7 +92,7 @@ function updateEntityAttr(data) {
 function getRelationAttrById(path, entType) {
 	return request({
 		method: 'get',
-		url: `relattr/${id}/list`,
+		url: `relattr/${path}/list`,
 		params: {
 			id: path,
 			entType: entType

+ 1 - 1
src/api/graph/entityClass.js

@@ -435,7 +435,7 @@ function addPublicAttrCls(data) {
 } */
 //新的getFlowId函数
 function getFlowId(entClsId) {
-	return ajax({
+	return request({
 		method: 'get',
 		url: `/neural/flow`,
 		data: {

+ 1 - 1
src/api/graph/relationEditor.js

@@ -20,7 +20,7 @@ import request from '@/utils/request'
 function getRelationAttr(path) {
 	return request({
 		method: 'get',
-		url: `/relcls/${id}/attrs`,
+		url: `/relcls/${path}/attrs`,
 		params: {
 			id: path
 		}

+ 0 - 222
src/api/temporary/attrClass new.js

@@ -1,222 +0,0 @@
-import request from '@/utils/request'
-
-/**
- * 通过实体类id获取属性类
- * @param opts
- * @id:id
- */
-
-function getAttrClassById(entClsID, data) {
-	return request({
-		url: `/attrcls/${entClsID}/list`,
-		method: 'get',
-		params: {
-			id: entClsID,
-			attrType: data
-		}
-	})
-}
-
-/**
- * 通过实体类id获取属性类(新的,带出是否必填项)
- * @param opts
- * @id:id
- */
-
-//旧的getAttrClassById2函数
-// function getAttrClassById2 (entClsID, data) {
-//   return ajax({
-//     method: 'get',
-//     url: '/attrcls/notnull/{id}/list',
-//     path: {
-//       id: entClsID
-//     },
-//     data: {
-//       id: entClsID
-//     }
-//   })
-// }
-//新的getAttrClassById2函数
-function getAttrClassById2(entClsID, data) {
-	return request({
-		method: 'get',
-		url: `/attrcls/notnull/${entClsID}/list`,
-		params: {
-			id: entClsID
-		}
-	})
-}
-
-/**
- * 新增属性类
- * @param opts
- * path:''
- * data:新增参数{}
- */
-function addAttrClass(data) {
-	return request({
-		url: `/attrcls/add`,
-		method: 'post',
-		data: {
-			attrClsName: data.attrClsName,
-			attrUnit: data.attrUnit,
-			entAndAttrType: data.entAndAttrType,
-			entClsID: data.entClsID,
-			attrClsMemo: data.attrClsMemo,
-			valueType: data.valueType,
-			domainKey: data.domainKey,
-			isPublic: data.isPublic,
-			maxValue: data.maxValue,
-			minValue: data.minValue,
-			notNull: data.notNull
-		}
-	})
-}
-
-/**
- * 修改属性类
- * @param opts
- * path:''
- * data:修改的参数{entClsID,entClsName,pid}
- */
-//旧的updateAttrClass函数
-// function updateAttrClass (data) {
-//   return ajax({
-//     method: 'post',
-//     url: '/attrcls/update',
-//     data: {
-//       attrClsID: data.attrClsID,
-//       attrClsName: data.attrClsName,
-//       attrUnit: data.attrUnit,
-//       attrClsMemo: data.attrClsMemo,
-//       valueType: data.valueType,
-//       attrType: data.attrType,
-//       domainKey: data.domainKey,
-//       isPublic: data.isPublic,
-//       maxValue: data.maxValue,
-//       minValue: data.minValue,
-//       notNull: data.notNull
-//     }
-//   })
-// }
-//新的updateAttrClass函数
-function updateAttrClass(data) {
-	return request({
-		method: 'post',
-		url: `/attrcls/update`,
-		data: {
-			attrClsID: data.attrClsID,
-			attrClsName: data.attrClsName,
-			attrUnit: data.attrUnit,
-			attrClsMemo: data.attrClsMemo,
-			valueType: data.valueType,
-			attrType: data.attrType,
-			domainKey: data.domainKey,
-			isPublic: data.isPublic,
-			maxValue: data.maxValue,
-			minValue: data.minValue,
-			notNull: data.notNull
-		}
-	})
-}
-
-/**
- * 删除属性类
- * @param opts
- * path:删除的id
- * data:‘’
- */
-//旧的delAttrClass函数
-// function delAttrClass (entClsID) {
-//   return ajax({
-//     method: 'post',
-//     url: '/attrcls/del/{id}',
-//     path: {
-//       id: entClsID
-//     },
-//     data: {
-//       id: entClsID
-//     }
-//   })
-// }
-//新的delAttrClass函数
-function delAttrClass(entClsID) {
-	return request({
-		method: 'post',
-		url: `/attrcls/del/${entClsID}`,
-		params: {
-			id: entClsID
-		}
-	})
-}
-
-/**
- * 批量删除属性类
- * @param attrClsIDs
- * path:删除的id
- * data:‘’
- */
-//旧的delAttrClassList函数
-// function delAttrClassList (attrClsIDs) {
-//   return ajax({
-//     method: 'post',
-//     url: '/attrcls/del/batch',
-//     data: {
-//       attrClsIDs
-//     }
-//   })
-// }
-//新的delAttrClassList函数
-function delAttrClassList(attrClsIDs) {
-	return request({
-		method: 'post',
-		url: `/attrcls/del/batch`,
-		data: {
-			attrClsIDs
-		}
-	})
-}
-
-/**
- * 批量更新属性类
- * @param attrClsId
- * @param attrValue
- * @param entClsId
- * @param isModel
- */
-//旧的updatePublicAttrClass函数
-// function updatePublicAttrClass (attrClsId, attrValue, entClsId, isModel) {
-//   return ajax({
-//     method: 'post',
-//     url: '/attrcls/public/update/attrvalue',
-//     data: {
-//       attrClsId,
-//       attrValue,
-//       entClsId,
-//       isModel
-//     }
-//   })
-// }
-//新的updatePublicAttrClass函数
-function updatePublicAttrClass(attrClsId, attrValue, entClsId, isModel) {
-	return request({
-		method: 'post',
-		url: `/attrcls/public/update/attrvalue`,
-		data: {
-			attrClsId,
-			attrValue,
-			entClsId,
-			isModel
-		}
-	})
-}
-
-export {
-	getAttrClassById,
-	getAttrClassById2,
-	addAttrClass,
-	updateAttrClass,
-	delAttrClass,
-	delAttrClassList,
-	updatePublicAttrClass
-}

+ 0 - 157
src/api/temporary/attrClass.js

@@ -1,157 +0,0 @@
-import ajax from '../util'
-
-/**
- * 通过实体类id获取属性类
- * @param opts
- * @id:id
- */
-
-function getAttrClassById (entClsID, data) {
-  return ajax({
-    method: 'get',
-    url: '/attrcls/{id}/list',
-    path: {
-      id: entClsID
-    },
-    data: {
-      id: entClsID,
-      attrType: data
-    }
-  })
-}
-
-/**
- * 通过实体类id获取属性类(新的,带出是否必填项)
- * @param opts
- * @id:id
- */
-
-function getAttrClassById2 (entClsID, data) {
-  return ajax({
-    method: 'get',
-    url: '/attrcls/notnull/{id}/list',
-    path: {
-      id: entClsID
-    },
-    data: {
-      id: entClsID
-    }
-  })
-}
-
-/**
- * 新增属性类
- * @param opts
- * path:''
- * data:新增参数{}
- */
-function addAttrClass (data) {
-  return ajax({
-    method: 'post',
-    url: '/attrcls/add',
-    data: {
-      attrClsName: data.attrClsName,
-      attrUnit: data.attrUnit,
-      entAndAttrType: data.attrType,
-      entClsID: data.entClsID,
-      attrClsMemo: data.attrClsMemo,
-      valueType: data.valueType,
-      domainKey: data.domainKey,
-      isPublic: data.isPublic,
-      maxValue: data.maxValue,
-      minValue: data.minValue,
-      notNull: data.notNull
-    }
-  })
-}
-
-/**
- * 修改属性类
- * @param opts
- * path:''
- * data:修改的参数{entClsID,entClsName,pid}
- */
-function updateAttrClass (data) {
-  return ajax({
-    method: 'post',
-    url: '/attrcls/update',
-    data: {
-      attrClsID: data.attrClsID,
-      attrClsName: data.attrClsName,
-      attrUnit: data.attrUnit,
-      attrClsMemo: data.attrClsMemo,
-      valueType: data.valueType,
-      attrType: data.attrType,
-      domainKey: data.domainKey,
-      isPublic: data.isPublic,
-      maxValue: data.maxValue,
-      minValue: data.minValue,
-      notNull: data.notNull
-    }
-  })
-}
-
-/**
- * 删除属性类
- * @param opts
- * path:删除的id
- * data:‘’
- */
-function delAttrClass (entClsID) {
-  return ajax({
-    method: 'post',
-    url: '/attrcls/del/{id}',
-    path: {
-      id: entClsID
-    },
-    data: {
-      id: entClsID
-    }
-  })
-}
-
-/**
- * 批量删除属性类
- * @param attrClsIDs
- * path:删除的id
- * data:‘’
- */
-function delAttrClassList (attrClsIDs) {
-  return ajax({
-    method: 'post',
-    url: '/attrcls/del/batch',
-    data: {
-      attrClsIDs
-    }
-  })
-}
-
-/**
- * 批量更新属性类
- * @param attrClsId
- * @param attrValue
- * @param entClsId
- * @param isModel
- */
-function updatePublicAttrClass (attrClsId, attrValue, entClsId, isModel) {
-  return ajax({
-    method: 'post',
-    url: '/attrcls/public/update/attrvalue',
-    data: {
-      attrClsId,
-      attrValue,
-      entClsId,
-      isModel
-    }
-  })
-}
-
-export {
-  getAttrClassById,
-  getAttrClassById2,
-  addAttrClass,
-  updateAttrClass,
-  delAttrClass,
-  delAttrClassList,
-updatePublicAttrClass
-}

+ 0 - 52
src/api/temporary/demo.js

@@ -1,52 +0,0 @@
-import request from '@/utils/request'
-
-// 查询部门列表
-export function listDept(query) {
-  return request({
-    url: '/system/dept/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询部门列表(排除节点)
-export function listDeptExcludeChild(deptId) {
-  return request({
-    url: '/system/dept/list/exclude/' + deptId,
-    method: 'get'
-  })
-}
-
-// 查询部门详细
-export function getDept(deptId) {
-  return request({
-    url: '/system/dept/' + deptId,
-    method: 'get'
-  })
-}
-
-// 新增部门
-export function addDept(data) {
-  return request({
-    url: '/system/dept',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改部门
-export function updateDept(data) {
-  return request({
-    url: '/system/dept',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除部门
-export function delDept(deptId) {
-  return request({
-    url: '/system/dept/' + deptId,
-    method: 'delete'
-  })
-}

+ 0 - 700
src/api/temporary/entity new.js

@@ -1,700 +0,0 @@
-import request from '@/utils/request'
-
-/**
- * 根据实体类id获取实体列表
- * @param id
- * @returns {*}
- */
-//旧的getEntityListByEntityClassId函数
-/* function getEntityListByEntityClassId(id, data) {
-	return ajax({
-		method: 'get',
-		url: '/ent/{id}/list',
-		path: {
-			id: id,
-		},
-		data: {
-			id: id,
-		},
-	})
-} */
-//新的getEntityListByEntityClassId函数
-function getEntityListByEntityClassId(id, data) {
-	return request({
-		method: 'get',
-		url: `/ent/${id}/list`,
-		params: {
-			id: id
-		}
-	})
-}
-
-/**
- * 删除实体
- * @param id
- * @returns {*}
- */
-//旧的delEntityById函数
-// function delEntityById(id, isModel) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/ent/del/ids',
-// 		data: {
-// 			ids: id,
-// 			isModel,
-// 		},
-// 	})
-// }
-//新的delEntityById函数
-function delEntityById(id, isModel) {
-	return request({
-		method: 'post',
-		url: `/ent/del/ids`,
-		data: {
-			ids: id,
-			isModel,
-		},
-	})
-}
-
-// 原有的删除接口,没有调用成功
-// function delEntityById (id) {
-//   return ajax({
-//     method: 'post',
-//     url: '/ent/del/{id}',
-//     path: {
-//       id:id
-//     }
-//   })
-// }
-
-/**
- * 批量删除实体
- * @param ids
- * @returns {*}
- */
-//旧的delEntityByIds函数
-// function delEntityByIds(ids) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/ent/del/ids',
-// 		data: {
-// 			ids: ids,
-// 		},
-// 	})
-// }
-//新的delEntityByIds函数
-function delEntityByIds(ids) {
-	return request({
-		method: 'post',
-		url: `/ent/del/ids`,
-		data: {
-			ids: ids,
-		},
-	})
-}
-
-/**
- * 添加实体
- * @param entClsID
- * @param entName
- * @returns {*}
- */
-//旧的addEntity函数
-// function addEntity(
-// 	entClsID,
-// 	entName,
-// 	entMemo,
-// 	entIcon,
-// 	notNullAttrVOList,
-// 	isModel
-// ) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/ent/add',
-// 		headers: {
-// 			'Content-Type': 'application/json;charset=UTF-8'
-// 		},
-// 		data: {
-// 			entClsID: entClsID,
-// 			entMemo: entMemo,
-// 			entName: entName,
-// 			entIcon: entIcon,
-// 			notNullAttrVOList: notNullAttrVOList, // 必填属性列表
-// 			isModel,
-// 		},
-// 		json: true,
-// 	})
-// }
-//新的addEntity函数
-function addEntity(
-	entClsID,
-	entName,
-	entMemo,
-	entIcon,
-	notNullAttrVOList,
-	isModel
-) {
-	return request({
-		method: 'post',
-		url: `/ent/add`,
-		headers: {
-			'Content-Type': 'application/json;charset=UTF-8'
-		},
-		data: {
-			entClsID: entClsID,
-			entMemo: entMemo,
-			entName: entName,
-			entIcon: entIcon,
-			notNullAttrVOList: notNullAttrVOList, // 必填属性列表
-			isModel,
-		},
-		json: true,
-	})
-}
-
-/**
- * 根据实体id获取实体详情
- * @param id
- * @returns {*}
- */
-//旧的getEntityDetailById函数
-// function getEntityDetailById(id, isModel) {
-// 	return ajax({
-// 		method: 'get',
-// 		url: '/ent/{id}',
-// 		path: {
-// 			id: id,
-// 		},
-// 		data: {
-// 			isModel,
-// 		},
-// 	})
-// }
-//新的getEntityDetailById函数
-function getEntityDetailById(id, isModel) {
-	return request({
-		method: 'get',
-		url: `/ent/${id}`,
-		params: {
-			id: id,
-			isModel
-		}
-	})
-}
-
-/**
- * 实体修改接口
- * @param entID
- * @param entName
- * @returns {*}
- */
-//旧的updateEntityName函数
-// function updateEntityName(entID, entName, entMemo, entIcon, isModel) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/ent/update',
-// 		data: {
-// 			entID: entID,
-// 			entMemo: entMemo, // 可选择传不传
-// 			entName: entName,
-// 			entIcon: entIcon,
-// 			isModel,
-// 		},
-// 	})
-// }
-//新的updateEntityName函数
-function updateEntityName(entID, entName, entMemo, entIcon, isModel) {
-	return request({
-		method: 'post',
-		url: `/ent/update`,
-		data: {
-			entID: entID,
-			entMemo: entMemo, // 可选择传不传
-			entName: entName,
-			entIcon: entIcon,
-			isModel,
-		},
-	})
-}
-
-/**
- * 通过实体名字查询实体类
- * @param entName
- * @returns {*}
- */
-//旧的searchEntClsByEntName函数
-// function searchEntClsByEntName(entName) {
-// 	return ajax({
-// 		method: 'get',
-// 		url: 'ent/search/entclses',
-// 		data: {
-// 			entName: entName,
-// 		},
-// 	})
-// }
-//新的searchEntClsByEntName函数
-function searchEntClsByEntName(entName) {
-	return request({
-		method: 'get',
-		url: `ent/search/entclses`,
-		params: {
-			entName: entName
-		}
-	})
-}
-
-/**
- *待审属性删除接口
- * @param attrClsID
- * @returns {*}
- */
-//旧的deleteAttrClassNone函数
-// function deleteAttrClassNone(attrClsID, isModel) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/attrcls/none/del/{attrClsID}',
-// 		path: {
-// 			attrClsID: attrClsID,
-// 		},
-// 		data: {
-// 			attrClsID: attrClsID,
-// 			isModel,
-// 		},
-// 	})
-// }
-//新的deleteAttrClassNone函数
-function deleteAttrClassNone(attrClsID, isModel) {
-	return request({
-		method: 'post',
-		url: `/attrcls/none/del/${attrClsID}`,
-		params: {
-			attrClsID: attrClsID,
-			isModel
-		}
-	})
-}
-
-/**
- *待审属性新增属性
- * @param entID
- * @param attrValue
- * @param attrClsName
- * @param valueType
- * @returns {*}
- */
-//旧的addEntNoneAttr函数
-// function addEntNoneAttr(data) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/attr/add/none',
-// 		data: {
-// 			entID: data.entID,
-// 			attrClsMemo: data.attrClsMemo,
-// 			attrClsName: data.attrClsName,
-// 			attrUnit: data.attrUnit,
-// 			attrValue: data.attrValue,
-// 			valueType: data.valueType,
-// 			isModel: data.isModel,
-// 		},
-// 	})
-// }
-//新的addEntNoneAttr函数
-function addEntNoneAttr(data) {
-	return request({
-		method: 'post',
-		url: `/attr/add/none`,
-		data: {
-			entID: data.entID,
-			attrClsMemo: data.attrClsMemo,
-			attrClsName: data.attrClsName,
-			attrUnit: data.attrUnit,
-			attrValue: data.attrValue,
-			valueType: data.valueType,
-			isModel: data.isModel,
-		},
-	})
-}
-
-/**
- * 实体待审属性查找接口
- * @param entID
- * @returns {*}
- */
-//旧的getEntNoneList函数
-// function getEntNoneList(entID, pagenum, pagesize, isModel) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/attr/none/list',
-// 		data: {
-// 			entID: entID,
-// 			pagenum: pagenum,
-// 			pagesize: pagesize,
-// 			isModel,
-// 		},
-// 	})
-// }
-//新的getEntNoneList函数
-function getEntNoneList(entID, pagenum, pagesize, isModel) {
-	return request({
-		method: 'post',
-		url: `/attr/none/list`,
-		data: {
-			entID: entID,
-			pagenum: pagenum,
-			pagesize: pagesize,
-			isModel,
-		},
-	})
-}
-
-/**
- * 待审属性类调整中的查询
- * @param attrClsID
- * @returns {*}
- */
-//旧的getAttrClassAdjustSearch函数
-// function getAttrClassAdjustSearch(attrClsID) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/attrcls/none/attrs',
-// 		data: {
-// 			attrClsID: attrClsID,
-// 		},
-// 	})
-// }
-//新的getAttrClassAdjustSearch函数
-function getAttrClassAdjustSearch(attrClsID) {
-	return request({
-		method: 'post',
-		url: `/attrcls/none/attrs`,
-		data: {
-			attrClsID: attrClsID,
-		},
-	})
-}
-
-/**
- * 待审属性名称修改接口
- * @param data
- * @returns {*}
- */
-//旧的updateAttrNoneName函数
-// function updateAttrNoneName(data) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/attr/none/update',
-// 		data: data,
-// 	})
-// }
-//新的updateAttrNoneName函数
-function updateAttrNoneName(data) {
-	return request({
-		method: 'post',
-		url: `/attr/none/update`,
-		data: data,
-	})
-}
-
-/**
- * 参照创建模板
- * @param entReferenceQuery : {
-            "delEntIds": [
-              "string"
-            ],
-            "entIcon": "string",
-            "entMemo": "string",
-            "entName": "string",
-            "isModel": true,
-            "modelId": "string",
-            "suffix": "string"
-          }
- * @returns {*}
- */
-//旧的addReferenceEnt函数
-// function addReferenceEnt(entReferenceQuery) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/ent/reference/add',
-// 		data: entReferenceQuery,
-// 	})
-// }
-//新的addReferenceEnt函数
-function addReferenceEnt(entReferenceQuery) {
-	return request({
-		method: 'post',
-		url: `/ent/reference/add`,
-		data: entReferenceQuery,
-	})
-}
-
-/**
- * 根据某一实体,关联出他的一定度数的数据
- * @param id, degree, delEntIds, direction, isModel, entClsIDs, relClsIDs
- * @returns {*}
- */
-//旧的getRelationEnt函数
-// function getRelationEnt(
-// 	id,
-// 	degree,
-// 	delEntIds,
-// 	direction = "BOTH",
-// 	isModel,
-// 	entClsIDs,
-// 	entName,
-// 	relClsIDs,
-// 	limitNum = 3,
-// 	entConditionQueries = []
-// ) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/show/graph',
-// 		data: {
-// 			entId: id,
-// 			degree,
-// 			delEntIds,
-// 			direction,
-// 			isModel,
-// 			entName,
-// 			relClsIDs,
-// 			limitNum,
-// 			entConditionQueries: entConditionQueries
-// 		},
-// 		headers: {
-// 			'Content-Type': 'application/json;charset=UTF-8'
-// 		},
-// 		json: true,
-// 	})
-// }
-//新的getRelationEnt函数
-function getRelationEnt(
-	id,
-	degree,
-	delEntIds,
-	direction = "BOTH",
-	isModel,
-	entClsIDs,
-	entName,
-	relClsIDs,
-	limitNum = 3,
-	entConditionQueries = []
-) {
-	return request({
-		method: 'post',
-		url: `/show/graph`,
-		data: {
-			entId: id,
-			degree,
-			delEntIds,
-			direction,
-			isModel,
-			entName,
-			relClsIDs,
-			limitNum,
-			entConditionQueries: entConditionQueries
-		},
-		headers: {
-			'Content-Type': 'application/json;charset=UTF-8'
-		},
-		json: true,
-	})
-}
-
-/* 
-
-            let data = {
-                degree: this.degreeCache,
-                delEntIds: this.getDelEntIdsString(),
-                direction: direction,
-                entId: id,
-                entName: name,
-                relClsIDs: this.linkClassCache,
-                limitNum: 3,
-                isModel: false,
-                entConditionQueries: entConditionQueries
-            }
-*/
-//旧的getChart函数
-// function getChart(data) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/show/graph',
-// 		data: data,
-// 		headers: {
-// 			'Content-Type': 'application/json;charset=UTF-8'
-// 		},
-// 		json: true,
-// 	})
-// }
-//新的getChart函数
-function getChart(data) {
-	return request({
-		method: 'post',
-		url: `/show/graph`,
-		data: data,
-		headers: {
-			'Content-Type': 'application/json;charset=UTF-8'
-		},
-		json: true,
-	})
-}
-
-/**
- * 根据实体类,获取关系类
- * @param id, degree, delEntIds, direction, isModel
- * @returns {*}
- */
-//旧的getRelationClsByEntCls函数
-// function getRelationClsByEntCls(id) {
-// 	return ajax({
-// 		method: 'get',
-// 		url: '/relcls/all/list/{id}',
-// 		path: {
-// 			id,
-// 		},
-// 	})
-// }
-//新的getRelationClsByEntCls函数
-function getRelationClsByEntCls(id) {
-	return request({
-		method: 'get',
-		url: `/relcls/all/list/${id}`,
-		params: {
-			id,
-		}
-	})
-}
-
-/**
- * 根据关系类获取树形
- * @param entId, relClsId, direction, isModel, current, size
- * @returns {*}
- */
-//旧的getRelationAttr函数
-// function getRelationAttr(entId, relClsId, direction, isModel, current, size) {
-// 	return ajax({
-// 		method: 'get',
-// 		url: '/entcls/{direction}/{relClsId}/{entId}',
-// 		path: {
-// 			entId,
-// 			relClsId,
-// 			direction,
-// 		},
-// 		data: {
-// 			current,
-// 			isModel,
-// 			size,
-// 		},
-// 	})
-// }
-//新的getRelationAttr函数
-function getRelationAttr(entId, relClsId, direction, isModel, current, size) {
-	return request({
-		method: 'get',
-		url: `/entcls/${direction}/${relClsId}/${entId}`,
-		params: {
-			entId,
-			relClsId,
-			direction,
-			current,
-			isModel,
-			size,
-		}
-	})
-}
-
-/**
- * 保存基础属性/能力属性
- * @param data
- * @returns {*}
- */
-//旧的saveEntAttr函数
-// function saveEntAttr(data) {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/ent/update/batch',
-// 		data: data,
-// 	})
-// }
-//新的saveEntAttr函数
-function saveEntAttr(data) {
-	return request({
-		method: 'post',
-		url: `/ent/update/batch`,
-		data: data,
-	})
-}
-
-/**
- * 集成服务导出接口1
- * @param data
- * @returns {*}
- */
-//旧的exportUnionid函数
-// function exportUnionid() {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/ent/batch/unionid',
-// 		data: {
-// 			noTimeout: true,
-// 		},
-// 	})
-// }
-//新的exportUnionid函数
-function exportUnionid() {
-	return request({
-		method: 'post',
-		url: `/ent/batch/unionid`,
-		data: {
-			noTimeout: true,
-		},
-	})
-}
-
-/**
- * 集成服务导出接口2
- * @returns {*}
- */
-//旧的exportOmsUpload函数
-// function exportOmsUpload() {
-// 	return ajax({
-// 		method: 'post',
-// 		url: '/oms/media/upload',
-// 		data: {
-// 			noTimeout: true,
-// 		},
-// 	})
-// }
-//新的exportOmsUpload函数
-function exportOmsUpload() {
-	return request({
-		method: 'post',
-		url: `/oms/media/upload`,
-		data: {
-			noTimeout: true,
-		},
-	})
-}
-
-export {
-	updateAttrNoneName,
-	getAttrClassAdjustSearch,
-	addEntNoneAttr,
-	getEntNoneList,
-	deleteAttrClassNone,
-	searchEntClsByEntName,
-	getEntityListByEntityClassId,
-	delEntityById,
-	addEntity,
-	getEntityDetailById,
-	updateEntityName,
-	delEntityByIds,
-	addReferenceEnt,
-	getRelationEnt,
-	getRelationClsByEntCls,
-	getRelationAttr,
-	saveEntAttr,
-	exportUnionid,
-	exportOmsUpload,
-	getChart,
-}

+ 0 - 418
src/api/temporary/entity.js

@@ -1,418 +0,0 @@
-import ajax from '../util'
-
-/**
- * 根据实体类id获取实体列表
- * @param id
- * @returns {*}
- */
-function getEntityListByEntityClassId(id, data) {
-	return ajax({
-		method: 'get',
-		url: '/ent/{id}/list',
-		path: {
-			id: id,
-		},
-		data: {
-			id: id,
-		},
-	})
-}
-
-/**
- * 删除实体
- * @param id
- * @returns {*}
- */
-function delEntityById(id, isModel) {
-	return ajax({
-		method: 'post',
-		url: '/ent/del/ids',
-		data: {
-			ids: id,
-			isModel,
-		},
-	})
-}
-
-// 原有的删除接口,没有调用成功
-// function delEntityById (id) {
-//   return ajax({
-//     method: 'post',
-//     url: '/ent/del/{id}',
-//     path: {
-//       id:id
-//     }
-//   })
-// }
-
-/**
- * 批量删除实体
- * @param ids
- * @returns {*}
- */
-function delEntityByIds(ids) {
-	return ajax({
-		method: 'post',
-		url: '/ent/del/ids',
-		data: {
-			ids: ids,
-		},
-	})
-}
-
-/**
- * 添加实体
- * @param entClsID
- * @param entName
- * @returns {*}
- */
-function addEntity(
-	entClsID,
-	entName,
-	entMemo,
-	entIcon,
-	notNullAttrVOList,
-	isModel
-) {
-	return ajax({
-		method: 'post',
-		url: '/ent/add',
-		headers: { 'Content-Type': 'application/json;charset=UTF-8' },
-		data: {
-			entClsID: entClsID,
-			entMemo: entMemo,
-			entName: entName,
-			entIcon: entIcon,
-			notNullAttrVOList: notNullAttrVOList, // 必填属性列表
-			isModel,
-		},
-		json: true,
-	})
-}
-
-/**
- * 根据实体id获取实体详情
- * @param id
- * @returns {*}
- */
-function getEntityDetailById(id, isModel) {
-	return ajax({
-		method: 'get',
-		url: '/ent/{id}',
-		path: {
-			id: id,
-		},
-		data: {
-			isModel,
-		},
-	})
-}
-
-/**
- * 实体修改接口
- * @param entID
- * @param entName
- * @returns {*}
- */
-function updateEntityName(entID, entName, entMemo, entIcon, isModel) {
-	return ajax({
-		method: 'post',
-		url: '/ent/update',
-		data: {
-			entID: entID,
-			entMemo: entMemo, // 可选择传不传
-			entName: entName,
-			entIcon: entIcon,
-			isModel,
-		},
-	})
-}
-
-/**
- * 通过实体名字查询实体类
- * @param entName
- * @returns {*}
- */
-function searchEntClsByEntName(entName) {
-	return ajax({
-		method: 'get',
-		url: 'ent/search/entclses',
-		data: {
-			entName: entName,
-		},
-	})
-}
-
-/**
- *待审属性删除接口
- * @param attrClsID
- * @returns {*}
- */
-function deleteAttrClassNone(attrClsID, isModel) {
-	return ajax({
-		method: 'post',
-		url: '/attrcls/none/del/{attrClsID}',
-		path: {
-			attrClsID: attrClsID,
-		},
-		data: {
-			attrClsID: attrClsID,
-			isModel,
-		},
-	})
-}
-
-/**
- *待审属性新增属性
- * @param entID
- * @param attrValue
- * @param attrClsName
- * @param valueType
- * @returns {*}
- */
-function addEntNoneAttr(data) {
-	return ajax({
-		method: 'post',
-		url: '/attr/add/none',
-		data: {
-			entID: data.entID,
-			attrClsMemo: data.attrClsMemo,
-			attrClsName: data.attrClsName,
-			attrUnit: data.attrUnit,
-			attrValue: data.attrValue,
-			valueType: data.valueType,
-			isModel: data.isModel,
-		},
-	})
-}
-
-//
-
-/**
- * 实体待审属性查找接口
- * @param entID
- * @returns {*}
- */
-function getEntNoneList(entID, pagenum, pagesize, isModel) {
-	return ajax({
-		method: 'post',
-		url: '/attr/none/list',
-		data: {
-			entID: entID,
-			pagenum: pagenum,
-			pagesize: pagesize,
-			isModel,
-		},
-	})
-}
-
-/**
- * 待审属性类调整中的查询
- * @param attrClsID
- * @returns {*}
- */
-function getAttrClassAdjustSearch(attrClsID) {
-	return ajax({
-		method: 'post',
-		url: '/attrcls/none/attrs',
-		data: {
-			attrClsID: attrClsID,
-		},
-	})
-}
-
-/**
- * 待审属性名称修改接口
- * @param data
- * @returns {*}
- */
-function updateAttrNoneName(data) {
-	return ajax({
-		method: 'post',
-		url: '/attr/none/update',
-		data: data,
-	})
-}
-
-/**
- * 参照创建模板
- * @param entReferenceQuery : {
-            "delEntIds": [
-              "string"
-            ],
-            "entIcon": "string",
-            "entMemo": "string",
-            "entName": "string",
-            "isModel": true,
-            "modelId": "string",
-            "suffix": "string"
-          }
- * @returns {*}
- */
-function addReferenceEnt(entReferenceQuery) {
-	return ajax({
-		method: 'post',
-		url: '/ent/reference/add',
-		data: entReferenceQuery,
-	})
-}
-
-/**
- * 根据某一实体,关联出他的一定度数的数据
- * @param id, degree, delEntIds, direction, isModel, entClsIDs, relClsIDs
- * @returns {*}
- */
-function getRelationEnt(
-	id,
-	degree,
-	delEntIds,
-	direction="BOTH",
-	isModel,
-	entClsIDs,
-    entName,
-	relClsIDs,
-    limitNum=3,
-    entConditionQueries=[]
-) {
-	return ajax({
-		method: 'post',
-		url: '/show/graph',
-		data: {
-			entId: id,
-			degree,
-			delEntIds,
-			direction,
-			isModel,
-            entName,
-			relClsIDs,
-            limitNum,
-            entConditionQueries: entConditionQueries
-		},
-        headers: { 'Content-Type': 'application/json;charset=UTF-8' },
-		json: true,
-	})
-}
-/* 
-
-            let data = {
-                degree: this.degreeCache,
-                delEntIds: this.getDelEntIdsString(),
-                direction: direction,
-                entId: id,
-                entName: name,
-                relClsIDs: this.linkClassCache,
-                limitNum: 3,
-                isModel: false,
-                entConditionQueries: entConditionQueries
-            }
-*/
-function getChart(data) {
-	return ajax({
-		method: 'post',
-		url: '/show/graph',
-		data: data,
-		headers: { 'Content-Type': 'application/json;charset=UTF-8' },
-		json: true,
-	})
-}
-/**
- * 根据实体类,获取关系类
- * @param id, degree, delEntIds, direction, isModel
- * @returns {*}
- */
-function getRelationClsByEntCls(id) {
-	return ajax({
-		method: 'get',
-		url: '/relcls/all/list/{id}',
-		path: {
-			id,
-		},
-	})
-}
-
-/**
- * 根据关系类获取树形
- * @param entId, relClsId, direction, isModel, current, size
- * @returns {*}
- */
-function getRelationAttr(entId, relClsId, direction, isModel, current, size) {
-	return ajax({
-		method: 'get',
-		url: '/entcls/{direction}/{relClsId}/{entId}',
-		path: {
-			entId,
-			relClsId,
-			direction,
-		},
-		data: {
-			current,
-			isModel,
-			size,
-		},
-	})
-}
-
-/**
- * 保存基础属性/能力属性
- * @param data
- * @returns {*}
- */
-function saveEntAttr(data) {
-	return ajax({
-		method: 'post',
-		url: '/ent/update/batch',
-		data: data,
-	})
-}
-
-/**
- * 集成服务导出接口1
- * @param data
- * @returns {*}
- */
-function exportUnionid() {
-	return ajax({
-		method: 'post',
-		url: '/ent/batch/unionid',
-		data: {
-			noTimeout: true,
-		},
-	})
-}
-
-/**
- * 集成服务导出接口2
- * @returns {*}
- */
-function exportOmsUpload() {
-	return ajax({
-		method: 'post',
-		url: '/oms/media/upload',
-		data: {
-			noTimeout: true,
-		},
-	})
-}
-
-export {
-	updateAttrNoneName,
-	getAttrClassAdjustSearch,
-	addEntNoneAttr,
-	getEntNoneList,
-	deleteAttrClassNone,
-	searchEntClsByEntName,
-	getEntityListByEntityClassId,
-	delEntityById,
-	addEntity,
-	getEntityDetailById,
-	updateEntityName,
-	delEntityByIds,
-	addReferenceEnt,
-	getRelationEnt,
-	getRelationClsByEntCls,
-	getRelationAttr,
-	saveEntAttr,
-	exportUnionid,
-	exportOmsUpload,
-	getChart,
-}

+ 0 - 308
src/api/temporary/entityAttrEditor new.js

@@ -1,308 +0,0 @@
-import request from '@/utils/request'
-
-/**
- * 通过实体id获取实体属性
- * @param opts
- * @id:id
- */
-//旧的getEntityAttrById函数
-/* function getEntityAttrById (id, data, isModel) {
-  return ajax({
-    method: 'get',
-    url: '/ent/{id}/attrs',
-    path: {
-      id: id
-    },
-    data: {
-      attrType: data.attrType,
-      id: id,
-      isModel
-    }
-  })
-} */
-//新的getEntityAttrById函数
-function getEntityAttrById(id, data, isModel) {
-	return request({
-		method: 'get',
-		url: `/ent/${id}/attrs`,
-		params: {
-			id: id,
-			attrType: data.attrType,
-			isModel
-		}
-	})
-}
-
-/**
- * 编辑实体属性
- * @param opts
- * @id:id
- */
-//旧的updateEntityAttr函数
-/* function updateEntityAttr (data) {
-  return ajax({
-    method: 'post',
-    url: 'entattr/update',
-    data: {
-      attrID: data.attrID,
-      attrClsID: data.attrClsID,
-      attrMemo: data.attrMemo,
-      attrType: data.attrType,
-      attrValue: data.attrValue,
-      entID: data.entID
-    }
-  })
-} */
-//新的updateEntityAttr函数
-function updateEntityAttr(data) {
-	return request({
-		method: 'post',
-		url: `entattr/update`,
-		data: {
-			attrID: data.attrID,
-			attrClsID: data.attrClsID,
-			attrMemo: data.attrMemo,
-			attrType: data.attrType,
-			attrValue: data.attrValue,
-			entID: data.entID
-		}
-	})
-}
-
-/**
- * 通过实体id获取关系属性
- * @entId:实体id
- * @relId:关系id
- */
-//旧的getRelationAttrById函数
-/* function getRelationAttrById (path, entType) {
-  return ajax({
-    method: 'get',
-    url: 'relattr/{id}/list',
-    path: {
-      id: path
-    },
-    data: {
-      id: path,
-      entType: entType
-    }
-  })
-} */
-//新的getRelationAttrById函数
-function getRelationAttrById(path, entType) {
-	return request({
-		method: 'get',
-		url: `relattr/${id}/list`,
-		params: {
-			id: path,
-			entType: entType
-		}
-	})
-}
-
-/**
- * 通过实体类,属性,指标能力id查询列表
- * @param entClsId
- * @param attrClsId
- * @param abilityId
- * @returns {*}
- */
-//旧的getTargetList函数
-/* function getTargetList(entClsId, attrClsId, abilityId) {
-	return ajax({
-		method: 'get',
-		url: '/sysmgt/list',
-		data: {
-			entClsId: entClsId,
-			attrClsId: attrClsId,
-			abilityId: abilityId
-		}
-	})
-} */
-//新的getTargetList函数
-function getTargetList(entClsId, attrClsId, abilityId) {
-	return request({
-		method: 'get',
-		url: `/sysmgt/list`,
-		data: {
-			entClsId: entClsId,
-			attrClsId: attrClsId,
-			abilityId: abilityId
-		}
-	})
-}
-
-/**
- * 获得指标能力树
- * @returns {*}
- */
-//旧的getTargetAbilityTree函数
-/* function getTargetAbilityTree() {
-	return ajax({
-		method: 'get',
-		url: '/sysmgt/ability/tree',
-		path: {}
-	})
-} */
-//新的getTargetAbilityTree函数
-function getTargetAbilityTree() {
-	return request({
-		method: 'get',
-		url: `/sysmgt/ability/tree`,
-		path: {}
-	})
-}
-
-/**
- * 根据能力abilityId获取单个算法详情
- * @returns {*}
- */
-//旧的getAlgorithmDetail函数
-/* function getAlgorithmDetail(abilityId) {
-	return ajax({
-		method: 'get',
-		url: '/sysmgt/flow',
-		data: {
-			abilityId: abilityId
-		}
-	})
-} */
-//新的getAlgorithmDetail函数
-function getAlgorithmDetail(abilityId) {
-	return request({
-		method: 'get',
-		url: `/sysmgt/flow`,
-		data: {
-			abilityId: abilityId
-		}
-	})
-}
-
-/**
- * 数组list参数保存指标
- * @param abilityParam
- * @returns {*}
- */
-//旧的saveTargetList函数
-/* function saveTargetList(abilityParam) {
-	return ajax({
-		method: 'post',
-		url: '/sysmgt/add/array',
-		headers: {
-			'Content-Type': 'application/json;charset=UTF-8'
-		},
-		data: abilityParam,
-		json: true
-	})
-} */
-//新的saveTargetList函数
-function saveTargetList(abilityParam) {
-	return request({
-		method: 'post',
-		url: `/sysmgt/add/array`,
-		headers: {
-			'Content-Type': 'application/json;charset=UTF-8'
-		},
-		data: abilityParam,
-		json: true
-	})
-}
-
-/**
- * 获得指标树能力id
- * @param entClsId
- * @param attrClsId
- * @returns {*}
- */
-//旧的getAbilityId函数
-/* function getAbilityId(entClsId, attrClsId) {
-	return ajax({
-		method: 'get',
-		url: '/sysmgt/getability',
-		data: {
-			entClsId: entClsId,
-			attrClsId: attrClsId
-		}
-	})
-} */
-//新的getAbilityId函数
-function getAbilityId(entClsId, attrClsId) {
-	return request({
-		method: 'get',
-		url: `/sysmgt/getability`,
-		data: {
-			entClsId: entClsId,
-			attrClsId: attrClsId
-		}
-	})
-}
-
-/**
- * 运行测试
- * @param entId
- * @param attrClsId
- * @returns {*}
- */
-//旧的runFlow函数
-/* function runFlow(entId, attrClsId, isModel) {
-	return ajax({
-		method: 'post',
-		url: '/sysmgt/run/flow',
-		data: {
-			entId: entId,
-			attrClsId: attrClsId,
-			isModel
-		}
-	})
-} */
-//新的runFlow函数
-function runFlow(entId, attrClsId, isModel) {
-	return request({
-		method: 'post',
-		url: `/sysmgt/run/flow`,
-		data: {
-			entId: entId,
-			attrClsId: attrClsId,
-			isModel
-		}
-	})
-}
-
-/**
- * 删除属性值
- * @param attrID
- * @returns {*}
- */
-//旧的deleteAttrValue函数
-/* function deleteAttrValue(attrID) {
-	return ajax({
-		method: 'post',
-		url: '/attr/del',
-		data: {
-			attrID: attrID
-		}
-	})
-} */
-//新的deleteAttrValue函数
-function deleteAttrValue(attrID) {
-	return request({
-		method: 'post',
-		url: `/attr/del`,
-		data: {
-			attrID: attrID
-		}
-	})
-}
-
-export {
-	deleteAttrValue,
-	runFlow,
-	getAbilityId,
-	saveTargetList,
-	getEntityAttrById,
-	updateEntityAttr,
-	getRelationAttrById,
-	getTargetList,
-	getTargetAbilityTree,
-	getAlgorithmDetail
-}

+ 0 - 185
src/api/temporary/entityAttrEditor.js

@@ -1,185 +0,0 @@
-import ajax from '../util'
-
-/**
- * 通过实体id获取实体属性
- * @param opts
- * @id:id
- */
-
-function getEntityAttrById (id, data, isModel) {
-  return ajax({
-    method: 'get',
-    url: '/ent/{id}/attrs',
-    path: {
-      id: id
-    },
-    data: {
-      attrType: data.attrType,
-      id: id,
-      isModel
-    }
-  })
-}
-
-/**
- * 编辑实体属性
- * @param opts
- * @id:id
- */
-function updateEntityAttr (data) {
-  return ajax({
-    method: 'post',
-    url: 'entattr/update',
-    data: {
-      attrID: data.attrID,
-      attrClsID: data.attrClsID,
-      attrMemo: data.attrMemo,
-      attrType: data.attrType,
-      attrValue: data.attrValue,
-      entID: data.entID
-    }
-  })
-}
-
-/**
- * 通过实体id获取关系属性
- * @entId:实体id
- * @relId:关系id
- */
-
-function getRelationAttrById (path, entType) {
-  return ajax({
-    method: 'get',
-    url: 'relattr/{id}/list',
-    path: {
-      id: path
-    },
-    data: {
-      id: path,
-      entType: entType
-    }
-  })
-}
-
-/**
- * 通过实体类,属性,指标能力id查询列表
- * @param entClsId
- * @param attrClsId
- * @param abilityId
- * @returns {*}
- */
-function getTargetList (entClsId, attrClsId, abilityId) {
-  return ajax({
-    method: 'get',
-    url: '/sysmgt/list',
-    data: {
-      entClsId: entClsId,
-      attrClsId: attrClsId,
-      abilityId: abilityId
-    }
-  })
-}
-
-/**
- * 获得指标能力树
- * @returns {*}
- */
-function getTargetAbilityTree () {
-  return ajax({
-    method: 'get',
-    url: '/sysmgt/ability/tree',
-    path: {}
-  })
-}
-
-/**
- * 根据能力abilityId获取单个算法详情
- * @returns {*}
- */
-function getAlgorithmDetail (abilityId) {
-  return ajax({
-    method: 'get',
-    url: '/sysmgt/flow',
-    data: {
-      abilityId: abilityId
-    }
-  })
-}
-
-/**
- * 数组list参数保存指标
- * @param abilityParam
- * @returns {*}
- */
-function saveTargetList (abilityParam) {
-  return ajax({
-    method: 'post',
-    url: '/sysmgt/add/array',
-    headers: {'Content-Type': 'application/json;charset=UTF-8'},
-    data: abilityParam,
-    json: true
-  })
-}
-
-/**
- * 获得指标树能力id
- * @param entClsId
- * @param attrClsId
- * @returns {*}
- */
-function getAbilityId (entClsId, attrClsId) {
-  return ajax({
-    method: 'get',
-    url: '/sysmgt/getability',
-    data: {
-      entClsId: entClsId,
-      attrClsId: attrClsId
-    }
-  })
-}
-
-/**
- * 运行测试
- * @param entId
- * @param attrClsId
- * @returns {*}
- */
-function runFlow (entId, attrClsId, isModel) {
-  return ajax({
-    method: 'post',
-    url: '/sysmgt/run/flow',
-    data: {
-      entId: entId,
-      attrClsId: attrClsId,
-      isModel
-    }
-  })
-}
-
-/**
- * 删除属性值
- * @param attrID
- * @returns {*}
- */
-function deleteAttrValue (attrID) {
-  return ajax({
-    method: 'post',
-    url: '/attr/del',
-    data: {
-      attrID: attrID
-    }
-  })
-}
-
-export {
-  deleteAttrValue,
-  runFlow,
-  getAbilityId,
-  saveTargetList,
-  getEntityAttrById,
-  updateEntityAttr,
-  getRelationAttrById,
-  getTargetList,
-  getTargetAbilityTree,
-  getAlgorithmDetail
-}

+ 0 - 582
src/api/temporary/entityClass new.js

@@ -1,582 +0,0 @@
-import request from '@/utils/request'
-
-/**
- * 删除实体类
- * @param opts
- */
-//旧的delEntityClass函数
-/* function delEntityClass (id) {
-  return ajax({
-    method: 'post',
-    url: '/entcls/del/{id}',
-    path: {
-      id: id
-    }
-  })
-} */
-//新的delEntityClass函数
-function delEntityClass(id) {
-	return request({
-		method: 'post',
-		url: `/entcls/del/${id}`,
-		params: {
-			id: id
-		}
-	})
-}
-
-/**
- * 新增实体类
- * @param1 entClsName
- * @param2 entClsType
- * @param3 pid
- */
-//旧的addEntityClass函数
-/* function addEntityClass(data) {
-	return ajax({
-		method: 'post',
-		url: '/entcls/add',
-		data: {
-			entClsName: data.entClsName,
-			pid: data.pid,
-			entClsMemo: data.entClsMemo,
-			entClsIcon: data.entClsIcon,
-			backGroundColor: data.backGroundColor
-
-		}
-	})
-} */
-//新的addEntityClass函数
-function addEntityClass(data) {
-	return request({
-		method: 'post',
-		url: `/entcls/add`,
-		data: {
-			entClsName: data.entClsName,
-			pid: data.pid,
-			entClsMemo: data.entClsMemo,
-			entClsIcon: data.entClsIcon,
-			backGroundColor: data.backGroundColor
-
-		}
-	})
-}
-
-/**
- * 获取所有实体类列表
- */
-//旧的getAllEntityClass函数
-/* function getAllEntityClass(isIcon) {
-	return ajax({
-		method: 'get',
-		url: '/entcls',
-		data: {
-			isIcon: isIcon
-		}
-	})
-} */
-//新的getAllEntityClass函数
-function getAllEntityClass(isIcon) {
-	return request({
-		method: 'get',
-		url: `/entcls`,
-		data: {
-			isIcon: isIcon
-		}
-	})
-}
-
-/**
- * 获取所有根实体类列表
- */
-// /graph/entcls/root/tree
-//旧的getAllEntclsRootTree函数
-/* function getAllEntclsRootTree() {
-	return ajax({
-		method: 'get',
-		url: '/entcls/root/tree',
-	})
-} */
-//新的getAllEntclsRootTree函数
-function getAllEntclsRootTree() {
-	return request({
-		method: 'get',
-		url: `/entcls/root/tree`,
-	})
-}
-
-/**
- * 获取单个实体类
- * @param id 实体类id
- */
-//旧的getEntityClass函数
-/* function getEntityClass(id) {
-	return ajax({
-		method: 'get',
-		url: '/entcls/{id}',
-		path: {
-			id: id
-		}
-	})
-} */
-//新的getEntityClass函数
-function getEntityClass(id) {
-	return request({
-		method: 'get',
-		url: `/entcls/${id}`,
-		params: {
-			id: id
-		}
-	})
-}
-
-/**
- * 实体类修改接口
- * @param type
- * @param id
- * @param name
- * @param entClsMemo
- * @param backGroundColor
- * @returns {*}
- */
-//旧的updateEntityClass函数
-/* function updateEntityClass(type, id, name, entClsMemo, entClsIcon, backGroundColor) {
-	return ajax({
-		method: 'post',
-		url: '/entcls/update',
-		data: {
-			entClsAllowAttrType: type,
-			entClsID: id,
-			entClsName: name,
-			entClsMemo: entClsMemo ? entClsMemo : '',
-			entClsIcon: entClsIcon,
-			backGroundColor: backGroundColor
-		}
-	})
-} */
-//新的updateEntityClass函数
-function updateEntityClass(type, id, name, entClsMemo, entClsIcon, backGroundColor) {
-	return request({
-		method: 'post',
-		url: `/entcls/update`,
-		data: {
-			entClsAllowAttrType: type,
-			entClsID: id,
-			entClsName: name,
-			entClsMemo: entClsMemo ? entClsMemo : '',
-			entClsIcon: entClsIcon,
-			backGroundColor: backGroundColor
-		}
-	})
-}
-
-/**
- * OWL文件导入
- * @param file
- * @param userCode
- * @returns {*}
- */
-//旧的owlFileImport函数
-/* function owlFileImport(file) {
-	return ajax({
-		method: 'post',
-		url: '/owl/file/import',
-		headers: {
-			'Content-Type': 'multipart/form-data'
-		},
-		data: {
-			file
-		}
-	})
-} */
-//新的owlFileImport函数
-function owlFileImport(file) {
-	return request({
-		method: 'post',
-		url: `/owl/file/import`,
-		headers: {
-			'Content-Type': 'multipart/form-data'
-		},
-		data: {
-			file
-		}
-	})
-}
-
-/**
- * oWL导出
- * @param id
- * @returns {*}
- */
-//旧的owlFileExport函数
-/* function owlFileExport(id) {
-	return ajax({
-		method: 'get',
-		url: '/owl/file/export',
-		data: {
-			entClsIDs: id
-		}
-	})
-} */
-//新的owlFileExport函数
-function owlFileExport(id) {
-	return request({
-		method: 'get',
-		url: `/owl/file/export`,
-		data: {
-			entClsIDs: id
-		}
-	})
-}
-
-/**
- * 实体类树懒加载接口
- * @param id
- * @returns {*}
- */
-//旧的entClsTreeLazy函数
-/* function entClsTreeLazy(id) {
-	return ajax({
-		method: 'get',
-		url: '/entcls/tree',
-		data: {
-			entClsID: id
-		}
-	})
-} */
-//新的entClsTreeLazy函数
-function entClsTreeLazy(id) {
-	return request({
-		method: 'get',
-		url: `/entcls/tree`,
-		data: {
-			entClsID: id
-		}
-	})
-}
-
-/**
- * 根据实体类节点获取当前实体类节点的所有父节点
- * @param id
- * @returns {*}
- */
-//旧的getEntClsParents函数
-/* function getEntClsParents(id) {
-	return ajax({
-		method: 'get',
-		url: '/entcls/parents',
-		data: {
-			entClsID: id
-		}
-	})
-} */
-//新的getEntClsParents函数
-function getEntClsParents(id) {
-	return request({
-		method: 'get',
-		url: `/entcls/parents`,
-		data: {
-			entClsID: id
-		}
-	})
-}
-
-/**
- *待审属性类查找接口
- * @param id
- * @returns {*}
- */
-//旧的getEntClsNoneList函数
-/* function getEntClsNoneList(id) {
-	return ajax({
-		method: 'post',
-		url: '/attrcls/none/list',
-		data: {
-			entClsID: id
-		}
-	})
-} */
-//新的getEntClsNoneList函数
-function getEntClsNoneList(id) {
-	return request({
-		method: 'post',
-		url: `/attrcls/none/list`,
-		data: {
-			entClsID: id
-		}
-	})
-}
-
-/**
- *attrcls/none/merge
- * 属性类合并接口
- * @param id
- * @returns {*}
- **/
-//旧的getEntClsNoneMerge函数
-/* function getEntClsNoneMerge(data) {
-	return ajax({
-		method: 'post',
-		url: '/attrcls/none/merge',
-		headers: {
-			'Content-Type': 'application/json;charset=UTF-8'
-		},
-		data: data,
-		json: true
-	})
-} */
-//新的getEntClsNoneMerge函数
-function getEntClsNoneMerge(data) {
-	return request({
-		method: 'post',
-		url: `/attrcls/none/merge`,
-		headers: {
-			'Content-Type': 'application/json;charset=UTF-8'
-		},
-		data: data,
-		json: true
-	})
-}
-
-/**
- *attrcls/none/move
- * NONE属性类迁移接口
- * @attrClsID  id
- * @mergeAttrClsIDs  {*}
- **/
-//旧的getEntClsNoneMmove函数
-/* function getEntClsNoneMmove(data) {
-	return ajax({
-		method: 'post',
-		url: '/attrcls/none/move',
-		// headers: {'Content-Type': 'application/json;charset=UTF-8'},
-		data: data,
-		// json: true
-	})
-} */
-//新的getEntClsNoneMmove函数
-function getEntClsNoneMmove(data) {
-	return request({
-		method: 'post',
-		url: `/attrcls/none/move`,
-		// headers: {'Content-Type': 'application/json;charset=UTF-8'},
-		data: data,
-		// json: true
-	})
-}
-
-/**
- * 待审属性调整保存接口
- * @param data
- * @returns {*}
- */
-//旧的saveAttrNoneAdjust函数
-/* function saveAttrNoneAdjust(data) {
-	return ajax({
-		method: 'post',
-		url: '/attr/none/adjust',
-		headers: {
-			'Content-Type': 'application/json;charset=UTF-8'
-		},
-		data: data,
-		json: true
-	})
-} */
-//新的saveAttrNoneAdjust函数
-function saveAttrNoneAdjust(data) {
-	return request({
-		method: 'post',
-		url: `/attr/none/adjust`,
-		headers: {
-			'Content-Type': 'application/json;charset=UTF-8'
-		},
-		data: data,
-		json: true
-	})
-}
-
-/**
- *
- 实体类添加自定义属性类
- * @param data
- * @returns {*}
- */
-//旧的addPublicAttrCls函数
-/* function addPublicAttrCls(data) {
-	return ajax({
-		method: 'post',
-		url: '/entcls/add/public/attrcls',
-		data: data
-	})
-} */
-//新的addPublicAttrCls函数
-function addPublicAttrCls(data) {
-	return request({
-		method: 'post',
-		url: `/entcls/add/public/attrcls`,
-		data: data
-	})
-}
-
-/**
- * 获取编排ID
- * @param entClsId
- * @returns {*}
- */
-//旧的getFlowId函数
-/* function getFlowId(entClsId) {
-	return ajax({
-		method: 'get',
-		url: '/neural/flow',
-		data: {
-			entClsId
-		}
-	})
-} */
-//新的getFlowId函数
-function getFlowId(entClsId) {
-	return ajax({
-		method: 'get',
-		url: `/neural/flow`,
-		data: {
-			entClsId
-		}
-	})
-}
-
-/**
- * 获取编排ID
- * @param entClsID
- * @returns {*}
- */
-//旧的getEntClsPrefixList函数
-/* function getEntClsPrefixList(entClsID) {
-	return ajax({
-		method: 'get',
-		url: '/entcls/prefix/tree',
-		data: {
-			entClsID
-		}
-	})
-} */
-//新的getEntClsPrefixList函数
-function getEntClsPrefixList(entClsID) {
-	return request({
-		method: 'get',
-		url: `/entcls/prefix/tree`,
-		data: {
-			entClsID
-		}
-	})
-}
-
-/**
- * 获取编排ID
- * @param entClsID
- * @param entClsPrefix
- * @returns {*}
- */
-//旧的updateEntClsPrefix函数
-/* function updateEntClsPrefix(entClsID, entClsPrefix) {
-	return ajax({
-		method: 'post',
-		url: '/entcls/prefix/update',
-		data: {
-			entClsID,
-			entClsPrefix
-		}
-	})
-} */
-//新的updateEntClsPrefix函数
-function updateEntClsPrefix(entClsID, entClsPrefix) {
-	return request({
-		method: 'post',
-		url: `/entcls/prefix/update`,
-		data: {
-			entClsID,
-			entClsPrefix
-		}
-	})
-}
-
-/**
- * 保存生成规则
- * @param entClsID
- * @param entClsConfig
- * @returns {*}
- */
-//旧的updateEntClsConfig函数
-/* function updateEntClsConfig(entClsID, entClsConfig) {
-	return ajax({
-		method: 'post',
-		url: '/entcls/config/update',
-		data: {
-			entClsID,
-			entClsConfig
-		}
-	})
-} */
-//新的updateEntClsConfig函数
-function updateEntClsConfig(entClsID, entClsConfig) {
-	return request({
-		method: 'post',
-		url: `/entcls/config/update`,
-		data: {
-			entClsID,
-			entClsConfig
-		}
-	})
-}
-
-/**
- * 清楚主库和模板库
- * @param message
- * @returns {*}
- */
-//旧的clearDatabase函数
-/* function clearDatabase(message, clientType) {
-	return ajax({
-		method: 'post',
-		url: '/vertex/all/drop',
-		data: {
-			message,
-			clientType,
-			noTimeout: true
-		}
-	})
-} */
-//新的clearDatabase函数
-function clearDatabase(message, clientType) {
-	return request({
-		method: 'post',
-		url: `/vertex/all/drop`,
-		data: {
-			message,
-			clientType,
-			noTimeout: true
-		}
-	})
-}
-
-export {
-	addPublicAttrCls,
-	saveAttrNoneAdjust,
-	getEntClsNoneMmove,
-	getEntClsNoneMerge,
-	getEntClsNoneList,
-	getEntClsParents,
-	entClsTreeLazy,
-	owlFileExport,
-	owlFileImport,
-	delEntityClass,
-	addEntityClass,
-	getAllEntityClass,
-	getEntityClass,
-	updateEntityClass,
-	getFlowId,
-	getAllEntclsRootTree,
-	getEntClsPrefixList,
-	updateEntClsPrefix,
-	updateEntClsConfig,
-	clearDatabase
-}

+ 0 - 341
src/api/temporary/entityClass.js

@@ -1,341 +0,0 @@
-import ajax from '../util'
-
-/**
- * 删除实体类
- * @param opts
- */
-function delEntityClass (id) {
-  return ajax({
-    method: 'post',
-    url: '/entcls/del/{id}',
-    path: {
-      id: id
-    }
-  })
-}
-
-/**
- * 新增实体类
- * @param1 entClsName
- * @param2 entClsType
- * @param3 pid
- */
-function addEntityClass (data) {
-  return ajax({
-    method: 'post',
-    url: '/entcls/add',
-    data: {
-      entClsName: data.entClsName,
-      pid: data.pid,
-      entClsMemo: data.entClsMemo,
-      entClsIcon: data.entClsIcon,
-      backGroundColor:data.backGroundColor
-      
-    }
-  })
-}
-
-/**
- * 获取所有实体类列表
- */
-function getAllEntityClass (isIcon) {
-  return ajax({
-    method: 'get',
-    url: '/entcls',
-    data: {
-      isIcon: isIcon
-    }
-  })
-}
-
-/**
- * 获取所有根实体类列表
- */
-// /graph/entcls/root/tree
- function getAllEntclsRootTree (){
-   return ajax({
-     method: 'get',
-     url: '/entcls/root/tree',
-   })
- }
-
-/**
- * 获取单个实体类
- * @param id 实体类id
- */
-function getEntityClass (id) {
-  return ajax({
-    method: 'get',
-    url: '/entcls/{id}',
-    path: {
-      id: id
-    }
-  })
-}
-
-/**
- * 实体类修改接口
- * @param type
- * @param id
- * @param name
- * @param entClsMemo
- * @param backGroundColor
- * @returns {*}
- */
-function updateEntityClass (type, id, name, entClsMemo, entClsIcon,backGroundColor) {
-  return ajax({
-    method: 'post',
-    url: '/entcls/update',
-    data: {
-      entClsAllowAttrType: type,
-      entClsID: id,
-      entClsName: name,
-      entClsMemo: entClsMemo ? entClsMemo : '',
-      entClsIcon: entClsIcon,
-      backGroundColor: backGroundColor
-    }
-  })
-}
-
-/**
- * OWL文件导入
- * @param file
- * @param userCode
- * @returns {*}
- */
-function owlFileImport (file) {
-  return ajax({
-    method: 'post',
-    url: '/owl/file/import',
-    headers: {'Content-Type': 'multipart/form-data'},
-    data: {
-      file
-    }
-  })
-}
-
-/**
- * oWL导出
- * @param id
- * @returns {*}
- */
-function owlFileExport (id) {
-  return ajax({
-    method: 'get',
-    url: '/owl/file/export',
-    data: {
-      entClsIDs: id
-    }
-  })
-}
-
-/**
- * 实体类树懒加载接口
- * @param id
- * @returns {*}
- */
-function entClsTreeLazy (id) {
-  return ajax({
-    method: 'get',
-    url: '/entcls/tree',
-    data: {
-      entClsID: id
-    }
-  })
-}
-
-/**
- * 根据实体类节点获取当前实体类节点的所有父节点
- * @param id
- * @returns {*}
- */
-function getEntClsParents (id) {
-  return ajax({
-    method: 'get',
-    url: '/entcls/parents',
-    data: {
-      entClsID: id
-    }
-  })
-}
-
-/**
- *待审属性类查找接口
- * @param id
- * @returns {*}
- */
-function getEntClsNoneList (id) {
-  return ajax({
-    method: 'post',
-    url: '/attrcls/none/list',
-    data: {
-      entClsID: id
-    }
-  })
-}
-
-/**
- *attrcls/none/merge
- * 属性类合并接口
- * @param id
- * @returns {*}
- **/
-function getEntClsNoneMerge (data) {
-  return ajax({
-    method: 'post',
-    url: '/attrcls/none/merge',
-    headers: {'Content-Type': 'application/json;charset=UTF-8'},
-    data: data,
-    json: true
-  })
-}
-
-/**
- *attrcls/none/move
- * NONE属性类迁移接口
- * @attrClsID  id
- * @mergeAttrClsIDs  {*}
- **/
-
-function getEntClsNoneMmove (data) {
-  return ajax({
-    method: 'post',
-    url: '/attrcls/none/move',
-    // headers: {'Content-Type': 'application/json;charset=UTF-8'},
-    data: data,
-    // json: true
-  })
-}
-
-/**
- * 待审属性调整保存接口
- * @param data
- * @returns {*}
- */
-function saveAttrNoneAdjust (data) {
-  return ajax({
-    method: 'post',
-    url: '/attr/none/adjust',
-    headers: {'Content-Type': 'application/json;charset=UTF-8'},
-    data: data,
-    json: true
-  })
-}
-
-/**
- *
- 实体类添加自定义属性类
- * @param data
- * @returns {*}
- */
-function addPublicAttrCls (data) {
-  return ajax({
-    method: 'post',
-    url: '/entcls/add/public/attrcls',
-    data: data
-  })
-}
-
-/**
- * 获取编排ID
- * @param entClsId
- * @returns {*}
- */
-function getFlowId (entClsId) {
-  return ajax({
-    method: 'get',
-    url: '/neural/flow',
-    data: {
-      entClsId
-    }
-  })
-}
-
-/**
- * 获取编排ID
- * @param entClsID
- * @returns {*}
- */
-function getEntClsPrefixList (entClsID) {
-  return ajax({
-    method: 'get',
-    url: '/entcls/prefix/tree',
-    data: {
-      entClsID
-    }
-  })
-}
-
-/**
- * 获取编排ID
- * @param entClsID
- * @param entClsPrefix
- * @returns {*}
- */
-function updateEntClsPrefix (entClsID, entClsPrefix) {
-  return ajax({
-    method: 'post',
-    url: '/entcls/prefix/update',
-    data: {
-      entClsID,
-      entClsPrefix
-    }
-  })
-}
-
-/**
- * 保存生成规则
- * @param entClsID
- * @param entClsConfig
- * @returns {*}
- */
-function updateEntClsConfig (entClsID, entClsConfig) {
-  return ajax({
-    method: 'post',
-    url: '/entcls/config/update',
-    data: {
-      entClsID,
-      entClsConfig
-    }
-  })
-}
-
-/**
- * 清楚主库和模板库
- * @param message
- * @returns {*}
- */
-function clearDatabase (message, clientType) {
-  return ajax({
-    method: 'post',
-    url: '/vertex/all/drop',
-    data: {
-      message,
-      clientType,
-      noTimeout: true
-    }
-  })
-}
-
-export {
-  addPublicAttrCls,
-  saveAttrNoneAdjust,
-  getEntClsNoneMmove,
-  getEntClsNoneMerge,
-  getEntClsNoneList,
-  getEntClsParents,
-  entClsTreeLazy,
-  owlFileExport,
-  owlFileImport,
-  delEntityClass,
-  addEntityClass,
-  getAllEntityClass,
-  getEntityClass,
-  updateEntityClass,
-  getFlowId,
-  getAllEntclsRootTree,
-  getEntClsPrefixList,
-  updateEntClsPrefix,
-  updateEntClsConfig,
-  clearDatabase
-}

+ 0 - 337
src/api/temporary/relationClass new.js

@@ -1,337 +0,0 @@
-import request from '@/utils/request'
-
-/**
- * 获得指定实体类为起点的所有关系类列表
- * @param id
- * @returns {*}
- */
-//旧的getAllRelationClassList函数
-/* function getAllRelationClassList (id, entClsType) {
-  return ajax({
-    method: 'get',
-    url: '/relcls/{id}/list',
-    path: {
-      id: id
-    },
-    data: {
-      entClsType: entClsType,
-    }
-  })
-} */
-//新的getAllRelationClassList函数
-function getAllRelationClassList(id, entClsType) {
-	return request({
-		method: 'get',
-		url: `/relcls/${id}/list`,
-		params: {
-			id: id,
-			entClsType: entClsType,
-		}
-	})
-}
-
-/**
- * 删除关系类
- * @param id
- * @returns {*}
- */
-//旧的deleteRelationClass函数
-/* function deleteRelationClass (id) {
-  return ajax({
-    method: 'post',
-    url: '/relcls/del/{id}',
-    path: {
-      id: id
-    }
-  })
-} */
-//新的deleteRelationClass函数
-function deleteRelationClass(id) {
-	return request({
-		method: 'post',
-		url: `/relcls/del/${id}`,
-		params: {
-			id: id
-		}
-	})
-}
-
-/**
- * 通过名称获取所有关系类列表
- * @param name
- * @returns {*}
- */
-//旧的getAllRelationClassListByName函数
-/* function getAllRelationClassListByName (name, isModel, current, size) {
-  return ajax({
-    method: 'get',
-    url: '/relcls/list',
-    data: {
-      name: name,
-      current,
-      size,
-      isModel
-    }
-  })
-} */
-//新的getAllRelationClassListByName函数
-function getAllRelationClassListByName(name, isModel, current, size) {
-	return request({
-		method: 'get',
-		url: `/relcls/list`,
-		data: {
-			name: name,
-			current,
-			size,
-			isModel
-		}
-	})
-}
-
-/**
- * 修改一个关系类名
- * @param data
- * @returns {*}
- */
-//旧的editRelationClass函数
-/* function editRelationClass (data) {
-  return ajax({
-    method: 'post',
-    url: '/relcls/update',
-    data: data
-  })
-} */
-//新的editRelationClass函数
-function editRelationClass(data) {
-	return request({
-		method: 'post',
-		url: `/relcls/update`,
-		data: data
-	})
-}
-
-/**
- * 添加一个关系类
- * @param data
- * @returns {*}
- */
-//旧的addRelationClass函数
-/* function addRelationClass (data) {
-  return ajax({
-    method: 'post',
-    url: '/relcls/add',
-    data: data
-  })
-} */
-//新的addRelationClass函数
-function addRelationClass(data) {
-	return request({
-		method: 'post',
-		url: `/relcls/add`,
-		data: data
-	})
-}
-
-/**
- * 新建实体关系
- * @param data
- * @returns {*}
- */
-//旧的addEntityRelation函数
-/* function addEntityRelation (data) {
-  return ajax({
-    method: 'post',
-    url: '/rel/add',
-    data: data
-  })
-} */
-//新的addEntityRelation函数
-function addEntityRelation(data) {
-	return request({
-		method: 'post',
-		url: `/rel/add`,
-		data: data
-	})
-}
-
-/**
- * 删除实体关系
- * @param relID, isModel
- * @returns {*}
- */
-//旧的deleteEntityRelation函数
-/* function deleteEntityRelation (relID, isModel) {
-  return ajax({
-    method: 'post',
-    url: '/rel/del/{id}',
-    path: {
-      id: relID
-    },
-    data: {
-      id: relID,
-      isModel
-    }
-  })
-} */
-//新的deleteEntityRelation函数
-function deleteEntityRelation(relID, isModel) {
-	return request({
-		method: 'post',
-		url: `/rel/del/${id}`,
-		params: {
-			id: relID,
-			isModel
-		}
-	})
-}
-
-/**
- * 查找所有关系类
- * */
-//旧的getAllRelationClass函数
-/* function getAllRelationClass () {
-  return ajax({
-    method: 'post',
-    url: '/relcls/getall'
-  })
-} */
-//新的getAllRelationClass函数
-function getAllRelationClass() {
-	return request({
-		method: 'post',
-		url: `/relcls/getall`
-	})
-}
-
-/**
- * 批量新增实体关系
- * */
-//旧的addRelBatch函数
-/* function addRelBatch (data) {
-  return ajax({
-    method: 'post',
-    url: '/rel/add/batch',
-    data: data
-  })
-} */
-//新的addRelBatch函数
-function addRelBatch(data) {
-	return request({
-		method: 'post',
-		url: `/rel/add/batch`,
-		data: data
-	})
-}
-
-/**
- * 查询此关系类所指向实体类还未有关联的实体列表
- * @param relClsId direction isModel current size
- * @returns {*}
- */
-//旧的getEntityListByEntityClassId函数
-/* function getRelclsUnpoint(relClsId, direction, entId, isModel, current, size) {
-  return ajax({
-    method: 'get',
-    url: '/relcls/{direction}/{relClsId}/unpoint/{entId}',
-    data: {
-      current,
-      size,
-      isModel
-    },
-    path: {
-      direction,
-      relClsId,
-      entId
-    }
-  })
-} */
-//新的getEntityListByEntityClassId函数
-function getRelclsUnpoint(relClsId, direction, entId, isModel, current, size) {
-	return request({
-		method: 'get',
-		url: `/relcls/${direction}/${relClsId}/unpoint/${entId}`,
-		params: {
-			current,
-			size,
-			isModel,
-			direction,
-			relClsId,
-			entId
-		}
-	})
-}
-
-/**
- * 查询此关系类所指向实体类还未有关联的实体列表(带属性类)
- * @param relClsId direction isModel current size
- * @returns {*}
- */
-//旧的getEntityListByEntityClassId函数
-/* function getRelclsEnt(relClsId, direction, entId, isModel, entName, current, size) {
-	return ajax({
-		method: 'get',
-		url: '/relcls/{direction}/{relClsId}/ent/{entId}',
-		data: {
-			entName,
-			current,
-			size,
-			isModel
-		},
-		path: {
-			direction,
-			relClsId,
-			entId
-		}
-	})
-} */
-//新的getEntityListByEntityClassId函数
-function getRelclsEnt(relClsId, direction, entId, isModel, entName, current, size) {
-	return request({
-		method: 'get',
-		url: `/relcls/${direction}/${relClsId}/ent/${entId}`,
-		params: {
-			entName,
-			current,
-			size,
-			isModel,
-			direction,
-			relClsId,
-			entId
-		}
-	})
-}
-
-/**
- * 批量编辑实体关系
- * */
-//旧的editRelBatch函数
-/* function editRelBatch(data) {
-	return ajax({
-		method: 'post',
-		url: '/relattr/update/batch',
-		data: data
-	})
-} */
-//新的editRelBatch函数
-function editRelBatch(data) {
-	return request({
-		method: 'post',
-		url: `/relattr/update/batch`,
-		data: data
-	})
-}
-
-export {
-	addRelationClass,
-	getAllRelationClassList,
-	deleteRelationClass,
-	getAllRelationClassListByName,
-	editRelationClass,
-	deleteEntityRelation,
-	addEntityRelation,
-	getAllRelationClass,
-	addRelBatch,
-	getRelclsUnpoint,
-	editRelBatch,
-	getRelclsEnt
-}

+ 0 - 202
src/api/temporary/relationClass.js

@@ -1,202 +0,0 @@
-import ajax from '../util'
-
-/**
- * 获得指定实体类为起点的所有关系类列表
- * @param id
- * @returns {*}
- */
-function getAllRelationClassList (id, entClsType) {
-  return ajax({
-    method: 'get',
-    url: '/relcls/{id}/list',
-    path: {
-      id: id
-    },
-    data: {
-      entClsType: entClsType,
-    }
-  })
-}
-
-/**
- * 删除关系类
- * @param id
- * @returns {*}
- */
-function deleteRelationClass (id) {
-  return ajax({
-    method: 'post',
-    url: '/relcls/del/{id}',
-    path: {
-      id: id
-    }
-  })
-}
-
-/**
- * 通过名称获取所有关系类列表
- * @param name
- * @returns {*}
- */
-function getAllRelationClassListByName (name, isModel, current, size) {
-  return ajax({
-    method: 'get',
-    url: '/relcls/list',
-    data: {
-      name: name,
-      current,
-      size,
-      isModel
-    }
-  })
-}
-
-/**
- * 修改一个关系类名
- * @param data
- * @returns {*}
- */
-function editRelationClass (data) {
-  return ajax({
-    method: 'post',
-    url: '/relcls/update',
-    data: data
-  })
-}
-
-/**
- * 添加一个关系类
- * @param data
- * @returns {*}
- */
-function addRelationClass (data) {
-  return ajax({
-    method: 'post',
-    url: '/relcls/add',
-    data: data
-  })
-}
-
-/**
- * 新建实体关系
- * @param data
- * @returns {*}
- */
-function addEntityRelation (data) {
-  return ajax({
-    method: 'post',
-    url: '/rel/add',
-    data: data
-  })
-}
-
-/**
- * 删除实体关系
- * @param relID, isModel
- * @returns {*}
- */
-function deleteEntityRelation (relID, isModel) {
-  return ajax({
-    method: 'post',
-    url: '/rel/del/{id}',
-    path: {
-      id: relID
-    },
-    data: {
-      id: relID,
-      isModel
-    }
-  })
-}
-
-/**
- * 查找所有关系类
- * */
-function getAllRelationClass () {
-  return ajax({
-    method: 'post',
-    url: '/relcls/getall'
-  })
-}
-
-/**
- * 批量新增实体关系
- * */
-function addRelBatch (data) {
-  return ajax({
-    method: 'post',
-    url: '/rel/add/batch',
-    data: data
-  })
-}
-
-/**
- * 查询此关系类所指向实体类还未有关联的实体列表
- * @param relClsId direction isModel current size
- * @returns {*}
- */
-function getRelclsUnpoint(relClsId, direction, entId, isModel, current, size) {
-  return ajax({
-    method: 'get',
-    url: '/relcls/{direction}/{relClsId}/unpoint/{entId}',
-    data: {
-      current,
-      size,
-      isModel
-    },
-    path: {
-      direction,
-      relClsId,
-      entId
-    }
-  })
-}
-
-/**
- * 查询此关系类所指向实体类还未有关联的实体列表(带属性类)
- * @param relClsId direction isModel current size
- * @returns {*}
- */
-function getRelclsEnt(relClsId, direction, entId, isModel, entName, current, size) {
-  return ajax({
-    method: 'get',
-    url: '/relcls/{direction}/{relClsId}/ent/{entId}',
-    data: {
-      entName,
-      current,
-      size,
-      isModel
-    },
-    path: {
-      direction,
-      relClsId,
-      entId
-    }
-  })
-}
-
-/**
- * 批量编辑实体关系
- * */
-function editRelBatch (data) {
-  return ajax({
-    method: 'post',
-    url: '/relattr/update/batch',
-    data: data
-  })
-}
-
-export {
-  addRelationClass,
-  getAllRelationClassList,
-  deleteRelationClass,
-  getAllRelationClassListByName,
-  editRelationClass,
-  deleteEntityRelation,
-  addEntityRelation,
-  getAllRelationClass,
-  addRelBatch,
-  getRelclsUnpoint,
-  editRelBatch,
-  getRelclsEnt
-}

+ 0 - 196
src/api/temporary/relationEditor new.js

@@ -1,196 +0,0 @@
-import request from '@/utils/request'
-
-/**
- * 通过id获取关系属性
- */
-//旧的getRelationAttr函数
-/* function getRelationAttr (path) {
-  return ajax({
-    method: 'get',
-    url: '/relcls/{id}/attrs',
-    path: {
-      id: path
-    },
-    data: {
-      id: path
-    }
-  })
-} */
-//新的getRelationAttr函数
-function getRelationAttr(path) {
-	return request({
-		method: 'get',
-		url: `/relcls/${id}/attrs`,
-		params: {
-			id: path
-		}
-	})
-}
-
-/**
- * 新增关系属性
- */
-//旧的addRelationAttr函数
-/* function addRelationAttr (data) {
-  return ajax({
-    method: 'post',
-    url: '/relcls/attrcls/add',
-    path: {},
-    data: {
-      relClsID: data.relClsID,
-      attrUnit: data.attrUnit,
-      attrClsName: data.attrClsName,
-      attrClsMemo: data.attrClsMemo,
-      valueType: data.valueType
-    }
-  })
-} */
-//新的addRelationAttr函数
-function addRelationAttr(data) {
-	return request({
-		method: 'post',
-		url: `/relcls/attrcls/add`,
-		path: {},
-		data: {
-			relClsID: data.relClsID,
-			attrUnit: data.attrUnit,
-			attrClsName: data.attrClsName,
-			attrClsMemo: data.attrClsMemo,
-			valueType: data.valueType
-		}
-	})
-}
-
-/**
- * 修改关系属性
- * @param data
- */
-//旧的updateRelationAttr函数
-/* function updateRelationAttr (data) {
-  return ajax({
-    method: 'post',
-    url: '/relattr/update',
-    path: {},
-    data: {
-      relID: data.relID, // 关系id,新加
-      attrClsID: data.attrClsID,// *属性类ID
-      attrMemo: data.attrMemo,// 属性描述
-      attrValue: data.attrValue,// 属性值
-      entID: data.entID// 实体ID
-    }
-  })
-} */
-//新的updateRelationAttr函数
-function updateRelationAttr(data) {
-	return request({
-		method: 'post',
-		url: `/relattr/update`,
-		path: {},
-		data: {
-			relID: data.relID, // 关系id,新加
-			attrClsID: data.attrClsID, // *属性类ID
-			attrMemo: data.attrMemo, // 属性描述
-			attrValue: data.attrValue, // 属性值
-			entID: data.entID // 实体ID
-		}
-	})
-}
-
-/**
- * 修改关系类属性
- */
-//旧的updateRelationClassAttr函数
-/* function updateRelationClassAttr (data) {
-  return ajax({
-    method: 'post',
-    url: '/relcls/attrcls/update',
-    path: {},
-    data: {
-      attrUnit: data.attrUnit,
-      attrClsID: data.attrClsID,
-      attrClsMemo: data.attrClsMemo,
-      attrClsName: data.attrClsName,
-      valueType: data.valueType
-    }
-  })
-} */
-//新的updateRelationClassAttr函数
-function updateRelationClassAttr(data) {
-	return request({
-		method: 'post',
-		url: `/relcls/attrcls/update`,
-		path: {},
-		data: {
-			attrUnit: data.attrUnit,
-			attrClsID: data.attrClsID,
-			attrClsMemo: data.attrClsMemo,
-			attrClsName: data.attrClsName,
-			valueType: data.valueType
-		}
-	})
-}
-
-/**
- * 删除关系类下的关系属性
- */
-//旧的delRelationAttr函数
-/* function delRelationAttr (path) {
-  return ajax({
-    method: 'post',
-    url: '/relcls/attrcls/del/{id}',
-    path: {
-      id: path
-    },
-    data: {}
-  })
-} */
-//新的delRelationAttr函数
-function delRelationAttr(path) {
-	return request({
-		method: 'post',
-		url: `/relcls/attrcls/del/${path}`,
-		path: {
-			id: path
-		},
-		data: {}
-	})
-}
-
-/**
- * 获得指定实体类为起点的所有关系类列表
- * @param id
- * @returns {*}
- */
-//旧的getRelationListByEntityClassId函数
-/* function getRelationListByEntityClassId (id, entClsType) {
-  return ajax({
-    method: 'get',
-    url: '/relcls/{id}/list',
-    path: {
-      id: id
-    },
-    data: {
-      entClsType: entClsType,
-    }
-  })
-} */
-//新的getRelationListByEntityClassId函数
-function getRelationListByEntityClassId(id, entClsType) {
-	return request({
-		method: 'get',
-		url: `/relcls/${id}/list`,
-		params: {
-			id: id,
-			entClsType: entClsType,
-		}
-	})
-}
-
-export {
-	getRelationAttr,
-	addRelationAttr,
-	updateRelationAttr,
-	updateRelationClassAttr,
-	delRelationAttr,
-	getRelationListByEntityClassId
-}

+ 0 - 113
src/api/temporary/relationEditor.js

@@ -1,113 +0,0 @@
-import ajax from '../util'
-
-/**
- * 通过id获取关系属性
- */
-function getRelationAttr (path) {
-  return ajax({
-    method: 'get',
-    url: '/relcls/{id}/attrs',
-    path: {
-      id: path
-    },
-    data: {
-      id: path
-    }
-  })
-}
-
-/**
- * 新增关系属性
- */
-function addRelationAttr (data) {
-  return ajax({
-    method: 'post',
-    url: '/relcls/attrcls/add',
-    path: {},
-    data: {
-      relClsID: data.relClsID,
-      attrUnit: data.attrUnit,
-      attrClsName: data.attrClsName,
-      attrClsMemo: data.attrClsMemo,
-      valueType: data.valueType
-    }
-  })
-}
-
-/**
- * 修改关系属性
- * @param data
- */
-function updateRelationAttr (data) {
-  return ajax({
-    method: 'post',
-    url: '/relattr/update',
-    path: {},
-    data: {
-      relID: data.relID, // 关系id,新加
-      attrClsID: data.attrClsID,// *属性类ID
-      attrMemo: data.attrMemo,// 属性描述
-      attrValue: data.attrValue,// 属性值
-      entID: data.entID// 实体ID
-    }
-  })
-}
-
-/**
- * 修改关系类属性
- */
-function updateRelationClassAttr (data) {
-  return ajax({
-    method: 'post',
-    url: '/relcls/attrcls/update',
-    path: {},
-    data: {
-      attrUnit: data.attrUnit,
-      attrClsID: data.attrClsID,
-      attrClsMemo: data.attrClsMemo,
-      attrClsName: data.attrClsName,
-      valueType: data.valueType
-    }
-  })
-}
-
-/**
- * 删除关系类下的关系属性
- */
-function delRelationAttr (path) {
-  return ajax({
-    method: 'post',
-    url: '/relcls/attrcls/del/{id}',
-    path: {
-      id: path
-    },
-    data: {}
-  })
-}
-
-/**
- * 获得指定实体类为起点的所有关系类列表
- * @param id
- * @returns {*}
- */
-function getRelationListByEntityClassId (id, entClsType) {
-  return ajax({
-    method: 'get',
-    url: '/relcls/{id}/list',
-    path: {
-      id: id
-    },
-    data: {
-      entClsType: entClsType,
-    }
-  })
-}
-
-export {
-  getRelationAttr,
-  addRelationAttr,
-  updateRelationAttr,
-  updateRelationClassAttr,
-  delRelationAttr,
-  getRelationListByEntityClassId
-}

+ 0 - 394
src/api/temporary/search new.js

@@ -1,394 +0,0 @@
-import request from '@/utils/request'
-
-/**
- * 根据实体查询
- * @param searchStr
- * @param entClsIDs
- * @param pagenum
- * @param pagesize
- * @param isModel
- * @returns {*}
- */
-//旧的entSearch函数
-/* function entSearch(searchStr, entClsIDs, pagenum, pagesize, isModel, isIcon, searchType) {
-    return ajax({
-        method: 'get',
-        url: '/ent/entquery',
-        data: {
-            searchStr: (searchType === 'name' || searchType == null) ? searchStr : null,
-            entClsIDs,
-            pagenum,
-            pagesize,
-            isModel,
-            isIcon,
-            unionID: searchType === 'id' ? searchStr : null
-        }
-    })
-} */
-//新的entSearch函数
-function entSearch(searchStr, entClsIDs, pagenum, pagesize, isModel, isIcon, searchType) {
-	return request({
-		method: 'get',
-		url: `/ent/entquery`,
-		data: {
-			searchStr: (searchType === 'name' || searchType == null) ? searchStr : null,
-			entClsIDs,
-			pagenum,
-			pagesize,
-			isModel,
-			isIcon,
-			unionID: searchType === 'id' ? searchStr : null
-		}
-	})
-}
-
-/**
- * 根据关系查询
- * @param searchStr
- * @param entClsIDs
- * @param pagenum
- * @param pagesize
- * @returns {*}
- */
-//旧的relSearch函数
-/* function relSearch(searchStr, entClsIDs, pagenum, pagesize) {
-    return ajax({
-        method: 'get',
-        url: '/rel/relquery',
-        data: {
-            searchStr: searchStr,
-            entClsIDs: entClsIDs,
-            pagenum: pagenum,
-            pagesize: pagesize
-        }
-    })
-} */
-//新的relSearch函数
-function relSearch(searchStr, entClsIDs, pagenum, pagesize) {
-	return request({
-		method: 'get',
-		url: `/rel/relquery`,
-		data: {
-			searchStr: searchStr,
-			entClsIDs: entClsIDs,
-			pagenum: pagenum,
-			pagesize: pagesize
-		}
-	})
-}
-
-/**
- * k跳查询
- * @param entID
- * @param maxHops
- * @param pagenum
- * @param pagesize
- * @returns {*}
- */
-//旧的kHopSearch函数
-/* function kHopSearch(entID, maxHops, pagenum, pagesize) {
-    return ajax({
-        method: 'get',
-        url: '/ent/khopquery',
-        data: {
-            entID: entID,
-            maxHops: maxHops,
-            pagenum: pagenum,
-            pagesize: pagesize
-        }
-    })
-} */
-//新的kHopSearch函数
-function kHopSearch(entID, maxHops, pagenum, pagesize) {
-	return request({
-		method: 'get',
-		url: `/ent/khopquery`,
-		data: {
-			entID: entID,
-			maxHops: maxHops,
-			pagenum: pagenum,
-			pagesize: pagesize
-		}
-	})
-}
-
-/**
- * 标签查询
- * @param tagName
- * @returns {*}
- */
-//旧的getTag函数
-/* function getTag(tagName) {
-    return ajax({
-        method: 'get',
-        url: '/tag/searchtagname',
-        data: {
-            tagName: tagName
-        }
-    })
-} */
-//新的getTag函数
-function getTag(tagName) {
-	return request({
-		method: 'get',
-		url: `/tag/searchtagname`,
-		data: {
-			tagName: tagName
-		}
-	})
-}
-
-/**
- * 测试目标查询
- * @param entName
- * @returns {*}
- */
-//旧的testTargetQuery函数
-/* function testTargetQuery(entName) {
-    return ajax({
-        method: 'get',
-        url: '/activity/target/search/name',
-        data: {
-            entName: entName
-        }
-    })
-} */
-//新的testTargetQuery函数
-function testTargetQuery(entName) {
-	return request({
-		method: 'get',
-		url: `/activity/target/search/name`,
-		data: {
-			entName: entName
-		}
-	})
-}
-
-/**
- * 测试活动查询
- * @param targetEntId
- * @param entName
- * @returns {*}
- */
-//旧的testActivityQuery函数
-/* function testActivityQuery(targetEntId, entName) {
-    return ajax({
-        method: 'get',
-        url: '/activity/search/name',
-        data: {
-            entName: entName,
-            targetEntId: targetEntId
-        }
-    })
-} */
-//新的testActivityQuery函数
-function testActivityQuery(targetEntId, entName) {
-	return request({
-		method: 'get',
-		url: `/activity/search/name`,
-		data: {
-			entName: entName,
-			targetEntId: targetEntId
-		}
-	})
-}
-
-/**
- * 测试活动表格
- * @param targetEntId
- * @param entName
- * @returns {*}
- */
-//旧的activityform函数
-/* function activityform(activityEntId) {
-    return ajax({
-        method: 'get',
-        url: '/activity/ent',
-        data: {
-            activityEntId
-        }
-    })
-} */
-//新的activityform函数
-function activityform(activityEntId) {
-	return request({
-		method: 'get',
-		url: `/activity/ent`,
-		data: {
-			activityEntId
-		}
-	})
-}
-
-/**
- * 测试活动表格
- * @param targetEntId
- * @param Name
- * @returns {*}
- */
-//旧的activityChildren函数
-/* function activityChildren(activityEntId) {
-    return ajax({
-        method: 'get',
-        url: '/activity/ent/child',
-        data: {
-            activityEntId
-        }
-    })
-} */
-//新的activityChildren函数
-function activityChildren(activityEntId) {
-	return ajax({
-		method: 'get',
-		url: `/activity/ent/child`,
-		data: {
-			activityEntId
-		}
-	})
-}
-
-/**
- * 测试主体
- * @param targetEntId
- * @returns {*}
- */
-//旧的subjectInterface函数
-/* function subjectInterface(targetEntId) {
-    return ajax({
-        method: 'get',
-        url: '/activity/main',
-        data: {
-            targetEntId
-        }
-    })
-} */
-//新的subjectInterface函数
-function subjectInterface(targetEntId) {
-	return request({
-		method: 'get',
-		url: `/activity/main`,
-		data: {
-			targetEntId
-		}
-	})
-}
-
-/**
- * 标签查询列表
- * @param labels
- * @param pagenum
- * @param pagesize
- * @param tagIDs
- * @returns {*}
- */
-//旧的getTagentList函数
-/* function getTagentList(labels, pagenum, pagesize, tagIDs) {
-    return ajax({
-        method: 'get',
-        url: '/tag/tagentlist',
-        data: {
-            labels: labels,
-            pagenum: pagenum,
-            pagesize: pagesize,
-            tagIDs: tagIDs
-        }
-    })
-} */
-//新的getTagentList函数
-function getTagentList(labels, pagenum, pagesize, tagIDs) {
-	return request({
-		method: 'get',
-		url: `/tag/tagentlist`,
-		data: {
-			labels: labels,
-			pagenum: pagenum,
-			pagesize: pagesize,
-			tagIDs: tagIDs
-		}
-	})
-}
-
-/**
- * 初始化后台方案生成接口
- * @returns {*}
- */
-//旧的initTestTarget函数
-/* function initTestTarget() {
-    return ajax({
-        method: 'get',
-        url: '/activity/init/cls/id'
-    })
-} */
-//新的initTestTarget函数
-function initTestTarget() {
-	return request({
-		method: 'get',
-		url: `/activity/init/cls/id`
-	})
-}
-
-/**
- * 下载方案生成json接口
- * @returns {*}
- */
-//旧的downloadTargetJson函数
-/* function downloadTargetJson(id) {
-    return ajax({
-        method: 'get',
-        path: {
-            id: id
-        },
-        url: '/activity/json/download/{id}'
-    })
-} */
-//新的downloadTargetJson函数
-function downloadTargetJson(id) {
-	return request({
-		method: 'get',
-		params: {
-			id: id
-		},
-		url: `/activity/json/download/${id}`
-	})
-}
-
-/**
- * 上传方案接口
- * @returns {*}
- */
-//旧的uploadButton函数
-/* function uploadButton(file) {
-    return ajax({
-        method: 'post',
-        path: {
-            file: file
-        },
-        url: '/activity/file/import'
-    })
-} */
-//新的uploadButton函数
-function uploadButton(file) {
-	return request({
-		method: 'post',
-		params: {
-			file: file
-		},
-		url: `/activity/file/import`
-	})
-}
-
-export {
-	entSearch,
-	relSearch,
-	kHopSearch,
-	getTag,
-	getTagentList,
-	testTargetQuery,
-	testActivityQuery,
-	activityform,
-	activityChildren,
-	subjectInterface,
-	initTestTarget,
-	downloadTargetJson,
-	uploadButton
-}

+ 0 - 247
src/api/temporary/search.js

@@ -1,247 +0,0 @@
-import ajax from '../util'
-
-/**
- * 根据实体查询
- * @param searchStr
- * @param entClsIDs
- * @param pagenum
- * @param pagesize
- * @param isModel
- * @returns {*}
- */
-function entSearch(searchStr, entClsIDs, pagenum, pagesize, isModel, isIcon, searchType) {
-    return ajax({
-        method: 'get',
-        url: '/ent/entquery',
-        data: {
-            searchStr: (searchType === 'name' || searchType == null) ? searchStr : null,
-            entClsIDs,
-            pagenum,
-            pagesize,
-            isModel,
-            isIcon,
-            unionID: searchType === 'id' ? searchStr : null
-        }
-    })
-}
-
-/**
- * 根据关系查询
- * @param searchStr
- * @param entClsIDs
- * @param pagenum
- * @param pagesize
- * @returns {*}
- */
-function relSearch(searchStr, entClsIDs, pagenum, pagesize) {
-    return ajax({
-        method: 'get',
-        url: '/rel/relquery',
-        data: {
-            searchStr: searchStr,
-            entClsIDs: entClsIDs,
-            pagenum: pagenum,
-            pagesize: pagesize
-        }
-    })
-}
-
-/**
- * k跳查询
- * @param entID
- * @param maxHops
- * @param pagenum
- * @param pagesize
- * @returns {*}
- */
-function kHopSearch(entID, maxHops, pagenum, pagesize) {
-    return ajax({
-        method: 'get',
-        url: '/ent/khopquery',
-        data: {
-            entID: entID,
-            maxHops: maxHops,
-            pagenum: pagenum,
-            pagesize: pagesize
-        }
-    })
-}
-
-/**
- * 标签查询
- * @param tagName
- * @returns {*}
- */
-
-function getTag(tagName) {
-    return ajax({
-        method: 'get',
-        url: '/tag/searchtagname',
-        data: {
-            tagName: tagName
-        }
-    })
-}
-
-
-/**
- * 测试目标查询
- * @param entName
- * @returns {*}
- */
-
-function testTargetQuery(entName) {
-    return ajax({
-        method: 'get',
-        url: '/activity/target/search/name',
-        data: {
-            entName: entName
-        }
-    })
-}
-
-/**
- * 测试活动查询
- * @param targetEntId
- * @param entName
- * @returns {*}
- */
-
-function testActivityQuery(targetEntId, entName) {
-    return ajax({
-        method: 'get',
-        url: '/activity/search/name',
-        data: {
-            entName: entName,
-            targetEntId: targetEntId
-        }
-    })
-}
-
-/**
- * 测试活动表格
- * @param targetEntId
- * @param entName
- * @returns {*}
- */
-function activityform(activityEntId) {
-    return ajax({
-        method: 'get',
-        url: '/activity/ent',
-        data: {
-            activityEntId
-        }
-    })
-}
-
-
-/**
- * 测试活动表格
- * @param targetEntId
- * @param Name
- * @returns {*}
- */
-function activityChildren(activityEntId) {
-    return ajax({
-        method: 'get',
-        url: '/activity/ent/child',
-        data: {
-            activityEntId
-        }
-    })
-}
-
-
-/**
- * 测试主体
- * @param targetEntId
- * @returns {*}
- */
-function subjectInterface(targetEntId) {
-    return ajax({
-        method: 'get',
-        url: '/activity/main',
-        data: {
-            targetEntId
-        }
-    })
-}
-
-/**
- * 标签查询列表
- * @param labels
- * @param pagenum
- * @param pagesize
- * @param tagIDs
- * @returns {*}
- */
-
-function getTagentList(labels, pagenum, pagesize, tagIDs) {
-    return ajax({
-        method: 'get',
-        url: '/tag/tagentlist',
-        data: {
-            labels: labels,
-            pagenum: pagenum,
-            pagesize: pagesize,
-            tagIDs: tagIDs
-        }
-    })
-}
-
-
-/**
- * 初始化后台方案生成接口
- * @returns {*}
- */
-function initTestTarget() {
-    return ajax({
-        method: 'get',
-        url: '/activity/init/cls/id'
-    })
-}
-
-/**
- * 下载方案生成json接口
- * @returns {*}
- */
-function downloadTargetJson(id) {
-    return ajax({
-        method: 'get',
-        path: {
-            id: id
-        },
-        url: '/activity/json/download/{id}'
-    })
-}
-
-
-/**
- * 上传方案接口
- * @returns {*}
- */
- function uploadButton(file) {
-    return ajax({
-        method: 'post',
-        path: {
-            file: file
-        },
-        url: '/activity/file/import'
-    })
-}
-
-export {
-    entSearch,
-    relSearch,
-    kHopSearch,
-    getTag,
-    getTagentList,
-    testTargetQuery,
-    testActivityQuery,
-    activityform,
-    activityChildren,
-    subjectInterface,
-    initTestTarget,
-    downloadTargetJson,
-    uploadButton
-}

+ 0 - 99
src/api/temporary/tag new.js

@@ -1,99 +0,0 @@
-import request from '@/utils/request'
-
-/**
- * 获得指定节点(实体,实体类)的tags列表
- * @param vertexId
- * @id:id
- */
-//旧的getTagList函数
-/* function getTagList(vertexId, isModel) {
-  return ajax({
-    method: 'get',
-    url: '/tag/{vertexId}/taglist',
-    path: {
-      vertexId
-    },
-    data: {
-      isModel
-    }
-  })
-} */
-//新的getTagList函数
-function getTagList(vertexId, isModel) {
-	return request({
-		method: 'get',
-		url: `/tag/${vertexId}/taglist`,
-		params: {
-			vertexId,
-			isModel
-		}
-	})
-}
-
-/**
- * 添加tag
- * @param vertexId
- * @param tagName
- * @id:id
- */
-//旧的addTag函数
-/* function addTag(vertexId, tagName, isModel) {
-  return ajax({
-    method: 'post',
-    url: '/tag/add',
-    data: {
-      vertexId,
-      tagName,
-      isModel
-    }
-  })
-} */
-//新的addTag函数
-function addTag(vertexId, tagName, isModel) {
-	return request({
-		method: 'post',
-		url: `/tag/add`,
-		data: {
-			vertexId,
-			tagName,
-			isModel
-		}
-	})
-}
-
-/**
- * 删除tag
- * @param vertexId
- * @param tagName
- * @id:id
- */
-//旧的deleteTag函数
-/* function deleteTag(vertexId, tagName, isModel) {
-  return ajax({
-    method: 'post',
-    url: '/tag/del',
-    data: {
-      vertexId,
-      tagName,
-      isModel
-    }
-  })
-} */
-//新的deleteTag函数
-function deleteTag(vertexId, tagName, isModel) {
-	return request({
-		method: 'post',
-		url: `/tag/del`,
-		data: {
-			vertexId,
-			tagName,
-			isModel
-		}
-	})
-}
-
-export {
-	getTagList,
-	addTag,
-	deleteTag
-}

+ 0 - 64
src/api/temporary/tag.js

@@ -1,64 +0,0 @@
-import ajax from '../util'
-
-/**
- * 获得指定节点(实体,实体类)的tags列表
- * @param vertexId
- * @id:id
- */
-
-function getTagList(vertexId, isModel) {
-  return ajax({
-    method: 'get',
-    url: '/tag/{vertexId}/taglist',
-    path: {
-      vertexId
-    },
-    data: {
-      isModel
-    }
-  })
-}
-
-/**
- * 添加tag
- * @param vertexId
- * @param tagName
- * @id:id
- */
-
-function addTag(vertexId, tagName, isModel) {
-  return ajax({
-    method: 'post',
-    url: '/tag/add',
-    data: {
-      vertexId,
-      tagName,
-      isModel
-    }
-  })
-}
-
-/**
- * 删除tag
- * @param vertexId
- * @param tagName
- * @id:id
- */
-
-function deleteTag(vertexId, tagName, isModel) {
-  return ajax({
-    method: 'post',
-    url: '/tag/del',
-    data: {
-      vertexId,
-      tagName,
-      isModel
-    }
-  })
-}
-
-export {
-  getTagList,
-  addTag,
-  deleteTag
-}

+ 413 - 0
src/assets/knowledge/config/config.js

@@ -0,0 +1,413 @@
+window.global = {
+	env: 'dev',
+	baseUrl: function() {
+		return {
+			dev: 'http://localhost/dev-api',
+			test: 'http://10.10.12.85:2004/graph',
+			local: 'http://localhost:2004',
+			prod: 'http://unigraph.xian.algmarket.com',
+			// prod: 'http://kg.yaoyuan.in:81/graph'
+		}[window.global.env || 'mock']
+	},
+	mockUrl: function() {
+		return 'http://10.10.12.39:7300/mock/5d8addd4ea80090020e12ead/kg2'
+	},
+	logOutUrl: function() {
+		return this.baseUrl() + '/logout'
+	},
+	// 资源评估地址
+	sysmgtUrl: 'http://10.10.12.51:2006',
+	wisdomAtlasUrl: 'http://10.10.12.68:2443/neural',
+	koUrl: 'http://10.10.12.68:2310/ko',
+	const: {
+		isEntChart: true, //实体可视化图谱
+		version: 'base', // 版本控制,目前版本共有:['base', 'bf'] base:第一版,bf:北方版,后续再加
+		isTemplateVersion: true, // 带实体模板的版本,以后可能有多个版本,如果继续加版本就继续加变量控制版本,例如isEntityVersion: true
+		authorityControl: true, // 用户权限控制是否开启
+		jqx_zhCn: function() {
+			var localizationobj = {}
+			localizationobj.pagerGoToPageString = '跳转:'
+			localizationobj.pagerShowRowsString = '显示条数:'
+			localizationobj.pagerRangeString = ' / '
+			localizationobj.pagerNextButtonString = '下一页'
+			localizationobj.pagerFirstButtonString = '首页'
+			localizationobj.pagerLastButtonString = '末页'
+			localizationobj.pagerPreviousButtonString = '上一页'
+			localizationobj.sortAscendingString = '升序排序'
+			localizationobj.sortDescendingString = '降序排序'
+			localizationobj.sortRemoveString = '删除排序'
+			localizationobj.emptydatastring = '无数据'
+			localizationobj.firstDay = 1
+			localizationobj.percentSymbol = '%'
+			localizationobj.currencySymbol = '¥'
+			localizationobj.currencySymbolPosition = 'after'
+			localizationobj.decimalSeparator = '.'
+			localizationobj.thousandsSeparator = ','
+			var days = {
+				// full day names
+				names: [
+					'星期日',
+					'星期一',
+					'星期二',
+					'星期三',
+					'星期四',
+					'星期五',
+					'星期六',
+				],
+				// abbreviated day names
+				namesAbbr: [
+					'周日',
+					'周一',
+					'周二',
+					'周三',
+					'周四',
+					'周五',
+					'周六',
+				],
+				// shortest day names
+				namesShort: ['日', '一', '二', '三', '四', '五', '六'],
+			}
+			localizationobj.days = days
+			var months = {
+				// full month names (13 months for lunar calendards -- 13th month should be "" if not lunar)
+				names: [
+					'一月',
+					'二月',
+					'三月',
+					'四月',
+					'五月',
+					'六月',
+					'七月',
+					'八月',
+					'九月',
+					'十月',
+					'十一月',
+					'十二月',
+					'',
+				],
+				// abbreviated month names
+				namesAbbr: [
+					'一',
+					'二',
+					'三',
+					'四',
+					'五',
+					'六',
+					'七',
+					'八',
+					'九',
+					'十',
+					'十一',
+					'十二',
+					'',
+				],
+			}
+			var patterns = {
+				d: 'dd.MM.yyyy',
+				D: 'dddd, d. MMMM yyyy',
+				t: 'HH:mm',
+				T: 'HH:mm:ss',
+				f: 'dddd, d. MMMM yyyy HH:mm',
+				F: 'dddd, d. MMMM yyyy HH:mm:ss',
+				M: 'dd MMMM',
+				Y: 'MMMM yyyy',
+			}
+			localizationobj.patterns = patterns
+			localizationobj.months = months
+			return localizationobj
+		},
+		menuList: [
+			{
+				code: 'home',
+				icon: 'home',
+				name: '首页',
+				link: '/',
+				children: [],
+			},
+			{
+				code: 'entcls',
+				icon: 'book',
+				name: '实体类',
+				link: '/mng/class',
+				children: [],
+			},
+			// {
+			//   code: 'lib',
+			//   icon: 'database',
+			//   name: USER_ROLE_LANGUAGE[USER_ROLE].ENT,
+			//   link: '/mng/class/unknow/entity',
+			//   children: []
+			// },
+			// 北方的新样式
+			{
+				code: 'ent',
+				icon: 'database',
+				name: '实体',
+				link: '/mng/class/unknow/entity_v2',
+				children: [],
+			},
+			{
+				code: 'sub_graph',
+				icon: 'api',
+				name: '子图管理',
+				link: '/',
+				children: [
+					{
+						code: 'dataSourceManageV3',
+						name: '子图导入',
+						link: '/dataSourceManageV3',
+					},
+					{
+						code: 'subgraph_export',
+						name: '子图导出',
+						link: '/subGraph/export',
+					},
+				],
+			},
+			{
+				code: 'graph_visual',
+				icon: 'dot-chart',
+				name: '图谱可视化',
+				link: '/',
+				children: [
+					{
+						code: 'entcls_visual',
+						name: '实体类可视化',
+						link: '/sta/entity_class_view',
+					},
+                    // {
+					// 	code: 'ent_visual_v1',
+					// 	name:
+					// 		window.USER_ROLE_LANGUAGE[window.USER_ROLE]
+					// 			.ENT_VIEW,
+					// 	link: '/sta_v1',
+					// },
+					{
+						code: 'ent_visual',
+						name: '实体可视化',
+						link: '/sta',
+					},
+                    {
+						code: 'ent_contrast',
+						name: '实体对比',
+						link: '/sta/contrast',
+					},
+				],
+			},
+			{
+				code: 'analyse',
+				icon: 'deployment-unit',
+				name: '分析',
+				link: '/',
+				children: [
+					{
+						code: 'path_calculation',
+						icon: 'branches',
+						name: '路径计算',
+						link: '/sta/road_computed',
+						children: [],
+					},
+					{
+						code: 'graph_sta_cal',
+						icon: 'bar-chart',
+						name: '图谱数据统计',
+						link: '/sta/data/entcls',
+						children: [],
+					},
+					{
+						code: 'relevance_analyse',
+						icon: 'deployment-unit',
+						name: '关联分析',
+						link: '/sta/relevance_analyse',
+						children: [],
+					},
+					{
+						code: 'influence',
+						icon: 'deployment-unit',
+						name: '影响力分析',
+						link: '/sta/influence',
+						children: [],
+					},
+				],
+			},
+			{
+				code: 'data_product',
+				icon: 'pie-chart',
+				name: '数据产品',
+				link: '/',
+				children: [
+					{
+						code: 'system_build',
+						icon: 'branches',
+						name: '体系构建',
+						link: '/dataProduct/systemBuild',
+						children: [],
+					},
+					{
+						code: 'similarity_analysis',
+						icon: 'branches',
+						name: '相似度分析',
+						link: '/dataProduct/similarityAnalysis',
+						children: [],
+					},
+					{
+						code: 'core_entity_discovery',
+						icon: 'branches',
+						name: '核心实体发现',
+						link: '/dataProduct/coreEntity',
+						children: [],
+					},
+				],
+			},
+			{
+				code: 'matrix_gen',
+				icon: 'upload',
+				name: '邻接矩阵生成',
+				link: '/dataImport',
+				children: [],
+			},
+			{
+				code: 'search',
+				icon: 'search',
+				name: '查询',
+				link: '/sch',
+				children: [],
+			},
+			{
+				code: 'custom_manage',
+				icon: 'appstore',
+				name: '自定义',
+				link: '/',
+				children: [
+					{
+						code: 'custom_attrcls',
+						name: '自定义基础属性类',
+						link: '/custom/attr_class',
+					},
+					{
+						code: 'enum_manage',
+						name: '枚举类管理',
+						link: '/custom/enum',
+					},
+					{
+						code: 'custom_synonym',
+						name: '同义词',
+						link: '/custom/synonym',
+					},
+					{
+						code: 'custom_prefix',
+						name: '前缀管理',
+						link: '/custom/prefix',
+					},
+					{
+						code: 'custom_setting',
+						name: '设置',
+						link: '/custom/setting',
+					},
+				],
+			},
+			{
+				code: 'dataSourceManage',
+				icon: 'file-protect',
+				name: '数据源管理',
+				link: '/dataSourceManage',
+				children: [],
+			},
+			{
+				code: 'ruleAnalysis',
+				icon: 'file-protect',
+				name: '规则分析',
+				link: '/ruleAnalysis',
+				children: [],
+			},
+		],
+		dateFormat: 'YYYY-MM-DD',
+		attrClsType: {
+			TEXT: '文本类型',
+			LONG: '整数类型',
+			DOUBLE: '浮点类型',
+			BOOLEAN: '布尔类型',
+			DATE: '日期类型',
+		},
+		booleanText: {
+			true: '真',
+			false: '假',
+		},
+		formItemLayout: {
+			labelCol: {
+				xs: { span: 24 },
+				sm: { span: 6 },
+			},
+			wrapperCol: {
+				xs: { span: 24 },
+				sm: { span: 16 },
+			},
+		},
+		entityColors: [
+			'rgba(111,82,184,1)',
+			'rgba(255,214,24,1)',
+			'rgba(47,195,47,1)',
+			'rgba(86,185,247,1)',
+			'rgba(234,180,4,1)',
+			'rgba(222,103,44,1)',
+			'#FEDD00',
+			'#00843D',
+			'#009A44',
+			'#4A7729',
+			'#78BE20',
+			'#007A33',
+			'#BFB800',
+			'#64A70B',
+			'#006341',
+			'#FDDA24',
+			'#009639',
+			'#43B02A',
+			'#00205B',
+			'#00629B',
+			'#64CCC9',
+			'#0093B2',
+			'#004F71',
+			'#006BA6',
+			'#003DA5',
+			'#003B5C',
+			'#008578',
+			'#0033A0',
+			'#002855',
+			'#003087',
+			'#00778B',
+			'#0082BA',
+			'#00A9CE',
+			'#002D72',
+			'#001871',
+			'#672146',
+			'#AD1AAC',
+			'#A9431E',
+			'#D57800',
+			'#643335',
+			'#FFCD00',
+			'#3E2B2E',
+			'#BE6A14',
+			'#A50034',
+			'#F9423A',
+			'#C8102E',
+			'#E4002B',
+			'#C5003E',
+			'#EF3340',
+			'#CB333B',
+			'#FC4C02',
+			'#FE5000',
+			'#FF671F',
+			'#2C2A29',
+			'#FFA300',
+			'#FBD872',
+			'#333F48',
+			'#C99700',
+			'#ABCAE9',
+			'#F4364C',
+			'#7A7D81',
+			'#C5299B',
+			'#DB3EB1',
+			'#B9975B',
+		],
+	},
+}

BIN
src/assets/knowledge/kong-01.png


+ 116 - 0
src/assets/knowledge/logo-base.svg

@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 23.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 195 40" style="enable-background:new 0 0 195 40;" xml:space="preserve">
+<style type="text/css">
+	.st0{fill:#025792;}
+	.st1{fill:#1785BD;}
+	.st2{fill:#343434;}
+</style>
+<path class="st0" d="M31.4,32l1.8-3l0,0l1.8-3l1.8-3l0,0c1.1-1.9,1.1-4.2,0-6.1l0,0l-1.8-3l-1.8-3l-1.8-3l0,0l-1.5-2.8
+	c-0.2-0.3-0.5-0.5-0.9-0.5h-8.1c-0.6,0-1,0.5-1,1c0,0.2,0.1,0.4,0.1,0.5l0.9,1.5c0.4,0.9,0.9,1.8,1.5,2.5c0.1,0.1,0.3,0.3,0.5,0.4
+	c0.1,0.1,0.2,0.1,0.4,0.1c0.4,0.1,0.8,0.1,1.2,0c0.6,0,1-0.4,1-1c0-0.2,0-0.4-0.1-0.5l0,0c-0.4-0.1-0.7-0.5-0.6-0.9
+	c0.1-0.4,0.4-0.6,0.8-0.6h1.9c0.4,0,0.7,0.2,0.9,0.5l1.5,2.5l1.8,3l1.8,3l0,0c1.1,1.9,1.1,4.2,0,6.1l0,0l-1.8,3l0,0l-1.8,3l0,0
+	l-0.9,1.5c-0.3,0.5-0.9,0.7-1.4,0.4c-0.2-0.1-0.3-0.2-0.4-0.4l-0.6-1c-0.2-0.3-0.2-0.7,0-1l1.5-2.5l1.8-3l1.5-2.5
+	c0.2-0.3,0.2-0.7,0-1l-1.5-2.5l-1.5-2.5c-0.2-0.3-0.5-0.5-0.9-0.5l0,0c-1.8,0-3.5,1-4.4,2.5l-0.3,0.5l-1.8,3l0,0l-1.8,3l0,0
+	c2.2,0,4.2-1.1,5.3-3l0,0l0.9-1.5c0.3-0.5,0.9-0.7,1.4-0.4c0.2,0.1,0.3,0.2,0.4,0.4l0.6,1c0.2,0.3,0.2,0.7,0,1l-1.5,2.5l-1.8,3
+	l-1.5,2.7c-0.2,0.3-0.2,0.7,0,1l1.5,2.6l1.5,2.5c0.2,0.3,0.5,0.5,0.9,0.5H29c0.4,0,0.7-0.2,0.9-0.5L31.4,32z"/>
+<path class="st1" d="M43,16.8L43,16.8l-1.8-3l-1.8-3l-1.8-3l0,0l-1.4-2.7c-0.2-0.3-0.5-0.5-0.9-0.5h-6.3c0.4,0,0.7,0.2,0.9,0.5
+	l1.5,2.5l0,0l0,0.1c0.1-0.1,0.2-0.1,0.3-0.1h1.9c0.4,0,0.7,0.2,0.9,0.5l1.5,2.5l1.8,3l1.8,3l0,0c1.1,1.9,1.1,4.2,0,6.1l0,0l-1.8,3
+	l0,0l-1.8,3l0,0l-0.9,1.5c-0.3,0.5-0.9,0.7-1.4,0.4c-0.2-0.1-0.3-0.2-0.4-0.4l-0.5-0.9L31.4,32l-0.3,0.6l1.1,1.9
+	c0.2,0.3,0.5,0.5,0.9,0.5h2.3c0.4,0,0.7-0.2,0.9-0.5l1.5-2.5l1.8-3l0,0l1.8-3l1.8-3l0,0C44.2,21.1,44.2,18.7,43,16.8z"/>
+<path class="st1" d="M15.6,35h5.3c0.6,0,1-0.4,1-1c0-0.2,0-0.4-0.1-0.5L20.9,32l0,0l-1.5-2.5c-0.2-0.3-0.5-0.5-0.9-0.5h-1.2
+	c-0.6,0-1,0.4-1,1c0,0.2,0,0.4,0.1,0.5l0,0c0.3,0.5,0.1,1.1-0.3,1.4C16,32,15.8,32,15.6,32h-1.2c-0.4,0-0.7-0.2-0.9-0.5L12.1,29
+	l-1.8-3l-1.8-3l0,0c-1.1-1.9-1.1-4.2,0-6.1l0,0l1.8-3l1.8-3l0,0L13,9.2c0.3-0.5,0.9-0.7,1.4-0.4c0.2,0.1,0.3,0.2,0.4,0.4l0.6,1
+	c0.2,0.3,0.2,0.7,0,1l-1.5,2.5l-1.8,3l0,0l-1.5,2.5c-0.2,0.3-0.2,0.7,0,1l1.5,2.5l1.5,2.5c0.2,0.3,0.5,0.5,0.9,0.5l0,0
+	c1.8,0,3.5-1,4.4-2.5l0.3-0.5l1.8-3l0,0l1.8-3h-0.4c-2,0-3.8,1-4.7,2.7l-0.2,0.3l-0.9,1.5c-0.3,0.5-0.9,0.7-1.4,0.4
+	c-0.2-0.1-0.3-0.2-0.4-0.4l-0.6-1c-0.2-0.3-0.2-0.7,0-1l1.5-2.5l1.7-3l1.5-2.5c0.2-0.3,0.2-0.7,0-1l-1.5-2.6l0,0l-1.5-2.5
+	c-0.2-0.3-0.5-0.5-0.9-0.5h-2.3c-0.4,0-0.7,0.2-0.9,0.5l-1.5,2.5l0,0l-1.8,3l-1.8,3l-1.8,3l0,0c-1.1,1.9-1.1,4.2,0,6.1l0,0l1.8,3
+	l1.8,3l0,0l1.8,3l1.5,2.5c0.2,0.3,0.5,0.5,0.9,0.5L15.6,35z"/>
+<g>
+	<g>
+		<path class="st2" d="M59.1,15.9h2c0.1-0.8,0.1-1.8,0.1-3h-1c-0.4,0.7-0.9,1.5-1.5,2.4c-0.6-0.3-1.1-0.6-1.7-0.7
+			c1.7-1.5,2.8-3.3,3.1-5.6l1.4,0.5C61.9,9.6,62,9.7,62,9.8c0,0.1-0.1,0.2-0.5,0.4c-0.1,0-0.2,0.2-0.3,0.4l-0.5,1.2h2.3
+			c0.4,0,0.9,0,1.4-0.1V13c-0.6-0.1-1.1-0.1-1.4-0.1h-0.5c0,1,0,2-0.1,3h1.1c0.4,0,0.9-0.1,1.5-0.1v1.4c-0.6-0.1-1.1-0.1-1.5-0.1
+			h-1.2c0,0.2,0,0.4-0.1,0.6c1,1,1.9,1.9,2.8,2.9c-0.5,0.2-0.9,0.6-1.2,1.1c-0.6-1-1.2-1.9-2-2.7c-0.7,1.6-1.8,3.1-3.4,4.4
+			c-0.4-0.4-0.9-0.8-1.6-1.1c2.1-1,3.4-2.7,4.1-5.2h-1.9c-0.4,0-0.9,0-1.6,0.1v-1.4C58.2,15.9,58.8,15.9,59.1,15.9z M66.7,22.6h-1.6
+			c0.1-0.7,0.1-1.3,0.1-1.7v-7.7c0-0.5,0-1.1-0.1-1.7c0.6,0.1,1.2,0.2,1.7,0.2h1.9c0.5,0,1.1-0.1,1.7-0.2c-0.1,0.5-0.1,1.1-0.1,1.7
+			v7.3c0,0.4,0,1,0.1,1.8h-1.6c0.1-0.3,0.1-0.6,0.1-0.7c0-0.1,0-0.3,0-0.5h-2.3v0.2C66.6,21.6,66.6,22.1,66.7,22.6z M66.6,12.8v7.1
+			h2.3v-7.1H66.6z"/>
+		<path class="st2" d="M75.7,15.1l-0.1,4.5c0.5-0.5,1-1.2,1.6-2c0.1,0.8,0.3,1.3,0.5,1.6c-1.4,1.6-2.3,2.6-2.8,3.3
+			c-0.4-0.6-0.8-1-1.2-1.3c0.3-0.2,0.5-0.6,0.5-1l0.1-5h-0.9c-0.2,0-0.7,0-1.4,0.1v-1.4c0.6,0.1,1,0.1,1.4,0.1h0.7
+			c0.3,0,0.9,0,1.6-0.1C75.8,14.7,75.7,15.1,75.7,15.1z M73.2,10.6l0.8-1c1,0.7,1.9,1.5,2.9,2.3L76,12.9
+			C74.9,11.9,74,11.1,73.2,10.6z M80.4,19.4c-0.9,1.4-2,2.6-3.1,3.7c-0.3-0.3-0.7-0.6-1.3-0.9c1.2-0.8,2.4-2.3,3.7-4.6l1.2,0.7
+			c0.3,0.2,0.4,0.3,0.4,0.3c0,0.1-0.2,0.2-0.5,0.3C80.8,18.9,80.6,19.1,80.4,19.4z M78.1,11.5c0-0.5-0.1-1-0.1-1.6
+			c0.3,0,0.7,0.1,1.2,0.1c0.2,0,0.4,0,0.5,0H83c0.1,0,0.4,0,0.9-0.1c0.3,0,0.6,0,0.8-0.1c-0.1,0.8-0.1,1.3-0.1,1.5v3.8
+			c0,0.1,0,0.4,0.1,1c0,0.2,0,0.3,0,0.4c-0.9-0.1-1.4-0.1-1.7-0.1h-3.2c-0.3,0-0.9,0-1.8,0.1c0.1-0.9,0.1-1.5,0.1-1.6V11.5z
+			 M79.5,11.2v4.3h3.8v-4.3H79.5z M86.2,21.8L85,22.7c-0.8-1.4-1.9-2.8-3.2-4.2l1-0.9C84.1,19,85.2,20.4,86.2,21.8z"/>
+		<path class="st2" d="M89.8,23.1h-1.6c0-0.5,0.1-1.3,0.1-2.2v-8.5c0-0.9-0.1-1.7-0.1-2.2c0.6,0,1.3,0.1,2.2,0.1H98
+			c0.9,0,1.6-0.1,2.2-0.1c0,0.5-0.1,1.2-0.1,2.1v8.3c0,1,0.1,1.8,0.1,2.3h-1.6c0.1-0.5,0.1-0.8,0.1-0.9h-8.9
+			C89.7,22.1,89.8,22.5,89.8,23.1z M93.1,15.2c-0.4-0.3-0.7-0.5-0.9-0.7l0.8-0.9c0.4,0.3,0.8,0.6,1.1,0.8c0.4-0.3,0.7-0.7,1-1h-2.2
+			c-0.4,0.6-1,1.2-1.7,1.7c-0.4-0.3-0.8-0.6-1.2-0.8c1.2-0.8,2-1.7,2.6-3h-2.9v5.2C91.1,16.3,92.3,15.8,93.1,15.2z M92.7,17.3
+			l0.3-0.6c-0.7,0.4-1.5,0.8-2.5,1.2c-0.3-0.4-0.5-0.7-0.9-0.9v3.9h5.9c-1.4-0.8-2.7-1.3-3.7-1.7l0.6-1.1c1.5,0.6,2.8,1.2,4.1,1.9
+			L96,20.8h2.7v-4.1c-0.3,0.3-0.6,0.7-0.7,1.1c-1.3-0.4-2.5-1-3.7-1.8c-0.3,0.2-0.5,0.3-0.7,0.4c0.9,0.4,1.8,0.8,2.6,1.2l-0.5,1.1
+			C94.8,18.3,93.8,17.8,92.7,17.3z M95.2,15.1c1.2,0.6,2.4,1,3.4,1.2v-4.9h-4.8l0.2,0.1c0.2,0.1,0.4,0.2,0.4,0.3S94.2,12,94,12.1
+			c0,0-0.1,0.1-0.3,0.3h2.2c0.5,0,1.1-0.1,1.8-0.1C96.9,13.3,96.1,14.3,95.2,15.1z"/>
+		<path class="st2" d="M105.5,14c-0.1,0.6-0.1,1-0.1,1.5l-0.1,4.7c0.4-0.4,0.9-0.9,1.3-1.4l0.6,1.4c-1,0.7-1.8,1.6-2.6,2.5l-1.1-1.3
+			c0.2-0.1,0.3-0.2,0.3-0.3c0.1-0.1,0.1-0.2,0.1-0.4c0-0.5,0-1.3,0.1-2.4c0-1.3,0.1-2.3,0.1-3h-0.9c-0.2,0-0.6,0-1.1,0.1V14
+			c0.3,0.1,0.6,0.1,0.7,0.1s0.3,0,0.4,0h1c0.2,0,0.6,0,1.1-0.1C105.4,14,105.5,14,105.5,14z M105,13.2c-0.6-0.8-1.4-1.6-2.2-2.4
+			l1-0.8c0.9,0.7,1.6,1.5,2.3,2.4L105,13.2z M107.2,15.2h1.1c-0.5-0.8-1-1.5-1.4-2.1l1-0.7h-0.1c-0.2,0-0.6,0-1.2,0.2v-1.4
+			c0.4,0.1,0.6,0.1,0.7,0.1c0.1,0,0.3,0,0.4,0h1.5c-0.3-0.4-0.8-0.9-1.3-1.4l0.9-0.9c0.6,0.6,1.3,1.3,1.9,2l-0.2,0.2h1.1
+			c0.6-0.8,1-1.6,1.4-2.4l1.1,0.6c0.2,0.1,0.3,0.2,0.3,0.3s-0.2,0.2-0.4,0.3h0c-0.1,0-0.2,0.2-0.4,0.3l-0.5,0.8v0l0,0.1h1.5
+			c0.1,0,0.4,0,0.9-0.1c0.1,0,0.2,0,0.2,0v1.4c-0.7-0.1-1.1-0.2-1.2-0.2h-0.3l0.9,0.6c0.3,0.2,0.4,0.3,0.4,0.4
+			c0,0.1-0.2,0.2-0.5,0.3c-0.1,0-0.2,0.2-0.2,0.3c-0.1,0.2-0.3,0.5-0.5,0.9c-0.1,0.2-0.2,0.3-0.2,0.4h0.8c0.2,0,0.6,0,1.2-0.2v1.4
+			c-0.6-0.1-1-0.1-1.2-0.1h-7.6c-0.1,0-0.4,0-0.8,0.1c-0.1,0-0.3,0-0.3,0.1V15c0.4,0.1,0.6,0.1,0.7,0.1
+			C106.9,15.2,107.1,15.2,107.2,15.2z M113.2,22.3h-4c0,0.1,0,0.3,0.1,0.6c0,0.1,0,0.2,0,0.3h-1.6c0.1-0.4,0.1-0.6,0.1-0.8
+			c0-0.2,0-0.4,0-0.6v-4c0-0.2,0-0.5-0.1-0.9c0-0.1,0-0.2,0-0.2c0.7,0.1,1.2,0.1,1.3,0.1h4.3c0.2,0,0.7,0,1.5-0.1
+			c-0.1,0.3-0.1,0.6-0.1,0.7c0,0.2,0,0.3,0,0.5v3.8c0,0.4,0,0.8,0.1,1.4h-1.6C113.2,22.7,113.2,22.4,113.2,22.3z M109.3,12.4h-1.5
+			c0.5,0.6,1,1.3,1.5,2.1V12.4z M108.5,15.2h0.9v-0.6L108.5,15.2z M109.2,18v1h4v-1H109.2z M109.2,20.2v1h4v-1H109.2z M111.5,12.4
+			h-0.8v2.8h0.8V12.4z M112.9,14.7c0.4-0.5,0.8-1.2,1.2-2.3h-1.2v2.8h1C113.5,15,113.2,14.8,112.9,14.7z"/>
+	</g>
+</g>
+<g>
+	<g>
+		<path class="st2" d="M61.3,31.9h-1.4l-1.5-2.2c0-0.1-0.1-0.1-0.1-0.3h0v2.5h-1.1v-5.1h1.1v2.4h0c0-0.1,0.1-0.2,0.1-0.3l1.5-2.1
+			h1.3l-1.8,2.4L61.3,31.9z"/>
+		<path class="st2" d="M65.1,31.9h-1.1v-2c0-0.6-0.2-0.9-0.6-0.9c-0.2,0-0.4,0.1-0.5,0.2c-0.1,0.2-0.2,0.4-0.2,0.6v2.1h-1.1v-3.7
+			h1.1v0.6h0c0.3-0.4,0.7-0.7,1.2-0.7c0.8,0,1.2,0.5,1.2,1.5V31.9z"/>
+		<path class="st2" d="M65.8,30.1c0-0.6,0.2-1.1,0.5-1.4c0.4-0.3,0.8-0.5,1.5-0.5c0.6,0,1.1,0.2,1.4,0.5c0.3,0.3,0.5,0.8,0.5,1.4
+			c0,0.6-0.2,1.1-0.5,1.4S68.4,32,67.8,32c-0.6,0-1.1-0.2-1.4-0.5C66,31.2,65.8,30.7,65.8,30.1z M66.9,30.1c0,0.7,0.3,1.1,0.9,1.1
+			c0.6,0,0.9-0.4,0.9-1.1c0-0.7-0.3-1.1-0.9-1.1c-0.3,0-0.5,0.1-0.7,0.3C67,29.5,66.9,29.7,66.9,30.1z"/>
+		<path class="st2" d="M75.7,28.3l-1.1,3.7h-1.1L73,29.7c0-0.1-0.1-0.3-0.1-0.5h0c0,0.2,0,0.3-0.1,0.4l-0.6,2.2h-1.1l-1-3.7h1.1
+			l0.5,2.4c0,0.1,0,0.2,0.1,0.4h0c0-0.2,0-0.3,0.1-0.4l0.7-2.4h1l0.6,2.4c0,0.1,0,0.2,0,0.4h0c0-0.1,0-0.3,0.1-0.4l0.5-2.4H75.7z"/>
+		<path class="st2" d="M76.2,31.9v-5.4h1.1v5.4H76.2z"/>
+		<path class="st2" d="M81.5,30.4h-2.4c0,0.6,0.4,0.8,1,0.8c0.4,0,0.8-0.1,1.1-0.3v0.8c-0.3,0.2-0.8,0.3-1.3,0.3
+			c-0.6,0-1-0.2-1.4-0.5S78,30.7,78,30.1c0-0.6,0.2-1.1,0.5-1.4c0.3-0.4,0.8-0.5,1.3-0.5c0.5,0,0.9,0.2,1.2,0.5
+			c0.3,0.3,0.4,0.7,0.4,1.3V30.4z M80.5,29.7c0-0.5-0.2-0.8-0.7-0.8c-0.2,0-0.3,0.1-0.5,0.2c-0.1,0.1-0.2,0.3-0.3,0.6H80.5z"/>
+		<path class="st2" d="M85.7,31.9h-1.1v-0.5h0C84.4,31.8,84,32,83.5,32c-0.5,0-0.8-0.2-1.1-0.5c-0.3-0.3-0.4-0.8-0.4-1.3
+			c0-0.6,0.2-1.1,0.5-1.4c0.3-0.4,0.7-0.6,1.2-0.6c0.5,0,0.8,0.2,1,0.5h0v-2.2h1.1V31.9z M84.7,29.8c0-0.2-0.1-0.5-0.2-0.6
+			S84.1,29,83.9,29c-0.3,0-0.5,0.1-0.6,0.3c-0.1,0.2-0.2,0.5-0.2,0.8c0,0.3,0.1,0.6,0.2,0.8s0.3,0.3,0.6,0.3c0.2,0,0.4-0.1,0.6-0.3
+			s0.2-0.4,0.2-0.7V29.8z"/>
+		<path class="st2" d="M90.2,31.5c0,0.7-0.2,1.2-0.6,1.6c-0.4,0.4-0.9,0.6-1.7,0.6c-0.5,0-0.9-0.1-1.2-0.2v-0.9
+			c0.4,0.2,0.8,0.3,1.1,0.3c0.4,0,0.7-0.1,0.9-0.3c0.2-0.2,0.3-0.5,0.3-0.8v-0.3h0C88.9,31.8,88.5,32,88,32c-0.5,0-0.8-0.2-1.1-0.5
+			s-0.4-0.8-0.4-1.3c0-0.6,0.2-1.1,0.5-1.5c0.3-0.4,0.7-0.6,1.2-0.6c0.4,0,0.8,0.2,1,0.5h0v-0.4h1.1V31.5z M89.2,29.9
+			c0-0.2-0.1-0.4-0.2-0.6c-0.1-0.2-0.3-0.3-0.6-0.3c-0.3,0-0.5,0.1-0.6,0.3c-0.2,0.2-0.2,0.5-0.2,0.9c0,0.3,0.1,0.6,0.2,0.8
+			s0.3,0.3,0.6,0.3c0.2,0,0.4-0.1,0.6-0.3s0.2-0.4,0.2-0.7V29.9z"/>
+		<path class="st2" d="M94.4,30.4H92c0,0.6,0.4,0.8,1,0.8c0.4,0,0.8-0.1,1.1-0.3v0.8c-0.3,0.2-0.8,0.3-1.3,0.3c-0.6,0-1-0.2-1.4-0.5
+			S91,30.7,91,30.1c0-0.6,0.2-1.1,0.5-1.4c0.3-0.4,0.8-0.5,1.3-0.5c0.5,0,0.9,0.2,1.2,0.5c0.3,0.3,0.4,0.7,0.4,1.3V30.4z M93.4,29.7
+			c0-0.5-0.2-0.8-0.7-0.8c-0.2,0-0.3,0.1-0.5,0.2c-0.1,0.1-0.2,0.3-0.3,0.6H93.4z"/>
+		<path class="st2" d="M101.4,31.6c-0.5,0.3-1.1,0.4-1.8,0.4c-0.8,0-1.5-0.2-1.9-0.7c-0.5-0.5-0.7-1.1-0.7-1.9c0-0.8,0.3-1.5,0.8-2
+			c0.5-0.5,1.2-0.8,2-0.8c0.5,0,1,0.1,1.4,0.2v1c-0.4-0.2-0.9-0.3-1.5-0.3c-0.5,0-0.9,0.2-1.2,0.5c-0.3,0.3-0.5,0.7-0.5,1.3
+			c0,0.5,0.1,1,0.4,1.3s0.7,0.4,1.1,0.4c0.3,0,0.5,0,0.7-0.1v-1.1h-1V29h2.1V31.6z"/>
+		<path class="st2" d="M104.7,29.2c-0.1-0.1-0.3-0.1-0.5-0.1c-0.2,0-0.4,0.1-0.6,0.3c-0.1,0.2-0.2,0.4-0.2,0.8v1.8h-1.1v-3.7h1.1
+			v0.7h0c0.2-0.5,0.5-0.8,1-0.8c0.1,0,0.2,0,0.3,0V29.2z"/>
+		<path class="st2" d="M105.3,28.5c0.2-0.1,0.4-0.2,0.7-0.2c0.3-0.1,0.5-0.1,0.7-0.1c1,0,1.5,0.5,1.5,1.5v2.2h-1v-0.5h0
+			c-0.2,0.4-0.6,0.6-1.1,0.6c-0.3,0-0.6-0.1-0.8-0.3c-0.2-0.2-0.3-0.5-0.3-0.8c0-0.7,0.4-1.1,1.3-1.2l1-0.1c0-0.4-0.2-0.6-0.7-0.6
+			c-0.4,0-0.8,0.1-1.2,0.4V28.5z M106.5,30.3c-0.4,0.1-0.6,0.2-0.6,0.5c0,0.1,0,0.2,0.1,0.3s0.2,0.1,0.4,0.1c0.2,0,0.4-0.1,0.5-0.2
+			c0.1-0.2,0.2-0.3,0.2-0.6v-0.3L106.5,30.3z"/>
+		<path class="st2" d="M110.2,31.5v2.1h-1.1v-5.3h1.1v0.6h0c0.3-0.4,0.7-0.6,1.2-0.6c0.5,0,0.8,0.2,1.1,0.5c0.3,0.3,0.4,0.8,0.4,1.3
+			c0,0.6-0.2,1.1-0.5,1.5c-0.3,0.4-0.7,0.6-1.2,0.6C110.8,32,110.4,31.8,110.2,31.5L110.2,31.5z M110.2,30.3c0,0.3,0.1,0.5,0.2,0.6
+			c0.1,0.2,0.3,0.2,0.5,0.2c0.3,0,0.5-0.1,0.6-0.3c0.1-0.2,0.2-0.5,0.2-0.9c0-0.7-0.3-1-0.8-1c-0.2,0-0.4,0.1-0.6,0.3
+			c-0.2,0.2-0.2,0.4-0.2,0.7V30.3z"/>
+		<path class="st2" d="M117.1,31.9H116v-2.1c0-0.6-0.2-0.8-0.6-0.8c-0.2,0-0.4,0.1-0.5,0.2c-0.1,0.2-0.2,0.4-0.2,0.6v2.1h-1.1v-5.4
+			h1.1v2.3h0c0.3-0.4,0.7-0.6,1.1-0.6c0.8,0,1.2,0.5,1.2,1.5V31.9z"/>
+	</g>
+</g>
+</svg>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
src/assets/kong-01.png


+ 14 - 2
src/main.js

@@ -46,10 +46,10 @@ import DictData from '@/components/DictData'
 import eventBus from "./plugins/knowledge/eventBus";
 import modalManager from "./plugins/knowledge/modalManager";
 import formValidateFields from "./plugins/knowledge/formValidateFields";
-import modalList from "@/views/knowledge/index";
+import modalList from "@/views/knowledge/modal/index";
 import contentmenu from "v-contextmenu";
 import "v-contextmenu/dist/index.css";
-import '../public/config'
+import '@/assets/knowledge/config/config'
 Vue.prototype.$const = window.global.const;
 // knowledge 知识图谱新增 end
 
@@ -114,6 +114,18 @@ Vue.prototype.$checkSpecialChar = function (value) {
 }
 const menuList = window.global.const.menuList
 Vue.prototype.menus = menuList
+
+//超过10个字符显示省略号
+Vue.filter("ellipsis", function (value, num) {
+  if (typeof num === "undefined") num = 10;
+  if (!value) return "";
+  value = value.toString();
+  if (value.length > num) {
+    return value.substr(0, num) + "...";
+  } else {
+    return value;
+  }
+});
 // knowledge add end
 
 

+ 153 - 143
src/router/knowledge/index.js

@@ -1,3 +1,4 @@
+import Knowledge from '@/views/knowledge/index.vue' //管理器(实体类/实体)框架页面
 import ManagerPage from '@/views/knowledge/graphEntity/manager.vue' //管理器(实体类/实体)框架页面
 
 //实体管理器
@@ -20,182 +21,191 @@ import ECM_RelationAttrEditor from '@/views/knowledge/graphClass/relationAttrEdi
 import BlankPage from '@/views/knowledge/common/blank.vue' // 空白页面
 
 export default [
-  /**
-   * manager
-   */
- 
   {
-    path: '/mng',
+    path: '/knowledge',
     name: 'manager',
-    component: ManagerPage,
+    component: Knowledge,
+    meta: { title: '知识图谱', icon: 'dashboard', activeMenu: '' },
     children: [
       /**
-       * manager -> entityClass
+       * manager
        */
       {
-        name: 'ECM_home',
-        path: 'class',
-        meta: {
-          msg: '请选中实体类'
-        },
-        components: {
-          main: BlankPage,
-        }
-      },
-      /**
-       * manager -> entityClass -> :id
-       */
-      {
-        name: 'ECM_item',
-        path: 'class/:classId',
-        components: {
-          main: EntityClassManagerPage
-        },
+        path: '/mng',
+        name: 'manager',
+        component: ManagerPage,
+        hidden: true,
         children: [
+          /**
+           * manager -> entityClass
+           */
           {
-            path: '',
-            name: 'base',
-            component: ECM_AttrEditor,
+            name: 'ECM_home',
+            path: 'class',
             meta: {
-              type: 'ELEM'
+              msg: '请选中实体类'
+            },
+            components: {
+              main: BlankPage,
             }
           },
+          /**
+           * manager -> entityClass -> :id
+           */
           {
-            path: 'relation',
-            component: ECM_RelationEditor,
+            name: 'ECM_item',
+            path: 'class/:classId',
+            components: {
+              main: EntityClassManagerPage
+            },
             children: [
               {
                 path: '',
-                name: 'relation',
+                name: 'base',
+                component: ECM_AttrEditor,
+                meta: {
+                  type: 'ELEM'
+                }
+              },
+              {
+                path: 'relation',
+                component: ECM_RelationEditor,
+                children: [
+                  {
+                    path: '',
+                    name: 'relation',
+                    component: BlankPage,
+                    meta: {
+                      msg: '请选中关系'
+                    }
+                  },
+                  {
+                    path: ':relationId',
+                    name: 'relation_edit',
+                    component: ECM_RelationAttrEditor
+                  }
+                ]
+              },
+              {
+                path: 'media',
+                name: 'media',
+                component: ECM_AttrEditor,
+                meta: {
+                  type: 'MIME',
+                  code: 'entcls'
+                }
+              },
+              {
+                path: 'tag',
+                name: 'tag',
                 component: BlankPage,
                 meta: {
-                  msg: '请选中关系'
+                  type:'entityClass'
+                  // type: '尚未开放'
+                }
+              },
+              {
+                path: 'notype',
+                name: 'notype',
+                component: ECM_AttrEditor,
+                meta: {
+                  type: 'NONE'
                 }
               },
               {
-                path: ':relationId',
-                name: 'relation_edit',
-                component: ECM_RelationAttrEditor
+                path: 'ability',
+                name: 'ability',
+                component: ECM_AttrEditor,
+                meta: {
+                  type: 'CIDX'
+                }
               }
             ]
           },
           {
-            path: 'media',
-            name: 'media',
-            component: BlankPage,
+            path: 'class/unknow/entity',
             meta: {
-              type: '尚未开放'
+              msg: '请选中关系类'
+            },
+            components: {
+              main: BlankPage,
+              // entityList: BlankPage,
             }
           },
-        //   {
-        //     path: 'tag',
-        //     name: 'tag',
-        //     component: EM_ECM_TagEditor,
-        //     meta: {
-        //       type:'entityClass'
-        //       // type: '尚未开放'
-        //     }
-        //   },
           {
-            path: 'notype',
-            name: 'notype',
-            component: ECM_AttrEditor,
+            path: 'class/:classId/entity',
+            name: 'class_entity',
             meta: {
-              type: 'NONE'
+              msg: '请选中实体'
+            },
+            components: {
+              main: EntityManagerPage,
+              entityList: EntityList,
             }
           },
+          /**
+           * manager -> entity -> :id
+           */
           {
-            path: 'ability',
-            name: 'ability',
-            component: ECM_AttrEditor,
-            meta: {
-              type: 'CIDX'
-            }
-          }
-        ]
-      },
-      {
-        path: 'class/unknow/entity',
-        meta: {
-          msg: '请选中关系类'
-        },
-        components: {
-          main: BlankPage,
-          // entityList: BlankPage,
-        }
-      },
-      {
-        path: 'class/:classId/entity',
-        name: 'class_entity',
-        meta: {
-          msg: '请选中实体'
-        },
-        components: {
-          main: EntityManagerPage,
-          entityList: EntityList,
-        }
+            path: 'class/:classId/entity/:entityId',
+            components: {
+              main: EntityManagerPage,
+              entityList: EntityList
+            },
+            children: [
+              {
+                path: '',
+                name: 'e_base',
+                component: EM_AttrEditor,
+                meta: {
+                  type: 'ELEM'
+                }
+              }, {
+                path: 'relation',
+                name: 'e_relation',
+                component: EM_RelationEditor,
+                meta: {}
+              }, {
+                path: 'notype',
+                name: 'e_notype',
+                component: EM_AttrEditor,
+                meta: {
+                  type: 'NONE'
+                }
+              },
+              {
+                path: 'media',
+                name: 'e_media',
+                component: EM_AttrEditor,
+                meta: {
+                  type: '尚未开放'
+                }
+              },
+            //   {
+            //     path: 'tag',
+            //     name: 'e_tag',
+            //     component: EM_ECM_TagEditor,
+            //     meta: {
+            //       type:'entity'
+            //       // type: '尚未开放'
+            //     }
+            //   },
+              {
+                path: 'ability',
+                name: 'e_ability',
+                component: EM_AttrEditor,
+                meta: {
+                  type: 'CIDX'
+                }
+              }]
+          }],
       },
-      /**
-       * manager -> entity -> :id
-       */
       {
-        path: 'class/:classId/entity/:entityId',
-        components: {
-          main: EntityManagerPage,
-          entityList: EntityList
-        },
-        children: [
-          {
-            path: '',
-            name: 'e_base',
-            component: EM_AttrEditor,
-            meta: {
-              type: 'ELEM'
-            }
-          }, {
-            path: 'relation',
-            name: 'e_relation',
-            component: EM_RelationEditor,
-            meta: {}
-          }, {
-            path: 'notype',
-            name: 'e_notype',
-            component: EM_AttrEditor,
-            meta: {
-              type: 'NONE'
-            }
-          },
-          {
-            path: 'media',
-            name: 'e_media',
-            component: BlankPage,
-            meta: {
-              type: '尚未开放'
-            }
-          },
-        //   {
-        //     path: 'tag',
-        //     name: 'e_tag',
-        //     component: EM_ECM_TagEditor,
-        //     meta: {
-        //       type:'entity'
-        //       // type: '尚未开放'
-        //     }
-        //   },
-          {
-            path: 'ability',
-            name: 'e_ability',
-            component: EM_AttrEditor,
-            meta: {
-              type: 'CIDX'
-            }
-          }]
-      }],
-  },
-  {
-      path: '/entityListnew',
-      name: 'entityListnew',
-      component: entityListnew
+          path: '/entityListnew',
+          name: 'entityListnew',
+          hidden: true,
+          component: entityListnew
+      }
+    ]
   }
-
 ]

+ 1 - 1
src/views/knowledge/common/blank.vue

@@ -2,7 +2,7 @@
     <div style="text-align:center">
         <h1><b>{{names}}</b></h1>
         <div class="h1_span"><b>{{introduce}}</b></div>
-        <div class="flex-center" :class="Entity_class_blank_base"></div>
+        <div class="flex-center Entity_class_blank_base"></div>
     </div>
 </template>
 

+ 1 - 1
src/views/knowledge/common/navibar.vue

@@ -59,7 +59,7 @@ var logoSrc = "";
 // var version = window.global.const.version;
 var version = "base"
 if (version === "base") {
-  logoSrc = require("../../../../public/logo-base.svg");
+  logoSrc = require("@/assets/knowledge/logo-base.svg");
 } else if (version === "bf") {
   logoSrc = require("../../../../public/logo-bf.svg");
 }

+ 2 - 1
src/views/knowledge/graphClass/attrEditor.vue

@@ -536,7 +536,8 @@ export default {
       var _vm = this;
       _vm.spinning=true;
       if (this.type === "NONE") {
-        getEntClsNoneList(_vm.id).then((result) => {
+        getEntClsNoneList(_vm.id).then((resp) => {
+          let result = resp.data
           _vm.spinning=false;
           const { attrClsVOList } = result;
           if (attrClsVOList) {

+ 4 - 3
src/views/knowledge/graphClass/entityClass.vue

@@ -20,7 +20,7 @@
                         <div v-if="entityClassTreeNode.entClsIcon">
                             <img :src="entityClassTreeNode.entClsIcon" alt=""/>
                         </div>
-                        <div v-else><img src="@/assets/kong-01.png" alt=""/></div>
+                        <div v-else><img :src="blankPicture" alt=""/></div>
                         <!-- ../../../assets/kong-01.png -->
                     </a-col>
                     <a-col :span="10">
@@ -169,7 +169,8 @@ import { getEntityClass, getFlowId } from "@/api/graph/entityClass"
         entClsIsRoot: "", // 实体类是否是顶层
         mustClsAttrType: ["GX", "BQ"],
         entClsAllowAttrTypeArr: [], // 实体类的属性类型
-        spinning: false
+        spinning: false,
+        blankPicture: require('@/assets/knowledge/kong-01.png')
       };
     },
     events: {
@@ -262,7 +263,7 @@ import { getEntityClass, getFlowId } from "@/api/graph/entityClass"
         this.$router.push({name: this.paneRouteMap[tab].routeName});
       },
       goSta() {
-        window.location.href = `#/sta/entity_class_view?clsId=${this.$route.params.classId}`;
+        window.location.href = `/sta/entity_class_view?clsId=${this.$route.params.classId}`;
       },
       gotoFlow() {
         const classId = this.$route.params.classId;

+ 2 - 2
src/views/knowledge/graphClass/relationAttrEditor.vue

@@ -111,9 +111,9 @@
       getRelationAttr () {
         var _vm = this
         _vm.spinning=true
-        getRelationAttr(_vm.id).then((result) => {
+        getRelationAttr(_vm.id).then((resp) => {
           _vm.spinning=false;
-          this.data = result || []
+          this.data = resp.data || []
         })
       },
       //操作打开实体类的模态框

+ 186 - 212
src/views/knowledge/graphClass/relationEditor.vue

@@ -1,229 +1,203 @@
 <template>
-    <div class="auto-overflow">
-        <a-row>
-            <a-col>
-                <a-button @click="createRelation">新建关系</a-button>
-            </a-col>
-        </a-row>
-        <a-row>
-            <a-col>
-                <div class="ant-tabs-nav-wrap">
-                    <div class="ant-tabs-nav-scroll">
-                        <div class="ant-tabs-nav ant-tabs-nav-animated">
-                            <div @click="handleTabChange">
-                                <div role="tab" accessKey="1"
-                                     class="ant-tabs-tab"
-                                     :class="{'ant-tabs-tab-active': accesskey === '1'}">
-                                    以此为起点
-                                </div>
-                                <div role="tab" accessKey="2"
-                                     class=" ant-tabs-tab"
-                                     :class="{'ant-tabs-tab-active':accesskey === '2'}">以此为终点
-                                </div>
-                            </div>
-                            <div class="ant-tabs-ink-bar ant-tabs-ink-bar-animated" id="move"
-                                 style="display: block; transform: translate3d(0px, 0px, 0px); width: 88px;"></div>
-                        </div>
-                    </div>
-                </div>
-            </a-col>
-        </a-row>
-        <a-row v-for="(relation, $index) in entityRelationList" :key="'relation_' + $index">
-            <a-col>
-                <a-row>
-                    <a-col>
-                            <span v-if="entType === 'START' ">
-                              {{relation.startEntName}}->{{relation.relName}} <template v-if="relation.endEnt"> -> {{relation.endEnt.entName}}</template>
-                            </span>
-                            <span v-else>
-                                <template v-if="relation.endEnt">{{relation.endEnt.entName}}-></template>{{relation.relName}} ->{{relation.startEntName}}
-                            </span>
-                        <a-popconfirm title="删除关系?" @confirm="deleteRelation(relation)" okText="Yes"
-                                      cancelText="No">
-                            <a-button style="float:right;margin-right:10px">删除关系
-                            </a-button>
-                        </a-popconfirm>
-                    </a-col>
-                </a-row>
-                <a-row>
-                    <a-col>
-                        <a-table size="small"
-                                 rowKey="attrClsID"
-                                 bordered
-                                 :dataSource="relation.relAttrVOList"
-                                 :columns="columns"
-                                 :pagination="false">
-                            <template slot="attrClsName" slot-scope="text, record">
-                                <span>{{text | ellipsis(10)}}</span>
-                                <a-tooltip placement="right" v-if="record.attrClsMemo"
-                                           style="float:right;margin-top:5px">
-                                    <template slot="title">
-                                        <span>{{record.attrClsMemo}}</span>
-                                    </template>
-                                    <a-icon type="info-circle"/>
-                                </a-tooltip>
+  <div class="flex-row">
+      <div class="flex1" style="padding-right:24px;min-width:340px; ">
+          <!--<h2>relationList</h2>-->
+          <div class="ant-tabs-nav-wrap">
+              <div class="ant-tabs-nav-scroll">
+                  <div class="ant-tabs-nav ant-tabs-nav-animated">
+                      <div @click="handleTabChange">
+                          <div role="tab" accessKey="1"
+                               class="ant-tabs-tab"
+                               :class="{'ant-tabs-tab-active': accesskey === '1'}">
+                              以此为起点
+                          </div>
+                          <div role="tab" accessKey="2"
+                               class=" ant-tabs-tab"
+                               :class="{'ant-tabs-tab-active':accesskey === '2'}">以此为终点
+                          </div>
+                      </div>
+                      <div class="ant-tabs-ink-bar ant-tabs-ink-bar-animated" id="move"
+                           style="display: block; transform: translate3d(0px, 0px, 0px); width: 88px;"></div>
+                  </div>
+              </div>
+          </div>
+          <a-button class="openAddRelationSty" @click="AddRelationClass">添加 </a-button>
+          <a-spin :spinning="spinning">
+          <a-list
+                  itemLayout="horizontal"
+                  :dataSource="relationListData"
+                  class="flex1"
+                  style="max-height: 515px; min-height: 300px; overflow: auto;"
+          >
+            <a-list-item slot="renderItem" slot-scope="item">
+                <a-list-item-meta @click="handleChangeEntityRouter(item.relClsID)" style="position: relative; padding-right: 70px;">
+                    <p slot="title" :class="$route.params.relationId===item.relClsID ? 'selected' : '' " style="display: flex;position: relative">
+                        <a-tooltip placement="topLeft" v-if="entClsType === 'START' ">
+                            <template slot="title">
+                                <span>{{item.startEntClsName}}->{{item.relClsName}} ->{{item.endEntCls&&item.endEntCls.entClsName}}</span>
                             </template>
-                            <template slot="attrValueVO" slot-scope="text, record">
-                                <editable-cell :record="record"
-                                               :text="record.attrValueVO?record.attrValueVO.attrValue:''"
-                                               @change="onCellChange(record,'attrValueVO', $event)"
-                                               :editable="record.edit"
-                                               @close="closeCell(record)"/>
+                            <a class="rela-box" >{{item.startEntClsName}}->{{item.relClsName}} ->{{item.endEntCls&&item.endEntCls.entClsName}}</a>
+                        </a-tooltip>
+                        <a-tooltip placement="topLeft" v-else>
+                            <template slot="title">
+                                <span>{{item.endEntCls&&item.endEntCls.entClsName}}->{{item.relClsName}} ->{{item.startEntClsName}}</span>
                             </template>
-                            <template slot="attrValueType" slot-scope="text">
-                                {{attrClsType[text]}}
-                            </template>
-                        </a-table>
-                    </a-col>
-                </a-row>
-            </a-col>
-        </a-row>
-    </div>
+                            <a class="rela-box">{{item.endEntCls&&item.endEntCls.entClsName}}->{{item.relClsName}} ->{{item.startEntClsName}}</a>
+                        </a-tooltip>
+                        <span class="eddit-box"
+                              @click.stop="handleDelRelationClass(item.relClsID)">
+                            <a-icon type="minus-circle"/></span>
+                        <span class="cancel-box" @click.stop="handleEditRelationClassName(item)">
+                            <a-icon type="edit"/></span>
+                    </p>
+                </a-list-item-meta>
+            </a-list-item>
+          </a-list>
+          </a-spin>
+      </div>
+      <router-view class="flex2" :key="key"/>
+  </div>
 </template>
 
+
 <script>
-  import EditableCell from '@/components/knowledge/editableCell'
-  import { updateRelationAttr, deleteEntityRelation } from "@/api/graph/relationEditor"
-  import { getRelationAttrById } from "@/api/graph/entityAttrEditor"
-  var odiv
-  export default {
-    name: 'relationEditor',
-    props: ['entName'],
-    components: {
-      EditableCell
+  import { deleteRelationClass, getAllRelationClassList } from "@/api/graph/relationClass"
+
+const relationListData = []
+var odiv
+export default {
+  name: 'relationEditor',
+  props: ['entClsName',],
+  data () {
+    return {
+      relationListData,
+      accesskey: '1',
+      entClsType: 'START', // 默认是实体类为起点
+      spinning: false,
+      backGroundColor:''
+    }
+  },
+  created () {
+    const id = this.$route.params.classId
+    this.refreshRelationClassList(id, this.entClsType)
+  },
+  computed: {
+    key: function () {
+      return this.$route.params ? this.$route.params.relationId : ''
+    }
+  },
+  methods: {
+    /**
+     * 删除关系类
+     * @param id
+     */
+    handleDelRelationClass (id) {
+      const vm = this
+      // this.$confirm({
+      //   title: '你确定要删除吗?',
+      //   onOk () {
+      //     deleteRelationClass(id).then((data) => {
+      //       if (data !== false) {
+      //         vm.$trigger('relationClass:nodeDestroyed', id)
+      //         vm.refreshRelationClassList(vm.$route.params.classId, vm.entClsType)// 刷新关系类列表
+      //         vm.$message.success('删除关系类删除成功')
+      //       }
+      //     })
+
+      //   },
+      //   onCancel () {
+      //     console.log('取消删除')
+      //   }
+      // })
+      this.$modal.confirm('你确定要删除吗?').then(function() {
+          return deleteRelationClass(id)
+        }).then((resp) => {
+            if (resp.data !== false) {
+              vm.$trigger('relationClass:nodeDestroyed', id)
+              vm.refreshRelationClassList(vm.$route.params.classId, vm.entClsType)// 刷新关系类列表
+              vm.$message.success('删除关系类删除成功')
+            }
+        }).catch(() => {});
     },
-    data () {
-      return {
-        // 此实体的关系列表,及其所有属性
-        entityRelationList: [],
-        attrClsType: this.$const.attrClsType,
-        entityId: null, // 实体id
-        entityClassId: '', // 实体类id
-        relId: null,
-        dataSource: [],
-        count: 2,
-        columns: [
-          {
-            title: '属性名称',
-            dataIndex: 'attrClsName',
-            scopedSlots: {customRender: 'attrClsName'}
-          }, {
-            title: '属性值',
-            dataIndex: 'attrValueVO',
-            width: '30%',
-            scopedSlots: {customRender: 'attrValueVO'}
-          }, {
-            title: '数据类型',
-            dataIndex: 'attrValueType',
-            // width: '30%',
-            align: 'center',
-            scopedSlots: {customRender: 'attrValueType'}
-          },
-          {
-            title: '属性单位',
-            dataIndex: 'attrUnit'
-          }],
-        accesskey: '1',
-        entType: 'START' // 默认以此实体为起点
-      }
+    /**
+     * 新增关系类
+     * @param id
+     */
+    AddRelationClass () {
+      this.$open('createRelationClassModal', {
+        pramsId: this.$route.params.classId,
+        entClsName: this.entClsName,
+        entClsType: this.entClsType,
+        backGroundColor:this.backGroundColor,
+        
+      }, function (data) {
+        if (data) {
+          this.$message.success('添加关系类成功')
+          this.refreshRelationClassList(this.$route.params.classId, data.entClsType,) // 刷新关系类列表
+        }
+      })
+      console.log('backGroundColor'+"1111")
     },
-    created () {
-      this.entityId = this.$route.params.entityId
-      //获取关系属性列表
-      this.entityClassId = this.$route.params.classId
-      this.getEntityAttr(this.entityId, this.entType)
+    /**
+     * 实体路由跳转
+     * @param id
+     */
+    handleChangeEntityRouter (id) {
+      this.isActive = id
+      this.$router.push({name: 'relation_edit', params: {relationId: id}},)
     },
-    methods: {
-      closeCell (record) {
-        record.edit.abled = false
-      },
-      /**
-       * 编辑器更新
-       **/
-      onCellChange (record, unknow, text) {
-        var params = {
-          attrClsID: record.attrClsID,// *属性类ID
-          attrMemo: record.attrMemo ? record.attrMemo : '',// 属性描述
-          attrValue: text ? text : '',// 属性值
-          entID: this.$route.params.entityId,// 实体ID
-          relID: record.relID
-        }
-        updateRelationAttr(params).then((result) => {
-          if (result !== false) {
-            record.edit = {
-              abled: false
-            }
-            this.getEntityAttr(this.entityId, this.entType)
-          }
-        })
-      },
-      /**
-       * 删除关系
-       * @param relation
-       */
-      deleteRelation (relation) {
-        const relID = relation.relID
-        const vm = this
-        deleteEntityRelation(relID).then((result) => {
-          if (result !== false) {
-            vm.$message.success('删除关系类删除成功')
-            vm.getEntityAttr(this.entityId, this.entType)
-          }
-        })
-      },
-      getEntityAttr (entityId, entType) {
-        getRelationAttrById(entityId, entType).then((result) => {
-          result.forEach(function (item) {
-            if (item.relAttrVOList) {
-              item.relAttrVOList.forEach(function (i) {
-                // 提交时要带这个变量,但只能传回record(内层数组值),因此便利复制进数组
-                i.relID = item.relID
-                i.edit = {
-                  abled: false
-                }
-              })
-            }
-          })
-          this.entityRelationList = result
-        })
-      },
-      createRelation () {
-        // 新建关系modal
-        this.$open('createRelationModal', {
-          entityId: this.entityId, // 实体id
-          entityClassId: this.entityClassId, // 实体类id
-          entName: this.entName,
-          entType: this.entType
-        }, function (data) {
-          if (data) {
-            this.getEntityAttr(this.$route.params.entityId, this.entType)
-          }
-        })
-      },
-      // 切换tab
-      handleTabChange (e) {
-        switch (e.target.accessKey) {
-          case '1':
-            odiv.style.transform = `translate3d(5px, 0px, 0px)`,
-              this.accesskey = '1'
-            this.entType = 'START' // 以此实体为起点
-            this.getEntityAttr(this.entityId, this.entType)
-            break
-          case '2':
-            odiv.style.transform = `translate3d(${140}px, 0px, 0px)`
-            this.accesskey = '2'
-            this.entType = 'ENT' //以此实体为终点
-            this.getEntityAttr(this.entityId, this.entType)
-            break
+    /**
+     * 刷新关系类列表
+     * @param id
+     */
+    refreshRelationClassList (id, entClsType) {
+      this.spinning=true;
+      getAllRelationClassList(id, entClsType).then((resp) => {
+        this.spinning=false;
+        this.relationListData = resp.data
+      })
+    },
+    /**
+     * 修改关系类名称
+     */
+    handleEditRelationClassName (opt) {
+      console.log(opt)
+      this.$open('editRelationClassNameModal', {
+        params: opt, 
+      }, function (data) {
+        if (data) {
+          this.refreshRelationClassList(this.$route.params.classId, this.entClsType) // 刷新关系类列表
+          this.$message.success('修改关系类名称成功')
         }
-      }
+      })
     },
-    mounted () {
-      odiv = document.getElementById('move')
+    handleTabChange (e) {
+      switch (e.target.accessKey) {
+        case '1':
+          odiv.style.transform = `translate3d(5px, 0px, 0px)`,
+            this.accesskey = '1'
+          this.entClsType = 'START' // 以此实体类为起点
+          this.refreshRelationClassList(this.$route.params.classId, this.entClsType)
+          break
+        case '2':
+          odiv.style.transform = `translate3d(${140}px, 0px, 0px)`
+          this.accesskey = '2'
+          this.entClsType = 'ENT' //以此实体类为终点
+          this.refreshRelationClassList(this.$route.params.classId, this.entClsType)
+          break
+      }
     }
+  },
+  mounted () {
+    odiv = document.getElementById('move')
   }
+}
 </script>
 
 <style scoped>
-
+  .eddit-box,
+  .cancel-box { position: absolute; top: 0; width: 35px; height: 35px; text-indent: 0; text-align: center; }
+  .cancel-box { right: 0; }
+  .eddit-box { right: 35px; }
+  .rela-box { display: block; width: 235px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 </style>

+ 5 - 4
src/views/knowledge/graphEntity/manager.vue

@@ -231,7 +231,7 @@
       clearSearch() {
         this.searchValue = "";
         this.searchResult = [];
-        this.$router.push({ path: "/mng/class/unknow/entity_v2" });
+        // this.$router.push({ path: "/mng/class/unknow/entity_v2" });
       },
       // 搜索
       handleSearch() {
@@ -241,10 +241,11 @@
         }
         this.spinning = true;
         // this.$router.push({path: '/mng/class/unknow/entity_v2'})
-        searchEntClsByEntName(this.searchValue).then((res) => {
+        searchEntClsByEntName(this.searchValue).then((resp) => {
+          let data = resp.data
           let item = { entClsID: "uknow", entClsName: "全部" };
-          res.unshift(item);
-          this.searchResult = res;
+          data.unshift(item);
+          this.searchResult = data;
           this.spinning = false;
         });
       },

+ 57 - 0
src/views/knowledge/index.vue

@@ -0,0 +1,57 @@
+<template>
+  <a-config-provider :locale="zh_CN">
+    <div id="app" class="flex-col">
+      <navibar class="menu-shi"></navibar>
+      <div class="app-body flex-row app_beijing">
+        <div class="container-width">
+          <router-view />
+        </div>
+      </div>
+    </div>
+  </a-config-provider>
+</template>
+<script>
+import navibar from "@/views/knowledge/common/navibar";
+
+import zh_CN from "ant-design-vue/lib/locale-provider/zh_CN";
+import "moment/locale/zh-cn";
+
+export default {
+  components: {
+    navibar,
+  },
+  data() {
+    return {
+      zh_CN,
+    };
+  },
+};
+</script>
+<style scoped>
+#app {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: #f5f7fa;
+}
+
+.app-body {
+  height: calc(100% - 50px);
+  overflow: scroll;
+  overflow-y: hidden;
+}
+
+.container-width {
+  top: 62px;
+  height: 100%;
+}
+
+.menu-shi {
+  background-color: white;
+  box-shadow: 0 2px 8px #c8ebdf82;
+  border: 0;
+  text-align: center;
+}
+</style>

+ 320 - 0
src/views/knowledge/modal/addAttrClassModal.vue

@@ -0,0 +1,320 @@
+<template>
+  <a-modal
+    :title="title"
+    :visible="show"
+    :maskClosable="false"
+    @ok="handleOk"
+    @cancel="handleClose"
+  >
+    <a-form :form="form">
+      <a-form-item label="名称:" v-bind="formItemLayout">
+        <a-input v-decorator="FormRulesDefine.attrClsName" />
+      </a-form-item>
+      <a-form-item label="单位:" v-bind="formItemLayout">
+        <a-input v-decorator="FormRulesDefine.attrUnit" />
+      </a-form-item>
+      <a-form-item label="属性类型" v-bind="formItemLayout">
+        <a-select
+          v-decorator="FormRulesDefine.attrType"
+        >
+          <a-select-option
+            :value="attrType.id"
+            v-for="attrType in attrTypeList"
+            :key="attrType.id"
+            >{{ attrType.name }}
+          </a-select-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item label="数据类型" v-bind="formItemLayout">
+        <a-select
+          v-decorator="FormRulesDefine.valueType"
+          @change="handleChangeType"
+        >
+          <a-select-option
+            :value="key"
+            v-for="(value, key) in attrClsType"
+            :key="key"
+            >{{ value }}
+          </a-select-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item label="枚举类选择" v-bind="formItemLayout" v-show="isShow1">
+        <a-button type="primary" @click="handleOpenEnumManageModal"
+          >选择</a-button
+        >
+      </a-form-item>
+      <a-form-item
+        label="枚举类名称"
+        v-bind="formItemLayout"
+        v-show="isShow1 && domainKey"
+      >
+        <span>{{ domainKey }}</span>
+      </a-form-item>
+      <a-form-item label="最大值:" v-bind="formItemLayout" v-show="isShow2">
+        <a-input-number v-decorator="FormRulesDefine.maxValue" />
+      </a-form-item>
+      <a-form-item label="最小值:" v-bind="formItemLayout" v-show="isShow2">
+        <a-input-number v-decorator="FormRulesDefine.minValue" />
+      </a-form-item>
+      <a-form-item label="描述:" v-bind="formItemLayout">
+        <a-textarea v-decorator="FormRulesDefine.attrClsMemo" />
+      </a-form-item>
+      <a-form-item label="是否必填:" v-bind="formItemLayout">
+        <a-checkbox
+          @change="onChangeNotNull"
+          v-decorator="FormRulesDefine.notNull"
+          :checked="notNull"
+        ></a-checkbox>
+      </a-form-item>
+    </a-form>
+  </a-modal>
+</template>
+
+<script>
+import { updateAttrClass, addAttrClass } from "@/api/graph/attrClass"
+
+const formItemLayout = {
+  labelCol: {
+    xs: { span: 24 },
+    sm: { span: 8 },
+  },
+  wrapperCol: {
+    xs: { span: 24 },
+    sm: { span: 16 },
+  },
+};
+const attrTypeList = [
+  {
+    name: "基础属性",
+    id: "ELEM",
+  },
+  {
+    name: "能力属性",
+    id: "CIDX",
+  },
+  {
+    name: "多媒体属性",
+    id: "MIME",
+  },
+  {
+    name: "待审属性",
+    id:"NONE"
+  }
+];
+export default {
+  name: "add-attr-class-modal",
+  // attrClassParam 要编辑的属性类数据  isPublic:自定义页面
+  props: ["title", "attrClassParam", "entClsID", "type", "isPublic"],
+  data() {
+    let domain;
+    if (this.attrClassParam) {
+      domain = this.attrClassParam.domain ? JSON.parse(this.attrClassParam.domain) : null;
+    }
+    return {
+      attrTypeList,
+      notNull: false,
+      isShow1: true, // 控制枚举类显隐
+      isShow2: false, // 控制最大值最小值
+      // 显隐
+      attrClsType: this.$const.attrClsType,
+      formItemLayout,
+      FormRulesDefine: {
+        attrClsName: [
+          // 用作标识,我们统一写成和表单提交字段一样
+          "attrClsName", // 表单提交的字段
+          {
+            rules: [
+              { required: true, message: "属性名称需要填写", whitespace: true },
+            ],
+            initialValue: this.attrClassParam
+              ? this.attrClassParam.attrClsName
+              : "",
+          },
+        ],
+        attrUnit: [
+          // 用作标识,我们统一写成和表单提交字段一样
+          "attrUnit", // 表单提交的字段
+          {
+            rules: [
+              {
+                required: false,
+                message: "属性单位需要填写",
+                whitespace: false,
+              },
+            ],
+            initialValue: this.attrClassParam
+              ? this.attrClassParam.attrUnit
+              : "",
+          },
+        ],
+        attrClsMemo: [
+          // 用作标识,我们统一写成和表单提交字段一样
+          "attrClsMemo", // 表单提交的字段
+          {
+            rules: [
+              {
+                required: false,
+                message: "属性描述需要填写",
+                whitespace: false,
+              },
+            ],
+            initialValue: this.attrClassParam
+              ? this.attrClassParam.attrClsMemo
+              : "",
+          },
+        ],
+        maxValue: [
+          // 用作标识,我们统一写成和表单提交字段一样
+          "maxValue", // 表单提交的字段
+          {
+            rules: [],
+            initialValue: (domain && domain.maxValue) || "",
+          },
+        ],
+        minValue: [
+          // 用作标识,我们统一写成和表单提交字段一样
+          "minValue", // 表单提交的字段
+          {
+            rules: [],
+            initialValue: (domain && domain.minValue) || "",
+          },
+        ],
+        notNull: [
+          // 用作标识,我们统一写成和表单提交字段一样
+          "notNull", // 表单提交的字段
+          {
+            rules: [],
+            initialValue: this.attrClassParam
+              ? this.attrClassParam.notNull
+              : "",
+          },
+        ],
+        valueType: [
+          "valueType", // 表单提交的字段
+          {
+            initialValue: this.attrClassParam
+              ? this.attrClassParam.attrValueType
+              : "TEXT",
+          },
+        ],
+        attrType: [
+          "attrType", // 表单提交的字段
+          {
+            initialValue: this.attrClassParam
+              ? this.attrClassParam.attrType
+              : this.type,
+          },
+        ],
+      },
+      form: this.$form.createForm(this),
+      show: true,
+      domainKey: "", // 枚举类名称
+    };
+  },
+  created() {},
+  mounted() {
+    const attrClassParam = this.attrClassParam;
+    if (attrClassParam) {
+      // 编辑进来的赋值
+      try {
+        var domain = attrClassParam.domain ? JSON.parse(attrClassParam.domain) : null;
+        this.domainKey = domain.domainKey || "";
+      } catch (e) {
+        console.warn(e);
+      }
+      this.notNull = attrClassParam.notNull;
+
+      if (
+        attrClassParam.attrValueType === "LONG" ||
+        attrClassParam.attrValueType === "DOUBLE"
+      ) {
+        this.isShow1 = false;
+        this.isShow2 = true;
+      } else if (
+        attrClassParam.attrValueType === "DATE" ||
+        attrClassParam.attrValueType === "BOOLEAN"
+      ) {
+        this.isShow1 = false;
+        this.isShow2 = false;
+      }
+    }
+  },
+  methods: {
+    // 打开枚举类管理
+    handleOpenEnumManageModal() {
+      this.$open("openEnumManageModal", {}, function(data) {
+        this.domainKey = data.domainKey;
+      });
+    },
+    onChangeNotNull(e) {
+      this.notNull = e.target.checked;
+    },
+    // 改变数据类型
+    handleChangeType(type) {
+      if (type === "LONG" || type === "DOUBLE") {
+        this.isShow1 = false;
+        this.isShow2 = true;
+      } else if (type === "TEXT") {
+        this.isShow1 = true;
+        this.isShow2 = false;
+        this.form.setFieldsValue({
+          maxValue: "",
+          minValue: "",
+        });
+      } else {
+        this.isShow1 = false;
+        this.isShow2 = false;
+      }
+    },
+    async getFormData() {
+      var result = await this.$formValidateFields("form"); //form的字符串
+      // 在这里对form返回数据进行处理
+      return result;
+    },
+    async handleOk(e) {
+      var result = await this.getFormData(); // this是当前组件的this,  'form'此表单的名称,一定要是字符串
+      var param = {};
+      if (result.maxValue * 1 < result.minValue * 1) {
+        this.$message.error("最大值不应该小于最小值");
+        return false;
+      }
+      param["isPublic"] = this.isPublic ? "1" : "0"; // 自定义页面必须传
+      param["attrClsName"] = result.attrClsName || "";
+      param["attrUnit"] = encodeURI(result.attrUnit) || "";
+      param["valueType"] = result.valueType || "";
+      param["attrClsMemo"] = encodeURI(result.attrClsMemo) || "";
+      param["notNull"] = this.notNull || false;
+      param["maxValue"] = result.maxValue || "";
+      param["minValue"] = result.minValue || "";
+      param["domainKey"] = this.domainKey || "";
+      param["attrType"] = result.attrType;
+      param["entClsID"] = this.entClsID || "";
+
+      const uniqueMatchList = this.$checkSpecialChar(result.attrClsName)
+      if (uniqueMatchList.length > 0) {
+        this.$message.error(`属性类名称不能包含特殊字符【${uniqueMatchList.join('、')}】!`)
+        return false
+      }
+      if (this.attrClassParam) {
+        // 编辑的属性类id
+        const attrClsID = this.attrClassParam.attrClsID;
+        param["attrClsID"] = attrClsID;
+        updateAttrClass(param).then((res) => {
+          this.$close({ data: res });
+        });
+      } else {
+        // 添加
+        // 添加接口
+        addAttrClass(param).then((res) => {
+          this.$close(res);
+        });
+      }
+    },
+    handleClose(e) {
+      this.$close(false);
+    },
+  },
+};
+</script>
+
+<style scoped></style>

+ 134 - 0
src/views/knowledge/modal/addRelationAttrModal.vue

@@ -0,0 +1,134 @@
+<template>
+    <a-modal
+            title="新增关系类属性"
+            :visible="show"
+            :maskClosable="false"
+            @ok="handleOk"
+            @cancel="handleClose"
+            size="middle"
+    >
+        <a-form :form="form">
+            <a-form-item label="属性名称:" v-bind="formItemLayout">
+                <a-input
+                        v-decorator="formRules.name"
+                />
+            </a-form-item>
+            <a-form-item label="属性单位:" v-bind="formItemLayout">
+                <a-input
+                        v-decorator="formRules.unit"
+                />
+            </a-form-item>
+            <a-form-item label="数据类型" v-bind="formItemLayout">
+                <a-select v-decorator="formRules.valueType">
+                    <a-select-option :value="key" v-for="(value,key) in attrClsType" :key="key" >{{value}}</a-select-option>
+                </a-select>
+            </a-form-item>
+            <a-form-item label="属性描述:" v-bind="formItemLayout">
+                <a-input type="textarea"
+                        v-decorator="formRules.desc"
+                />
+            </a-form-item>
+        </a-form>
+
+    </a-modal>
+</template>
+
+<script>
+import { addRelationAttr } from '@/api/graph/relationEditor'
+  export default {
+    name: 'addRelationAttrModal',
+    props: ['param', 'type'],
+    data() {
+      return {
+        attrClsType:this.$const.attrClsType,
+        formItemLayout:this.$const.formItemLayout,
+        form: this.$form.createForm(this),
+        show: true,
+        formRules: {        // 所有验证规则
+          name: [       // 用作标识,我们统一写成和表单提交字段一样
+            'name',     // 表单提交的字段
+            {
+              rules: [{required: true, message: '属性名称需要填写', whitespace: true}],
+            }
+          ],
+          unit: [       // 用作标识,我们统一写成和表单提交字段一样
+            'unit',     // 表单提交的字段
+            {
+              rules: [{required: false, message: '属性单位寻要填写', whitespace: false}],
+            }
+          ],
+          desc: [       // 用作标识,我们统一写成和表单提交字段一样
+            'desc',     // 表单提交的字段
+            {
+              rules: [{required: false, message: '属性描述需要填写', whitespace: false}],
+            }
+          ],
+            valueType:[
+                'valueType',     // 表单提交的字段
+                {
+                    initialValue:'TEXT'
+                }
+            ]
+        },
+
+      }
+    },
+
+    methods: {
+      async getFormData() {
+        var result = await this.$formValidateFields('form')    //form的字符串
+        // 在这里对form返回数据进行处理
+        return result
+      },
+      callback(data) {
+        if (data) {
+          this.$message.info('发送ajax')
+          // ajax返回值处理后返回
+          this.$close(data)
+
+        } else {
+          // 出错处理
+          this.$close(false)
+        }
+      },
+      async handleOk(e) {
+        var result = await this.getFormData()     // this是当前组件的this,  'form'此表单的名称,一定要是字符串
+        var data = {
+          relClsID: this.param,
+          attrUnit: result.unit,
+          attrClsName: result.name,
+          attrClsMemo: result.desc,
+            valueType: result.valueType
+        }
+        if (data.attrUnit === undefined) {
+          data.attrUnit = ""
+        }
+        if (data.attrClsMemo === undefined) {
+          data.attrClsMemo = ""
+        }
+        data.attrClsName = (data.attrClsName || '').trim()
+        data.attrUnit = (data.attrUnit || '').trim()
+        data.attrClsMemo = (data.attrClsMemo || '').trim()
+        if (data.attrClsName == "") {
+          this.$message.error('实体属性名传参失败');
+        } else {
+          addRelationAttr(data).then((resp) => {
+            if (resp.data !== false) {
+              this.$close('ok')
+            }
+          })
+        }
+        //新增属性类
+
+      },
+
+      handleClose(e) {
+        this.$close(false)
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 1
src/views/knowledge/modal/addRootEntityClassModal.vue

@@ -131,7 +131,8 @@ import { addEntityClass } from "@/api/graph/entityClass"
           pid: '',
           backGroundColor: vm.color
         }
-        addEntityClass(data).then((data) => {
+        addEntityClass(data).then((resp) => {
+          let data = resp.data
           // 添加成功
           if (data !== false) {
             vm.$message.success('添加根节点实体类成功')

+ 271 - 0
src/views/knowledge/modal/createRelationClassModal.vue

@@ -0,0 +1,271 @@
+<template>
+  <a-modal
+    title="新建一个关系类"
+    :visible="show"
+    :maskClosable="false"
+    @ok="handleOk"
+    @cancel="handleClose"
+  >
+    <h4 class="title">{{entClsName}}</h4>
+    <div style="margin-bottom: 20px;">
+      <a-radio-group @change="onChangeOrigin" v-model="Originvalue" disabled>
+        <a-radio :value="3">作为起点</a-radio>
+        <a-radio :value="4">作为终点</a-radio>
+      </a-radio-group>
+    </div>
+    <h4 class="title">选择或新建关系</h4>
+    
+     <a-row :gutter="10" >
+        <a-col :span="4">
+          <h4 class="title" style="margin-top:.6em;">背景颜色</h4>
+        </a-col>
+        <a-col :span="15">
+            <a-form :form="form">
+                <a-form-item>
+                    <a-color-picker @fromChild="getColor"  v-decorator="formRules.backGroundColor" />    
+                </a-form-item>
+            </a-form>
+       </a-col>
+    </a-row>
+   
+    <div style="margin-bottom: 20px;">
+      <a-radio-group @change="onChange" v-model="value">
+        <a-radio :value="1">复制已有关系</a-radio>
+        <a-radio :value="2">新建关系</a-radio>
+      </a-radio-group>
+    </div>
+    <div v-if="value==1" style="margin-bottom: 20px;">
+      <a-row :gutter="10">
+        <a-col :span="12">
+          <a-button @click="getRelationCls">
+            {{selectedRelCls ? selectedRelCls : '选择一个关系类名称'}}
+          </a-button>
+        </a-col>
+        <a-col :span="12">
+          <a-select
+                  showSearch
+                  placeholder="选择一个关系类"
+                  style="width:200px;"
+                  @change="handleSelectRelationClass"
+          >
+            <a-select-option
+                    v-for="item in filterRelationList"
+                    :value="item.relClsID"
+                    :key="item.relClsID"
+            >
+              <a-popover placement="left">
+                <template slot="content">
+                  <div>起点:{{item.startEntCls&&item.startEntCls.entClsName}}</div>
+                  <div>关系类:{{item.relClsName}}</div>
+                  <div>终点:{{item.endEntCls&&item.endEntCls.entClsName}}</div>
+                  <div v-for="(p,i) in attrList" :key="i">属性:{{p.attrClsName}}</div>
+                </template>
+                <span
+                        @mouseenter="enter(item)"
+                        @mouseleave="leave()"
+                >
+                  {{item.startEntCls&&item.startEntCls.entClsName}}->{{item.relClsName}}->{{item.endEntCls&&item.endEntCls.entClsName}}</span>
+              </a-popover>
+            </a-select-option>
+          </a-select>
+        </a-col>
+      </a-row>
+    </div>
+    <div v-if="value==2">
+      <a-form :form="form">
+        <a-form-item>
+          <a-input v-decorator="formRules.entityClass" placeholder="请输入关系类名" />
+        </a-form-item>
+      </a-form>
+    </div>
+    <h4 class="title">{{Originvalue===3 ? '选择终点关系类' : '选择起点关系类'}}</h4>
+    <div style="max-height: 420px; overflow: auto;">
+      <!--<class-tree @nodeSelected="entityClassNodeSelected" :editable="false"></class-tree>-->
+      <z-tree :editable="false" @nodeSelected="entityClassNodeSelected"></z-tree>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import AColorPicker  from '@/components/knowledge/colorPicker';
+import ClassTree from "@/views/knowledge/graphClass/entityClassTree.vue";
+import zTree from "@/views/knowledge/graphClass/entityClassZtree.vue";
+import { getRelationAttr, getAllRelationClassListByName, addRelationClass } from "@/api/graph/relationClass"
+
+const formRules = {
+  // 所有验证规则
+  entityClass: [
+    // 用作标识,我们统一写成和表单提交字段一样
+    "entityClass", // 表单提交的字段
+    {
+      rules: [{ required: true, message: "此选项必填", whitespace: true }]
+    }
+  ]
+  // relationClass: [
+  //   relationClass, // 表单提交的字段
+  //   {
+  //     rules: [{required: false, message: '此选项必填', whitespace: true}]
+  //   }
+  // ]
+};
+export default {
+  components: {
+    AColorPicker,
+    zTree,
+    ClassTree,
+    VNodes: {
+      functional: true,
+      render: (h, ctx) => ctx.props.vnodes
+    }
+  },
+  name: "create-relation-class-modal",
+  props: ["pramsId", "entClsName", "entClsType"],
+  data() {
+    return {
+      color:'',
+      show: true,
+      form: this.$form.createForm(this),
+      formRules,
+      value: 1,
+      Originvalue: 3,
+      filterRelationList: [], // 已有关系列表
+      EntityClassNode: {}, // 实体类节点信息
+      selectRelationValue: "",
+      timer: null, // 延时器
+      attrMap: {},
+      attrList: [], // 属性list
+      selectedRelCls: ''
+    };
+  },
+  created() {
+    // 判断是起点还是终点
+    if (this.entClsType === "START") {
+      this.Originvalue = 3; // 起点
+    } else {
+      this.Originvalue = 4; // 终点
+    }
+  },
+  destroyed() {
+  },
+  methods: {
+    getColor (color) {
+      this.color = color;
+    },
+    enter(item) {
+      const vm = this
+      if (vm.attrMap.hasOwnProperty(item.relClsID)) {  // 判断map中是否存在
+        vm.attrList = vm.attrMap[item.relClsID];
+        clearTimeout(vm.timer);
+      } else {
+        vm.timer = setTimeout(() => {
+          getRelationAttr(item.relClsID).then(res => {
+            vm.attrMap[item.relClsID] = res; // 缓存
+            vm.attrList = res;
+          });
+        }, 10);
+      }
+    },
+    leave() {
+      clearTimeout(this.timer);
+    },
+    /**
+     * // 传出来的实体类节点信息
+     * @param node
+     */
+    entityClassNodeSelected(node) {
+      this.EntityClassNode = node;
+    },
+    /**
+     * 选中的已有关系
+     * @param value
+     */
+    handleChange(name) {
+      getAllRelationClassListByName(name).then(data => {
+        //参数为空,获取所有的列表
+        this.filterRelationList = data.records;
+      });
+    },
+    handleSelectRelationClass(id) {
+      this.selectRelationValue = id;
+    },
+    getRelationCls() {
+      this.$open('getRelationClsListModal', {}, function (data) {
+        if (data) {
+          this.selectedRelCls = data
+          getAllRelationClassListByName(data).then(data => {
+            //参数为空,获取所有的列表
+            this.filterRelationList = data.records;
+          });
+        }
+      })
+    },
+    onChange(e) {
+    },
+    // 选择起点或终点
+    onChangeOrigin(e) {
+    },
+    async getFormData() {
+      var result = await this.$formValidateFields("form"); //form的字符串
+      // 在这里对form返回数据进行处理
+      return result;
+    },
+    async handleOk(e) {
+      let result = await this.getFormData(); // this是当前组件的this,  'form'此表单的名称,一定要是字符串
+      const endID = this.EntityClassNode && this.EntityClassNode.entClsID;
+      const relClsID = this.selectRelationValue;
+      let entClsType = "START";
+      if (!endID) {
+        this.$message.error("请选择要建立关系的实体类");
+        return;
+      }
+      const data = {
+        startID: this.pramsId,
+        endID: endID,
+        backGroundColor:this.color,
+        relClsMemo:this.relClsMemo,
+        relClsName:this.relClsName,
+     
+       
+      };
+      if (this.Originvalue == 4) {
+        // 传进来的实体类作为终点
+        data["startID"] = endID;
+        data["endID"] = this.pramsId;
+        entClsType = "ENT";
+      }
+      if (this.value == 1) {
+        // 已有关系属性
+        data["relClsID"] = relClsID;
+      }
+      if (this.value == 2) {
+        // 新建关系
+        data["relClsName"] = result.entityClass;
+        const uniqueMatchList = this.$checkSpecialChar(result.entityClass)
+        if (uniqueMatchList.length > 0) {
+          this.$message.error(`关系类名称不能包含特殊字符【${uniqueMatchList.join('、')}】!`)
+          return false
+        }
+      }
+      addRelationClass(data).then(resp => {
+        let data = resp.data
+        if (data !== false) {
+          this.$trigger("relationClass:nodeCreated", data);
+          this.$close({
+            id: this.pramsId,
+            entClsType: entClsType
+          });
+        }
+      });
+    },
+    handleClose(e) {
+      this.$close(false);
+    }
+  }
+};
+</script>
+
+<style scoped>
+  .ant-row {
+    margin-bottom: 2px;
+ }
+</style>

+ 249 - 0
src/views/knowledge/modal/editEntityClassTreeNameModal.vue

@@ -0,0 +1,249 @@
+<template>
+  <a-modal
+    title="编辑实体类信息"
+    :visible="show"
+    :maskClosable="false"
+    @ok="handleOk"
+    @cancel="handleClose"
+  >
+    <div style="display: flex">
+      <div style="width:130px;">
+        <div
+          style="width:100px;height:100px;overflow:hidden;border:1px solid #ddd"
+        >
+          <img
+            style="width:100px;height:100px;"
+            :src="headImg"
+            alt="头像"
+            v-if="headImg"
+          />
+        </div>
+        <label
+          class="btn btn-orange"
+          for="uploads"
+          style="display:inline-block;width: 100px;padding: 0;text-align: center;line-height: 28px;border:1px solid #ccc;margin-top: 20px;"
+          >选择图片
+        </label>
+        <input
+          type="file"
+          id="uploads"
+          :value="imgFile"
+          style="position:absolute; clip:rect(0 0 0 0);display: none"
+          accept="image/png, image/jpeg, image/gif, image/jpg"
+          @change="uploadImg($event, 1)"
+        />
+      </div>
+      <div style="flex: 1">
+        <a-form :form="form">
+          <a-form-item label="名称">
+            <a-input
+              v-decorator="formRules.entityClass"
+              placeholder="请输入实体类名"
+            />
+          </a-form-item>
+          <a-form-item label="描述">
+            <a-input
+              type="textarea"
+              v-decorator="formRules.entClsMemo"
+              placeholder="实体类描述"
+            />
+          </a-form-item>
+          <a-form-item label="背景颜色">
+            <AColorPicker
+              @fromChild="getColor"
+              :color="backGroundColor"
+              v-decorator="formRules.backGroundColor"
+            />
+          </a-form-item>
+        </a-form>
+        <div class="grid-columns-3" v-if="entClsIsRoot === 'T'">
+          <div v-for="(item, key) in panes" :key="key">
+            <a-checkbox
+              :checked="item.checked"
+              @change="onChange($event, item)"
+              :disabled="item.disabled"
+            >
+              {{ item.title }}
+            </a-checkbox>
+          </div>
+        </div>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+
+<script>
+import AColorPicker  from '@/components/knowledge/colorPicker';
+import { updateEntityClass } from "@/api/graph/entityClass"
+
+const panes = {
+  GX: { title: "关系属性", checked: false, disabled: true },
+  BQ: { title: "标签属性", checked: true, disabled: true },
+  ELEM: { title: "基础属性", checked: false, disabled: true },
+  MIME: { title: "多媒体属性", checked: false, disabled: false },
+  CIDX: { title: "能力属性", checked: false, disabled: false },
+  NONE: { title: "待审属性", checked: false, disabled: false },
+};
+export default {
+  components: {
+    AColorPicker,
+  },
+  name: "edit-entity-class-tree-name-modal",
+  props: [
+    "entClsName",
+    "entClsID",
+    "entClsAllowAttrTypeArr",
+    "entClsIsRoot",
+    "entClsMemo",
+    "entClsIcon",
+    "backGroundColor",
+  ],
+  data() {
+    return {
+      color:"",
+      show: true,
+      form: this.$form.createForm(this),
+      formRules: {
+        // 所有验证规则
+        entityClass: [
+          // 用作标识,我们统一写成和表单提交字段一样
+          "entityClass", // 表单提交的字段
+          {
+            rules: [
+              { required: true, message: "此选项必填", whitespace: true },
+            ],
+            initialValue: this.entClsName,
+          },
+        ],
+        entClsMemo: [
+          "entClsMemo",
+          {
+            initialValue: this.entClsMemo,
+          },
+        ],
+        // backGroundColor: [
+        //   // 用作标识,我们统一写成和表单提交字段一样
+        //   "backGroundColor", // 表单提交的字段
+        //   {
+        //     initialValue: this.backGroundColor,
+        //   },
+        // ],
+      },
+      panes,
+      headImg: this.entClsIcon,
+      imgFile: "",
+    };
+  },
+  created() {
+     this.color=this.backGroundColor;
+    // 标记已有的属性类型
+    for (var i = 0; i < this.entClsAllowAttrTypeArr.length; i++) {
+      if (this.entClsAllowAttrTypeArr[i] !== "BQ") {
+        this.panes[this.entClsAllowAttrTypeArr[i]].checked = true;
+      }
+    }
+  },
+  mounted() {},
+  destroyed() {},
+  methods: {
+    getColor(color) {
+      this.color = color;
+    },
+    //选择本地图片
+    uploadImg(e, num) {
+      var max_size = 20; // 20k
+      var _this = this;
+      //上传图片
+      var file = e.target.files[0];
+      _this.fileName = file.name;
+      var size = file.size;
+      if (size > max_size * 1024) {
+        this.$message.warning("建议上传图标不要超过20KB");
+      }
+      if (
+        !/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG|JPEG|BMP)$/.test(e.target.value)
+      ) {
+        alert("图片类型必须是.gif,jpeg,jpg,png,bmp中的一种");
+        return false;
+      }
+      var reader = new FileReader();
+      reader.onload = (e) => {
+        let data;
+        data = e.target.result;
+        this.$open(
+          "cropperImgModal",
+          {
+            paramImgUrl: data,
+          },
+          function(data) {
+            this.headImg = data.data;
+          }
+        );
+      };
+      // 转化为base64
+      reader.readAsDataURL(file);
+      // 转化为blob
+      // reader.readAsArrayBuffer(file)
+    },
+    async getFormData() {
+      var result = await this.$formValidateFields("form"); //form的字符串
+      // 在这里对form返回数据进行处理
+      return result;
+    },
+    async handleOk(e) {
+      let result = await this.getFormData(); // this是当前组件的this,  'form'此表单的名称,一定要是字符串
+      result["entClsID"] = this.entClsID; // 修改节点的id
+      result["entClsAllowAttrType"] = checkoutEntClsAllowAttrType(this.panes);
+      result["entClsName"] = result.entityClass.trim();
+      let entityClass = result.entityClass.trim();
+      const uniqueMatchList = this.$checkSpecialChar(entityClass);
+      if (uniqueMatchList.length > 0) {
+        this.$message.error(
+          `实体类名称不能包含特殊字符【${uniqueMatchList.join("、")}】!`
+        );
+        return false;
+      }
+      // 实体类图标
+      let entClsIcon = encodeURIComponent(this.headImg);
+      updateEntityClass(
+          result["entClsAllowAttrType"],
+          this.entClsID,
+          entityClass,
+          result.entClsMemo,
+          entClsIcon!== "null" ? entClsIcon : "",
+          this.color
+        )
+        .then((data) => {
+          // 修改成功
+          if (data) {
+            this.$message.success("实体类编辑成功");
+            this.$close({
+              data: result,
+            });
+          }
+        });
+    },
+    handleClose(e) {
+      this.$close(false);
+    },
+    //' 设置属性的选中
+    onChange(e, item) {
+      item.checked = e.target.checked;
+    },
+  },
+};
+
+// 检索出选中的属性类型
+const checkoutEntClsAllowAttrType = function(list) {
+  var result = [];
+  for (var i in list) {
+    if (list[i].checked && i !== "BQ" && i !== "GX") {
+      result.push(i);
+    }
+  }
+  return result.join(",");
+};
+</script>
+
+<style scoped></style>

+ 99 - 0
src/views/knowledge/modal/editRelationClassNameModal.vue

@@ -0,0 +1,99 @@
+<template>
+  <a-modal
+    title="修改关系类名"
+    :visible="show"
+    :maskClosable="false"
+    @ok="handleOk"
+    size="middle"
+    @cancel="handleClose"
+  >
+    <a-form :form="form">
+      <a-form-item label="名称">
+        <a-input
+          v-decorator="formRules.relationClass"
+          placeholder="请输入关系类名"
+        />
+      </a-form-item>
+       <a-form-item label="背景颜色">
+              <a-color-picker @fromChild="getColor" :color="this.params.backgroundColor" v-decorator="formRules.backGroundColor" />    
+       </a-form-item>
+    </a-form>
+  </a-modal>
+</template>
+
+<script>
+import AColorPicker  from '@/components/knowledge/colorPicker';
+import { editRelationClass } from "@/api/graph/relationClass"
+
+export default {
+  name: "edit-relation-class-name-modal",
+   components:{
+      AColorPicker
+   },
+  props: ["params"],
+  data() {
+    return {
+     
+      show: true,
+      form: this.$form.createForm(this),
+      formRules: {
+        // 所有验证规则
+        relationClass: [
+          // 用作标识,我们统一写成和表单提交字段一样
+          "relationClass", // 表单提交的字段
+          {
+            rules: [
+              { required: true, message: "此选项必填", whitespace: true },
+            ],
+            initialValue: this.params.relClsName,
+          },
+        ],
+        backGroundColor: [       // 用作标识,我们统一写成和表单提交字段一样
+         'backGroundColor',     // 表单提交的字段
+         {
+           initialValue: this.params.backGroundColor
+         }
+       ],
+      },
+    };
+  },
+
+  methods: {
+    getColor (color) {
+        this.color = color;
+    },
+    getFormData() {
+      var result = this.$formValidateFields("form"); //form的字符串
+      // 在这里对form返回数据进行处理
+      return result;
+    },
+    callback(data) {
+      if (data) {
+        // ajax返回值处理后返回
+        this.$close(true);
+      } else {
+        // 出错处理
+      }
+    },
+    handleOk() {
+      
+      let result = this.getFormData(); // this是当前组件的this,  'form'此表单的名称,一定要是字符串
+      this.getFormData().then(result => {
+        const data = {
+          relClsID: this.params.relClsID,
+          relClsName: result.relationClass.trim(),
+          backGroundColor:this.color,
+        };
+        editRelationClass(data).then((data) => {
+          this.$close({ message: "成功" });
+        });
+      })
+    },
+    handleClose(e) {
+      this.$close(false);
+    },
+  },
+};
+</script>
+
+<style scoped></style>

+ 89 - 0
src/views/knowledge/modal/getRelationClsListModal.vue

@@ -0,0 +1,89 @@
+<template>
+    <a-modal
+            title="选择一个关系类"
+            :visible="show"
+            :maskClosable="false"
+            @ok="handleOk"
+            @cancel="handleClose">
+        <a-radio-group v-if="!spinning" v-model="selectId" @change="onChange">
+            <a-radio v-for="(item, $index) in data" :value="item.relClsID" :key="item.relClsID" style="display: block;margin-bottom: 5px">
+                {{item.relClsName}} ({{item.relClsMemo}})
+            </a-radio>
+        </a-radio-group>
+        <a-spin v-if="spinning" :spinning="spinning">
+            <div class="spin-content">
+                关系类较多,加载比较缓慢,请等待...
+            </div>
+        </a-spin>
+        <a-row style="margin-top: 30px;">
+            <a-col>
+                <a-pagination
+                        v-model="pagination.current"
+                        :total="pagination.total"
+                        :pageSize="pagination.pageSize"
+                        @change="onChangePagination"/>
+            </a-col>
+        </a-row>
+    </a-modal>
+</template>
+
+<script>
+import { getAllRelationClassListByName } from "@/api/graph/relationClass"
+
+  export default {
+    name: 'getRelationClsListModal',
+    data() {
+      return {
+        show: true,
+        data: [],
+        dataCache: [],
+        selectName: '',
+        selectId: '',
+        spinning: true,
+
+
+
+        pagination: {
+          pageSize: 10,
+          total:0,
+          current: 1
+        },
+      }
+    },
+    mounted() {
+      this.getRelationList()
+    },
+    methods: {
+      getRelationList() {
+        getAllRelationClassListByName('', false, this.pagination.current, this.pagination.pageSize).then(data => {
+          this.dataCache = []
+          this.data = data.records;
+          this.data.forEach(item => {
+            this.dataCache.push(item.relClsID)
+          })
+          this.pagination.total =data.total
+          this.spinning = false
+        });
+        console.log(this.pagination.total)
+      },
+      onChangePagination(current) {
+        this.spinning = true
+        this.pagination.current = current
+        this.getRelationList()
+      },
+      onChange() {
+        this.selectName = this.data[this.dataCache.indexOf(this.selectId)].relClsName
+      },
+      handleOk() {
+        this.$close(this.selectName)
+      },
+      handleClose() {
+        this.$close(false)
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 14 - 14
src/views/knowledge/index.js → src/views/knowledge/modal/index.js

@@ -1,16 +1,16 @@
 // import Modal1 from './testModal1.vue'
 // import createAttributeModal from './createAttributeModal'
-import addRootEntityClassModal from './modal/addRootEntityClassModal' // 添加根节点实体类modal
+import addRootEntityClassModal from './addRootEntityClassModal' // 添加根节点实体类modal
 // import addChildEntityClassModal from './addChildEntityClassModal' // 添加实体类子节点modal
 // import openDemoModal from './demoModal'
-// import AddRelationAttrModal from './addRelationAttrModal'
+import AddRelationAttrModal from './addRelationAttrModal'
 // import AddEntityClass from './addEntityClassModal.vue' // 添加实体类modal
-// import editEntityClassTreeNameModal from './editEntityClassTreeNameModal' // 编辑实体类树的名字modal
-// import createRelationClassModal from './createRelationClassModal' // 新建关系类modal
+import editEntityClassTreeNameModal from './editEntityClassTreeNameModal' // 编辑实体类树的名字modal
+import createRelationClassModal from './createRelationClassModal' // 新建关系类modal
 // import addEntityModal from './addEntityModal' // 添加实体modal
 
 // import createRelationModal from './createRelationModal' // 新建关系
-// import editRelationClassNameModal from './editRelationClassNameModal' // 修改关系类名
+import editRelationClassNameModal from './editRelationClassNameModal' // 修改关系类名
 
 // import rightMenuDrawer from './rightMenuDrawer'
 // import checkTargetModal from './checkTargetModal' // 选择指标modal
@@ -20,9 +20,9 @@ import addRootEntityClassModal from './modal/addRootEntityClassModal' // 添加
 // import entClsImportModal from './entClsImportModal' // 实体类导入
 // import entClsExportModal from './entClsExportModal' // 实体类导出
 
-// import addAttrClassModal from './addAttrClassModal' // 新增属性类
+import addAttrClassModal from './addAttrClassModal' // 新增属性类
 
-import cropperImgModal from './modal/cropperImgModal'
+import cropperImgModal from './cropperImgModal'
 // import viewMoreValueModal from './viewMoreValueModal'
 // import chooseEnumModal from './chooseEnumModal'
 // import addEntityNoneAttrModal from './addEntityNoneAttrModal'
@@ -59,7 +59,7 @@ import cropperImgModal from './modal/cropperImgModal'
 // import addTemplateEntityModal from '@/views/modal/addTemplateEntityModal'
 // import addRelBatchModal from '@/views/modal/addRelBatchModal' // 模板实体详情,关系类属性新增实体,弹出框
 // import editTemplateRelAttrbatchModal from '@/views/modal/editTemplateRelAttrbatchModal' // 模板实体详情,关系类属性编辑实体,弹出框
-// import getRelationClsListModal from '@/views/modal/getRelationClsListModal' // 关系类-关系属性-点击添加-选择一个关系类属性
+import getRelationClsListModal from './getRelationClsListModal' // 关系类-关系属性-点击添加-选择一个关系类属性
 // import editSynonymModal from '@/views/modal/editSynonymModal' // 自定义-同义词-编辑同义词组
 // import mergeSynonymModal from '@/views/modal/mergeSynonymModal' // 自定义-同义词-合并
 // import addSynonymWordModal from '@/views/modal/addSynonymWordModal' // 自定义-同义词-编辑同义词组-切换主词+新增词
@@ -88,7 +88,7 @@ export default {
 	// mergeSynonymModal,
 	// addSynonymWordModal,
 	// editSynonymModal,
-	// getRelationClsListModal,
+	getRelationClsListModal,
 	// editTemplateRelAttrbatchModal,
 	// addRelBatchModal,
 	// addTemplateEntityModal,
@@ -104,7 +104,7 @@ export default {
 	// addEntityNoneAttrModal,
 	// chooseEnumModal,
 	// viewMoreValueModal,
-	// addAttrClassModal,
+	addAttrClassModal,
 	cropperImgModal,
 	// Modal1,
 	// createAttributeModal,
@@ -112,14 +112,14 @@ export default {
 	// addChildEntityClassModal,
 	// AddEntityClass,
 	// openDemoModal,
-	// editEntityClassTreeNameModal,
-	// AddRelationAttrModal,
-	// createRelationClassModal,
+	editEntityClassTreeNameModal,
+	AddRelationAttrModal,
+	createRelationClassModal,
 	// addEntityModal,
 	// createRelationModal,
 	// rightMenuDrawer,
 	// checkTargetModal,
-	// editRelationClassNameModal,
+	editRelationClassNameModal,
 	// entityDeleteMulModal,
 	// entClsImportModal,
 	// entClsExportModal,

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است