From 9bb6bced3110dc1ac2c0744078f225f99d70ac2c Mon Sep 17 00:00:00 2001
From: dangsn <dangsn@chicecm.com>
Date: 星期五, 21 六月 2024 17:36:09 +0800
Subject: [PATCH] 调整流程启动和流程执行
---
Source/plt-web/plt-web-ui/src/components/actions/base/StartWorkflowAction.js | 76 ++++++++++++++++++++++++++------------
1 files changed, 52 insertions(+), 24 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/components/actions/base/StartWorkflowAction.js b/Source/plt-web/plt-web-ui/src/components/actions/base/StartWorkflowAction.js
index 5d67215..ddb084d 100644
--- a/Source/plt-web/plt-web-ui/src/components/actions/base/StartWorkflowAction.js
+++ b/Source/plt-web/plt-web-ui/src/components/actions/base/StartWorkflowAction.js
@@ -4,34 +4,40 @@
import {paramLow,callPreEvent, callPostEvent} from '../BaseAction';
import {validatenull} from "@/util/validate";
import Vue from "vue";
+import workActionDialog from "@/components/actions/base/startWorkFlow"
+
export const doAction = (options,callback) => {
+ //modelName 娴佺▼鍚嶇О 榛樿涓� 褰撳墠鐢ㄦ埛+'鍚姩娴佺▼'+褰撳墠鍒嗙被
+ //multi 鏄惁寮�鍚閫�
+ //checknotprocess 鏄惁鍏佽鍙戣捣娴佺▼
+
options.sourceData = options.sourceData || {};
options.dataStore = options.dataStore || [];
- if (!options.dataStore || options.dataStore.length < 1) {
- Vue.prototype.$message.error("璇烽�夋嫨闇�瑕佸彂璧锋祦绋嬬殑鏁版嵁");
- return false;
- }
- if (!options.paramVOS.multi && options.dataStore.length > 1) {
- Vue.prototype.$message.error("浠呰兘閫夋嫨涓�鏉℃暟鎹彂璧锋祦绋�");
- return false;
- }
-
- //楠岃瘉涓嶅厑璁稿惎鍔ㄧ殑鏉′欢
- if(!validatenull(options.paramVOS.checknotprocess)) {
- let notprocess = options.paramVOS.checknotprocess.split('&');
- let checknotprocess=false;
- notprocess.forEach((item,i)=>{
- if (options.dataStore[0][item.split('=')[0]] == item.split('=')[1]) {
- checknotprocess=true;
- return false;
- }
- })
- if (checknotprocess) {
- Vue.prototype.$message.error(replaceFreeMarker(options.paramVOS.checknotprocessmsg,options.dataStore,{}) || "褰撳墠鏁版嵁涓嶅厑璁稿彂璧锋祦绋�");
- return false;
- }
- }
+ // if (!options.dataStore || options.dataStore.length < 1) {
+ // Vue.prototype.$message.error("璇烽�夋嫨闇�瑕佸彂璧锋祦绋嬬殑鏁版嵁");
+ // return false;
+ // }
+ // if (!options.paramVOS.multi && options.dataStore.length > 1) {
+ // Vue.prototype.$message.error("浠呰兘閫夋嫨涓�鏉℃暟鎹彂璧锋祦绋�");
+ // return false;
+ // }
+ //
+ // //楠岃瘉涓嶅厑璁稿惎鍔ㄧ殑鏉′欢
+ // if(!validatenull(options.paramVOS.checknotprocess)) {
+ // let notprocess = options.paramVOS.checknotprocess.split('&');
+ // let checknotprocess=false;
+ // notprocess.forEach((item,i)=>{
+ // if (options.dataStore[0][item.split('=')[0]] == item.split('=')[1]) {
+ // checknotprocess=true;
+ // return false;
+ // }
+ // })
+ // if (checknotprocess) {
+ // Vue.prototype.$message.error(replaceFreeMarker(options.paramVOS.checknotprocessmsg,options.dataStore,{}) || "褰撳墠鏁版嵁涓嶅厑璁稿彂璧锋祦绋�");
+ // return false;
+ // }
+ // }
callPreEvent(options, doBefore, function (options) {
showStartWindow(options, function () {
@@ -47,7 +53,29 @@
*/
export const showStartWindow = (options,callback)=> {
const paramVOS = options.paramVOS;
+ // if (!paramVOS['form'] && !paramVOS['context']) {
+ // Vue.prototype.$message.error("鎸夐挳閰嶇疆涓嶆纭�");
+ // return false;
+ // }
+ const dialogConstructor = Vue.extend(workActionDialog);
+ let instance = new dialogConstructor();
+ instance.sourceData = options.sourceData;
+ instance.dataStore = options.dataStore;
+ instance.paramVOS = paramVOS;
+
+ instance.dialogClose = function () {
+ vm.visible = false;
+ document.body.removeChild(vm.$el);
+ instance.$destroy();
+ instance = null;
+ };
+ if (callback) {
+ instance.saveCallback = callback;
+ }
+ let vm = instance.$mount();
+ document.body.appendChild(vm.$el);
+ instance.visible = true;
}
/**
--
Gitblit v1.9.3