• 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         };
  • 相关阅读:
    ios-UI-汤姆猫德游戏实现
    struts2在action中获取request、session、application,并传递数据
    centos 下 KVM虚拟机的创建、管理与迁移
    Java学习之道:Java 导出EXCEL
    __FUNCTION__, __LINE__ 有助于debug的宏定义
    unity坐标转换问题
    win10 bcdedit加入vhdx启动
    网页爬虫框架jsoup介绍
    Redis命令-HyperLogLog
    [Swift]LeetCode456. 132模式 | 132 Pattern
  • 原文地址:https://www.cnblogs.com/xu-blog/p/9599933.html
Copyright © 2020-2023  润新知