Przeglądaj źródła

添加指派功能脚手架

kagg886 2 miesięcy temu
rodzic
commit
2314b1f5fe

+ 4 - 1
src/components/gFlow/consts.ts

@@ -20,6 +20,7 @@ const FlowCheckRuleFormCreatorDeptLeader = 8
 const FlowCheckRuleFormCreatorDeptPrev = 9
 
 const FlowCheckRuleFormCreatorDeptLeaderPrev = 10
+const FlowCheckDynamicJudge = 11
 
 
 
@@ -36,6 +37,7 @@ const NodeTypePush = "push"
 //节点类型-条件网关
 const NodeTypeCondition = "condition"
 
+
 const NodeTypeWebHook = "webHook"
 export {
     FlowCheckRuleAll,
@@ -55,7 +57,8 @@ export {
     NodeTypeConcurrent,
     NodeTypePush,
     NodeTypeCondition,
-		NodeTypeWebHook
+		NodeTypeWebHook,
+		FlowCheckDynamicJudge,
 }
 
 

+ 7 - 0
src/components/gFlow/propertySetting/CommonProperty.vue

@@ -15,6 +15,7 @@
 						<el-option v-for="item in actionRuleOption" :key="item.value" :label="item.label" :value="item.value" />
 					</el-select>
 				</el-form-item>
+				<el-form-item label="指定指派表达式" v-show="formData.actionRule == FlowCheckDynamicJudge"> </el-form-item>
 				<el-form-item
 					label="指定上级部门"
 					v-show="formData.actionRule === FlowCheckRuleFormCreatorDeptPrev || formData.actionRule === FlowCheckRuleFormCreatorDeptLeaderPrev"
@@ -145,6 +146,7 @@ import LogicFlow from '@logicflow/core'
 import { computed, getCurrentInstance, onMounted, reactive, ref, toRefs } from 'vue'
 import Branch from '/@/components/gFlow/propertySetting/branch.vue'
 import {
+	FlowCheckDynamicJudge,
 	FlowCheckRuleAll,
 	FlowCheckRuleDept,
 	FlowCheckRuleDeptLeader,
@@ -230,6 +232,10 @@ const state = reactive({
 			value: FlowCheckRuleUser,
 		},
 		{
+			label: '动态指派',
+			value: FlowCheckDynamicJudge,
+		},
+		{
 			label: '指定岗位',
 			value: FlowCheckRulePost,
 		},
@@ -301,6 +307,7 @@ const state = reactive({
 			body: undefined,
 			headers: undefined,
 		},
+		dynamicJudge: undefined,
 	},
 })
 const { formData, deptData, roleList, postList, actionRuleOption, approveRuleOption, conditionRuleOption, httpMethodOptions } = toRefs(state)

+ 1 - 1
src/components/gFlow/propertySetting/webhookParams.vue

@@ -108,7 +108,7 @@ const emit = defineEmits<{
 
 const origin = computed<{ [key: string]: string }>({
 	get() {
-		return props.modelValue ?? '{}'
+		return props.modelValue ?? {}
 	},
 	set(value) {
 		emit('update:modelValue', value)