diff --git a/src/components/workflow/drwer/conditionDrawer.vue b/src/components/workflow/drwer/conditionDrawer.vue index 74c56cb2e..191f8edde 100644 --- a/src/components/workflow/drwer/conditionDrawer.vue +++ b/src/components/workflow/drwer/conditionDrawer.vue @@ -23,7 +23,7 @@ let props = defineProps({ }, }); - +let copyerVisible = ref(false) const flowFactorList = ref([]); let conditionVisible = ref(false) @@ -63,14 +63,14 @@ watch(visible,(val:any)=>{ if(flowFactor.length>0){ flowFactor.forEach(ites=>{ flowFactorList.value.push({ - id:ites.id, - name:ites.name, - keyid:ites.keyid, - type:ites.type, - isok:ites.isok, - isCheckbox:ites.isCheckbox, - options:ites.options - }) + id:ites.id, + name:ites.name, + keyid:ites.keyid, + type:ites.type, + isok:ites.isok, + isCheckbox:ites.isCheckbox, + options:ites.options + }) }) } if(props.isFormFlow){ @@ -103,11 +103,6 @@ watch(visible,(val:any)=>{ }) - - - - - const closeDrawer = (val?:any) => { initFactor() setCondition(false) @@ -157,7 +152,7 @@ const pickFactor = (val:any) => { const addFactorCondition = () => { let currLent = tableList.value.length if(currLent < flowFactorList.value.length){ - tableList.value.push({id:currLent+1,factorid:"",type:0}) + tableList.value.push({id:currLent+1,factorid:"",type:0,isok:false,isCheckbox:true,options:[],answers:[],customFields:[]}) if(currLent+1 >= flowFactorList.value.length){ maxFactor.value = true }else{ @@ -211,8 +206,8 @@ const delTiaoJian = (val:any) => { } const saveCondition = () => { - conditionConfig.conditionList = tableList.value - console.log("conditionConfig.conditionList--->",conditionConfig.conditionList,tableList); + conditionConfig.conditionList.value = tableList.value + console.log("conditionConfig.conditionList--->",conditionConfig.conditionList.value,tableList.value); // var a = conditionsConfig.value.conditionNodes.splice(PriorityLevel.value - 1, 1)//截取旧下标 // conditionsConfig.value.conditionNodes.splice(conditionConfig.value.priorityLevel - 1, 0, a[0])//填充新下标 // conditionsConfig.value.conditionNodes.map((item, index) => { @@ -228,6 +223,43 @@ const saveCondition = () => { // }) closeDrawer() } +//选择成员或角色 +const addOrEditUser = (val:any) => { + copyerVisible.value = true; + checkedList.value = val +} +//保存选中得数据 +const sureCopyer = (data) => { + // console.log("保存选中人",data) + // copyerConfig.value.nodeUserList = data; + copyerVisible.value = false; + if(tableList.value.length > 0){ + tableList.value.forEach(item=>{ + if(item.factorid == "applicant" && item.type == 1){ + item.nodeUserList = data + } + }) + } +} +//添加自定义条件 +const addCustomFields = () =>{ + if(tableList.value.length > 0){ + tableList.value.forEach(item=>{ + if(item.factorid == "customFields" && item.type == 2){ + item.customFields.push({ + wordfield:"", + optType:"1", + leftval:"" + }) + } + }) + } + console.log("添加自定义条件",tableList) +} +//自定义字段改变选项 +const myoptChhange = (val:any) =>{ + console.log("添加自定义条件",val) +}