|
|
@@ -36,10 +36,10 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 对话样式消息 -->
|
|
|
- <div v-if="msg.messageType === 'report'" class="dialog-message">
|
|
|
- <template v-if="msg.content.type === 'farm_report'">
|
|
|
- <div class="report-title">{{ msg.content.title }}</div>
|
|
|
- <div class="dialog-title">{{ msg.content.content }}</div>
|
|
|
+ <div v-if="msg.messageType === 'report'" class="dialog-message" @click="handleReportClick(msg)">
|
|
|
+ <template v-if="(msg.reportType || msg.content.type) === 'farm_report'">
|
|
|
+ <div class="report-title">{{ msg.title ||msg.content.title }}</div>
|
|
|
+ <div class="dialog-title">这是我的果园情况,请查看~</div>
|
|
|
<img src="https://birdseye-img.sysuimars.com/birdseye-look-mini/share-report-bg.png" alt="" class="monitor-image" />
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
@@ -507,12 +507,14 @@ const sendMessage = (message) => {
|
|
|
} else if (message.messageType === "report") {
|
|
|
// 对话样式消息不发送到服务器,只显示在本地
|
|
|
console.log("发送对话样式消息:", message);
|
|
|
- // sendMsg('report','',{
|
|
|
- // title: message.title,
|
|
|
- // coverUrl: message.coverUrl,
|
|
|
- // cardType: message.cardType,
|
|
|
- // linkUrl: message.linkUrl
|
|
|
- // });
|
|
|
+ if(message.reportType === 'farm_report'){
|
|
|
+ sendMsg('report','',{
|
|
|
+ title: message.title,
|
|
|
+ reportType: message.reportType,
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ console.log('其他文件');
|
|
|
+ }
|
|
|
}else{
|
|
|
sendMsg('card','',{
|
|
|
title: message.title,
|
|
|
@@ -777,8 +779,15 @@ const sendDialogMessage = (dialogData) => {
|
|
|
|
|
|
// 点击农场报告对话框
|
|
|
const handleReportClick = (msg) => {
|
|
|
- console.log(msg);
|
|
|
- // router.push(`/farm_report?farmId=${msg.reportId}&showFilter=true`);
|
|
|
+ if(msg.reportType === 'farm_report'){
|
|
|
+ const params = {
|
|
|
+ farmId: msg.reportId,
|
|
|
+ showFilter: true,
|
|
|
+ }
|
|
|
+ router.push(`/farm_report?miniJson=${JSON.stringify(params)}`);
|
|
|
+ }else{
|
|
|
+ console.log('其他文件');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 发送农场报告对话框
|
|
|
@@ -790,8 +799,6 @@ const sendFarmReportDialog = () => {
|
|
|
messageType: "report",
|
|
|
senderIcon: senderIcon.value,
|
|
|
title: currentFarmName,
|
|
|
- coverUrl:'',
|
|
|
- fileUrl:'',
|
|
|
reportId:farmVal.value,
|
|
|
reportType:'farm_report',
|
|
|
time: getCurrentTime(),
|