|
@@ -6,18 +6,18 @@ Feedback.Bind=function(JurisdictionName) {
|
|
|
for(var i=0;i<r.value.length;i++){
|
|
for(var i=0;i<r.value.length;i++){
|
|
|
var li=$$("li", {
|
|
var li=$$("li", {
|
|
|
"className": "asideItem","productId":r.value[i].ProductId
|
|
"className": "asideItem","productId":r.value[i].ProductId
|
|
|
- }, Feedback.ul);
|
|
|
|
|
|
|
+ }, Feedback.asideMenuUl);
|
|
|
var span=$$("span", {
|
|
var span=$$("span", {
|
|
|
"className": "asideItemText","innerText":r.value[i].ProductName
|
|
"className": "asideItemText","innerText":r.value[i].ProductName
|
|
|
}, li);
|
|
}, li);
|
|
|
- Feedback.ul.onclick = function(ev) {//点击项目列表
|
|
|
|
|
|
|
+ Feedback.asideMenuUl.onclick = function(ev) {//点击项目列表
|
|
|
ev = ev || event;
|
|
ev = ev || event;
|
|
|
var target = ev.target || ev.srcElement;
|
|
var target = ev.target || ev.srcElement;
|
|
|
var icon=$$("i", {"className": "active",});
|
|
var icon=$$("i", {"className": "active",});
|
|
|
- for(var i=0;i<Feedback.ul.children.length;i++){
|
|
|
|
|
- if(Feedback.ul.children[i].children.length>=2){
|
|
|
|
|
- Feedback.ul.children[i].setAttribute("class","asideItem");
|
|
|
|
|
- Feedback.ul.children[i].removeChild(Feedback.ul.children[i].children[1])
|
|
|
|
|
|
|
+ for(var i=0;i<Feedback.asideMenuUl.children.length;i++){
|
|
|
|
|
+ if(Feedback.asideMenuUl.children[i].children.length>=2){
|
|
|
|
|
+ Feedback.asideMenuUl.children[i].setAttribute("class","asideItem");
|
|
|
|
|
+ Feedback.asideMenuUl.children[i].removeChild(Feedback.asideMenuUl.children[i].children[1])
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
Feedback.logoTitle.innerHTML = "反馈后台信息管理"+":"+target.innerText;
|
|
Feedback.logoTitle.innerHTML = "反馈后台信息管理"+":"+target.innerText;
|
|
@@ -43,7 +43,7 @@ Feedback.Bind=function(JurisdictionName) {
|
|
|
Feedback.displayItem();
|
|
Feedback.displayItem();
|
|
|
Feedback.itemOperation(productId,JurisdictionName);
|
|
Feedback.itemOperation(productId,JurisdictionName);
|
|
|
Feedback.createInfo(productId);
|
|
Feedback.createInfo(productId);
|
|
|
- Feedback.OnclickTime(productId,'30days');
|
|
|
|
|
|
|
+ Feedback.InfoPaging(productId,'30days');
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -143,8 +143,103 @@ Feedback.OnclickdelITem=function(productId){//删除该项目
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-Feedback.OnclickTime=function(id,time){//点击时间对应获取信息
|
|
|
|
|
- U.A.Request(Feedback.Cd,[Feedback.Db,Feedback.SqlName,"GetFeedback",id,time],function (r){//获取产品的反馈信息
|
|
|
|
|
|
|
+Feedback.InfoPaging=function(id,time){
|
|
|
|
|
+ Feedback.nowPage=1;
|
|
|
|
|
+ Feedback.OnclickTime(id,time,"0","10");
|
|
|
|
|
+ Feedback.displayItem();
|
|
|
|
|
+ Feedback.informationtPaging.style.display="block";
|
|
|
|
|
+ var pageUp = Feedback.nowPage-1;//上一页
|
|
|
|
|
+ var pageDown = Feedback.nowPage+1;//下一页
|
|
|
|
|
+ var ul=$$("ul", {}, Feedback.informationtPaging);
|
|
|
|
|
+ var up=$$("span", {
|
|
|
|
|
+ "className":"pageUp","innerText":"上一页"
|
|
|
|
|
+ }, ul);
|
|
|
|
|
+ var li1=$$("li", {
|
|
|
|
|
+ "className":"paging active","innerText":Feedback.nowPage
|
|
|
|
|
+ }, ul);
|
|
|
|
|
+ var li2=$$("li", {
|
|
|
|
|
+ "className":"paging","innerText":Feedback.nowPage+1
|
|
|
|
|
+ }, ul);
|
|
|
|
|
+ var li3=$$("li", {
|
|
|
|
|
+ "className":"paging","innerText":Feedback.nowPage+2
|
|
|
|
|
+ }, ul);
|
|
|
|
|
+ var down=$$("span", {
|
|
|
|
|
+ "className":"pageDown","innerText":"下一页"
|
|
|
|
|
+ }, ul);
|
|
|
|
|
+ U.A.Request(Feedback.Cd,[Feedback.Db,Feedback.SqlName,"GetFeedback",id,time,"0","-1"],function (r){//获取产品的数目
|
|
|
|
|
+ Feedback.totalPage=Math.ceil(r.value.length/10);
|
|
|
|
|
+ var pagesize=$$("span", {
|
|
|
|
|
+ "innerText":"共"+Feedback.totalPage+"页"
|
|
|
|
|
+ }, Feedback.informationtPaging.children[0]);
|
|
|
|
|
+ if(Feedback.totalPage==0){
|
|
|
|
|
+ Feedback.displayItem();
|
|
|
|
|
+ }
|
|
|
|
|
+ if(Feedback.totalPage==2){
|
|
|
|
|
+ ul.children[3].style.display="none";
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ var liLength=Feedback.totalPage;
|
|
|
|
|
+ classPaging=function(){
|
|
|
|
|
+ for(var i=0;i<3;i++){
|
|
|
|
|
+ if(ul.children[i+1].className.length>=2){
|
|
|
|
|
+ ul.children[i+1].setAttribute("class","paging");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ul.onclick = function(ev,a) {//点击分页
|
|
|
|
|
+ ev = ev || event;
|
|
|
|
|
+ var target = ev.target || ev.srcElement;
|
|
|
|
|
+ if(target.tagName=="LI"){
|
|
|
|
|
+ classPaging();
|
|
|
|
|
+ target.setAttribute("class","paging active");
|
|
|
|
|
+ Feedback.nowPage = parseInt(target.innerHTML);
|
|
|
|
|
+ Feedback.OnclickTime(id,time,(Feedback.nowPage-1)*10,10);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ up.onclick = function() {//点击上页
|
|
|
|
|
+ if(ul.children[1].className=="paging active"&&ul.children[1].innerText==1){
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ var previousElementSibling = $(".informationtPaging .active")[0].previousElementSibling;
|
|
|
|
|
+ classPaging();
|
|
|
|
|
+ Feedback.nowPage = Feedback.nowPage-1;
|
|
|
|
|
+ if(ul.children[1].innerHTML>Feedback.nowPage){
|
|
|
|
|
+ ul.children[1].innerHTML=Feedback.nowPage;
|
|
|
|
|
+ ul.children[2].innerHTML=Feedback.nowPage+1;
|
|
|
|
|
+ ul.children[3].innerHTML=Feedback.nowPage+2;
|
|
|
|
|
+ ul.children[1].setAttribute("class","paging active");
|
|
|
|
|
+
|
|
|
|
|
+ }else{
|
|
|
|
|
+ previousElementSibling.setAttribute("class","paging active");
|
|
|
|
|
+ }
|
|
|
|
|
+ Feedback.OnclickTime(id,time,(Feedback.nowPage-1)*10,10);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ down.onclick = function(ev) {//点击下页
|
|
|
|
|
+ ev = ev || event;
|
|
|
|
|
+ var target = ev.target || ev.srcElement;
|
|
|
|
|
+ if(Feedback.nowPage==Feedback.totalPage||Feedback.nowPage>Feedback.totalPage){
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }else{
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ var nextElementSibling = $(".informationtPaging .active")[0].nextElementSibling;
|
|
|
|
|
+ classPaging();
|
|
|
|
|
+ Feedback.nowPage = Feedback.nowPage+1;
|
|
|
|
|
+ if(ul.children[3].innerHTML<Feedback.nowPage){
|
|
|
|
|
+ ul.children[1].innerHTML=Feedback.nowPage-2;
|
|
|
|
|
+ ul.children[2].innerHTML=Feedback.nowPage-1;
|
|
|
|
|
+ ul.children[3].innerHTML=Feedback.nowPage;
|
|
|
|
|
+ ul.children[3].setAttribute("class","paging active");
|
|
|
|
|
+ }else{
|
|
|
|
|
+ nextElementSibling.setAttribute("class","paging active");
|
|
|
|
|
+ }
|
|
|
|
|
+ Feedback.OnclickTime(id,time,(Feedback.nowPage-1)*10,10);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+Feedback.OnclickTime=function(id,time,page,dpage){//点击时间对应获取信息
|
|
|
|
|
+ U.A.Request(Feedback.Cd,[Feedback.Db,Feedback.SqlName,"GetFeedback",id,time,page,dpage],function (r){//获取产品的反馈信息
|
|
|
if(r.value){
|
|
if(r.value){
|
|
|
if(Feedback.informationtInfo.firstChild !== null){
|
|
if(Feedback.informationtInfo.firstChild !== null){
|
|
|
Feedback.informationtInfo.removeChild(Feedback.informationtInfo.firstChild);
|
|
Feedback.informationtInfo.removeChild(Feedback.informationtInfo.firstChild);
|
|
@@ -231,16 +326,16 @@ Feedback.createInfo=function(productId){//创建项目日期分类
|
|
|
"className":"timeSequence"
|
|
"className":"timeSequence"
|
|
|
},Feedback.informationtTime);
|
|
},Feedback.informationtTime);
|
|
|
var oneDay=$$("button", {
|
|
var oneDay=$$("button", {
|
|
|
- "className": "timeItem","innerText":"今天","onclick":"Feedback.OnclickTime('"+productId+"','today')"
|
|
|
|
|
|
|
+ "className": "timeItem","innerText":"今天","onclick":"Feedback.InfoPaging('"+productId+"','today')"
|
|
|
},timeSequence);
|
|
},timeSequence);
|
|
|
var threeDay=$$("button", {
|
|
var threeDay=$$("button", {
|
|
|
- "className": "timeItem","innerText":"最近三天","onclick":"Feedback.OnclickTime('"+productId+"','3days')"
|
|
|
|
|
|
|
+ "className": "timeItem","innerText":"最近三天","onclick":"Feedback.InfoPaging('"+productId+"','3days')"
|
|
|
},timeSequence);
|
|
},timeSequence);
|
|
|
var oneWeek=$$("button", {
|
|
var oneWeek=$$("button", {
|
|
|
- "className": "timeItem","innerText":"最近一周","onclick":"Feedback.OnclickTime('"+productId+"','7days')"
|
|
|
|
|
|
|
+ "className": "timeItem","innerText":"最近一周","onclick":"Feedback.InfoPaging('"+productId+"','7days')"
|
|
|
},timeSequence)
|
|
},timeSequence)
|
|
|
var oneMonth=$$("button", {
|
|
var oneMonth=$$("button", {
|
|
|
- "className": "timeItem","innerText":"最近一月","onclick":"Feedback.OnclickTime('"+productId+"','30days')"
|
|
|
|
|
|
|
+ "className": "timeItem","innerText":"最近一月","onclick":"Feedback.InfoPaging('"+productId+"','30days')"
|
|
|
},timeSequence)
|
|
},timeSequence)
|
|
|
}
|
|
}
|
|
|
Feedback.getUserRow = function(h,productId,span){//创建表格下用户数据库循环数据(添加该项目用户权限)
|
|
Feedback.getUserRow = function(h,productId,span){//创建表格下用户数据库循环数据(添加该项目用户权限)
|
|
@@ -444,6 +539,10 @@ Feedback.displayItem=function(){
|
|
|
if(Feedback.informationDetailed.firstChild){
|
|
if(Feedback.informationDetailed.firstChild){
|
|
|
Feedback.OnclickdisplayItem(Feedback.informationDetailed.className);
|
|
Feedback.OnclickdisplayItem(Feedback.informationDetailed.className);
|
|
|
}
|
|
}
|
|
|
|
|
+ if(Feedback.informationtPaging.firstChild){
|
|
|
|
|
+ Feedback.OnclickdisplayItem(Feedback.informationtPaging.className);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
Feedback.Init=function () {
|
|
Feedback.Init=function () {
|
|
|
Feedback.informationtSet = $(".informationtSet")[0]//获取管理员设置
|
|
Feedback.informationtSet = $(".informationtSet")[0]//获取管理员设置
|
|
@@ -451,15 +550,22 @@ Feedback.Init=function () {
|
|
|
Feedback.informationHeaderRight = $(".informationHeaderRight")[0];//头部右侧
|
|
Feedback.informationHeaderRight = $(".informationHeaderRight")[0];//头部右侧
|
|
|
Feedback.informationtcreateItem = $(".informationtcreateItem")[0]//获取创建项目
|
|
Feedback.informationtcreateItem = $(".informationtcreateItem")[0]//获取创建项目
|
|
|
Feedback.userName = $(".userName")[0]//获取用户名
|
|
Feedback.userName = $(".userName")[0]//获取用户名
|
|
|
- Feedback.ul = $(".asideMenu ul")[0];//获取项目列表ul
|
|
|
|
|
|
|
+ Feedback.asideMenuUl = $(".asideMenu ul")[0];//获取项目列表ul
|
|
|
Feedback.timeSequence = $(".timeSequence")[0]//反馈时间段
|
|
Feedback.timeSequence = $(".timeSequence")[0]//反馈时间段
|
|
|
Feedback.logoTitle = $(".logoTitle")[0]//反馈标题位置
|
|
Feedback.logoTitle = $(".logoTitle")[0]//反馈标题位置
|
|
|
Feedback.mainCouple = $(".mainCouple")[0];
|
|
Feedback.mainCouple = $(".mainCouple")[0];
|
|
|
Feedback.informationtInfo = $(".informationtInfo")[0];//获取反馈信息
|
|
Feedback.informationtInfo = $(".informationtInfo")[0];//获取反馈信息
|
|
|
Feedback.informationtTime = $(".informationtTime")[0];//获取反馈时间
|
|
Feedback.informationtTime = $(".informationtTime")[0];//获取反馈时间
|
|
|
|
|
+ Feedback.informationtPaging = $(".informationtPaging")[0];//获取分页
|
|
|
|
|
+ // Feedback.informationtPagingUl = $(".informationtPaging ul")[0];//获取分页ul
|
|
|
|
|
+ // Feedback.informationtPagingLi = $(".informationtPaging ul li");//获取分页li
|
|
|
|
|
+ // Feedback.informationtPagingSpan = $(".informationtPaging ul span");//获取分页上下页
|
|
|
|
|
+ // Feedback.informationtPagingActive = $(".informationtPaging .active")[0];//当前页码
|
|
|
|
|
+ Feedback.totalPage = 0;//总页数
|
|
|
Feedback.informationtAddUser = $(".informationtAddUser")[0];//添加用户项目权限
|
|
Feedback.informationtAddUser = $(".informationtAddUser")[0];//添加用户项目权限
|
|
|
Feedback.informationDetailed = $(".informationDetailed")[0];//反馈查看更多
|
|
Feedback.informationDetailed = $(".informationDetailed")[0];//反馈查看更多
|
|
|
- Feedback.Cd = "http://cd.1473.cn/net";//cd.1473
|
|
|
|
|
|
|
+ Feedback.nowPage=1;//分页当前页
|
|
|
|
|
+ Feedback.Cd = "http://cd.1473.cn/php";//cd.1473
|
|
|
Feedback.Db = "db.1473.cn";//db.1473
|
|
Feedback.Db = "db.1473.cn";//db.1473
|
|
|
Feedback.SqlName = "UseStudio_FeedBack";//数据库名
|
|
Feedback.SqlName = "UseStudio_FeedBack";//数据库名
|
|
|
Feedback.UserId = U.UF.Cookie.get("usestudiosso","userid")[0];//用户id
|
|
Feedback.UserId = U.UF.Cookie.get("usestudiosso","userid")[0];//用户id
|
|
@@ -467,5 +573,4 @@ Feedback.Init=function () {
|
|
|
Feedback.Bind(r.value[0].JurisdictionName);//得到用户权限信息
|
|
Feedback.Bind(r.value[0].JurisdictionName);//得到用户权限信息
|
|
|
});
|
|
});
|
|
|
Feedback.mainCoupleHeight();
|
|
Feedback.mainCoupleHeight();
|
|
|
-
|
|
|
|
|
}();
|
|
}();
|