|
@@ -0,0 +1,232 @@
|
|
|
+<%@ page import="com.thinkgem.jeesite.common.config.Global" %>
|
|
|
+<%@ 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;}
|
|
|
+ .topSelect{
|
|
|
+ width: 80px;
|
|
|
+ position: absolute;
|
|
|
+ right: 50px;
|
|
|
+ background-color: white;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+
|
|
|
+<% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
|
|
|
+ <script type="text/javascript">
|
|
|
+ $(document).ready(function() {
|
|
|
+ show_title(16);
|
|
|
+ });
|
|
|
+ function page(n,s){
|
|
|
+ $("#pageNo").val(n);
|
|
|
+ $("#pageSize").val(s);
|
|
|
+ $("#searchForm").submit();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ //状态修改
|
|
|
+ function updateStatus(status,ids,type,enabledStatus){
|
|
|
+ if('recommendStatus'==type){
|
|
|
+ if('0'==enabledStatus){
|
|
|
+ alert("请先把该文章改为启动状态!");
|
|
|
+ }else{
|
|
|
+ update(status,ids,type);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ update(status,ids,type);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function update(status,ids,type){
|
|
|
+ var msg='确定启用?';
|
|
|
+ if('0'==status){
|
|
|
+ msg='确定停用?';
|
|
|
+ }
|
|
|
+ top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
|
|
|
+ if(v=='ok'){
|
|
|
+ $.post("${ctx}/info/info/updateStatus",{'status':status,'ids':ids,'type':type}, function(data) {
|
|
|
+ if(true==data.success){
|
|
|
+ $.jBox.tip(data.msg, 'info');
|
|
|
+ } else {
|
|
|
+ $.jBox.tip(data.msg,'error');
|
|
|
+ }
|
|
|
+ $("#searchForm").submit();
|
|
|
+ },"JSON");//这里返回的类型有:json,html,xml,text
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ },{buttonsFocus:1,persistent: true});
|
|
|
+ }
|
|
|
+ function updateType(){
|
|
|
+ var tabmode='${cookie.tabmode.value}';
|
|
|
+ if(tabmode=='1'){
|
|
|
+ addTabPage('修改分类项', '${ctx}/info/infoType');
|
|
|
+ }else{
|
|
|
+ location.href="${ctx}/info/infoType";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 更新索引
|
|
|
+ function updateIndex(id) {
|
|
|
+ $.post("${caimeiCore}/commodity/search/index/update/article", {articleId: id}, function(res){
|
|
|
+ $.jBox.tip(res.msg, 'info');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function updateAllIndex(){
|
|
|
+ var submit = function (v, h, f) {
|
|
|
+ if (v == true){
|
|
|
+ $.post("${caimeiCore}/commodity/search/index/article/all", function(res){
|
|
|
+ $.jBox.tip(res.msg, 'info');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return true;// close
|
|
|
+ };
|
|
|
+ // 自定义按钮
|
|
|
+ $.jBox.confirm("该操作将更新所有商品索引,约耗时10分钟!!请谨慎操作", "更新索引", submit, { buttons: { '确定': true, '取消': false} });
|
|
|
+ }
|
|
|
+
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+ <ul class="nav nav-tabs">
|
|
|
+ <li class="active"><a href="${ctx}/info/info/?publishSource=${info.publishSource}">文章列表</a></li>
|
|
|
+ </ul>
|
|
|
+ <input type="button" class="btn btn-primary" value="更新全部搜索索引" onclick="updateAllIndex()" />
|
|
|
+ <form:form id="searchForm" modelAttribute="info" action="${ctx}/info/info/" method="post" class="breadcrumb form-search">
|
|
|
+ <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
|
|
+ <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
|
|
+ <form:hidden path="label"/>
|
|
|
+ <form:hidden path="publishSource"/>
|
|
|
+ <div class="ul-form">
|
|
|
+ <label>ID:</label>
|
|
|
+ <form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
|
|
|
+ <label>标题:</label>
|
|
|
+ <form:input path="title" htmlEscape="false" maxlength="100" class="input-medium"/>
|
|
|
+ <label>发布人:</label>
|
|
|
+ <form:input path="publisher" htmlEscape="false" maxlength="50" class="input-medium"/>
|
|
|
+ <label>供应商:</label>
|
|
|
+ <form:input path="shopName" htmlEscape="false" maxlength="50" class="input-medium"/>
|
|
|
+ <br> <br>
|
|
|
+ <label>文章分类:</label>
|
|
|
+ <form:select path="infoType.id" class="input-small">
|
|
|
+ <form:option value="" label=" "/>
|
|
|
+ <form:options items="${typeList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
|
|
|
+ </form:select>
|
|
|
+ <label>审核状态:</label>
|
|
|
+ <form:select path="auditStatus" class="input-mini">
|
|
|
+ <form:option value="" label="全部"/>
|
|
|
+ <form:option value="1" label="待审核"/>
|
|
|
+ <form:option value="2" label="审核通过"/>
|
|
|
+ <form:option value="3" label="审核失败"/>
|
|
|
+ </form:select>
|
|
|
+ <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
|
|
|
+ <div class="clearfix"></div>
|
|
|
+ </div>
|
|
|
+ </form:form>
|
|
|
+ <sys:message content="${message}"/>
|
|
|
+ <table id="contentTable" class="table table-striped table-bordered table-condensed">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>ID</th>
|
|
|
+ <th>文章分类</th>
|
|
|
+ <th>引导图</th>
|
|
|
+ <th>文章标题</th>
|
|
|
+ <th>实际点赞</th>
|
|
|
+ <th>实际阅读量</th>
|
|
|
+ <th>审核状态</th>
|
|
|
+ <th>发布时间</th>
|
|
|
+ <th>发布人</th>
|
|
|
+ <th>供应商</th>
|
|
|
+ <th>添加时间</th>
|
|
|
+ <shiro:hasPermission name="info:info:edit"><th>操作</th></shiro:hasPermission>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <c:forEach items="${page.list}" var="info" varStatus="index">
|
|
|
+ <tr>
|
|
|
+ <td>${info.id}</td>
|
|
|
+ <td>
|
|
|
+ ${info.infoType.name}
|
|
|
+ </td>
|
|
|
+ <td><img src="${info.guidanceImage}" width="100px;" height="100px;" style="width: 100px;height: 100px;"></td>
|
|
|
+ <td class="comitted">
|
|
|
+ ${info.title}
|
|
|
+ </td>
|
|
|
+ <td>${empty info.realPraise?0:(info.realPraise)}</td>
|
|
|
+ <td>${empty info.pv?0:(info.pv)}</td>
|
|
|
+ <td><font color="${info.auditStatus eq 1?'black':info.auditStatus eq 2?'#2FA4E7':info.auditStatus eq 3?'red':'#2FA4E7'}"> ${info.auditStatus eq 1?'待审核':info.auditStatus eq 2?'审核通过':info.auditStatus eq 3?'审核失败':'审核通过'}</font></td>
|
|
|
+ <td>
|
|
|
+ <c:if test="${info.auditStatus eq 2}">
|
|
|
+ <fmt:formatDate value="${info.pubdate}" pattern="yyyy-MM-dd HH:mm"/>
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${info.auditStatus ne 2}">
|
|
|
+ --
|
|
|
+ </c:if>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ ${info.publisher}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ ${info.shopName}
|
|
|
+ </td>
|
|
|
+ <td><fmt:formatDate value="${info.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
|
|
+ <td hidden>
|
|
|
+ <label id="homePageImage${index.index}">${info.homePageImage}</label>
|
|
|
+ </td>
|
|
|
+ <shiro:hasPermission name="info:info:edit"><td style="width: 150px">
|
|
|
+ <a href="javascript:;" style="display: ${info.auditStatus eq 1 or info.auditStatus eq 3?'':'none'}"
|
|
|
+ onclick="auditInfo(${info.id})">审核</a>
|
|
|
+ <a href="${ctx}/info/info/check?id=${info.id}&publishSource=2">查看</a>
|
|
|
+ <a href="javascript:void(0);" onclick="updateIndex('${info.id}');">更新索引</a>
|
|
|
+ </td></shiro:hasPermission>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <div class="pagination">${page}</div>
|
|
|
+<script>
|
|
|
+ function auditInfo(infoId) {
|
|
|
+ var url = "${ctx}/info/info/toAuditPage?id=" + infoId;
|
|
|
+ var title = "审核";
|
|
|
+ top.$.jBox("iframe:"+url, {
|
|
|
+ iframeScrolling: 'yes',
|
|
|
+ width: 800,
|
|
|
+ height: 350,
|
|
|
+ persistent: true,
|
|
|
+ title: title,
|
|
|
+ buttons: {"保存": '1', "关闭": '-1'},
|
|
|
+ submit: function (v, h, f) {
|
|
|
+ //确定
|
|
|
+ var $jboxFrame = top.$('#jbox-iframe');
|
|
|
+ var $mainFrame = top.$('#mainFrame');
|
|
|
+ if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
|
|
|
+ var items = $jboxFrame[0].contentWindow.getCheckedItems(0);
|
|
|
+ if (items.length > 0) {
|
|
|
+ var auditStatus = items[0].auditStatus;
|
|
|
+ var failReason = items[0].failReason.trim();
|
|
|
+ if (auditStatus === '2') {
|
|
|
+ failReason = '';
|
|
|
+ }
|
|
|
+ if (auditStatus === '3' && failReason === '') {
|
|
|
+ top.$.jBox.tip("请输入失败原因");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $.post("${ctx}/info/info/auditInfo?id="+infoId+"&auditStatus=" + auditStatus + "&failReason=" + failReason, function (data) {
|
|
|
+ top.$.jBox.tip("审核成功");
|
|
|
+ setTimeout(function () {
|
|
|
+ $("#searchForm").submit();
|
|
|
+ }, 200);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ top.$.jBox.tip("请先勾选商品...");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|