diff --git a/resources/assets/js/components/SearchBox.vue b/resources/assets/js/components/SearchBox.vue
index 1457ed26e..b07a11c65 100755
--- a/resources/assets/js/components/SearchBox.vue
+++ b/resources/assets/js/components/SearchBox.vue
@@ -217,7 +217,6 @@ export default {
case 'message':
this.$store.dispatch("openDialog", item.id).then(() => {
- this.onHide()
this.$store.state.dialogSearchMsgId = /^\d+$/.test(item.rawData.search_msg_id) ? item.rawData.search_msg_id : 0
}).catch(({msg}) => {
$A.modalError(msg || this.$L('打开会话失败'))
@@ -225,9 +224,7 @@ export default {
break;
case 'contact':
- this.$store.dispatch("openDialogUserid", item.id).then(_ => {
- this.onHide()
- }).catch(({msg}) => {
+ this.$store.dispatch("openDialogUserid", item.id).catch(({msg}) => {
$A.modalError(msg || this.$L('打开会话失败'))
});
break;
diff --git a/resources/assets/js/pages/manage.vue b/resources/assets/js/pages/manage.vue
index 9501a2674..c2edce2c5 100644
--- a/resources/assets/js/pages/manage.vue
+++ b/resources/assets/js/pages/manage.vue
@@ -285,7 +285,7 @@
-
+
diff --git a/resources/assets/js/pages/manage/application.vue b/resources/assets/js/pages/manage/application.vue
index 5dc7e1fbc..4d9619143 100644
--- a/resources/assets/js/pages/manage/application.vue
+++ b/resources/assets/js/pages/manage/application.vue
@@ -542,9 +542,7 @@ export default {
},
// 与我的机器人聊天
chatMybot(userid) {
- this.$store.dispatch("openDialogUserid", userid).then(route => {
- route && (this.mybotShow = false)
- }).catch(({msg}) => {
+ this.$store.dispatch("openDialogUserid", userid).catch(({msg}) => {
$A.modalError(msg || this.$L('打开会话失败'))
});
},
@@ -629,15 +627,14 @@ export default {
// 开始聊天
onGoToChat(type) {
let dialogId = 0;
- this.cacheDialogs.map(h => {
+ this.cacheDialogs.some(h => {
if (h.email == `ai-${type}@bot.system`) {
dialogId = h.id;
+ return true;
}
})
if (dialogId) {
- this.$store.dispatch("openDialog", dialogId).then(route => {
- route && (this.aibotShow = false)
- })
+ this.$store.dispatch("openDialog", dialogId)
return
}
//
@@ -646,9 +643,7 @@ export default {
url: 'users/search/ai',
data: {type},
}).then(({data}) => {
- this.$store.dispatch("openDialogUserid", data.userid).then(route => {
- route && (this.aibotShow = false)
- }).catch(({ msg }) => {
+ this.$store.dispatch("openDialogUserid", data.userid).catch(({ msg }) => {
$A.modalError(msg)
}).finally(_ => {
this.aibotDialogSearchLoad = '';
@@ -739,15 +734,18 @@ export default {
},
// 前往接龙与投票
goWordChainAndVote() {
- const dialog_id = Number(this.sendData[0].replace('d:', ''))
- this.$store.dispatch("openDialog", dialog_id).then(async () => {
- try {
- await $A.waitForCondition(() => this.routeLoading === 0);
+ return new Promise((resolve, reject) => {
+ if (this.sendData.length === 0) {
+ $A.messageError("请选择对话或成员");
+ reject()
+ return
+ }
+ const dialog_id = Number(this.sendData[0].replace('d:', ''))
+ this.$store.dispatch("openDialog", dialog_id).then(async () => {
const type = this.sendType == 'word-chain' ? 'dialogDroupWordChain' : 'dialogGroupVote'
this.$store.state[type] = {type: 'create', dialog_id: dialog_id}
- } catch (error) {
- // Handle the error
- }
+ })
+ resolve()
})
}
}
diff --git a/resources/assets/js/pages/manage/approve/details.vue b/resources/assets/js/pages/manage/approve/details.vue
index b26f59570..f4930c8e7 100644
--- a/resources/assets/js/pages/manage/approve/details.vue
+++ b/resources/assets/js/pages/manage/approve/details.vue
@@ -17,7 +17,7 @@
{{$L('已拒绝')}}
{{$L('已撤回')}}
-
+
{{datas.start_user_name}}
@@ -516,19 +516,7 @@ export default {
if (!/^\d+$/.test(userid)) {
return
}
- this.$store.dispatch("openDialogUserid", userid).then(route => {
- if (!route) {
- return;
- }
- switch (this.$parent.$options.name) {
- case "DrawerOverlayView":
- this.$parent.onClose()
- break;
- case "Modal":
- this.$parent.close()
- break;
- }
- }).catch(({msg}) => {
+ this.$store.dispatch("openDialogUserid", userid).catch(({msg}) => {
$A.modalError(msg)
});
}
diff --git a/resources/assets/js/pages/manage/components/DialogModal.vue b/resources/assets/js/pages/manage/components/DialogModal.vue
index 98dd3c813..f32a25213 100644
--- a/resources/assets/js/pages/manage/components/DialogModal.vue
+++ b/resources/assets/js/pages/manage/components/DialogModal.vue
@@ -75,7 +75,7 @@ export default {
watch: {
dialogId(id) {
- this.show = id > 0 && this.routeName !== 'manage-messenger'
+ this.show = id > 0 && (this.windowPortrait || this.routeName !== 'manage-messenger')
},
show(v) {
@@ -91,9 +91,8 @@ export default {
return new Promise(async _ => {
this.closIng++
await this.$store.dispatch("openDialog", 0)
- setTimeout(() => {
- this.closIng--
- }, 300)
+ await new Promise(resolve => setTimeout(resolve, 300))
+ this.closIng--
})
},
}
diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue
index 6c14e8152..dca10956f 100644
--- a/resources/assets/js/pages/manage/components/DialogWrapper.vue
+++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue
@@ -2568,6 +2568,7 @@ export default {
return;
}
if (this.windowPortrait) {
+ // 如果是竖屏则关闭对话窗口
this.$store.dispatch("openDialog", 0);
}
this.goForward({name: 'manage-project', params: {projectId:this.dialogData.group_info.id}});
@@ -2647,7 +2648,7 @@ export default {
onDialogMenu(cmd) {
switch (cmd) {
case "single":
- this.$store.dispatch('openDialog', {dialog_id: this.dialogData.id, single: true});
+ this.$store.dispatch('openDialog', {dialog_id: this.dialogData.id});
break;
case "searchMsg":
diff --git a/resources/assets/js/pages/manage/components/ProjectDialog.vue b/resources/assets/js/pages/manage/components/ProjectDialog.vue
deleted file mode 100644
index c5ed31c45..000000000
--- a/resources/assets/js/pages/manage/components/ProjectDialog.vue
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
-
{{$L('项目成员')}}({{projectData.project_user.length}})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/resources/assets/js/pages/manage/components/ProjectPanel.vue b/resources/assets/js/pages/manage/components/ProjectPanel.vue
index 73a343a6b..b2b18d610 100644
--- a/resources/assets/js/pages/manage/components/ProjectPanel.vue
+++ b/resources/assets/js/pages/manage/components/ProjectPanel.vue
@@ -1705,11 +1705,10 @@ export default {
toggleParameter(data) {
if (data === 'chat') {
- if (this.windowPortrait) {
- this.$store.dispatch('openDialog', this.projectData.dialog_id)
- return;
- }
- } else if (data === 'completedTask') {
+ this.$store.dispatch('openDialog', this.projectData.dialog_id)
+ return;
+ }
+ if (data === 'completedTask') {
this.$store.dispatch("forgetTaskCompleteTemp", true);
}
this.$store.dispatch('toggleProjectParameter', data);
diff --git a/resources/assets/js/pages/manage/components/TeamManagement.vue b/resources/assets/js/pages/manage/components/TeamManagement.vue
index ed81a3c53..5855bf8b2 100644
--- a/resources/assets/js/pages/manage/components/TeamManagement.vue
+++ b/resources/assets/js/pages/manage/components/TeamManagement.vue
@@ -1311,9 +1311,7 @@ export default {
if ($A.leftExists(val, 'dialog_')) {
const dialogId = parseInt(val.substr(7))
- this.$store.dispatch("openDialog", dialogId).then(() => {
- this.$emit('on-close')
- }).catch(({msg}) => {
+ this.$store.dispatch("openDialog", dialogId).catch(({msg}) => {
$A.modalError(msg || this.$L('打开会话失败'))
})
return;
diff --git a/resources/assets/js/pages/manage/messenger.vue b/resources/assets/js/pages/manage/messenger.vue
index 19844109d..04eba4c13 100644
--- a/resources/assets/js/pages/manage/messenger.vue
+++ b/resources/assets/js/pages/manage/messenger.vue
@@ -550,13 +550,6 @@ export default {
if (['dialog', 'contacts'].includes(params.dialogAction)) {
this.tabActive = params.dialogAction
}
- if (params.dialog_id) {
- this.tabActive = 'dialog'
- const id = $A.runNum(params.dialog_id);
- if (id > 0) {
- this.openDialog(id)
- }
- }
},
immediate: true
},
@@ -769,9 +762,9 @@ export default {
this.$store.dispatch("openDialogUserid", $A.leftDelete(dialogId.dialog_id, "u:")).catch(({msg}) => {
$A.modalError(msg)
})
- } else {
- this.$store.dispatch("openDialog", dialogId)
+ return;
}
+ this.$store.dispatch("openDialog", dialogId)
},
openContacts(user) {
@@ -779,11 +772,7 @@ export default {
return
}
this.$set(user, 'loading', true);
- this.$store.dispatch("openDialogUserid", user.userid).then(_ => {
- if (this.windowLandscape) {
- this.tabActive = 'dialog';
- }
- }).catch(({msg}) => {
+ this.$store.dispatch("openDialogUserid", user.userid).catch(({msg}) => {
$A.modalError(msg)
}).finally(_ => {
this.$set(user, 'loading', false);
@@ -1130,7 +1119,7 @@ export default {
break;
case 'single':
- this.$store.dispatch('openDialog', {dialog_id: this.operateItem.id, single: true});
+ this.$store.dispatch('openDialog', this.operateItem.id);
break;
case 'hide':
diff --git a/resources/assets/js/pages/manage/project.vue b/resources/assets/js/pages/manage/project.vue
index b0d3c14fd..61daa34c8 100644
--- a/resources/assets/js/pages/manage/project.vue
+++ b/resources/assets/js/pages/manage/project.vue
@@ -1,9 +1,6 @@
@@ -11,10 +8,9 @@