wangting
2024-04-12 98c31d9998342f50a6e108a033cf6f423c44e83e
处理action
已修改2个文件
24 ■■■■■ 文件已修改
Source/ProjectWeb/src/actions/base/BaseAction.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/actions/base/BaseAction.js
@@ -38,8 +38,8 @@
    if(validatenull(options.paramVOS.context)) {
      options.paramVOS.context = options.paramVOS.content;
    }
    if(handlers[button.actionVO.id]){
      handlers[button.actionVO.id]()
    if(handlers[button.actionVO.id.toLowerCase()]){
      handlers[button.actionVO.id.toLowerCase()]()
    }else{
      Vue.prototype.$message.error('未找到对应action,请重新配置按钮!');
    }
Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue
@@ -57,6 +57,7 @@
import func from "@/util/func";
import {validatenull} from "@/util/validate";
import {doAction} from '@/actions/base/BaseAction';
import Vue from "vue";
export default {
  name: "dynamic-button",
@@ -298,6 +299,25 @@
      if (!paramVOS['type']) {
        paramVOS['type'] = DefineVO.btmType;
      }
      for(let item in paramVOS) {
        if (item.includes('.${') && item.includes('}')) {
          //替换成源数据中的值
          if (Object.keys(this.sourceData).length === 0) {
            this.$message.error("请先选择一条来源数据");
            return false;
          }
          item=item.replace(/:/g,'=');
          let values = item.split(';');
          let initValues = []
        } else if (item.includes('${') && item.includes('}')) {
          //替换成选中数据的值
          if (this.dataStore.length < 1) {
            this.$message.error("请先选择一条数据");
            return false;
          }
          item=item.replace(/:/g,'=');
        }
      }
      /*if (paramVOS['initvalue']) {
        var values = paramVOS['initvalue'].split(';');
        var initValues = []