Răsfoiți Sursa

refacter api

allen 2 ani în urmă
părinte
comite
dec93becd5

+ 161 - 92
src/api/temporary/attrClass new.js

@@ -5,15 +5,16 @@ import request from '@/utils/request'
  * @param opts
  * @id:id
  */
+
 function getAttrClassById(entClsID, data) {
-  return request({
-    url: `/attrcls/${entClsID}/list`,
-    method: 'get',
-    params: {
-      id: entClsID,
-      attrType: data
-    }
-  })
+	return request({
+		url: `/attrcls/${entClsID}/list`,
+		method: 'get',
+		params: {
+			id: entClsID,
+			attrType: data
+		}
+	})
 }
 
 /**
@@ -22,17 +23,28 @@ function getAttrClassById(entClsID, data) {
  * @id:id
  */
 
-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 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
+		}
+	})
 }
 
 /**
@@ -41,24 +53,24 @@ function getAttrClassById2 (entClsID, data) {
  * 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
-    }
-  })
+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
+		}
+	})
 }
 
 /**
@@ -67,24 +79,45 @@ function addAttrClass (data) {
  * 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
-    }
-  })
+//旧的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
+		}
+	})
 }
 
 /**
@@ -93,17 +126,28 @@ function updateAttrClass (data) {
  * path:删除的id
  * data:‘’
  */
-function delAttrClass (entClsID) {
-  return ajax({
-    method: 'post',
-    url: '/attrcls/del/{id}',
-    path: {
-      id: entClsID
-    },
-    data: {
-      id: entClsID
-    }
-  })
+//旧的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
+		}
+	})
 }
 
 /**
@@ -112,14 +156,25 @@ function delAttrClass (entClsID) {
  * path:删除的id
  * data:‘’
  */
-function delAttrClassList (attrClsIDs) {
-  return ajax({
-    method: 'post',
-    url: '/attrcls/del/batch',
-    data: {
-      attrClsIDs
-    }
-  })
+//旧的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
+		}
+	})
 }
 
 /**
@@ -129,25 +184,39 @@ function delAttrClassList (attrClsIDs) {
  * @param entClsId
  * @param isModel
  */
-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 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
+	getAttrClassById,
+	getAttrClassById2,
+	addAttrClass,
+	updateAttrClass,
+	delAttrClass,
+	delAttrClassList,
+	updatePublicAttrClass
 }

+ 354 - 72
src/api/temporary/entity new.js

@@ -1,11 +1,12 @@
-import ajax from '../util'
+import request from '@/utils/request'
 
 /**
  * 根据实体类id获取实体列表
  * @param id
  * @returns {*}
  */
-function getEntityListByEntityClassId(id, data) {
+//旧的getEntityListByEntityClassId函数
+/* function getEntityListByEntityClassId(id, data) {
 	return ajax({
 		method: 'get',
 		url: '/ent/{id}/list',
@@ -16,6 +17,16 @@ function getEntityListByEntityClassId(id, data) {
 			id: id,
 		},
 	})
+} */
+//新的getEntityListByEntityClassId函数
+function getEntityListByEntityClassId(id, data) {
+	return request({
+		method: 'get',
+		url: `/ent/${id}/list`,
+		params: {
+			id: id
+		}
+	})
 }
 
 /**
@@ -23,10 +34,22 @@ function getEntityListByEntityClassId(id, data) {
  * @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 ajax({
+	return request({
 		method: 'post',
-		url: '/ent/del/ids',
+		url: `/ent/del/ids`,
 		data: {
 			ids: id,
 			isModel,
@@ -50,10 +73,21 @@ function delEntityById(id, isModel) {
  * @param ids
  * @returns {*}
  */
+//旧的delEntityByIds函数
+// function delEntityByIds(ids) {
+// 	return ajax({
+// 		method: 'post',
+// 		url: '/ent/del/ids',
+// 		data: {
+// 			ids: ids,
+// 		},
+// 	})
+// }
+//新的delEntityByIds函数
 function delEntityByIds(ids) {
-	return ajax({
+	return request({
 		method: 'post',
-		url: '/ent/del/ids',
+		url: `/ent/del/ids`,
 		data: {
 			ids: ids,
 		},
@@ -66,6 +100,33 @@ function delEntityByIds(ids) {
  * @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,
@@ -74,10 +135,12 @@ function addEntity(
 	notNullAttrVOList,
 	isModel
 ) {
-	return ajax({
+	return request({
 		method: 'post',
-		url: '/ent/add',
-		headers: { 'Content-Type': 'application/json;charset=UTF-8' },
+		url: `/ent/add`,
+		headers: {
+			'Content-Type': 'application/json;charset=UTF-8'
+		},
 		data: {
 			entClsID: entClsID,
 			entMemo: entMemo,
@@ -95,16 +158,28 @@ function addEntity(
  * @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 ajax({
+	return request({
 		method: 'get',
-		url: '/ent/{id}',
-		path: {
+		url: `/ent/${id}`,
+		params: {
 			id: id,
-		},
-		data: {
-			isModel,
-		},
+			isModel
+		}
 	})
 }
 
@@ -114,10 +189,25 @@ function getEntityDetailById(id, isModel) {
  * @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 ajax({
+	return request({
 		method: 'post',
-		url: '/ent/update',
+		url: `/ent/update`,
 		data: {
 			entID: entID,
 			entMemo: entMemo, // 可选择传不传
@@ -133,13 +223,24 @@ function updateEntityName(entID, entName, entMemo, 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 ajax({
+	return request({
 		method: 'get',
-		url: 'ent/search/entclses',
-		data: {
-			entName: entName,
-		},
+		url: `ent/search/entclses`,
+		params: {
+			entName: entName
+		}
 	})
 }
 
@@ -148,17 +249,29 @@ function searchEntClsByEntName(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 ajax({
+	return request({
 		method: 'post',
-		url: '/attrcls/none/del/{attrClsID}',
-		path: {
-			attrClsID: attrClsID,
-		},
-		data: {
+		url: `/attrcls/none/del/${attrClsID}`,
+		params: {
 			attrClsID: attrClsID,
-			isModel,
-		},
+			isModel
+		}
 	})
 }
 
@@ -170,10 +283,27 @@ function deleteAttrClassNone(attrClsID, isModel) {
  * @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 ajax({
+	return request({
 		method: 'post',
-		url: '/attr/add/none',
+		url: `/attr/add/none`,
 		data: {
 			entID: data.entID,
 			attrClsMemo: data.attrClsMemo,
@@ -186,17 +316,29 @@ function addEntNoneAttr(data) {
 	})
 }
 
-//
-
 /**
  * 实体待审属性查找接口
  * @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 ajax({
+	return request({
 		method: 'post',
-		url: '/attr/none/list',
+		url: `/attr/none/list`,
 		data: {
 			entID: entID,
 			pagenum: pagenum,
@@ -211,10 +353,21 @@ function getEntNoneList(entID, pagenum, 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 ajax({
+	return request({
 		method: 'post',
-		url: '/attrcls/none/attrs',
+		url: `/attrcls/none/attrs`,
 		data: {
 			attrClsID: attrClsID,
 		},
@@ -226,10 +379,19 @@ function getAttrClassAdjustSearch(attrClsID) {
  * @param data
  * @returns {*}
  */
+//旧的updateAttrNoneName函数
+// function updateAttrNoneName(data) {
+// 	return ajax({
+// 		method: 'post',
+// 		url: '/attr/none/update',
+// 		data: data,
+// 	})
+// }
+//新的updateAttrNoneName函数
 function updateAttrNoneName(data) {
-	return ajax({
+	return request({
 		method: 'post',
-		url: '/attr/none/update',
+		url: `/attr/none/update`,
 		data: data,
 	})
 }
@@ -249,10 +411,19 @@ function updateAttrNoneName(data) {
           }
  * @returns {*}
  */
+//旧的addReferenceEnt函数
+// function addReferenceEnt(entReferenceQuery) {
+// 	return ajax({
+// 		method: 'post',
+// 		url: '/ent/reference/add',
+// 		data: entReferenceQuery,
+// 	})
+// }
+//新的addReferenceEnt函数
 function addReferenceEnt(entReferenceQuery) {
-	return ajax({
+	return request({
 		method: 'post',
-		url: '/ent/reference/add',
+		url: `/ent/reference/add`,
 		data: entReferenceQuery,
 	})
 }
@@ -262,36 +433,73 @@ function addReferenceEnt(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",
+	direction = "BOTH",
 	isModel,
 	entClsIDs,
-    entName,
+	entName,
 	relClsIDs,
-    limitNum=3,
-    entConditionQueries=[]
+	limitNum = 3,
+	entConditionQueries = []
 ) {
-	return ajax({
+	return request({
 		method: 'post',
-		url: '/show/graph',
+		url: `/show/graph`,
 		data: {
 			entId: id,
 			degree,
 			delEntIds,
 			direction,
 			isModel,
-            entName,
+			entName,
 			relClsIDs,
-            limitNum,
-            entConditionQueries: entConditionQueries
+			limitNum,
+			entConditionQueries: entConditionQueries
+		},
+		headers: {
+			'Content-Type': 'application/json;charset=UTF-8'
 		},
-        headers: { 'Content-Type': 'application/json;charset=UTF-8' },
 		json: true,
 	})
 }
+
 /* 
 
             let data = {
@@ -306,27 +514,54 @@ function getRelationEnt(
                 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 ajax({
+	return request({
 		method: 'post',
-		url: '/show/graph',
+		url: `/show/graph`,
 		data: data,
-		headers: { 'Content-Type': 'application/json;charset=UTF-8' },
+		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 ajax({
+	return request({
 		method: 'get',
-		url: '/relcls/all/list/{id}',
-		path: {
+		url: `/relcls/all/list/${id}`,
+		params: {
 			id,
-		},
+		}
 	})
 }
 
@@ -335,20 +570,36 @@ function getRelationClsByEntCls(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 ajax({
+	return request({
 		method: 'get',
-		url: '/entcls/{direction}/{relClsId}/{entId}',
-		path: {
+		url: `/entcls/${direction}/${relClsId}/${entId}`,
+		params: {
 			entId,
 			relClsId,
 			direction,
-		},
-		data: {
 			current,
 			isModel,
 			size,
-		},
+		}
 	})
 }
 
@@ -357,10 +608,19 @@ function getRelationAttr(entId, relClsId, direction, isModel, current, size) {
  * @param data
  * @returns {*}
  */
+//旧的saveEntAttr函数
+// function saveEntAttr(data) {
+// 	return ajax({
+// 		method: 'post',
+// 		url: '/ent/update/batch',
+// 		data: data,
+// 	})
+// }
+//新的saveEntAttr函数
 function saveEntAttr(data) {
-	return ajax({
+	return request({
 		method: 'post',
-		url: '/ent/update/batch',
+		url: `/ent/update/batch`,
 		data: data,
 	})
 }
@@ -370,10 +630,21 @@ function saveEntAttr(data) {
  * @param data
  * @returns {*}
  */
+//旧的exportUnionid函数
+// function exportUnionid() {
+// 	return ajax({
+// 		method: 'post',
+// 		url: '/ent/batch/unionid',
+// 		data: {
+// 			noTimeout: true,
+// 		},
+// 	})
+// }
+//新的exportUnionid函数
 function exportUnionid() {
-	return ajax({
+	return request({
 		method: 'post',
-		url: '/ent/batch/unionid',
+		url: `/ent/batch/unionid`,
 		data: {
 			noTimeout: true,
 		},
@@ -384,10 +655,21 @@ function exportUnionid() {
  * 集成服务导出接口2
  * @returns {*}
  */
+//旧的exportOmsUpload函数
+// function exportOmsUpload() {
+// 	return ajax({
+// 		method: 'post',
+// 		url: '/oms/media/upload',
+// 		data: {
+// 			noTimeout: true,
+// 		},
+// 	})
+// }
+//新的exportOmsUpload函数
 function exportOmsUpload() {
-	return ajax({
+	return request({
 		method: 'post',
-		url: '/oms/media/upload',
+		url: `/oms/media/upload`,
 		data: {
 			noTimeout: true,
 		},

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

@@ -0,0 +1,308 @@
+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
+}

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

@@ -0,0 +1,185 @@
+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
+}

+ 427 - 186
src/api/temporary/entityClass new.js

@@ -1,10 +1,11 @@
-import ajax from '../util'
+import request from '@/utils/request'
 
 /**
  * 删除实体类
  * @param opts
  */
-function delEntityClass (id) {
+//旧的delEntityClass函数
+/* function delEntityClass (id) {
   return ajax({
     method: 'post',
     url: '/entcls/del/{id}',
@@ -12,6 +13,16 @@ function delEntityClass (id) {
       id: id
     }
   })
+} */
+//新的delEntityClass函数
+function delEntityClass(id) {
+	return request({
+		method: 'post',
+		url: `/entcls/del/${id}`,
+		params: {
+			id: id
+		}
+	})
 }
 
 /**
@@ -20,57 +31,103 @@ function delEntityClass (id) {
  * @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
-      
-    }
-  })
+//旧的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
+
+		}
+	})
 }
 
 /**
  * 获取所有实体类列表
  */
-function getAllEntityClass (isIcon) {
-  return ajax({
-    method: 'get',
-    url: '/entcls',
-    data: {
-      isIcon: isIcon
-    }
-  })
+//旧的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
- function getAllEntclsRootTree (){
-   return ajax({
-     method: 'get',
-     url: '/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
  */
-function getEntityClass (id) {
-  return ajax({
-    method: 'get',
-    url: '/entcls/{id}',
-    path: {
-      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
+		}
+	})
 }
 
 /**
@@ -82,19 +139,35 @@ function getEntityClass (id) {
  * @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
-    }
-  })
+//旧的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
+		}
+	})
 }
 
 /**
@@ -103,15 +176,31 @@ function updateEntityClass (type, id, name, entClsMemo, entClsIcon,backGroundCol
  * @param userCode
  * @returns {*}
  */
-function owlFileImport (file) {
-  return ajax({
-    method: 'post',
-    url: '/owl/file/import',
-    headers: {'Content-Type': 'multipart/form-data'},
-    data: {
-      file
-    }
-  })
+//旧的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
+		}
+	})
 }
 
 /**
@@ -119,14 +208,25 @@ function owlFileImport (file) {
  * @param id
  * @returns {*}
  */
-function owlFileExport (id) {
-  return ajax({
-    method: 'get',
-    url: '/owl/file/export',
-    data: {
-      entClsIDs: id
-    }
-  })
+//旧的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
+		}
+	})
 }
 
 /**
@@ -134,14 +234,25 @@ function owlFileExport (id) {
  * @param id
  * @returns {*}
  */
-function entClsTreeLazy (id) {
-  return ajax({
-    method: 'get',
-    url: '/entcls/tree',
-    data: {
-      entClsID: id
-    }
-  })
+//旧的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
+		}
+	})
 }
 
 /**
@@ -149,14 +260,25 @@ function entClsTreeLazy (id) {
  * @param id
  * @returns {*}
  */
-function getEntClsParents (id) {
-  return ajax({
-    method: 'get',
-    url: '/entcls/parents',
-    data: {
-      entClsID: id
-    }
-  })
+//旧的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
+		}
+	})
 }
 
 /**
@@ -164,14 +286,25 @@ function getEntClsParents (id) {
  * @param id
  * @returns {*}
  */
-function getEntClsNoneList (id) {
-  return ajax({
-    method: 'post',
-    url: '/attrcls/none/list',
-    data: {
-      entClsID: id
-    }
-  })
+//旧的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
+		}
+	})
 }
 
 /**
@@ -180,14 +313,29 @@ function getEntClsNoneList (id) {
  * @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
-  })
+//旧的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
+	})
 }
 
 /**
@@ -196,15 +344,25 @@ function getEntClsNoneMerge (data) {
  * @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
-  })
+//旧的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
+	})
 }
 
 /**
@@ -212,14 +370,29 @@ function getEntClsNoneMmove (data) {
  * @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
-  })
+//旧的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
+	})
 }
 
 /**
@@ -228,12 +401,21 @@ function saveAttrNoneAdjust (data) {
  * @param data
  * @returns {*}
  */
-function addPublicAttrCls (data) {
-  return ajax({
-    method: 'post',
-    url: '/entcls/add/public/attrcls',
-    data: data
-  })
+//旧的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
+	})
 }
 
 /**
@@ -241,14 +423,25 @@ function addPublicAttrCls (data) {
  * @param entClsId
  * @returns {*}
  */
-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
+		}
+	})
+} */
+//新的getFlowId函数
+function getFlowId(entClsId) {
+	return ajax({
+		method: 'get',
+		url: `/neural/flow`,
+		data: {
+			entClsId
+		}
+	})
 }
 
 /**
@@ -256,14 +449,25 @@ function getFlowId (entClsId) {
  * @param entClsID
  * @returns {*}
  */
-function getEntClsPrefixList (entClsID) {
-  return ajax({
-    method: 'get',
-    url: '/entcls/prefix/tree',
-    data: {
-      entClsID
-    }
-  })
+//旧的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
+		}
+	})
 }
 
 /**
@@ -272,15 +476,27 @@ function getEntClsPrefixList (entClsID) {
  * @param entClsPrefix
  * @returns {*}
  */
-function updateEntClsPrefix (entClsID, entClsPrefix) {
-  return ajax({
-    method: 'post',
-    url: '/entcls/prefix/update',
-    data: {
-      entClsID,
-      entClsPrefix
-    }
-  })
+//旧的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
+		}
+	})
 }
 
 /**
@@ -289,15 +505,27 @@ function updateEntClsPrefix (entClsID, entClsPrefix) {
  * @param entClsConfig
  * @returns {*}
  */
-function updateEntClsConfig (entClsID, entClsConfig) {
-  return ajax({
-    method: 'post',
-    url: '/entcls/config/update',
-    data: {
-      entClsID,
-      entClsConfig
-    }
-  })
+//旧的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
+		}
+	})
 }
 
 /**
@@ -305,37 +533,50 @@ function updateEntClsConfig (entClsID, entClsConfig) {
  * @param message
  * @returns {*}
  */
-function clearDatabase (message, clientType) {
-  return ajax({
-    method: 'post',
-    url: '/vertex/all/drop',
-    data: {
-      message,
-      clientType,
-      noTimeout: true
-    }
-  })
+//旧的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
+	addPublicAttrCls,
+	saveAttrNoneAdjust,
+	getEntClsNoneMmove,
+	getEntClsNoneMerge,
+	getEntClsNoneList,
+	getEntClsParents,
+	entClsTreeLazy,
+	owlFileExport,
+	owlFileImport,
+	delEntityClass,
+	addEntityClass,
+	getAllEntityClass,
+	getEntityClass,
+	updateEntityClass,
+	getFlowId,
+	getAllEntclsRootTree,
+	getEntClsPrefixList,
+	updateEntClsPrefix,
+	updateEntClsConfig,
+	clearDatabase
 }

+ 179 - 44
src/api/temporary/relationClass new.js

@@ -1,11 +1,12 @@
-import ajax from '../util'
+import request from '@/utils/request'
 
 /**
  * 获得指定实体类为起点的所有关系类列表
  * @param id
  * @returns {*}
  */
-function getAllRelationClassList (id, entClsType) {
+//旧的getAllRelationClassList函数
+/* function getAllRelationClassList (id, entClsType) {
   return ajax({
     method: 'get',
     url: '/relcls/{id}/list',
@@ -16,6 +17,17 @@ function getAllRelationClassList (id, entClsType) {
       entClsType: entClsType,
     }
   })
+} */
+//新的getAllRelationClassList函数
+function getAllRelationClassList(id, entClsType) {
+	return request({
+		method: 'get',
+		url: `/relcls/${id}/list`,
+		params: {
+			id: id,
+			entClsType: entClsType,
+		}
+	})
 }
 
 /**
@@ -23,7 +35,8 @@ function getAllRelationClassList (id, entClsType) {
  * @param id
  * @returns {*}
  */
-function deleteRelationClass (id) {
+//旧的deleteRelationClass函数
+/* function deleteRelationClass (id) {
   return ajax({
     method: 'post',
     url: '/relcls/del/{id}',
@@ -31,6 +44,16 @@ function deleteRelationClass (id) {
       id: id
     }
   })
+} */
+//新的deleteRelationClass函数
+function deleteRelationClass(id) {
+	return request({
+		method: 'post',
+		url: `/relcls/del/${id}`,
+		params: {
+			id: id
+		}
+	})
 }
 
 /**
@@ -38,7 +61,8 @@ function deleteRelationClass (id) {
  * @param name
  * @returns {*}
  */
-function getAllRelationClassListByName (name, isModel, current, size) {
+//旧的getAllRelationClassListByName函数
+/* function getAllRelationClassListByName (name, isModel, current, size) {
   return ajax({
     method: 'get',
     url: '/relcls/list',
@@ -49,6 +73,19 @@ function getAllRelationClassListByName (name, isModel, current, size) {
       isModel
     }
   })
+} */
+//新的getAllRelationClassListByName函数
+function getAllRelationClassListByName(name, isModel, current, size) {
+	return request({
+		method: 'get',
+		url: `/relcls/list`,
+		data: {
+			name: name,
+			current,
+			size,
+			isModel
+		}
+	})
 }
 
 /**
@@ -56,12 +93,21 @@ function getAllRelationClassListByName (name, isModel, current, size) {
  * @param data
  * @returns {*}
  */
-function editRelationClass (data) {
+//旧的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
+	})
 }
 
 /**
@@ -69,12 +115,21 @@ function editRelationClass (data) {
  * @param data
  * @returns {*}
  */
-function addRelationClass (data) {
+//旧的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
+	})
 }
 
 /**
@@ -82,12 +137,21 @@ function addRelationClass (data) {
  * @param data
  * @returns {*}
  */
-function addEntityRelation (data) {
+//旧的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
+	})
 }
 
 /**
@@ -95,7 +159,8 @@ function addEntityRelation (data) {
  * @param relID, isModel
  * @returns {*}
  */
-function deleteEntityRelation (relID, isModel) {
+//旧的deleteEntityRelation函数
+/* function deleteEntityRelation (relID, isModel) {
   return ajax({
     method: 'post',
     url: '/rel/del/{id}',
@@ -107,27 +172,55 @@ function deleteEntityRelation (relID, isModel) {
       isModel
     }
   })
+} */
+//新的deleteEntityRelation函数
+function deleteEntityRelation(relID, isModel) {
+	return request({
+		method: 'post',
+		url: `/rel/del/${id}`,
+		params: {
+			id: relID,
+			isModel
+		}
+	})
 }
 
 /**
  * 查找所有关系类
  * */
-function getAllRelationClass () {
+//旧的getAllRelationClass函数
+/* function getAllRelationClass () {
   return ajax({
     method: 'post',
     url: '/relcls/getall'
   })
+} */
+//新的getAllRelationClass函数
+function getAllRelationClass() {
+	return request({
+		method: 'post',
+		url: `/relcls/getall`
+	})
 }
 
 /**
  * 批量新增实体关系
  * */
-function addRelBatch (data) {
+//旧的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
+	})
 }
 
 /**
@@ -135,7 +228,8 @@ function addRelBatch (data) {
  * @param relClsId direction isModel current size
  * @returns {*}
  */
-function getRelclsUnpoint(relClsId, direction, entId, isModel, current, size) {
+//旧的getEntityListByEntityClassId函数
+/* function getRelclsUnpoint(relClsId, direction, entId, isModel, current, size) {
   return ajax({
     method: 'get',
     url: '/relcls/{direction}/{relClsId}/unpoint/{entId}',
@@ -150,6 +244,21 @@ function getRelclsUnpoint(relClsId, direction, entId, isModel, current, size) {
       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
+		}
+	})
 }
 
 /**
@@ -157,46 +266,72 @@ function getRelclsUnpoint(relClsId, direction, entId, isModel, current, size) {
  * @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 ajax({
-    method: 'get',
-    url: '/relcls/{direction}/{relClsId}/ent/{entId}',
-    data: {
-      entName,
-      current,
-      size,
-      isModel
-    },
-    path: {
-      direction,
-      relClsId,
-      entId
-    }
-  })
+	return request({
+		method: 'get',
+		url: `/relcls/${direction}/${relClsId}/ent/${entId}`,
+		params: {
+			entName,
+			current,
+			size,
+			isModel,
+			direction,
+			relClsId,
+			entId
+		}
+	})
 }
 
 /**
  * 批量编辑实体关系
  * */
-function editRelBatch (data) {
-  return ajax({
-    method: 'post',
-    url: '/relattr/update/batch',
-    data: data
-  })
+//旧的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
+	addRelationClass,
+	getAllRelationClassList,
+	deleteRelationClass,
+	getAllRelationClassListByName,
+	editRelationClass,
+	deleteEntityRelation,
+	addEntityRelation,
+	getAllRelationClass,
+	addRelBatch,
+	getRelclsUnpoint,
+	editRelBatch,
+	getRelclsEnt
 }

+ 96 - 13
src/api/temporary/relationEditor new.js

@@ -1,9 +1,10 @@
-import ajax from '../util'
+import request from '@/utils/request'
 
 /**
  * 通过id获取关系属性
  */
-function getRelationAttr (path) {
+//旧的getRelationAttr函数
+/* function getRelationAttr (path) {
   return ajax({
     method: 'get',
     url: '/relcls/{id}/attrs',
@@ -14,12 +15,23 @@ function getRelationAttr (path) {
       id: path
     }
   })
+} */
+//新的getRelationAttr函数
+function getRelationAttr(path) {
+	return request({
+		method: 'get',
+		url: `/relcls/${id}/attrs`,
+		params: {
+			id: path
+		}
+	})
 }
 
 /**
  * 新增关系属性
  */
-function addRelationAttr (data) {
+//旧的addRelationAttr函数
+/* function addRelationAttr (data) {
   return ajax({
     method: 'post',
     url: '/relcls/attrcls/add',
@@ -32,13 +44,29 @@ function addRelationAttr (data) {
       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
  */
-function updateRelationAttr (data) {
+//旧的updateRelationAttr函数
+/* function updateRelationAttr (data) {
   return ajax({
     method: 'post',
     url: '/relattr/update',
@@ -51,12 +79,28 @@ function updateRelationAttr (data) {
       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
+		}
+	})
 }
 
 /**
  * 修改关系类属性
  */
-function updateRelationClassAttr (data) {
+//旧的updateRelationClassAttr函数
+/* function updateRelationClassAttr (data) {
   return ajax({
     method: 'post',
     url: '/relcls/attrcls/update',
@@ -69,12 +113,28 @@ function updateRelationClassAttr (data) {
       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
+		}
+	})
 }
 
 /**
  * 删除关系类下的关系属性
  */
-function delRelationAttr (path) {
+//旧的delRelationAttr函数
+/* function delRelationAttr (path) {
   return ajax({
     method: 'post',
     url: '/relcls/attrcls/del/{id}',
@@ -83,6 +143,17 @@ function delRelationAttr (path) {
     },
     data: {}
   })
+} */
+//新的delRelationAttr函数
+function delRelationAttr(path) {
+	return request({
+		method: 'post',
+		url: `/relcls/attrcls/del/${path}`,
+		path: {
+			id: path
+		},
+		data: {}
+	})
 }
 
 /**
@@ -90,7 +161,8 @@ function delRelationAttr (path) {
  * @param id
  * @returns {*}
  */
-function getRelationListByEntityClassId (id, entClsType) {
+//旧的getRelationListByEntityClassId函数
+/* function getRelationListByEntityClassId (id, entClsType) {
   return ajax({
     method: 'get',
     url: '/relcls/{id}/list',
@@ -101,13 +173,24 @@ function getRelationListByEntityClassId (id, entClsType) {
       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
+	getRelationAttr,
+	addRelationAttr,
+	updateRelationAttr,
+	updateRelationClassAttr,
+	delRelationAttr,
+	getRelationListByEntityClassId
 }

+ 184 - 37
src/api/temporary/search new.js

@@ -1,4 +1,4 @@
-import ajax from '../util'
+import request from '@/utils/request'
 
 /**
  * 根据实体查询
@@ -9,7 +9,8 @@ import ajax from '../util'
  * @param isModel
  * @returns {*}
  */
-function entSearch(searchStr, entClsIDs, pagenum, pagesize, isModel, isIcon, searchType) {
+//旧的entSearch函数
+/* function entSearch(searchStr, entClsIDs, pagenum, pagesize, isModel, isIcon, searchType) {
     return ajax({
         method: 'get',
         url: '/ent/entquery',
@@ -23,6 +24,22 @@ function entSearch(searchStr, entClsIDs, pagenum, pagesize, isModel, isIcon, sea
             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
+		}
+	})
 }
 
 /**
@@ -33,7 +50,8 @@ function entSearch(searchStr, entClsIDs, pagenum, pagesize, isModel, isIcon, sea
  * @param pagesize
  * @returns {*}
  */
-function relSearch(searchStr, entClsIDs, pagenum, pagesize) {
+//旧的relSearch函数
+/* function relSearch(searchStr, entClsIDs, pagenum, pagesize) {
     return ajax({
         method: 'get',
         url: '/rel/relquery',
@@ -44,6 +62,19 @@ function relSearch(searchStr, entClsIDs, pagenum, pagesize) {
             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
+		}
+	})
 }
 
 /**
@@ -54,7 +85,8 @@ function relSearch(searchStr, entClsIDs, pagenum, pagesize) {
  * @param pagesize
  * @returns {*}
  */
-function kHopSearch(entID, maxHops, pagenum, pagesize) {
+//旧的kHopSearch函数
+/* function kHopSearch(entID, maxHops, pagenum, pagesize) {
     return ajax({
         method: 'get',
         url: '/ent/khopquery',
@@ -65,6 +97,19 @@ function kHopSearch(entID, maxHops, pagenum, pagesize) {
             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
+		}
+	})
 }
 
 /**
@@ -72,8 +117,8 @@ function kHopSearch(entID, maxHops, pagenum, pagesize) {
  * @param tagName
  * @returns {*}
  */
-
-function getTag(tagName) {
+//旧的getTag函数
+/* function getTag(tagName) {
     return ajax({
         method: 'get',
         url: '/tag/searchtagname',
@@ -81,16 +126,25 @@ function getTag(tagName) {
             tagName: tagName
         }
     })
+} */
+//新的getTag函数
+function getTag(tagName) {
+	return request({
+		method: 'get',
+		url: `/tag/searchtagname`,
+		data: {
+			tagName: tagName
+		}
+	})
 }
 
-
 /**
  * 测试目标查询
  * @param entName
  * @returns {*}
  */
-
-function testTargetQuery(entName) {
+//旧的testTargetQuery函数
+/* function testTargetQuery(entName) {
     return ajax({
         method: 'get',
         url: '/activity/target/search/name',
@@ -98,6 +152,16 @@ function testTargetQuery(entName) {
             entName: entName
         }
     })
+} */
+//新的testTargetQuery函数
+function testTargetQuery(entName) {
+	return request({
+		method: 'get',
+		url: `/activity/target/search/name`,
+		data: {
+			entName: entName
+		}
+	})
 }
 
 /**
@@ -106,8 +170,8 @@ function testTargetQuery(entName) {
  * @param entName
  * @returns {*}
  */
-
-function testActivityQuery(targetEntId, entName) {
+//旧的testActivityQuery函数
+/* function testActivityQuery(targetEntId, entName) {
     return ajax({
         method: 'get',
         url: '/activity/search/name',
@@ -116,6 +180,17 @@ function testActivityQuery(targetEntId, entName) {
             targetEntId: targetEntId
         }
     })
+} */
+//新的testActivityQuery函数
+function testActivityQuery(targetEntId, entName) {
+	return request({
+		method: 'get',
+		url: `/activity/search/name`,
+		data: {
+			entName: entName,
+			targetEntId: targetEntId
+		}
+	})
 }
 
 /**
@@ -124,7 +199,8 @@ function testActivityQuery(targetEntId, entName) {
  * @param entName
  * @returns {*}
  */
-function activityform(activityEntId) {
+//旧的activityform函数
+/* function activityform(activityEntId) {
     return ajax({
         method: 'get',
         url: '/activity/ent',
@@ -132,16 +208,26 @@ function activityform(activityEntId) {
             activityEntId
         }
     })
+} */
+//新的activityform函数
+function activityform(activityEntId) {
+	return request({
+		method: 'get',
+		url: `/activity/ent`,
+		data: {
+			activityEntId
+		}
+	})
 }
 
-
 /**
  * 测试活动表格
  * @param targetEntId
  * @param Name
  * @returns {*}
  */
-function activityChildren(activityEntId) {
+//旧的activityChildren函数
+/* function activityChildren(activityEntId) {
     return ajax({
         method: 'get',
         url: '/activity/ent/child',
@@ -149,15 +235,25 @@ function activityChildren(activityEntId) {
             activityEntId
         }
     })
+} */
+//新的activityChildren函数
+function activityChildren(activityEntId) {
+	return ajax({
+		method: 'get',
+		url: `/activity/ent/child`,
+		data: {
+			activityEntId
+		}
+	})
 }
 
-
 /**
  * 测试主体
  * @param targetEntId
  * @returns {*}
  */
-function subjectInterface(targetEntId) {
+//旧的subjectInterface函数
+/* function subjectInterface(targetEntId) {
     return ajax({
         method: 'get',
         url: '/activity/main',
@@ -165,6 +261,16 @@ function subjectInterface(targetEntId) {
             targetEntId
         }
     })
+} */
+//新的subjectInterface函数
+function subjectInterface(targetEntId) {
+	return request({
+		method: 'get',
+		url: `/activity/main`,
+		data: {
+			targetEntId
+		}
+	})
 }
 
 /**
@@ -175,8 +281,8 @@ function subjectInterface(targetEntId) {
  * @param tagIDs
  * @returns {*}
  */
-
-function getTagentList(labels, pagenum, pagesize, tagIDs) {
+//旧的getTagentList函数
+/* function getTagentList(labels, pagenum, pagesize, tagIDs) {
     return ajax({
         method: 'get',
         url: '/tag/tagentlist',
@@ -187,25 +293,46 @@ function getTagentList(labels, pagenum, pagesize, tagIDs) {
             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 {*}
  */
-function initTestTarget() {
+//旧的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 {*}
  */
-function downloadTargetJson(id) {
+//旧的downloadTargetJson函数
+/* function downloadTargetJson(id) {
     return ajax({
         method: 'get',
         path: {
@@ -213,14 +340,24 @@ function downloadTargetJson(id) {
         },
         url: '/activity/json/download/{id}'
     })
+} */
+//新的downloadTargetJson函数
+function downloadTargetJson(id) {
+	return request({
+		method: 'get',
+		params: {
+			id: id
+		},
+		url: `/activity/json/download/${id}`
+	})
 }
 
-
 /**
  * 上传方案接口
  * @returns {*}
  */
- function uploadButton(file) {
+//旧的uploadButton函数
+/* function uploadButton(file) {
     return ajax({
         method: 'post',
         path: {
@@ -228,20 +365,30 @@ function downloadTargetJson(id) {
         },
         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
-}
+	entSearch,
+	relSearch,
+	kHopSearch,
+	getTag,
+	getTagentList,
+	testTargetQuery,
+	testActivityQuery,
+	activityform,
+	activityChildren,
+	subjectInterface,
+	initTestTarget,
+	downloadTargetJson,
+	uploadButton
+}

+ 45 - 10
src/api/temporary/tag new.js

@@ -1,12 +1,12 @@
-import ajax from '../util'
+import request from '@/utils/request'
 
 /**
  * 获得指定节点(实体,实体类)的tags列表
  * @param vertexId
  * @id:id
  */
-
-function getTagList(vertexId, isModel) {
+//旧的getTagList函数
+/* function getTagList(vertexId, isModel) {
   return ajax({
     method: 'get',
     url: '/tag/{vertexId}/taglist',
@@ -17,6 +17,17 @@ function getTagList(vertexId, isModel) {
       isModel
     }
   })
+} */
+//新的getTagList函数
+function getTagList(vertexId, isModel) {
+	return request({
+		method: 'get',
+		url: `/tag/${vertexId}/taglist`,
+		params: {
+			vertexId,
+			isModel
+		}
+	})
 }
 
 /**
@@ -25,8 +36,8 @@ function getTagList(vertexId, isModel) {
  * @param tagName
  * @id:id
  */
-
-function addTag(vertexId, tagName, isModel) {
+//旧的addTag函数
+/* function addTag(vertexId, tagName, isModel) {
   return ajax({
     method: 'post',
     url: '/tag/add',
@@ -36,6 +47,18 @@ function addTag(vertexId, tagName, isModel) {
       isModel
     }
   })
+} */
+//新的addTag函数
+function addTag(vertexId, tagName, isModel) {
+	return request({
+		method: 'post',
+		url: `/tag/add`,
+		data: {
+			vertexId,
+			tagName,
+			isModel
+		}
+	})
 }
 
 /**
@@ -44,8 +67,8 @@ function addTag(vertexId, tagName, isModel) {
  * @param tagName
  * @id:id
  */
-
-function deleteTag(vertexId, tagName, isModel) {
+//旧的deleteTag函数
+/* function deleteTag(vertexId, tagName, isModel) {
   return ajax({
     method: 'post',
     url: '/tag/del',
@@ -55,10 +78,22 @@ function deleteTag(vertexId, tagName, isModel) {
       isModel
     }
   })
+} */
+//新的deleteTag函数
+function deleteTag(vertexId, tagName, isModel) {
+	return request({
+		method: 'post',
+		url: `/tag/del`,
+		data: {
+			vertexId,
+			tagName,
+			isModel
+		}
+	})
 }
 
 export {
-  getTagList,
-  addTag,
-  deleteTag
+	getTagList,
+	addTag,
+	deleteTag
 }