main
黄海 3 years ago
parent 9bcfcb2877
commit c1e5da01a6

@ -36,6 +36,9 @@
data:data, data:data,
elem:'#formdesigner' elem:'#formdesigner'
}); });
//阻止body的drag冒泡问题 //阻止body的drag冒泡问题
document.body.ondrop = function (event) { document.body.ondrop = function (event) {
event.preventDefault(); event.preventDefault();

@ -5,6 +5,7 @@ import com.dsideal.FengHuang.Util.CommonUtil;
import com.dsideal.FengHuang.Zjb.Model.ZjbModel; import com.dsideal.FengHuang.Zjb.Model.ZjbModel;
import com.jfinal.aop.Before; import com.jfinal.aop.Before;
import com.jfinal.core.Controller; import com.jfinal.core.Controller;
import com.jfinal.ext.interceptor.GET;
import com.jfinal.ext.interceptor.POST; import com.jfinal.ext.interceptor.POST;
public class ZjbController extends Controller { public class ZjbController extends Controller {
@ -16,4 +17,11 @@ public class ZjbController extends Controller {
zm.saveModulePage(module_id, page, json); zm.saveModulePage(module_id, page, json);
renderJson(CommonUtil.returnMessageJson(true, "保存成功!")); renderJson(CommonUtil.returnMessageJson(true, "保存成功!"));
} }
@Before({GET.class})
@IsNumericInterface({"module_id", "page"})
public void getModulePage(int module_id, int page) {
String json = zm.getModulePage(module_id, page);
renderJson(json);
}
} }

@ -33,4 +33,14 @@ public class ZjbModel {
record.set("json", json); record.set("json", json);
Db.save("t_zjb_module_page", "module_id,page", record); Db.save("t_zjb_module_page", "module_id,page", record);
} }
/*
JSON
*/
public String getModulePage(int module_id, int page) {
String sql = "select json from t_zjb_module_page where module_id=? and page=?";
List<Record> list = Db.find(sql, module_id, page);
if (list.size() > 0) return list.get(0).getStr("json");
return "[]";
}
} }
Loading…
Cancel
Save