diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue
index db5ac43fe..00e714f79 100644
--- a/resources/assets/js/pages/manage/components/DialogWrapper.vue
+++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue
@@ -402,29 +402,24 @@
:mask-closable="false">
@@ -642,6 +637,7 @@ export default {
todoSettingData: {
type: 'all',
userids: [],
+ quick_value: [],
},
todoViewLoad: false,
@@ -2807,18 +2803,33 @@ export default {
});
},
+ onTypeChange(val) {
+ if (val === 'user') {
+ if (this.todoSettingData.userids.length === 0 && this.todoSettingData.quick_value.length > 0) {
+ this.todoSettingData.userids = this.todoSettingData.quick_value
+ }
+ this.$nextTick(_ => {
+ this.$refs.userSelect.onSelection()
+ })
+ }
+ if (val !== 'quick_select') {
+ this.todoSettingData.quick_value = []
+ }
+ },
+
+ onQuickChange(val) {
+ this.todoSettingData.type = val.length === 0 ? 'all' : 'quick_select';
+ },
+
onTodo(type) {
if (this.operateVisible) {
return
}
if (type === 'submit') {
const todoData = $A.cloneJSON(this.todoSettingData)
- if (todoData.type === 'my') {
+ if (todoData.type === 'quick_select') {
todoData.type = 'user'
- todoData.userids = [todoData.my_id]
- } else if (todoData.type === 'you') {
- todoData.type = 'user'
- todoData.userids = [todoData.you_id]
+ todoData.userids = todoData.quick_value
} else if (todoData.type === 'user' && $A.arrayLength(todoData.userids) === 0) {
$A.messageWarning("选择指定成员");
return
@@ -2833,13 +2844,30 @@ export default {
this.todoSettingLoad--
})
} else {
- const youId = this.dialogData.dialog_user?.userid
+ const quickList = {}
+ quickList[this.userId] = this.userId
+ const userid = this.dialogData.dialog_user?.userid
+ if (userid && userid != this.userId && !this.dialogData.bot) {
+ quickList[userid] = userid
+ }
+ if (this.operateItem.type === 'text') {
+ const atReg = /([^<]+)<\/span>/g
+ const atList = this.operateItem.msg.text.match(atReg)
+ if (atList) {
+ atList.forEach(item => {
+ const userid = parseInt(item.replace(atReg, '$1'))
+ if (userid && userid != this.userId) {
+ quickList[userid] = userid
+ }
+ })
+ }
+ }
this.todoSettingData = {
type: 'all',
userids: [],
msg_id: this.operateItem.id,
- my_id: this.userId,
- you_id: youId != this.userId && !this.dialogData.bot ? youId : 0,
+ quick_value: [],
+ quick_list: Object.values(quickList),
}
if (this.operateItem.todo) {
$A.modalConfirm({