|
|
@@ -8,7 +8,7 @@
|
|
|
:data="farmInfoData"
|
|
|
>
|
|
|
<template #right>
|
|
|
- <div>在线沟通</div>
|
|
|
+ <div @click="handleChatFarm">在线沟通</div>
|
|
|
</template>
|
|
|
</farm-info-card>
|
|
|
<div class="farm-service-box">
|
|
|
@@ -25,6 +25,7 @@
|
|
|
title-right-text="分享成果"
|
|
|
class="recipe-item"
|
|
|
showFarmImage
|
|
|
+ @titleRightClick="handleTitleRightClick"
|
|
|
/>
|
|
|
</div>
|
|
|
<empty
|
|
|
@@ -46,6 +47,7 @@ import StatsBox from "@/components/pageComponents/StatsBox.vue";
|
|
|
import { ref, onMounted, computed } from "vue";
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
import recordItem from "@/components/recordItem.vue";
|
|
|
+import { ElMessage } from "element-plus";
|
|
|
import { Empty } from "vant";
|
|
|
const route = useRoute();
|
|
|
const router = useRouter();
|
|
|
@@ -103,6 +105,18 @@ const getDetailList = () => {
|
|
|
const handleClick = (section) => {
|
|
|
router.push(`/review_work?json=${JSON.stringify({id:section.id})}`);
|
|
|
};
|
|
|
+
|
|
|
+const handleChatFarm = () => {
|
|
|
+ if(farmDetail.value.receiveUserId != 'null'){
|
|
|
+ router.push(`/chat_frame?userId=${farmDetail.value.receiveUserId}&name=${farmDetail.value.name}&farmId=${farmIdVal.value}`);
|
|
|
+ }else{
|
|
|
+ ElMessage.warning('尚未绑定用户,暂时无法沟通');
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const handleTitleRightClick = () => {
|
|
|
+ // router.push(`/review_work?json=${JSON.stringify({id:section.id})}`);
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|