|
|
@@ -2,7 +2,6 @@ Namespace.register("Couple");//注册命名空间
|
|
|
Couple.Bind=function () {
|
|
|
var userName=$(".userName")[0]//获取用户名
|
|
|
var ul = $(".asideMenu ul")[0];//获取项目列表ul
|
|
|
- var asideMenu = $(".asideMenu")[0];
|
|
|
var informationtSet = $(".informationtSet")[0];
|
|
|
var informationtInfo = $(".informationtInfo")[0];//获取反馈信息
|
|
|
var informationtTime = $(".informationtTime")[0];//获取反馈时间
|
|
|
@@ -13,30 +12,35 @@ Couple.Bind=function () {
|
|
|
var informationtcreateItem = $(".informationtcreateItem")[0]//创建项目按钮
|
|
|
// userName.innerText = document.URL.split('?')[1].split("=")[1];
|
|
|
userName.innerText = U.UF.Cookie.get("usestudiosso","username")[0];
|
|
|
- window.onscroll = function(){
|
|
|
- var scrollTop = document.documentElement.scrollTop;
|
|
|
- if(scrollTop>=1){
|
|
|
- asideMenu.style.top = "0";
|
|
|
- }else{
|
|
|
- asideMenu.style.top = "70px";
|
|
|
- }
|
|
|
- }
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn", "UseStudio_FeedBack", "GetProductByUserId",U.UF.Cookie.get("usestudiosso","userid")[0]],function (r){//获取项目列表
|
|
|
+
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn", "UseStudio_FeedBack", "GetProductByUserId",U.UF.Cookie.get("usestudiosso","userid")[0]],function (r){//获取项目列表
|
|
|
if(r.value){
|
|
|
for(var i=0;i<r.value.length;i++){
|
|
|
var li=$$("li", {
|
|
|
"className": "asideItem","productId":r.value[i].ProductId
|
|
|
}, ul);
|
|
|
var a=$$("a", {}, li);
|
|
|
- var icon=$$("span", {
|
|
|
- "className": "icon icon-times icon-2x",
|
|
|
- }, a);
|
|
|
+
|
|
|
var span=$$("span", {
|
|
|
"className": "asideItemText","innerText":r.value[i].ProductName
|
|
|
}, a);
|
|
|
ul.onclick = function(ev) {//点击项目列表
|
|
|
ev = ev || event;
|
|
|
var target = ev.target || ev.srcElement;
|
|
|
+ var icon=$$("i", {"className": "active",});
|
|
|
+ for(var i=0;i<ul.children.length;i++){
|
|
|
+ if(ul.children[i].children[0].children.length>=2){
|
|
|
+ ul.children[i].setAttribute("class","asideItem");
|
|
|
+ ul.children[i].children[0].removeChild(ul.children[i].children[0].children[1])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if( target.tagName=="LI"){
|
|
|
+ target.children[0].appendChild(icon);
|
|
|
+ target.setAttribute("class","asideItembg asideItem");
|
|
|
+ }else{
|
|
|
+ target.parentNode.appendChild(icon);
|
|
|
+ target.parentNode.parentNode.setAttribute("class","asideItembg asideItem");
|
|
|
+ }
|
|
|
var productId = target.parentNode.parentElement.productId;
|
|
|
if(informationtTime.firstChild==null){
|
|
|
Couple.createInfo(productId)
|
|
|
@@ -66,13 +70,13 @@ Couple.Bind=function () {
|
|
|
}, informationtTime.children[0]);
|
|
|
informationtTitle.innerHTML = "当前项目:"+target.innerText;
|
|
|
Couple.OnclickaddUser=function(){
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_FeedBack","GetJurisdictionName",U.UF.Cookie.get("usestudiosso","userid")[0]],function (r){
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_FeedBack","GetJurisdictionName",U.UF.Cookie.get("usestudiosso","userid")[0]],function (r){
|
|
|
if(r.value[0].JurisdictionName!=="管理员"){
|
|
|
informationtAddUser.style.display = "block";
|
|
|
if(AddUserMembers.firstChild == null){}else{
|
|
|
AddUserMembers.removeChild(AddUserMembers.firstChild);
|
|
|
}
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn", "UseStudio_FeedBack", "GetUserIdByProductId",target.parentNode.parentNode.productId],function (r){//获取没有权限用户的列表
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn", "UseStudio_FeedBack", "GetUserIdByProductId",target.parentNode.parentNode.productId],function (r){//获取没有权限用户的列表
|
|
|
if(r.value){
|
|
|
NoPowerMembers.innerText = r.value.length;
|
|
|
var tbody = $$("tbody", {//创建表格
|
|
|
@@ -91,9 +95,9 @@ Couple.Bind=function () {
|
|
|
}
|
|
|
Couple.OnclickdelITem=function(){
|
|
|
if(confirm("确定啥删除该项目吗")){
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_FeedBack","DeleteProductList",target.parentNode.parentNode.productId],function (r){
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_FeedBack","DeleteProductList",target.parentNode.parentNode.productId],function (r){
|
|
|
if(r.value){
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_FeedBack","DeleteProduct",target.parentNode.parentNode.productId],function (r){})
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_FeedBack","DeleteProduct",target.parentNode.parentNode.productId],function (r){})
|
|
|
location.reload();
|
|
|
return false;
|
|
|
}
|
|
|
@@ -101,7 +105,7 @@ Couple.Bind=function () {
|
|
|
}
|
|
|
}
|
|
|
Couple.OnclickTime=function(id,time){//点击时间对应获取信息
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_FeedBack","GetFeedback",id,time],function (r){//获取产品的反馈信息
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_FeedBack","GetFeedback",id,time],function (r){//获取产品的反馈信息
|
|
|
if(r.value){
|
|
|
if(informationtInfo.firstChild==null){}else{
|
|
|
informationtInfo.removeChild(informationtInfo.firstChild);
|
|
|
@@ -151,7 +155,7 @@ Couple.Permissions=function(){
|
|
|
var AddItem = $(".AddItem")[0];//获取创建项目
|
|
|
var informationtcreateItem = $(".informationtcreateItem")[0]//获取创建项目
|
|
|
var createItem = $(".createItem")[0]//获取创建按钮
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_FeedBack","GetUser"],function (r){//查询用户
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_FeedBack","GetUser"],function (r){//查询用户
|
|
|
if(r.value){
|
|
|
var tbody = $$("tbody", {//创建表格
|
|
|
"className": "tbMain",
|
|
|
@@ -162,7 +166,7 @@ Couple.Permissions=function(){
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_FeedBack","GetJurisdictionName",U.UF.Cookie.get("usestudiosso","userid")[0]],function (r){//传入用户Id获取权限名称
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_FeedBack","GetJurisdictionName",U.UF.Cookie.get("usestudiosso","userid")[0]],function (r){//传入用户Id获取权限名称
|
|
|
if(r.value){
|
|
|
if(r.value[0].JurisdictionName === "超级管理员"){
|
|
|
informationtSet.style.display = "inline-block";
|
|
|
@@ -180,9 +184,9 @@ Couple.Permissions=function(){
|
|
|
informationtcreateItem.style.display = "block";
|
|
|
}
|
|
|
Couple.OnclickcreateItem=function(){
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_FeedBack","InsertProductList",$(".createItemName")[0].value],function (r){//查询用户
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_FeedBack","InsertProductList",$(".createItemName")[0].value],function (r){//查询用户
|
|
|
if(r.value){
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_FeedBack","InsertUserProduct",U.UF.Cookie.get("usestudiosso","userid")[0],r.value[0].ProductId],function (r){//查询用户
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_FeedBack","InsertUserProduct",U.UF.Cookie.get("usestudiosso","userid")[0],r.value[0].ProductId],function (r){//查询用户
|
|
|
location.reload()
|
|
|
})
|
|
|
}
|
|
|
@@ -259,7 +263,7 @@ Couple.getUserRow = function(h,i,productId){//创建表格下用户数据库循
|
|
|
btnAdd.onclick=function(){ //设置操作
|
|
|
if(confirm("确定添加权限吗")){
|
|
|
this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn", "UseStudio_FeedBack", "InsertUserProduct",h.UserId,productId],function (r){})//插入用户权限
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn", "UseStudio_FeedBack", "InsertUserProduct",h.UserId,productId],function (r){})//插入用户权限
|
|
|
}
|
|
|
}
|
|
|
setCell.appendChild(btnAdd);
|
|
|
@@ -294,7 +298,7 @@ Couple.getDataRow = function(h,i){//创建表格下的反馈数据库循环数
|
|
|
if(confirm("确定删除这一行嘛?")){
|
|
|
this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);
|
|
|
}
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn", "UseStudio_FeedBack", "DeleteFeedback",h.ProductId],function (r){})
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn", "UseStudio_FeedBack", "DeleteFeedback",h.ProductId],function (r){})
|
|
|
}
|
|
|
delCell.appendChild(btnDel);
|
|
|
return row;
|
|
|
@@ -327,7 +331,7 @@ Couple.getMembersRow = function(h,i){//创建表格下的用户数据库循环
|
|
|
if(confirm("确定修改管理员信息吗")){
|
|
|
if(this.parentNode.parentNode.children[2].innerText != "超级管理员"){
|
|
|
this.parentNode.parentNode.children[2].innerHTML = "超级管理员"
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn", "UseStudio_FeedBack", "UpdateJurisdictionName",this.parentNode.parentNode.children[0].innerText,"超级管理员"],function (r){//修改权限
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn", "UseStudio_FeedBack", "UpdateJurisdictionName",this.parentNode.parentNode.children[0].innerText,"超级管理员"],function (r){//修改权限
|
|
|
console.log(r)
|
|
|
})
|
|
|
}else{
|
|
|
@@ -348,7 +352,7 @@ Couple.getMembersRow = function(h,i){//创建表格下的用户数据库循环
|
|
|
btnDel.onclick=function(){ //删除操作
|
|
|
if(confirm("确定删除这一行嘛?")){
|
|
|
this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);
|
|
|
- U.A.Request("http://cd.1473.cn/net",["db.1473.cn", "UseStudio_FeedBack", "DeleteFeedback",h.FeedbackId],function (r){})
|
|
|
+ U.A.Request("http://cd.1473.cn/php",["db.1473.cn", "UseStudio_FeedBack", "DeleteFeedback",h.FeedbackId],function (r){})
|
|
|
}
|
|
|
}
|
|
|
delCell.appendChild(btnDel);
|
|
|
@@ -358,7 +362,7 @@ Couple.logout=function(){//退出
|
|
|
U.UF.CD.loadAjaxCrossDomain(function(){
|
|
|
U.A.Request(US.AUTH, ["UserOffline", U.UF.Cookie.get("usestudiosso","userid")[0]],function(r){
|
|
|
U.UF.Cookie.del("usestudiosso")
|
|
|
- window.location.href="http://couple.1473.cn/login.html";
|
|
|
+ window.location.href="http://feedback.1473.cn/";
|
|
|
});
|
|
|
});
|
|
|
}
|