|
|
|
|
@ -108,6 +108,7 @@ |
|
|
|
|
|
|
|
|
|
<user-option ref="userOption" |
|
|
|
|
:user-option="userOption" |
|
|
|
|
all |
|
|
|
|
@submit="handleScopeSubmit"></user-option> |
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
@ -264,13 +265,13 @@ export default { |
|
|
|
|
this.categoryId = id |
|
|
|
|
this.searchChange(this.query) |
|
|
|
|
}, |
|
|
|
|
handleScopeSubmit(list) { |
|
|
|
|
handleScopeSubmit(list, all) { |
|
|
|
|
list.forEach(l => l.val = l.value) |
|
|
|
|
|
|
|
|
|
const { id, modelKey } = this.row |
|
|
|
|
const param = { |
|
|
|
|
modelId: id, modelKey, |
|
|
|
|
scopeList: list |
|
|
|
|
scopeList: all? list.concat([{type: 'WF_ALL', val: 'WF_ALL'}]): list |
|
|
|
|
} |
|
|
|
|
scopeSubmit(param).then(() => { |
|
|
|
|
this.$message.success('操作成功') |
|
|
|
|
@ -278,7 +279,15 @@ export default { |
|
|
|
|
}, |
|
|
|
|
handleScope(row) { |
|
|
|
|
scopeList({ modelId: row.id }).then(res => { |
|
|
|
|
this.$set(this.userOption, 'data', res.data.data.map(d => { |
|
|
|
|
const data = res.data.data |
|
|
|
|
const index = data.findIndex(d => d.type == 'WF_ALL') |
|
|
|
|
if (index != -1) { |
|
|
|
|
this.$refs.userOption.switchAll = true |
|
|
|
|
data.splice(index, 1) |
|
|
|
|
} |
|
|
|
|
else this.$refs.userOption.switchAll = false |
|
|
|
|
|
|
|
|
|
this.$set(this.userOption, 'data', data.map(d => { |
|
|
|
|
return { |
|
|
|
|
value: d.val, |
|
|
|
|
text: d.text, |
|
|
|
|
|