angular1 一個頁面有彈窗

一、頁面regist.html有個彈窗 彈窗頁面batch.html;html

二、彈窗頁面的數據請求應該在regist.ctrl(也就是regist的控制器裏)數組

三、代碼以下regist.ctrl.js:(彈窗裏面的方法和數據獲取應該都在主頁面裏面進行請求)app

 1   //顯示報案批次號詳情頁面
 2         $scope.batchDetail = function (datas,time,disasterName) {
 3             $scope.registQueryConditionDto={};
 4             $scope.batchDetailFlag = false;
 5             $scope.registQueryConditionDto.batchNo = datas;
 6             $scope.registQueryConditionDto.applyName = time;
 7             $scope.registQueryConditionDto.disasterName = disasterName;
 8             //初始化分頁
 9             $scope.paginationConfs = {
10                 currentPage: 1,     //當前所在的頁
11                 totalItems: 0,      //總共有多少條記錄
12                 itemsPerPage: 10,   //每頁展現的數據條數
13                 pagesLength: 10,    //分頁條目的長度(若是設置建議設置爲奇數)
14                 perPageOptions: [10, 20, 30, 40, 50]   // 可選擇顯示條數的數組
15             };
16             $scope.policyRegistShow=false;
17             $scope.appliRegistShow=false;
18             $scope.importFileRegistShow=false;
19             $scope.registQueryConditionDto.batchNo = datas;
20             $scope.registQueryConditionDto.pageNo=$scope.paginationConf.currentPage;
21             $scope.registQueryConditionDto.pageSize=$scope.paginationConf.itemsPerPage;
22             registEditServ.queryRegistBatchByBatch( $scope.registQueryConditionDto).then(
23                 function(answer){
24                     console.log(answer);
25                     $scope.queryRegistBatch=answer.data.list;
26                     $scope.paginationConfs.currentPage=answer.data.pageNum;
27                     $scope.paginationConfs.totalItems=answer.data.totalCount
28                 },function(error){
29                     //cconsole.log(JSON.stringify(error.data));
30                 });
31         };
32         //返回按鈕
33         $scope.onEdit = function () {
34             $scope.batchDetailFlag = true;
35         };
36          //關閉報案批次號詳情頁面
37         $scope.batchDetailClose = function () {
38             $scope.batchDetailFlag = true;
39 
40         };
相關文章
相關標籤/搜索