计算审批流
This commit is contained in:
1 parent
f6460544f1
commit
d418e9b853
6 files changed
+458
-109
No files matched your search
@@ -133,7 +133,7 @@
|
||||
item-text="text"
|
||||
item-value="priority"
|
||||
class="jh-v-input"
|
||||
label="审批人类型"
|
||||
label="优先级"
|
||||
v-model="node.priority"
|
||||
></v-select>
|
||||
</v-col>
|
||||
@@ -141,6 +141,7 @@
|
||||
<span class="jh-input-label">条件组</span>
|
||||
<v-dialog
|
||||
v-model="isConditionGroupShown"
|
||||
persistent="true"
|
||||
width="900"
|
||||
>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
@@ -174,13 +175,17 @@
|
||||
@change="changeConditionId($event, item)"></v-select>
|
||||
</template>
|
||||
<template v-slot:item.express="{ item }">
|
||||
<v-select :items="constantObj.operators[item.type]" dense filled single-line class="jh-v-input" v-model="item.express"></v-select>
|
||||
<v-select :items="constantObj.operators[item.type]" dense filled single-line class="jh-v-input" v-model="item.express"
|
||||
@change="changeExpress($event, item)"></v-select>
|
||||
</template>
|
||||
<template v-slot:item.option-list="{ item }">
|
||||
<div v-if="item.type == 'number'" class="d-flex align-center">
|
||||
<v-text-field class="jh-v-input" dense filled v-model="item.option.begin"></v-text-field>
|
||||
<span> 至 </span>
|
||||
<v-text-field class="jh-v-input" dense filled v-model="item.option.end"></v-text-field>
|
||||
<div v-if="item.type == 'number'">
|
||||
<div v-if="item.express == 'between'" class="d-flex align-center">
|
||||
<v-text-field class="jh-v-input" dense filled v-model="item.option.begin"></v-text-field>
|
||||
<span> 至 </span>
|
||||
<v-text-field class="jh-v-input" dense filled v-model="item.option.end"></v-text-field>
|
||||
</div>
|
||||
<v-text-field v-else class="jh-v-input" dense filled v-model="item.option"></v-text-field>
|
||||
</div>
|
||||
<v-select v-else :items="getOptionList(item)" item-text="text" item-value="value" dense filled class="jh-v-input" v-model="item.option" multiple></v-select>
|
||||
</template>
|
||||
@@ -315,8 +320,8 @@
|
||||
operators: {
|
||||
'single': [{ text: '包含', value: 'include' }],
|
||||
'multiple': [{ text: '完全包含', value: 'fullInclude' }, { text: '其一包含', value: 'oneInclude'}],
|
||||
'number': [{ text: '小于', value: 'less' }, { text: '小于等于', value: 'lessEqual'}, { text: '等于', value: 'equal'},
|
||||
{ text: '大于等于', value: 'moreEqual'}, { text: '大于', value: 'more'}, { text: '介于(a≤x≤b)', value: 'between'},]
|
||||
'number': [{ text: '小于', value: '<', value1: 'less' }, { text: '小于等于', value: '<=', value1: 'lessEqual'}, { text: '等于', value: '==', value1: 'equal'},
|
||||
{ text: '大于等于', value: '>=', value1: 'moreEqual'}, { text: '大于', value: '>', value1: 'more'}, { text: '介于(a≤x≤b)', value: 'between'},]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -430,14 +435,22 @@
|
||||
var conditionItem = this.conditions.find(c => c.id == id)
|
||||
item.type = conditionItem.type || null
|
||||
item.express = null
|
||||
item.option = item.type == 'number'? { begin: null, end: null} : null
|
||||
// item.option = item.type == 'number'? { begin: null, end: null} : null
|
||||
item.option = null
|
||||
},
|
||||
changeExpress(express, item){
|
||||
if(item.type == 'number' && express == 'between'){
|
||||
this.$set(item, 'option', { begin: null, end: null})
|
||||
}else{
|
||||
this.$set(item, 'option', null)
|
||||
}
|
||||
this.$forceUpdate()
|
||||
console.log('changeExpress', item, express);
|
||||
},
|
||||
closeConditionGroupDialog(){
|
||||
this.$forceUpdate()
|
||||
this.$emit('reflesh-workflow')
|
||||
this.isConditionGroupShown = false
|
||||
|
||||
|
||||
},
|
||||
getOptionList(item){
|
||||
if(!item.id) return []
|
||||
@@ -445,7 +458,7 @@
|
||||
return this.user.map(u => {
|
||||
return {
|
||||
text: u.username,
|
||||
value: u.id
|
||||
value: u.userId
|
||||
}
|
||||
})
|
||||
}else{
|
||||
|
||||
Reference in new issue
Block a user