榕贵开放平台【el-select】
程序员文章站
2022-03-04 18:21:22
...
通过mapper和bridge控制前后端的配置实现
一、效果图
二、bridge配置
{
"form": {
"columns": {
"status": {
"sortId": 9999,
"alias": "status",
"field": "status",
"events": {},
"attrs": {
"label": "状态",
"maxlength": 10,
"clearable": 10,
"multiple": false,
"remote": true,
"filterable": true
},
"meta": {
"fromValue": true,
"dimSessionKey": "dim-bt-family",
"dimLocalKey": "dim-bt-family",
"dimMkey": "bt-family",
"dimResField": "brower",
"dimColumnField": "status",
//数据类型不一致导致问题设置 int 或 string
"dimDataType": "int",
"dimRemote": true,
"dimUrl": null,
"prop": "status",
"rowId": 1,
"type": "basis",
"span": 12,
"auth": true,
"component": "el-select"
}
}
}
}
三、mapper配置
{
"columns":{
"status": {
"fieldSort": 9999,
"extendAlias": "bs_status",
"tableId": 1,
"dataType": "int",
"title": "状态",
"remark": "0 = 已禁用,1 = 审核通过 2 = 待审核 3 = 已驳回 -1 草稿箱",
"guidMethod": "None",
"isRequired": false,
"isSearch": true,
"isData": true,
"dimJoin": {
"fromDimField": "sysState",
"allFilter": "type=='bsstatus'",
"joinChar": ","
},
"filter": {
"isMust": false
},
"field": "status",
"name": "status",
"alias": "status",
"isDate": false,
"isPrimary": false,
"isIdentity": false,
"maxLength": 10,
"colDecimal": 0
}
},
"dimDatas": {
"sysState": {
"extend": "sysState",
"dataFromType": "ConfigFile"
}
}
}
四、MapperDim/Basis/mapper_dim_sys-state.json
{
"success": true,
"data": [
{
"value": 1,
"type": "bsstatus",
"name": "审核通过"
},
{
"value": 2,
"type": "bsstatus",
"name": "待审核"
},
{
"value": 3,
"type": "bsstatus",
"name": "已驳回"
},
{
"value": 0,
"type": "bsstatus",
"name": "已禁用"
},
{
"value": -1,
"type": "bsstatus",
"name": "草稿箱"
}
]
}
上一篇: Bugku_备份是个好习惯
下一篇: 图论 邻接表广搜
推荐阅读