|
|
@ -23,7 +23,7 @@ let props = defineProps({ |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
let copyerVisible = ref(false) |
|
|
const flowFactorList = ref<any[]>([]); |
|
|
const flowFactorList = ref<any[]>([]); |
|
|
|
|
|
|
|
|
let conditionVisible = ref(false) |
|
|
let conditionVisible = ref(false) |
|
|
@ -63,14 +63,14 @@ watch(visible,(val:any)=>{ |
|
|
if(flowFactor.length>0){ |
|
|
if(flowFactor.length>0){ |
|
|
flowFactor.forEach(ites=>{ |
|
|
flowFactor.forEach(ites=>{ |
|
|
flowFactorList.value.push({ |
|
|
flowFactorList.value.push({ |
|
|
id:ites.id, |
|
|
id:ites.id, |
|
|
name:ites.name, |
|
|
name:ites.name, |
|
|
keyid:ites.keyid, |
|
|
keyid:ites.keyid, |
|
|
type:ites.type, |
|
|
type:ites.type, |
|
|
isok:ites.isok, |
|
|
isok:ites.isok, |
|
|
isCheckbox:ites.isCheckbox, |
|
|
isCheckbox:ites.isCheckbox, |
|
|
options:ites.options |
|
|
options:ites.options |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
if(props.isFormFlow){ |
|
|
if(props.isFormFlow){ |
|
|
@ -103,11 +103,6 @@ watch(visible,(val:any)=>{ |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const closeDrawer = (val?:any) => { |
|
|
const closeDrawer = (val?:any) => { |
|
|
initFactor() |
|
|
initFactor() |
|
|
setCondition(false) |
|
|
setCondition(false) |
|
|
@ -157,7 +152,7 @@ const pickFactor = (val:any) => { |
|
|
const addFactorCondition = () => { |
|
|
const addFactorCondition = () => { |
|
|
let currLent = tableList.value.length |
|
|
let currLent = tableList.value.length |
|
|
if(currLent < flowFactorList.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){ |
|
|
if(currLent+1 >= flowFactorList.value.length){ |
|
|
maxFactor.value = true |
|
|
maxFactor.value = true |
|
|
}else{ |
|
|
}else{ |
|
|
@ -211,8 +206,8 @@ const delTiaoJian = (val:any) => { |
|
|
} |
|
|
} |
|
|
const saveCondition = () => { |
|
|
const saveCondition = () => { |
|
|
|
|
|
|
|
|
conditionConfig.conditionList = tableList.value |
|
|
conditionConfig.conditionList.value = tableList.value |
|
|
console.log("conditionConfig.conditionList--->",conditionConfig.conditionList,tableList); |
|
|
console.log("conditionConfig.conditionList--->",conditionConfig.conditionList.value,tableList.value); |
|
|
// var a = conditionsConfig.value.conditionNodes.splice(PriorityLevel.value - 1, 1)//截取旧下标 |
|
|
// var a = conditionsConfig.value.conditionNodes.splice(PriorityLevel.value - 1, 1)//截取旧下标 |
|
|
// conditionsConfig.value.conditionNodes.splice(conditionConfig.value.priorityLevel - 1, 0, a[0])//填充新下标 |
|
|
// conditionsConfig.value.conditionNodes.splice(conditionConfig.value.priorityLevel - 1, 0, a[0])//填充新下标 |
|
|
// conditionsConfig.value.conditionNodes.map((item, index) => { |
|
|
// conditionsConfig.value.conditionNodes.map((item, index) => { |
|
|
@ -228,6 +223,43 @@ const saveCondition = () => { |
|
|
// }) |
|
|
// }) |
|
|
closeDrawer() |
|
|
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) |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
<template> |
|
|
<template> |
|
|
<el-drawer v-model="visible" :append-to-body="true" title="条件设置" class="condition_copyer" :show-close="false" :size="550" :before-close="saveCondition"> |
|
|
<el-drawer v-model="visible" :append-to-body="true" title="条件设置" class="condition_copyer" :show-close="false" :size="550" :before-close="saveCondition"> |
|
|
@ -259,33 +291,66 @@ const saveCondition = () => { |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="16"> |
|
|
<el-col :span="16"> |
|
|
<template v-if="itemw.type==1"> |
|
|
<template v-if="itemw.type==1"> |
|
|
<el-button type="primary" style="margin-bottom:0px" >添加/修改成员</el-button> |
|
|
<el-button type="primary" style="margin-bottom:0px" @click="addOrEditUser(itemw.nodeUserList)">添加/修改成员</el-button> |
|
|
<p class="selected_list"> |
|
|
<p class="selected_list"> |
|
|
<el-tag closable type="info" effect="plain" class="tag_us">演员1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">演员1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">演员1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">演员1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">演员1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">演员1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">演员1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">演员1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">演员1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">演员1</el-tag> |
|
|
<el-tag v-for="(item_us,index_us) in itemw.nodeUserList" :key="index_us" closable type="info" effect="plain" class="tag_us" @close="$func.removeEle(itemw.nodeUserList,item_us,'targetId')">{{item_us.name}}</el-tag> |
|
|
</p> |
|
|
</p> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
<template v-if="itemw.type==2"> |
|
|
<template v-if="itemw.type==2"> |
|
|
<el-row v-for="(itemCustomFields,index) in itemw" :key="index" :gutter="5"> |
|
|
<el-row v-for="(itemCustomFields,index) in itemw.customFields" :key="index" style="margin-bottom:10px" :gutter="5"> |
|
|
<el-col :span="6"> |
|
|
<el-col :span="7"> |
|
|
<el-input v-model="itemCustomFields.wordfield" placeholder="判断关键字"></el-input> |
|
|
<el-input v-model="itemCustomFields.wordfield" placeholder="判断关键字"></el-input> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="itemCustomFields.optType != 6?7:16"> |
|
|
<el-col :span="itemCustomFields.optType != 6?8:17"> |
|
|
<el-select v-model="itemCustomFields.optType" class="selectInfo" @change="myoptChhange($event,itemCustomFields)"> |
|
|
<el-select v-model="itemCustomFields.optType" class="selectInfo" style="width:100%"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="itemSel in optTypes" |
|
|
v-for="itemSel in optTypes" |
|
|
:key="itemSel.value" |
|
|
:key="itemSel.value" |
|
|
:label="itemSel.label" |
|
|
:label="itemSel.label" |
|
|
:value="itemSel.value" |
|
|
:value="itemSel.value" |
|
|
> |
|
|
> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col v-if="itemCustomFields.optType != 6" :span="9"> |
|
|
<el-col v-if="itemCustomFields.optType != 6" :span="9"> |
|
|
<el-input v-model="itemCustomFields.leftval" placeholder="请输入值"></el-input> |
|
|
<el-input v-model="itemCustomFields.leftval" type="text" placeholder="请输入" /> |
|
|
</el-col> |
|
|
</el-col> |
|
|
|
|
|
<el-col v-if="itemCustomFields.optType == 6" :span="24"> |
|
|
|
|
|
<el-row :gutter="5" style="margin-top:10px"> |
|
|
|
|
|
<el-col :span="5"> |
|
|
|
|
|
<el-input v-model="itemCustomFields.leftval" type="text" placeholder="请输入" /> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="5"> |
|
|
|
|
|
<el-select v-model="itemCustomFields.leftoptType"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="itemSel in opt1s" |
|
|
|
|
|
:key="itemSel.value" |
|
|
|
|
|
:label="itemSel.label" |
|
|
|
|
|
:value="itemSel.value" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="4" class="cuiZhi_junZhong"> |
|
|
|
|
|
<span>{{ itemCustomFields.wordfield }}</span> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="5"> |
|
|
|
|
|
<el-select v-model="itemCustomFields.rightoptType"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="itemSel in opt1s" |
|
|
|
|
|
:key="itemSel.value" |
|
|
|
|
|
:label="itemSel.label" |
|
|
|
|
|
:value="itemSel.value" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="5"> |
|
|
|
|
|
<el-input v-model="itemCustomFields.rightval" type="text" placeholder="请输入" /> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-button type="warning" style="margin-top:10px" >添加条件</el-button> |
|
|
<el-button type="warning" style="margin-top:0px" @click="addCustomFields">添加条件</el-button> |
|
|
</template> |
|
|
</template> |
|
|
<template v-if="itemw.type==3"> |
|
|
<template v-if="itemw.type==3"> |
|
|
<el-radio-group v-if="!itemw.isCheckbox" v-model="itemw.answers"> |
|
|
<el-radio-group v-if="!itemw.isCheckbox" v-model="itemw.answers"> |
|
|
@ -308,6 +373,14 @@ const saveCondition = () => { |
|
|
<el-button @click="closeDrawer">取 消</el-button> |
|
|
<el-button @click="closeDrawer">取 消</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<employees-role-dialog |
|
|
|
|
|
v-model:visible="copyerVisible" |
|
|
|
|
|
:data="checkedList" |
|
|
|
|
|
@change="sureCopyer" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-drawer> |
|
|
</el-drawer> |
|
|
</template> |
|
|
</template> |
|
|
<style lang="less"> |
|
|
<style lang="less"> |
|
|
@ -444,4 +517,12 @@ const saveCondition = () => { |
|
|
margin:5px 5px 4px 0px; |
|
|
margin:5px 5px 4px 0px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
.cuiZhi_junZhong { |
|
|
|
|
|
text-align:center; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
margin: auto; |
|
|
|
|
|
overflow:hidden; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|