zoukankan      html  css  js  c++  java
  • angular1 一个页面有弹窗

    1、页面regist.html有个弹窗 弹窗页面batch.html;

    2、弹窗页面的数据请求应该在regist.ctrl(也就是regist的控制器里)

    3、代码如下regist.ctrl.js:(弹窗里面的方法和数据获取应该都在主页面里面进行请求)

     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         };
  • 相关阅读:
    GitLab 介绍
    git 标签
    git 分支
    git 仓库 撤销提交 git reset and 查看本地历史操作 git reflog
    git 仓库 回退功能 git checkout
    python 并发编程 多进程 练习题
    git 命令 查看历史提交 git log
    git 命令 git diff 查看 Git 区域文件的具体改动
    POJ 2608
    POJ 2610
  • 原文地址:https://www.cnblogs.com/xu-blog/p/9599933.html
Copyright © 2011-2022 走看看