Преглед изворни кода

feature(*): 1、400 咨询页面返回优化,缓存记录主页面查询参数,从详情页返回时默认使用查询参数;已实现
2、项目跟进记录显示优化,显示更多字段

likai пре 1 година
родитељ
комит
a75c3e1078

+ 6 - 1
src/views/consult/detail.vue

@@ -178,7 +178,12 @@
       },
       // 返回
       back() {
-        this.$router.go(-1)
+        this.$router.push({
+          name: 'consult',
+          params: {
+            isGetParams: '1',
+          },
+        })
       },
     },
   }

+ 32 - 0
src/views/consult/index.vue

@@ -217,9 +217,11 @@
       },
     },
     activated() {
+      this.getParams()
       this.queryData()
     },
     mounted() {
+      this.getParams()
       this.queryData()
       this.getOptions()
     },
@@ -277,6 +279,7 @@
         })
       },
       handleDetail(row) {
+        this.storeParams()
         this.$router.push({
           path: '/consult/detail',
           query: {
@@ -312,6 +315,35 @@
           })
         }
       },
+      // 存储参数
+      storeParams() {
+        let data = {
+          pageNum: this.queryForm.pageNum,
+          pageSize: this.queryForm.pageSize,
+          name: this.queryForm.name,
+          inchargeName: this.queryForm.inchargeName,
+          unit: this.queryForm.unit,
+          state: this.queryForm.state,
+        }
+        localStorage.setItem('consultSearchParams', JSON.stringify(data))
+      },
+      // 获取参数
+      getParams() {
+        if (this.$route.params.isGetParams == '1') {
+          let params = localStorage.getItem('consultSearchParams')
+          if (params) {
+            let data = JSON.parse(params)
+            this.queryForm.pageNum = data.pageNum
+            this.queryForm.pageSize = data.pageSize
+            this.queryForm.name = data.name
+            this.queryForm.inchargeName = data.inchargeName
+            this.queryForm.unit = data.unit
+            this.queryForm.state = data.state
+          }
+          localStorage.removeItem('consultSearchParams')
+          this.$route.params.isGetParams = undefined
+        }
+      },
     },
   }
 </script>

+ 7 - 3
src/views/proj/business/components/DetailsFollow.vue

@@ -21,12 +21,16 @@
                     {{ item.followDate }}
                   </span>
                 </p>
-                <p style="white-space: pre-wrap">{{ item.followContent }}</p>
+                <p style="white-space: pre-wrap">本次跟进内容:{{ item.followContent }}</p>
+                <p style="white-space: pre-wrap">达成效果:{{ item.effect }}</p>
+                <p style="white-space: pre-wrap">问题或困难:{{ item.issue }}</p>
+                <p style="white-space: pre-wrap">计划和目标:{{ item.furtherPlan }}</p>
                 <div class="footer">
-                  <p>
+                  <!-- <p>
                     来自客户:
                     <span>{{ item.custName }}</span>
-                  </p>
+                  </p> -->
+                  <p></p>
                   <div>
                     <el-button icon="el-icon-edit" size="mini" @click="postComments(item)">发表评论</el-button>
                     <el-button size="mini" @click="showDetail(item)">