123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- import { http } from "@/common/service/service.js";
- import configService from "@/common/service/config.service.js";
- import buildURL from "@/common/luch-request/helpers/buildURL.js";
- const apiService = {
-
- login(params) {
- return http.post("/sys/mLogin", params);
- },
-
- getPermission(params) {
- return http.get("/sys/permissionNew/getUserPermissionByToken", params);
- },
-
-
-
-
-
-
-
-
-
-
-
-
-
- validateCasLogin(to,params) {
- var url = to+"/sys/cas/client/validateLogin"+params;
-
-
-
-
-
-
-
-
-
- console.log("validateCasLogin url============"+url)
- return http.get(url,{});
- },
-
- phoneNoLogin(params) {
- return http.post("/sys/phoneLogin", params);
- },
-
- logout(params) {
- return http.post("/sys/logout", params);
- },
-
- getDeviceType(params) {
- return http.get(
- "/safety/ventanalyDeviceInfo/DeviceKind/queryBySystem",
- params
- );
- },
-
- getShowColum(params) {
- return http.get("/safety/ventanalyShowColum/show_colum", params);
- },
-
- getDictItems(params) {
- const url = buildURL(
- "/sys/api/getDictItems",
- params
- );
- return http.get(url);
- },
-
- getDeviceMonitor(params) {
- return http.post("/monitor/device", params);
- },
-
- getShowColumList(params) {
-
-
- const url = buildURL("/safety/ventanalyShowColum/list", params);
- return http.get(url);
- },
-
- controlDevice(params) {
- return http.put(
- "/ventanaly-device/safety/ventanalyMonitorData/devicecontrol",
- params
- );
- },
-
- getCameraById(params) {
-
-
- const url = buildURL("/safety/ventanalyCamera/list", params);
- return http.get(url);
- },
-
- getCameraByCode(params) {
-
-
-
- const url = buildURL("/ventanaly-device/camera/queryByCameraCode", params);
- return http.get(url);
- },
-
- getGas(params) {
- const url = buildURL(
- "/safety/gasDayReport/list",
- params
- );
- return http.get(url);
- },
-
- getSelect(params) {
- const url = buildURL(
- "/safety/gasDayReport/getGasAddressList",
- params
- );
- return http.get(url);
- },
-
- getAdd(params) {
- return http.post("/safety/gasDayReport/add", params);
- },
-
- getEdit(params) {
- return http.post("/safety/gasDayReport/edit", params);
- },
-
- delGas(params) {
- const url = buildURL("/safety/gasDayReport/delete", params);
- return http.delete(url);
- },
-
- getDeviceHistory(params) {
- const url = buildURL(
- "/ventanaly-device/safety/ventanalyMonitorData/listdays",
- params
- );
- return http.get(url);
- },
-
- getOpreateHistory(params) {
- const url = buildURL(
- "/ventanaly-device/safety/ventanalyDevicesetLog/list",
- params
- );
- return http.get(url);
- },
-
- getFileInfo(params) {
- return http.post("/ventanaly-sharefile/fileServer/list", params);
- },
-
- getWarnInfo(params) {
- return http.get("/safety/ventanalyAlarmLog/total", params);
- },
-
- sysTypeWarn(params) {
- return http.post("/ventanaly-device/safety/ventanalyAlarmLog/sysTypeWarn", params);
- },
-
- sysWarn(params) {
- return http.post("/ventanaly-device/safety/ventanalyAlarmLog/sysWarn", params);
- },
-
- getDeviceVent(params) {
- return http.post("/ventanaly-device/monitor/device", params);
- },
-
-
- warningList(params) {
- const url = buildURL("/safety/ventanalyAlarmLog/now_alarmlist", params);
- return http.get(url);
- },
-
-
- historyList(params) {
- const url = buildURL("/safety/ventanalyAlarmLog/list", params);
- return http.get(url);
- },
-
- getFilePreview(params) {
- return http.post("/ventanaly-sharefile/fileServer/preview", params);
- },
-
- downloadFile(params) {
- return http.post("/ventanaly-sharefile/fileServer/download", params);
- },
-
- delateFile(params) {
- const url = buildURL("/ventanaly-sharefile/fileServer/delete", params);
- return http.delete(url);
- },
-
- commitFile(params) {
- const url = buildURL("/safety/actBusiness/commit", params);
- return http.post(url);
- },
-
- cancelFile(params) {
- const url = buildURL("/safety/actBusiness/cancelNew", params);
- return http.post(url);
- },
-
- getListFile(params) {
- const url = buildURL("/activiti/activiti_process/listData", params);
- return http.get(url);
- },
-
- gethistoricFlowNew(params) {
- const url = buildURL("/safety/actTask/historicFlowNew", params);
- return http.get(url);
- },
-
- getHighlightImgNew(params) {
- const url = buildURL("/activiti/models/getHighlightImgNew", params);
- return http.get(url);
- },
-
- getFileAccessHttpUrl(avatar, subStr) {
- if (!subStr) subStr = "http";
- if (avatar && avatar.startsWith(subStr)) {
- return avatar;
- } else {
- return configService.staticDomainURL + "/" + avatar;
- }
- },
- };
- export default apiService;
|