name: distribute
amis_schema: |-
  {
      "type": "service",
      "body": [
          {
              "type": "button",
              "label": "下发",
              "id": "u:tingyong",
              "editorState": "default",
              "onEvent": {
                  "click": {
                      "weight": 0,
                      "actions": [
                          {
                              "ignoreError": false,
                              "actionType": "dialog",
                              "dialog": {
                                  "type": "dialog",
                                  "title": "下发",
                                  "body": [
                                      {
                                          "id": "u:d51bf4085431",
                                          "type": "form",
                                          "title": "表单",
                                          "mode": "normal",
                                          "dsType": "api",
                                          "feat": "Insert",
                                          "body": [
                                              {
                                                  "type": "steedos-field",
                                                  "config": {
                                                      "type": "lookup",
                                                      "label": "填报人",
                                                      "amis": {
                                                          "name": "informants",
                                                          "id": "u:305ef8de0d4f",
                                                          "label": "填报人",
                                                          "placeholder": "",
                                                          "description": "请选择要下发给哪些填报人"
                                                      },
                                                      "object": "b6_tables",
                                                      "name": "informants",
                                                      "deleted_lookup_record_behavior": "clear",
                                                      "multiple": true,
                                                      "reference_to": "users",
                                                      "inlineHelpText": ""
                                                  },
                                                  "id": "u:93a716384a93"
                                              }
                                          ],
                                          "actions": [
                                              {
                                                  "type": "button",
                                                  "label": "提交",
                                                  "onEvent": {
                                                      "click": {
                                                          "actions": [
                                                              {
                                                                  "actionType": "submit",
                                                                  "componentId": "u:d51bf4085431"
                                                              }
                                                          ]
                                                      }
                                                  },
                                                  "level": "primary"
                                              }
                                          ],
                                          "resetAfterSubmit": true,
                                          "api": {
                                              "url": "${context.rootUrl}/api/builder6/b6_tables/actions/distribute/${_id}",
                                              "method": "post",
                                              "requestAdaptor": "",
                                              "adaptor": "",
                                              "messages": {}
                                          }
                                      }
                                  ],
                                  "id": "u:7af8760400aa",
                                  "actions": [
                                      {
                                          "type": "button",
                                          "actionType": "cancel",
                                          "label": "取消",
                                          "id": "u:388f87887506"
                                      },
                                      {
                                          "type": "button",
                                          "actionType": "confirm",
                                          "label": "确定",
                                          "primary": true,
                                          "id": "u:0e6addbb36a1"
                                      }
                                  ],
                                  "showCloseButton": true,
                                  "closeOnOutside": false,
                                  "closeOnEsc": false,
                                  "showErrorMsg": true,
                                  "showLoading": true,
                                  "draggable": false,
                                  "actionType": "dialog",
                                  "size": "md"
                              }
                          }
                      ]
                  }
              },
              "visibleOn": "${global.userId === owner}"
          }
      ],
      "regions": [
          "body"
      ],
      "data": {
          "context": {},
          "dataComponentId": "",
          "record_id": "",
          "record": {},
          "permissions": {}
      },
      "id": "u:0047f320f50d",
      "bodyClassName": "p-0",
      "dsType": "api",
      "definitions": {}
  }
is_enable: true
label: 下发
locked: false
'on': record_only
type: amis_button
visible: true
sort: 999
