Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

picker组件打开table选择器不能调整列宽 #10791

Closed
q651742112 opened this issue Aug 16, 2024 · 2 comments · Fixed by #10802
Closed

picker组件打开table选择器不能调整列宽 #10791

q651742112 opened this issue Aug 16, 2024 · 2 comments · Fixed by #10802

Comments

@q651742112
Copy link

描述问题:

picker组件打开table选择器不能调整列宽。但是在重新用列选择器开关后可以调整

截图或视频:

QQ.20240816175835.mp4

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的?
    sdknpm 6.6.7

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
    6.6.7

  3. 粘贴有问题的完整 amis schema 代码:

{
  "type": "button",
  "actionType": "drawer",
  "align": "right",
  "drawer": {
    "actions": [
      {
        "actionType": "cancel",
        "id": "u:2274dbf1b9a4",
        "label": "取消",
        "type": "button"
      },
      {
        "actionType": "confirm",
        "id": "u:053a085b65e0",
        "label": "确定",
        "primary": true,
        "type": "button"
      }
    ],
    "body": [
      {
        "api": {
          "adaptor": "return {\\n    ...payload,\\n    status: payload.code === 200 ? 0 : payload.code\\n}",
          "data": {
            "valueMap": {
              "LK_WF_INST_ID": "${LK_WF_INST_ID}",
              "VER": "${VER}",
              "SM_BORDER_PANALARM": "${SM_BORDER_PANALARM}",
              "LAST_ONLINE_TIME": "${LAST_ONLINE_TIME}",
              "IS_PRESET": "${IS_PRESET}",
              "SM_REGION_ID": "${SM_REGION_ID}",
              "SM_EQUIP_TYPE_ID": "${SM_EQUIP_TYPE_ID}",
              "SM_EQUIP_SITE": "${SM_EQUIP_SITE}",
              "STATUS": "${STATUS}",
              "SEQ_NO": "${SEQ_NO}",
              "SM_EQUIP_QR_URL": "${SM_EQUIP_QR_URL}",
              "SM_IP": "${SM_IP}",
              "REMARK": "${REMARK}",
              "LAST_MODI_USER_ID": "${LAST_MODI_USER_ID}",
              "IS_RUNNING": "${IS_RUNNING}",
              "SM_EQUIP_VIDEO_SCREENSHOT": "${SM_EQUIP_VIDEO_SCREENSHOT}",
              "IOT_EQUIP_ID": "${IOT_EQUIP_ID}",
              "SM_EQUIP_IMG": "${SM_EQUIP_IMG}",
              "SM_EQUIP_TEXT_GUIDE": "${SM_EQUIP_TEXT_GUIDE}",
              "SM_EQUIP_LAST_REPAIR": "${SM_EQUIP_LAST_REPAIR}",
              "LAST_MODI_DT": "${LAST_MODI_DT}",
              "NAME": "${NAME}",
              "CODE": "${CODE}",
              "CRT_DT": "${CRT_DT}",
              "SM_EQUIP_LAST_MAINTAIN": "${SM_EQUIP_LAST_MAINTAIN}",
              "CRT_USER_ID": "${CRT_USER_ID}",
              "IS_ONLINE": "${IS_ONLINE}",
              "SM_EQUIP_VIDEO_GUIDE": "${SM_EQUIP_VIDEO_GUIDE}",
              "SM_ANTITHEFT_PANALARM": "${SM_ANTITHEFT_PANALARM}",
              "TS": "${TS}"
            },
            "viewId": "43388158392000184"
          },
          "dataType": "json",
          "headers": {
            "Content-Type": "application/json"
          },
          "method": "post",
          "requestAdaptor": "const { method, data, url } = api;\\r\\nconst transformedValueMap =\\r\\n  Object.keys(data.valueMap).reduce((acc, key) => {\\r\\n    console.log(\\\"值\\\"+acc+key)\\r\\n    acc[key] = data.valueMap[key] === '' ? null : data.valueMap[key];\\r\\n    return acc;\\r\\n  }, {}); return {\\r\\n    ...api, data: { ...data, valueMap: transformedValueMap },\\r\\n    url: url, method: method\\r\\n  }",
          "url": "/api/data/insertSingleByViewInStr"
        },
        "body": [
          {
            "type": "switch",
            "label": "是否预设",
            "name": "IS_PRESET",
            "required": false,
            "validationErrors": {},
            "validations": {},
            "value": false,
            "id": "u:5c8f0dde117d"
          },
          {
            "type": "input-datetime",
            "valueFormat": "YYYY-MM-DD HH:mm:ss",
            "displayFormat": "YYYY-MM-DD HH:mm:ss",
            "clearable": true,
            "shortcuts": [
              "yesterday",
              "today",
              "tomorrow"
            ],
            "label": "创建日期时间",
            "name": "CRT_DT",
            "placeholder": "-",
            "required": false,
            "validationErrors": {},
            "validations": {},
            "id": "u:b97da9000905"
          },
          {
            "type": "picker",
            "labelField": "NAME",
            "valueField": "ID",
            "pickerSchema": {
              "mode": "table",
              "name": "thelist",
              "draggable": false,
              "columns": [
                {
                  "name": "USE_DB_VALIDATION",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${USE_DB_VALIDATION_label}",
                  "label": "使用数据库验证",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "HR_ORG_NAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${HR_ORG_NAME_label}",
                  "label": "组织名称",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "HR_COMPY_NAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${HR_COMPY_NAME_label}",
                  "label": "公司名称",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "TS",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${TS_label}",
                  "label": "时间戳",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "EXT_VALIDATION_USERNAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${EXT_VALIDATION_USERNAME_label}",
                  "label": "外部验证用户名",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "SYNC_DTTM",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${SYNC_DTTM_label}",
                  "label": "同步时间",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "EMAIL",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${EMAIL_label}",
                  "label": "邮箱",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "MOBILE",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${MOBILE_label}",
                  "label": "手机",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "SRC_RECORD_ID",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${SRC_RECORD_ID_label}",
                  "label": "来源记录ID",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "SRC",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${SRC_label}",
                  "label": "来源",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "USE_EXT_VALIDATION",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${USE_EXT_VALIDATION_label}",
                  "label": "使用外部验证",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "IS_PRESET",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${IS_PRESET_label}",
                  "label": "是否预设",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "ID",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${ID_label}",
                  "label": "ID",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "LAST_MODI_USER_ID_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "最后修改用户",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "LAST_MODI_DT",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${LAST_MODI_DT_label}",
                  "label": "最后修改日期时间",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "CRT_USER_ID_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "创建用户",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "CRT_DT",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${CRT_DT_label}",
                  "label": "创建日期时间",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "STATUS_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "记录状态",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "LK_WF_INST_ID_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "锁定流程实例",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "VER",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${VER_label}",
                  "label": "版本",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "PASSWORD",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${PASSWORD_label}",
                  "label": "数据库验证密码",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "REMARK",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${REMARK_label}",
                  "label": "备注",
                  "placeholder": "-",
                  "maxLength": 1000,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "NAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${NAME_label}",
                  "label": "名称",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "CODE",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${CODE_label}",
                  "label": "代码",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                }
              ]
            },
            "source": {
              "method": "get",
              "url": "/api/data/fetchByView",
              "data": {
                "keyword": "${keyword}",
                "pageSize": "${perPage}",
                "pageNum": "${page}",
                "orderBy": "${orderBy}",
                "orderDir": "${orderDir}",
                "viewId": "43378728422000111",
                "idsSystemUse": "${ID}"
              },
              "dataType": "json",
              "headers": {
                "Content-Type": "application/json"
              },
              "adaptor": "return { ...payload, status: payload.code === 200 ? 0 : payload.code, msg: payload.msg };",
              "responseData": {
                "&": "$$",
                "total": "${totalRow}"
              }
            },
            "multiple": false,
            "size": "lg",
            "label": "创建用户",
            "name": "CRT_USER_ID",
            "placeholder": "-",
            "required": false,
            "validationErrors": {},
            "validations": {},
            "id": "u:60e8688c0283"
          },
          {
            "type": "input-datetime",
            "valueFormat": "YYYY-MM-DD HH:mm:ss",
            "displayFormat": "YYYY-MM-DD HH:mm:ss",
            "clearable": true,
            "shortcuts": [
              "yesterday",
              "today",
              "tomorrow"
            ],
            "label": "最后修改日期时间",
            "name": "LAST_MODI_DT",
            "placeholder": "-",
            "required": false,
            "validationErrors": {},
            "validations": {},
            "id": "u:697dede09457"
          },
          {
            "type": "picker",
            "labelField": "NAME",
            "valueField": "ID",
            "pickerSchema": {
              "mode": "table",
              "name": "thelist",
              "draggable": false,
              "columns": [
                {
                  "name": "USE_DB_VALIDATION",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${USE_DB_VALIDATION_label}",
                  "label": "使用数据库验证",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "HR_ORG_NAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${HR_ORG_NAME_label}",
                  "label": "组织名称",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "HR_COMPY_NAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${HR_COMPY_NAME_label}",
                  "label": "公司名称",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "TS",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${TS_label}",
                  "label": "时间戳",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "EXT_VALIDATION_USERNAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${EXT_VALIDATION_USERNAME_label}",
                  "label": "外部验证用户名",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "SYNC_DTTM",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${SYNC_DTTM_label}",
                  "label": "同步时间",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "EMAIL",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${EMAIL_label}",
                  "label": "邮箱",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "MOBILE",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${MOBILE_label}",
                  "label": "手机",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "SRC_RECORD_ID",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${SRC_RECORD_ID_label}",
                  "label": "来源记录ID",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "SRC",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${SRC_label}",
                  "label": "来源",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "USE_EXT_VALIDATION",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${USE_EXT_VALIDATION_label}",
                  "label": "使用外部验证",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "IS_PRESET",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${IS_PRESET_label}",
                  "label": "是否预设",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "ID",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${ID_label}",
                  "label": "ID",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "LAST_MODI_USER_ID_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "最后修改用户",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "LAST_MODI_DT",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${LAST_MODI_DT_label}",
                  "label": "最后修改日期时间",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "CRT_USER_ID_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "创建用户",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "CRT_DT",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${CRT_DT_label}",
                  "label": "创建日期时间",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "STATUS_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "记录状态",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "LK_WF_INST_ID_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "锁定流程实例",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "VER",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${VER_label}",
                  "label": "版本",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "PASSWORD",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${PASSWORD_label}",
                  "label": "数据库验证密码",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "REMARK",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${REMARK_label}",
                  "label": "备注",
                  "placeholder": "-",
                  "maxLength": 1000,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "NAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${NAME_label}",
                  "label": "名称",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "CODE",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${CODE_label}",
                  "label": "代码",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                }
              ]
            },
            "source": {
              "method": "get",
              "url": "/api/data/fetchByView",
              "data": {
                "keyword": "${keyword}",
                "pageSize": "${perPage}",
                "pageNum": "${page}",
                "orderBy": "${orderBy}",
                "orderDir": "${orderDir}",
                "viewId": "43378728422000111",
                "idsSystemUse": "${ID}"
              },
              "dataType": "json",
              "headers": {
                "Content-Type": "application/json"
              },
              "adaptor": "return { ...payload, status: payload.code === 200 ? 0 : payload.code, msg: payload.msg };",
              "responseData": {
                "&": "$$",
                "total": "${totalRow}"
              }
            },
            "multiple": false,
            "size": "lg",
            "label": "最后修改用户",
            "name": "LAST_MODI_USER_ID",
            "placeholder": "-",
            "required": false,
            "validationErrors": {},
            "validations": {},
            "id": "u:923a559b0822"
          }
        ],
        "id": "u:675c59bc7956",
        "mode": "horizontal",
        "onEvent": {
          "submitSucc": {
            "actions": [
              {
                "actionType": "reload",
                "componentId": "u:6c00daac94aa"
              }
            ]
          }
        },
        "resetAfterSubmit": true,
        "title": "表单",
        "type": "form"
      }
    ],
    "draggable": false,
    "height": "",
    "showLoading": false,
    "size": "md",
    "title": "新增",
    "type": "dialog",
    "width": ""
  },
  "id": "u:1570ded2b850",
  "label": "新增",
  "level": "primary",
  "size": "md"
}
  1. 操作步骤
    请简单描述一下复现的操作步骤...
@q651742112
Copy link
Author

q651742112 commented Aug 16, 2024

我又手动修改了数据直接从option中获取,增加了数据,发现可以调整列宽。但是为什么我从接口中区获取数据不能调整列宽呢。

{
  "type": "button",
  "actionType": "drawer",
  "align": "right",
  "drawer": {
    "actions": [
      {
        "actionType": "cancel",
        "id": "u:6841675f94f2",
        "label": "取消",
        "type": "button"
      },
      {
        "actionType": "confirm",
        "id": "u:95adfe619d17",
        "label": "确定",
        "primary": true,
        "type": "button"
      }
    ],
    "body": [
      {
        "body": [
          {
            "type": "switch",
            "label": "是否预设",
            "name": "IS_PRESET",
            "required": false,
            "validationErrors": {},
            "validations": {},
            "value": false,
            "id": "u:856adb905c67"
          },
          {
            "type": "input-datetime",
            "valueFormat": "YYYY-MM-DD HH:mm:ss",
            "displayFormat": "YYYY-MM-DD HH:mm:ss",
            "clearable": true,
            "shortcuts": [
              "yesterday",
              "today",
              "tomorrow"
            ],
            "label": "创建日期时间",
            "name": "CRT_DT",
            "placeholder": "-",
            "required": false,
            "validationErrors": {},
            "validations": {},
            "id": "u:c049fe9835b7"
          },
          {
            "type": "picker",
            "labelField": "NAME",
            "valueField": "ID",
            "pickerSchema": {
              "mode": "table",
              "name": "thelist",
              "draggable": false,
              "columns": [
                {
                  "name": "USE_DB_VALIDATION",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${USE_DB_VALIDATION_label}",
                  "label": "使用数据库验证",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "HR_ORG_NAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${HR_ORG_NAME_label}",
                  "label": "组织名称",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "HR_COMPY_NAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${HR_COMPY_NAME_label}",
                  "label": "公司名称",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "TS",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${TS_label}",
                  "label": "时间戳",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "EXT_VALIDATION_USERNAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${EXT_VALIDATION_USERNAME_label}",
                  "label": "外部验证用户名",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "SYNC_DTTM",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${SYNC_DTTM_label}",
                  "label": "同步时间",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "EMAIL",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${EMAIL_label}",
                  "label": "邮箱",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "MOBILE",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${MOBILE_label}",
                  "label": "手机",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "SRC_RECORD_ID",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${SRC_RECORD_ID_label}",
                  "label": "来源记录ID",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "SRC",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${SRC_label}",
                  "label": "来源",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "USE_EXT_VALIDATION",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${USE_EXT_VALIDATION_label}",
                  "label": "使用外部验证",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "IS_PRESET",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${IS_PRESET_label}",
                  "label": "是否预设",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "ID",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${ID_label}",
                  "label": "ID",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "LAST_MODI_USER_ID_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "最后修改用户",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "LAST_MODI_DT",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${LAST_MODI_DT_label}",
                  "label": "最后修改日期时间",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "CRT_USER_ID_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "创建用户",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "CRT_DT",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${CRT_DT_label}",
                  "label": "创建日期时间",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "STATUS_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "记录状态",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "LK_WF_INST_ID_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "锁定流程实例",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "VER",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${VER_label}",
                  "label": "版本",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "PASSWORD",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${PASSWORD_label}",
                  "label": "数据库验证密码",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "REMARK",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${REMARK_label}",
                  "label": "备注",
                  "placeholder": "-",
                  "maxLength": 1000,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "NAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${NAME_label}",
                  "label": "名称",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "CODE",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${CODE_label}",
                  "label": "代码",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                }
              ]
            },
            "options": [
              {
                "USE_DB_VALIDATION": 0,
                "USE_DB_VALIDATION_label": "否",
                "HR_ORG_NAME": "杭州分公司",
                "HR_ORG_NAME_label": "杭州分公司",
                "HR_COMPY_NAME": "",
                "HR_COMPY_NAME_label": "",
                "TS": "2022-10-14T14:59:04",
                "TS_label": "2022-10-287 14:59:04",
                "USE_EXT_VALIDATION": 1,
                "USE_EXT_VALIDATION_label": "是",
                "ID": "100000753153680105",
                "ID_label": "100000753153680105",
                "LAST_MODI_USER_ID": [
                  {
                    "ID": "99357650286797131",
                    "NAME": ""
                  }
                ],
                "LAST_MODI_USER_ID_label": [
                  {
                    "ID": "99357650286797131",
                    "NAME": ""
                  }
                ],
                "LAST_MODI_DT": "2022-12-07T15:40:42",
                "LAST_MODI_DT_label": "2022-12-341 15:40:42",
                "CRT_USER_ID": [
                  {
                    "ID": "99357650286797131",
                    "NAME": ""
                  }
                ],
                "CRT_USER_ID_label": [
                  {
                    "ID": "99357650286797131",
                    "NAME": ""
                  }
                ],
                "CRT_DT": "2022-10-14T14:59:04",
                "CRT_DT_label": "2022-10-287 14:59:04",
                "STATUS": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "STATUS_label": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "VER": 1,
                "VER_label": 1,
                "PASSWORD": "123456",
                "PASSWORD_label": "123456",
                "NAME": "钱啸",
                "NAME_label": "钱啸",
                "CODE": "qianxiao",
                "CODE_label": "qianxiao"
              },
              {
                "USE_DB_VALIDATION": 0,
                "USE_DB_VALIDATION_label": "否",
                "HR_ORG_NAME": "杭州分公司",
                "HR_ORG_NAME_label": "杭州分公司",
                "HR_COMPY_NAME": "",
                "HR_COMPY_NAME_label": "",
                "TS": "2022-10-14T14:59:04",
                "TS_label": "2022-10-287 14:59:04",
                "USE_EXT_VALIDATION": 1,
                "USE_EXT_VALIDATION_label": "是",
                "ID": "100000753153680107",
                "ID_label": "100000753153680107",
                "LAST_MODI_USER_ID": [
                  {
                    "ID": "99357650286797131",
                    "NAME": ""
                  }
                ],
                "LAST_MODI_USER_ID_label": [
                  {
                    "ID": "99357650286797131",
                    "NAME": ""
                  }
                ],
                "LAST_MODI_DT": "2022-12-07T15:40:42",
                "LAST_MODI_DT_label": "2022-12-341 15:40:42",
                "CRT_USER_ID": [
                  {
                    "ID": "99357650286797131",
                    "NAME": ""
                  }
                ],
                "CRT_USER_ID_label": [
                  {
                    "ID": "99357650286797131",
                    "NAME": ""
                  }
                ],
                "CRT_DT": "2022-10-14T14:59:04",
                "CRT_DT_label": "2022-10-287 14:59:04",
                "STATUS": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "STATUS_label": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "VER": 1,
                "VER_label": 1,
                "PASSWORD": "123456",
                "PASSWORD_label": "123456",
                "NAME": "王乾",
                "NAME_label": "王乾",
                "CODE": "wangqian",
                "CODE_label": "wangqian"
              },
              {
                "USE_DB_VALIDATION": 1,
                "USE_DB_VALIDATION_label": "是",
                "HR_ORG_NAME": "主管",
                "HR_ORG_NAME_label": "主管",
                "HR_COMPY_NAME": "物业",
                "HR_COMPY_NAME_label": "物业",
                "TS": "2022-12-05T17:23:36",
                "TS_label": "2022-12-339 17:23:36",
                "EXT_VALIDATION_USERNAME": "100000753172253074",
                "EXT_VALIDATION_USERNAME_label": "100000753172253074",
                "SYNC_DTTM": "2022-12-04T17:45:56",
                "SYNC_DTTM_label": "2022-12-338 17:45:56",
                "MOBILE": "15523709873",
                "MOBILE_label": "15523709873",
                "SRC_RECORD_ID": "7",
                "SRC_RECORD_ID_label": "7",
                "SRC": "excel导入",
                "SRC_label": "excel导入",
                "USE_EXT_VALIDATION": 1,
                "USE_EXT_VALIDATION_label": "是",
                "ID": "100000753172253074",
                "ID_label": "100000753172253074",
                "LAST_MODI_USER_ID": [
                  {
                    "ID": "99708018630933745",
                    "NAME": "冯娇"
                  }
                ],
                "LAST_MODI_USER_ID_label": [
                  {
                    "ID": "99708018630933745",
                    "NAME": "冯娇"
                  }
                ],
                "LAST_MODI_DT": "2022-12-05T17:23:36",
                "LAST_MODI_DT_label": "2022-12-339 17:23:36",
                "CRT_USER_ID": [
                  {
                    "ID": "99357650286797131",
                    "NAME": ""
                  }
                ],
                "CRT_USER_ID_label": [
                  {
                    "ID": "99357650286797131",
                    "NAME": ""
                  }
                ],
                "CRT_DT": "2022-10-17T09:27:45",
                "CRT_DT_label": "2022-10-290 09:27:45",
                "STATUS": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "STATUS_label": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "VER": 8,
                "VER_label": 8,
                "PASSWORD": "D42C84408BB6C2E075460D9601A289FF",
                "PASSWORD_label": "D42C84408BB6C2E075460D9601A289FF",
                "REMARK": "shiyongzhanghao",
                "REMARK_label": "shiyongzhanghao",
                "NAME": "王涛",
                "NAME_label": "王涛",
                "CODE": "wangtao",
                "CODE_label": "wangtao"
              },
              {
                "USE_DB_VALIDATION": 1,
                "USE_DB_VALIDATION_label": "是",
                "TS": "2022-10-17T09:52:38",
                "TS_label": "2022-10-290 09:52:38",
                "ID": "100000753172255009",
                "ID_label": "100000753172255009",
                "LAST_MODI_USER_ID": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "LAST_MODI_USER_ID_label": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "LAST_MODI_DT": "2022-10-17T09:52:38",
                "LAST_MODI_DT_label": "2022-10-290 09:52:38",
                "CRT_USER_ID": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "CRT_USER_ID_label": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "CRT_DT": "2022-10-17T09:52:38",
                "CRT_DT_label": "2022-10-290 09:52:38",
                "STATUS": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "STATUS_label": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "VER": 1,
                "VER_label": 1,
                "PASSWORD": "AECE7D2A6C4C6AE332D559AC830FDBA8",
                "PASSWORD_label": "AECE7D2A6C4C6AE332D559AC830FDBA8",
                "REMARK": "shiyongzhanghao",
                "REMARK_label": "shiyongzhanghao",
                "NAME": "SM_954257",
                "NAME_label": "SM_954257",
                "CODE": "fadfaad",
                "CODE_label": "fadfaad"
              },
              {
                "USE_DB_VALIDATION": 1,
                "USE_DB_VALIDATION_label": "是",
                "TS": "2022-10-17T10:39:08",
                "TS_label": "2022-10-290 10:39:08",
                "ID": "100000753174163738",
                "ID_label": "100000753174163738",
                "LAST_MODI_USER_ID": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "LAST_MODI_USER_ID_label": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "LAST_MODI_DT": "2022-10-17T10:39:08",
                "LAST_MODI_DT_label": "2022-10-290 10:39:08",
                "CRT_USER_ID": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "CRT_USER_ID_label": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "CRT_DT": "2022-10-17T10:39:08",
                "CRT_DT_label": "2022-10-290 10:39:08",
                "STATUS": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "STATUS_label": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "VER": 1,
                "VER_label": 1,
                "PASSWORD": "0DA5B7338D6B89987210CCCA345BA4D5",
                "PASSWORD_label": "0DA5B7338D6B89987210CCCA345BA4D5",
                "NAME": "SM_15151515",
                "NAME_label": "SM_15151515",
                "CODE": "1544114",
                "CODE_label": "1544114"
              },
              {
                "USE_DB_VALIDATION": 1,
                "USE_DB_VALIDATION_label": "是",
                "TS": "2022-10-17T10:42:31",
                "TS_label": "2022-10-290 10:42:31",
                "ID": "100000753174163785",
                "ID_label": "100000753174163785",
                "LAST_MODI_USER_ID": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "LAST_MODI_USER_ID_label": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "LAST_MODI_DT": "2022-10-17T10:42:31",
                "LAST_MODI_DT_label": "2022-10-290 10:42:31",
                "CRT_USER_ID": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "CRT_USER_ID_label": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "CRT_DT": "2022-10-17T10:42:31",
                "CRT_DT_label": "2022-10-290 10:42:31",
                "STATUS": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "STATUS_label": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "VER": 1,
                "VER_label": 1,
                "PASSWORD": "88A821073062BA7EB51F6E0694796B15",
                "PASSWORD_label": "88A821073062BA7EB51F6E0694796B15",
                "NAME": "SM_15151516",
                "NAME_label": "SM_15151516",
                "CODE": "15441146",
                "CODE_label": "15441146"
              },
              {
                "USE_DB_VALIDATION": 1,
                "USE_DB_VALIDATION_label": "是",
                "HR_ORG_NAME": "秩序部",
                "HR_ORG_NAME_label": "秩序部",
                "HR_COMPY_NAME": "物业",
                "HR_COMPY_NAME_label": "物业",
                "TS": "2022-12-04T17:47:06",
                "TS_label": "2022-12-338 17:47:06",
                "EXT_VALIDATION_USERNAME": "100000753174817573",
                "EXT_VALIDATION_USERNAME_label": "100000753174817573",
                "SYNC_DTTM": "2022-12-04T17:45:56",
                "SYNC_DTTM_label": "2022-12-338 17:45:56",
                "MOBILE": "18166332100",
                "MOBILE_label": "18166332100",
                "SRC_RECORD_ID": "1",
                "SRC_RECORD_ID_label": "1",
                "SRC": "excel导入",
                "SRC_label": "excel导入",
                "USE_EXT_VALIDATION": 1,
                "USE_EXT_VALIDATION_label": "是",
                "ID": "100000753174817573",
                "ID_label": "100000753174817573",
                "LAST_MODI_USER_ID": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "LAST_MODI_USER_ID_label": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "LAST_MODI_DT": "2022-12-04T17:47:06",
                "LAST_MODI_DT_label": "2022-12-338 17:47:06",
                "CRT_USER_ID": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "CRT_USER_ID_label": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "CRT_DT": "2022-10-17T13:56:10",
                "CRT_DT_label": "2022-10-290 13:56:10",
                "STATUS": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "STATUS_label": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "VER": 2,
                "VER_label": 2,
                "PASSWORD": "B3FFE244E7628525502729EA205388BC",
                "PASSWORD_label": "B3FFE244E7628525502729EA205388BC",
                "NAME": "李洋",
                "NAME_label": "李洋",
                "CODE": "liyang",
                "CODE_label": "liyang"
              },
              {
                "USE_DB_VALIDATION": 1,
                "USE_DB_VALIDATION_label": "是",
                "TS": "2022-10-17T14:06:09",
                "TS_label": "2022-10-290 14:06:09",
                "USE_EXT_VALIDATION": 1,
                "USE_EXT_VALIDATION_label": "是",
                "ID": "100000753174820477",
                "ID_label": "100000753174820477",
                "LAST_MODI_USER_ID": [
                  {
                    "ID": "99708018630933745",
                    "NAME": "冯娇"
                  }
                ],
                "LAST_MODI_USER_ID_label": [
                  {
                    "ID": "99708018630933745",
                    "NAME": "冯娇"
                  }
                ],
                "LAST_MODI_DT": "2022-10-17T14:06:09",
                "LAST_MODI_DT_label": "2022-10-290 14:06:09",
                "CRT_USER_ID": [
                  {
                    "ID": "99708018630933745",
                    "NAME": "冯娇"
                  }
                ],
                "CRT_USER_ID_label": [
                  {
                    "ID": "99708018630933745",
                    "NAME": "冯娇"
                  }
                ],
                "CRT_DT": "2022-10-17T14:06:09",
                "CRT_DT_label": "2022-10-290 14:06:09",
                "STATUS": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "STATUS_label": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "VER": 1,
                "VER_label": 1,
                "PASSWORD": "04678923C40533076915A82FF13CF6CD",
                "PASSWORD_label": "04678923C40533076915A82FF13CF6CD",
                "REMARK": "物业",
                "REMARK_label": "物业",
                "NAME": "邓勇",
                "NAME_label": "邓勇",
                "CODE": "dengyong",
                "CODE_label": "dengyong"
              },
              {
                "USE_DB_VALIDATION": 1,
                "USE_DB_VALIDATION_label": "是",
                "TS": "2022-10-17T14:15:02",
                "TS_label": "2022-10-290 14:15:02",
                "USE_EXT_VALIDATION": 1,
                "USE_EXT_VALIDATION_label": "是",
                "ID": "100000753174820632",
                "ID_label": "100000753174820632",
                "LAST_MODI_USER_ID": [
                  {
                    "ID": "99708018630933745",
                    "NAME": "冯娇"
                  }
                ],
                "LAST_MODI_USER_ID_label": [
                  {
                    "ID": "99708018630933745",
                    "NAME": "冯娇"
                  }
                ],
                "LAST_MODI_DT": "2022-10-17T14:15:02",
                "LAST_MODI_DT_label": "2022-10-290 14:15:02",
                "CRT_USER_ID": [
                  {
                    "ID": "99708018630933745",
                    "NAME": "冯娇"
                  }
                ],
                "CRT_USER_ID_label": [
                  {
                    "ID": "99708018630933745",
                    "NAME": "冯娇"
                  }
                ],
                "CRT_DT": "2022-10-17T14:15:02",
                "CRT_DT_label": "2022-10-290 14:15:02",
                "STATUS": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "STATUS_label": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "VER": 1,
                "VER_label": 1,
                "PASSWORD": "293CB97322D688D07813B85AB5C46CF1",
                "PASSWORD_label": "293CB97322D688D07813B85AB5C46CF1",
                "REMARK": "物业",
                "REMARK_label": "物业",
                "NAME": "谭云生",
                "NAME_label": "谭云生",
                "CODE": "tanyunsheng",
                "CODE_label": "tanyunsheng"
              },
              {
                "USE_DB_VALIDATION": 1,
                "USE_DB_VALIDATION_label": "是",
                "HR_ORG_NAME": "秩序部",
                "HR_ORG_NAME_label": "秩序部",
                "HR_COMPY_NAME": "物业",
                "HR_COMPY_NAME_label": "物业",
                "TS": "2022-12-07T11:25:20",
                "TS_label": "2022-12-341 11:25:20",
                "EXT_VALIDATION_USERNAME": "100000753174822648",
                "EXT_VALIDATION_USERNAME_label": "100000753174822648",
                "SYNC_DTTM": "2022-12-19T13:56:16",
                "SYNC_DTTM_label": "2022-12-353 13:56:16",
                "MOBILE": "13696489349",
                "MOBILE_label": "13696489349",
                "SRC_RECORD_ID": "6",
                "SRC_RECORD_ID_label": "6",
                "SRC": "excel导入",
                "SRC_label": "excel导入",
                "USE_EXT_VALIDATION": 1,
                "USE_EXT_VALIDATION_label": "是",
                "ID": "100000753174822648",
                "ID_label": "100000753174822648",
                "LAST_MODI_USER_ID": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "LAST_MODI_USER_ID_label": [
                  {
                    "ID": "99357650286791309",
                    "NAME": "韩红剑"
                  }
                ],
                "LAST_MODI_DT": "2022-12-07T11:25:20",
                "LAST_MODI_DT_label": "2022-12-341 11:25:20",
                "CRT_USER_ID": [
                  {
                    "ID": "99708018630933745",
                    "NAME": "冯娇"
                  }
                ],
                "CRT_USER_ID_label": [
                  {
                    "ID": "99708018630933745",
                    "NAME": "冯娇"
                  }
                ],
                "CRT_DT": "2022-10-17T14:19:37",
                "CRT_DT_label": "2022-10-290 14:19:37",
                "STATUS": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "STATUS_label": [
                  {
                    "ID": "AP",
                    "NAME": "已批准"
                  }
                ],
                "VER": 3,
                "VER_label": 3,
                "PASSWORD": "F412ADC2694D4E7DC65B7C68D62A0C45",
                "PASSWORD_label": "F412ADC2694D4E7DC65B7C68D62A0C45",
                "REMARK": "物业",
                "REMARK_label": "物业",
                "NAME": "周隆宾",
                "NAME_label": "周隆宾",
                "CODE": "zhoulongbin",
                "CODE_label": "zhoulongbin"
              }
            ],
            "multiple": false,
            "size": "lg",
            "label": "创建用户",
            "name": "CRT_USER_ID",
            "placeholder": "-",
            "required": false,
            "validationErrors": {},
            "validations": {},
            "id": "u:5b379b4c3ea7"
          },
          {
            "type": "input-datetime",
            "valueFormat": "YYYY-MM-DD HH:mm:ss",
            "displayFormat": "YYYY-MM-DD HH:mm:ss",
            "clearable": true,
            "shortcuts": [
              "yesterday",
              "today",
              "tomorrow"
            ],
            "label": "最后修改日期时间",
            "name": "LAST_MODI_DT",
            "placeholder": "-",
            "required": false,
            "validationErrors": {},
            "validations": {},
            "id": "u:99a5abdbc5b6"
          },
          {
            "type": "picker",
            "labelField": "NAME",
            "valueField": "ID",
            "pickerSchema": {
              "mode": "table",
              "name": "thelist",
              "draggable": false,
              "columns": [
                {
                  "name": "USE_DB_VALIDATION",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${USE_DB_VALIDATION_label}",
                  "label": "使用数据库验证",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "HR_ORG_NAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${HR_ORG_NAME_label}",
                  "label": "组织名称",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "HR_COMPY_NAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${HR_COMPY_NAME_label}",
                  "label": "公司名称",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "TS",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${TS_label}",
                  "label": "时间戳",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "EXT_VALIDATION_USERNAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${EXT_VALIDATION_USERNAME_label}",
                  "label": "外部验证用户名",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "SYNC_DTTM",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${SYNC_DTTM_label}",
                  "label": "同步时间",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "EMAIL",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${EMAIL_label}",
                  "label": "邮箱",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "MOBILE",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${MOBILE_label}",
                  "label": "手机",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "SRC_RECORD_ID",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${SRC_RECORD_ID_label}",
                  "label": "来源记录ID",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "SRC",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${SRC_label}",
                  "label": "来源",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "USE_EXT_VALIDATION",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${USE_EXT_VALIDATION_label}",
                  "label": "使用外部验证",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "IS_PRESET",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${IS_PRESET_label}",
                  "label": "是否预设",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "ID",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${ID_label}",
                  "label": "ID",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "LAST_MODI_USER_ID_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "最后修改用户",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "LAST_MODI_DT",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${LAST_MODI_DT_label}",
                  "label": "最后修改日期时间",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "CRT_USER_ID_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "创建用户",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "CRT_DT",
                  "type": "static-datetime",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "width": 150,
                  "tpl": "${CRT_DT_label}",
                  "label": "创建日期时间",
                  "placeholder": "-",
                  "format": "YYYY-MM-DD HH:mm:ss",
                  "valueFormat": "YYYY-MM-DD HH:mm:ss",
                  "displayFormat": "YYYY-MM-DD HH:mm:ss",
                  "maxLine": 2
                },
                {
                  "name": "STATUS_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "记录状态",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "LK_WF_INST_ID_label",
                  "type": "each",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "label": "锁定流程实例",
                  "placeholder": "-",
                  "items": {
                    "type": "tpl",
                    "tpl": "${NAME}<br />",
                    "text": "tpl",
                    "maxLine": 2
                  }
                },
                {
                  "name": "VER",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${VER_label}",
                  "label": "版本",
                  "placeholder": "-",
                  "maxLine": 2
                },
                {
                  "name": "PASSWORD",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${PASSWORD_label}",
                  "label": "数据库验证密码",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "REMARK",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${REMARK_label}",
                  "label": "备注",
                  "placeholder": "-",
                  "maxLength": 1000,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "NAME",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${NAME_label}",
                  "label": "名称",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                },
                {
                  "name": "CODE",
                  "type": "tpl",
                  "sortable": true,
                  "align": "left",
                  "toggled": true,
                  "className": "no-border",
                  "tpl": "${CODE_label}",
                  "label": "代码",
                  "placeholder": "-",
                  "maxLength": 50,
                  "minLength": 0,
                  "maxLine": 2
                }
              ]
            },
            "source": {
              "method": "get",
              "url": "/api/data/fetchByView",
              "data": {
                "keyword": "${keyword}",
                "pageSize": "${perPage}",
                "pageNum": "${page}",
                "orderBy": "${orderBy}",
                "orderDir": "${orderDir}",
                "viewId": "43378728422000111",
                "idsSystemUse": "${ID}"
              },
              "dataType": "json",
              "headers": {
                "Content-Type": "application/json"
              },
              "adaptor": "return { ...payload, status: payload.code === 200 ? 0 : payload.code, msg: payload.msg };",
              "responseData": {
                "&": "$$",
                "total": "${totalRow}"
              }
            },
            "multiple": false,
            "size": "lg",
            "label": "最后修改用户",
            "name": "LAST_MODI_USER_ID",
            "placeholder": "-",
            "required": false,
            "validationErrors": {},
            "validations": {},
            "id": "u:0e5face21661"
          }
        ],
        "id": "u:a0f3c5d1fd9e",
        "mode": "horizontal",
        "onEvent": {
          "submitSucc": {
            "actions": [
              {
                "actionType": "reload",
                "componentId": "u:ab5b59acdb33"
              }
            ]
          }
        },
        "resetAfterSubmit": true,
        "title": "表单",
        "type": "form"
      }
    ],
    "draggable": false,
    "height": "",
    "showLoading": false,
    "size": "md",
    "title": "新增",
    "type": "dialog",
    "width": ""
  },
  "id": "u:1570ded2b850",
  "label": "新增",
  "level": "primary",
  "size": "md",
  "asideResizor": false,
  "pullRefresh": {
    "disabled": true
  }
}

@q651742112
Copy link
Author

上面这两个测试代码唯一区别在于一个从接口中取数,带有分页功能,一个是手动设置的数据。

"source": {
              "method": "get",
              "url": "/api/data/fetchByView",
              "data": {
                "keyword": "${keyword}",
                "pageSize": "${perPage}",
                "pageNum": "${page}",
                "orderBy": "${orderBy}",
                "orderDir": "${orderDir}",
                "viewId": "43378728422000111",
                "idsSystemUse": "${ID}"
              },
              "dataType": "json",
              "headers": {
                "Content-Type": "application/json"
              },
              "adaptor": "return { ...payload, status: payload.code === 200 ? 0 : payload.code, msg: payload.msg };",
              "responseData": {
                "&": "$$",
                "total": "${totalRow}"
              }
            },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants