会话群创建添加实训操作
This commit is contained in:
parent
5ad0421991
commit
252d3d69e4
@ -516,7 +516,9 @@ export default {
|
|||||||
CMD_Conversation_Group_Text_Chat: {value: 'Conversation_Group_Text_Chat', label: '发送会话群文字消息'},
|
CMD_Conversation_Group_Text_Chat: {value: 'Conversation_Group_Text_Chat', label: '发送会话群文字消息'},
|
||||||
CMD_Conversation_Group_Audio_Base64: {value: 'Conversation_Group_Audio_Base64', label: '发送会话群语音消息'},
|
CMD_Conversation_Group_Audio_Base64: {value: 'Conversation_Group_Audio_Base64', label: '发送会话群语音消息'},
|
||||||
CMD_Conversation_Group_Private_Text_Chat: {value: 'Conversation_Group_Private_Text_Chat', label: '发送私聊文字消息'},
|
CMD_Conversation_Group_Private_Text_Chat: {value: 'Conversation_Group_Private_Text_Chat', label: '发送私聊文字消息'},
|
||||||
CMD_Conversation_Group_Private_Audio_Base64: {value: 'Conversation_Group_Private_Audio_Base64', label: '发送私聊语音消息'}
|
CMD_Conversation_Group_Private_Audio_Base64: {value: 'Conversation_Group_Private_Audio_Base64', label: '发送私聊语音消息'},
|
||||||
|
CMD_Conversation_Group_Create: {value: 'Conversation_Group_Create', label: '创建会话群'},
|
||||||
|
CMD_Conversation_Group_Invite_Member: {value: 'Conversation_Group_Invite_Member', label: '邀请人员入群'}
|
||||||
},
|
},
|
||||||
PSL: {
|
PSL: {
|
||||||
CMD_PSL_PRESS_BUTTON: {value: 'PSL_PRESS_BUTTON', label: 'PSL按钮操作'}
|
CMD_PSL_PRESS_BUTTON: {value: 'PSL_PRESS_BUTTON', label: 'PSL按钮操作'}
|
||||||
|
@ -5165,6 +5165,14 @@ export const OperationEvent = {
|
|||||||
record: {
|
record: {
|
||||||
operation: '1403',
|
operation: '1403',
|
||||||
domId: '_Tips-Conversation-Chat-record'
|
domId: '_Tips-Conversation-Chat-record'
|
||||||
|
},
|
||||||
|
createGroup: {
|
||||||
|
operation: '1404',
|
||||||
|
domId: '_Tips-Conversation-Chat-createGroup'
|
||||||
|
},
|
||||||
|
inviteToGroup: {
|
||||||
|
operation: '1405',
|
||||||
|
domId: '_Tips-Conversation-Chat-inviteToGroup'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="nullDiv" />
|
<div class="nullDiv" />
|
||||||
<div class="editFilter" :class="myMemberId ? 'pointer' : 'disable'">
|
<div class="editFilter" :class="myMemberId ? 'pointer' : 'disable'">
|
||||||
<i class="el-icon-plus" title="创建会话群" @click="createGroup" />
|
<i :id="createGroupDomId" class="el-icon-plus" title="创建会话群" @click="createGroup" />
|
||||||
<!-- <i class="el-icon-more" /> -->
|
<!-- <i class="el-icon-more" /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<address-book ref="addressBook" :member-tree-data="memberTreeData" @sendPrivateMsg="sendPrivateMsg" />
|
<address-book ref="addressBook" :member-tree-data="memberTreeData" @sendPrivateMsg="sendPrivateMsg" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<edit-group ref="editGroup" :member-tree-data="memberTreeData" />
|
<edit-group ref="editGroup" :member-tree-data="memberTreeData" @handleEditGroup="handleEditGroup" />
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<dialog-member ref="dialogMember" :member-tree-data="memberTreeData" @updateLeaderId="updateLeaderId" />
|
<dialog-member ref="dialogMember" :member-tree-data="memberTreeData" @updateLeaderId="updateLeaderId" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -79,6 +79,7 @@ import AddressBook from './addressBook';
|
|||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import DialogMember from './dialogMember';
|
import DialogMember from './dialogMember';
|
||||||
import { objectIsEqual } from '@/utils/date';
|
import { objectIsEqual } from '@/utils/date';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
export default {
|
export default {
|
||||||
name: 'ChatDialog',
|
name: 'ChatDialog',
|
||||||
components: {
|
components: {
|
||||||
@ -95,6 +96,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
logoImgUrl: '',
|
logoImgUrl: '',
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
showEditGroup: false,
|
||||||
tabs: [
|
tabs: [
|
||||||
{label:'消息', icon:'el-icon-chat-dot-square'},
|
{label:'消息', icon:'el-icon-chat-dot-square'},
|
||||||
{label:'通讯录', icon:'el-icon-notebook-1'}
|
{label:'通讯录', icon:'el-icon-notebook-1'}
|
||||||
@ -119,6 +121,9 @@ export default {
|
|||||||
groupId() {
|
groupId() {
|
||||||
return this.$route.query.group;
|
return this.$route.query.group;
|
||||||
},
|
},
|
||||||
|
createGroupDomId() {
|
||||||
|
return this.showEditGroup ? '' : OperationEvent.Conversation.Chat.createGroup.domId;
|
||||||
|
},
|
||||||
myMemberId() {
|
myMemberId() {
|
||||||
return this.$store.state.training.myMemberId;
|
return this.$store.state.training.myMemberId;
|
||||||
},
|
},
|
||||||
@ -275,6 +280,9 @@ export default {
|
|||||||
this.handleClose();
|
this.handleClose();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleEditGroup(val) {
|
||||||
|
this.showEditGroup = val;
|
||||||
|
},
|
||||||
showMenu(event, item) {
|
showMenu(event, item) {
|
||||||
this.groupClick(item);
|
this.groupClick(item);
|
||||||
this.initMenu(item);
|
this.initMenu(item);
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item v-if="showSubmitBtn">
|
<el-form-item v-if="showSubmitBtn">
|
||||||
<el-button @click="handleClose">取消</el-button>
|
<el-button @click="handleClose">取消</el-button>
|
||||||
<el-button type="primary" @click="onSubmit">确定</el-button>
|
<el-button :id="submitDomId" type="primary" @click="onSubmit">确定</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -69,8 +69,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { createGroup, inviteMemberToGroup } from '@/api/newChat';
|
import { inviteMemberToGroup } from '@/api/newChat';
|
||||||
import { getUploadUrl } from '@/api/projectConfig';
|
import { getUploadUrl } from '@/api/projectConfig';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import {UserOperationType} from '@/scripts/ConstDic';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
export default {
|
export default {
|
||||||
name: 'EditGroup',
|
name: 'EditGroup',
|
||||||
components: {
|
components: {
|
||||||
@ -118,6 +121,15 @@ export default {
|
|||||||
groupId() {
|
groupId() {
|
||||||
return this.$route.query.group;
|
return this.$route.query.group;
|
||||||
},
|
},
|
||||||
|
submitDomId() {
|
||||||
|
let domId = '';
|
||||||
|
if (this.title == '邀请成员') {
|
||||||
|
domId = OperationEvent.Conversation.Chat.inviteToGroup.domId;
|
||||||
|
} else if (this.title == '创建会话群') {
|
||||||
|
domId = OperationEvent.Conversation.Chat.createGroup.domId;
|
||||||
|
}
|
||||||
|
return this.dialogVisible ? domId : '';
|
||||||
|
},
|
||||||
memberData() {
|
memberData() {
|
||||||
return this.$store.state.training.memberData;
|
return this.$store.state.training.memberData;
|
||||||
},
|
},
|
||||||
@ -155,6 +167,12 @@ export default {
|
|||||||
this.treeDisabled = true;
|
this.treeDisabled = true;
|
||||||
this.nameDisabled = true;
|
this.nameDisabled = true;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
dialogVisible() {
|
||||||
|
this.$emit('handleEditGroup', this.dialogVisible);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -231,21 +249,27 @@ export default {
|
|||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$message.error(`邀请成员失败!${err.message}`);
|
this.$message.error(`邀请成员失败!${err.message}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
} else if (this.title == '创建会话群') {
|
} else if (this.title == '创建会话群') {
|
||||||
const list = [];
|
const list = [];
|
||||||
this.selectTreeNode.forEach(item => {
|
this.selectTreeNode.forEach(item => {
|
||||||
list.push(item.id);
|
list.push(item.id);
|
||||||
});
|
});
|
||||||
const params = {
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
cmdType: CMD.Conversation.CMD_Conversation_Group_Create,
|
||||||
|
operation: OperationEvent.Conversation.Chat.createGroup.operation,
|
||||||
|
userOperationType: UserOperationType.LEFTCLICK,
|
||||||
|
param: {
|
||||||
name: this.form.name,
|
name: this.form.name,
|
||||||
imageUrl: this.form.imageUrl,
|
|
||||||
memberIds: list
|
memberIds: list
|
||||||
|
}
|
||||||
};
|
};
|
||||||
createGroup(this.groupId, params).then(res => {
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
this.initData();
|
this.initData();
|
||||||
this.handleClose();
|
this.handleClose();
|
||||||
this.$message.success('创建会话群成功!');
|
this.$message.success('创建会话群成功!');
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$message.error(`创建会话群失败!${err.message}`);
|
this.$message.error(`创建会话群失败!${err.message}`);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user