Jelajahi Sumber

首页增加提示类tab,B类指标页优化,我的-增加业务员日常工作统计

zhujindu 1 tahun lalu
induk
melakukan
00c07fb8d2

+ 18 - 0
src/api/index.js

@@ -870,3 +870,21 @@ export function selectBuildingStore(query) {
     params: query,
   });
 }
+
+// 提示类色卡未领取-根据门店ID查询门店列表接口
+export function getNotSignStoreList(data) {
+  return request({
+    url: '/mobile/reportMobile/getNotSignStoreList',
+    method: 'post',
+    data: data,
+  });
+}
+
+// 提示类用户拜访(实时)详情接口
+export function selectUserStoreNoVisits(data) {
+  return request({
+    url: '/mobile/storeStatistics/selectUserStoreNoVisits',
+    method: 'post',
+    data: data,
+  });
+}

+ 6 - 0
src/router/index.js

@@ -73,6 +73,12 @@ const router = new VueRouter({
           meta: { title: '提示类-拜访(实时) ' },
           component: () => import('@/views/home/hintTabPage/hintDetail.vue'),
         },
+        {
+          path: '/pantoneNoGet',
+          name: 'pantoneNoGet',
+          meta: { title: '提示类-业务员未领取色卡门店 ' },
+          component: () => import('@/views/home/hintTabPage/pantoneNoGet.vue'),
+        },
       ],
     },
     {

+ 39 - 12
src/utils/TXApiFun.js

@@ -83,8 +83,15 @@ export function getPosition(isPermit = false) {
  *当前页面授权 一个url只需要授权一次,wx.config 调用多次,只有第一次会调用成功,后面的都会走失败
  * @param {*object} jsApiList //授权接口列表
  * @param {*String} getLocation //获取定位
+ * @param {*String} configType //注入类型
+ * config,agentConfig
+ * config注入的是企业的身份与权限,
+ * 而agentConfig注入的是应用的身份与权限。
+ * 尤其是当调用者为第三方服务商时,通过config无法准确区分出调用者是哪个第三方应用,
+ * 而在部分场景下,又必须严谨区分出第三方应用的身份,此时即需要通过agentConfig来注入应用的身份信息。
+ *
  */
-export function getTicketFun(jsApiList = ['getLocation']) {
+export function getTicketFun(jsApiList = ['getLocation'], configType = 'config') {
   return new Promise((resolve, reject) => {
     // 当前页面
     let url = window.location.href;
@@ -94,17 +101,37 @@ export function getTicketFun(jsApiList = ['getLocation']) {
       toastLoading().clear();
       if (response.code == 200) {
         let qiyeData = response.data;
-        wx.config({
-          beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-          debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-          appId: qiyeData.appId, // 必填,企业微信的corpID
-          timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
-          nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
-          signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
-          jsApiList: ['ready', ...jsApiList], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
-        });
-        console.log('获取签名成功');
-        resolve('获取签名成功');
+        if (configType == 'config') {
+          wx.config({
+            beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
+            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+            appId: qiyeData.appId, // 必填,企业微信的corpID
+            timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
+            nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
+            signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
+            jsApiList: ['ready', ...jsApiList], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
+          });
+          console.log('获取签名成功');
+          resolve('获取签名成功');
+        } else if (configType == 'agentConfig') {
+          wx.agentConfig({
+            corpid: qiyeData.appId, // 必填,企业微信的corpid,必须与当前登录的企业一致
+            agentid: qiyeData.agentId, // 必填,企业微信的应用id (e.g. 1000247)
+            timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
+            nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
+            signature: qiyeData.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
+            jsApiList: [...jsApiList], //必填,传入需要使用的接口名称
+            success: function (res) {
+              console.log('获取签名成功');
+              resolve('获取签名成功');
+            },
+            fail: function (res) {
+              if (res.errMsg.indexOf('function not exist') > -1) {
+                alert('版本过低请升级');
+              }
+            },
+          });
+        }
       } else {
         console.log('获取签名失败');
         reject('获取签名失败');

+ 106 - 74
src/views/home/hintTabPage/hintDetail.vue

@@ -32,16 +32,16 @@
         border
         class="elTreeTable"
         lazy
-        row-key="onlyId"
+        row-key="id"
         :key="toggleIndex">
         <el-table-column
           class="firstName"
           :label="firstLabel"
-          prop="onlyName"
+          :prop="firstProp"
           align="center"
           width="120">
           <template slot-scope="scope">
-            <span>{{ scope.row.onlyName }}</span>
+            <span>{{ scope.row[firstProp] }}</span>
             <!-- <span v-if="scope.row.reportType != 1">{{ scope.row.deptName }}</span> -->
           </template>
         </el-table-column>
@@ -70,6 +70,7 @@
 import { selectNoVisitsInfo, getReportMaterialType, getReportMaterial } from '@/api/index';
 import { mapState } from 'vuex';
 export default {
+  name: 'hintDetail',
   computed: {
     ...mapState({
       userInfo: (state) => state.user.userInfo,
@@ -97,9 +98,10 @@ export default {
         },
       ],
       activePantoneTabName: '', //色卡tabName
-      tabsItemPantone: [], //色卡tabItem
+      tabsItemPantone: {}, //色卡tabItem
       toggleIndex: 0,
       firstLabel: '',
+      firstProp: '',
       tableColumn: [],
       tableList: [],
       // 未拜访
@@ -234,35 +236,52 @@ export default {
       ],
     };
   },
+  watch: {
+    fromType: {
+      handler(newVal) {
+        this.tableColumn = this[newVal]; //表格头
+        this.activeTabName = newVal; // 当前激活tab
+      },
+      immediate: true,
+    },
+  },
   activated() {
     this.empLevel = this.userInfo.empLevel;
-    this.firstLabel = this.empLevel == '1' ? '组织名称/大区主管' : '销售部主管';
+    this.firstLabel = this.empLevel == '1' ? '组织名称/大区主管' : '组织名称/销售部主管';
     this.fromType = this.$route.query.fromType; // fromType: 'noVisit':未拜访; 'createStore':建店; 'pantone':色卡
-    this.tableColumn = this[this.fromType]; //初始化表格头
-    this.activeTabName = this.fromType;
+    // this.tableColumn = this[this.fromType]; //初始化表格头
+    // this.activeTabName = this.fromType;
     this.deptId = this.userInfo.deptId; // 当前用户部门id
     this.activaPantoneName = this.$route.query.pantoneName; //当前色卡
     this.materialCode = this.$route.query.materialCode; // 色卡code
     this.initData();
   },
   methods: {
-    initData(resolve) {
+    initData(resolve, tree) {
       if (this.fromType == 'noVisit') {
+        if (tree) this.deptId = tree.onlyId;
+        this.firstProp = 'onlyName';
         this.selectNoVisitsInfoFun(resolve);
       } else if (this.fromType == 'createStore') {
       } else if (this.fromType == 'pantone') {
-        this.getPantoneData();
+        this.firstProp = 'warehouseName';
+        let empLevel = tree ? tree.empLevel : null;
+        this.getPantoneData(resolve, empLevel);
       }
     },
     tabChange(val) {
-      setTimeout(() => {
-        this.tableColumn = this[val];
-        this.toggleIndex = this.toggleIndex++;
-      }, 2000);
+      this.tableList = [];
+      // this.tableColumn = this[val];
+      this.fromType = val;
+      this.initData();
+      this.toggleIndex = this.toggleIndex++;
     },
     tabChangePantone(val) {
+      // this.fromType = val;
       this.materialCode = this.tabsItemPantone[val].materialCode;
-      this.getPantoneData();
+      this.tableList = [];
+      this.initData();
+      this.toggleIndex = this.toggleIndex++;
     },
     onClickLeft() {
       this.$router.go(-1);
@@ -270,43 +289,15 @@ export default {
     linKReportHistory(row, type) {},
     // 加载子节点数据的函数
     load(tree, treeNode, resolve) {
-      //   if (tree.reportType == 2) {
-      //     this.seacherFormload.parentId = tree.deptId;
-      //   } else if (tree.reportType == 3) {
-      //     // this.regionCode=tree.deptId
-      //     // this.regionName=tree.deptName+"销售大区"
-      //     this.seacherFormload.parentId = '';
-      //     this.seacherFormload.regionId = tree.deptId;
-      //   } else {
-      //     this.seacherFormload.parentId = '';
-      //   }
-      this.deptId = tree.onlyId;
-      this.initData(resolve);
-      //   request({
-      //     url: 'mobile/reportMobile/queryRates',
-      //     method: 'get',
-      //     params: this.seacherFormload,
-      //   }).then((res) => {
-      //     if (res.code == 200) {
-      //       for (var i = 0; i < res.data.length; i++) {
-      //         if (res.data[i].reportType > 1) {
-      //           res.data[i].hasChildren = true;
-      //         } else {
-      //           res.data[i].hasChildren = false;
-      //         }
-      //       }
-      //       resolve(res.data);
-      //     } else {
-      //       this.$toast.fail('数据获取失败');
-      //     }
-      //   });
+      this.initData(resolve, tree);
     },
     // 未拜访
     selectNoVisitsInfoFun(resolve) {
       selectNoVisitsInfo({ deptId: this.deptId }).then((res) => {
         res.data.forEach((val) => {
-          val.hasChildren = true;
+          if (val.onLevel < 3) val.hasChildren = true;
         });
+        // 是否是子级
         if (resolve) {
           resolve && resolve(res.data);
         } else {
@@ -315,43 +306,30 @@ export default {
       });
     },
     // 色卡tab
-    getPantoneData() {
-      if (this.tabsItemPantone.length) {
-        this.getReportMaterialTypeFun();
+    getPantoneData(resolve, empLevel) {
+      if (JSON.stringify(this.tabsItemPantone) != '{}') {
+        this.getReportMaterialTypeFun(resolve, empLevel);
       } else {
         getReportMaterial().then((res) => {
           this.tabsItemPantone = res.data;
           delete this.tabsItemPantone.tip;
-          this.getReportMaterialTypeFun();
+          this.getReportMaterialTypeFun(null, null);
         });
       }
     },
     // 色卡详情
-    getReportMaterialTypeFun() {
-      getReportMaterialType({ materialCode: this.materialCode }).then((res) => {
-        let resData = [
-          {
-            ...this.tabsItemPantone[this.activaPantoneName],
-            children: res.data.colorCardList || [],
-          },
-        ];
-        // [
-        //   {
-        //     id: 3,
-        //     date: '2016-05-01',
-        //     name: '王小虎',
-        //     address: '上海市普陀区金沙江路 1519 弄',
-        //     children: [
-        //       {
-        //         id: 32,
-        //         date: '2016-05-01',
-        //         name: '王小虎',
-        //         address: '上海市普陀区金沙江路 1519 弄',
-        //       },
-        //     ],
-        //   },
-        // ],
-        this.tableList = resData;
+    getReportMaterialTypeFun(resolve, empLevel) {
+      // empLevel 第一次传 null
+      getReportMaterialType({ materialCode: this.materialCode, empLevel: empLevel }).then((res) => {
+        res.data.colorCardList.forEach((val) => {
+          if (val.empLevel < 3) val.hasChildren = true;
+        });
+        // 是否是子级
+        if (resolve) {
+          resolve && resolve(res.data.colorCardList);
+        } else {
+          this.tableList = res.data.colorCardList;
+        }
       });
     },
   },
@@ -381,6 +359,60 @@ export default {
   .el-table__empty-block {
     width: 99.9% !important;
   }
+  .elTreeTable .el-table__cell:first-child .cell {
+    padding-left: 2px !important;
+  }
+
+  .elTreeTable .el-table__cell {
+    padding: 0px;
+  }
+
+  .elTreeTable .el-table__body td.el-table__cell {
+    padding: 2px;
+  }
+
+  .elTreeTable table col {
+    text-align: center;
+  }
+
+  .elTreeTable th.el-table__cell > .cell {
+    padding: 1px !important;
+  }
+
+  .elTreeTable {
+    font-size: 12px !important;
+  }
+
+  .elTreeTable th.el-table__cell {
+    padding: 1px !important;
+  }
+
+  .elTreeTable th.el-table__cell > .cell {
+    text-align: center;
+  }
+
+  .elTreeTable .el-table__header tr:first-child th.el-table__cell:first-child .cell {
+    /* width: 98px; */
+  }
+
+  .elTreeTable .linkSpan {
+    text-decoration: underline;
+    color: #0057ba;
+    display: block;
+    text-align: right;
+    padding: 6px 10px;
+  }
+
+  .elTreeTable td.el-table__cell div {
+    padding: 0px;
+  }
+
+  .elTreeTable .cell .spanNum {
+    display: block;
+    text-align: right;
+    padding: 6px 10px;
+  }
+
   .elTreeTable .el-table__expand-icon {
     float: right;
   }

+ 11 - 6
src/views/home/hintTabPage/index.vue

@@ -45,9 +45,12 @@
               </el-popover>
             </div>
           </template>
-          <!-- <visitPage
+          <visitPage
+            fromType="noVisit"
+            :empLevel="empLevel"
             :contentData="createStore.contentData"
-            :maskShow="createStore.collapseLosding"></visitPage> -->
+            :maskShow="createStore.collapseLosding"
+            :resData="createStore.resData"></visitPage>
         </van-collapse-item>
         <!-- 日报、周报、半月报 -->
         <van-collapse-item name="3" v-if="empLevel != '4'">
@@ -175,6 +178,7 @@ import hintIcon from '@/assets/hintIcon.png';
 import visitPage from './visitPage.vue';
 import { mapState } from 'vuex';
 export default {
+  name: 'hintTabPage',
   components: { visitPage },
   computed: {
     ...mapState({
@@ -262,6 +266,7 @@ export default {
             ],
           },
         ],
+        resData: null,
       },
       createStore: {
         name: '2',
@@ -407,9 +412,9 @@ export default {
     },
     getSelectBuildingStore() {
       selectBuildingStore().then((res) => {
-        // this.visitCollapse.resData = res.data;
-        // this.visitCollapse.tipsPopoverlabel = res.data.reminderContent;
-        // this.visitCollapse.collapseLosding = false;
+        this.visitCollapse.resData = res.data;
+        this.visitCollapse.tipsPopoverlabel = res.data.reminderContent;
+        this.visitCollapse.collapseLosding = false;
       });
     },
     getReportData() {
@@ -454,7 +459,7 @@ export default {
     pantoneClick(val, key) {
       // 业务员进入未拜访列表
       if (this.empLevel == '3') {
-        this.$router.push({ path: '/noVIsit' });
+        this.$router.push({ path: '/pantoneNoGet', query: { storeId: val.storeId } });
       } else if (this.empLevel == '2') {
         // 销售部主管
         this.$router.push({

+ 164 - 6
src/views/home/hintTabPage/noVIsit.vue

@@ -1,25 +1,121 @@
 <template>
-  <div class="hintDetail">
+  <div class="noVIsit">
     <div class="header">
       <van-nav-bar class="navBar" title="未拜访门店" left-arrow @click-left="onClickLeft" />
     </div>
     <div class="content">
       <van-collapse v-model="activeName" accordion>
-        <van-collapse-item title="标题1" name="1">内容</van-collapse-item>
-        <van-collapse-item title="标题2" name="2">内容</van-collapse-item>
-        <van-collapse-item title="标题3" name="3">内容</van-collapse-item>
+        <van-collapse-item v-for="(val, key, ind) in list" :key="ind" :name="key">
+          <template #title>
+            <div class="title">{{ key }}</div>
+            <div class="num">{{ val.storeNum }}家</div>
+          </template>
+          <div
+            class="item"
+            v-if="val.storeList.length"
+            v-for="(item, index) in val.storeList"
+            :key="index">
+            <div class="storeName">{{ item.storeName }}</div>
+            <div class="address">
+              <van-icon name="location-o" />
+              {{ item.addressLine }}
+              <!-- <img v-if="item.distance" style="width: 36px" :src="sbpmdh" @click="linkapp(item)" /> -->
+            </div>
+            <div class="distance" v-if="item.distance">(距离{{ Micrometer(item.distance) }}m)</div>
+            <div
+              class="statstext"
+              :style="{ 'background-color': item.visitsStatus == '未拜访' ? '#ed5c68' : 'white' }">
+              <van-icon
+                v-if="item.visitsStatus == '拜访中'"
+                :name="times"
+                color="#ee0a24"
+                size="32" />
+              {{ item.visitsStatus == '未拜访' ? '未拜访' : '' }}
+            </div>
+          </div>
+        </van-collapse-item>
       </van-collapse>
     </div>
   </div>
 </template>
 <script>
+import { selectUserStoreNoVisits } from '@/api/index';
+import { getPosition, getTicketFun } from '@/utils/TXApiFun';
+import sbpmdh from '@/assets/sbpmdh.png';
+import times from '@/assets/Icon/times.png';
 export default {
+  name: 'noVIsit',
   data() {
     return {
-      activeName: '1',
+      sbpmdh: sbpmdh,
+      times: times,
+      activeName: '',
+      list: {},
     };
   },
+  created() {
+    this.activeName = this.$route.query.activeName;
+    this.getList();
+  },
   methods: {
+    getList() {
+      let resData = {
+        jinPai: {
+          storeList: [
+            {
+              distance: 733122,
+              storeName: '溧阳市南渡益民建材商店',
+              storeCategory: 'JinPai',
+              storeId: 254801,
+              addressLine: '江苏省常州市溧阳市苏浙皖边界市场A区一层31-32号',
+              visitsStatus: '未拜访',
+            },
+          ],
+          storeNum: 1,
+        },
+        tongB: {
+          storeList: [
+            {
+              distance: 735948,
+              storeName: '王明建材店',
+              storeCategory: 'TongB',
+              storeId: 311790,
+              addressLine: '江苏省常州市溧阳市建业街12号',
+              visitsStatus: '未拜访',
+            },
+          ],
+          storeNum: 1,
+        },
+        tongA: {
+          storeList: [
+            {
+              distance: 722628,
+              storeName: '大牛建材',
+              storeCategory: 'TongA',
+              storeId: 311846,
+              addressLine: '江苏省常州市溧阳市公园路与永兴大道交叉口正东方向126米左右',
+              visitsStatus: '未拜访',
+            },
+          ],
+          storeNum: 1,
+        },
+        keKong: {
+          storeList: [
+            {
+              distance: 746334,
+              storeName: '常州市溧阳市边界市场立邦专卖店',
+              storeCategory: 'KeKong',
+              storeId: 244305,
+              addressLine: '江苏省溧阳市苏浙皖边界市场建材区B区二层31-32号',
+              visitsStatus: '未拜访',
+            },
+          ],
+          storeNum: 1,
+        },
+      };
+      this.list = resData;
+      // selectUserStoreNoVisits().then((res) => {});
+    },
     tabChange(val) {},
     onClickLeft() {
       this.$router.go(-1);
@@ -27,4 +123,66 @@ export default {
   },
 };
 </script>
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.noVIsit {
+  .content {
+    padding: 8px 10px;
+    .item {
+      background: #deedff;
+      padding: 8px;
+      margin: 10px 0;
+      border-radius: 5px;
+      position: relative;
+      .storeName {
+        font-size: 15px;
+        font-weight: bold;
+        color: #333;
+        padding: 3px 0;
+      }
+      .address,
+      .distance {
+        font-size: 14px;
+        color: #909090;
+        padding: 3px 0;
+      }
+      .distance {
+        padding-left: 12px;
+      }
+      .statstext {
+        background-color: #0057ba;
+        position: absolute;
+        right: 0;
+        top: 6px;
+        padding: 2px 6px 2px 12px;
+        border-bottom-left-radius: 60px;
+        border-top-left-radius: 60px;
+        color: #fff;
+        .van-icon__image {
+          height: 0.7em;
+        }
+      }
+    }
+  }
+  .van-collapse-item {
+    border-bottom: 1px solid #dcdcdc;
+  }
+}
+</style>
+<style lang="scss">
+.noVIsit {
+  .van-cell__title {
+    font-size: 15px;
+    font-weight: bold;
+    color: #333;
+    display: flex;
+    justify-content: space-between;
+    .num {
+      color: #909090;
+      margin-right: 5px;
+    }
+  }
+  .van-collapse-item__wrapper {
+    border-top: 1px solid #dcdcdc;
+  }
+}
+</style>

+ 118 - 0
src/views/home/hintTabPage/pantoneNoGet.vue

@@ -0,0 +1,118 @@
+<template>
+  <div class="pantoneNoGet">
+    <div class="header">
+      <van-nav-bar class="navBar" title="未签收门店" left-arrow @click-left="onClickLeft" />
+    </div>
+    <div class="content">
+      <template v-if="list.length">
+        <div class="item" v-for="(item, index) in list" :key="index">
+          <div class="storeName">{{ item.storeName }}</div>
+          <div class="address">
+            <van-icon name="location-o" />
+            {{ item.addressLine }}
+            <!-- <img v-if="item.distance" style="width: 36px" :src="sbpmdh" @click="linkapp(item)" /> -->
+          </div>
+          <div class="distance" v-if="item.distance">(距离{{ Micrometer(item.distance) }}m)</div>
+        </div>
+      </template>
+      <van-empty v-else description="暂无数据" />
+    </div>
+  </div>
+</template>
+<script>
+import { getNotSignStoreList } from '@/api/index';
+import { getPosition, getTicketFun } from '@/utils/TXApiFun';
+import sbpmdh from '@/assets/sbpmdh.png';
+export default {
+  name: 'pantoneNoGet',
+  data() {
+    return {
+      sbpmdh: sbpmdh,
+      list: [],
+      point: {}, //当前定位坐标
+    };
+  },
+  created() {
+    this.storeId = this.$route.query.storeId;
+    // config授权
+    getTicketFun().then(() => {
+      getPosition()
+        .then((res) => {
+          let { TXisBD } = res;
+          this.point = TXisBD;
+          this.getNotSignStoreListFun(TXisBD);
+        })
+        .catch((error) => {
+          this.$dialog.alert({
+            message: error,
+          });
+        });
+    });
+  },
+  methods: {
+    getNotSignStoreListFun(TXisBD) {
+      getNotSignStoreList({
+        storeId: this.storeId, //	string	未签门店ID
+        lon: TXisBD.lon, //	string	经度
+        lat: TXisBD.lat, //	string	纬度
+      }).then((res) => {
+        this.list = res.data;
+      });
+    },
+    linkapp(val) {
+      // agentConfig授权
+      getTicketFun(['launchMiniprogram'], 'agentConfig').then(() => {
+        this.wx.invoke(
+          'launchMiniprogram',
+          {
+            appid: 'wx238bbb5f6d958414',
+            path:
+              'pages/relayStation/relayStation?latitude=' +
+              point.lat +
+              '&longitude=' +
+              point.lon +
+              '&name=' +
+              val.addressLine,
+          },
+          function (res) {
+            if (res.err_msg == 'launchMiniprogram:ok') {
+            } else {
+            }
+          }
+        );
+      });
+    },
+    onClickLeft() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.pantoneNoGet {
+  .content {
+    padding: 8px 10px;
+    .item {
+      background: #deedff;
+      padding: 8px;
+      margin: 10px 0;
+      border-radius: 5px;
+      .storeName {
+        font-size: 15px;
+        font-weight: bold;
+        color: #333;
+        padding: 3px 0;
+      }
+      .address,
+      .distance {
+        font-size: 14px;
+        color: #909090;
+        padding: 3px 0;
+      }
+      .distance {
+        padding-left: 12px;
+      }
+    }
+  }
+}
+</style>

+ 4 - 3
src/views/home/hintTabPage/visitPage.vue

@@ -10,7 +10,7 @@
           </div>
           <div class="itemRight">
             <div class="label">{{ list.rightTable }}</div>
-            <div class="label" :style="labelStyle(list)" @click="onClick">
+            <div class="label" :style="labelStyle(list)" @click="onClick(item)">
               {{ resData[item.titleProp][list.rightProp] }}{{ list.rightUnit }}
             </div>
           </div>
@@ -23,6 +23,7 @@
 
 <script>
 export default {
+  name: 'visitPage',
   props: {
     contentData: {
       type: Array,
@@ -54,10 +55,10 @@ export default {
       };
     },
     // 跳转详情
-    onClick() {
+    onClick(item) {
       // 业务员进入未拜访列表
       if (this.empLevel == '3') {
-        this.$router.push({ path: '/noVIsit' });
+        this.$router.push({ path: '/noVIsit', query: { activeName: item.titleProp } });
       } else {
         // 销售部主管和大区负责人跳转统计页面
         this.$router.push({ path: '/hintDetail', query: { fromType: this.fromType } });