mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 13:22:49 +00:00
no message
This commit is contained in:
parent
006bc6ceda
commit
66ea277a59
@ -47,6 +47,13 @@
|
||||
@error="error"/>
|
||||
</DrawerOverlay>
|
||||
</template>
|
||||
|
||||
<!--选择用户-->
|
||||
<UserSelect
|
||||
ref="userSelect"
|
||||
v-model="userSelectOptions.value"
|
||||
v-bind="userSelectOptions.config"
|
||||
module/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -104,11 +111,13 @@ import store from "../../store";
|
||||
export default {
|
||||
name: "MicroApps",
|
||||
directives: {TransferDom},
|
||||
components: {MicroContent, DrawerOverlay},
|
||||
components: {UserSelect, MicroContent, DrawerOverlay},
|
||||
|
||||
data() {
|
||||
return {
|
||||
apps: [],
|
||||
|
||||
userSelectOptions: {value: [], config: {}},
|
||||
}
|
||||
},
|
||||
|
||||
@ -244,6 +253,22 @@ export default {
|
||||
}
|
||||
return 1000;
|
||||
},
|
||||
selectUsers: async (params) => {
|
||||
if (!$A.isJson(params)) {
|
||||
params = {value: params}
|
||||
}
|
||||
if ($A.isArray(params.value)) {
|
||||
params.value = params.value ? [params.value] : []
|
||||
}
|
||||
this.userSelectOptions.value = params.value
|
||||
delete params.value
|
||||
this.userSelectOptions.config = params
|
||||
return await new Promise(resolve => {
|
||||
this.$refs.userSelect.onSelection((res) => {
|
||||
return resolve(res)
|
||||
})
|
||||
})
|
||||
},
|
||||
popoutWindow: async (config) => {
|
||||
let appConfig = {}
|
||||
if (config.url) {
|
||||
|
||||
@ -297,6 +297,7 @@ export default {
|
||||
|
||||
values: [],
|
||||
selects: [],
|
||||
callback: null,
|
||||
|
||||
recents: [],
|
||||
contacts: [],
|
||||
@ -683,12 +684,13 @@ export default {
|
||||
}, this.searchCache.length > 0 ? 300 : 0)
|
||||
},
|
||||
|
||||
onSelection() {
|
||||
onSelection(callback = null) {
|
||||
if (this.disabled) {
|
||||
return
|
||||
}
|
||||
this.$nextTick(_ => {
|
||||
this.selects = $A.cloneJSON(this.values)
|
||||
this.callback = typeof callback === 'function' ? callback : null
|
||||
this.showModal = true
|
||||
})
|
||||
},
|
||||
@ -794,11 +796,12 @@ export default {
|
||||
this.$emit('input', this.values)
|
||||
this.$emit('on-submit', this.values)
|
||||
|
||||
if (!this.beforeSubmit) {
|
||||
const beforeSubmit = this.callback || this.beforeSubmit;
|
||||
if (!beforeSubmit) {
|
||||
this.hide()
|
||||
return
|
||||
}
|
||||
const before = this.beforeSubmit();
|
||||
const before = beforeSubmit(this.values);
|
||||
if (before && before.then) {
|
||||
this.submittIng++
|
||||
before.then(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user