diff --git a/src/views/plugin/workflow/design/model.vue b/src/views/plugin/workflow/design/model.vue
index 8fe7a55..b58a2e4 100644
--- a/src/views/plugin/workflow/design/model.vue
+++ b/src/views/plugin/workflow/design/model.vue
@@ -108,6 +108,7 @@
@@ -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,
diff --git a/src/views/plugin/workflow/process/components/user-option.vue b/src/views/plugin/workflow/process/components/user-option.vue
index e721559..e85c8b7 100644
--- a/src/views/plugin/workflow/process/components/user-option.vue
+++ b/src/views/plugin/workflow/process/components/user-option.vue
@@ -6,6 +6,7 @@
width="60%"
:before-close="handleClose"
append-to-body>
+
不限制权限,所有人均可发起:(平台需单独配置)
+ :disabled="Boolean(data.find(d => d.type == item.value)) || (switchAll && !['platform'].includes(item.value))">
@@ -137,7 +138,11 @@ import UserSelect from './user-select.vue'
export default {
props: {
- userOption: Object
+ userOption: Object,
+ all: {
+ type: Boolean,
+ default: false
+ }
},
components: {
UserSelect,
@@ -184,6 +189,7 @@ export default {
},
data() {
return {
+ switchAll: false,
init: false,
visible: false,
data: [],
@@ -272,7 +278,7 @@ export default {
})
},
handleSubmit() {
- this.$emit('submit', this.data.filter(d => d.type && d.value))
+ this.$emit('submit', this.data.filter(d => d.type && d.value), this.switchAll)
this.visible = false
},
handleClose(done) {