| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- "use strict";
- angular.module('app.intelligent').service("aerationJobService", function($http, $q,$rootScope, APP_CONFIG) {
- //通风作业查询
- this.getPageInfo = function(pageNum, pageSize, aerationJob,cfmc) {
- var d = $q.defer();
- $http({
- method : 'GET',
- url : APP_CONFIG.qualitycheckUrl + '/intelligents/VentilationOperationController/getList',
- params : {
- pageNum : pageNum,
- pageSize : pageSize,
- cfbh : aerationJob==undefined?"":aerationJob.cfbh,
- createTime : aerationJob==undefined?"":aerationJob.createTime,
- funcType : aerationJob==undefined?"":aerationJob.funcType,
- cfmc : cfmc,
- orgId : $rootScope.userInfo.orgId
-
- }
- }).then(function successCallback(response) {
- // 请求成功执行代码
- d.resolve(response.data);
- }, function errorCallback(response) {
- // 请求失败执行代码
- d.reject("error");
- });
- return d.promise;
- }
-
- //通风详情查询
- this.edit = function(id) {
- var d = $q.defer();
- $http({
- method : 'POST',
- url : APP_CONFIG.qualitycheckUrl + '/intelligents/VentilationOperationController/getById',
- params : {
- id : id
- }
- }).then(function successCallback(response) {
- // 请求成功执行代码
- d.resolve(response.data);
- }, function errorCallback(response) {
- // 请求失败执行代码
- d.reject("error");
- });
- return d.promise;
- }
- //通风作业保存
- this.save = function(aerationJob) {
- var d = $q.defer();
- $http({
- method : 'POST',
- url : APP_CONFIG.qualitycheckUrl + '/intelligents/VentilationOperationController/save',
- data : {
- ventilationOperationJson : angular.toJson(aerationJob)
- }
- }).then(function successCallback(response) {
- // 请求成功执行代码
- d.resolve(response.data);
- }, function errorCallback(response) {
- // 请求失败执行代码
- d.reject("error");
- });
- return d.promise;
- }
-
- //删除
- this.remove = function(id) {
- var d = $q.defer();
- $http({
- method : 'POST',
- url : APP_CONFIG.qualitycheckUrl + '/intelligents/VentilationOperationController/deleteById',
- data : {
- id : id
- }
- }).then(function successCallback(response) {
- // 请求成功执行代码
- d.resolve(response.data);
- }, function errorCallback(response) {
- // 请求失败执行代码
- d.reject("error");
- });
- return d.promise;
- }
- });
|