|
@@ -0,0 +1,79 @@
|
|
|
+import {get, post, request } from './request'
|
|
|
+
|
|
|
+let point = '/pointconfig'
|
|
|
+
|
|
|
+//添加数据源信息
|
|
|
+export function createDataSource(param, success) {
|
|
|
+ let data = param
|
|
|
+ return post(`${point}/datasource/create`, data, success)
|
|
|
+}
|
|
|
+
|
|
|
+//根据id删除数据源
|
|
|
+export function delDataSource(param, success) {
|
|
|
+ let data = param
|
|
|
+ return post(`${point}/datasource/delete`, data, success)
|
|
|
+}
|
|
|
+
|
|
|
+//查询数据源信息
|
|
|
+export function queryDataSource(param, success) {
|
|
|
+ let data = param
|
|
|
+ return post(`${point}/datasource/query`, data, success)
|
|
|
+}
|
|
|
+
|
|
|
+//查询数据源信息-包含统计信息
|
|
|
+export function queryDataSourceCount(param, success) {
|
|
|
+ let data = param
|
|
|
+ return post(`${point}/datasource/queryWithCount`, data, success)
|
|
|
+}
|
|
|
+
|
|
|
+//更新数据源信息
|
|
|
+export function updateDataSource(param, success) {
|
|
|
+ let data = param
|
|
|
+ return post(`${point}/datasource/update`, data, success)
|
|
|
+}
|
|
|
+
|
|
|
+/** --------------任何点位接口必传一个type--------------------- */
|
|
|
+//查询point list
|
|
|
+export function queryPoint(param, success) {
|
|
|
+ let data = param.data
|
|
|
+ return post(`${point}/point/${param.type}/query`, data, success)
|
|
|
+}
|
|
|
+
|
|
|
+//更新point
|
|
|
+export function updatePoint(param, success) {
|
|
|
+ let data = param.data,
|
|
|
+ key;
|
|
|
+ data.Projection = []
|
|
|
+ data.Content.map(item => {
|
|
|
+ for (key in item) {
|
|
|
+ if (data.Projection.indexOf(key) == -1) {
|
|
|
+ data.Projection.push(key)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return post(`${point}/point/${param.type}/update`, data, success)
|
|
|
+}
|
|
|
+
|
|
|
+//删除point
|
|
|
+export function deletePoint(param, success) {
|
|
|
+ let data = param.data
|
|
|
+ return post(`${point}/point/${param.type}/delete`, data, success)
|
|
|
+}
|
|
|
+
|
|
|
+//添加point
|
|
|
+export function createPoint(param, success) {
|
|
|
+ let data = param.data
|
|
|
+ return post(`${point}/point/${param.type}/create`, data, success)
|
|
|
+}
|
|
|
+
|
|
|
+//发现关键字(设备参数)
|
|
|
+export function findKeysWord(param, success) {
|
|
|
+ let data = param.data
|
|
|
+ return post(`${point}/point/${param.type}/next-equipment-parameter`, data, success)
|
|
|
+}
|
|
|
+
|
|
|
+//发现关键字(设备类型)
|
|
|
+export function findKeysWordType(param, success) {
|
|
|
+ let data = param.data
|
|
|
+ return post(`${point}/point/${param.type}/next-equipment-type`, data, success)
|
|
|
+}
|