| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>关键词统计</title>
- <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 rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
- <link href="../css/WorkOrder/Search.css" rel="stylesheet">
- <link href="../css/init.css" rel="stylesheet" />
- <script src="../My97DatePicker/WdatePicker.js"></script>
- <script src="../js/laydate/laydate.js"></script>
- <style>
- table td {
- word-break: break-all;
- word-wrap: break-word;
- }
- .ld-service li {
- float: left;
- font-size: 14px;
- color: #000;
- padding: 5px 15px;
- cursor: pointer;
- border-bottom: 1px solid #ccc;
- }
- .cr-click {
- border: 1px solid #ccc;
- background-color: #fff;
- border-bottom: none !important;
- border-bottom-left-radius: 5px;
- border-bottom-right-radius: 5px;
- }
- .Shows {
- display: block !important;
- }
- .complain {
- display: none;
- }
- .toolLeft input {
- width: 200px;
- }
- th {
- padding: 5px;
- text-align: center;
- }
- td {
- padding: 5px;
- }
- .Borders {
- border: 1px solid #d7d7d7;
- }
- .cx {
- display: block;
- }
- .daoHang {
- margin-bottom: 15px;
- }
- .keyMargin {
- margin-bottom: 0;
- }
- </style>
- </head>
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn>
- <i class="syIcon"></i>位置:
- <a href="javaScript:;" id="ReIndex">首页</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="Content_box">
- <div class="complain Shows">
- <div class="toolBar clearfix">
- <div class="toolLeft">
- 开始日期:
- <input class="photo x-color inputs" type="text" id="squeryTime" autocomplete="off" />
- 结束时间:
- <input class="photo x-color inputs" type="text" id="equeryTime" autocomplete="off" />
- 来源:
- <select class="select_" id="source"></select>
- <button class="btns search_1">查询</button>
- </div>
- </div>
- <div class="tab-content">
- <div class="tab-pane fade active in" id="import_from_file">
- <!-- <div class="toolBar keyMargin clearfix">
- <button class="fr btns" id="print_1">打印预览</button>
- </div> -->
- <div style="width: 100%;padding: 10px;">
- <table id="table1" class="tables" data-row-style="rowStyle" data-query-params="queryParams"
- data-pagination="true">
- <thead>
- <tr>
- <th data-field="" data-formatter="serialNumber" data-align="center">序号</th>
- <th data-field="keyname" data-formatter="keywordList" data-align="center">关键词</th>
- <th data-field="keycount" data-formatter="totalNumberList" data-align="center">
- 统计数量</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- $(document).ready(function () {
- laydate.render({
- elem: '#squeryTime',
- theme: '#00a1cb',
- type: 'datetime'
- });
- laydate.render({
- elem: '#equeryTime',
- theme: '#00a1cb',
- type: 'datetime'
- });
- //来源
- LY($("#source"));
- initTable();
- });
- //表格
- function initTable(pid=38) {
- $.ajax({
- url: huayi.config.callcenter_url + 'DataAnalysis/GetKeyReport_1',
- type: 'get',
- data: {
- sdate: $("#squeryTime").val(),
- edate: $("#equeryTime").val(),
- source: $("#source").val(),
- pid: pid,
- token: $.cookie("token")
- },
- dataType: "json",
- async: true,
- success: function (returnValue) {
- if (returnValue.state.toLowerCase() == "success") {
- var resultData1 = returnValue.data;
- $('#table1').bootstrapTable('load', resultData1);
- }
- //异步获取数据
- }
- });
- $('#table1').bootstrapTable('destroy').bootstrapTable({
- striped: true
- });
- }
- //序号
- function serialNumber(val, row, index) {
- return index + 1;
- }
- //来源
- function LY(obj) {
- obj.empty();
- obj.append(
- '<option selected="selected" value="">请选择</option>'
- );
- $.getJSON(
- huayi.config.callcenter_url +
- "Dictionary/GetDicValueListById", {
- token: $.cookie("token"),
- id: 1,
- },
- function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $(
- "<option value='" +
- n.F_ValueId +
- "'>" +
- n.F_Value +
- "</option>"
- ).appendTo(obj);
- });
- }
- }
- );
- }
- //代办搜索
- $(".search_1").click(function () {
- initTable();
- });
- function totalNumberList(val, row) {
- return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.F_Key + '\')" >' + val +
- '</a></div>';
- }
- function keywordList(val, row) {
- return '<div class="imgs" ><a class="" onclick="viewKeywordList(\'' + row.F_Key + '\')" >' + val +
- '</a></div>';
- }
- function viewList(key) {
- starttime = $("#squeryTime").val();
- endtime = $("#equeryTime").val();
- var date = new Date();
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var day = date.getDate();
- var defaultDate = year + "-" + month + "-" + day;
- if (starttime == "") {
- starttime = encodeURIComponent(defaultDate + " 00:00:00");
- }
- if (endtime == "") {
- endtime = encodeURIComponent(defaultDate + " 23:59:59");
- } else if (endtime.length > 0 && endtime.length <= 10) {
- endtime = encodeURIComponent(endtime + " 23:59:59");
- } else {
- endtime = encodeURIComponent(endtime);
- }
- var source = $("#source").val();
- layer.open({
- type: 2,
- content: "./keywordsStatisticsList.html?starttime=" + starttime + "&endtime=" + endtime +
- "&key=" + key + "&source=" + source, //iframe的url,no代表不显示滚动条
- title: '关键词统计表',
- area: ['90%', '90%'], //宽高
- });
- }
- function viewKeywordList(key) {
- starttime = $("#squeryTime").val();
- endtime = $("#equeryTime").val();
- var date = new Date();
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var day = date.getDate();
- var defaultDate = year + "-" + month + "-" + day;
- if (starttime == "") {
- starttime = encodeURIComponent(defaultDate + " 00:00:00");
- }
- if (endtime == "") {
- endtime = encodeURIComponent(defaultDate + " 23:59:59");
- } else if (endtime.length > 0 && endtime.length <= 10) {
- endtime = encodeURIComponent(endtime + " 23:59:59");
- } else {
- endtime = encodeURIComponent(endtime);
- }
- var source = $("#source").val();
- layer.open({
- type: 2,
- content: "./keywordsStatisticsChild.html?starttime=" + starttime + "&endtime=" + endtime +
- "&key=" + key + "&source=" + source, //iframe的url,no代表不显示滚动条
- title: '关键词统计表',
- area: ['90%', '90%'], //宽高
- });
- }
- //打印预览
- // $(document).on('click','#print_'+'',previewKeyWords);
- // function previewKeyWords(){
- // layer.open({
- // type: 2,
- // content: "../CommonHtml/PrintPreviewKeyWords.html?&sdate=" + $('#queryTime').val() + "&edate=" + $("#equeryTime").val(), //iframe的url,no代表不显示滚动条
- // title: '打印预览',
- // area: ['80%', '90%'], //宽高
- // });
- // }
- </script>
- </body>
- </html>
|