feat : workflow适配
This commit is contained in:
@@ -94,7 +94,9 @@
|
||||
<org-items :modelValue="users"/>
|
||||
</span>
|
||||
<span v-else-if="condition.valueType === ValueType.date"></span>
|
||||
<el-icon class="delete-icon" @click="delSubCondition(group, cindex)"><Minus /></el-icon>
|
||||
<el-icon class="delete-icon" @click="delSubCondition(group, cindex)">
|
||||
<Minus/>
|
||||
</el-icon>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -140,14 +142,20 @@ const selectedNode = computed(() => {
|
||||
return processStore.getSelectedNode()
|
||||
})
|
||||
|
||||
const processFromPerms = computed(() => {
|
||||
return processStore.getDesign().processFromPerms;
|
||||
});
|
||||
|
||||
const conditionList = computed(() => {
|
||||
//条件数组
|
||||
//构造可用条件选项
|
||||
const conditionItems = []
|
||||
processStore.getDesign().formItems.forEach(item => filterCondition(item, conditionItems))
|
||||
if (conditionItems.length === 0 || conditionItems[0].id !== 'root') {
|
||||
conditionItems.unshift({id: 'root', title: '发起人', valueType: 'User'})
|
||||
}
|
||||
filterConditionMosr(conditionItems)
|
||||
// processStore.getDesign().formItems.forEach(item => filterCondition(item, conditionItems))
|
||||
// if (conditionItems.length === 0 || conditionItems[0].id !== 'root') {
|
||||
// conditionItems.unshift({id: 'root', title: '发起人', valueType: 'User'})
|
||||
// }
|
||||
conditionItems.unshift({id: 'root', title: '发起人', valueType: 'User'})
|
||||
return conditionItems
|
||||
})
|
||||
|
||||
@@ -184,6 +192,14 @@ const selectUser = (value, orgType) => {
|
||||
users.value = value
|
||||
orgPicker.value.showUserPicker()
|
||||
}
|
||||
const filterConditionMosr = (list) => {
|
||||
processFromPerms.value.forEach((item) => {
|
||||
console.log(item)
|
||||
if (item.required){
|
||||
list.push({title: item.title, id: item.id, valueType: item.valueType})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const filterCondition = (item, list) => {
|
||||
//从表单中过滤出可以选择的条件
|
||||
@@ -206,8 +222,7 @@ const selected = (selected) => {
|
||||
users.value = userInfoList
|
||||
//组织选择器的选中回调函数
|
||||
// users.value.length = 0
|
||||
// console.log('processStore.getAssignedUser()',processStore.getAssignedUser())
|
||||
processStore.getAssignedUser().forEach(u => users.value=userInfoList)
|
||||
processStore.getAssignedUser().forEach(u => users.value = userInfoList)
|
||||
}
|
||||
|
||||
const delGroup = (index) => {
|
||||
@@ -228,7 +243,6 @@ const conditionChange = (index, group) => {
|
||||
if (0 > group.conditions.findIndex(cd => cd.id === cid)) {
|
||||
//新增条件
|
||||
let condition = {...conditionList.value[index]}
|
||||
console.log('fs', condition, conditionList.value, index)
|
||||
condition.compare = '';
|
||||
condition.value = []
|
||||
group.conditions.push(condition)
|
||||
|
||||
Reference in New Issue
Block a user