|
@@ -0,0 +1,204 @@
|
|
|
+<%--
|
|
|
+ Created by IntelliJ IDEA.
|
|
|
+ User: Administrator
|
|
|
+ Date: 2020/4/12
|
|
|
+ Time: 12:01
|
|
|
+ To change this template use File | Settings | File Templates.
|
|
|
+--%>
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <title>词库列表</title>
|
|
|
+ <meta name="decorator" content="default"/>
|
|
|
+ <style type="text/css">
|
|
|
+ .table th{text-align: center;}
|
|
|
+ .table td{text-align: center;}
|
|
|
+ </style>
|
|
|
+ <script type="text/javascript">
|
|
|
+ // $(document).ready(function() {
|
|
|
+ //
|
|
|
+ // });
|
|
|
+ function page(n,s){
|
|
|
+ $("#pageNo").val(n);
|
|
|
+ $("#pageSize").val(s);
|
|
|
+ $("#searchForm").submit();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ window.onload = function () {
|
|
|
+ $.ajax({
|
|
|
+ //几个参数需要注意一下
|
|
|
+ type: "get",//方法类型
|
|
|
+ dataType:"json",
|
|
|
+ url: "${ctx}/product/keywordFrequency/getSeacherFrom" ,//url
|
|
|
+ success: function (data) {
|
|
|
+ $('#search').get(0).options.length = 0;
|
|
|
+ $('#search').append('<option value="" aria-selected="true">请选择</option>');
|
|
|
+ $.each(data, function(i, obj) {
|
|
|
+ var option = $('<option />');
|
|
|
+ option.val(obj);
|
|
|
+ if(obj==1){
|
|
|
+ option.text("首页搜索");
|
|
|
+ }else if(obj==2){
|
|
|
+ option.text("信息中心搜索");
|
|
|
+ }
|
|
|
+ $('#search').append(option);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ error : function() {
|
|
|
+ alert("服务异常!");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ //选中所有
|
|
|
+ function allCkbfun(ckb){
|
|
|
+ var isChecked = ckb.checked;
|
|
|
+ $(".check-item").attr('checked', isChecked);
|
|
|
+ if(true==isChecked){
|
|
|
+ $(".check-item").parents(".item-info").addClass("row-selected");
|
|
|
+ }else{
|
|
|
+ $(".check-item").parents(".item-info").removeClass("row-selected");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //复选框选单击事件
|
|
|
+ function checkfun(ckb){
|
|
|
+ var isChecked = ckb.checked;
|
|
|
+ if(true==isChecked){
|
|
|
+ $(ckb).parents(".item-info").addClass("row-selected");
|
|
|
+ }else{
|
|
|
+ $(ckb).parents(".item-info").removeClass("row-selected");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //加入关键词库
|
|
|
+ function updateEnabledStatus(ids){
|
|
|
+ var msg='确定加入关键词库?';
|
|
|
+ // if('0'==status){
|
|
|
+ // msg='确定停用?';
|
|
|
+ // }
|
|
|
+ top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
|
|
|
+ if(v=='ok'){
|
|
|
+ $.post("${ctx}/product/keywordFrequency/addKeyWordList",{'ids':ids}, function(data) {
|
|
|
+ $("#searchForm").submit();
|
|
|
+ },"JSON");//这里返回的类型有:json,html,xml,text
|
|
|
+ }
|
|
|
+ // top.$.jBox.tip('加入关键词库成功', 'success');
|
|
|
+ // window.location.reload();
|
|
|
+ return;
|
|
|
+ },{buttonsFocus:1,persistent: true});
|
|
|
+ }
|
|
|
+ //删除关键词
|
|
|
+ <%--function delEnabledStatus(ids){--%>
|
|
|
+ <%-- var msg='确定删除关键词?';--%>
|
|
|
+ <%-- // if('0'==status){--%>
|
|
|
+ <%-- // msg='确定停用?';--%>
|
|
|
+ <%-- // }--%>
|
|
|
+ <%-- top.$.jBox.confirm(msg,'系统提示',function(v,h,f){--%>
|
|
|
+ <%-- if(v=='ok'){--%>
|
|
|
+ <%-- $.post("${ctx}/product/keywordFrequency/delKeyWordById",{'id':ids}, function(data) {--%>
|
|
|
+ <%-- $("#searchForm").submit();--%>
|
|
|
+ <%-- },"JSON");//这里返回的类型有:json,html,xml,text--%>
|
|
|
+ <%-- }--%>
|
|
|
+ <%-- // top.$.jBox.tip('删除成功', 'success');--%>
|
|
|
+ <%-- // window.location.reload();--%>
|
|
|
+ <%-- return;--%>
|
|
|
+ <%-- },{buttonsFocus:1,persistent: true});--%>
|
|
|
+ <%--}--%>
|
|
|
+ function updateStatus(){
|
|
|
+ var items = new Array();
|
|
|
+ $items=$('.check-item:checked');
|
|
|
+ if(0==$items.length){
|
|
|
+ top.$.jBox.tip('请选择', 'error');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $items.each(function(i){
|
|
|
+ items.push($(this).parents(".item-info").attr("id"));
|
|
|
+ });
|
|
|
+ updateEnabledStatus(items.toString());
|
|
|
+ }
|
|
|
+ // //添加关键词
|
|
|
+ // function addkeyWord(){
|
|
|
+ //
|
|
|
+ // }
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<ul class="nav nav-tabs">
|
|
|
+ <li class="active">关键词词库</li>
|
|
|
+ <%-- <shiro:hasPermission name="user:newCmClub:edit"><li><a href="${ctx}/new/user/cmSp/cmSpForm">添加协销人员</a></li></shiro:hasPermission>--%>
|
|
|
+ <%-- <li><a href="${ctx}/serviceteam/cmServiceteamRole/">协销小组</a></li>--%>
|
|
|
+ <%-- <li><a href="${ctx}/new/user/cmSp/leader/">协销总管理员</a></li>--%>
|
|
|
+</ul>
|
|
|
+
|
|
|
+<form:form id="searchForm" modelAttribute="searchFrequency" action="${ctx}/product/keywordFrequency/getKeywordThesaurusInfo/" method="post" class="breadcrumb form-search">
|
|
|
+ <sys:message content="${message}"/>
|
|
|
+ <input id="pageNo" name="pageNo" type="hidden" value="${pageNo}"/>
|
|
|
+ <input id="pageSize" name="pageSize" type="hidden" value="${pageSize}"/>
|
|
|
+ <div class="ul-form">
|
|
|
+ <label>关键词:</label>
|
|
|
+ <form:input path="keyword" htmlEscape="false" maxlength="20" class="input-medium"/>
|
|
|
+ <label>来源:</label>
|
|
|
+ <form:select path="fromSearch" class="input-medium" id="search">
|
|
|
+ </form:select>
|
|
|
+ <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
|
|
|
+<%-- <input id="addKeyWord" class="btn btn-primary" type="button" value="加入关键词库" onclick="updateStatus()"/>--%>
|
|
|
+ <input id="addKey" class="btn btn-primary" type="button" value="添加关键词" onclick="window.location='${ctx}/product/keywordFrequency/form?status=2'"/>
|
|
|
+ <input id="import" class="btn btn-primary" type="button" value="导入"/>
|
|
|
+ <input id="export" class="btn btn-primary" type="button" value="导出"/>
|
|
|
+ </div>
|
|
|
+</form:form>
|
|
|
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th style="width:20px;"><input class="check-all" type="checkbox" onclick="allCkbfun(this);"/></th>
|
|
|
+ <th>序号</th>
|
|
|
+ <th>关键词</th>
|
|
|
+ <th>搜索来源</th>
|
|
|
+ <th>搜索次数</th>
|
|
|
+ <shiro:hasPermission name="user:newCmClub:edit"><th>操作</th></shiro:hasPermission>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <c:forEach items="${keyInfo.list}" var="newCmSp" varStatus="status">
|
|
|
+ <tr class="item-info" id="${newCmSp.keyId}">
|
|
|
+ <td><input class="check-item" type="checkbox" id="checkbox" value="" onclick="checkfun(this)"/></td>
|
|
|
+ <td>${status.index+1}</td>
|
|
|
+ <%--<td>${newCmSp.name}</td>--%>
|
|
|
+ <td>${newCmSp.keyword}</td>
|
|
|
+ <td>
|
|
|
+ <c:if test="${newCmSp.fromSearch eq 1}">
|
|
|
+ 首页搜索
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${newCmSp.fromSearch eq 2}">
|
|
|
+ 信息中心搜索
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${newCmSp.fromSearch eq 6}">
|
|
|
+ 管理员添加
|
|
|
+ </c:if>
|
|
|
+ </td>
|
|
|
+ <%--<td>${newCmSp.spIdentity}</td>--%>
|
|
|
+ <td>${newCmSp.frequency}</td>
|
|
|
+ <shiro:hasPermission name="user:newCmClub:edit">
|
|
|
+ <td>
|
|
|
+ <%-- <c:if test="${newCmSp.status eq 90 || newCmSp.status eq 91}">--%>
|
|
|
+ <%-- onclick="updatePwd(${newCmSp.serviceProviderID})"--%>
|
|
|
+<%-- <a onclick="updateEnabledStatus('${newCmSp.keyId}')">加入关键词库</a>--%>
|
|
|
+ <%-- href="${ctx}/new/user/cmSp/cmSpEdit?id=${newCmSp.serviceProviderID}"--%>
|
|
|
+ <a href="${ctx}/product/keywordFrequency/form?keyId=${newCmSp.keyId}&status=2">编辑</a>
|
|
|
+
|
|
|
+ <%-- onclick="sendMsg(${newCmSp.serviceProviderID})"--%>
|
|
|
+
|
|
|
+<%-- <a href="javascript:void(0);" onclick="delEnabledStatus('${newCmSp.keyId}')">删除</a>--%>
|
|
|
+ <a href="${ctx}/product/keywordFrequency/delKeyWordById?id=${newCmSp.keyId}&status=2" onclick="return confirmx('确认要删除该关键词吗?', this.href)">删除</a>
|
|
|
+
|
|
|
+ <%-- </c:if>--%>
|
|
|
+ </td>
|
|
|
+ </shiro:hasPermission>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+</table>
|
|
|
+<div class="pagination">${keyInfo}</div>
|
|
|
+</body>
|
|
|
+</html>
|
|
|
+
|