门户后台-协议管理功能完善

This commit is contained in:
Renpc-kilig 2025-01-03 10:16:04 +08:00
parent 8346fe7b99
commit 488ce5f8b0
3 changed files with 22 additions and 1 deletions

View File

@ -28,6 +28,8 @@ public class AgreementPortalVO {
private Double versionNum;
@ApiModelProperty(name = "sendStatus", value = "发布状态")
private String sendStatus;
@ApiModelProperty(name = "oldSendStatus", value = "旧发布状态")
private String oldSendStatus;
public String getTitle() {
return title == null ? "" : title.trim();
@ -76,4 +78,12 @@ public class AgreementPortalVO {
public void setSendStatus(String sendStatus) {
this.sendStatus = sendStatus;
}
public String getOldSendStatus() {
return oldSendStatus;
}
public void setOldSendStatus(String oldSendStatus) {
this.oldSendStatus = oldSendStatus;
}
}

View File

@ -129,7 +129,7 @@ public class AgreementPortalServiceImpl extends DefaultBaseService implements IA
params.put("versionNum", max.get().getVersionNum() + 1);
params.put("sendStatus", o);
if(!o.equals("save")) {
if(!o.equals("save") && !agreementVO.getOldSendStatus().equals("save")) {
save(agreementVO);
}else {
agreementDao.update(params);

View File

@ -82,6 +82,8 @@
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var oldSendStatus = '';
function initagreementportalTypeSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/data/listallbyparentid/b6144a18-c5ea-4286-89fb-441172803d07', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('agreementportalTypeSelectTemplate').innerHTML).render(data, function(html) {
@ -147,8 +149,15 @@
if('save' != data['sendStatus']) {
$('#saveBtn').attr('disabled', 'disabled');
$('#saveBtn').css({
"background-color": "gray",
"color": "white",
"cursor": "not-allowed"
});
}
oldSendStatus = data['sendStatus'];
initContentRichText(data['content']);
initagreementportalTypeSelect(data['agreementType']);
// 设置开关值
@ -174,6 +183,7 @@
formData.field['content'] = wangEditorObj['content'].txt.html();
// formData.field.isOpen = $('#isOpen').val();
console.log(formData.field)
formData.field.oldSendStatus = oldSendStatus;
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
@ -208,6 +218,7 @@
formData.field['content'] = wangEditorObj['content'].txt.html();
// formData.field.isOpen = $('#isOpen').val();
console.log(formData.field)
formData.field.oldSendStatus = oldSendStatus;
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;