123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- <%@ page import="com.thinkgem.jeesite.common.config.Global" %>
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
- <% request.setAttribute("caimeiSpi", Global.getConfig("caimei.spi"));%>
- <html>
- <head>
- <title>网页列表</title>
- <meta name="decorator" content="default"/>
- <style type="text/css">
- .table th{text-align: center;}
- .table td{text-align: center;}
- .jbox span.jbox-icon {top: auto !important;}
- </style>
- <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 updateEnabledStatus(status,ids){
- var msg='确定开启?';
- if('0'==status){
- msg='确定停用?';
- }
- top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
- if(v=='ok'){
- $.post("${ctx}/cmpage/cmPage/updateEnabledStatus",{'enabledStatus':status,'ids':ids}, 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 openwin() {
- var submit = function (v, h, f) {
- if ('1' == v ){
- location.href="${ctx}/cmpage/cmPage/form?&flag=21";
- }
- else if ('2' == v){
- location.href="${ctx}/cmpage/cmPage/form?&flag=22";
- }else if('4' == v){
- location.href="${ctx}/cmpage/cmPage/form?&flag=24";
- }else if('5' == v){
- location.href="${ctx}/cmpage/cmPage/form?&flag=25";
- }else if('6' == v){
- //活动专题
- location.href="${ctx}/cmpage/cmPage/form?&flag=26";
- }
- return true;// close
- };
- // 自定义按钮
- $.jBox.confirm("请选择需要新增的页面!!!", "新增网页", submit, { buttons: { '项目详情页面': 1, '二级列表页面': 2,'自由页面':4,'分类详情':5,'活动专题':6} });
- }
- //更新单个索引
- function updateIndex(id){
- /*$.post("${ctx}/cmpage/cmPage/updateIndex",{'id':id}, function(data) {
- if(true==data.success){
- $.jBox.tip(data.msg, 'info');
- } else {
- $.jBox.tip(data.msg,'error');
- }
- $("#searchForm").submit();
- },"JSON");//这里返回的类型有:json,html,xml,text*/
- $.post("${caimeiSpi}/search/manage/update/equipment", {eid: id}, function(res){
- $.jBox.tip(res.msg, 'info');
- $("#searchForm").submit();
- });
- }
- //更新所有索引
- function updateAllIndex() {
- var submit = function (v, h, f) {
- if (v == true){
- /*$.post("${ctx}/cmpage/cmPage/updateAllIndex",null, function(data) {
- if(true==data.success){
- $.jBox.tip(data.msg, 'info');
- } else {
- $.jBox.tip(data.msg,'error');
- }
- $("#searchForm").submit();
- },"JSON");//这里返回的类型有:json,html,xml,text
- */
- $.post("${caimeiSpi}/search/manage/update/equipment/all", function(res){
- $.jBox.tip(res.msg, 'info');
- $("#searchForm").submit();
- });
- }
- return true;// close
- };
- // 自定义按钮
- $.jBox.confirm("该操作将更新所有项目索引,约耗时10分钟!!请谨慎操作", "更新索引", submit, { buttons: { '确定': true, '取消': false} });
- }
- </script>
- </head>
- <body>
- <ul class="nav nav-tabs">
- <li class="active"><a href="${ctx}/cmpage/cmPage/?flag=2">网页列表</a></li>
- </ul>
- <div class="" style="margin: 0 0 10px 10px;">
- <table style="float: right;width: 40%;" border="1">
- <tr>
- <div class="ul-form">
- <table style="float: right;width: 40%;" border="1">
- <label><font style="font-weight:bold;">网页使用说明</font></label></br>
- <label>【项目详情】适用于:仪器分期/项目合作等 详情页</label></br>
- <label>【二级列表】适用于:大项目/正品联盟/仪器分期等 二级列表页面</label></br>
- <label>【自由页面】适用于:自由页面</label></br>
- <label>【分类详情】适用于:产品和仪器两个大分类的详情页</label></br>
- <label>【活动专题】适用于:展会/商城详情页</label>
-      <input type="button" class="btn btn-primary" value="新增页面" onclick="openwin()" />
- </table>
- <br>
- <input type="button" class="btn btn-primary" value="更新项目详情搜索索引" onclick="updateAllIndex()" />
- </div>
- </tr>
- </table>
- </div>
- <form:form id="searchForm" modelAttribute="cmPage" action="${ctx}/cmpage/cmPage/?flag=2" 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}"/>
- <div class="ul-form">
- <label>ID:</label>
- <form:input path="id" htmlEscape="false" maxlength="11" class="input-medium"/>
- <label>类型:</label>
- <form:select path="type" class="input-medium">
- <form:option value="" label=" "/>
- <form:option value="1" label="二级列表"/>
- <form:option value="2" label="项目详情"/>
- <form:option value="4" label="自由页面"/>
- <form:option value="5" label="分类详情"/>
- <form:option value="6" label="活动专题"/>
- </form:select>
- <label>标题:</label>
- <form:input path="title" htmlEscape="false" maxlength="50" class="input-medium"/>
- <label>状态:</label>
- <form:select path="enabledStatus" class="input-medium">
- <form:option value="" label=" "/>
- <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
- </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>
- <shiro:hasPermission name="cmpage:cmPage:edit"><th>操作</th></shiro:hasPermission>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="${page.list}" var="cmPage">
- <tr>
- <td>
- ${cmPage.id}
- </a></td>
- <td>
- ${fns:getDictLabel(cmPage.type, 'webPage_type', '')}
- </td>
- <td>
- ${cmPage.title}
- </td>
- <td> <c:if test="${cmPage.type ne 4 && cmPage.type ne 5}"><img src="${cmPage.headImage}" style="width: 160px;height: 100px;"> </c:if></td>
- <td>
- <a href="${fns:getConfig('wwwServer')}cmpage/info-${cmPage.type}-${cmPage.id}.html" target="_blank">${fns:getConfig('wwwServer')}cmpage/info-${cmPage.type}-${cmPage.id}.html</a>
- </td>
- <td>
- <shiro:hasPermission name="cmpage:cmPage:edit">
- <c:if test="${cmPage.enabledStatus eq 1 }">
- <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${cmPage.id}');" >
- <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
- </a>
- </c:if>
- <c:if test="${cmPage.enabledStatus ne 1 }">
- <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${cmPage.id}');">
- <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
- </a>
- </c:if>
- </shiro:hasPermission>
- </td>
- <td>
- <fmt:formatDate value="${cmPage.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
- </td>
- <shiro:hasPermission name="cmpage:cmPage:edit"><td>
- <c:if test="${cmPage.type eq 2 }">
- <a href="javascript:void(0);" onclick="updateIndex('${cmPage.id}');">更新项目详情索引</a>
- </c:if>
- <a href="${ctx}/cmpage/cmPage/form?id=${cmPage.id}&type=${cmPage.type}">编辑</a>
- <c:if test="${cmPage.type ne 4}">
- <a href="${ctx}/cmpage/cmPageCentre/?pageId=${cmPage.id}&type=${cmPage.type}">商品楼层</a>
- </c:if>
- <c:if test="${cmPage.enabledStatus ne 1 }">
- <shiro:hasPermission name="cmpage:cmPage:delete">
- <a href="${ctx}/cmpage/cmPage/delete?id=${cmPage.id}&flag=2" onclick="return confirmx('确认要删除该网页列表吗?', this.href)">删除</a>
- </shiro:hasPermission>
- </c:if>
- </td></shiro:hasPermission>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- <div class="pagination">${page}</div>
- </body>
- </html>
|