| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- import { defHttp } from '/@/utils/http/axios';
- import { AesEncryption } from '/@/utils/cipher';
- import { loginCipher } from '/@/settings/encryptionSetting';
- enum Api {
- getDevice = '/monitor/device',
- getCameraUrl = '/monitor/camera/queryByCameraCode',
- devicecontrol = '/safety/ventanalyMonitorData/devicecontrol_ssl',
- insertSyncRule = '/ventanaly-device/synccontrol/upcoming/saveOrUpdateRule',
- upcoming = '/ventanaly-device/synccontrol/upcoming',
- GetSyncRule='/ventanaly-device/synccontrol/upcoming/GetSyncRule',
- GetSyncRuleOperationLog='/ventanaly-device/synccontrol/upcoming/GetSyncRuleOperationLog',
- GetSyncRuleExecLog='/ventanaly-device/synccontrol/upcoming/GetSyncRuleExecLog'
- }
- /**
- * 风门列表
- * @param params
- */
- export const getDevice = (params) => defHttp.post({ url: Api.getDevice, params });
- export const cameraAddr = (params) => defHttp.get({ url: Api.getCameraUrl, params });
- /**
- *同步开启/同步关闭
- * @param params
- */
- export const devicecontrol = (params) => {
- // 加密password
- const encryption = new AesEncryption({ key: loginCipher.key, iv: loginCipher.iv });
- params.password = encryption.encryptByAES(params.password);
- return defHttp.put({ url: Api.devicecontrol, params });
- };
- /**
- * 定时设置-读取规则
- * @param params
- */
- export const GetSyncRule = (params) => defHttp.post({ url: Api.GetSyncRule, params });
- /**
- * 定时设置-修改规则
- * @param params
- */
- export const insertSyncRule = (params) => {
- // 加密password
- //const encryption = new AesEncryption({ key: loginCipher.key, iv: loginCipher.iv });
- //params.password = encryption.encryptByAES(params.password);
- return defHttp.post({ url: Api.insertSyncRule, params });
- };
- //读取未来30秒内的预告
- export const upcoming = (params) => defHttp.get({ url: Api.upcoming, params });
- //读取规则日志
- export const GetSyncRuleOperationLog = (params) => defHttp.get({ url: Api.GetSyncRuleOperationLog, params });
- //读取集控风门操作日志
- export const GetSyncRuleExecLog = (params) => defHttp.get({ url: Api.GetSyncRuleExecLog, params });
|