| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link href="../css/Table/table1.css" rel="stylesheet" />
- <link href="../css/init.css" rel="stylesheet" />
- <title></title>
- <style>
- table tr{
- margin-bottom: 20px;
- }
- table tr td{
- text-align: left;
- padding: 5px;
- }
- .Content{
- padding: 10px;
- }
- .btn{
- background: #1ab394;
- }
- .Btn_box{
- margin-top: 20px;
- color: #fff;
- }
- .inpBox select{
- width: 150px;
- padding: 3px 6px;
- }
- .F_Remark{
- width: 100%;
- }
- .tab{
- border-bottom: 1px solid #ccc;
- }
- </style>
- </head>
- <body>
- <div>
- <div class="Content">
- <div class="tab" >
- <table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <th>指标标题:</th>
- <td>
- <div class="inpBox">
- <select name="">
- <option value=""></option>
- </select>
- </div>
- </td>
- <th>指标标题:</th>
- <td>
- <div class="inpBox">
- <select name="">
- <option value=""></option>
- </select>
- </div>
- </td>
- </tr>
- <tr>
- <th>指标描述:</th>
- <td colspan="5">
- <textarea name="" rows="3" cols="20" class="F_Remark"></textarea>
- </td>
- </tr>
-
- </table>
-
- </div>
- <div>
- <h3>试题选项</h3>
- <h3 style="font-size: 14px; text-align: right;"><i class="fa fa-plus size-14" id="Add"></i>添加选项</h3>
- <table id="tbr" style="width: 100%;">
- <thead>
- <tr>
- <th data-align="center" data-field="id" data-formatter="setCode">序号</th>
- <th data-align="center" data-field="F_CategoryName">选项</th>
- <th data-align="center" data-field="F_Title">操作</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <script>
- var $tableLeft = $('#tbr');
- //销毁表格
- $tableLeft.bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $tableLeft.bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- // url: huayi.config.callcenter_url + "IndexBase/GetList",
- // url: "//117.158.196.116:8878/IndexBase/GetList",
- striped: true, //表格显示条纹
- pagination: true, //启动分页
- pageSize: 5, //每页显示的记录数
- pageNumber: 1, //当前第几页
- pageList: [5, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- var param = {
- page: params.pageNumber,
- pagesize: params.pageSize,
- categoryid:Left_Cids,
- key: Keys
-
- };
- return param;
- },
- onLoadSuccess: function() { //加载成功时执行
- // layer.msg("加载成功");
- },
- onLoadError: function() { //加载失败时执行
- //layer.msg("加载数据失败", { time: 1500, icon: 2 });
- }
- });
- $("#Add").click(function () {
- var index = $tableLeft.bootstrapTable('getData').length;
- $tableLeft.bootstrapTable('insertRow', {
- index: index,
- row: {
- id: '',
- wareName: ''
- }
- });
- });
- </script>
- </body>
- </html>
|