Bladeren bron

faet:系统消息未读和已读接口对接,和样式优化修改

wangsisi 6 dagen geleden
bovenliggende
commit
2aafcd02e5

+ 2 - 0
src/views/old_mini/home/components/AgriculturalDynamics.vue

@@ -145,6 +145,8 @@ const getUnansweredFarms = async () => {
             await getFutureFarmWorkWarning(unansweredList.value[i]);
         }
     }
+
+    unansweredList.value = unansweredList.value.filter(item => item.timelineList.length > 0);
 };
 
 //查询未来农事预警

+ 3 - 1
src/views/old_mini/home/index.vue

@@ -79,7 +79,9 @@ const handleBtn = () => {
 //判断是否存在可用方案
 async function checkExistsEnabledScheme() {
     const { data } = await VE_API.home.existsEnabledScheme({containerId:null});
-    console.log(data);
+    if(!data) {
+        showTipPopup.value = true;
+    }
 }
 
 const gardenId = ref(null);

+ 1 - 1
src/views/old_mini/home/subPages/warningDetail.vue

@@ -105,7 +105,7 @@ const shareOptions = ref([{ name: "微信", icon: "wechat", type: "wechat" }]);
 const handleShareSelect = () => {
     const query = {
         askInfo: { title: "提醒客户", content: "是否分享该提醒给好友" },
-        shareText: pageParams.value.questTitle,
+        shareText: warningDetail.value.title,
         targetUrl: `warning_detail`,
         paramsPage: JSON.stringify(route.query),
         imageUrl: warningDetail.value.media[0],

+ 12 - 2
src/views/old_mini/mine/pages/message.vue

@@ -10,7 +10,7 @@
         >
             <div class="message-list">
                 <div class="message-item" v-for="(item, index) in messageList" :key="index" @click="handleItem(item)">
-                    <!-- <el-badge :value="12" class="item"> </el-badge> -->
+                    <el-badge class="badge" is-dot v-if="!item.status"> </el-badge>
                     <div class="message-content">
                         <div class="title">{{ item.title }}</div>
                         <div class="desc">{{ item.desc }}</div>
@@ -38,7 +38,11 @@ import customHeader from "@/components/customHeader.vue";
 const router = useRouter();
 
 const handleItem = (item) => {
-    router.push("/completed_work?miniJson=" + JSON.stringify({ id: item.farmData.farmWorkRecordId }));
+    VE_API.mine.confirmCard({ id: item.id }).then((res) => {
+        if (res.code === 0) {
+            router.push("/completed_work?miniJson=" + JSON.stringify({ id: item.farmData.farmWorkRecordId }));
+        }
+    });
 };
 
 // 分页相关状态
@@ -143,6 +147,12 @@ const formatDate = (dateStr) => {
             background-color: #fff;
             border-radius: 14px;
             padding: 16px;
+            position: relative;
+            .badge{
+                position: absolute;
+                top: 0;
+                right: 0;
+            }
             .message-content {
                 .title {
                     font-size: 16px;

+ 9 - 3
src/views/old_mini/task_condition/components/interact.vue

@@ -48,8 +48,8 @@
                                     <img src="@/assets/img/home/farm.png" alt="" />
                                 </div>
                                 <div class="right-text">
-                                    <div class="farm-info">
-                                        {{ item?.farmName }}
+                                    <div  class="farm-info">
+                                        <div class="farm-name van-ellipsis">{{ item?.farmName }}</div>
                                         <div class="info-tag-wrap">
                                             <div class="tag-item primary">
                                                 {{ item?.typeName }}
@@ -268,7 +268,8 @@ async function getSimpleList(isLoadMore = false) {
             }
 
             // 追加数据
-            taskList.value = [...taskList.value, ...newItems];
+            const newTaskList = [...taskList.value, ...newItems];
+            taskList.value = newTaskList.filter(item => item.timelineList.length > 0);
             
             // 更新分页
             page.value += 1;
@@ -486,6 +487,7 @@ function handleRemindCustomer(item) {
         .left-wrap {
             display: flex;
             align-items: center;
+            width: calc(100% - 45px);
             .left-img {
                 width: 40px;
                 height: 40px;
@@ -498,11 +500,15 @@ function handleRemindCustomer(item) {
             }
             .right-text {
                 padding-left: 8px;
+                width: calc(100% - 50px);
                 .farm-info {
                     font-size: 14px;
                     color: #1d2129;
                     display: flex;
                     align-items: center;
+                    .farm-name{
+                        width: calc(100% - 133px);
+                    }
                     .info-tag-wrap {
                         margin-left: 10px;
                         display: flex;

+ 2 - 1
src/views/old_mini/task_condition/components/remindCustomer.vue

@@ -34,7 +34,7 @@ const shareOptions = ref([{ name: "微信", icon: "wechat", type: "wechat" }]);
 const handleShareSelect = () => {
     const query = {
         askInfo: { title: "提醒客户", content: "是否分享该提醒给好友" },
-        shareText: shareParams.value.questTitle,
+        shareText: shareParams.value.title,
         targetUrl: `warning_detail`,
         paramsPage: JSON.stringify(shareParams.value),
         imageUrl: shareParams.value.imageUrl,
@@ -48,6 +48,7 @@ const shareParams = ref({});
 const handleShare = (data) => {
     shareParams.value = {
         id: data.postInfo.postId,
+        title: data.postInfo.title,
         questTitle: data.interactionQuestion,
         arrangeId: data.arrangeId,
         farmId: route.query.farmId,