|
@@ -1,18 +1,215 @@
|
|
|
+import { baseHttpUtils } from "@/utils/http/baseHttpUtils";
|
|
|
class ScanController {
|
|
|
- static async getEquipNotInSys() {}
|
|
|
- static async getEquipInSys() {}
|
|
|
- static async getEquipBelongs() {}
|
|
|
- static async sysLinkEquip() {}
|
|
|
- static async BeatchQueryParam() {}
|
|
|
- static async deleteEquip() {}
|
|
|
- static async updateEquip() {}
|
|
|
- static async zoneQuery() {}
|
|
|
- static async TypePartsDie() {}
|
|
|
- static async queryDownloadsKey() {}
|
|
|
- static async equipTemplate() {}
|
|
|
- static async queryProperty() {}
|
|
|
- static async querySysLinkBuild() {}
|
|
|
- static async equipLinkSys() {}
|
|
|
- static async getAllProject(params?: any, fn?: any) {}
|
|
|
+ static http = new baseHttpUtils();
|
|
|
+
|
|
|
+ static async getEquipNotInSys(params, fn) {
|
|
|
+ const res = await ScanController.http.postRequest(`/equip-component/equip-query/equip-sys?sysId=${params.sysId}`, params)
|
|
|
+ fn(res);
|
|
|
+ }
|
|
|
+ static async getEquipInSys(params, fn) {
|
|
|
+ const res = await ScanController.http.postRequest(`/equip-component/equip-query/sys-equip`, params)
|
|
|
+ fn(res);
|
|
|
+ }
|
|
|
+ static async sysLinkEquip(params, fn) {
|
|
|
+ const res = await ScanController.http.postRequest(`/datacenter/rel/sy-in-eq/link-sy-eq`, params)
|
|
|
+ fn(res);
|
|
|
+ return res
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *@description: 获取设定参数和动态参数
|
|
|
+
|
|
|
+ *@param {*} params
|
|
|
+
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async BeatchQueryParam(params, fn) {
|
|
|
+ let data = params.data
|
|
|
+ const res = await ScanController.http.postRequest(`/rwd/iot/data/current?projectId=${params.projectId}&groupCode=${params.groupCode}&appId=${params.appId}`, data)
|
|
|
+ fn(res);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+
|
|
|
+ *@description: 根据条件查询项目下设备部件数量
|
|
|
+
|
|
|
+ *@param {*} params
|
|
|
+
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async countPartsDie(params) {
|
|
|
+ const res = await ScanController.http.postRequest('/equip-component/equip-query/count', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+
|
|
|
+ *@description: 根据设备或部件批量创建资产
|
|
|
+
|
|
|
+ *@param {*}
|
|
|
+
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async createPropertys(params) {
|
|
|
+ return await ScanController.http.postRequest('/equip-component/equip-query/creat-propertys', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+
|
|
|
+ *@description: 根据id删除资产信息
|
|
|
+
|
|
|
+ *@param {*}
|
|
|
+
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async deleteProperty(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/property/delete', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+
|
|
|
+ *@description: 查询资产 同时关联设备信息
|
|
|
+
|
|
|
+ *@param {*}
|
|
|
+
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async propertyLinkEq(params) {
|
|
|
+ return await ScanController.http.postRequest('/equip-component/property/property-query', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ @description: 修改资产的附件功能
|
|
|
+ @param {*}
|
|
|
+ @return {*}
|
|
|
+ */
|
|
|
+ static async propertyUpdate(params) {
|
|
|
+ return await ScanController.http.postRequest('/equip-component/property/update', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *@description: 查询资产
|
|
|
+ *@param {*}
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async queryProperty(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/property/query', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *@description: 更新资产信息
|
|
|
+ *@param {*}
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async updateProperty(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/property/update', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *@description: 删除系统信息
|
|
|
+ *@param {*}
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async deleteGeneralSys(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/general-system/delete', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+
|
|
|
+ *@description: 更新系统信息
|
|
|
+ *@param {*}
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async updateGeneralSys(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/general-system/update', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ @description: 创建资产所需(Family族id3位编码)-根据设备类型(4位编码)或部件类型(6位编码)查询,!!设备与设备族的关系
|
|
|
+ @param {*}
|
|
|
+ @return {*}
|
|
|
+ */
|
|
|
+ static async getEquipBelongs(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/dict/family/query', params)
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ @description: 查询建筑信息
|
|
|
+ @param {*}
|
|
|
+ @return {*}
|
|
|
+ */
|
|
|
+ static async buildingQuery(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/building/query', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ @description: 关系-竖井所在建筑
|
|
|
+ @param {*}
|
|
|
+ @return {*}
|
|
|
+ */
|
|
|
+ static async shaftLinkBuild(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/rel/sh-in-bd/link-bd', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *@description: 查询系统信息 - 建筑楼层 - 系统一对多
|
|
|
+ *@param {*} params
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async querySysLinkBuild(params, fn) {
|
|
|
+ let url = '/datacenter/object/general-system/query-new';
|
|
|
+ if (params.buildingId) {
|
|
|
+ url += `?buildingId=${params.buildingId}`
|
|
|
+ }
|
|
|
+ if (params.floorId) {
|
|
|
+ url += `&floorId=${params.floorId}`
|
|
|
+ }
|
|
|
+ const res = await ScanController.http.postRequest(url, params);
|
|
|
+ fn(res);
|
|
|
+ }
|
|
|
+ static async countGeneralSys(params: any, fn: any) {
|
|
|
+ const res = await ScanController.http.postRequest('/datacenter/object/general-system/count', params)
|
|
|
+ fn(res);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *@description: 获取楼层信息
|
|
|
+ *@param {*}
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async getFloorMsgByFloorID(params?: any) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/floor/query', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *@description: //设备清单 - 查询系统关联专业 - 查询系统信息 - 查询系统所属专业类型
|
|
|
+ *@param {*}
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async queryLinkSys(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/general-system/query', params)
|
|
|
+ }
|
|
|
+ static async getAllProject(params, fn) {
|
|
|
+ const res = await ScanController.http.postRequest('/datacenter/object/project/query/obj', params)
|
|
|
+ fn(res)
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description: 创建系统所在建筑关系,系统一对多,覆盖
|
|
|
+ * @param {*} params
|
|
|
+ * @param {*} fn
|
|
|
+ * @return {*}
|
|
|
+ */
|
|
|
+ static async sysRelateBuild(params, fn) {
|
|
|
+ const res = await ScanController.http.postRequest('/datacenter/rel/sy-in-bd/link-bd', params);
|
|
|
+ fn();
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @description: 创建系统所在建筑关系,系统一对多,覆盖
|
|
|
+ * @param {*} params
|
|
|
+ * @param {*} fn
|
|
|
+ * @return {*}
|
|
|
+ */
|
|
|
+ static async sysRelateFloor(params, fn) {
|
|
|
+ const res = await ScanController.http.postRequest('/datacenter/rel/sy-in-fl/link-fl', params);
|
|
|
+ fn();
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+/**
|
|
|
+ * @description: 设备清单 - 根据对象删除系统和设备的关系
|
|
|
+ * @param {*}
|
|
|
+ * @return {*}
|
|
|
+ */
|
|
|
+ static async sysUnlinkEquip(params, fn) {
|
|
|
+ const res = await ScanController.http.postRequest('/datacenter/sy-in-eq/unlinks-sy-eq', params);
|
|
|
+ fn();
|
|
|
+ return res;
|
|
|
}
|
|
|
-export default ScanController;
|
|
|
+
|
|
|
+}
|
|
|
+export default ScanController;
|