单击/双击焦点事件
当单击或双击位置有内容时,将产生本事件。
具体属性含义,见《设计手册-对象属性说明》
键值
“focusChange”
- 注意:data.docName为整篇文档的文档名,data.paragraph.subDocName为子文档的文档名
返回值
data属性
属性名 |
类型 |
说明 |
备注 |
state |
int |
选中状态 |
0:未选中 1:选择点 2:框选 |
docName |
string |
(主)文档名 |
|
data.mouseMoveToPage属性
属性名 |
类型 |
说明 |
备注 |
pageNum |
int |
鼠标移动点对应的页码 |
|
offsetX |
float |
在页中的x偏移 |
单位:cm |
offsetY |
float |
在页中的y偏移 |
单位:cm |
data.mouseClickToPage属性
属性名 |
类型 |
说明 |
备注 |
pageNum |
int |
鼠标单击点对应的页码 |
|
offsetX |
float |
在页中的x偏移 |
单位:cm |
offsetY |
float |
在页中的y偏移 |
单位:cm |
data.paragraph属性
属性名 |
类型 |
说明 |
备注 |
id |
string |
选中点段落id |
|
subDocName |
string |
子文档名 |
|
data.element属性
属性名 |
类型 |
说明 |
备注 |
id |
string |
选中点元素id |
|
data.font属性
示例:点击到元素
{
"handle": "event",
"type": "focusChange",
"data": {
"selected": true,
"range": false,
"docMark": "4e3S6x000",
"docName": "ABC",
"docType": 1,
"method": "click",
"paragraph": {
"object": "paragraph",
"id": "主诉",
"name": "",
"subDocName": "ABC",
"alignHorizontalMode": 0,
"level": 0,
"mode": 0,
"headerStr": "($) ",
"leftIndent": "0.00",
"rightIndent": "0.00",
"specificIndentFormat": 0,
"specificIndentValue": "0.00",
"spaceBefore": "0.00",
"spaceAfter": "0.00",
"lineSpaceRule": 0,
"lineSpaceValue": 0.60,
"forbidSeriesSplit": 0,
"splitParagraphMode": 0,
"hide": 0,
"locked": 0,
"dynamicLocked": 0
},
"element": {
"object": "element",
"id": "",
"uuid": "",
"name": "",
"empty": true,
"text": "",
"content": "",
"fragment": "<Fragment><Element cfg='30000' hint='既往治疗方式'><Hint cfg='1000'><Font color='808080'\/>既往治疗方式<\/Hint><\/Element><\/Fragment>",
"beginBorder": "",
"endBorder": "",
"beforeTag": "",
"afterTag": "",
"hint": "既往治疗方式",
"tips": "",
"width": "0.00",
"alignHorizontalMode": 0,
"hideKeyWord": 0,
"forbidDelete": false,
"lockedContent": false,
"lockedFormat": false,
"forbidSpace": false,
"enableBackgroundEffects": true,
"enableFocusedEffects": true,
"widthUnderline": false,
"allowJump": 0,
"fitContent": 0,
"displayBorder": 0,
"splitParagraphMode": 0,
"source": {
"sourceClass": "",
"sourceId": "",
"dynamicLoad": 0,
"writeBack": 0
},
"algorithm": {
},
"inputHandle": {
"inputMode": 0
},
"qualityControl": {
"qcClass": 0,
"level": 0,
"forbidEmpty": 0,
"notice": "",
"exclude": "",
"useByteLen": 0,
"useMinLimit": 0,
"min": 0,
"useMaxLimit": 0,
"max": 0
},
"expressions": [
]
},
"font": {
"fontName": "宋体",
"usedFontName": "宋体",
"size": "0.423",
"fontSizeItem": "小四",
"fontSizePound": "12",
"color": "ff808080",
"backColor": "0",
"bold": 0,
"italic": 0,
"underline": 0,
"strikethrough": 0,
"ferrule": 0,
"script": 0
}
}
}
示例:点击到选框/选集
{
"handle": "event",
"type": "focusChange",
"data": {
"docMark": "4e3S6x000",
"docName": "ABC",
"docType": 1,
"method": "click",
"paragraph": {
"object": "paragraph",
"id": "",
"name": "",
"subDocName": "ABC",
"alignHorizontalMode": 0,
"level": 0,
"mode": 0,
"headerStr": "($) ",
"leftIndent": "0.00",
"rightIndent": "0.00",
"specificIndentFormat": 0,
"specificIndentValue": "0.00",
"spaceBefore": "0.00",
"spaceAfter": "0.00",
"lineSpaceRule": 0,
"lineSpaceValue": 0.60,
"forbidSeriesSplit": 0,
"splitParagraphMode": 0,
"hide": 0,
"locked": 0,
"dynamicLocked": 0
},
"checkBox": {
"object": "checkBox",
"checkFigureStyle": 1,
"id": "",
"uuid": "",
"name": "",
"text": "勾选是否显示任意位置元素",
"content": "勾选是否显示任意位置元素",
"fragment": "<Fragment><CheckBox xCfg='10'><Expression event='1'>this.checkbox.checked==true ?any_where.element.visible=true :any_where.ele.visible=false<\/Expression><CF\/>勾选是否显示任意位置元素<\/CheckBox><\/Fragment>",
"checked": 0,
"onFocus": false,
"itemId": "",
"group": "",
"weight": "0.00",
"option": {
"optionName": "",
"optionClass": "",
"optionId": "",
"multipleChoice": 0,
"enableEmpty": 0
},
"algorithm": {
},
"expressions": [
{
"event": 1,
"mode": 0,
"action": "this.checkbox.checked==true ?any_where.element.visible=true :any_where.ele.visible=false"
}
]
},
"font": {
"fontName": "ThinkEditor",
"usedFontName": "ThinkEditor",
"size": "0.423",
"fontSizeItem": "小四",
"fontSizePound": "12",
"color": "ff000000",
"backColor": "0",
"bold": 0,
"italic": 0,
"underline": 0,
"strikethrough": 0,
"ferrule": 0,
"script": 0
}
}
}
说明
字段 |
必填 |
类型 |
说明 |
备注 |
method |
是 |
string |
触发场景 |
单击:”click” 双击:”db-click” |
文档更新时间: 2025-03-11 22:18 作者:admin