| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <!DOCTYPE html>
- <html>
-
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link href="../css/init.css" rel="stylesheet" />
- <link href="../css/Table/table1.css" rel="stylesheet" />
- <link rel="stylesheet" href="../js/layui/css/layui.css">
- <title>统计</title>
- </head>
-
- <body class="gray-bg">
- <div class="container-fluid wrapper-content animated fadeInRight">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn><i class="syIcon"></i>位置:
- <a id="ReIndex" href="javaScript:;">首页</a>>
- <a href="javaScript:;">专题管理</a>>
- <a href="" class="nowPosition">统计</a>
- </sapn>
- </div>
- <div class="dhRight">
- <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
- </div>
- </div>
-
- <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
- <ul class="layui-tab-title">
- <li class="layui-this" onclick="changeTab(1)">专题统计</li>
- <li onclick="changeTab(2)">周主题统计</li>
- <li onclick="changeTab(3)">月主题统计</li>
- </ul>
- <div class="layui-tab-content">
- <div class="layui-tab-item layui-show">
-
- </div>
- <div class="layui-tab-item"></div>
- <div class="layui-tab-item"></div>
- </div>
- </div>
- <div class="th-box">
- <div class="th-bar clearfix">
- <div class="seach-box fr">
- <ul>
-
- <li>名称:<input class="photo x-color" type="text" id="name" placeholder="请输入名称" /></li>
- <li>
- <a class="sc_btn" id="sc_btns">搜索</a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div style="width: 100%;padding: 10px;">
- <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
- <thead>
- <tr>
- <th data-align="center" data-formatter="setCode">编号</th>
- <th data-field="F_Name" data-formatter="themeName">名称</th>
- <th data-field="F_Number" data-formatter="orderNumber">工单数量</th>
-
- </tr>
- </thead>
- <tbody id="tbody"></tbody>
- </table>
- </div>
- </div>
- <script src="../js/layui/layui.js"></script>
- <script>
- var type = 1; // 1专题 2周主题 3月主题
- $(document).ready(function() {
- initTable();
- })
-
- function changeTab(t) {
- type = t;
- console.log(t)
- initTable();
- }
-
- function orderNumber(val, row) {
- return '<div class="imgs" ><a class="" onclick="viewList(' + row.F_ID + ')" >' + (val == null ? 0 : val) +
- '</a></div>';
- }
-
- // 查看列表
- function viewList(id) {
-
- layer.open({
- type: 2,
- content: "./orderList.html?themeId=" + id + "&type=" + type, //iframe的url,no代表不显示滚动条
- title: '回访管理',
- area: ['90%', '90%'], //宽高
- });
- }
-
- function themeName(val, item) {
- var res = val;
- if(item.F_Cycle) {
- res = item.F_Cycle + '【' + res + '】'
- }
- return res
- }
-
- function initTable() {
- //先销毁表格
- $('#list').bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $("#list").bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "Theme/GetList", //获取数据的Servlet地址
- contentType: "application/x-www-form-urlencoded",
- striped: true, //表格显示条纹
- pagination: true, //启动分页
- pageSize: 10, //每页显示的记录数
- pageNumber: 1, //当前第几页
- pageList: [10, 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,
- name: $("#name").val(),
- token: $.cookie("token")
- };
-
- if(type === 1) {
- param.type = 2;
- param.types = '';
- }
- if(type === 2) {
- param.type = 1;
- param.types = 1;
- }
- if(type === 3) {
- param.type = 1;
- param.types = 2;
- }
-
- return param;
- },
- onLoadSuccess: function(data) { //加载成功时执行
- //layer.msg("加载成功");
- },
- onLoadError: function() { //加载失败时执行
- //layer.msg("加载数据失败", { time: 1500, icon: 2 });
- }
- });
- }
- //编号
- function setCode(val, row, index) {
- return index + 1;
- }
- </script>
- </body>
-
- </html>
|