指令对话框

全栈之路

用后端知识体系开发原生移动应用

指令对话框
指令对话框,它也是单值对话框,取值逻辑也单值对话框一致,但当没有值的情况下,它是用一个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中已经实现的指令对话框如下
模块指令参数说明
SystemIcon选择图标
SystemColor选择颜色
SystemDir选择服务端目录
SystemResource上传资源并获取路径
SystemPayment{Order:'xx',Subject:'d',Price:'1'}支付请求,并返回支付订单号
SystemPaymented{Order:'xx'}支付结果核算,并返回是否成功支付
SystemFace{Order:'xx'}人脸核验验证
SystemImage{id:'xx',index:1}上传指定Id图片
SettingsArea选择省市区
SettingsSelectOrganize选择组织架构
SettingsSelectRole选择角色
SettingsSelectUser选择用户

管理员 | 阅读(80) | 评论(0)

点赞
已读
暂无点赞