From 98c31d9998342f50a6e108a033cf6f423c44e83e Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 12 四月 2024 17:24:06 +0800
Subject: [PATCH] 处理action
---
Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue | 20 ++++++++++++++++++++
Source/ProjectWeb/src/actions/base/BaseAction.js | 4 ++--
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/Source/ProjectWeb/src/actions/base/BaseAction.js b/Source/ProjectWeb/src/actions/base/BaseAction.js
index 0a9fda7..0e9b377 100644
--- a/Source/ProjectWeb/src/actions/base/BaseAction.js
+++ b/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('鏈壘鍒板搴攁ction锛岃閲嶆柊閰嶇疆鎸夐挳锛�');
}
diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue
index 50652d3..afeee51 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue
+++ b/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 = []
--
Gitblit v1.9.3