msg.vue 2.52 KB
<template>
	<el-dialog title="查看详情" :width="jsonData.context.remark.value?'60%':'30%'" class="manage-dialog edit-user-dialog" :visible.sync="detailDialogVisible"
		:close-on-click-modal="false" @close="detailDialogClose()">
        <div class="mlist">
            <div class="mitem">
                <label>接收人:</label>
                <p>{{jsonData.realName}}</p>
            </div>
            <div class="mitem">
                <label>消息类型:</label>
                <p>{{jsonData.messageText}}</p>
            </div>
            <div class="mitem">
                <label>消息内容:</label>
                <p style="font-weight: 600;">{{jsonData.context.first.value}}</p>
                <p v-html="jsonData.content"></p>
            </div>
            <div class="mitem">
                <label>Remark:</label>
                <p v-html="jsonData.remark"></p>
            </div>
            <div class="mitem">
                <label>发送日期:</label>
                <p>{{jsonData.sendTime}}</p>
            </div>
            <div class="mitem">
                <label>发送状态:</label>
                <p>{{jsonData.sendStatus > 0 ? '已发送' : '发送失败'}}</p>
            </div>
            <div class="mitem">
                <label>阅读状态:</label>
                <p>{{jsonData.readStatus > 0 ? '已读' : '未读'}}</p>
            </div>
            <div class="mitem">
                <label>回复内容:</label>
                <p>{{jsonData.dealContext}}</p>
            </div>
        </div>
		<div slot="footer" class="dialog-footer">
			<el-button @click="detailDialogVisible = false" class="dialog-btn">{{ $t('dialog.close') }}</el-button>
		</div>
	</el-dialog>
</template>
<script>
export default {
	data() {
		return {
			detailDialogVisible: false,
            jsonData:{
                context:{
                    first:{

                    },
                    remark:{
                        value:''
                    }
                }
            }
		};
	},
	methods: {
		dialogInit(data) {
			this.detailDialogVisible = true;
            if(data.context.remark.value){
                data.remark = data.context.remark.value.replaceAll('\n','<br>');
            }
            this.jsonData = data;
		},
		detailDialogClose(done) {
			
		},
	}
};
</script>

<style scoped>
.mlist{position: relative;padding-bottom: 20px;}
.mlist .mitem{position: relative;margin: 10px auto 0;padding-left: 70px;min-height: 16px;}
.mlist .mitem label{position: absolute;left: 0;top:0;}


</style>