{
"defaultType": "List",
"types": ["List", "Input"],
"listProps": {
"type": "button",
"objectProps": {
"width": 900,
"btnSize": "small"
},
"children": [{
"namespace": "Form",
"state": {
"type": "component",
"props": {},
"children": [{
"namespace": "FormItem",
"state": {
"type": "component",
"props": {
"fieldName": "type",
"label": "类型",
"style": {
"width": 80
}
},
"children": [{
"namespace": "Select",
"state": {
"type": "component",
"props": {
"options": ["line", "image", "text", "region", "html"],
"defaultValue": "line"
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"type": "component",
"props": {
"fieldName": "config",
"label": "配置JSON"
},
"children": [{
"namespace": "AceEditor",
"state": {
"type": "component",
"props": {
"mode": "json",
"height": "80px",
"minLines": 10,
"maxLines": 10,
"hasSubmitBtn": true,
"showGutter": false,
"name": "ACEPOPUP"
}
}
}]
}
}]
}
}]
}
}
{
"defaultType": "Switch",
"types": ["Switch", "AceEditor"],
"aceEditorProps": {
"mode": "javascript",
"resultType": "object",
"tabSize": 2,
"hasSubmitBtn": true,
"fullScreenSwitch": true,
"maxLines": 10,
"showGutter": false,
"minLines": 5,
"highlightActiveLine": true,
"code": "{\n\n}"
}
}
{
"btnText": "对象配置",
"width": 800,
"children": [{
"namespace": "Form",
"state": {
"props": {
"id": "leftForm"
},
"children": [{
"namespace": "FormItem",
"state": {
"props": {
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 20
},
"label": "是否启用",
"fieldName": "enable"
},
"children": [{
"namespace": "Switch",
"state": {
"props": {
"size": "default",
"defaultValue": "$_any{formState.enable}"
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"fieldName": "data",
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"rules": [],
"hasFeedback": false,
"label": "数据源"
},
"children": [{
"namespace": "Mixin",
"state": {
"props": {
"defaultValue": "$_any{formState.data}",
"types": "$_any{curCompThis.ctxAlibg ? ['Input', 'Select', 'AceEditor'] : ['Input', 'AceEditor']}",
"defaultType": "$_str{curCompThis.ctxAlibg ? 'Select' : 'AceEditor'}",
"selectProps": {
"options": "$_obj{curCompThis._dataList || []}",
"notFoundContent": "无可用数据源",
"allowClear": true,
"showSearch": true,
"filterOption": (input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
"aceEditorProps": {
"mode": "json",
"height": "80px",
"minLines": 5,
"maxLines": 10,
"hasSubmitBtn": true,
"showGutter": false,
"name": "ACEPOPUP"
},
"onChange": function onChange(value, e) {
if (this.Global.curCompThis.ctxAlibg) {
this.Global.curCompThis._leftColumnList = this.Global.curCompThis.ctxAlibg.getColumnListByDataId(value);
this.find('leftForm').forceUpdate();
}
}
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"rules": [],
"hasFeedback": false,
"label": "参数配置",
"fieldName": "paramConfig"
},
"children": [{
"namespace": "Object",
"state": {
"props": {
"defaultValue": "$_any{formState.paramConfig}",
"btnText": "参数配置",
"width": 600,
"disabled": "$_bool{!curCompThis.ctxAlibg}"
},
"children": [{
"namespace": "Form",
"state": {
"props": {
"layout": "horizontal",
"inline": false,
"vertical": false,
"style": {
"paddingTop": "20px"
}
},
"children": [{
"namespace": "FormItem",
"state": {
"props": {
"fieldName": "params",
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"rules": [],
"hasFeedback": false,
"label": "请求参数"
},
"children": [{
"namespace": "AceEditor",
"state": {
"props": {
"mode": "json",
"tabSize": 2,
"showGutter": true,
"fullScreenSwitch": true,
"type": "button",
"defaultValue": "$_any{formState.params}",
"code": "{}",
"maxLines": 20
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"rules": [],
"hasFeedback": false,
"label": "参数限制",
"fieldName": "paramLimit"
},
"children": [{
"namespace": "Select",
"state": {
"props": {
"style": {
"width": 300
},
"options": [],
"showSearch": false,
"mode": "tags",
"placeholder": "参数列表",
"dropdownStyle": {
"display": "none"
},
"defaultValue": "$_any{formState.paramLimit}"
}
}
}, {
"namespace": "Text",
"state": {
"props": {
"text": "按回车确认",
"style": {
"color": "#dd2727",
"marginLeft": "5px"
}
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"fieldName": "refreshRate",
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"rules": [],
"hasFeedback": false,
"label": "刷新率"
},
"children": [{
"namespace": "InputNumber",
"state": {
"props": {
"style": {
"min": 1,
"width": "100px"
},
"defaultValue": "$_any{formState.refreshRate}"
}
}
}, {
"namespace": "Text",
"state": {
"props": {
"text": "ms",
"style": {
"marginLeft": "5px"
}
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"fieldName": "pagination",
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"rules": [],
"hasFeedback": false,
"label": "分页配置"
},
"children": [{
"namespace": "Object",
"state": {
"props": {
"defaultValue": "$_any{formState.pagination}"
},
"children": [{
"namespace": "Form",
"state": {
"props": {
"layout": "horizontal",
"inline": false,
"vertical": false,
"style": {
"paddingTop": "20px"
}
},
"children": [{
"namespace": "FormItem",
"state": {
"props": {
"fieldName": "enable",
"labelCol": {
"span": 6
},
"wrapperCol": {
"span": 18
},
"label": "是否设置分页"
},
"children": [{
"namespace": "Switch",
"state": {
"props": {
"size": "default",
"defaultValue": "$_any{formState.enable}"
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"hasFeedback": false,
"labelCol": {
"span": 6
},
"wrapperCol": {
"span": 18
},
"fieldName": "pageSize",
"label": "pageSize"
},
"children": [{
"namespace": "InputNumber",
"state": {
"props": {
"defaultValue": "$_any{formState.pageSize || 20}"
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"hasFeedback": false,
"labelCol": {
"span": 6
},
"wrapperCol": {
"span": 18
},
"fieldName": "page",
"label": "默认页码"
},
"children": [{
"namespace": "InputNumber",
"state": {
"props": {
"defaultValue": "$_any{formState.page || 1}"
}
}
}]
}
}]
}
}]
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"fieldName": "dataHandle",
"label": "数据处理"
},
"children": [{
"namespace": "AceEditor",
"state": {
"props": {
"mode": "javascript",
"tabSize": 2,
"showGutter": true,
"fullScreenSwitch": true,
"type": "default",
"defaultValue": "$_any{formState.dataHandle}",
"code": "function dataHandle(data) {\nreturn data;\n}",
"maxLines": 10,
"style": {
"width": "100%"
},
"hasSubmitBtn": true
}
}
}]
}
}]
}
}]
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"fieldName": "valueColumn",
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"rules": [],
"hasFeedback": false,
"label": "流量计算指标"
},
"children": [{
"namespace": "Mixin",
"state": {
"props": {
"defaultValue": "$_any{formState.valueColumn}",
"types": "$_any{curCompThis.ctxAlibg ? ['Select', 'Input'] : ['Input']}",
"defaultType": "$_str{curCompThis.ctxAlibg ? 'Select' : 'Input'}",
"selectProps": {
"options": "$_obj{curCompThis._columnList || []}",
"notFoundContent": "无可选指标",
"allowClear": true,
"showSearch": true,
"filterOption": (input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 20
},
"label": "指标别名",
"fieldName": "alias"
},
"children": [{
"namespace": "Mixin",
"state": {
"props": {
"defaultValue": "$_any{formState.alias}",
"defaultType": "List",
"types": ["List", "Input"],
"listProps": {
"type": "button",
"objectProps": {
"width": 600
},
"children": [{
"namespace": "Form",
"state": {
"type": "component",
"props": {},
"children": [{
"namespace": "FormItem",
"state": {
"type": "component",
"props": {
"fieldName": "key",
"label": "key",
"style": {
"width": 200
}
},
"children": [{
"namespace": "Mixin",
"state": {
"props": {
"types": "$_any{curCompThis.ctxAlibg ? ['Select', 'Input'] : ['Input']}",
"defaultType": "$_str{curCompThis.ctxAlibg ? 'Select' : 'Input'}",
"selectProps": {
"options": "$_obj{curCompThis._columnList || []}",
"notFoundContent": "无可选指标",
"allowClear": true,
"showSearch": true,
"filterOption": (input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"type": "component",
"props": {
"fieldName": "value",
"label": "别名"
},
"children": [{
"namespace": "Input",
"state": {
"type": "component",
"props": {}
}
}]
}
}]
}
}]
}
}
}
}]
}
}]
}
}]
}
{
"types": "$_any{curCompThis.ctxAlibg ? ['Input', 'Select', 'AceEditor'] : ['Input', 'AceEditor']}",
"defaultType": "$_str{curCompThis.ctxAlibg ? 'Select' : 'AceEditor'}",
"selectProps": {
"options": "$_obj{curCompThis._dataList || []}",
"notFoundContent": "无可用数据源",
"allowClear": true,
"showSearch": true,
"filterOption": (input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
"aceEditorProps": {
"mode": "json",
"height": "80px",
"minLines": 5,
"maxLines": 10,
"hasSubmitBtn": true,
"showGutter": false,
"name": "ACEPOPUP"
}
}
{
"defaultType": "List",
"types": ["List", "Input"],
"listProps": {
"type": "button",
"objectProps": {
"width": 600
},
"children": [{
"namespace": "Form",
"state": {
"type": "component",
"props": {},
"children": [{
"namespace": "FormItem",
"state": {
"type": "component",
"props": {
"fieldName": "key",
"label": "key",
"style": {
"width": 200
}
},
"children": [{
"namespace": "Mixin",
"state": {
"props": {
"types": "$_any{curCompThis.ctxAlibg ? ['Select', 'Input'] : ['Input']}",
"defaultType": "$_str{curCompThis.ctxAlibg ? 'Select' : 'Input'}",
"selectProps": {
"options": "$_obj{curCompThis._columnList || []}",
"notFoundContent": "无可选指标",
"allowClear": true,
"showSearch": true,
"filterOption": (input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"type": "component",
"props": {
"fieldName": "value",
"label": "别名"
},
"children": [{
"namespace": "Input",
"state": {
"type": "component",
"props": {}
}
}]
}
}]
}
}]
}
}
{
"types": "$_any{curCompThis.ctxAlibg ? ['Select', 'Input'] : ['Input']}",
"defaultType": "$_str{curCompThis.ctxAlibg ? 'Select' : 'Input'}",
"selectProps": {
"options": "$_obj{curCompThis._columnList || []}",
"notFoundContent": "无可选指标",
"allowClear": true,
"showSearch": true,
"filterOption": (input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
{
"mode": "json",
"height": "80px",
"minLines": 5,
"maxLines": 10,
"hasSubmitBtn": true,
"showGutter": false,
"name": "ACEPOPUP"
}
{
"mode": "javascript",
"resultType": "object",
"tabSize": 2,
"hasSubmitBtn": true,
"fullScreenSwitch": true,
"maxLines": 10,
"showGutter": false,
"minLines": 5,
"highlightActiveLine": true,
"code": "{\n\n}"
}
{
"btnText": "参数配置",
"width": 600,
"disabled": "$_bool{!curCompThis.ctxAlibg}",
"children": [{
"namespace": "Form",
"state": {
"props": {
"layout": "horizontal",
"inline": false,
"vertical": false,
"style": {
"paddingTop": "20px"
}
},
"children": [{
"namespace": "FormItem",
"state": {
"props": {
"fieldName": "params",
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"rules": [],
"hasFeedback": false,
"label": "请求参数"
},
"children": [{
"namespace": "AceEditor",
"state": {
"props": {
"mode": "json",
"tabSize": 2,
"showGutter": true,
"fullScreenSwitch": true,
"type": "button",
"defaultValue": "$_any{formState.params}",
"code": "{}",
"maxLines": 20
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"rules": [],
"hasFeedback": false,
"label": "参数限制",
"fieldName": "paramLimit"
},
"children": [{
"namespace": "Select",
"state": {
"props": {
"style": {
"width": 300
},
"options": [],
"showSearch": false,
"mode": "tags",
"placeholder": "参数列表",
"dropdownStyle": {
"display": "none"
},
"defaultValue": "$_any{formState.paramLimit}"
}
}
}, {
"namespace": "Text",
"state": {
"props": {
"text": "按回车确认",
"style": {
"color": "#dd2727",
"marginLeft": "5px"
}
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"fieldName": "refreshRate",
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"rules": [],
"hasFeedback": false,
"label": "刷新率"
},
"children": [{
"namespace": "InputNumber",
"state": {
"props": {
"style": {
"min": 1,
"width": "100px"
},
"defaultValue": "$_any{formState.refreshRate}"
}
}
}, {
"namespace": "Text",
"state": {
"props": {
"text": "ms",
"style": {
"marginLeft": "5px"
}
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"fieldName": "pagination",
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"rules": [],
"hasFeedback": false,
"label": "分页配置"
},
"children": [{
"namespace": "Object",
"state": {
"props": {
"defaultValue": "$_any{formState.pagination}"
},
"children": [{
"namespace": "Form",
"state": {
"props": {
"layout": "horizontal",
"inline": false,
"vertical": false,
"style": {
"paddingTop": "20px"
}
},
"children": [{
"namespace": "FormItem",
"state": {
"props": {
"fieldName": "enable",
"labelCol": {
"span": 6
},
"wrapperCol": {
"span": 18
},
"label": "是否设置分页"
},
"children": [{
"namespace": "Switch",
"state": {
"props": {
"size": "default",
"defaultValue": "$_any{formState.enable}"
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"hasFeedback": false,
"labelCol": {
"span": 6
},
"wrapperCol": {
"span": 18
},
"fieldName": "pageSize",
"label": "pageSize"
},
"children": [{
"namespace": "InputNumber",
"state": {
"props": {
"defaultValue": "$_any{formState.pageSize || 20}"
}
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"hasFeedback": false,
"labelCol": {
"span": 6
},
"wrapperCol": {
"span": 18
},
"fieldName": "page",
"label": "默认页码"
},
"children": [{
"namespace": "InputNumber",
"state": {
"props": {
"defaultValue": "$_any{formState.page || 1}"
}
}
}]
}
}]
}
}]
}
}]
}
}, {
"namespace": "FormItem",
"state": {
"props": {
"labelCol": {
"span": 4
},
"wrapperCol": {
"span": 18
},
"fieldName": "dataHandle",
"label": "数据处理"
},
"children": [{
"namespace": "AceEditor",
"state": {
"props": {
"mode": "javascript",
"tabSize": 2,
"showGutter": true,
"fullScreenSwitch": true,
"type": "default",
"defaultValue": "$_any{formState.dataHandle}",
"code": "function dataHandle(data) {\nreturn data;\n}",
"maxLines": 10,
"style": {
"width": "100%"
},
"hasSubmitBtn": true
}
}
}]
}
}]
}
}]
}
{
"namespace": "Mixin",
"state": {
"props": {
"defaultValue": "$_any{formState.valueColumn}",
"types": "$_any{curCompThis.ctxAlibg ? ['Select', 'Input'] : ['Input']}",
"defaultType": "$_str{curCompThis.ctxAlibg ? 'Select' : 'Input'}",
"selectProps": {
"options": "$_obj{curCompThis._columnList || []}",
"notFoundContent": "无可选指标",
"allowClear": true,
"showSearch": true,
"filterOption": (input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
}