查看: 8948|回复: 1

view select 多选

升级   0.1%

68

主题

77

回帖

10

积分

注册会员

Rank: 2

积分
10
发表于 2023-4-21 13:47:34 | 显示全部楼层 |阅读模式
var calendarM = this.data.calendarM;
this.view.select({
    "application": "**",  //数据中心中的应用
    "view": "**",     //视图的名称
    "isMulti": false,           //只允许单选
    "width": "800px",
    "height": "610px",
    "filter": [
      {
          "logic":"and",
          "path":"$work.startTimeMonth",
          "comparison":"==",
          "value":calendarM,
          "formatType":"textValue"
      }

}, function(items) {
    //如果选择了某个数据,将数据赋值给表单输入框
    if (items.length) {
        var lid = this.target.json.id.split("..");
        var cline = lid[2];//获取当前行
        this.form.get("datatable").getModule(cline, "subject_1").setData(items[0].data.subject_1);
            
      
    }
}.bind(this));


这个isMulti 无论设置true或者false 都是单选   可以多选 然后插入到datatable中吗



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

升级   100%

139

主题

1万

回帖

4万

积分

超级版主

Rank: 8Rank: 8

积分
41458
发表于 2023-4-23 10:59:28 | 显示全部楼层
多行的话您需要通过数据表格的addLine去添加
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系客服 关注微信 下载APP 返回顶部 返回列表
viewthread