描述

主要用于获取选框已选择项等功能。

接口

object GetCheckBoxProperties(jsonCfg: object)

jsonCfg 参数

参数名 必填 类型 说明 备注
mode enum 获取模式 =0 所有选框; =1 id或optionName非空所有选框; =2 按ids提取; =3按optionNames选集名提取;
subDocName string 文档合并时,限定提取的子文档名 为””时 不限制子文档名
ids string array Id数组 mode=2时 有效
optionNames string array optionName数组 mode=3时 有效

入参示例

按Id获取
{
    "mode": 2,
    "ids": [
        "id2",
        "id3"
    ]
}
按配置的选集名optionName获取
{
    "mode": 3,
    "optionNames": [
        "hy"
    ]
}

返回值

类型 说明 备注
object
  • id : 选框id
  • text:选框文本
  • checked: 是否选中
  • option.optionName : 选集名
[
    {
        "object": "checkBox",
        "checkFigureStyle": 0,
        "id": "",
        "name": "",
        "uuid": "",
        "hide": false,
        "text": "未婚",
        "fragment": "<Fragment><CheckBox optionName='hy' itemId='未婚' group='1' optionClass='系统' optionId='婚姻状况'><CF\/>未婚<\/CheckBox><\/Fragment>",
        "checked": 0,
        "itemId": "未婚",
        "group": "1",
        "weight": "0.00",
        "option": {
            "optionName": "hy",
            "optionClass": "系统",
            "optionId": "婚姻状况",
            "multipleChoice": 0,
            "enableEmpty": 0
        },
        "algorithm": {

        },
        "expressions": [

        ]
    },
    {
        "object": "checkBox",
        "checkFigureStyle": 0,
        "id": "",
        "name": "",
        "uuid": "",
        "hide": false,
        "text": "已婚",
        "fragment": "<Fragment><CheckBox optionName='hy' itemId='已婚' group='1' optionClass='系统' optionId='婚姻状况'><CF\/>已婚<\/CheckBox><\/Fragment>",
        "checked": 0,
        "itemId": "已婚",
        "group": "1",
        "weight": "0.00",
        "option": {
            "optionName": "hy",
            "optionClass": "系统",
            "optionId": "婚姻状况",
            "multipleChoice": 0,
            "enableEmpty": 0
        },
        "algorithm": {

        },
        "expressions": [

        ]
    },
    {
        "object": "checkBox",
        "checkFigureStyle": 0,
        "id": "",
        "name": "",
        "uuid": "",
        "hide": false,
        "text": "丧偶",
        "fragment": "<Fragment><CheckBox optionName='hy' itemId='丧偶' group='1' optionClass='系统' optionId='婚姻状况'><CF\/>丧偶<\/CheckBox><\/Fragment>",
        "checked": 0,
        "itemId": "丧偶",
        "group": "1",
        "weight": "0.00",
        "option": {
            "optionName": "hy",
            "optionClass": "系统",
            "optionId": "婚姻状况",
            "multipleChoice": 0,
            "enableEmpty": 0
        },
        "algorithm": {

        },
        "expressions": [

        ]
    },
    {
        "object": "checkBox",
        "checkFigureStyle": 0,
        "id": "",
        "name": "",
        "uuid": "",
        "hide": false,
        "text": "离婚",
        "fragment": "<Fragment><CheckBox optionName='hy' itemId='离婚' group='1' optionClass='系统' optionId='婚姻状况'><CF\/>离婚<\/CheckBox><\/Fragment>",
        "checked": 0,
        "itemId": "离婚",
        "group": "1",
        "weight": "0.00",
        "option": {
            "optionName": "hy",
            "optionClass": "系统",
            "optionId": "婚姻状况",
            "multipleChoice": 0,
            "enableEmpty": 0
        },
        "algorithm": {

        },
        "expressions": [

        ]
    },
    {
        "object": "checkBox",
        "checkFigureStyle": 0,
        "id": "",
        "name": "",
        "uuid": "",
        "hide": false,
        "text": "其它",
        "fragment": "<Fragment><CheckBox optionName='hy' itemId='其它' group='1' optionClass='系统' optionId='婚姻状况'><CF\/>其它<\/CheckBox><\/Fragment>",
        "checked": 0,
        "itemId": "其它",
        "group": "1",
        "weight": "0.00",
        "option": {
            "optionName": "hy",
            "optionClass": "系统",
            "optionId": "婚姻状况",
            "multipleChoice": 0,
            "enableEmpty": 0
        },
        "algorithm": {

        },
        "expressions": [

        ]
    }
]
文档更新时间: 2025-04-10 14:51   作者:admin