instruction stringlengths 9 19 | input stringlengths 0 51 | output stringlengths 18 287 |
|---|---|---|
如何获取表单信息? | dataForm.getDataFormInfo() | |
如何获取所有子表组件? | dataForm.getAllSubTable() | |
如何通过子表code获取特定子表组件? | 参数:subCode(子表唯一标识) | dataForm.getSubTable(subCode) |
如何添加表单字段值变更监听? | 参数1:code(字段code)
参数2:callback(回调函数) | dataForm.addFieldListening(code, callback) |
如何添加子表监听? | 参数1:code(子表code)
参数2:callback(回调函数) | dataForm.addSubTableListening(code, callback) |
如何获取字段结构信息? | 参数:code(字段code) | dataForm.getDataItem(code) |
如何获取表单字段当前值? | 参数:code(字段code) | dataForm.getDataItemValue(code) |
如何设置表单字段的值? | 参数1:code(字段code)
参数2:value(要设置的值) | dataForm.setDataItemValue(code, value) |
如何执行业务规则并获取结果? | 参数:rule(规则字符串)
返回值类型:Promise对象 | dataForm.getBusinessRuleResult(rule) |
如何添加按钮前置拦截? | 参数1:title(按钮名称)
参数2:callback(回调函数) | dataForm.addButtonBefore(title, callback) |
如何隐藏表单字段或子表列? | 参数1:code(字段code或[子表code].[列code])
参数2:isHidden(布尔值) | dataForm.hideComponentByCode(code, isHidden) |
如何隐藏表单按钮? | 参数1:title(按钮名称)
参数2:isHidden(布尔值) | dataForm.isHiddenButton(title, isHidden) |
如何刷新子表数据? | 参数:subCode(子表code) | dataForm.refreshSubTable(subCode) |
如何监听表单按钮加载完成? | 参数:callback(回调函数) | dataForm.addformBtnLoadedListening(callback) |
如何关闭当前表单视图? | dataForm.closeView() | |
如何设置字段扩展属性? | 参数1:code(字段code)
参数2:key(属性键)
参数3:value(属性值) | dataForm.setExtendAttributeByCode(code, key, value) |
如何获取列表信息? | dataTable.getDataTableInfo()
// 返回值包含appItemCode字段 | |
如何添加列表按钮前置拦截? | 参数1:title(按钮名称)
参数2:callback(带datas和resolve参数的回调) | dataTable.addButtonBefore(title, callback(datas, resolve)) |
如何添加列表删除按钮后置拦截? | 参数1:title(按钮名称)
参数2:callback(回调函数) | dataTable.addButtonAfter(title, callback) |
如何获取列表选中项? | dataTable.getSelectedItems() | |
如何显示警告消息弹窗? | 参数:message(消息内容) | dataForm.$message({
type: "warning",
message: "保存失败"
}); |
如何创建确认对话框? | 参数1:message(提示消息)
参数2:title(对话框标题) | dataForm.$alert('保存失败,是否继续', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
showCancelButton: true
}) |
如何检测移动端环境? | dataForm.$isMobile | |
如何以模态框形式打开表单? | dataForm.$quickModal.showFormModal() | |
如何执行GET请求? | 示例请求地址:http://localhost:8080/user
请求参数:ID=12345 | dataForm.$axios.get('http://localhost:8080/user?ID=12345')
.then(response => console.log(response))
.catch(error => console.log(error)); |
如何执行POST请求? | 示例请求体:{firstName: 'Fred', lastName: 'Flintstone'} | dataForm.$axios.post('http://localhost:8080/user', {
firstName: 'Fred',
lastName: 'Flintstone'
})
.then(response => console.log(response))
.catch(error => console.log(error)); |
如何处理用户登录请求? | 参数:code(登录凭证) | dataForm.$http.GET('api/Organization/LoginByCode/' + code)
.then(response => {
if (response.Status !== 1) {
dataForm.$message({ type: "error", message: response.Message || '登录失败' });
}
console.log('登录信息', response.Result);
})
.catch(error => console.log(error)); |
如何获取表单详细信息? | 参数:parameters(请求参数) | dataForm.$http.POST('api/Form/GetFormInfo', parameters)
.then(response => {
if (response.Status !== 1) {
dataForm.$message({ type: "error", message: response.Message || '获取表单信息错误' });
}
console.log('表单信息', response.Result);
})
.catch(error => console.log(error)); |
如何获取当前用户完整信息? | var userInfo = dataForm.$getUserInfo();
/* 可用属性:
- Name:姓名
- ObjectID:用户ID
- Code:工号
- ParentName:部门名称
- ParentID:部门ID */ |
README.md exists but content is empty.
- Downloads last month
- 4