时间:2021-05-25
本文主要介绍了angularjs popup-table 弹出框表格指令,分享给大家,具体如下:
模板的url 页面
<script type="text/javascript"> $(function () { //全选 $(".Pagingjump-check").click(function () { if (this.checked) { $(this).parents().parents().parents(".tDefault").find(".table-checked").each(function () { this.checked = true; }) } if (!this.checked) { $(this).parents().parents().parents(".tDefault").find(".table-checked").each(function () { this.checked = false; }) } }); }) </script> <div class="pop-up-content"> <div class="pop-up-table-title">{{title}}</div> <div class="pop-up-table-search"> <input id="searchText" type="text" class="input-search" size="30" placeholder="请输入查询条件"> <ul class="middleFree block-button-panel-ul pop-up-table-search-btn"> <li ng-click="PopupSearch()"> <a href="javascript:void(0)" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="查询" class="cBlue" style="padding: 5px 10px !important"> <span>查询</span> </a> </li> </ul> </div> <div> <div class="pop-up-table-panel" style="border-top: 1px solid #DFDFDF"> <table class="tDefault pop-up-table search-block-process-table"> <tr nf-if="columnlist.length>0" style="border-top:0px"> <td style="width:30px !important"> <input id="titleCheck-all" class="Pagingjump-check" name="checkRow" type="checkbox" ng-model="checkallvalue" ng-change="checkall()" > </td> <td class="table-width1" style="width:50px !important">序号</td> <td ng-repeat="column in columnlist |orderBy:column.PopupColumnOrder" width="{{column.PopupDefaultWidth}}" ng-click="col='{{column.ColumnName}}';" ng-show="{{column.IsPopoupColumn}}">{{column.DisplayColumnName}}</td> </tr> <tr ng-repeat="data in popupdata"> <!--ng-checked--> <td><input class="table-checked" name="checkRow" type="checkbox" ng-model="data.selected" ng-change="changeChoose(data.selected,data)" ng-checked="isChecked(data)"></td> <td>{{ $index + 1 }}</td> <td class="table-textalign-left" ng-repeat="column in columnlist|orderBy:column.PopupColumnOrder" ng-show="{{column.IsPopoupColumn}}" datacolumn="{{column.ColumnName}}">{{data[column.ColumnName]}}</td> </tr> </table> <div class="no-data-div"> <span class="no-data-span">无数据</span> </div> <div class="loading-page" style="height:300px !important;" ng-if="loading"> <div class='uil-default-css' style='transform: scale(0.2); width: 100% !important; height: 300px !important;'> <div class="loadingpoint" style=' -webkit-transform:rotate(0deg) translate(0,-60px) ; transform:rotate(0deg) translate(0,-60px);'></div> <div class="loadingpoint" style=' -webkit-transform: rotate(30deg) translate(0,-60px); transform: rotate(30deg) translate(0,-60px);'></div> <div class="loadingpoint" style=' -webkit-transform: rotate(60deg) translate(0,-60px); transform: rotate(60deg) translate(0,-60px);'></div> <div class="loadingpoint" style=' -webkit-transform: rotate(90deg) translate(0,-60px); transform: rotate(90deg) translate(0,-60px);'></div> <div class="loadingpoint" style=' -webkit-transform: rotate(120deg) translate(0,-60px); transform: rotate(120deg) translate(0,-60px);'></div> <div class="loadingpoint" style=' -webkit-transform: rotate(150deg) translate(0,-60px); transform: rotate(150deg) translate(0,-60px);'></div> <div class="loadingpoint" style=' -webkit-transform: rotate(180deg) translate(0,-60px); transform: rotate(180deg) translate(0,-60px);'></div> <div class="loadingpoint" style=' -webkit-transform: rotate(210deg) translate(0,-60px); transform: rotate(210deg) translate(0,-60px);'></div> <div class="loadingpoint" style=' -webkit-transform: rotate(240deg) translate(0,-60px); transform: rotate(240deg) translate(0,-60px);'></div> <div class="loadingpoint" style=' -webkit-transform: rotate(270deg) translate(0,-60px); transform: rotate(270deg) translate(0,-60px);'></div> <div class="loadingpoint" style=' -webkit-transform: rotate(300deg) translate(0,-60px); transform: rotate(300deg) translate(0,-60px);'></div> <div class="loadingpoint" style=' -webkit-transform: rotate(330deg) translate(0,-60px); transform: rotate(330deg) translate(0,-60px);'></div> </div> </div> </div> <div class="block-button-panel2"> <div class="table-pagingjump-div" style="bottom: 0px;width: 100%;height: 35px;padding: 4px;"> <div class="Pagingjump-function-panel" style="float:right;width:auto"> <nav> <ul class="pagination Pagingjump-function-ul Pagingjump-table-ul"> <li> <input type="text" style="padding: 2px 2px 3px 2px!important;width:40px" class="jump-bar" size="5" value="" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" /> </li> <li> <a ng-click="jump()" class="table-pagination-a"> <div class="fs1 iconb" data-icon=""></div> </a> </li> </ul> </nav> </div> <div class="Pagingjump-check-panel-table" style="float:right"> <span class="sum">共0条数据</span> <span class="pages">当前第1页/共1页</span> </div> <div class="Pagingjump-function-panel" style="float:left"> <nav> <ul class="pagination Pagingjump-function-ul Pagingjump-table-ul"> <li> <a ng-click="Previous()" class="table-pagination-a"> <div class="fs1 iconb" data-icon=""></div> </a> </li> <li ng-repeat="page in pageList" ng-class="{active: isActivePage(page)}" class="table-pagination-a"> <a ng-click="selectPage(page)">{{ page }}</a> </li> <li> <a ng-click="Next()" class="Pagingjump-function-nextpage table-pagination-a"> <div class="fs1 iconb" data-icon=""></div> </a> </li> </ul> </nav> </div> </div> </div> <div class="pop-up-button-panel"> <div class="block-button-panel-left"> <ul class="middleFree block-button-panel-ul"> <li ng-click="PopupAdd()" ng-if="showAddButton"> <a href="javascript:void(0)" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="新增" class="cBlue" style="padding: 5px 10px !important"> <span>新增</span> </a> </li> </ul> </div> <div class="block-button-panel-right"> <ul class="middleFree block-button-panel-ul"> <li ng-click="PopupRefresh()" ng-if="showRefreshButton"> <a href="javascript:void(0)" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="刷新" class="cBlue"> <span>刷新</span> </a> </li> <li ng-click="PopupOK()"> <a href="javascript:void(0)" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="确定" class="cBlue"> <span>确定</span> </a> </li> <li ng-click="PopupCancel()"> <a href="javascript:void(0)" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="取消" class="cRed"> <span>取消</span> </a> </li> </ul> </div> </div> </div> </div>调用:
//打开弹出框 $scope.openpop = function (type) { $(".pop-up").stop(true, false).fadeIn(); //根据绑定值进行读取操作 if (type == "SearchHistory") { //请求数据即可.读取List接口 } else { //读取PopupList接口 $scope.routetype = "ReturnPopup"; if (type == "process") $scope.routepath = "ProcessDetail"; else if (type == "productmodel") $scope.routepath = "ProductModelDetail"; var temp = $cookies.get(type + "checkcache"); if (angular.isDefined(temp) && temp != null) $scope.selectnode = jQuery.parseJSON(temp); $scope.urlpart = type; } } $scope.popupcallback = function (data, primaryKey, codeKey, url) { //根据url存储data if (data != null & data.length > 0) $cookies.put(url + "checkcache", JSON.stringify(data)); if (url == "process") { $scope.selectprocessNametip = codeKey; $scope.selectprocessIdtip = primaryKey; } else if (url == "productmodel") { $scope.selectproductNametip = codeKey; $scope.selectproductIdtip = primaryKey; } } <!--表格弹框--> <div class="pop-up"> <popup-table url="urlpart" routepath="routepath" routetype="routetype" on-callback="popupcallback(data,primaryKey, codeKey,url)" mulitselect="true" selectnode="selectnode"></popup-table> </div>以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
如下所示:保存后刷新table表格源码//弹出框layer.open({type:2,shadeClose:true,shade:0.3,maxmin:true
AngularJS表格ng-repeat指令可以完美的显示表格。在表格中显示数据使用angular显示表格是非常简单的:AngularJS实例{{x.Name}
html:Angularjs指令:/***div模拟textarea输入框双向数据绑定指令*/.directive('contenteditable',[fun
本文实例讲述了AngularJS表格样式简单设置方法。分享给大家供大家参考,具体如下:1、问题背景AngularJS表格table,利用样式设置表格间隔色2、实
本文实例讲述了angularjs实现table表格td单元格单击变输入框/可编辑状态。分享给大家供大家参考,具体如下:html部分:序号班次分组操作{{valu