Bladeren bron

新增:菜单和菜单方案

master
FLYPHT 2 jaren geleden
bovenliggende
commit
d2e5e75a9b
9 gewijzigde bestanden met toevoegingen van 251 en 0 verwijderingen
  1. +9
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menu/MenuHandler.java
  2. +55
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menu/MenuPlan.java
  3. +30
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menu/MenuService.java
  4. +55
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlan.java
  5. +26
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanCache.java
  6. +9
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanHandler.java
  7. +30
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanService.java
  8. +13
    -0
      smtweb-framework/bpm/src/main/resources/static/event/bpm/sys/user/menu/menuPlan.js
  9. +24
    -0
      smtweb-framework/bpm/src/main/resources/static/event/bpm/sys/user/menuPlan/menuPlanList.js

+ 9
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menu/MenuHandler.java Bestand weergeven

@@ -0,0 +1,9 @@
package cc.smtweb.system.bpm.web.sys.user.menu;

/**
* @Author: tanghp
* @Date: 2022-08-01 17:47
* @Desc:
*/
public class MenuHandler {
}

+ 55
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menu/MenuPlan.java Bestand weergeven

@@ -0,0 +1,55 @@
package cc.smtweb.system.bpm.web.sys.user.menu;

import cc.smtweb.framework.core.annotation.SwTable;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.db.impl.DefaultEntity;

/**
* Created by 1 at 2022-08-01 17:44:00
* 实体【[菜单方案](SYS_MENU_PLAN)】的Entity类
*/
@SwTable("SYS_MENU_PLAN")
public class MenuPlan extends DefaultEntity {
public static final String ENTITY_NAME = "SYS_MENU_PLAN";

public MenuPlan() {
super(ENTITY_NAME);
}

/** 主键 */
public long getId() {
return getLong("smp_id");
}

/** 主键 */
public void setId(long smp_id) {
put("smp_id", smp_id);
}
/** 名称 */
public String getName() {
return getStr("smp_name");
}

/** 名称 */
public void setName(String smp_name) {
put("smp_name", smp_name);
}
/** 详细 */
public String getContent() {
return getStr("smp_content");
}

/** 详细 */
public void setContent(String smp_content) {
put("smp_content", smp_content);
}
/** 备注 */
public String getRemark() {
return getStr("smp_remark");
}

/** 备注 */
public void setRemark(String smp_remark) {
put("smp_remark", smp_remark);
}
}

+ 30
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menu/MenuService.java Bestand weergeven

@@ -0,0 +1,30 @@
package cc.smtweb.system.bpm.web.sys.user.menu;

import cc.smtweb.framework.core.annotation.SwBody;
import cc.smtweb.framework.core.annotation.SwService;
import cc.smtweb.framework.core.common.R;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.system.bpm.web.engine.dynPage.DynPageService;
import cc.smtweb.framework.core.mvc.service.AbstractHandler;
import cc.smtweb.framework.core.session.UserSession;

/**
* Created by 1 at 2022-08-01 17:46:05
* 页面【[菜单]的服务类
*/
@SwService
public class MenuService extends DynPageService {
//public final static String TYPE_DEMO = "demo";
@Override
protected AbstractHandler createHandler(String type) {
return super.createHandler(type);
}

/* demo
//自定义
public R demo(@SwBody SwMap params, UserSession us) {
return pageHandler(params, us, TYPE_DEMO, handler -> ((DemoHandler)handler).demo());
}
*/

}

+ 55
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlan.java Bestand weergeven

@@ -0,0 +1,55 @@
package cc.smtweb.system.bpm.web.sys.user.menuPlan;

import cc.smtweb.framework.core.annotation.SwTable;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.db.impl.DefaultEntity;

/**
* Created by 1 at 2022-08-01 18:08:28
* 实体【[菜单方案](SYS_MENU_PLAN)】的Entity类
*/
@SwTable("SYS_MENU_PLAN")
public class MenuPlan extends DefaultEntity {
public static final String ENTITY_NAME = "SYS_MENU_PLAN";

public MenuPlan() {
super(ENTITY_NAME);
}

/** 主键 */
public long getId() {
return getLong("smp_id");
}

/** 主键 */
public void setId(long smp_id) {
put("smp_id", smp_id);
}
/** 名称 */
public String getName() {
return getStr("smp_name");
}

/** 名称 */
public void setName(String smp_name) {
put("smp_name", smp_name);
}
/** 详细 */
public String getContent() {
return getStr("smp_content");
}

/** 详细 */
public void setContent(String smp_content) {
put("smp_content", smp_content);
}
/** 备注 */
public String getRemark() {
return getStr("smp_remark");
}

/** 备注 */
public void setRemark(String smp_remark) {
put("smp_remark", smp_remark);
}
}

+ 26
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanCache.java Bestand weergeven

@@ -0,0 +1,26 @@
package cc.smtweb.system.bpm.web.sys.user.menuPlan;

import cc.smtweb.framework.core.annotation.SwCache;
import cc.smtweb.framework.core.cache.AbstractEntityCache;
import cc.smtweb.framework.core.cache.CacheManager;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Set;

/**
* Created by 1 at 2022-08-01 18:08:28
* 实体【[菜单方案](SYS_MENU_PLAN)】的缓存类
*/
@SwCache(ident = "SYS_MENU_PLAN", title = "菜单方案")
public class MenuPlanCache extends AbstractEntityCache<MenuPlan> {

public static MenuPlanCache getInstance() {
return CacheManager.getIntance().getCache(MenuPlanCache.class);
}

public MenuPlanCache() {
}

}

+ 9
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanHandler.java Bestand weergeven

@@ -0,0 +1,9 @@
package cc.smtweb.system.bpm.web.sys.user.menuPlan;

/**
* @Author: tanghp
* @Date: 2022-08-01 18:10
* @Desc:
*/
public class MenuPlanHandler {
}

+ 30
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanService.java Bestand weergeven

@@ -0,0 +1,30 @@
package cc.smtweb.system.bpm.web.sys.user.menuPlan;

import cc.smtweb.framework.core.annotation.SwBody;
import cc.smtweb.framework.core.annotation.SwService;
import cc.smtweb.framework.core.common.R;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.system.bpm.web.engine.dynPage.DynPageService;
import cc.smtweb.framework.core.mvc.service.AbstractHandler;
import cc.smtweb.framework.core.session.UserSession;

/**
* Created by 1 at 2022-08-01 18:08:28
* 页面【[菜单方案]的服务类
*/
@SwService
public class MenuPlanService extends DynPageService {
//public final static String TYPE_DEMO = "demo";
@Override
protected AbstractHandler createHandler(String type) {
return super.createHandler(type);
}

/* demo
//自定义
public R demo(@SwBody SwMap params, UserSession us) {
return pageHandler(params, us, TYPE_DEMO, handler -> ((DemoHandler)handler).demo());
}
*/

}

+ 13
- 0
smtweb-framework/bpm/src/main/resources/static/event/bpm/sys/user/menu/menuPlan.js Bestand weergeven

@@ -0,0 +1,13 @@
/**
* Created by 1 at 2022-08-01 17:11:04
* 注册事件类【菜单方案】,参看event.defaultEvent.js
*/
window.$swEvent.setup("bpm.sys.user.menu.menuPlan", {
setup(page){
const { $params,$refs, $widgets, $model, $utils, $tabRouter, $api } = page || {};
const { $$message, $$http } = $utils || {};
return {

}
}
});

+ 24
- 0
smtweb-framework/bpm/src/main/resources/static/event/bpm/sys/user/menuPlan/menuPlanList.js Bestand weergeven

@@ -0,0 +1,24 @@
/**
* Created by 1 at 2022-08-01 17:11:04
* 注册事件类【菜单方案】,参看event.defaultEvent.js
*/
window.$swEvent.setup("bpm.sys.user.menu.menuPlan", {
setup(page){
const { $params,$refs, $widgets, $model, $utils, $tabRouter, $api } = page || {};
const { $$message, $$http } = $utils || {};

// 保存方案
const saveMenuPlan =async () => {
await $api.saveOne("planCard");
await $api.loadOne("planList");
}
// 删除方案
const afterDelMenuPlan = async () => {
await $api.loadOne("planList");
}
return {
saveMenuPlan,
afterDelMenuPlan,
}
}
});

Laden…
Annuleren
Opslaan