Authored by mlge

种草--话题 话题分组修改

... ... @@ -90,7 +90,7 @@ public class TopicServiceImpl implements ITopicService {
if(req.getId() == null){
record.setArticleAmount(0);
record.setAttAmount(0);
record.setStatus(0);
record.setStatus(3);//待上架
record.setCreateTime(DateUtil.getCurrentTimeSeconds());
topicGroupDAO.updateTopicNum(req.getRelatedGroup(),true);
grassTopicDAO.insert(record);
... ...
... ... @@ -14,7 +14,7 @@
<tr style="height: 60px">
<td>
<span style="color:red">*</span><label>分组图标</label> <br>
<label>分组图标</label> <br>
<div id="imageUpload">
</div>
... ... @@ -26,7 +26,7 @@
<td>
<span style="color:red">*</span><label>话题状态</label> <br>
<input type="radio" value="1" checked name="status" style="width:30px">开启</input>
<input type="radio" value="0" name="status" style="width:30px">关闭</input>
<input type="radio" value="0" name="status" style="width:30px" checked="true">关闭</input>
</td>
</tr>
... ...
... ... @@ -133,6 +133,9 @@
width: 30,
align: "left",
formatter: function (value, rowData, rowIndex) {
if(value == null || value == ""){
return "<div style='height: 100px;width: 100px'>";
}
return "<img src='"+value+"' style='height: 100px;width: 100px'>";
}
},
... ... @@ -252,19 +255,19 @@
return false;
}
//2)是否上传了图片
var imageCount = 0;
$("input[name='imageUrl']").each(function (j, item) {
var url = item.value;
if (url != '') {
imageCount++;
}
});
if (imageCount == 0) {
$.messager.alert("保存失败", "至少要选择一张图片", "error");
return false;
}
// //2)是否上传了图片
// var imageCount = 0;
// $("input[name='imageUrl']").each(function (j, item) {
// var url = item.value;
// if (url != '') {
// imageCount++;
// }
// });
// if (imageCount == 0) {
// $.messager.alert("保存失败", "至少要选择一张图片", "error");
// return false;
//
// }
$.messager.progress({
title: "正在执行",
... ...
... ... @@ -86,8 +86,10 @@
textField: "text",
required: false,
prompt: "请选择状态",
data: [{text: "请选择状态", value: "8"}, {text: "进行中", value: "1"}, {text: "已下架", value: "0"}]
data: [{text: "请选择状态", value: "8"}, {text: "进行中", value: "1"}, {text: "待上架", value: "3"},{text: "已下架", value: "0"}]
});
//初次加载 设置默认选中的
$("#statusParam").combobox('select', '1');
$("#isOfficialParam").combobox({
valueField: "value",
... ... @@ -142,11 +144,9 @@
fit: true,
fitColumns: true,
striped: true,
/*queryParams: {
rewardName: $("#rewardName1").textbox("getValue"),
status: $("#rewardstatus1").combobox("getValue"),
type: $("#rewardtype1").combobox("getValue")
},*/
queryParams: {
status: $("#statusParam").combobox("getValue")
},
url: serverContextPath + "/grassTopicManage/getGrassTopicList",
method: 'POST',
loadFilter: function (data) {
... ... @@ -213,8 +213,10 @@
formatter: function (value, rowData, rowIndex) {
if (value == 1) {
return "进行中";
} else {
return "下架";
} else if(value == 3) {
return "待上架";
}else{
"下架";
}
}
... ... @@ -225,15 +227,16 @@
width: 40,
align: "center",
formatter: function (value, rowData, rowIndex) {
var str = "<a role='edit' dataId='" + rowData.id + "' style='margin-left:10px;background-color: #31b0d5' index='" + rowIndex + "'>编辑</a>";
var changeStatus = "<a role='changeStatus' style='margin-left:10px;background-color: #ffa951' changedStatus='0' dataId='" + rowData.id + "' index='" + rowIndex + "'>下架</a>";
;
if (rowData.status == 0) {
changeStatus = "<a role='changeStatus' style='margin-left:10px;background-color: #c4ddff' changedStatus='1' dataId='" + rowData.id + "' index='" + rowIndex + "'>上架</a>";
}
var changeStatus = "<a role='changeStatus' style='margin-left:10px;background-color: #c4ddff' changedStatus='1' dataId='" + rowData.id + "' index='" + rowIndex + "'>上架</a>";
str += changeStatus;
if (rowData.status == 1) {
str = "";//进行中的话题不可编辑
changeStatus = "<a role='changeStatus' style='margin-left:10px;background-color: #ffa951' changedStatus='0' dataId='" + rowData.id + "' index='" + rowIndex + "'>下架</a>";
}
str += changeStatus;
// str += "<a role='' style='margin-left:10px;background-color: #ffa951' changedStatus='1' dataId='" + rowData.id + "' index='" + rowIndex + "'>复制链接</a>" ;
return str ;
... ...