Browse Source

模板

用户
master
yaoq 2 years ago
parent
commit
8c1298a5c5
15 changed files with 271 additions and 208 deletions
  1. +10
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDataset.java
  2. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageListHandler.java
  3. +5
    -6
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageSaveHandler.java
  4. +2
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynRetBean.java
  5. +10
    -3
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/role/RoleCache.java
  6. +0
    -91
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/Role.java
  7. +0
    -34
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/RoleCache.java
  8. +100
    -11
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/UserHandler.java
  9. +41
    -8
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/UserRoleCache.java
  10. +27
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/UserService.java
  11. +20
    -10
      smtweb-framework/bpm/src/main/resources/static/event/bpm/sys/user/user/userList.js
  12. +24
    -12
      smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_query.ftl
  13. +4
    -4
      smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_table.ftl
  14. +8
    -9
      smtweb-framework/bpm/src/main/resources/static/template/model_list.ftl
  15. +19
    -13
      smtweb-framework/bpm/src/main/resources/static/template/model_list_card.ftl

+ 10
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDataset.java View File

@@ -1,7 +1,6 @@
package cc.smtweb.system.bpm.web.design.form.define;

import cc.smtweb.framework.core.common.SwEnum;
import cc.smtweb.framework.core.exception.BizException;
import cc.smtweb.framework.core.db.cache.ModelTableCache;
import cc.smtweb.framework.core.db.vo.ModelField;
import cc.smtweb.framework.core.db.vo.ModelTable;
@@ -73,6 +72,15 @@ public class PageDataset {
return mapFilterId.get(id);
}


public ModelTable getModelTable() {
return ModelTableCache.getInstance().get(masterTable);
}

public boolean isCurTable(String table_name) {
return table_name.equals(getModelTable().getName());
}

/**
* 重置丰富字段信息
*/
@@ -119,7 +127,7 @@ public class PageDataset {
filter.sqlName = filter.field;
}
} else {
calcField = calcField || ((PageDatasetField)field).fieldIsCalc();
calcField = calcField || ((PageDatasetField) field).fieldIsCalc();
}
}
}


+ 1
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageListHandler.java View File

@@ -25,7 +25,7 @@ public class DynPageListHandler extends AbstractListHandler {
private SwMap filter;

//对应的数据集定义
private PageDataset pageDataSet;
protected PageDataset pageDataSet;

public DynPageListHandler(long pageId, SwMap filter, PageDataset pageDataSet) {
this.pageId = pageId;


+ 5
- 6
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageSaveHandler.java View File

@@ -4,8 +4,6 @@ import cc.smtweb.framework.core.cache.AbstractCache;
import cc.smtweb.framework.core.cache.CacheManager;
import cc.smtweb.framework.core.common.R;
import cc.smtweb.framework.core.common.SwEnum;
import cc.smtweb.framework.core.exception.BizException;
import cc.smtweb.framework.core.exception.SwException;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.db.DbEngine;
import cc.smtweb.framework.core.db.EntityDao;
@@ -15,6 +13,7 @@ import cc.smtweb.framework.core.db.jdbc.AbsDbWorker;
import cc.smtweb.framework.core.db.vo.ModelField;
import cc.smtweb.framework.core.db.vo.ModelIndex;
import cc.smtweb.framework.core.db.vo.ModelTable;
import cc.smtweb.framework.core.exception.BizException;
import cc.smtweb.framework.core.mvc.service.TreeHelper;
import cc.smtweb.framework.core.util.CommUtil;
import cc.smtweb.system.bpm.web.design.form.define.PageDataset;
@@ -113,27 +112,27 @@ public class DynPageSaveHandler extends AbstractDynPageHandler {
DbEngine.getInstance().doTrans(new AbsDbWorker() {
@Override
public void work() {
for (DefaultEntity bean: map.values()) {
for (DefaultEntity bean : map.values()) {
saveBean(bean);
}
}

@Override
public void doAfterDbCommit() {
for (DefaultEntity bean: map.values()) {
for (DefaultEntity bean : map.values()) {
afterCommit(bean);
}
}

@Override
public void doAfterDbRollback() {
for (DefaultEntity bean: map.values()) {
for (DefaultEntity bean : map.values()) {
afterRollback(bean);
}
}
});
Map<String, DynRetBean> mapRet = new HashMap<>(map.size());
for (Map.Entry<String, DefaultEntity> entry: map.entrySet()) {
for (Map.Entry<String, DefaultEntity> entry : map.entrySet()) {
mapRet.put(entry.getKey(), DynRetBean.createBean(entry.getValue().getData()));
}
return R.success(mapRet);


+ 2
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynRetBean.java View File

@@ -1,7 +1,6 @@
package cc.smtweb.system.bpm.web.engine.dynPage;

import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.db.impl.DefaultEntity;
import cc.smtweb.framework.core.mvc.service.SwListData;
import lombok.Data;

@@ -16,7 +15,8 @@ public class DynRetBean {
//列表返回
private SwListData list = null;

public static DynRetBean createBean(SwMap form) {
public static DynRetBean createBean(SwMap swMap) {
SwMap form = (SwMap) swMap.clone();
DynRetBean bean = new DynRetBean();
bean.form = form;
bean.form.remove("_def_table_name");


+ 10
- 3
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/role/RoleCache.java View File

@@ -3,10 +3,9 @@ package cc.smtweb.system.bpm.web.sys.user.role;
import cc.smtweb.framework.core.annotation.SwCache;
import cc.smtweb.framework.core.cache.AbstractEntityCache;
import cc.smtweb.framework.core.cache.CacheManager;
import cc.smtweb.framework.core.util.PubUtil;

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

/**
@@ -31,4 +30,12 @@ public class RoleCache extends AbstractEntityCache<Role> {
public final Role getByCode(String key) {
return getByKey(mk_code, key);
}

public final String getNamesByIds(Set<Long> key) {
Set<String> names = new HashSet<>();
key.forEach(k -> {
names.add(get(k).getName());
});
return PubUtil.getSqlInIds(names);
}
}

+ 0
- 91
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/Role.java View File

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

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-07-28 20:05:08
* 实体【[角色表](SYS_ROLE)】的Entity类
*/
@SwTable("SYS_ROLE")
public class Role extends DefaultEntity {
public static final String ENTITY_NAME = "SYS_ROLE";

public Role() {
super(ENTITY_NAME);
}

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

/** 主键 */
public void setId(long srl_id) {
put("srl_id", srl_id);
}
/** 类别 */
public long getType() {
return getLong("srl_type");
}

/** 类别 */
public void setType(long srl_type) {
put("srl_type", srl_type);
}
/** 编码 */
public String getCode() {
return getStr("srl_code");
}

/** 编码 */
public void setCode(String srl_code) {
put("srl_code", srl_code);
}
/** 名称 */
public String getName() {
return getStr("srl_name");
}

/** 名称 */
public void setName(String srl_name) {
put("srl_name", srl_name);
}
/** 备注 */
public String getRemark() {
return getStr("srl_remark");
}

/** 备注 */
public void setRemark(String srl_remark) {
put("srl_remark", srl_remark);
}
/** 等级 */
public long getLevel() {
return getLong("srl_level");
}

/** 等级 */
public void setLevel(long srl_level) {
put("srl_level", srl_level);
}
/** 菜单方案 */
public long getSmpId() {
return getLong("srl_smp_id");
}

/** 菜单方案 */
public void setSmpId(long srl_smp_id) {
put("srl_smp_id", srl_smp_id);
}
/** 权限详细 */
public String getPrivilege() {
return getStr("srl_privilege");
}

/** 权限详细 */
public void setPrivilege(String srl_privilege) {
put("srl_privilege", srl_privilege);
}
}

+ 0
- 34
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/RoleCache.java View File

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

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-07-28 20:05:08
* 实体【[角色表](SYS_ROLE)】的缓存类
*/
@SwCache(ident = "SYS_ROLE", title = "角色表")
public class RoleCache extends AbstractEntityCache<Role> {
//缓存key:按编码
public final static String mk_code = "code";

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

public RoleCache() {
//缓存key:按编码
regMap(mk_code, "srl_code");
}

//缓存key:按编码
public final Role getByCode(String key) {
return getByKey(mk_code, key);
}
}

+ 100
- 11
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/UserHandler.java View File

@@ -1,15 +1,21 @@
package cc.smtweb.system.bpm.web.sys.user.user;

import cc.smtweb.framework.core.common.R;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.db.DbEngine;
import cc.smtweb.framework.core.db.EntityDao;
import cc.smtweb.framework.core.db.impl.DefaultEntity;
import cc.smtweb.framework.core.db.jdbc.AbsDbWorker;
import cc.smtweb.framework.core.db.vo.ModelTable;
import cc.smtweb.framework.core.mvc.service.AbstractHandler;
import cc.smtweb.framework.core.util.CommUtil;
import cc.smtweb.framework.core.util.PubUtil;
import cc.smtweb.system.bpm.web.design.form.define.PageDataset;
import cc.smtweb.system.bpm.web.engine.dynPage.DynPageDelHandler;
import cc.smtweb.system.bpm.web.engine.dynPage.DynPageListHandler;
import cc.smtweb.system.bpm.web.engine.dynPage.DynPageLoadHandler;
import cc.smtweb.system.bpm.web.engine.dynPage.DynPageSaveHandler;
import cc.smtweb.system.bpm.web.sys.user.role.RoleCache;

import java.util.ArrayList;
import java.util.List;
@@ -21,13 +27,29 @@ import java.util.Set;
*/
public class UserHandler {

public static EntityDao<User> getUserDao() {
return DbEngine.getInstance().findDao(User.ENTITY_NAME);
}

public static EntityDao<UserStatu> getUserStatuDao() {
return DbEngine.getInstance().findDao(UserStatu.ENTITY_NAME);
}

public static EntityDao<UserParty> getUserPartyDao() {
return DbEngine.getInstance().findDao(UserParty.ENTITY_NAME);
}

public static EntityDao<UserRole> getUserRoleDao() {
return DbEngine.getInstance().findDao(UserRole.ENTITY_NAME);
}

static class UserSaveHandler extends DynPageSaveHandler {
private UserStatu userStatu;
private List<UserRole> roleList;

@Override
protected DefaultEntity readBeanFromPage(PageDataset pageDataSet, SwMap data) {
if (pageDataSet.name.equals("userPartyCard")) {
if (pageDataSet.isCurTable(UserParty.ENTITY_NAME)) {
roleList = new ArrayList<>();
Set<Long> userRoles = data.readLongSet("sup_roles");
DefaultEntity bean = super.readBeanFromPage(pageDataSet, data);
@@ -42,6 +64,7 @@ public class UserHandler {
userRole.setRoleId(k);
roleList.add(userRole);
});
return bean;
}
return super.readBeanFromPage(pageDataSet, data);
}
@@ -55,14 +78,14 @@ public class UserHandler {
userStatu = new UserStatu();
userStatu.init();
userStatu.setEntityId(bean.getEntityId());
DbEngine.getInstance().findDao(UserStatu.ENTITY_NAME).insertEntity(userStatu);
getUserStatuDao().insertEntity(userStatu);
UserStatuCache.getInstance().put(userStatu);
}
}
if (bean instanceof UserParty) {
Set<Long> ur = UserRoleCache.getInstance().getIdByUser(((UserParty) bean).getUserId());
DbEngine.getInstance().findDao(UserRole.ENTITY_NAME).deleteEntity(ur);
DbEngine.getInstance().findDao(UserRole.ENTITY_NAME).batchInsertEntity(roleList);
Set<Long> ur = UserRoleCache.getInstance().getByParty(bean.getEntityId());
getUserRoleDao().deleteEntity(ur);
getUserRoleDao().batchInsertEntity(roleList);
UserRoleCache.getInstance().removeList(ur);
UserRoleCache.getInstance().putList(roleList);
}
@@ -75,13 +98,13 @@ public class UserHandler {
protected void localDel(long id, ModelTable table) {
super.localDel(id, table);
if (table.getName().equals(User.ENTITY_NAME)) {
DbEngine.getInstance().findDao(UserStatu.ENTITY_NAME).deleteEntity(id);
DbEngine.getInstance().findDao(UserParty.ENTITY_NAME).deleteEntity(UserPartyCache.getInstance().getIdByUser(id));
DbEngine.getInstance().findDao(UserRole.ENTITY_NAME).deleteEntity(UserRoleCache.getInstance().getIdByUser(id));
getUserStatuDao().deleteEntity(id);
getUserPartyDao().deleteEntity(UserPartyCache.getInstance().getIdByUser(id));
getUserRoleDao().deleteEntity(UserRoleCache.getInstance().getIdByUser(id));
}
if (table.getName().equals(UserParty.ENTITY_NAME)) {
DbEngine.getInstance().findDao(UserParty.ENTITY_NAME).deleteEntity(id);
DbEngine.getInstance().findDao(UserRole.ENTITY_NAME).deleteEntity(UserRoleCache.getInstance().getByS(id));
getUserPartyDao().deleteEntity(id);
getUserRoleDao().deleteEntity(UserRoleCache.getInstance().getByParty(id));
}
}

@@ -94,7 +117,7 @@ public class UserHandler {
}
if (table.getName().equals(UserParty.ENTITY_NAME)) {
UserPartyCache.getInstance().remove(id);
UserRoleCache.getInstance().removeList(UserRoleCache.getInstance().getByS(id));
UserRoleCache.getInstance().removeList(UserRoleCache.getInstance().getByParty(id));
}
}
}
@@ -104,6 +127,17 @@ public class UserHandler {
public UserListHandler(long pageId, SwMap filter, PageDataset pageDataSet) {
super(pageId, filter, pageDataSet);
}

@Override
protected void afterQuery(List<SwMap> listData) {
if (pageDataSet.isCurTable(UserParty.ENTITY_NAME)) {
listData.forEach(sw -> {
sw.put("sup_roles", RoleCache.getInstance().getNamesByIds(UserRoleCache.getInstance().getRoleByParty(sw.readLong("sup_id"))));
});
return;
}
super.afterQuery(listData);
}
}

static class UserLoadHandler extends DynPageLoadHandler {
@@ -114,5 +148,60 @@ public class UserHandler {
listHandler.init(params, us);
return listHandler;
}


@Override
protected void afterLoadBean(PageDataset dataset, SwMap bean) {
super.afterLoadBean(dataset, bean);
if (dataset.isCurTable(UserParty.ENTITY_NAME)) {
bean.put("sup_roles", CommUtil.getSqlInIds(UserRoleCache.getInstance().getRoleByParty(bean.readLong("sup_id"))));
}
}
}

static class UserCustHandler extends AbstractHandler {

public R batchDelParty() {
Set<Long> idList = params.readLongSet("ids");
Set<Long> roleIdList = UserRoleCache.getInstance().getByParty(idList);
DbEngine.getInstance().doTrans(new AbsDbWorker() {
@Override
public void work() {
getUserPartyDao().deleteEntity(idList);
getUserRoleDao().deleteEntity(roleIdList);
}

@Override
public void doAfterDbCommit() {
UserPartyCache.getInstance().removeList(idList);
UserRoleCache.getInstance().removeList(roleIdList);
}
});
return R.success();
}

public R delAll() {
long id = params.readLong("id");
Set<Long> partyIds = UserPartyCache.getInstance().getIdByUser(id);
Set<Long> roleIds = UserRoleCache.getInstance().getByParty(partyIds);
DbEngine.getInstance().doTrans(new AbsDbWorker() {
@Override
public void work() {
getUserDao().deleteEntity(id);
getUserStatuDao().deleteEntity(id);
getUserRoleDao().deleteEntity(roleIds);
getUserPartyDao().deleteEntity(partyIds);
}

@Override
public void doAfterDbCommit() {
UserCache.getInstance().remove(id);
UserStatuCache.getInstance().remove(id);
UserRoleCache.getInstance().removeList(roleIds);
UserPartyCache.getInstance().removeList(partyIds);
}
});
return R.success();
}
}
}

+ 41
- 8
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/UserRoleCache.java View File

@@ -27,13 +27,13 @@ public class UserRoleCache extends AbstractEntityCache<UserRole> {
}

//缓存key:按机构关系缓存
public final Set<UserRole> getByS(String key) {
public final Set<UserRole> getByParty(String key) {
return getListByKey(mk_s, key);
}

public final Set<Long> getByS(Long key) {
public final Set<Long> getByParty(Long key) {
Set<Long> ids = new HashSet<>();
Set<UserRole> set = getByS(String.valueOf(key));
Set<UserRole> set = getByParty(String.valueOf(key));
if (PubUtil.isEmpty(set)) return ids;
set.forEach(bean -> {
ids.add(bean.getEntityId());
@@ -41,20 +41,53 @@ public class UserRoleCache extends AbstractEntityCache<UserRole> {
return ids;
}

public final Set<Long> getByParty(Set<Long> key) {
Set<Long> ids = new HashSet<>();
for (Long k : key) ids.addAll(getByParty(k));
return ids;
}

public final Set<Long> getRoleByParty(Long key) {
Set<Long> ids = new HashSet<>();
Set<UserRole> set = getByParty(String.valueOf(key));
if (PubUtil.isEmpty(set)) return ids;
set.forEach(bean -> {
ids.add(bean.getRoleId());
});
return ids;
}

public final Set<Long> getRoleByParty(Set<Long> key) {
Set<Long> ids = new HashSet<>();
for (Long k : key) ids.addAll(getRoleByParty(k));
return ids;
}

public final Set<Long> getRoleIdByUser(Long key) {
Set<Long> roleSet = new HashSet<>();
Set<UserRole> userRoles = getSetByUser(String.valueOf(key));
for (UserRole userRole : userRoles) {
roleSet.add(userRole.getRoleId());
}
return roleSet;
}

public final Set<Long> getIdByUser(Long key) {
return getIdByUser(String.valueOf(key));
}

public final Set<Long> getIdByUser(String key) {
Set<Long> roleSet = new HashSet<>();
Set<Long> ids = new HashSet<>();
Set<Long> upSet = UserPartyCache.getInstance().getListIdByKey(UserPartyCache.mk_u, key);
if (PubUtil.isEmpty(upSet)) return roleSet;
if (PubUtil.isEmpty(upSet)) return ids;
upSet.forEach(k -> {
Set<Long> urSet = getListIdByKey(mk_s, String.valueOf(k));
Set<UserRole> urSet = getListByKey(mk_s, String.valueOf(k));
if (PubUtil.isEmpty(urSet)) return;
roleSet.addAll(upSet);
for (UserRole userRole : urSet) {
ids.add(userRole.getEntityId());
}
});
return roleSet;
return ids;
}

public final Set<UserRole> getSetByUser(String key) {


+ 27
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/UserService.java View File

@@ -4,10 +4,9 @@ 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;
import cc.smtweb.system.bpm.web.sys.base.dict.DictHandler;
import cc.smtweb.system.bpm.web.engine.dynPage.DynPageService;

/**
* Created by 1 at 2022-07-28 15:24:49
@@ -15,6 +14,7 @@ import cc.smtweb.system.bpm.web.sys.base.dict.DictHandler;
*/
@SwService
public class UserService extends DynPageService {
public final static String TYPE_CUST = "cust";

@Override
protected AbstractHandler createHandler(String type) {
@@ -25,8 +25,33 @@ public class UserService extends DynPageService {
return new UserHandler.UserDelHandler();
case TYPE_LOAD:
return new UserHandler.UserLoadHandler();
case TYPE_CUST:
return new UserHandler.UserCustHandler();
}
return super.createHandler(type);
}

/**
* @Author yaoq
* @Date 2022/7/21 15:50
* @Params
* @Return cc.smtweb.framework.core.common.R
* @Description 明细批量新增
*/
public R batchDelParty(@SwBody SwMap params, UserSession us) {
return pageHandler(params, us, TYPE_CUST, handler -> ((UserHandler.UserCustHandler) handler).batchDelParty());
}


/**
* @Author yaoq
* @Date 2022/7/21 15:50
* @Params
* @Return cc.smtweb.framework.core.common.R
* @Description 删除全部
*/
public R delAll(@SwBody SwMap params, UserSession us) {
return pageHandler(params, us, TYPE_CUST, handler -> ((UserHandler.UserCustHandler) handler).delAll());
}

}

+ 20
- 10
smtweb-framework/bpm/src/main/resources/static/event/bpm/sys/user/user/userList.js View File

@@ -1,18 +1,28 @@
/**
* Created by 1 at 2022-07-28 15:24:52
* 注册事件类【用户列表】,参看event.defaultEvent.js
*/
*/
window.$swEvent.setup("bpm.sys.user.user.userList", {
setup(page){
const { $params,$refs, $widgets, $model, $utils, $tabRouter, $api } = page || {};
const { $$message, $$http } = $utils || {};
setup(page) {
const {$params, $refs, $widgets, $model, $utils, $tabRouter, $api} = page || {};
const {$$message, $$http} = $utils || {};

// 示例
const demoFunc = () => {
//
const batchDelParty = () => {
const data = $refs.tbparty.getSelectIds();
if (data.length == 0) {
$$message.notify.warning("请选择要删除的记录!");
return;
}
$$http.post("bpm/user/batchDelParty", {ids: data.join(",")}).then((rt) => {
// 8.弹出成功消息
$$message.notify.success("操作成功");
page.$api.loadOne("userPartyList");
});
};

};
return {
demoFunc,
return {
batchDelParty,
}
}
}
});

+ 24
- 12
smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_query.ftl View File

@@ -6,10 +6,12 @@
"colNum": 3,
"name": "query",
"label": "按钮区",
"size": "80",
"size": "50",
"shadow": "",
"alignY": "center",
"paddingRight": 10
"paddingRight": 20,
"gridTemplateColumns": "400px 400px 1fr",
"paddingLeft": 20
},
"children": [
<#assign fields = group.cfilters>
@@ -23,7 +25,8 @@
<#if filter.maxlength gt 0>
"maxlength": ${filter.maxlength},
</#if>
"placeholder": "请输入查询内容",
"placeholder": "请输入${filter.label}",
"hideLabel": true,
"labelWidth": 100,
"affixError": false,
"dataset": "${filter.dataset}",
@@ -88,12 +91,21 @@
}]
},
{
"id": "${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "20",
"backgroundColor": "transparent"
},
"children": []
},
"id": "id${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "0"
},
"children": [
{
"id": "id${newId()}",
"type": "fx-divider",
"props": {
"label": "",
"contentPosition": "center",
"direction": "horizontal"
}
}
]
},

+ 4
- 4
smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_table.ftl View File

@@ -7,8 +7,8 @@
"size": "",
"label": "列表",
"colNum": 0,
"paddingLeft": 32,
"paddingRight": 32,
"paddingLeft": 20,
"paddingRight": 20,
"shadow": ""
},
"children": [{
@@ -22,7 +22,7 @@
"showHeader": true,
"fit": true,
"dataset": "${param.queryDs}",
"actionWidth": 150
"actionWidth": 120
},
"slots": {
<#if (group.fields?size>0)>
@@ -95,4 +95,4 @@
"events": {}
}
]
},
},

+ 8
- 9
smtweb-framework/bpm/src/main/resources/static/template/model_list.ftl View File

@@ -28,14 +28,13 @@
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "68",
"size": "50",
"label": "查询条件",
"colNum": 2,
"alignY": "center",
"paddingLeft": 32,
"paddingRight": 32,
"shadow": "",
"backgroundImage":"bgImg-region-title"
"paddingLeft": 20,
"paddingRight": 20,
"shadow": ""
},
"children": [
{
@@ -43,12 +42,12 @@
"type": "fx-title",
"props": {
"label": "${title}",
"fontSize": 16,
"color": "#01070D",
"fontSize": 15,
"color": "#313131",
"fontWeight": "bold",
"showPrefix": false,
"showPrefix": true,
"prefixWidth": 5,
"prefixHeight": 24,
"prefixHeight": 15,
"prefixColor": "#1E90FF"
}
},


+ 19
- 13
smtweb-framework/bpm/src/main/resources/static/template/model_list_card.ftl View File

@@ -28,14 +28,13 @@
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "68",
"size": "50",
"label": "查询条件",
"colNum": 2,
"alignY": "center",
"paddingLeft": 32,
"paddingRight": 32,
"shadow": "",
"backgroundImage":"bgImg-region-title"
"paddingLeft": 20,
"paddingRight": 20,
"shadow": ""
},
"children": [
{
@@ -43,12 +42,12 @@
"type": "fx-title",
"props": {
"label": "${title}",
"fontSize": 16,
"color": "#01070D",
"fontSize": 15,
"color": "#313131",
"fontWeight": "bold",
"showPrefix": false,
"showPrefix": true,
"prefixWidth": 5,
"prefixHeight": 24,
"prefixHeight": 15,
"prefixColor": "#1E90FF"
}
},
@@ -115,7 +114,14 @@
<#else>
"title": "${param.editTitle}",
</#if>
"key": "editDialog"
"key": "editDialog",
"fontSize": 16,
"color": "#313131",
"fontWeight": "bold",
"showPrefix": true,
"prefixWidth": 5,
"prefixHeight": 16,
"prefixColor": "#1E90FF"
},
"events": {}
},
@@ -143,7 +149,7 @@
"shape": "panel",
"props": {
"size": "0",
"paddingTop": 32,
"paddingTop": 15,
"colNum": 2
},
<#assign dfields = dialog.fields>
@@ -243,9 +249,9 @@
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "56",
"size": "50",
"alignY": "center",
"paddingRight": 10
"paddingRight": 20
},
"children": [
{


Loading…
Cancel
Save