12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- (function ($app) {
- $app.module('ylmis').controller('mynoticeCtrl', function ($scope, $http, $filter, $modal, $ocLazyLoad, $alert, $loading, $state, AuthUser, $bsRouterState) {
- $scope.dataList = [];
- $state.params = $bsRouterState.$params($scope);
- $scope.beginDay = $filter('date')(new Date(), 'yyyy-MM') + "-01";
- //初始化查询参数
- $scope.selectparams = {
- title: '',
- pageIndex: 1,
- pageSize: 10,
- startDate:null,
- endDate: null,
- type: null
- };
- $scope.pageInfo = { ptotal: 0 };
-
- //查询
- $scope.search = function () {
- $scope.loadData();
- };
- //加载列表数据
- $scope.loadData = function () {
- $http
- ({
- method: 'post', url: '../../api/systemsetting/notice/GetList', data: $scope.selectparams
- }).then(function (result) {
- $scope.dataList = result.data.Data.rows;
- $scope.pageInfo.ptotal = result.data.Data.total;
- });
- };
- $scope.getPilotTypeList = function () {
- $http({
- method: 'post',
- url: '../../api/systemsetting/dictionary/GetDicList',
- data: {
- code: 'NoticeType'
- }
- }).then(function (result) {
- $scope.pilotTypeList = result.data.Data;
- }, function (resp) {
- });
- };
- var selectModal;
- $scope.showContent = function (it) {
- selectModal = $modal({
- resolve: {
- load: ['$ocLazyLoad', function ($ocLazyLoad) {
- }]
- },
- scope: $scope,
- controller: selectCtrl,
- templateUrl: 'tmpShow.html',
- show: false,
- animation: 'am-fade-and-slide-top'
- });
- selectModal.params = it;
- selectModal.$promise.then(selectModal.show);
- };
- var selectCtrl = function ($scope, $http, $filter, $loading) {
- $scope.params = selectModal.params;
- };
- selectCtrl.$inject = ['$scope', '$http', '$filter', '$loading'];
- $scope.loadData();
- $scope.getPilotTypeList();
- });
- })(angular);
|