123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <!DOCTYPE html>
- <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
- <head>
- <th:block th:include="include :: header('选择接口应用')" />
- </head>
- <body>
- <div class="main-content">
- <form id="form-user-add" class="form-horizontal">
- <div class="row">
- <div class="col-sm-12">
- <div class="col-sm-12 select-table table-striped">
- <table id="bootstrap-table"></table>
- </div>
- </div>
- </div>
- </form>
- </div>
- <th:block th:include="include :: footer" />
- <script th:inline="javascript">
- let prefix = ctx + "system/interfaceinfo";
- let list = [[${list}]];
- let shareType_datas = [[${@dict.getType('share_type')}]];
- let interfaceType_datas = [[${@dict.getType('interface_type')}]];
- let shareType = [[${shareType}]];
- $(function() {
- let options = {
- data: list,
- sidePagination: "client",
- sortName: "roleSort",
- showSearch: false,
- showRefresh: false,
- showToggle: false,
- showColumns: false,
- clickToSelect: true,
- maintainSelected: true,
- columns: [{
- checkbox: true,
- formatter:function (value, row, index) {
- if($.common.isEmpty(value)) {
- return { checked: row.flag };
- } else {
- return { checked: value }
- }
- }
- },
- {
- field: 'id',
- title: '主键ID',
- visible: false
- },
- {
- field: 'rownum',
- title: '序号',
- formatter: function (value, item, index) {
- return index + 1;
- },
- },
- {
- field: 'remark',
- title: '注释',
- visible: false
- },
- {
- field: 'code',
- title: '接口码',
- visible: false
- },
- {
- field: 'interfaceName',
- title: '接口名称'
- },
- {
- field: 'infoItem',
- title: '信息项',
- visible: false
- },
- {
- field: 'usageScenarios',
- title: '使用场景描述'
- },
- {
- field: 'shareType',
- title: '接口方式',
- formatter: function (value, item, index) {
- return $.table.selectDictLabel(shareType_datas, item.shareType);
- }
- },
- {
- field: 'interfaceType',
- title: '请求方式',
- formatter: function (value, item, index) {
- return $.table.selectDictLabel(interfaceType_datas, item.interfaceType);
- }
- },
- {
- field: 'env',
- title: '环境',
- visible: false
- },
- {
- field: 'signServeraddress',
- title: '签名服务地址',
- visible: false
- },
- {
- field: 'interfaceAddress',
- title: '接口地址',
- visible: false
- },
- {
- title: '接口状态',
- align: 'center',
- formatter: function (value, row, index) {
- return statusTools(row);
- },
- visible: false
- },
- {
- field: 'typeIam',
- title: 'IAM方式',
- visible: false
- },
- {
- field: 'typeAksk',
- title: 'AK/SK方式',
- visible: false
- }]
- };
- $.table.init(options);
- });
- /* 状态显示 */
- function statusTools(row) {
- if (row.status === '1') {
- return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.id + '\')"></i> ';
- } else {
- return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.id + '\')"></i> ';
- }
- }
- /* 提交 */
- function submitHandler(index, layero){
- let rows = $.table.selectFirstColumns();
- parent.interfaceCallback("123");
- closeItem();
- }
- </script>
- </body>
- </html>
|