tab显示不同数据
效果
核心代码
【js】
[#escape x as (x)!?html]
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8"/>
<title>[#include 'inc_title.html'/]</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="keywords" content="${node.keywords}"/>
<meta name="description" content="${node.description}"/>
<link href="_files/css/common.css" rel="stylesheet"/>
<link href="_files/css/project-center.css" rel="stylesheet"/>
<link rel="stylesheet" href="_files/css/hc-aim.css" />
<link rel="stylesheet" href="_files/css/content.css" />
<link rel="stylesheet" href="_files/css/myproject.css" />
<link href="_files/css/pagination.css" rel="stylesheet"/>
[#include '../inc_js.html'/]
<style type="text/css">
.hc-prm-search button {
top: 6px;
}
</style>
</head>
<body ><!-- 平台-->
[#include '../inc_header.html'/]
<div class="project-wrap">
<div class="project-inner clearfix">
[#include 'inc_left.html']
<div class="pi-content">
<div class="p-profile">
<div class="ppf-box clearfix">
<div class="hc-prm-search search flr">
<form action="/userCenter/projectInfo_4_1.jspx?flag=${flag}" method="post">
[#if flag=="1"]
<input type="text" id="keyword"
name="search_CONTAIN_pname" value="${search_CONTAIN_pname}" />
[#else]
<input type="text" id="keyword"
name="search_CONTAIN_achievement.pname" value="${search_CONTAIN_achievement.pname}" />
[/#if]
<button></button>
</form>
</div>
<div class="about-details-pro flr-pro">
<div class="about-nav-pro">
<div class="hd">
<ul>
<li>入驻成果</li>
<li>应用成果</li>
</ul>
</div>
<!-- -->[#if flag=="1"]
<!-- 入驻成果 -->
[#if list??]
<div class="bd" style="display:block; ">
<div class="ppfb-log" style="padding-top:20px;">
<table class="log-table">
<tr>
<th>成果名称</th>
<th>成果状态</th>
<!--th>成果创新点</th-->
<th>申请时间</th>
<th>操作</th>
</tr>
[#list list.content as p]
<tr>
<td><a href="/scprojectachievementDetail_${p.id}.jspx">${p.pname}</a></td>
<td>
<!-- 0:待审核 1:待融资 2:已融资 3:成功 4:失败5:预热 6:审核通过7:审核失败 -->
[#if p.tstatus==0]
待审核
[/#if]
[#if p.tstatus==1]
待融资
[/#if]
[#if p.tstatus==2]
已融资
[/#if]
[#if p.tstatus==3]
成功
[/#if]
[#if p.tstatus==4]
失败
[/#if]
[#if p.tstatus==5]
预热
[/#if]
[#if p.tstatus==6]
审核通过
[/#if]
[#if p.tstatus==7]
审核失败
[/#if]
</td>
<!-- td>${p.innovational}</td -->
<td>${(p.createTime?string('yyyy-MM-dd'))!}</td>
<td>
<div class="pcc-btn" style="">
<a href="/userCenter/projectInfon.jspx?projectId=${p.id}" style="background: #7ecef4;">查看</a>
<!--a href="/userCenter/userCenterProjectForm.jspx?projectId=${p.id}" style="background: #7ecef4;">编辑</a>
<a onclick="evt_delete('${p.id}')" href="#" style="background: #7ecef4;">删除</a> -->
<a href="#" style="background: #7ecef4;">变更申请</a>
</div>
</td>
</tr>
[/#list]
</table>
<div class="searchresult_pagination"></div>
</div>
<script>
$(function(){
$(".searchresult_pagination").pagination(parseInt(${list.totalElements}), {
callback: function(page_index){
var search=$("#keyword").val();
if(search!=''){
window.location.href ="/userCenter/projectInfo_4_"+(page_index+1)+".jspx?keyword="+search+"&flag=1";
}else{
window.location.href ="/userCenter/projectInfo_4_"+(page_index+1)+".jspx?flag=1";
}
},
prev_text: " 上一页",
next_text: "下一页 ",
items_per_page:parseInt(${list.size}),
current_page:parseInt(${list.number})
});
$("#userCenterProjectMember").addClass("cur");
$(".ptc-bar input").bind({
focus: function() {
if ($(this).val() == $(this)[0].defaultValue) {
$(this).val("");
}
},
blur: function() {
if ($.trim($(this).val()) == "") {
$(this).val($(this)[0].defaultValue);
}
}
})
})
</script>
</div>
[#else]
<div style="text-align:center;background:white;height:100px;line-height:100px;border:solid 1px #ddd;width: 855px;float:right;">暂无项目,请先编辑项目信息</div>
[/#if]
[#else]
<!-- -->
<!-- 入驻成果 -->
[#if list2??]
<div class="bd" style="display:block;">
<div class="ppfb-log" style="padding-top:20px;">
<table class="log-table">
<tr>
<th>应用名称</th>
<th>应用状态</th>
<!--th>成果创新点</th-->
<th>应用时间</th>
<th>应用操作</th>
</tr>
[#list list2.content as p2]
<tr>
<td><a href="/scprojectachievementDetail_${p.id}.jspx">${p2.achievement.pname}</a></td>
<td>
<!-- 0:待审核 1:待融资 2:已融资 3:成功 4:失败5:预热 6:审核通过7:审核失败 -->
[#if p2.astatus==0]
待审核
[/#if]
[#if p2.astatus==1]
待融资
[/#if]
[#if p2.astatus==2]
已融资
[/#if]
[#if p2.astatus==3]
成功
[/#if]
[#if p2.astatus==4]
失败
[/#if]
[#if p2.astatus==5]
预热
[/#if]
[#if p2.astatus==6]
审核通过
[/#if]
[#if p2.astatus==7]
审核失败
[/#if]
</td>
<!-- td>${p.innovational}</td -->
<td>${(p2.createTime?string('yyyy-MM-dd'))!}</td>
<td>
<div class="pcc-btn" style="">
<a href="/userCenter/projectInfon.jspx?projectId=${p.id}" style="background: #7ecef4;">查看</a>
<!--a href="/userCenter/userCenterProjectForm.jspx?projectId=${p.id}" style="background: #7ecef4;">编辑</a>
<a onclick="evt_delete('${p.id}')" href="#" style="background: #7ecef4;">删除</a> -->
<a href="#" style="background: #7ecef4;">变更申请</a>
</div>
</td>
</tr>
[/#list]
</table>
<div class="searchresult_pagination"></div>
</div>
<script>
$(function(){
$(".searchresult_pagination").pagination(parseInt(${list2.totalElements}), {
callback: function(page2_index){
var search=$("#keyword").val();
if(search!=''){
window.location.href ="/userCenter/projectInfo_4_"+(page2_index+1)+".jspx?keyword="+search+"&flag=2";
}else{
window.location.href ="/userCenter/projectInfo_4_"+(page2_index+1)+".jspx?flag=2";
}
},
prev_text: " 上一页",
next_text: "下一页 ",
items_per_page:parseInt(${list2.size}),
current_page:parseInt(${list2.number})
});
$("#userCenterProjectMember").addClass("cur");
$(".ptc-bar input").bind({
focus: function() {
if ($(this).val() == $(this)[0].defaultValue) {
$(this).val("");
}
},
blur: function() {
if ($.trim($(this).val()) == "") {
$(this).val($(this)[0].defaultValue);
}
}
})
})
</script>
</div>
[#else]
<div style="text-align:center;background:white;height:100px;line-height:100px;border:solid 1px #ddd;width: 855px;float:right;">暂无项目,请先编辑项目信息</div>
[/#if]
</div>
[/#if]
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function(){
var flag=${flag};
$("#userCenterProject").addClass("cur");
$(".hd ul li").click(function(){
var index=$(this).index();
var search=$("#keyword").val();
if(index==0){
if(search!=''){
window.location.href ="/userCenter/projectInfo_4_1.jspx?keyword="+search+"&flag=1";
}else{
window.location.href ="/userCenter/projectInfo_4_1.jspx?flag=1";
}
}else{
if(search!=''){
window.location.href ="/userCenter/projectInfo_4_1.jspx?keyword="+search+"&flag=2";
}else{
window.location.href ="/userCenter/projectInfo_4_1.jspx?flag=2";
}
}
$(this).addClass("on").siblings().removeClass("on");
$(".bd").eq(index).show().siblings().hide();
})
})
</script>
[#include '../inc_footer.html'/]
</body>
</html>
[/#escape]