...
|
...
|
@@ -57,6 +57,9 @@ |
|
|
<input id="endTimeStr" name="endTimeStr" class="easyui-datetimebox" data-options="prompt:'最近修改时间(结束)'"/>
|
|
|
</input>
|
|
|
|
|
|
<input class="easyui-combobox" id="orderRule">
|
|
|
</input>
|
|
|
|
|
|
<a id="searchBtn" class="btn-info">查询</a>
|
|
|
<!--<a id="addActivityBtn" class="btn-success">新增</a>-->
|
|
|
<a id="allBtn" class="btn-info">全部</a>
|
...
|
...
|
@@ -131,6 +134,14 @@ |
|
|
required: false,
|
|
|
prompt: "请输入分组名称"
|
|
|
});
|
|
|
$("#orderRule").combobox({
|
|
|
valueField: "value",
|
|
|
textField: "text",
|
|
|
required: false,
|
|
|
prompt: "排序规则",
|
|
|
data: [{text: "全部排序降序", value: "1"}, {text: "全部排序升序", value: "2"}, {text: "发布排序降序", value: "3"}
|
|
|
,{text: "发布排序升序", value: "4"}]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
...
|
...
|
@@ -153,7 +164,8 @@ |
|
|
groupName: $("#topicGroupParam").textbox("getValue"),
|
|
|
startTime: startTime,
|
|
|
endTime: endTime,
|
|
|
hasArticleTop:$("#hasArticleTop").combobox("getValue")
|
|
|
hasArticleTop:$("#hasArticleTop").combobox("getValue"),
|
|
|
orderRule: $("#orderRule").combobox("getValue")
|
|
|
});
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -235,6 +247,16 @@ |
|
|
field: "attAmount",
|
|
|
width: 25,
|
|
|
align: "left"
|
|
|
},{
|
|
|
title: "全部排序",
|
|
|
field: "topicOrder",
|
|
|
width: 25,
|
|
|
align: "left"
|
|
|
},{
|
|
|
title: "发布排序",
|
|
|
field: "publishOrder",
|
|
|
width: 25,
|
|
|
align: "left"
|
|
|
}, {
|
|
|
title: "置顶状态",
|
|
|
field: "topStatus",
|
...
|
...
|
@@ -284,6 +306,8 @@ |
|
|
}
|
|
|
var topStr = "<a role='setTop' dataId='" + rowData.id + "' style='margin-left:10px;background-color: #31b0d5' index='" + rowIndex + "'>设置置顶</a>";
|
|
|
|
|
|
topStr += "<a role='setOrder' dataId='" + rowData.id + "' style='margin-left:10px;background-color: #31b0d5' index='" + rowIndex + "'>设置排序</a>";
|
|
|
|
|
|
//编辑 上下架 复制链接 设置热门
|
|
|
return str + changeStatus + changeHot + link + topStr;
|
|
|
}
|
...
|
...
|
@@ -366,6 +390,17 @@ |
|
|
}
|
|
|
});
|
|
|
|
|
|
// 设置排序
|
|
|
$(this).datagrid("getPanel").find("a[role='setOrder']").linkbutton({
|
|
|
iconCls: "icon-edit",
|
|
|
onClick: function () {
|
|
|
|
|
|
index = $(this).attr("index");
|
|
|
var row = $("#labelListTable").datagrid('getData').rows[index];
|
|
|
setTopicOrderDialog(row);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
...
|
...
|
@@ -617,6 +652,74 @@ |
|
|
});
|
|
|
}
|
|
|
|
|
|
// 设置排序
|
|
|
function setTopicOrderDialog(data) {
|
|
|
|
|
|
var labelList = $("<div id='labelList'>").appendTo($(document.body));
|
|
|
var title = "设置排序";
|
|
|
window.self.paramObject.mkData = data;
|
|
|
$(labelList).myDialog({
|
|
|
title: title,
|
|
|
width: "30%",
|
|
|
height: "40%",
|
|
|
resizable: false,
|
|
|
buttons: [{
|
|
|
id: "saveBtn",
|
|
|
text: "保存",
|
|
|
iconCls: "icon-save",
|
|
|
handler: function () {
|
|
|
|
|
|
$("#setOrderForm").form("submit", {
|
|
|
url: serverContextPath + "/grassTopicManage/changeTopicOrder",
|
|
|
onSubmit: function (param) {
|
|
|
console.log(param);
|
|
|
if (data != null) {
|
|
|
param.id = data.id;
|
|
|
}
|
|
|
param.topicOrder = $("#setOrderForm #topicOrder").textbox("getValue");
|
|
|
param.publishOrder = $("#setOrderForm #publishOrder").textbox("getValue");
|
|
|
if($("#setOrderForm #visibleOrder").is(":checked")){
|
|
|
param.visibleOrder = "1";
|
|
|
}else{
|
|
|
param.visibleOrder = "0";
|
|
|
}
|
|
|
|
|
|
|
|
|
$.messager.progress({
|
|
|
title: "正在执行",
|
|
|
msg: "正在执行,请稍后..."
|
|
|
});
|
|
|
return true;
|
|
|
},
|
|
|
success: function (data) {
|
|
|
$.messager.progress("close");
|
|
|
data = JSON.parse(data);
|
|
|
if (data.code == 200) {
|
|
|
$(labelList).dialog("close");
|
|
|
$("#labelListTable").datagrid("reload");
|
|
|
$.messager.show({
|
|
|
title: "提示",
|
|
|
msg: title + "成功!",
|
|
|
height: 120
|
|
|
});
|
|
|
} else {
|
|
|
$.messager.alert("错误", data.message, "error");
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
text: "关闭",
|
|
|
iconCls: "icon-cancel",
|
|
|
handler: function () {
|
|
|
$(labelList).dialog("close");
|
|
|
}
|
|
|
}],
|
|
|
modal: true,
|
|
|
href: contextPath + "/html/grass/topicManage/topicSetOrder.html"
|
|
|
});
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|
...
|
...
|
|