\rg3-cli\src\views\actions\method-call-do-action-biz.js

/* eslint-disable no-unused-vars */
/* eslint-disable no-undef */
/**
 * 根据业务自定义功能函数的入口
 */
export function callbackRootDataArray(item, that, thatRoot, thatORoot) {
    // 选中:thatRoot.selectionRows
    // 配置:thatRoot.value
    // 主键:thatRoot.primaryData 
    if (item.fromCompTag === "bs-table-action") {
        let ownerId = process.env.VUE_APP_OWNERID;
        // 无法使用字符串路径,只能手动判断
        if (ownerId === 'bt') {
            alert(thatRoot.primaryData);
            // const methodDABiz = require(`@/views/actions/bt/method-call-do-action-biz`);
            // methodDABiz.callbackRootDataArray(item, that, thatRoot, thatORoot);
        }
    }
}


bridge_global-actions.json

RG3.Web.Host.PaaS\Config\Bridge\basis\bridge_global-actions.json

"customer": {
    "enabled": true,
    "sortId": 100,
    "name": "api",
    "events": {
      "type": "biz",
      "func": "", //用来判断加载那个处理函数
      "click": "on-click"
    },
    "attrs": {
      "label": "自定义功能名称",
      "class": "el-icon-document-copy",
      "type": "info"
    },
    "meta": {
      "position": [
        "action"
      ],
      "html": true,
      "auth": true,
      "component": "el-button"
    }
  }
文档更新时间: 2022-08-28 08:25   作者:admin