页面树结构

版本比较

标识

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。

...


控件名称主要配置项说明内部函数支持脚本示例说明
1

标签



1setValue
2getValue
3getFormNamegetFormName 获取当前控件的目标属性
4

setBadge(content)设置徽标内容



ID内部函数支持
1

var label1 = this.getAddinById("Label1");
label1.setValue("标签")

2var label1 = this.getAddinById("Label1");
label1.getValue()
3

var label1 = this.getAddinById("Label1");
console.log("标签getFormName:",label1.getFormName());

4

var lable = this.getAddinById("Label1");
lable.setBadge(6);


2按钮


1

setBadge(content)     //设置徽标内容

2setDisable()    设置按钮禁用



ID内部函数支持
1

varOperation1 =this.getAddinById("Operation1");
Operation1.setBadge("上海");

2

varOperation1 =this.getAddinById("Operation1");

//开启按钮

Operation1.setDisable(true);

//禁用按钮

//Operation1.setDisable(false);


3日期框

args.minDate          选择的最小日期

args.maxDate         选择的最大日期

setValue
getValue
setDisplayType


ID内部函数支持配置项说明
1

var DateInput1 =this.getAddinById('DateInput1');
DateInput1.setValue('2021-01-03');

var DateInput1 =this.getAddinById('DateInput1');

DateInput1.args.minDate =new Date('2021-01-01');

2

var DateInput1 =this.getAddinById('DateInput1');

DateInput1.getValue();

var DateInput1 =this.getAddinById('DateInput1');

DateInput1.args.maxDate =new Date('2021-12-03');

3

var DateInput1 = this.getAddinById("DateInput1");
DateInput1.setDisplayType("visit");



4文本框

args.showWordLimit     显示字数统计

args.maxLength           

//最大长度

setValue
getValue
setDisplayType


ID内部函数支持配置项说明
1

var TextInput1=this.getAddinById('TextInput1');

TextInput1.setValue('https://www.bilibili.com/bangumi/play/ss34276?t=355');

var TextInput1=this.getAddinById('TextInput1');

TextInput1.args.showWordLimit=true;

2

var TextInput1=this.getAddinById('TextInput1');

TextInput1.getValue();

var TextInput1=this.getAddinById('TextInput1');

TextInput1.args.maxLength =20;

3

varTextInput1 = this.getAddinById("TextInput1");
TextInput1.setDisplayType("visit");



5数字框
setValue
getValue
setDisplayType


ID内部函数支持
1

var NumberInput1=this.getAddinById('NumberInput1');

NumberInput1.setValue(23);

2

var NumberInput1=this.getAddinById('NumberInput1');

NumberInput1.getValue();

3

var NumberInput1=this.getAddinById('NumberInput1');

NumberInput1.setDisplayType("visit");


6单选框


1setValue
2getValue
3setDisplayType
4getDisplayValue()     获取选择的显示的值



ID内部函数支持
1

var radioButton1= this.getAddinById("RadioButton1");
radioButton1.setValue("男")

2var radioButton1= this.getAddinById("RadioButton1");
radioButton1.getValue()
3

var type = "visit"

var radioButton1 = this.getAddinById("RadioButton1");
radioButton1.setDisplayType(type);

4var radioButton1 = this.getAddinById("RadioButton1");
console.log("单选框1getDisplayValue():",radioButton1.getDisplayValue());


7复选框



1setValue
2getValue
3setDisplayType
4getDisplayValue()     获取选择的显示的值



ID内部函数支持
1var checkBox1  = this.getAddinById("CheckBox1");
checkBox1  .setValue("复选框")
2var checkBox1this.getAddinById("CheckBox1");
checkBox1 .getValue()
3

var type = "visit"

var checkBox1 = this.getAddinById("CheckBox1");
checkBox1.setDisplayType(type);

4var checkBox1 = this.getAddinById("CheckBox1");
console.log("复选框1getDisplayValue():",checkBox1.getDisplayValue());


8选择框



1setValue
2getValue
3setDisplayType
4getDisplayValue()     获取选择的显示的值



ID内部函数支持
1var selectInput1this.getAddinById("SelectInput1");
selectInput1.setValue("选择框")
2var selectInput1this.getAddinById("SelectInput1");
selectInput1.getValue()
3

var type = "visit"

var selectInput1this.getAddinById("SelectInput1");
selectInput1.setDisplayType(type);

4var selectInput1this.getAddinById("SelectInput1");
selectInput1.log("选择框1getDisplayValue():",selectInput1.getDisplayValue());


9开关




1setValue
2getValue
3setDisplayType



ID内部函数支持
1var switch1this.getAddinById("Switch1");
switch1.setValue("开关")
2var switch1this.getAddinById("Switch1");
switch1.getValue()
3

var type = "visit"

var switch1this.getAddinById("Switch1");
switch1.setDisplayType(type);


10文件上传


1

setValue

    三种状态下,调用脚本setvalue都会显示对应的控件状态

2getValue
3setDisplayType
4

freshData(url)    

    单文件展示的时候,外部脚本更新图片类型附件file值 ,仅在edit 和 visit下起作用



ID内部函数支持
1var attachments1 = this.getAddinById("Attachments1");
attachments1 .setValue("文件上传")
2var attachments1 = this.getAddinById("Attachments1");
attachments1 .getValue()
3

var type = "visit"

var attachments1 = this.getAddinById("Attachments1");
attachments1.setDisplayType(type);

4

var file = this.getAddinById("Attachments1");
file.freshData("http://192.168.31.84:9090/dwf/v1/omf/classes/order/objects/E7C93B831DC3504484C8371731A8A8B1/attributes/fileL/bytes?attachment=true&r=0.390784929434286");


11单元格


1args.titleContent     左侧内容
2args.description     描述内容



1setValue    设置右边内容部分
2getValue    获取右边内容部分
3setDisplayType



ID内部函数支持主要配置项说明
1

debugger;
var select = this.getAddinById('Cell1');
select.setValue('上海市');
var custid= select.getValue();
console.log('打印custid', custid);

debugger;
var select = this.getAddinById('Cell1');
select.args.titleContent ='左侧内容';
console.log('Cell1',select);

2

debugger;
var Cell1 = this.GetAddinById("Cell1");
var Label1 = this.getAddinById("Label1");
Cell1.setDisplayType("edit");
Label1.setValue("单元格"+Cell1.t_edit);
this.msgbox.success("单元格"+Cell1.t_edit)

debugger;
var
 select1 = this.getAddinById('Cell1');
select1.args.description ='描述内容';
console.log('Cell11',select1);


12步进器

args.max    最大值

args.min     最小值

args.step    步长

setValue
getValue
setDisplayType


ID主要配置项说明内部函数支持
1

var Stepper1=this.getAddinById('Stepper1');

Stepper1.setValue('567');

var Stepper1=this.getAddinById('Stepper1');

Stepper1.args.max =20

2

var Stepper1=this.getAddinById('Stepper1');

Stepper1.getValue();

var Stepper1=this.getAddinById('Stepper1');

Stepper1.args.min =10

3

var Stepper1=this.getAddinById('Stepper1');

Stepper1.setDisplayType("visit");

var Stepper1=this.getAddinById('Stepper1');

Stepper1.args.step =2


13嵌入网页


1url      // 链接地址



1getFormName
2setDisplayType



ID主要配置项说明内部函数支持
1

var net = this.getAddinById("Iframe1")
console.log(net.url);
net.url='http://www.baidu.com'
console.log(net.url);

var iframe1 = this.getAddinById("Iframe1");

console.log("网页getFormName:",iframe1.getFormName());
2

var type = "visit"

var iframe1 = this.getAddinById("Iframe1");
iframe1 .setDisplayType(type);


14位置标记

args.mapFlag                  //  默认显示地图  0409移除

args.viewZoom       //  视野级别
args.returnType      //  回填内容形式
args.selfPointUrl    //  自定义图片地址
args.selfPointWidth     //  自定义图片宽度
args.selfPointHeight     //  自定义图片高度



1getValue()
2setValue()
3setDisplayType()
4getFormName()



ID内部函数支持主要配置项说明
1

debugger;
var Table1 = this.GetAddinById("MapPoint1");
var Label1 = this.getAddinById("Label1");
Table1.setDisplayType("edit");
Label1.setValue("位置标记"+Table1.t_edit);
this.msgbox.success("位置标记"+Table1.t_edit)
console.log("位置标记setDisplayType:"+Table1.t_edit)
debugger;
var MapPoint1 = this.getAddinById("MapPoint1");
console.log("位置标记getFormName:",MapPoint1.getFormName());

debugger;
var select1 = this.getAddinById('MapPoint1');
if(select1.map == null) {
    select1.args.viewZoom = 20;  
else {
    select1.args.viewZoom = 20
    select1.initMap();
}



2

debugger;
let mySelect = this.getAddinById('MapPoint1');
let result = mySelect.getValue();//获取界面显示值value
console.log('位置标记getValue', result);
this.msgbox.success(result);

debugger;
var select1 = this.getAddinById('MapPoint1');
select1.args.returnType = "位置"

3

debugger;
var select = this.getAddinById('MapPoint1');
select.setValue('上海市');
var custid= select.getValue();
console.log('位置标记getValue', custid);
var se2 = custid.getSelected();
console.log('getSelected',se2);

debugger;
var select1 = this.getAddinById('MapPoint1');
select1.args.selfPointUrl = "url";  // 自定义图片地址
if(select1.map == null){
    select1.args.selfPointWidth = 50;
    select1.args.selfPointHeight =50;
}else{
    select1.args.selfPointWidth = 50;
    select1.args.selfPointHeight = 50;
    select1.initMap();
}

4

debugger;
var select1 = this.getAddinById('MapPoint1');
select1.args.selfPointWidth = 50;    
select1.args.selfPointHeight = 50;  


...