@@ -1,6 +1,7 @@ | |||||
package cc.smtweb.system.bpm.web.design.form.model; | package cc.smtweb.system.bpm.web.design.form.model; | ||||
import cc.smtweb.framework.core.common.SwEnum; | import cc.smtweb.framework.core.common.SwEnum; | ||||
import cc.smtweb.framework.core.common.SwMap; | |||||
import cc.smtweb.framework.core.db.DbEngine; | import cc.smtweb.framework.core.db.DbEngine; | ||||
import cc.smtweb.framework.core.db.EntityDao; | import cc.smtweb.framework.core.db.EntityDao; | ||||
import cc.smtweb.framework.core.util.JsonUtil; | import cc.smtweb.framework.core.util.JsonUtil; | ||||
@@ -26,8 +27,17 @@ public class LcNormalWorker extends BaseModelWorker { | |||||
String baseName = ModelFormHelper.getPageName(bean); | String baseName = ModelFormHelper.getPageName(bean); | ||||
String listName = baseName + StringUtil.upFirst(SwEnum.PageType.LIST.value); | String listName = baseName + StringUtil.upFirst(SwEnum.PageType.LIST.value); | ||||
String cardName = baseName + StringUtil.upFirst(SwEnum.PageType.CARD.value); | String cardName = baseName + StringUtil.upFirst(SwEnum.PageType.CARD.value); | ||||
bean.setOption(JsonUtil.encodeString(bean.getOpts())); | |||||
// | |||||
SwMap opts = bean.getOpts(); | |||||
SwMap cfg = opts.readMap(ModelFormHelper.OPT_CONFIG); | |||||
// | |||||
SwMap cfgPage = new SwMap(); | |||||
cfg.put(ModelFormHelper.OPT_PAGE, cfgPage); | |||||
// | |||||
cfgPage.put(SwEnum.PageType.LIST.value, listName); | |||||
cfgPage.put(SwEnum.PageType.CARD.value, cardName); | |||||
bean.setOption(JsonUtil.encodeString(opts)); | |||||
// | |||||
ModelForm listPage; | ModelForm listPage; | ||||
ModelForm cardPage; | ModelForm cardPage; | ||||
if (bean.isNew()) { | if (bean.isNew()) { | ||||
@@ -55,7 +55,7 @@ public class LCLC1LoadHandler extends ModelLoadHandler<DefaultEntity> { | |||||
* @return | * @return | ||||
*/ | */ | ||||
public R lList() { | public R lList() { | ||||
return super.list(LCLC1Define.dsLCard); | |||||
return super.list(LCLC1Define.dsLList); | |||||
} | } | ||||
/** | /** | ||||
@@ -64,7 +64,7 @@ public class LCLC1LoadHandler extends ModelLoadHandler<DefaultEntity> { | |||||
* @return | * @return | ||||
*/ | */ | ||||
public R rList() { | public R rList() { | ||||
return super.list(LCLC1Define.dsRCard); | |||||
return super.list(LCLC1Define.dsRList); | |||||
} | } | ||||
/** | /** | ||||
@@ -47,12 +47,7 @@ public class LCLC1Service extends ModelService { | |||||
} | } | ||||
//删除 | //删除 | ||||
public R modelLLDel(@SwBody SwMap params, UserSession us) { | |||||
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCLC1DelHandler) handler).lDel()); | |||||
} | |||||
//删除 | |||||
public R modelLCDel(@SwBody SwMap params, UserSession us) { | |||||
public R modelLDel(@SwBody SwMap params, UserSession us) { | |||||
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCLC1DelHandler) handler).lDel()); | return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCLC1DelHandler) handler).lDel()); | ||||
} | } | ||||
@@ -83,12 +78,7 @@ public class LCLC1Service extends ModelService { | |||||
} | } | ||||
//删除 | //删除 | ||||
public R modelRLDel(@SwBody SwMap params, UserSession us) { | |||||
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCLC1DelHandler) handler).rDel()); | |||||
} | |||||
//删除 | |||||
public R modelRCDel(@SwBody SwMap params, UserSession us) { | |||||
public R modelRDel(@SwBody SwMap params, UserSession us) { | |||||
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCLC1DelHandler) handler).rDel()); | return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCLC1DelHandler) handler).rDel()); | ||||
} | } | ||||
@@ -0,0 +1,12 @@ | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.lclc2; | |||||
import cc.smtweb.framework.core.annotation.SwService; | |||||
import cc.smtweb.system.bpm.web.engine.model.listcard.lclc1.LCLC1Service; | |||||
/** | |||||
* @Author:lip | |||||
* @Date : 2022/9/13 15:28 | |||||
*/ | |||||
@SwService | |||||
public class LCLC2Service extends LCLC1Service { | |||||
} |
@@ -0,0 +1,12 @@ | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.lclt; | |||||
import cc.smtweb.framework.core.annotation.SwService; | |||||
import cc.smtweb.system.bpm.web.engine.model.listcard.normal.LCNormalService; | |||||
/** | |||||
* @Author:lip | |||||
* @Date : 2022/9/13 15:30 | |||||
*/ | |||||
@SwService | |||||
public class LCLTService extends LCNormalService { | |||||
} |
@@ -0,0 +1,12 @@ | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.lcltms; | |||||
import cc.smtweb.framework.core.annotation.SwService; | |||||
import cc.smtweb.system.bpm.web.engine.model.listcard.lcms.LCMsService; | |||||
/** | |||||
* @Author:lip | |||||
* @Date : 2022/9/13 15:32 | |||||
*/ | |||||
@SwService | |||||
public class LCLtMsService extends LCMsService { | |||||
} |
@@ -1,4 +1,4 @@ | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.mastersub; | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.lcms; | |||||
/** | /** | ||||
* @Author:lip | * @Author:lip |
@@ -1,4 +1,4 @@ | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.mastersub; | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.lcms; | |||||
import cc.smtweb.framework.core.cache.AbstractCache; | import cc.smtweb.framework.core.cache.AbstractCache; | ||||
import cc.smtweb.framework.core.cache.CacheManager; | import cc.smtweb.framework.core.cache.CacheManager; | ||||
@@ -28,17 +28,8 @@ public class LCMsDelHandler extends AbsDelHandler { | |||||
* | * | ||||
* @return | * @return | ||||
*/ | */ | ||||
public R lDel() { | |||||
return del(); | |||||
} | |||||
/** | |||||
* 卡片删除 | |||||
* | |||||
* @return | |||||
*/ | |||||
public R cDel() { | |||||
return del(); | |||||
public R del() { | |||||
return doDel(); | |||||
} | } | ||||
/** | /** | ||||
@@ -46,7 +37,7 @@ public class LCMsDelHandler extends AbsDelHandler { | |||||
* | * | ||||
* @return | * @return | ||||
*/ | */ | ||||
private R del() { | |||||
private R doDel() { | |||||
long id = params.readLong("id"); | long id = params.readLong("id"); | ||||
if (id <= 0L) throw new BizException("没有收到待删除记录Id(" + id + ")!"); | if (id <= 0L) throw new BizException("没有收到待删除记录Id(" + id + ")!"); | ||||
SwMap props = form.getOpts().readMap("config").readMap("props"); | SwMap props = form.getOpts().readMap("config").readMap("props"); |
@@ -1,4 +1,4 @@ | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.mastersub; | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.lcms; | |||||
import cc.smtweb.framework.core.common.R; | import cc.smtweb.framework.core.common.R; | ||||
import cc.smtweb.framework.core.common.SwMap; | import cc.smtweb.framework.core.common.SwMap; |
@@ -1,4 +1,4 @@ | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.mastersub; | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.lcms; | |||||
import cc.smtweb.framework.core.common.R; | import cc.smtweb.framework.core.common.R; | ||||
import cc.smtweb.framework.core.common.SwMap; | import cc.smtweb.framework.core.common.SwMap; |
@@ -1,4 +1,4 @@ | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.mastersub; | |||||
package cc.smtweb.system.bpm.web.engine.model.listcard.lcms; | |||||
import cc.smtweb.framework.core.annotation.SwBody; | import cc.smtweb.framework.core.annotation.SwBody; | ||||
import cc.smtweb.framework.core.annotation.SwService; | import cc.smtweb.framework.core.annotation.SwService; | ||||
@@ -50,14 +50,9 @@ public class LCMsService extends DynPageService { | |||||
return pageHandler(params, us, TYPE_MODEL_ADD, handler -> ((LCMsLoadHandler) handler).mAdd()); | return pageHandler(params, us, TYPE_MODEL_ADD, handler -> ((LCMsLoadHandler) handler).mAdd()); | ||||
} | } | ||||
//列表删除 | |||||
public R modelLDel(@SwBody SwMap params, UserSession us) { | |||||
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCMsDelHandler) handler).lDel()); | |||||
} | |||||
//卡片删除 | |||||
public R modelCDel(@SwBody SwMap params, UserSession us) { | |||||
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCMsDelHandler) handler).cDel()); | |||||
//删除 | |||||
public R modelDel(@SwBody SwMap params, UserSession us) { | |||||
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCMsDelHandler) handler).del()); | |||||
} | } | ||||
//主表列表数据 | //主表列表数据 |
@@ -36,7 +36,7 @@ | |||||
"shape": "panel", | "shape": "panel", | ||||
"props": { | "props": { | ||||
"size": "56", | "size": "56", | ||||
"label": "${group.label}", | |||||
"label": "标题", | |||||
"colNum": 2, | "colNum": 2, | ||||
"alignY": "center", | "alignY": "center", | ||||
"paddingLeft": 16, | "paddingLeft": 16, | ||||
@@ -77,7 +77,7 @@ | |||||
"label": "${field.label}", | "label": "${field.label}", | ||||
"dataset": "${field.dataset}", | "dataset": "${field.dataset}", | ||||
"required": "${field.required}", | "required": "${field.required}", | ||||
"field": "${field.field}", | |||||
"field": "${field.id}", | |||||
"placeholder": "请输入内容", | "placeholder": "请输入内容", | ||||
"labelWidth": 150, | "labelWidth": 150, | ||||
"readonly": "${field.readonly}", | "readonly": "${field.readonly}", | ||||
@@ -234,7 +234,7 @@ | |||||
"shape": "panel", | "shape": "panel", | ||||
"props": { | "props": { | ||||
"size": "400", | "size": "400", | ||||
"label": "列表", | |||||
"label": "子表列表", | |||||
"colNum": 0, | "colNum": 0, | ||||
"paddingLeft": 16, | "paddingLeft": 16, | ||||
"paddingRight": 16, | "paddingRight": 16, | ||||
@@ -246,12 +246,12 @@ | |||||
"id": "id${newId()}", | "id": "id${newId()}", | ||||
"type": "fx-table", | "type": "fx-table", | ||||
"props": { | "props": { | ||||
"label": "表格", | |||||
"label": "子表表格", | |||||
"border": true, | "border": true, | ||||
"stripe": true, | "stripe": true, | ||||
"showHeader": true, | "showHeader": true, | ||||
"fit": true, | "fit": true, | ||||
"dataset": "${group.dataset}", | |||||
"dataset": "${layout.listSub[0].dataset}", | |||||
"actionWidth": 150 | "actionWidth": 150 | ||||
}, | }, | ||||
"slots": { | "slots": { | ||||
@@ -276,11 +276,11 @@ | |||||
"label": "编辑", | "label": "编辑", | ||||
"type": "text", | "type": "text", | ||||
"leftIcon": "edit", | "leftIcon": "edit", | ||||
"action": "button:edit", | |||||
"action": "button:loadRow", | |||||
"dataset": "${layout.listSub[0].dataset}", | "dataset": "${layout.listSub[0].dataset}", | ||||
"link": true, | |||||
"linkType": "", | |||||
"fxLink": "" | |||||
"linkType": "dialog", | |||||
"fxLink": "dialog:cardSubDialog", | |||||
"fxLink_text": "子表编辑卡片" | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
@@ -290,7 +290,8 @@ | |||||
"label": "删除", | "label": "删除", | ||||
"type": "text", | "type": "text", | ||||
"leftIcon": "delete-themes", | "leftIcon": "delete-themes", | ||||
"action": "button:remove", | |||||
"action": "button:delRow", | |||||
"dataset": "${layout.listSub[0].dataset}", | |||||
"preAction": "", | "preAction": "", | ||||
"link": true, | "link": true, | ||||
"confirm": "" | "confirm": "" | ||||
@@ -341,7 +342,8 @@ | |||||
"type": "fx-button-group", | "type": "fx-button-group", | ||||
"props": { | "props": { | ||||
"showDropdown": false, | "showDropdown": false, | ||||
"textAlign": "center" | |||||
"textAlign": "center", | |||||
"dataset": "${layout.cardMaster[0].dataset}" | |||||
}, | }, | ||||
"slots": { | "slots": { | ||||
"default": [ | "default": [ | ||||
@@ -473,7 +475,7 @@ | |||||
"label": "保存", | "label": "保存", | ||||
"leftIcon": "save", | "leftIcon": "save", | ||||
"type": "success", | "type": "success", | ||||
"action": "button:save", | |||||
"action": "button:saveRow", | |||||
"dataset": "${assist_dialog.dataset}" | "dataset": "${assist_dialog.dataset}" | ||||
}, | }, | ||||
"id": "id${newId()}" | "id": "id${newId()}" | ||||
@@ -481,12 +483,10 @@ | |||||
{ | { | ||||
"type": "fx-button", | "type": "fx-button", | ||||
"props": { | "props": { | ||||
"label": "保存并新增", | |||||
"label": "保存行并新增", | |||||
"type": "primary", | "type": "primary", | ||||
"action": "button:saveRow", | |||||
"linkType": "curr", | |||||
"dataset": "${layout.listSub[0].dataset}", | |||||
"nextAction": "button:addRow" | |||||
"action": "button:saveAddRow", | |||||
"dataset": "${assist_dialog.dataset}" | |||||
}, | }, | ||||
"id": "${newId()}", | "id": "${newId()}", | ||||
"events": {} | "events": {} | ||||