指令对话框

全栈之路
用后端知识体系开发原生移动应用
指令对话框
指令对话框,它也是单值对话框,取值逻辑也单值对话框一致,但当没有值的情况下,它是用一个UMC指令去获取值,当然他也要求对应WebActivity按特定的规范返回,下列是一个用java实现的指令对话框,注意:指令对话框支持跨计算机语言协作。
String username=this.asyncDialog("Username","Settings","SelectUser"); //可以通过"Settings.SelectUser"模块来选择用户。
@Apiumc(model = "Settings", cmd = "SelectUser", desc = "选择用户") public class SettingsSelectUserActivity extends WebActivity { public void processActivity(WebRequest request, WebResponse response) { String key = this.asyncDialog("Key", "SelectUser");//界面事件Key UUID UserId = Utility.uuid(this.asyncDialog("UserId", g -> { return new UserDialog().search(true, false).title("选择人员").closeEvent("UI.Event"); })); User user = UMC.Data.Database.instance().objectEntity(User.class) .where().and().equal(new User().Id(UserId)).entities().single(); ListItem item = new ListItem(user.Alias, user.Username); this.context().event(key, item, true);//界面事件返回。 } }
目前在ITME中已经实现的指令对话框如下
模块 | 指令 | 参数 | 说明 |
System | Icon | 无 | 选择图标 |
System | Color | 无 | 选择颜色 |
System | Dir | 无 | 选择服务端目录 |
System | Resource | 无 | 上传资源并获取路径 |
System | Payment | {Order:'xx',Subject:'d',Price:'1'} | 支付请求,并返回支付订单号 |
System | Paymented | {Order:'xx'} | 支付结果核算,并返回是否成功支付 |
System | Face | {Order:'xx'} | 人脸核验验证 |
System | Image | {id:'xx',index:1} | 上传指定Id图片 |
Settings | Area | 无 | 选择省市区 |
Settings | SelectOrganize | 无 | 选择组织架构 |
Settings | SelectRole | 无 | 选择角色 |
Settings | SelectUser | 无 | 选择用户 |
管理员 | 阅读(80) | 评论(0)
暂无点赞