“dzb”
2022-10-17 68270bc858a465bc482820586a7ccb534b6c3565
src/views/operate/message/myIndex/createUser/index.vue
@@ -102,6 +102,7 @@
                messageType: '',
                head: '',
                targetTo: '',
                targetFrom:null,
                body: '',
                channelCode: 1,
            },
@@ -135,6 +136,7 @@
    created() {
        this.setColumnList();
        this.setDepartList();
        this.getLoginUserInfo();
    },
    methods: {
        // 关闭弹窗
@@ -230,11 +232,12 @@
                        url: 'sccg/message/sendMessage',
                        data: {
                            body: role.body,
                            channelCode: role.channelCode,
                            channelCode: `${role.channelCode}`,
                            head: role.head,
                            messageType: role.messageType,
                            sendTime: new Date(),
                            targetTo: checkedList.join(',')
                            targetTo: checkedList.join(','),
                            targetFrom:`${role.targetFrom}`,
                        }
                    })
                    .then(res=>{
@@ -262,6 +265,17 @@
            // this.$refs.edit.wangEditor.txt.html('<p><br></p>') 
            this.setDepartList();
            this.$refs.user.resetFields();
        },
        // 获取当前登录用户信息
        getLoginUserInfo(){
            const name = sessionStorage.getItem('name');
            this.$axios({
                method:'get',
                url:'sccg/admin/info?name='+name,
            })
            .then(res=>{
                this.role.targetFrom = res.data.userId
            })
        }
    },
    props: ['closeMyDialog']